@versini/sassysaint 5.4.7 → 5.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{LazyApp.4Z1jQACq.js → LazyApp.DIxe0fTu.js} +634 -631
- package/dist/chunks/LazyHeader.CbHns6B6.js +2974 -0
- package/dist/chunks/{LazyMarkdownWithExtra.BFCvjsJU.js → LazyMarkdownWithExtra.CvWQwKFk.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.B3ooGdCs.js → LazyMessageAssistant.DGf_pblI.js} +1102 -1125
- package/dist/chunks/{index.B5TWwDVi.js → index.CPH8aJ8U.js} +600 -618
- package/dist/chunks/{index.VTwhsE7D.js → index.CzNemj1t.js} +1101 -1234
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/chunks/LazyHeader.UqpjTCxz.js +0 -3039
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import P, { createContext as cr, useReducer as _t, useRef as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as I, Fragment as fe } from "react/jsx-runtime";
|
|
2
|
+
import P, { createContext as cr, useReducer as _t, useRef as $, useCallback as q, useEffect as Q, useContext as Qe, useSyncExternalStore as lr, useId as kt, useState as j, useLayoutEffect as it, useMemo as St, lazy as At, Suspense as vt } from "react";
|
|
3
|
+
import g from "clsx";
|
|
4
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, Ue = (e, t, r) => ur(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
6
|
@versini/auth-provider v7.4.0
|
|
@@ -28,10 +28,10 @@ function Ne(e) {
|
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Ze() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Nt(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
@@ -39,85 +39,85 @@ function kt(e) {
|
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Rt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
|
-
let
|
|
45
|
+
let R = class extends Error {
|
|
46
46
|
constructor({ message: t, code: r, cause: a, name: n }) {
|
|
47
47
|
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function hr({ error: e, options: t }) {
|
|
51
51
|
var a, n;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
54
54
|
throw Error("options was missing required publicKey property");
|
|
55
55
|
if (e.name === "AbortError") {
|
|
56
56
|
if (t.signal instanceof AbortSignal)
|
|
57
|
-
return new
|
|
57
|
+
return new R({
|
|
58
58
|
message: "Registration ceremony was sent an abort signal",
|
|
59
59
|
code: "ERROR_CEREMONY_ABORTED",
|
|
60
60
|
cause: e
|
|
61
61
|
});
|
|
62
62
|
} else if (e.name === "ConstraintError") {
|
|
63
63
|
if (((a = r.authenticatorSelection) == null ? void 0 : a.requireResidentKey) === !0)
|
|
64
|
-
return new
|
|
64
|
+
return new R({
|
|
65
65
|
message: "Discoverable credentials were required but no available authenticator supported it",
|
|
66
66
|
code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
|
|
67
67
|
cause: e
|
|
68
68
|
});
|
|
69
69
|
if (((n = r.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
|
|
70
|
-
return new
|
|
70
|
+
return new R({
|
|
71
71
|
message: "User verification was required but no available authenticator supported it",
|
|
72
72
|
code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
|
|
73
73
|
cause: e
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
76
76
|
if (e.name === "InvalidStateError")
|
|
77
|
-
return new
|
|
77
|
+
return new R({
|
|
78
78
|
message: "The authenticator was previously registered",
|
|
79
79
|
code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
|
|
80
80
|
cause: e
|
|
81
81
|
});
|
|
82
82
|
if (e.name === "NotAllowedError")
|
|
83
|
-
return new
|
|
83
|
+
return new R({
|
|
84
84
|
message: e.message,
|
|
85
85
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
86
86
|
cause: e
|
|
87
87
|
});
|
|
88
88
|
if (e.name === "NotSupportedError")
|
|
89
|
-
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new
|
|
89
|
+
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new R({
|
|
90
90
|
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
|
91
91
|
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
|
92
92
|
cause: e
|
|
93
|
-
}) : new
|
|
93
|
+
}) : new R({
|
|
94
94
|
message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
|
|
95
95
|
code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
|
|
96
96
|
cause: e
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
100
|
+
if (Rt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
|
-
return new
|
|
102
|
+
return new R({
|
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
104
104
|
code: "ERROR_INVALID_RP_ID",
|
|
105
105
|
cause: e
|
|
106
106
|
});
|
|
107
|
-
} else return new
|
|
107
|
+
} else return new R({
|
|
108
108
|
message: `${window.location.hostname} is an invalid domain`,
|
|
109
109
|
code: "ERROR_INVALID_DOMAIN",
|
|
110
110
|
cause: e
|
|
111
111
|
});
|
|
112
112
|
} else if (e.name === "TypeError") {
|
|
113
113
|
if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
|
|
114
|
-
return new
|
|
114
|
+
return new R({
|
|
115
115
|
message: "User ID was not between 1 and 64 characters",
|
|
116
116
|
code: "ERROR_INVALID_USER_ID_LENGTH",
|
|
117
117
|
cause: e
|
|
118
118
|
});
|
|
119
119
|
} else if (e.name === "UnknownError")
|
|
120
|
-
return new
|
|
120
|
+
return new R({
|
|
121
121
|
message: "The authenticator was unable to process the specified options, or could not create a new credential",
|
|
122
122
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
123
123
|
cause: e
|
|
@@ -125,7 +125,7 @@ function mr({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class mr {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,14 +141,14 @@ class hr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
144
|
+
const xt = new mr(), pr = ["cross-platform", "platform"];
|
|
145
|
+
function Ct(e) {
|
|
146
146
|
if (e && !(pr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
149
|
async function gr(e) {
|
|
150
|
-
var
|
|
151
|
-
if (!
|
|
150
|
+
var u;
|
|
151
|
+
if (!Ze())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const t = { publicKey: {
|
|
154
154
|
...e,
|
|
@@ -157,32 +157,32 @@ async function gr(e) {
|
|
|
157
157
|
...e.user,
|
|
158
158
|
id: Ne(e.user.id)
|
|
159
159
|
},
|
|
160
|
-
excludeCredentials: (
|
|
160
|
+
excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(Nt)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = xt.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (c) {
|
|
167
|
-
throw
|
|
167
|
+
throw hr({ error: c, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
171
171
|
const { id: a, rawId: n, response: o, type: s } = r;
|
|
172
172
|
let i;
|
|
173
173
|
typeof o.getTransports == "function" && (i = o.getTransports());
|
|
174
|
-
let
|
|
174
|
+
let d;
|
|
175
175
|
if (typeof o.getPublicKeyAlgorithm == "function")
|
|
176
176
|
try {
|
|
177
|
-
|
|
177
|
+
d = o.getPublicKeyAlgorithm();
|
|
178
178
|
} catch (c) {
|
|
179
179
|
Ke("getPublicKeyAlgorithm()", c);
|
|
180
180
|
}
|
|
181
|
-
let
|
|
181
|
+
let m;
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
184
|
const c = o.getPublicKey();
|
|
185
|
-
c !== null && (
|
|
185
|
+
c !== null && (m = V(c));
|
|
186
186
|
} catch (c) {
|
|
187
187
|
Ke("getPublicKey()", c);
|
|
188
188
|
}
|
|
@@ -200,13 +200,13 @@ async function gr(e) {
|
|
|
200
200
|
attestationObject: V(o.attestationObject),
|
|
201
201
|
clientDataJSON: V(o.clientDataJSON),
|
|
202
202
|
transports: i,
|
|
203
|
-
publicKeyAlgorithm:
|
|
204
|
-
publicKey:
|
|
203
|
+
publicKeyAlgorithm: d,
|
|
204
|
+
publicKey: m,
|
|
205
205
|
authenticatorData: p
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: Ct(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function Ke(e, t) {
|
|
@@ -214,7 +214,7 @@ function Ke(e, t) {
|
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
216
|
function yr() {
|
|
217
|
-
if (!
|
|
217
|
+
if (!Ze())
|
|
218
218
|
return new Promise((t) => t(!1));
|
|
219
219
|
const e = window.PublicKeyCredential;
|
|
220
220
|
return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
|
|
@@ -225,34 +225,34 @@ function fr({ error: e, options: t }) {
|
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
226
226
|
if (e.name === "AbortError") {
|
|
227
227
|
if (t.signal instanceof AbortSignal)
|
|
228
|
-
return new
|
|
228
|
+
return new R({
|
|
229
229
|
message: "Authentication ceremony was sent an abort signal",
|
|
230
230
|
code: "ERROR_CEREMONY_ABORTED",
|
|
231
231
|
cause: e
|
|
232
232
|
});
|
|
233
233
|
} else {
|
|
234
234
|
if (e.name === "NotAllowedError")
|
|
235
|
-
return new
|
|
235
|
+
return new R({
|
|
236
236
|
message: e.message,
|
|
237
237
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
238
238
|
cause: e
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
241
|
const a = window.location.hostname;
|
|
242
|
-
if (
|
|
242
|
+
if (Rt(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
|
-
return new
|
|
244
|
+
return new R({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
246
246
|
code: "ERROR_INVALID_RP_ID",
|
|
247
247
|
cause: e
|
|
248
248
|
});
|
|
249
|
-
} else return new
|
|
249
|
+
} else return new R({
|
|
250
250
|
message: `${window.location.hostname} is an invalid domain`,
|
|
251
251
|
code: "ERROR_INVALID_DOMAIN",
|
|
252
252
|
cause: e
|
|
253
253
|
});
|
|
254
254
|
} else if (e.name === "UnknownError")
|
|
255
|
-
return new
|
|
255
|
+
return new R({
|
|
256
256
|
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
257
257
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
258
258
|
cause: e
|
|
@@ -261,11 +261,11 @@ function fr({ error: e, options: t }) {
|
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
263
|
async function br(e, t = !1) {
|
|
264
|
-
var
|
|
265
|
-
if (!
|
|
264
|
+
var u, c;
|
|
265
|
+
if (!Ze())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let r;
|
|
268
|
-
((
|
|
268
|
+
((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(Nt));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
271
|
challenge: Ne(e.challenge),
|
|
@@ -278,29 +278,29 @@ async function br(e, t = !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 = xt.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
|
-
} catch (
|
|
286
|
-
throw fr({ error:
|
|
285
|
+
} catch (h) {
|
|
286
|
+
throw fr({ error: h, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
|
-
const { id: s, rawId: i, response:
|
|
290
|
+
const { id: s, rawId: i, response: d, type: m } = o;
|
|
291
291
|
let p;
|
|
292
|
-
return
|
|
292
|
+
return d.userHandle && (p = V(d.userHandle)), {
|
|
293
293
|
id: s,
|
|
294
294
|
rawId: V(i),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData: V(
|
|
297
|
-
clientDataJSON: V(
|
|
298
|
-
signature: V(
|
|
296
|
+
authenticatorData: V(d.authenticatorData),
|
|
297
|
+
clientDataJSON: V(d.clientDataJSON),
|
|
298
|
+
signature: V(d.signature),
|
|
299
299
|
userHandle: p
|
|
300
300
|
},
|
|
301
|
-
type:
|
|
301
|
+
type: m,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: Ct(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
@@ -323,9 +323,9 @@ const ue = {
|
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, Ot = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
|
-
},
|
|
328
|
+
}, v = {
|
|
329
329
|
ALG: "RS256",
|
|
330
330
|
USER_ID_KEY: "sub",
|
|
331
331
|
USERNAME_KEY: "username",
|
|
@@ -351,7 +351,7 @@ awIDAQAB
|
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
}, De = crypto,
|
|
354
|
+
}, De = crypto, Pt = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
|
|
355
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;
|
|
@@ -359,115 +359,115 @@ function wr(...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);
|
|
366
366
|
return r;
|
|
367
|
-
},
|
|
367
|
+
}, X = (e) => {
|
|
368
368
|
let t = e;
|
|
369
369
|
t instanceof Uint8Array && (t = be.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
|
}
|
|
375
375
|
};
|
|
376
|
-
let
|
|
376
|
+
let C = class extends Error {
|
|
377
377
|
constructor(t, r) {
|
|
378
378
|
var a;
|
|
379
379
|
super(t, r), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (a = Error.captureStackTrace) == null || a.call(Error, this, this.constructor);
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
|
-
|
|
383
|
-
let
|
|
382
|
+
C.code = "ERR_JOSE_GENERIC";
|
|
383
|
+
let L = class extends C {
|
|
384
384
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
385
385
|
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
|
|
389
|
-
class ze extends
|
|
388
|
+
L.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
389
|
+
class ze extends C {
|
|
390
390
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
391
391
|
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
ze.code = "ERR_JWT_EXPIRED";
|
|
395
|
-
class
|
|
395
|
+
class Dt extends C {
|
|
396
396
|
constructor() {
|
|
397
397
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
|
|
401
|
-
let
|
|
400
|
+
Dt.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
401
|
+
let M = class extends C {
|
|
402
402
|
constructor() {
|
|
403
403
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
|
-
|
|
407
|
-
class
|
|
406
|
+
M.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
+
class Ir extends C {
|
|
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 _r extends C {
|
|
414
414
|
constructor() {
|
|
415
415
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
|
|
419
|
-
let
|
|
418
|
+
_r.code = "ERR_JWE_INVALID";
|
|
419
|
+
let k = class extends C {
|
|
420
420
|
constructor() {
|
|
421
421
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
|
-
|
|
425
|
-
let
|
|
424
|
+
k.code = "ERR_JWS_INVALID";
|
|
425
|
+
let J = class extends C {
|
|
426
426
|
constructor() {
|
|
427
427
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
|
|
431
|
-
class
|
|
430
|
+
J.code = "ERR_JWT_INVALID";
|
|
431
|
+
class kr extends C {
|
|
432
432
|
constructor() {
|
|
433
433
|
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
class
|
|
436
|
+
kr.code = "ERR_JWK_INVALID";
|
|
437
|
+
class Sr extends C {
|
|
438
438
|
constructor() {
|
|
439
439
|
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
class Ar extends
|
|
442
|
+
Sr.code = "ERR_JWKS_INVALID";
|
|
443
|
+
class Ar extends C {
|
|
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
448
|
Ar.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
-
class
|
|
449
|
+
class vr extends C {
|
|
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 Nr extends
|
|
454
|
+
vr.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
+
class Nr extends C {
|
|
456
456
|
constructor(t = "request timed out", r) {
|
|
457
457
|
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
Nr.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
-
class
|
|
461
|
+
class Lt extends C {
|
|
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
|
+
Lt.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
467
|
function F(e, t = "algorithm.name") {
|
|
468
468
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Te(e, t) {
|
|
471
471
|
return e.name === t;
|
|
472
472
|
}
|
|
473
473
|
function He(e) {
|
|
@@ -500,7 +500,7 @@ function Cr(e, t, ...r) {
|
|
|
500
500
|
case "HS256":
|
|
501
501
|
case "HS384":
|
|
502
502
|
case "HS512": {
|
|
503
|
-
if (!
|
|
503
|
+
if (!Te(e.algorithm, "HMAC"))
|
|
504
504
|
throw F("HMAC");
|
|
505
505
|
const a = parseInt(t.slice(2), 10);
|
|
506
506
|
if (He(e.algorithm.hash) !== a)
|
|
@@ -510,7 +510,7 @@ function Cr(e, t, ...r) {
|
|
|
510
510
|
case "RS256":
|
|
511
511
|
case "RS384":
|
|
512
512
|
case "RS512": {
|
|
513
|
-
if (!
|
|
513
|
+
if (!Te(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
514
514
|
throw F("RSASSA-PKCS1-v1_5");
|
|
515
515
|
const a = parseInt(t.slice(2), 10);
|
|
516
516
|
if (He(e.algorithm.hash) !== a)
|
|
@@ -520,7 +520,7 @@ function Cr(e, t, ...r) {
|
|
|
520
520
|
case "PS256":
|
|
521
521
|
case "PS384":
|
|
522
522
|
case "PS512": {
|
|
523
|
-
if (!
|
|
523
|
+
if (!Te(e.algorithm, "RSA-PSS"))
|
|
524
524
|
throw F("RSA-PSS");
|
|
525
525
|
const a = parseInt(t.slice(2), 10);
|
|
526
526
|
if (He(e.algorithm.hash) !== a)
|
|
@@ -535,7 +535,7 @@ function Cr(e, t, ...r) {
|
|
|
535
535
|
case "ES256":
|
|
536
536
|
case "ES384":
|
|
537
537
|
case "ES512": {
|
|
538
|
-
if (!
|
|
538
|
+
if (!Te(e.algorithm, "ECDSA"))
|
|
539
539
|
throw F("ECDSA");
|
|
540
540
|
const a = Rr(t);
|
|
541
541
|
if (e.algorithm.namedCurve !== a)
|
|
@@ -547,7 +547,7 @@ function Cr(e, t, ...r) {
|
|
|
547
547
|
}
|
|
548
548
|
xr(e, r);
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Mt(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 $t(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
|
|
559
|
-
function
|
|
560
|
-
return
|
|
558
|
+
const ct = (e, ...t) => Mt("Key must be ", e, ...t);
|
|
559
|
+
function $t(e, t, ...r) {
|
|
560
|
+
return Mt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
561
|
}
|
|
562
|
-
const
|
|
562
|
+
const Ut = (e) => Pt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Re = ["CryptoKey"], Or = (...e) => {
|
|
563
563
|
const t = e.filter(Boolean);
|
|
564
564
|
if (t.length === 0 || t.length === 1)
|
|
565
565
|
return !0;
|
|
@@ -581,7 +581,7 @@ const Mt = (e) => Ot(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
581
581
|
function Pr(e) {
|
|
582
582
|
return typeof e == "object" && e !== null;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function he(e) {
|
|
585
585
|
if (!Pr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
586
|
return !1;
|
|
587
587
|
if (Object.getPrototypeOf(e) === null)
|
|
@@ -598,17 +598,17 @@ const Dr = (e, t) => {
|
|
|
598
598
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function me(e) {
|
|
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 Mr(e) {
|
|
608
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
610
|
+
function $r(e) {
|
|
611
|
+
return me(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
612
|
}
|
|
613
613
|
function Ur(e) {
|
|
614
614
|
let t, r;
|
|
@@ -635,7 +635,7 @@ function Ur(e) {
|
|
|
635
635
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
636
636
|
break;
|
|
637
637
|
default:
|
|
638
|
-
throw new
|
|
638
|
+
throw new M('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
639
639
|
}
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
@@ -657,7 +657,7 @@ function Ur(e) {
|
|
|
657
657
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
658
658
|
break;
|
|
659
659
|
default:
|
|
660
|
-
throw new
|
|
660
|
+
throw new M('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
661
661
|
}
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
@@ -673,16 +673,16 @@ function Ur(e) {
|
|
|
673
673
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
674
674
|
break;
|
|
675
675
|
default:
|
|
676
|
-
throw new
|
|
676
|
+
throw new M('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
677
677
|
}
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
default:
|
|
681
|
-
throw new
|
|
681
|
+
throw new M('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
682
682
|
}
|
|
683
683
|
return { algorithm: t, keyUsages: r };
|
|
684
684
|
}
|
|
685
|
-
const
|
|
685
|
+
const Kt = async (e) => {
|
|
686
686
|
if (!e.alg)
|
|
687
687
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
688
688
|
const { algorithm: t, keyUsages: r } = Ur(e), a = [
|
|
@@ -691,55 +691,55 @@ const Ut = async (e) => {
|
|
|
691
691
|
e.key_ops ?? r
|
|
692
692
|
], n = { ...e };
|
|
693
693
|
return delete n.alg, delete n.use, De.subtle.importKey("jwk", n, ...a);
|
|
694
|
-
},
|
|
694
|
+
}, Ht = (e) => X(e);
|
|
695
695
|
let ae, ne;
|
|
696
|
-
const
|
|
696
|
+
const Wt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xe = async (e, t, r, a, n = !1) => {
|
|
697
697
|
let o = e.get(t);
|
|
698
698
|
if (o != null && o[a])
|
|
699
699
|
return o[a];
|
|
700
|
-
const s = await
|
|
700
|
+
const s = await Kt({ ...r, alg: a });
|
|
701
701
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
702
702
|
}, Kr = (e, t) => {
|
|
703
|
-
if (
|
|
703
|
+
if (Wt(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 ? Ht(r.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), xe(ne, e, r, t));
|
|
706
706
|
}
|
|
707
|
-
return
|
|
707
|
+
return me(e) ? e.k ? X(e.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), xe(ne, e, e, t, !0)) : e;
|
|
708
708
|
}, Hr = (e, t) => {
|
|
709
|
-
if (
|
|
709
|
+
if (Wt(e)) {
|
|
710
710
|
let r = e.export({ format: "jwk" });
|
|
711
|
-
return r.k ?
|
|
711
|
+
return r.k ? Ht(r.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), xe(ae, e, r, t));
|
|
712
712
|
}
|
|
713
|
-
return
|
|
714
|
-
},
|
|
713
|
+
return me(e) ? e.k ? X(e.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), xe(ae, e, e, t, !0)) : e;
|
|
714
|
+
}, Wr = { normalizePublicKey: Kr, normalizePrivateKey: Hr }, z = (e, t, r = 0) => {
|
|
715
715
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
716
716
|
const a = e.indexOf(t[0], r);
|
|
717
717
|
if (a === -1)
|
|
718
718
|
return !1;
|
|
719
719
|
const n = e.subarray(a, a + t.length);
|
|
720
|
-
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) ||
|
|
721
|
-
},
|
|
720
|
+
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || z(e, t, a + 1);
|
|
721
|
+
}, lt = (e) => {
|
|
722
722
|
switch (!0) {
|
|
723
|
-
case
|
|
723
|
+
case z(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
724
724
|
return "P-256";
|
|
725
|
-
case
|
|
725
|
+
case z(e, [43, 129, 4, 0, 34]):
|
|
726
726
|
return "P-384";
|
|
727
|
-
case
|
|
727
|
+
case z(e, [43, 129, 4, 0, 35]):
|
|
728
728
|
return "P-521";
|
|
729
|
-
case
|
|
729
|
+
case z(e, [43, 101, 110]):
|
|
730
730
|
return "X25519";
|
|
731
|
-
case
|
|
731
|
+
case z(e, [43, 101, 111]):
|
|
732
732
|
return "X448";
|
|
733
|
-
case
|
|
733
|
+
case z(e, [43, 101, 112]):
|
|
734
734
|
return "Ed25519";
|
|
735
|
-
case
|
|
735
|
+
case z(e, [43, 101, 113]):
|
|
736
736
|
return "Ed448";
|
|
737
737
|
default:
|
|
738
|
-
throw new
|
|
738
|
+
throw new M("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
739
739
|
}
|
|
740
|
-
},
|
|
740
|
+
}, Gr = async (e, t, r, a, n) => {
|
|
741
741
|
let o, s;
|
|
742
|
-
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((
|
|
742
|
+
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((d) => d.charCodeAt(0)));
|
|
743
743
|
switch (a) {
|
|
744
744
|
case "PS256":
|
|
745
745
|
case "PS384":
|
|
@@ -773,39 +773,39 @@ const Ht = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
773
773
|
case "ECDH-ES+A128KW":
|
|
774
774
|
case "ECDH-ES+A192KW":
|
|
775
775
|
case "ECDH-ES+A256KW": {
|
|
776
|
-
const
|
|
777
|
-
o =
|
|
776
|
+
const d = lt(i);
|
|
777
|
+
o = d.startsWith("P-") ? { name: "ECDH", namedCurve: d } : { name: d }, s = [];
|
|
778
778
|
break;
|
|
779
779
|
}
|
|
780
780
|
case "EdDSA":
|
|
781
|
-
o = { name:
|
|
781
|
+
o = { name: lt(i) }, s = ["verify"];
|
|
782
782
|
break;
|
|
783
783
|
default:
|
|
784
|
-
throw new
|
|
784
|
+
throw new M('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
785
|
}
|
|
786
786
|
return De.subtle.importKey(t, i, o, !1, s);
|
|
787
|
-
},
|
|
788
|
-
async function
|
|
787
|
+
}, Br = (e, t, r) => Gr(/(?:-----(?: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 Br(e, t);
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
794
|
-
if (!
|
|
793
|
+
async function Vr(e, t) {
|
|
794
|
+
if (!he(e))
|
|
795
795
|
throw new TypeError("JWK must be an object");
|
|
796
796
|
switch (t || (t = e.alg), e.kty) {
|
|
797
797
|
case "oct":
|
|
798
798
|
if (typeof e.k != "string" || !e.k)
|
|
799
799
|
throw new TypeError('missing "k" (Key Value) Parameter value');
|
|
800
|
-
return
|
|
800
|
+
return X(e.k);
|
|
801
801
|
case "RSA":
|
|
802
802
|
if (e.oth !== void 0)
|
|
803
|
-
throw new
|
|
803
|
+
throw new M('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
804
804
|
case "EC":
|
|
805
805
|
case "OKP":
|
|
806
|
-
return
|
|
806
|
+
return Kt({ ...e, alg: t });
|
|
807
807
|
default:
|
|
808
|
-
throw new
|
|
808
|
+
throw new M('Unsupported "kty" (Key Type) Parameter value');
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
811
|
const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) => {
|
|
@@ -819,30 +819,30 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
|
|
|
819
819
|
return !0;
|
|
820
820
|
}, Yr = (e, t, r, a) => {
|
|
821
821
|
if (!(t instanceof Uint8Array)) {
|
|
822
|
-
if (a &&
|
|
823
|
-
if (
|
|
822
|
+
if (a && me(t)) {
|
|
823
|
+
if ($r(t) && je(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 (!Ut(t))
|
|
828
|
+
throw new TypeError($t(e, t, ...Re, "Uint8Array", a ? "JSON Web Key" : null));
|
|
829
829
|
if (t.type !== "secret")
|
|
830
830
|
throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
831
|
}
|
|
832
832
|
}, Fr = (e, t, r, a) => {
|
|
833
|
-
if (a &&
|
|
833
|
+
if (a && me(t))
|
|
834
834
|
switch (r) {
|
|
835
835
|
case "sign":
|
|
836
|
-
if (
|
|
836
|
+
if (Lr(t) && je(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 (Mr(t) && je(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 (!Ut(t))
|
|
845
|
+
throw new TypeError($t(e, t, ...Re, a ? "JSON Web Key" : null));
|
|
846
846
|
if (t.type === "secret")
|
|
847
847
|
throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
848
|
if (r === "sign" && t.type === "public")
|
|
@@ -858,7 +858,7 @@ function Gt(e, t, r, a) {
|
|
|
858
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
860
|
Gt.bind(void 0, !1);
|
|
861
|
-
const
|
|
861
|
+
const dt = Gt.bind(void 0, !0);
|
|
862
862
|
function zr(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');
|
|
@@ -870,7 +870,7 @@ function zr(e, t, r, a, n) {
|
|
|
870
870
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
871
871
|
for (const s of a.crit) {
|
|
872
872
|
if (!o.has(s))
|
|
873
|
-
throw new
|
|
873
|
+
throw new M(`Extension Header Parameter "${s}" is not recognized`);
|
|
874
874
|
if (n[s] === void 0)
|
|
875
875
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
876
876
|
if (o.get(s) && a[s] === void 0)
|
|
@@ -906,18 +906,18 @@ function qr(e, t) {
|
|
|
906
906
|
case "EdDSA":
|
|
907
907
|
return { name: t.name };
|
|
908
908
|
default:
|
|
909
|
-
throw new
|
|
909
|
+
throw new M(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
async function Xr(e, t, r) {
|
|
913
|
-
if (t = await
|
|
913
|
+
if (t = await Wr.normalizePublicKey(t, e), Pt(t))
|
|
914
914
|
return Cr(t, e, r), t;
|
|
915
915
|
if (t instanceof Uint8Array) {
|
|
916
916
|
if (!e.startsWith("HS"))
|
|
917
|
-
throw new TypeError(
|
|
917
|
+
throw new TypeError(ct(t, ...Re));
|
|
918
918
|
return De.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
919
919
|
}
|
|
920
|
-
throw new TypeError(
|
|
920
|
+
throw new TypeError(ct(t, ...Re, "Uint8Array", "JSON Web Key"));
|
|
921
921
|
}
|
|
922
922
|
const Qr = async (e, t, r, a) => {
|
|
923
923
|
const n = await Xr(e, t, "verify");
|
|
@@ -930,78 +930,78 @@ const Qr = async (e, t, r, a) => {
|
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
932
|
async function Zr(e, t, r) {
|
|
933
|
-
if (!
|
|
934
|
-
throw new
|
|
933
|
+
if (!he(e))
|
|
934
|
+
throw new k("Flattened JWS must be an object");
|
|
935
935
|
if (e.protected === void 0 && e.header === void 0)
|
|
936
|
-
throw new
|
|
936
|
+
throw new k('Flattened JWS must have either of the "protected" or "header" members');
|
|
937
937
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
938
|
-
throw new
|
|
938
|
+
throw new k("JWS Protected Header incorrect type");
|
|
939
939
|
if (e.payload === void 0)
|
|
940
|
-
throw new
|
|
940
|
+
throw new k("JWS Payload missing");
|
|
941
941
|
if (typeof e.signature != "string")
|
|
942
|
-
throw new
|
|
943
|
-
if (e.header !== void 0 && !
|
|
944
|
-
throw new
|
|
942
|
+
throw new k("JWS Signature missing or incorrect type");
|
|
943
|
+
if (e.header !== void 0 && !he(e.header))
|
|
944
|
+
throw new k("JWS Unprotected Header incorrect type");
|
|
945
945
|
let a = {};
|
|
946
946
|
if (e.protected)
|
|
947
947
|
try {
|
|
948
|
-
const f =
|
|
948
|
+
const f = X(e.protected);
|
|
949
949
|
a = JSON.parse(be.decode(f));
|
|
950
950
|
} catch {
|
|
951
|
-
throw new
|
|
951
|
+
throw new k("JWS Protected Header is invalid");
|
|
952
952
|
}
|
|
953
953
|
if (!Or(a, e.header))
|
|
954
|
-
throw new
|
|
954
|
+
throw new k("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
955
955
|
const n = {
|
|
956
956
|
...a,
|
|
957
957
|
...e.header
|
|
958
|
-
}, o = zr(
|
|
958
|
+
}, o = zr(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
959
959
|
let s = !0;
|
|
960
960
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
961
|
-
throw new
|
|
961
|
+
throw new k('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
962
962
|
const { alg: i } = n;
|
|
963
963
|
if (typeof i != "string" || !i)
|
|
964
|
-
throw new
|
|
965
|
-
const
|
|
966
|
-
if (
|
|
967
|
-
throw new
|
|
964
|
+
throw new k('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
965
|
+
const d = jr("algorithms", r.algorithms);
|
|
966
|
+
if (d && !d.has(i))
|
|
967
|
+
throw new Dt('"alg" (Algorithm) Header Parameter value not allowed');
|
|
968
968
|
if (s) {
|
|
969
969
|
if (typeof e.payload != "string")
|
|
970
|
-
throw new
|
|
970
|
+
throw new k("JWS Payload must be a string");
|
|
971
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
972
|
-
throw new
|
|
973
|
-
let
|
|
974
|
-
typeof t == "function" ? (t = await t(a, e),
|
|
972
|
+
throw new k("JWS Payload must be a string or an Uint8Array instance");
|
|
973
|
+
let m = !1;
|
|
974
|
+
typeof t == "function" ? (t = await t(a, e), m = !0, dt(i, t, "verify"), me(t) && (t = await Vr(t, i))) : dt(i, t, "verify");
|
|
975
975
|
const p = wr(we.encode(e.protected ?? ""), we.encode("."), typeof e.payload == "string" ? we.encode(e.payload) : e.payload);
|
|
976
|
-
let
|
|
976
|
+
let u;
|
|
977
977
|
try {
|
|
978
|
-
|
|
978
|
+
u = X(e.signature);
|
|
979
979
|
} catch {
|
|
980
|
-
throw new
|
|
980
|
+
throw new k("Failed to base64url decode the signature");
|
|
981
981
|
}
|
|
982
|
-
if (!await Qr(i, t,
|
|
983
|
-
throw new
|
|
982
|
+
if (!await Qr(i, t, u, p))
|
|
983
|
+
throw new Lt();
|
|
984
984
|
let c;
|
|
985
985
|
if (s)
|
|
986
986
|
try {
|
|
987
|
-
c =
|
|
987
|
+
c = X(e.payload);
|
|
988
988
|
} catch {
|
|
989
|
-
throw new
|
|
989
|
+
throw new k("Failed to base64url decode the payload");
|
|
990
990
|
}
|
|
991
991
|
else typeof e.payload == "string" ? c = we.encode(e.payload) : c = e.payload;
|
|
992
|
-
const
|
|
993
|
-
return e.protected !== void 0 && (
|
|
992
|
+
const h = { payload: c };
|
|
993
|
+
return e.protected !== void 0 && (h.protectedHeader = a), e.header !== void 0 && (h.unprotectedHeader = e.header), m ? { ...h, key: t } : h;
|
|
994
994
|
}
|
|
995
995
|
async function ea(e, t, r) {
|
|
996
996
|
if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
|
|
997
|
-
throw new
|
|
997
|
+
throw new k("Compact JWS must be a string or Uint8Array");
|
|
998
998
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
999
999
|
if (s !== 3)
|
|
1000
|
-
throw new
|
|
1001
|
-
const i = await Zr({ payload: n, protected: a, signature: o }, t, r),
|
|
1002
|
-
return typeof t == "function" ? { ...
|
|
1000
|
+
throw new k("Invalid Compact JWS");
|
|
1001
|
+
const i = await Zr({ payload: n, protected: a, signature: o }, t, r), d = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
1002
|
+
return typeof t == "function" ? { ...d, key: i.key } : d;
|
|
1003
1003
|
}
|
|
1004
|
-
const ta = (e) => Math.floor(e.getTime() / 1e3),
|
|
1004
|
+
const ta = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Jt = Bt * 60, et = Jt * 24, ra = et * 7, aa = et * 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, ut = (e) => {
|
|
1005
1005
|
const t = na.exec(e);
|
|
1006
1006
|
if (!t || t[4] && t[1])
|
|
1007
1007
|
throw new TypeError("Invalid time period format");
|
|
@@ -1020,19 +1020,19 @@ const ta = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Vt = Wt * 60, Ze = Vt
|
|
|
1020
1020
|
case "min":
|
|
1021
1021
|
case "mins":
|
|
1022
1022
|
case "m":
|
|
1023
|
-
n = Math.round(r *
|
|
1023
|
+
n = Math.round(r * Bt);
|
|
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 * Jt);
|
|
1031
1031
|
break;
|
|
1032
1032
|
case "day":
|
|
1033
1033
|
case "days":
|
|
1034
1034
|
case "d":
|
|
1035
|
-
n = Math.round(r *
|
|
1035
|
+
n = Math.round(r * et);
|
|
1036
1036
|
break;
|
|
1037
1037
|
case "week":
|
|
1038
1038
|
case "weeks":
|
|
@@ -1044,63 +1044,63 @@ const ta = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Vt = Wt * 60, Ze = Vt
|
|
|
1044
1044
|
break;
|
|
1045
1045
|
}
|
|
1046
1046
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1047
|
-
},
|
|
1047
|
+
}, ht = (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(be.decode(t));
|
|
1051
1051
|
} catch {
|
|
1052
1052
|
}
|
|
1053
|
-
if (!
|
|
1054
|
-
throw new
|
|
1053
|
+
if (!he(a))
|
|
1054
|
+
throw new J("JWT Claims Set must be a top-level JSON object");
|
|
1055
1055
|
const { typ: n } = r;
|
|
1056
|
-
if (n && (typeof e.typ != "string" ||
|
|
1057
|
-
throw new
|
|
1058
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience:
|
|
1059
|
-
|
|
1056
|
+
if (n && (typeof e.typ != "string" || ht(e.typ) !== ht(n)))
|
|
1057
|
+
throw new L('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1058
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: m } = r, p = [...o];
|
|
1059
|
+
m !== void 0 && p.push("iat"), d !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
|
|
1060
1060
|
for (const f of new Set(p.reverse()))
|
|
1061
1061
|
if (!(f in a))
|
|
1062
|
-
throw new
|
|
1062
|
+
throw new L(`missing required "${f}" claim`, a, f, "missing");
|
|
1063
1063
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
1064
|
-
throw new
|
|
1064
|
+
throw new L('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1065
1065
|
if (i && a.sub !== i)
|
|
1066
|
-
throw new
|
|
1067
|
-
if (
|
|
1068
|
-
throw new
|
|
1069
|
-
let
|
|
1066
|
+
throw new L('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1067
|
+
if (d && !oa(a.aud, typeof d == "string" ? [d] : d))
|
|
1068
|
+
throw new L('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1069
|
+
let u;
|
|
1070
1070
|
switch (typeof r.clockTolerance) {
|
|
1071
1071
|
case "string":
|
|
1072
|
-
|
|
1072
|
+
u = ut(r.clockTolerance);
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "number":
|
|
1075
|
-
|
|
1075
|
+
u = r.clockTolerance;
|
|
1076
1076
|
break;
|
|
1077
1077
|
case "undefined":
|
|
1078
|
-
|
|
1078
|
+
u = 0;
|
|
1079
1079
|
break;
|
|
1080
1080
|
default:
|
|
1081
1081
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1082
1082
|
}
|
|
1083
|
-
const { currentDate: c } = r,
|
|
1084
|
-
if ((a.iat !== void 0 ||
|
|
1085
|
-
throw new
|
|
1083
|
+
const { currentDate: c } = r, h = ta(c || /* @__PURE__ */ new Date());
|
|
1084
|
+
if ((a.iat !== void 0 || m) && typeof a.iat != "number")
|
|
1085
|
+
throw new L('"iat" claim must be a number', a, "iat", "invalid");
|
|
1086
1086
|
if (a.nbf !== void 0) {
|
|
1087
1087
|
if (typeof a.nbf != "number")
|
|
1088
|
-
throw new
|
|
1089
|
-
if (a.nbf >
|
|
1090
|
-
throw new
|
|
1088
|
+
throw new L('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1089
|
+
if (a.nbf > h + u)
|
|
1090
|
+
throw new L('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
1091
1091
|
}
|
|
1092
1092
|
if (a.exp !== void 0) {
|
|
1093
1093
|
if (typeof a.exp != "number")
|
|
1094
|
-
throw new
|
|
1095
|
-
if (a.exp <=
|
|
1094
|
+
throw new L('"exp" claim must be a number', a, "exp", "invalid");
|
|
1095
|
+
if (a.exp <= h - u)
|
|
1096
1096
|
throw new ze('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1097
1097
|
}
|
|
1098
|
-
if (
|
|
1099
|
-
const f =
|
|
1100
|
-
if (f -
|
|
1098
|
+
if (m) {
|
|
1099
|
+
const f = h - a.iat, E = typeof m == "number" ? m : ut(m);
|
|
1100
|
+
if (f - u > E)
|
|
1101
1101
|
throw new ze('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1102
|
-
if (f < 0 -
|
|
1103
|
-
throw new
|
|
1102
|
+
if (f < 0 - u)
|
|
1103
|
+
throw new L('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
1104
1104
|
}
|
|
1105
1105
|
return a;
|
|
1106
1106
|
};
|
|
@@ -1108,42 +1108,42 @@ async function ia(e, t, r) {
|
|
|
1108
1108
|
var a;
|
|
1109
1109
|
const n = await ea(e, t, r);
|
|
1110
1110
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1111
|
-
throw new
|
|
1111
|
+
throw new J("JWTs MUST NOT use unencoded payload");
|
|
1112
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 ca =
|
|
1115
|
+
const ca = X;
|
|
1116
1116
|
function la(e) {
|
|
1117
1117
|
if (typeof e != "string")
|
|
1118
|
-
throw new
|
|
1118
|
+
throw new J("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1119
1119
|
const { 1: t, length: r } = e.split(".");
|
|
1120
1120
|
if (r === 5)
|
|
1121
|
-
throw new
|
|
1121
|
+
throw new J("Only JWTs using Compact JWS serialization can be decoded");
|
|
1122
1122
|
if (r !== 3)
|
|
1123
|
-
throw new
|
|
1123
|
+
throw new J("Invalid JWT");
|
|
1124
1124
|
if (!t)
|
|
1125
|
-
throw new
|
|
1125
|
+
throw new J("JWTs must contain a payload");
|
|
1126
1126
|
let a;
|
|
1127
1127
|
try {
|
|
1128
1128
|
a = ca(t);
|
|
1129
1129
|
} catch {
|
|
1130
|
-
throw new
|
|
1130
|
+
throw new J("Failed to base64url decode the payload");
|
|
1131
1131
|
}
|
|
1132
1132
|
let n;
|
|
1133
1133
|
try {
|
|
1134
1134
|
n = JSON.parse(be.decode(a));
|
|
1135
1135
|
} catch {
|
|
1136
|
-
throw new
|
|
1136
|
+
throw new J("Failed to parse the decoded payload as JSON");
|
|
1137
1137
|
}
|
|
1138
|
-
if (!
|
|
1139
|
-
throw new
|
|
1138
|
+
if (!he(n))
|
|
1139
|
+
throw new J("Invalid JWT Claims Set");
|
|
1140
1140
|
return n;
|
|
1141
1141
|
}
|
|
1142
1142
|
const ye = async (e) => {
|
|
1143
1143
|
try {
|
|
1144
|
-
const t =
|
|
1144
|
+
const t = v.ALG, r = await Jr(Er, t);
|
|
1145
1145
|
return await ia(e, r, {
|
|
1146
|
-
issuer:
|
|
1146
|
+
issuer: v.ISSUER
|
|
1147
1147
|
});
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
return;
|
|
@@ -1154,39 +1154,39 @@ const ye = async (e) => {
|
|
|
1154
1154
|
} catch {
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
|
-
},
|
|
1157
|
+
}, S = [];
|
|
1158
1158
|
for (let e = 0; e < 256; ++e)
|
|
1159
|
-
|
|
1159
|
+
S.push((e + 256).toString(16).slice(1));
|
|
1160
1160
|
function ua(e, t = 0) {
|
|
1161
|
-
return (
|
|
1161
|
+
return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
|
|
1162
1162
|
}
|
|
1163
|
-
let
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1166
|
-
if (!
|
|
1163
|
+
let We;
|
|
1164
|
+
const ha = new Uint8Array(16);
|
|
1165
|
+
function ma() {
|
|
1166
|
+
if (!We) {
|
|
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
|
+
We = crypto.getRandomValues.bind(crypto);
|
|
1170
1170
|
}
|
|
1171
|
-
return
|
|
1171
|
+
return We(ha);
|
|
1172
1172
|
}
|
|
1173
1173
|
const pa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: pa };
|
|
1174
|
-
function
|
|
1174
|
+
function pt(e, t, r) {
|
|
1175
1175
|
if (mt.randomUUID && !t && !e)
|
|
1176
1176
|
return mt.randomUUID();
|
|
1177
1177
|
e = e || {};
|
|
1178
|
-
const a = e.random || (e.rng ||
|
|
1178
|
+
const a = e.random || (e.rng || ma)();
|
|
1179
1179
|
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ua(a);
|
|
1180
1180
|
}
|
|
1181
|
-
const
|
|
1181
|
+
const gt = globalThis.crypto, ga = (e) => `${pt()}${pt()}`.slice(0, e), ya = (e) => btoa(
|
|
1182
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
1183
|
);
|
|
1184
1184
|
async function fa(e) {
|
|
1185
|
-
if (!
|
|
1185
|
+
if (!gt.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1189
|
+
const t = new TextEncoder().encode(e), r = await gt.subtle.digest("SHA-256", t);
|
|
1190
1190
|
return ya(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
1191
|
}
|
|
1192
1192
|
async function ba(e) {
|
|
@@ -1196,39 +1196,39 @@ async function ba(e) {
|
|
|
1196
1196
|
code_challenge: r
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Vt(e, t) {
|
|
1200
1200
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1201
1201
|
}
|
|
1202
|
-
const
|
|
1202
|
+
const yt = (e, t) => {
|
|
1203
1203
|
const r = JSON.stringify(
|
|
1204
1204
|
typeof t == "function" ? t() : t
|
|
1205
1205
|
);
|
|
1206
|
-
window.localStorage.setItem(e, r),
|
|
1206
|
+
window.localStorage.setItem(e, r), Vt(e, r);
|
|
1207
1207
|
}, Ea = (e) => {
|
|
1208
|
-
window.localStorage.removeItem(e),
|
|
1209
|
-
},
|
|
1210
|
-
function
|
|
1208
|
+
window.localStorage.removeItem(e), Vt(e, null);
|
|
1209
|
+
}, ft = (e) => window.localStorage.getItem(e), wa = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1210
|
+
function Ie({
|
|
1211
1211
|
key: e,
|
|
1212
1212
|
initialValue: t
|
|
1213
1213
|
}) {
|
|
1214
|
-
const r = lr(wa, () =>
|
|
1214
|
+
const r = lr(wa, () => ft(e)), a = q(
|
|
1215
1215
|
(s) => {
|
|
1216
1216
|
try {
|
|
1217
1217
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1218
|
-
i == null ? Ea(e) :
|
|
1218
|
+
i == null ? Ea(e) : yt(e, i);
|
|
1219
1219
|
} catch (i) {
|
|
1220
1220
|
console.warn(i);
|
|
1221
1221
|
}
|
|
1222
1222
|
},
|
|
1223
1223
|
[e, r]
|
|
1224
|
-
), n =
|
|
1224
|
+
), n = q(() => {
|
|
1225
1225
|
a(t);
|
|
1226
|
-
}, [t, a]), o =
|
|
1226
|
+
}, [t, a]), o = q(() => {
|
|
1227
1227
|
a(null);
|
|
1228
1228
|
}, [a]);
|
|
1229
|
-
return
|
|
1229
|
+
return Q(() => {
|
|
1230
1230
|
try {
|
|
1231
|
-
|
|
1231
|
+
ft(e) === null && typeof t < "u" && yt(e, t);
|
|
1232
1232
|
} catch (s) {
|
|
1233
1233
|
console.warn(s);
|
|
1234
1234
|
}
|
|
@@ -1237,31 +1237,31 @@ function _e({
|
|
|
1237
1237
|
const A = [];
|
|
1238
1238
|
for (let e = 0; e < 256; ++e)
|
|
1239
1239
|
A.push((e + 256).toString(16).slice(1));
|
|
1240
|
-
function
|
|
1240
|
+
function Ta(e, t = 0) {
|
|
1241
1241
|
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();
|
|
1242
1242
|
}
|
|
1243
|
-
let
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1246
|
-
if (!
|
|
1243
|
+
let Ge;
|
|
1244
|
+
const Ia = new Uint8Array(16);
|
|
1245
|
+
function _a() {
|
|
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
|
|
1251
|
+
return Ge(Ia);
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1254
|
-
function
|
|
1255
|
-
if (
|
|
1256
|
-
return
|
|
1253
|
+
const ka = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), bt = { randomUUID: ka };
|
|
1254
|
+
function Be(e, t, r) {
|
|
1255
|
+
if (bt.randomUUID && !t && !e)
|
|
1256
|
+
return bt.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 || _a)();
|
|
1259
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ta(a);
|
|
1260
1260
|
}
|
|
1261
|
-
const oe = "Your session has expired. For your security, please log in again to continue.",
|
|
1261
|
+
const oe = "Your session has expired. For your security, please log in again to continue.", Sa = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", Aa = "Error getting access token, please re-authenticate.", va = "You forgot to wrap your component in <AuthProvider>.", Ce = {
|
|
1262
1262
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1263
1263
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1264
|
-
},
|
|
1264
|
+
}, _e = "@@auth@@", ge = "LOADING", Ae = "LOGIN", Yt = "LOGOUT", Ee = "success", Y = "failure", Ft = "include", zt = "POST", jt = "application/json", ke = {
|
|
1265
1265
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1266
1266
|
$clientId: String!,
|
|
1267
1267
|
$username: String!,
|
|
@@ -1344,19 +1344,19 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1344
1344
|
}`
|
|
1345
1345
|
}, se = {
|
|
1346
1346
|
GET_REGISTRATION_OPTIONS: {
|
|
1347
|
-
schema:
|
|
1347
|
+
schema: ke.GET_REGISTRATION_OPTIONS,
|
|
1348
1348
|
method: "getPasskeyRegistrationOptions"
|
|
1349
1349
|
},
|
|
1350
1350
|
VERIFY_REGISTRATION: {
|
|
1351
|
-
schema:
|
|
1351
|
+
schema: ke.VERIFY_REGISTRATION,
|
|
1352
1352
|
method: "verifyPasskeyRegistration"
|
|
1353
1353
|
},
|
|
1354
1354
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1355
|
-
schema:
|
|
1355
|
+
schema: ke.GET_AUTHENTICATION_OPTIONS,
|
|
1356
1356
|
method: "getPasskeyAuthenticationOptions"
|
|
1357
1357
|
},
|
|
1358
1358
|
VERIFY_AUTHENTICATION: {
|
|
1359
|
-
schema:
|
|
1359
|
+
schema: ke.VERIFY_AUTHENTICATION,
|
|
1360
1360
|
method: "verifyPasskeyAuthentication"
|
|
1361
1361
|
}
|
|
1362
1362
|
}, ie = async ({
|
|
@@ -1367,14 +1367,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1367
1367
|
}) => {
|
|
1368
1368
|
try {
|
|
1369
1369
|
const n = `Bearer ${e}`, o = await fetch(
|
|
1370
|
-
|
|
1370
|
+
qt ? `${Ce.dev}/graphql` : `${Ce.prod}/graphql`,
|
|
1371
1371
|
{
|
|
1372
|
-
credentials:
|
|
1373
|
-
method:
|
|
1372
|
+
credentials: Ft,
|
|
1373
|
+
method: zt,
|
|
1374
1374
|
headers: {
|
|
1375
1375
|
authorization: n,
|
|
1376
|
-
"Content-Type":
|
|
1377
|
-
[
|
|
1376
|
+
"Content-Type": jt,
|
|
1377
|
+
[Ot.CLIENT_ID]: `${r}`
|
|
1378
1378
|
},
|
|
1379
1379
|
body: JSON.stringify({
|
|
1380
1380
|
query: t.schema,
|
|
@@ -1383,44 +1383,44 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1383
1383
|
}
|
|
1384
1384
|
);
|
|
1385
1385
|
if (o.status !== 200)
|
|
1386
|
-
return { status:
|
|
1386
|
+
return { status: Y, data: [] };
|
|
1387
1387
|
const { data: s } = await o.json();
|
|
1388
1388
|
return {
|
|
1389
1389
|
status: Ee,
|
|
1390
1390
|
data: s[t.method]
|
|
1391
1391
|
};
|
|
1392
1392
|
} catch (n) {
|
|
1393
|
-
return console.error(n), { status:
|
|
1393
|
+
return console.error(n), { status: Y, data: [] };
|
|
1394
1394
|
}
|
|
1395
|
-
},
|
|
1395
|
+
}, Le = async ({
|
|
1396
1396
|
type: e,
|
|
1397
1397
|
clientId: t,
|
|
1398
1398
|
params: r = {}
|
|
1399
1399
|
}) => {
|
|
1400
1400
|
try {
|
|
1401
1401
|
const a = await fetch(
|
|
1402
|
-
|
|
1402
|
+
qt ? `${Ce.dev}/${e}` : `${Ce.prod}/${e}`,
|
|
1403
1403
|
{
|
|
1404
|
-
credentials:
|
|
1405
|
-
method:
|
|
1404
|
+
credentials: Ft,
|
|
1405
|
+
method: zt,
|
|
1406
1406
|
headers: {
|
|
1407
|
-
"Content-Type":
|
|
1408
|
-
[
|
|
1407
|
+
"Content-Type": jt,
|
|
1408
|
+
[Ot.CLIENT_ID]: `${t}`
|
|
1409
1409
|
},
|
|
1410
1410
|
body: JSON.stringify(r)
|
|
1411
1411
|
}
|
|
1412
1412
|
);
|
|
1413
1413
|
if (a.status !== 200)
|
|
1414
|
-
return { status:
|
|
1414
|
+
return { status: Y, data: [] };
|
|
1415
1415
|
const { data: n } = await a.json();
|
|
1416
1416
|
return {
|
|
1417
1417
|
status: Ee,
|
|
1418
1418
|
data: n || []
|
|
1419
1419
|
};
|
|
1420
1420
|
} catch (a) {
|
|
1421
|
-
return console.error(a), { status:
|
|
1421
|
+
return console.error(a), { status: Y, data: [] };
|
|
1422
1422
|
}
|
|
1423
|
-
}, Na = process.env.NODE_ENV === "production",
|
|
1423
|
+
}, Na = process.env.NODE_ENV === "production", qt = !Na, Xt = {
|
|
1424
1424
|
isLoading: !0,
|
|
1425
1425
|
isAuthenticated: !1,
|
|
1426
1426
|
user: void 0,
|
|
@@ -1430,7 +1430,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1430
1430
|
}, Ra = (e) => {
|
|
1431
1431
|
try {
|
|
1432
1432
|
const t = da(e);
|
|
1433
|
-
return t ? t[
|
|
1433
|
+
return t ? t[v.USER_ID_KEY] : "";
|
|
1434
1434
|
} catch {
|
|
1435
1435
|
return "";
|
|
1436
1436
|
}
|
|
@@ -1443,7 +1443,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1443
1443
|
var n;
|
|
1444
1444
|
try {
|
|
1445
1445
|
return {
|
|
1446
|
-
status: ((n = await
|
|
1446
|
+
status: ((n = await Le({
|
|
1447
1447
|
type: Pe.LOGOUT,
|
|
1448
1448
|
clientId: t,
|
|
1449
1449
|
params: {
|
|
@@ -1451,11 +1451,11 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1451
1451
|
domain: r,
|
|
1452
1452
|
idToken: a
|
|
1453
1453
|
}
|
|
1454
|
-
})) == null ? void 0 : n.status) ||
|
|
1454
|
+
})) == null ? void 0 : n.status) || Y
|
|
1455
1455
|
};
|
|
1456
1456
|
} catch {
|
|
1457
1457
|
return {
|
|
1458
|
-
status:
|
|
1458
|
+
status: Y
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
1461
|
}, Ca = async ({
|
|
@@ -1467,12 +1467,12 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1467
1467
|
sessionExpiration: o,
|
|
1468
1468
|
code: s,
|
|
1469
1469
|
code_verifier: i,
|
|
1470
|
-
domain:
|
|
1471
|
-
ua:
|
|
1470
|
+
domain: d,
|
|
1471
|
+
ua: m
|
|
1472
1472
|
}) => {
|
|
1473
1473
|
var p;
|
|
1474
1474
|
try {
|
|
1475
|
-
const
|
|
1475
|
+
const u = await Le({
|
|
1476
1476
|
type: Pe.LOGIN,
|
|
1477
1477
|
clientId: r,
|
|
1478
1478
|
params: {
|
|
@@ -1483,16 +1483,16 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1483
1483
|
nonce: a,
|
|
1484
1484
|
code: s,
|
|
1485
1485
|
code_verifier: i,
|
|
1486
|
-
domain:
|
|
1487
|
-
ua:
|
|
1486
|
+
domain: d,
|
|
1487
|
+
ua: m
|
|
1488
1488
|
}
|
|
1489
|
-
}), c = await ye((p =
|
|
1490
|
-
return c && c.payload[
|
|
1491
|
-
idToken:
|
|
1492
|
-
accessToken:
|
|
1493
|
-
refreshToken:
|
|
1494
|
-
userId: c.payload[
|
|
1495
|
-
email: c.payload[
|
|
1489
|
+
}), c = await ye((p = u == null ? void 0 : u.data) == null ? void 0 : p.idToken);
|
|
1490
|
+
return c && c.payload[v.USER_ID_KEY] !== "" && c.payload[v.NONCE_KEY] === a ? {
|
|
1491
|
+
idToken: u.data.idToken,
|
|
1492
|
+
accessToken: u.data.accessToken,
|
|
1493
|
+
refreshToken: u.data.refreshToken,
|
|
1494
|
+
userId: c.payload[v.USER_ID_KEY],
|
|
1495
|
+
email: c.payload[v.EMAIL_KEY],
|
|
1496
1496
|
status: !0
|
|
1497
1497
|
} : {
|
|
1498
1498
|
status: !1
|
|
@@ -1509,7 +1509,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1509
1509
|
}) => {
|
|
1510
1510
|
var a;
|
|
1511
1511
|
try {
|
|
1512
|
-
const n = await
|
|
1512
|
+
const n = await Le({
|
|
1513
1513
|
type: Pe.CODE,
|
|
1514
1514
|
clientId: t,
|
|
1515
1515
|
params: {
|
|
@@ -1522,12 +1522,12 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1522
1522
|
status: Ee,
|
|
1523
1523
|
data: n.data.code
|
|
1524
1524
|
} : {
|
|
1525
|
-
status:
|
|
1525
|
+
status: Y,
|
|
1526
1526
|
data: ""
|
|
1527
1527
|
};
|
|
1528
1528
|
} catch {
|
|
1529
1529
|
return {
|
|
1530
|
-
status:
|
|
1530
|
+
status: Y,
|
|
1531
1531
|
data: ""
|
|
1532
1532
|
};
|
|
1533
1533
|
}
|
|
@@ -1541,7 +1541,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1541
1541
|
}) => {
|
|
1542
1542
|
var s;
|
|
1543
1543
|
try {
|
|
1544
|
-
const i = await
|
|
1544
|
+
const i = await Le({
|
|
1545
1545
|
type: Pe.REFRESH,
|
|
1546
1546
|
clientId: e,
|
|
1547
1547
|
params: {
|
|
@@ -1552,11 +1552,11 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1552
1552
|
accessToken: n,
|
|
1553
1553
|
domain: o
|
|
1554
1554
|
}
|
|
1555
|
-
}),
|
|
1556
|
-
return
|
|
1555
|
+
}), d = await ye((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
|
|
1556
|
+
return d && d.payload[v.USER_ID_KEY] !== "" && d.payload[v.NONCE_KEY] === r ? {
|
|
1557
1557
|
accessToken: i.data.accessToken,
|
|
1558
1558
|
refreshToken: i.data.refreshToken,
|
|
1559
|
-
userId:
|
|
1559
|
+
userId: d.payload[v.USER_ID_KEY],
|
|
1560
1560
|
status: !0
|
|
1561
1561
|
} : {
|
|
1562
1562
|
status: !1
|
|
@@ -1596,7 +1596,7 @@ class Da {
|
|
|
1596
1596
|
domain: n
|
|
1597
1597
|
}) {
|
|
1598
1598
|
const o = await ye(this.refreshToken);
|
|
1599
|
-
if (o && o.payload[
|
|
1599
|
+
if (o && o.payload[v.USER_ID_KEY] !== "") {
|
|
1600
1600
|
const s = await Pa({
|
|
1601
1601
|
clientId: t,
|
|
1602
1602
|
userId: r,
|
|
@@ -1610,22 +1610,22 @@ class Da {
|
|
|
1610
1610
|
newAccessToken: s.accessToken,
|
|
1611
1611
|
newRefreshToken: s.refreshToken
|
|
1612
1612
|
}) : {
|
|
1613
|
-
status:
|
|
1613
|
+
status: Y
|
|
1614
1614
|
};
|
|
1615
1615
|
} else
|
|
1616
1616
|
return {
|
|
1617
|
-
status:
|
|
1617
|
+
status: Y
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
1621
|
-
const
|
|
1621
|
+
const La = (e) => q(
|
|
1622
1622
|
(...t) => {
|
|
1623
1623
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1624
1624
|
},
|
|
1625
1625
|
[e]
|
|
1626
1626
|
), ce = () => {
|
|
1627
|
-
throw new Error(
|
|
1628
|
-
},
|
|
1627
|
+
throw new Error(va);
|
|
1628
|
+
}, Qt = cr({
|
|
1629
1629
|
isAuthenticated: !1,
|
|
1630
1630
|
isLoading: !1,
|
|
1631
1631
|
login: ce,
|
|
@@ -1636,11 +1636,11 @@ const $a = (e) => X(
|
|
|
1636
1636
|
loginWithPasskey: ce,
|
|
1637
1637
|
logoutReason: "",
|
|
1638
1638
|
authenticationType: ""
|
|
1639
|
-
}),
|
|
1640
|
-
state:
|
|
1639
|
+
}), Ma = P.createContext({
|
|
1640
|
+
state: Xt,
|
|
1641
1641
|
dispatch: () => {
|
|
1642
1642
|
}
|
|
1643
|
-
}),
|
|
1643
|
+
}), $a = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1644
1644
|
...e,
|
|
1645
1645
|
isLoading: t.payload.isLoading
|
|
1646
1646
|
} : (t == null ? void 0 : t.type) === Ae ? {
|
|
@@ -1650,7 +1650,7 @@ const $a = (e) => X(
|
|
|
1650
1650
|
user: t.payload.user,
|
|
1651
1651
|
authenticationType: t.payload.authenticationType,
|
|
1652
1652
|
logoutReason: ""
|
|
1653
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1653
|
+
} : (t == null ? void 0 : t.type) === Yt ? {
|
|
1654
1654
|
...e,
|
|
1655
1655
|
isLoading: !1,
|
|
1656
1656
|
isAuthenticated: !1,
|
|
@@ -1664,172 +1664,172 @@ const $a = (e) => X(
|
|
|
1664
1664
|
domain: a = "",
|
|
1665
1665
|
debug: n = !1
|
|
1666
1666
|
}) => {
|
|
1667
|
-
const [o, s] = _t(
|
|
1668
|
-
...
|
|
1667
|
+
const [o, s] = _t($a, {
|
|
1668
|
+
...Xt,
|
|
1669
1669
|
debug: n
|
|
1670
|
-
}), i =
|
|
1671
|
-
key: `${
|
|
1672
|
-
}), [c,
|
|
1673
|
-
key: `${
|
|
1674
|
-
}), [
|
|
1670
|
+
}), i = La(n), d = $(!1), [m, p, , u] = Ie({
|
|
1671
|
+
key: `${_e}::${r}::@@user@@`
|
|
1672
|
+
}), [c, h, , f] = Ie({
|
|
1673
|
+
key: `${_e}::${r}::@@access@@`
|
|
1674
|
+
}), [E, w, , _] = Ie(
|
|
1675
1675
|
{
|
|
1676
|
-
key: `${
|
|
1676
|
+
key: `${_e}::${r}::@@refresh@@`
|
|
1677
1677
|
}
|
|
1678
|
-
), [
|
|
1679
|
-
key: `${
|
|
1680
|
-
}),
|
|
1681
|
-
i("removeLocalStorage: removing local storage"),
|
|
1678
|
+
), [U, K, , H] = Ie({
|
|
1679
|
+
key: `${_e}::${r}::@@nonce@@`
|
|
1680
|
+
}), O = new Da(c, E), W = q(() => {
|
|
1681
|
+
i("removeLocalStorage: removing local storage"), u(), f(), _(), H();
|
|
1682
1682
|
}, [
|
|
1683
1683
|
f,
|
|
1684
|
-
|
|
1684
|
+
u,
|
|
1685
1685
|
H,
|
|
1686
|
-
|
|
1686
|
+
_,
|
|
1687
1687
|
i
|
|
1688
|
-
]),
|
|
1689
|
-
(
|
|
1688
|
+
]), G = q(
|
|
1689
|
+
(y) => {
|
|
1690
1690
|
i(
|
|
1691
1691
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1692
|
-
|
|
1692
|
+
y
|
|
1693
1693
|
), s({
|
|
1694
|
-
type:
|
|
1694
|
+
type: Yt,
|
|
1695
1695
|
payload: {
|
|
1696
|
-
logoutReason:
|
|
1696
|
+
logoutReason: y || oe
|
|
1697
1697
|
}
|
|
1698
|
-
}),
|
|
1698
|
+
}), W(), s({ type: ge, payload: { isLoading: !1 } });
|
|
1699
1699
|
},
|
|
1700
|
-
[
|
|
1701
|
-
),
|
|
1702
|
-
async (
|
|
1700
|
+
[W, i]
|
|
1701
|
+
), x = q(
|
|
1702
|
+
async (y) => {
|
|
1703
1703
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1704
|
-
const { user:
|
|
1705
|
-
|
|
1704
|
+
const { user: T } = o, b = (T == null ? void 0 : T.userId) || Ra(m);
|
|
1705
|
+
b || i(
|
|
1706
1706
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1707
1707
|
), await xa({
|
|
1708
|
-
userId:
|
|
1708
|
+
userId: b,
|
|
1709
1709
|
clientId: r,
|
|
1710
1710
|
domain: a,
|
|
1711
|
-
idToken:
|
|
1712
|
-
}),
|
|
1711
|
+
idToken: m
|
|
1712
|
+
}), G(y || oe);
|
|
1713
1713
|
},
|
|
1714
|
-
[
|
|
1714
|
+
[m, o, r, a, G, i]
|
|
1715
1715
|
);
|
|
1716
|
-
|
|
1717
|
-
if (!
|
|
1718
|
-
return o.isLoading &&
|
|
1716
|
+
Q(() => {
|
|
1717
|
+
if (!d.current)
|
|
1718
|
+
return o.isLoading && m !== null ? (async () => {
|
|
1719
1719
|
try {
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1720
|
+
const y = await ye(m);
|
|
1721
|
+
y && y.payload[v.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
|
|
1722
1722
|
type: Ae,
|
|
1723
1723
|
payload: {
|
|
1724
|
-
authenticationType:
|
|
1724
|
+
authenticationType: y.payload[v.AUTH_TYPE_KEY],
|
|
1725
1725
|
user: {
|
|
1726
|
-
userId:
|
|
1727
|
-
username:
|
|
1728
|
-
email:
|
|
1726
|
+
userId: y.payload[v.USER_ID_KEY],
|
|
1727
|
+
username: y.payload[v.USERNAME_KEY],
|
|
1728
|
+
email: y.payload[v.EMAIL_KEY]
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await
|
|
1731
|
+
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await x(oe));
|
|
1732
1732
|
} catch {
|
|
1733
1733
|
i(
|
|
1734
1734
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
1735
|
-
), await
|
|
1735
|
+
), await x(oe);
|
|
1736
1736
|
}
|
|
1737
1737
|
})() : (i("useEffect: setting the loading state to false"), s({ type: ge, payload: { isLoading: !1 } })), () => {
|
|
1738
|
-
|
|
1738
|
+
d.current = !0;
|
|
1739
1739
|
};
|
|
1740
|
-
}, [o.isLoading,
|
|
1741
|
-
const
|
|
1742
|
-
s({ type: ge, payload: { isLoading: !0 } }),
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1745
|
-
const { code_verifier:
|
|
1746
|
-
nonce:
|
|
1740
|
+
}, [o.isLoading, m, x, i]);
|
|
1741
|
+
const pe = async (y, T) => {
|
|
1742
|
+
s({ type: ge, payload: { isLoading: !0 } }), W();
|
|
1743
|
+
const b = Be();
|
|
1744
|
+
K(b), i("login: Logging in with password");
|
|
1745
|
+
const { code_verifier: te, code_challenge: ir } = await ba(), st = await Oa({
|
|
1746
|
+
nonce: b,
|
|
1747
1747
|
clientId: r,
|
|
1748
1748
|
code_challenge: ir
|
|
1749
1749
|
});
|
|
1750
|
-
if (
|
|
1750
|
+
if (st.status) {
|
|
1751
1751
|
const re = await Ca({
|
|
1752
|
-
username:
|
|
1753
|
-
password:
|
|
1752
|
+
username: y,
|
|
1753
|
+
password: T,
|
|
1754
1754
|
clientId: r,
|
|
1755
1755
|
sessionExpiration: t,
|
|
1756
|
-
nonce:
|
|
1756
|
+
nonce: b,
|
|
1757
1757
|
type: ue.CODE,
|
|
1758
|
-
code:
|
|
1759
|
-
code_verifier:
|
|
1758
|
+
code: st.data,
|
|
1759
|
+
code_verifier: te,
|
|
1760
1760
|
domain: a,
|
|
1761
1761
|
ua: navigator.userAgent
|
|
1762
1762
|
});
|
|
1763
|
-
return re.status ? (p(re.idToken),
|
|
1763
|
+
return re.status ? (p(re.idToken), h(re.accessToken), w(re.refreshToken), s({
|
|
1764
1764
|
type: Ae,
|
|
1765
1765
|
payload: {
|
|
1766
1766
|
authenticationType: ue.CODE,
|
|
1767
1767
|
user: {
|
|
1768
1768
|
userId: re.userId,
|
|
1769
|
-
username:
|
|
1769
|
+
username: y,
|
|
1770
1770
|
email: re.email
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
|
-
}), !0) : (
|
|
1773
|
+
}), !0) : (G(Je), !1);
|
|
1774
1774
|
}
|
|
1775
1775
|
return !1;
|
|
1776
|
-
},
|
|
1777
|
-
|
|
1778
|
-
},
|
|
1779
|
-
const { isAuthenticated:
|
|
1776
|
+
}, Z = async (y) => {
|
|
1777
|
+
y == null || y.preventDefault(), await x(Sa);
|
|
1778
|
+
}, N = async () => {
|
|
1779
|
+
const { isAuthenticated: y, user: T } = o;
|
|
1780
1780
|
try {
|
|
1781
|
-
if (
|
|
1781
|
+
if (y && T && T.userId) {
|
|
1782
1782
|
if (c) {
|
|
1783
1783
|
i("getAccessToken");
|
|
1784
|
-
const
|
|
1785
|
-
if (
|
|
1784
|
+
const te = await ye(c);
|
|
1785
|
+
if (te && te.payload[v.USER_ID_KEY] !== "")
|
|
1786
1786
|
return c;
|
|
1787
1787
|
}
|
|
1788
1788
|
i("getAccessToken: invalid access token, trying to refresh it");
|
|
1789
|
-
const
|
|
1789
|
+
const b = await O.refreshtoken({
|
|
1790
1790
|
clientId: r,
|
|
1791
|
-
userId:
|
|
1792
|
-
nonce:
|
|
1791
|
+
userId: T.userId,
|
|
1792
|
+
nonce: U,
|
|
1793
1793
|
domain: a
|
|
1794
1794
|
});
|
|
1795
|
-
return
|
|
1795
|
+
return b.status && b.status === "success" && b.newAccessToken ? (h(b.newAccessToken), w(b.newRefreshToken), b.newAccessToken) : (i(
|
|
1796
1796
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1797
|
-
), await
|
|
1797
|
+
), await x(oe), "");
|
|
1798
1798
|
}
|
|
1799
1799
|
return i(
|
|
1800
1800
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
1801
|
-
), await
|
|
1801
|
+
), await x(oe), "";
|
|
1802
1802
|
} catch {
|
|
1803
1803
|
return i(
|
|
1804
1804
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1805
|
-
), await
|
|
1805
|
+
), await x(Aa), "";
|
|
1806
1806
|
}
|
|
1807
|
-
},
|
|
1808
|
-
const { user:
|
|
1809
|
-
let
|
|
1807
|
+
}, D = () => o.isAuthenticated && m ? m : "", B = async () => {
|
|
1808
|
+
const { user: y } = o;
|
|
1809
|
+
let T = await ie({
|
|
1810
1810
|
accessToken: c,
|
|
1811
1811
|
clientId: r,
|
|
1812
1812
|
type: se.GET_REGISTRATION_OPTIONS,
|
|
1813
1813
|
params: {
|
|
1814
1814
|
clientId: r,
|
|
1815
|
-
id:
|
|
1816
|
-
username:
|
|
1815
|
+
id: y == null ? void 0 : y.userId,
|
|
1816
|
+
username: y == null ? void 0 : y.username
|
|
1817
1817
|
}
|
|
1818
1818
|
});
|
|
1819
|
-
if (
|
|
1819
|
+
if (T.status)
|
|
1820
1820
|
try {
|
|
1821
|
-
const
|
|
1822
|
-
return
|
|
1821
|
+
const b = await gr(T.data);
|
|
1822
|
+
return T = await ie({
|
|
1823
1823
|
accessToken: c,
|
|
1824
1824
|
clientId: r,
|
|
1825
1825
|
type: se.VERIFY_REGISTRATION,
|
|
1826
1826
|
params: {
|
|
1827
1827
|
clientId: r,
|
|
1828
|
-
id:
|
|
1829
|
-
username:
|
|
1830
|
-
registration:
|
|
1828
|
+
id: y == null ? void 0 : y.userId,
|
|
1829
|
+
username: y == null ? void 0 : y.username,
|
|
1830
|
+
registration: b
|
|
1831
1831
|
}
|
|
1832
|
-
}), !!(
|
|
1832
|
+
}), !!(T.status && T.data.length > 0);
|
|
1833
1833
|
} catch {
|
|
1834
1834
|
return await ie({
|
|
1835
1835
|
accessToken: c,
|
|
@@ -1837,54 +1837,54 @@ const $a = (e) => X(
|
|
|
1837
1837
|
type: se.VERIFY_REGISTRATION,
|
|
1838
1838
|
params: {
|
|
1839
1839
|
clientId: r,
|
|
1840
|
-
id:
|
|
1841
|
-
username:
|
|
1840
|
+
id: y == null ? void 0 : y.userId,
|
|
1841
|
+
username: y == null ? void 0 : y.username,
|
|
1842
1842
|
registration: {}
|
|
1843
1843
|
}
|
|
1844
1844
|
}), !1;
|
|
1845
1845
|
}
|
|
1846
1846
|
return !1;
|
|
1847
|
-
},
|
|
1848
|
-
s({ type: ge, payload: { isLoading: !0 } }),
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
-
const
|
|
1852
|
-
let
|
|
1847
|
+
}, ee = async () => {
|
|
1848
|
+
s({ type: ge, payload: { isLoading: !0 } }), W();
|
|
1849
|
+
const y = Be();
|
|
1850
|
+
K(y), i("loginWithPasskey");
|
|
1851
|
+
const T = Be();
|
|
1852
|
+
let b = await ie({
|
|
1853
1853
|
accessToken: c,
|
|
1854
1854
|
clientId: r,
|
|
1855
1855
|
type: se.GET_AUTHENTICATION_OPTIONS,
|
|
1856
1856
|
params: {
|
|
1857
|
-
id:
|
|
1857
|
+
id: T,
|
|
1858
1858
|
clientId: r
|
|
1859
1859
|
}
|
|
1860
1860
|
});
|
|
1861
|
-
if (
|
|
1861
|
+
if (b.status)
|
|
1862
1862
|
try {
|
|
1863
|
-
const
|
|
1864
|
-
return
|
|
1863
|
+
const te = await br(b.data);
|
|
1864
|
+
return b = await ie({
|
|
1865
1865
|
accessToken: c,
|
|
1866
1866
|
clientId: r,
|
|
1867
1867
|
type: se.VERIFY_AUTHENTICATION,
|
|
1868
1868
|
params: {
|
|
1869
1869
|
clientId: r,
|
|
1870
|
-
id:
|
|
1871
|
-
authentication:
|
|
1872
|
-
nonce:
|
|
1870
|
+
id: T,
|
|
1871
|
+
authentication: te,
|
|
1872
|
+
nonce: y,
|
|
1873
1873
|
domain: a,
|
|
1874
1874
|
sessionExpiration: t,
|
|
1875
1875
|
ua: navigator.userAgent
|
|
1876
1876
|
}
|
|
1877
|
-
}),
|
|
1877
|
+
}), b.data.status === Ee ? (p(b.data.idToken), h(b.data.accessToken), w(b.data.refreshToken), s({
|
|
1878
1878
|
type: Ae,
|
|
1879
1879
|
payload: {
|
|
1880
1880
|
authenticationType: ue.PASSKEY,
|
|
1881
1881
|
user: {
|
|
1882
|
-
userId:
|
|
1883
|
-
username:
|
|
1884
|
-
email:
|
|
1882
|
+
userId: b.data.userId,
|
|
1883
|
+
username: b.data.username,
|
|
1884
|
+
email: b.data.email
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
|
-
}), !0) : (
|
|
1887
|
+
}), !0) : (G(Je), !1);
|
|
1888
1888
|
} catch {
|
|
1889
1889
|
return await ie({
|
|
1890
1890
|
accessToken: c,
|
|
@@ -1892,32 +1892,32 @@ const $a = (e) => X(
|
|
|
1892
1892
|
type: se.VERIFY_AUTHENTICATION,
|
|
1893
1893
|
params: {
|
|
1894
1894
|
clientId: r,
|
|
1895
|
-
id:
|
|
1895
|
+
id: T,
|
|
1896
1896
|
authentication: {},
|
|
1897
|
-
nonce:
|
|
1897
|
+
nonce: y,
|
|
1898
1898
|
domain: a,
|
|
1899
1899
|
sessionExpiration: t
|
|
1900
1900
|
}
|
|
1901
|
-
}),
|
|
1901
|
+
}), G(Je), !1;
|
|
1902
1902
|
}
|
|
1903
1903
|
return !1;
|
|
1904
1904
|
};
|
|
1905
|
-
return /* @__PURE__ */ l(
|
|
1906
|
-
|
|
1905
|
+
return /* @__PURE__ */ l(Ma.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
1906
|
+
Qt.Provider,
|
|
1907
1907
|
{
|
|
1908
1908
|
value: {
|
|
1909
1909
|
...o,
|
|
1910
|
-
login:
|
|
1911
|
-
logout:
|
|
1912
|
-
getAccessToken:
|
|
1913
|
-
getIdToken:
|
|
1914
|
-
registeringForPasskey:
|
|
1915
|
-
loginWithPasskey:
|
|
1910
|
+
login: pe,
|
|
1911
|
+
logout: Z,
|
|
1912
|
+
getAccessToken: N,
|
|
1913
|
+
getIdToken: D,
|
|
1914
|
+
registeringForPasskey: B,
|
|
1915
|
+
loginWithPasskey: ee
|
|
1916
1916
|
},
|
|
1917
1917
|
children: e
|
|
1918
1918
|
}
|
|
1919
1919
|
) });
|
|
1920
|
-
},
|
|
1920
|
+
}, tt = (e = Qt) => Qe(e), uo = "user", ho = "assistant", mo = "system", po = "internal", go = "hidden", yo = "I'm having trouble right now. Please try again later.", Ve = "OpenAI", fo = "OpenAI", bo = "Anthropic", Eo = 128e3, wo = "action-message", To = "action-reset", Io = "action-model", _o = "action-restore", ko = "action-streaming", So = "action-engine", Ao = "action-search", vo = "action-sort", No = "action-toggle-tag", Ro = "action-reset-tags", xo = "action-set-tags", Co = "sassy-saint-", Oo = "details", Po = "search", Do = "sort", Lo = "engine-toggle", Mo = "==stats==", Ka = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Et = (e) => Number.isFinite(e) ? e : 0;
|
|
1921
1921
|
function Ha(e) {
|
|
1922
1922
|
return {
|
|
1923
1923
|
days: Math.trunc(e / 864e5),
|
|
@@ -1925,11 +1925,11 @@ function Ha(e) {
|
|
|
1925
1925
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1926
1926
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1927
1927
|
milliseconds: Math.trunc(e % 1e3),
|
|
1928
|
-
microseconds: Math.trunc(
|
|
1929
|
-
nanoseconds: Math.trunc(
|
|
1928
|
+
microseconds: Math.trunc(Et(e * 1e3) % 1e3),
|
|
1929
|
+
nanoseconds: Math.trunc(Et(e * 1e6) % 1e3)
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Wa(e) {
|
|
1933
1933
|
return {
|
|
1934
1934
|
days: e / 86400000n,
|
|
1935
1935
|
hours: e / 3600000n % 24n,
|
|
@@ -1940,7 +1940,7 @@ function Ga(e) {
|
|
|
1940
1940
|
nanoseconds: 0n
|
|
1941
1941
|
};
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Ga(e) {
|
|
1944
1944
|
switch (typeof e) {
|
|
1945
1945
|
case "number": {
|
|
1946
1946
|
if (Number.isFinite(e))
|
|
@@ -1948,11 +1948,11 @@ function Wa(e) {
|
|
|
1948
1948
|
break;
|
|
1949
1949
|
}
|
|
1950
1950
|
case "bigint":
|
|
1951
|
-
return
|
|
1951
|
+
return Wa(e);
|
|
1952
1952
|
}
|
|
1953
1953
|
throw new TypeError("Expected a finite number or bigint");
|
|
1954
1954
|
}
|
|
1955
|
-
const
|
|
1955
|
+
const Ba = (e) => e === 0 || e === 0n, Ja = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Va = 1e-7, Ya = 24n * 60n * 60n * 1000n;
|
|
1956
1956
|
function Fa(e, t) {
|
|
1957
1957
|
const r = typeof e == "bigint";
|
|
1958
1958
|
if (!r && !Number.isFinite(e))
|
|
@@ -1961,43 +1961,43 @@ function Fa(e, t) {
|
|
|
1961
1961
|
const a = e < 0 ? "-" : "";
|
|
1962
1962
|
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
1963
1963
|
let n = [];
|
|
1964
|
-
const o = (p,
|
|
1965
|
-
const c = Math.floor(p * 10 **
|
|
1966
|
-
return (Math.round(c) / 10 **
|
|
1967
|
-
}, s = (p,
|
|
1968
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1969
|
-
if (
|
|
1970
|
-
const f =
|
|
1971
|
-
|
|
1964
|
+
const o = (p, u) => {
|
|
1965
|
+
const c = Math.floor(p * 10 ** u + Va);
|
|
1966
|
+
return (Math.round(c) / 10 ** u).toFixed(u);
|
|
1967
|
+
}, s = (p, u, c, h) => {
|
|
1968
|
+
if (!((n.length === 0 || !t.colonNotation) && Ba(p) && !(t.colonNotation && c === "m"))) {
|
|
1969
|
+
if (h ?? (h = String(p)), t.colonNotation) {
|
|
1970
|
+
const f = h.includes(".") ? h.split(".")[0].length : h.length, E = n.length > 0 ? 2 : 1;
|
|
1971
|
+
h = "0".repeat(Math.max(0, E - f)) + h;
|
|
1972
1972
|
} else
|
|
1973
|
-
|
|
1974
|
-
n.push(
|
|
1973
|
+
h += t.verbose ? " " + Ja(u, p) : c;
|
|
1974
|
+
n.push(h);
|
|
1975
1975
|
}
|
|
1976
|
-
}, i =
|
|
1977
|
-
if (t.hideYearAndDays ? s(BigInt(
|
|
1976
|
+
}, i = Ga(e), d = BigInt(i.days);
|
|
1977
|
+
if (t.hideYearAndDays ? s(BigInt(d) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(d, "day", "d") : (s(d / 365n, "year", "y"), s(d % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
1978
1978
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1979
|
-
const p = Number(i.seconds),
|
|
1979
|
+
const p = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), h = Number(i.nanoseconds);
|
|
1980
1980
|
if (s(p, "second", "s"), t.formatSubMilliseconds)
|
|
1981
|
-
s(
|
|
1981
|
+
s(u, "millisecond", "ms"), s(c, "microsecond", "µs"), s(h, "nanosecond", "ns");
|
|
1982
1982
|
else {
|
|
1983
|
-
const f =
|
|
1983
|
+
const f = u + c / 1e3 + h / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = f >= 1 ? Math.round(f) : Math.ceil(f), _ = E ? f.toFixed(E) : w;
|
|
1984
1984
|
s(
|
|
1985
|
-
Number.parseFloat(
|
|
1985
|
+
Number.parseFloat(_),
|
|
1986
1986
|
"millisecond",
|
|
1987
1987
|
"ms",
|
|
1988
|
-
|
|
1988
|
+
_
|
|
1989
1989
|
);
|
|
1990
1990
|
}
|
|
1991
1991
|
} else {
|
|
1992
|
-
const p = (r ? Number(e % Ya) : e) / 1e3 % 60,
|
|
1993
|
-
s(Number.parseFloat(
|
|
1992
|
+
const p = (r ? Number(e % Ya) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(p, u), h = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
|
|
1993
|
+
s(Number.parseFloat(h), "second", "s", h);
|
|
1994
1994
|
}
|
|
1995
1995
|
if (n.length === 0)
|
|
1996
1996
|
return a + "0" + (t.verbose ? " milliseconds" : "ms");
|
|
1997
|
-
const
|
|
1998
|
-
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(
|
|
1997
|
+
const m = t.colonNotation ? ":" : " ";
|
|
1998
|
+
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(m);
|
|
1999
1999
|
}
|
|
2000
|
-
const za = process.env.NODE_ENV === "production",
|
|
2000
|
+
const za = process.env.NODE_ENV === "production", rt = !za, ja = rt ? "gizmette.local.com" : "gizmette.com", $o = async () => {
|
|
2001
2001
|
const e = {
|
|
2002
2002
|
/**
|
|
2003
2003
|
* A boolean value that indicates the application would
|
|
@@ -2046,11 +2046,11 @@ const za = process.env.NODE_ENV === "production", tt = !za, ja = tt ? "gizmette.
|
|
|
2046
2046
|
e
|
|
2047
2047
|
);
|
|
2048
2048
|
});
|
|
2049
|
-
},
|
|
2049
|
+
}, Uo = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
|
|
2050
2050
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2051
2051
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2052
2052
|
] }) }, `${e}-${r}`)) : null;
|
|
2053
|
-
function
|
|
2053
|
+
function Ko({
|
|
2054
2054
|
data: e,
|
|
2055
2055
|
formatter: t = (r) => r
|
|
2056
2056
|
}) {
|
|
@@ -2062,46 +2062,23 @@ function zo({
|
|
|
2062
2062
|
);
|
|
2063
2063
|
return t(a ? a / r.length : 0);
|
|
2064
2064
|
}
|
|
2065
|
-
const
|
|
2065
|
+
const Ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Wo = new Intl.NumberFormat("en", {
|
|
2066
2066
|
style: "decimal",
|
|
2067
2067
|
signDisplay: "never",
|
|
2068
2068
|
minimumFractionDigits: 0,
|
|
2069
2069
|
maximumFractionDigits: 0
|
|
2070
|
-
}),
|
|
2070
|
+
}), Go = (e) => e > 0 ? Fa(e, {
|
|
2071
2071
|
secondsDecimalDigits: 2,
|
|
2072
2072
|
unitCount: 2
|
|
2073
|
-
}) : "N/A", qa = (e) =>
|
|
2073
|
+
}) : "N/A", qa = (e) => g(
|
|
2074
2074
|
"flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
|
|
2075
|
-
e ||
|
|
2076
|
-
),
|
|
2075
|
+
e || rt ? "pt-4" : "pt-10"
|
|
2076
|
+
), Bo = (e, t) => t === 1 ? e : `${e}s`, Jo = (e, t) => {
|
|
2077
2077
|
let r;
|
|
2078
2078
|
return (...a) => {
|
|
2079
2079
|
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2080
2080
|
};
|
|
2081
|
-
},
|
|
2082
|
-
/*!
|
|
2083
|
-
@versini/ui-spacing v1.1.0
|
|
2084
|
-
© 2024 gizmette.com
|
|
2085
|
-
*/
|
|
2086
|
-
try {
|
|
2087
|
-
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
2088
|
-
version: "1.1.0",
|
|
2089
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
2090
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2091
|
-
license: "MIT"
|
|
2092
|
-
});
|
|
2093
|
-
} catch {
|
|
2094
|
-
}
|
|
2095
|
-
const Xa = (e) => {
|
|
2096
|
-
let t = "";
|
|
2097
|
-
if (typeof e == "number" || typeof e == "string")
|
|
2098
|
-
t = "m-" + e;
|
|
2099
|
-
else {
|
|
2100
|
-
const r = [];
|
|
2101
|
-
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2102
|
-
}
|
|
2103
|
-
return t;
|
|
2104
|
-
}, rt = "icon", Qt = "button", Qa = "link", Za = ({
|
|
2081
|
+
}, wt = "av-button", at = "icon", Zt = "button", Xa = "link", Qa = ({
|
|
2105
2082
|
type: e,
|
|
2106
2083
|
size: t,
|
|
2107
2084
|
labelRight: r,
|
|
@@ -2110,20 +2087,20 @@ const Xa = (e) => {
|
|
|
2110
2087
|
}) => {
|
|
2111
2088
|
const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", i = "text-lg font-medium max-h-12 py-2";
|
|
2112
2089
|
switch (e) {
|
|
2113
|
-
case
|
|
2114
|
-
return
|
|
2090
|
+
case Zt:
|
|
2091
|
+
return g("px-4", {
|
|
2115
2092
|
[o]: t === "small",
|
|
2116
2093
|
[s]: t === "medium",
|
|
2117
2094
|
[i]: t === "large"
|
|
2118
2095
|
});
|
|
2119
|
-
case
|
|
2120
|
-
return
|
|
2096
|
+
case Xa:
|
|
2097
|
+
return g("px-4 text-center", {
|
|
2121
2098
|
[o]: t === "small",
|
|
2122
2099
|
[s]: t === "medium",
|
|
2123
2100
|
[i]: t === "large"
|
|
2124
2101
|
});
|
|
2125
|
-
case
|
|
2126
|
-
return
|
|
2102
|
+
case at:
|
|
2103
|
+
return g("inline-flex items-center", {
|
|
2127
2104
|
"justify-center": n === "center",
|
|
2128
2105
|
"justify-start": n === "left",
|
|
2129
2106
|
"justify-end": n === "right",
|
|
@@ -2135,16 +2112,24 @@ const Xa = (e) => {
|
|
|
2135
2112
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
2136
2113
|
});
|
|
2137
2114
|
}
|
|
2138
|
-
},
|
|
2115
|
+
}, Za = ({
|
|
2139
2116
|
mode: e,
|
|
2140
2117
|
noBackground: t,
|
|
2141
2118
|
noTruncate: r,
|
|
2142
|
-
variant: a
|
|
2119
|
+
variant: a,
|
|
2120
|
+
radius: n
|
|
2143
2121
|
}) => {
|
|
2144
2122
|
if (t)
|
|
2145
|
-
return "not-prose
|
|
2123
|
+
return g("not-prose", {
|
|
2124
|
+
"rounded-full": n === "large",
|
|
2125
|
+
"rounded-md": n === "medium",
|
|
2126
|
+
"rounded-sm": n === "small"
|
|
2127
|
+
});
|
|
2146
2128
|
if (a === "primary")
|
|
2147
|
-
return
|
|
2129
|
+
return g("not-prose", {
|
|
2130
|
+
"rounded-full": n === "large",
|
|
2131
|
+
"rounded-md": n === "medium",
|
|
2132
|
+
"rounded-sm": n === "small",
|
|
2148
2133
|
truncate: !r,
|
|
2149
2134
|
"bg-action-dark text-copy-light": e === "dark",
|
|
2150
2135
|
"bg-action-light text-copy-lighter": e === "light",
|
|
@@ -2152,7 +2137,10 @@ const Xa = (e) => {
|
|
|
2152
2137
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
2153
2138
|
});
|
|
2154
2139
|
if (a === "secondary")
|
|
2155
|
-
return
|
|
2140
|
+
return g("not-prose", {
|
|
2141
|
+
"rounded-full": n === "large",
|
|
2142
|
+
"rounded-md": n === "medium",
|
|
2143
|
+
"rounded-sm": n === "small",
|
|
2156
2144
|
truncate: !r,
|
|
2157
2145
|
"bg-action-dark text-copy-light": e === "light",
|
|
2158
2146
|
"bg-action-light text-copy-lighter": e === "dark",
|
|
@@ -2160,14 +2148,28 @@ const Xa = (e) => {
|
|
|
2160
2148
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
2161
2149
|
});
|
|
2162
2150
|
if (a === "danger")
|
|
2163
|
-
return
|
|
2151
|
+
return g("not-prose", {
|
|
2152
|
+
"rounded-full": n === "large",
|
|
2153
|
+
"rounded-md": n === "medium",
|
|
2154
|
+
"rounded-sm": n === "small",
|
|
2164
2155
|
truncate: !r,
|
|
2165
2156
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
2166
2157
|
"bg-action-danger-light text-copy-lighter": e === "light",
|
|
2167
2158
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2168
2159
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2169
2160
|
});
|
|
2170
|
-
|
|
2161
|
+
if (a === "selected")
|
|
2162
|
+
return g("not-prose", {
|
|
2163
|
+
"rounded-full": n === "large",
|
|
2164
|
+
"rounded-md": n === "medium",
|
|
2165
|
+
"rounded-sm": n === "small",
|
|
2166
|
+
truncate: !r,
|
|
2167
|
+
"bg-action-selected-dark text-copy-light": e === "dark",
|
|
2168
|
+
"bg-action-selected-light text-copy-lighter": e === "light",
|
|
2169
|
+
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
2170
|
+
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
2171
|
+
});
|
|
2172
|
+
}, en = ({
|
|
2171
2173
|
mode: e,
|
|
2172
2174
|
disabled: t,
|
|
2173
2175
|
variant: r
|
|
@@ -2175,27 +2177,34 @@ const Xa = (e) => {
|
|
|
2175
2177
|
if (t)
|
|
2176
2178
|
return "";
|
|
2177
2179
|
if (r === "primary")
|
|
2178
|
-
return
|
|
2180
|
+
return g("hover:text-copy-light-hover", {
|
|
2179
2181
|
"hover:bg-action-dark-hover": e === "dark",
|
|
2180
2182
|
"hover:bg-action-light-hover": e === "light",
|
|
2181
2183
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
2182
2184
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
2183
2185
|
});
|
|
2184
2186
|
if (r === "secondary")
|
|
2185
|
-
return
|
|
2187
|
+
return g("hover:text-copy-light-hover", {
|
|
2186
2188
|
"hover:bg-action-dark-hover": e === "light",
|
|
2187
2189
|
"hover:bg-action-light-hover": e === "dark",
|
|
2188
2190
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
2189
2191
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
2190
2192
|
});
|
|
2191
2193
|
if (r === "danger")
|
|
2192
|
-
return
|
|
2194
|
+
return g("hover:text-copy-light-hover", {
|
|
2193
2195
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
2194
2196
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
2195
2197
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2196
2198
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2197
2199
|
});
|
|
2198
|
-
|
|
2200
|
+
if (r === "selected")
|
|
2201
|
+
return g("hover:text-copy-light-hover", {
|
|
2202
|
+
"hover:bg-action-selected-dark-hover": e === "dark",
|
|
2203
|
+
"hover:bg-action-selected-light-hover": e === "light",
|
|
2204
|
+
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
2205
|
+
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
2206
|
+
});
|
|
2207
|
+
}, tn = ({
|
|
2199
2208
|
mode: e,
|
|
2200
2209
|
disabled: t,
|
|
2201
2210
|
variant: r
|
|
@@ -2203,27 +2212,34 @@ const Xa = (e) => {
|
|
|
2203
2212
|
if (t)
|
|
2204
2213
|
return "";
|
|
2205
2214
|
if (r === "primary")
|
|
2206
|
-
return
|
|
2215
|
+
return g("active:text-copy-light-active", {
|
|
2207
2216
|
"active:bg-action-dark-active": e === "dark",
|
|
2208
2217
|
"active:bg-action-light-active": e === "light",
|
|
2209
2218
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
2210
2219
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
2211
2220
|
});
|
|
2212
2221
|
if (r === "secondary")
|
|
2213
|
-
return
|
|
2222
|
+
return g("active:text-copy-light-active", {
|
|
2214
2223
|
"active:bg-action-dark-active": e === "light",
|
|
2215
2224
|
"active:bg-action-light-active": e === "dark",
|
|
2216
2225
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
2217
2226
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
2218
2227
|
});
|
|
2219
2228
|
if (r === "danger")
|
|
2220
|
-
return
|
|
2229
|
+
return g("active:text-copy-lighter-active", {
|
|
2221
2230
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
2222
2231
|
"active:bg-action-danger-light-active": e === "light",
|
|
2223
2232
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2224
2233
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2225
2234
|
});
|
|
2226
|
-
|
|
2235
|
+
if (r === "selected")
|
|
2236
|
+
return g("active:text-copy-lighter-active", {
|
|
2237
|
+
"active:bg-action-selected-dark-active": e === "dark",
|
|
2238
|
+
"active:bg-action-selected-light-active": e === "light",
|
|
2239
|
+
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
2240
|
+
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
2241
|
+
});
|
|
2242
|
+
}, rn = ({
|
|
2227
2243
|
mode: e,
|
|
2228
2244
|
noBorder: t,
|
|
2229
2245
|
variant: r
|
|
@@ -2231,32 +2247,41 @@ const Xa = (e) => {
|
|
|
2231
2247
|
if (t)
|
|
2232
2248
|
return "border border-transparent";
|
|
2233
2249
|
if (r === "primary")
|
|
2234
|
-
return
|
|
2250
|
+
return g("border", {
|
|
2235
2251
|
"border-border-dark": e === "dark",
|
|
2236
2252
|
"border-border-accent": e === "light",
|
|
2237
2253
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
2238
2254
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
2239
2255
|
});
|
|
2240
2256
|
if (r === "secondary")
|
|
2241
|
-
return
|
|
2257
|
+
return g("border", {
|
|
2242
2258
|
"border-border-dark": e === "light",
|
|
2243
2259
|
"border-border-accent": e === "dark",
|
|
2244
2260
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
2245
2261
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
2246
2262
|
});
|
|
2247
2263
|
if (r === "danger")
|
|
2248
|
-
return
|
|
2264
|
+
return g("border", {
|
|
2249
2265
|
"border-border-danger-dark": e === "dark",
|
|
2250
2266
|
"border-border-danger-medium": e === "light",
|
|
2251
2267
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2252
2268
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2253
2269
|
});
|
|
2254
|
-
|
|
2270
|
+
if (r === "selected")
|
|
2271
|
+
return g("border", {
|
|
2272
|
+
"border-border-selected-dark": e === "dark",
|
|
2273
|
+
"border-border-selected-medium": e === "light",
|
|
2274
|
+
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
2275
|
+
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
2276
|
+
});
|
|
2277
|
+
}, an = ({
|
|
2278
|
+
focusMode: e
|
|
2279
|
+
}) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2255
2280
|
"focus:outline-focus-dark": e === "dark",
|
|
2256
2281
|
"focus:outline-focus-light": e === "light",
|
|
2257
2282
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2258
2283
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2259
|
-
}),
|
|
2284
|
+
}), nt = ({
|
|
2260
2285
|
type: e,
|
|
2261
2286
|
className: t,
|
|
2262
2287
|
raw: r,
|
|
@@ -2265,46 +2290,51 @@ const Xa = (e) => {
|
|
|
2265
2290
|
disabled: o,
|
|
2266
2291
|
fullWidth: s,
|
|
2267
2292
|
size: i,
|
|
2268
|
-
noBorder:
|
|
2269
|
-
labelRight:
|
|
2293
|
+
noBorder: d,
|
|
2294
|
+
labelRight: m,
|
|
2270
2295
|
labelLeft: p,
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
}) => (
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2296
|
+
noBackground: u,
|
|
2297
|
+
variant: c,
|
|
2298
|
+
noTruncate: h,
|
|
2299
|
+
align: f,
|
|
2300
|
+
radius: E
|
|
2301
|
+
}) => (c || (c = "primary"), r ? g(wt, t) : g(
|
|
2302
|
+
wt,
|
|
2303
|
+
Za({
|
|
2304
|
+
mode: a,
|
|
2305
|
+
variant: c,
|
|
2306
|
+
noBackground: u,
|
|
2307
|
+
noTruncate: h,
|
|
2308
|
+
radius: E
|
|
2309
|
+
}),
|
|
2310
|
+
Qa({ type: e, size: i, labelRight: m, labelLeft: p, align: f }),
|
|
2311
|
+
rn({ mode: a, variant: c, noBorder: d }),
|
|
2312
|
+
an({ focusMode: n }),
|
|
2313
|
+
en({ mode: a, variant: c, disabled: o }),
|
|
2314
|
+
tn({ mode: a, variant: c, disabled: o }),
|
|
2286
2315
|
{
|
|
2287
2316
|
"w-full": s,
|
|
2288
2317
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2289
|
-
}
|
|
2290
|
-
|
|
2318
|
+
},
|
|
2319
|
+
t
|
|
2320
|
+
)), nn = (e, t, r) => {
|
|
2291
2321
|
var a;
|
|
2292
2322
|
!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);
|
|
2293
|
-
},
|
|
2323
|
+
}, Me = P.forwardRef((e, t) => {
|
|
2294
2324
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2295
2325
|
return /* @__PURE__ */ l(
|
|
2296
2326
|
"button",
|
|
2297
2327
|
{
|
|
2298
2328
|
ref: t,
|
|
2299
2329
|
onClick: (o) => {
|
|
2300
|
-
|
|
2330
|
+
nn(o, a, r);
|
|
2301
2331
|
},
|
|
2302
2332
|
...n
|
|
2303
2333
|
}
|
|
2304
2334
|
);
|
|
2305
2335
|
});
|
|
2306
|
-
|
|
2307
|
-
const
|
|
2336
|
+
Me.displayName = "BaseButton";
|
|
2337
|
+
const er = P.forwardRef(
|
|
2308
2338
|
({
|
|
2309
2339
|
children: e,
|
|
2310
2340
|
disabled: t = !1,
|
|
@@ -2314,14 +2344,14 @@ const Zt = P.forwardRef(
|
|
|
2314
2344
|
className: o,
|
|
2315
2345
|
size: s = "medium",
|
|
2316
2346
|
raw: i = !1,
|
|
2317
|
-
noBorder:
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2347
|
+
noBorder: d = !1,
|
|
2348
|
+
variant: m = "primary",
|
|
2349
|
+
noTruncate: p = !1,
|
|
2350
|
+
radius: u = "large",
|
|
2321
2351
|
...c
|
|
2322
|
-
},
|
|
2323
|
-
const f =
|
|
2324
|
-
type:
|
|
2352
|
+
}, h) => {
|
|
2353
|
+
const f = nt({
|
|
2354
|
+
type: Zt,
|
|
2325
2355
|
mode: r,
|
|
2326
2356
|
focusMode: a,
|
|
2327
2357
|
fullWidth: n,
|
|
@@ -2329,15 +2359,15 @@ const Zt = P.forwardRef(
|
|
|
2329
2359
|
raw: i,
|
|
2330
2360
|
className: o,
|
|
2331
2361
|
size: s,
|
|
2332
|
-
noBorder:
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2362
|
+
noBorder: d,
|
|
2363
|
+
variant: m,
|
|
2364
|
+
noTruncate: p,
|
|
2365
|
+
radius: u
|
|
2336
2366
|
});
|
|
2337
2367
|
return /* @__PURE__ */ l(
|
|
2338
|
-
|
|
2368
|
+
Me,
|
|
2339
2369
|
{
|
|
2340
|
-
ref:
|
|
2370
|
+
ref: h,
|
|
2341
2371
|
className: f,
|
|
2342
2372
|
disabled: t,
|
|
2343
2373
|
...c,
|
|
@@ -2346,7 +2376,7 @@ const Zt = P.forwardRef(
|
|
|
2346
2376
|
);
|
|
2347
2377
|
}
|
|
2348
2378
|
);
|
|
2349
|
-
|
|
2379
|
+
er.displayName = "Button";
|
|
2350
2380
|
const qe = P.forwardRef(
|
|
2351
2381
|
({
|
|
2352
2382
|
children: e,
|
|
@@ -2357,49 +2387,49 @@ const qe = P.forwardRef(
|
|
|
2357
2387
|
className: o,
|
|
2358
2388
|
type: s = "button",
|
|
2359
2389
|
raw: i = !1,
|
|
2360
|
-
noBorder:
|
|
2361
|
-
"aria-label":
|
|
2390
|
+
noBorder: d = !1,
|
|
2391
|
+
"aria-label": m,
|
|
2362
2392
|
label: p,
|
|
2363
|
-
size:
|
|
2393
|
+
size: u = "medium",
|
|
2364
2394
|
labelRight: c,
|
|
2365
|
-
labelLeft:
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
...
|
|
2370
|
-
},
|
|
2371
|
-
const
|
|
2372
|
-
type:
|
|
2395
|
+
labelLeft: h,
|
|
2396
|
+
noBackground: f = !1,
|
|
2397
|
+
align: E = "center",
|
|
2398
|
+
radius: w = "large",
|
|
2399
|
+
..._
|
|
2400
|
+
}, U) => {
|
|
2401
|
+
const K = nt({
|
|
2402
|
+
type: at,
|
|
2373
2403
|
mode: r,
|
|
2374
2404
|
focusMode: a,
|
|
2375
2405
|
fullWidth: n,
|
|
2376
2406
|
disabled: t,
|
|
2377
2407
|
raw: i,
|
|
2378
2408
|
className: o,
|
|
2379
|
-
noBorder:
|
|
2380
|
-
size:
|
|
2409
|
+
noBorder: d,
|
|
2410
|
+
size: u,
|
|
2381
2411
|
labelRight: c,
|
|
2382
|
-
labelLeft:
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
}), H =
|
|
2412
|
+
labelLeft: h,
|
|
2413
|
+
noBackground: f,
|
|
2414
|
+
align: E,
|
|
2415
|
+
radius: w
|
|
2416
|
+
}), H = g({
|
|
2387
2417
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2388
2418
|
"text-copy-light": r === "dark" && !i,
|
|
2389
2419
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2390
2420
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2391
2421
|
});
|
|
2392
|
-
return /* @__PURE__ */
|
|
2393
|
-
|
|
2422
|
+
return /* @__PURE__ */ I(
|
|
2423
|
+
Me,
|
|
2394
2424
|
{
|
|
2395
|
-
ref:
|
|
2396
|
-
className:
|
|
2425
|
+
ref: U,
|
|
2426
|
+
className: K,
|
|
2397
2427
|
disabled: t,
|
|
2398
2428
|
type: s,
|
|
2399
|
-
"aria-label":
|
|
2400
|
-
...
|
|
2429
|
+
"aria-label": m || p,
|
|
2430
|
+
..._,
|
|
2401
2431
|
children: [
|
|
2402
|
-
|
|
2432
|
+
h && /* @__PURE__ */ l("span", { className: "pr-2", children: h }),
|
|
2403
2433
|
/* @__PURE__ */ l("div", { className: H, children: e }),
|
|
2404
2434
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2405
2435
|
]
|
|
@@ -2409,19 +2439,19 @@ const qe = P.forwardRef(
|
|
|
2409
2439
|
);
|
|
2410
2440
|
qe.displayName = "ButtonIcon";
|
|
2411
2441
|
/*!
|
|
2412
|
-
@versini/ui-button
|
|
2442
|
+
@versini/ui-button v2.0.0
|
|
2413
2443
|
© 2024 gizmette.com
|
|
2414
2444
|
*/
|
|
2415
2445
|
try {
|
|
2416
2446
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
2417
|
-
version: "
|
|
2418
|
-
buildTime: "12/
|
|
2447
|
+
version: "2.0.0",
|
|
2448
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
2419
2449
|
homepage: "https://github.com/aversini/ui-components",
|
|
2420
2450
|
license: "MIT"
|
|
2421
2451
|
});
|
|
2422
2452
|
} catch {
|
|
2423
2453
|
}
|
|
2424
|
-
const
|
|
2454
|
+
const on = P.forwardRef(
|
|
2425
2455
|
({
|
|
2426
2456
|
children: e,
|
|
2427
2457
|
disabled: t = !1,
|
|
@@ -2431,39 +2461,39 @@ const sn = P.forwardRef(
|
|
|
2431
2461
|
className: o,
|
|
2432
2462
|
type: s = "button",
|
|
2433
2463
|
raw: i = !1,
|
|
2434
|
-
noBorder:
|
|
2435
|
-
"aria-label":
|
|
2464
|
+
noBorder: d = !1,
|
|
2465
|
+
"aria-label": m,
|
|
2436
2466
|
label: p,
|
|
2437
|
-
size:
|
|
2467
|
+
size: u = "medium",
|
|
2438
2468
|
labelRight: c,
|
|
2439
|
-
labelLeft:
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
align: T = "center",
|
|
2469
|
+
labelLeft: h,
|
|
2470
|
+
noBackground: f = !1,
|
|
2471
|
+
align: E = "center",
|
|
2443
2472
|
active: w = !1,
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2473
|
+
radius: _ = "large",
|
|
2474
|
+
...U
|
|
2475
|
+
}, K) => {
|
|
2476
|
+
const H = nt({
|
|
2477
|
+
type: at,
|
|
2448
2478
|
mode: r,
|
|
2449
2479
|
focusMode: a,
|
|
2450
2480
|
fullWidth: n,
|
|
2451
2481
|
disabled: t,
|
|
2452
2482
|
raw: i,
|
|
2453
2483
|
className: o,
|
|
2454
|
-
noBorder:
|
|
2455
|
-
size:
|
|
2484
|
+
noBorder: d,
|
|
2485
|
+
size: u,
|
|
2456
2486
|
labelRight: c,
|
|
2457
|
-
labelLeft:
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
}),
|
|
2487
|
+
labelLeft: h,
|
|
2488
|
+
noBackground: f,
|
|
2489
|
+
align: E,
|
|
2490
|
+
radius: _
|
|
2491
|
+
}), O = g({
|
|
2462
2492
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2463
2493
|
"text-copy-light": r === "dark" && !i,
|
|
2464
2494
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2465
2495
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2466
|
-
}),
|
|
2496
|
+
}), W = w ? g(
|
|
2467
2497
|
"relative",
|
|
2468
2498
|
"focus-within:static",
|
|
2469
2499
|
"focus-within:after:border-transparent",
|
|
@@ -2480,108 +2510,84 @@ const sn = P.forwardRef(
|
|
|
2480
2510
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
2481
2511
|
}
|
|
2482
2512
|
) : "";
|
|
2483
|
-
return /* @__PURE__ */ l("div", { className:
|
|
2484
|
-
|
|
2513
|
+
return /* @__PURE__ */ l("div", { className: W, children: /* @__PURE__ */ I(
|
|
2514
|
+
Me,
|
|
2485
2515
|
{
|
|
2486
|
-
ref:
|
|
2516
|
+
ref: K,
|
|
2487
2517
|
className: H,
|
|
2488
2518
|
disabled: t,
|
|
2489
2519
|
type: s,
|
|
2490
|
-
"aria-label":
|
|
2491
|
-
...
|
|
2520
|
+
"aria-label": m || p,
|
|
2521
|
+
...U,
|
|
2492
2522
|
children: [
|
|
2493
|
-
|
|
2494
|
-
/* @__PURE__ */ l("div", { className:
|
|
2523
|
+
h && /* @__PURE__ */ l("span", { className: "pr-2", children: h }),
|
|
2524
|
+
/* @__PURE__ */ l("div", { className: O, children: e }),
|
|
2495
2525
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2496
2526
|
]
|
|
2497
2527
|
}
|
|
2498
2528
|
) });
|
|
2499
2529
|
}
|
|
2500
2530
|
);
|
|
2501
|
-
|
|
2531
|
+
on.displayName = "ButtonSort";
|
|
2502
2532
|
/*!
|
|
2503
|
-
@versini/ui-card
|
|
2533
|
+
@versini/ui-card v2.0.0
|
|
2504
2534
|
© 2024 gizmette.com
|
|
2505
2535
|
*/
|
|
2506
2536
|
try {
|
|
2507
2537
|
window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
|
|
2508
|
-
version: "
|
|
2509
|
-
buildTime: "12/
|
|
2538
|
+
version: "2.0.0",
|
|
2539
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
2510
2540
|
homepage: "https://github.com/aversini/ui-components",
|
|
2511
2541
|
license: "MIT"
|
|
2512
2542
|
});
|
|
2513
2543
|
} catch {
|
|
2514
2544
|
}
|
|
2515
|
-
const
|
|
2516
|
-
function
|
|
2517
|
-
const t =
|
|
2545
|
+
const ve = "av-card";
|
|
2546
|
+
function sn(e) {
|
|
2547
|
+
const t = kt();
|
|
2518
2548
|
return `${e}${t}`;
|
|
2519
2549
|
}
|
|
2520
|
-
|
|
2521
|
-
@versini/ui-spacing v1.1.0
|
|
2522
|
-
© 2024 gizmette.com
|
|
2523
|
-
*/
|
|
2524
|
-
try {
|
|
2525
|
-
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
2526
|
-
version: "1.1.0",
|
|
2527
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
2528
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2529
|
-
license: "MIT"
|
|
2530
|
-
});
|
|
2531
|
-
} catch {
|
|
2532
|
-
}
|
|
2533
|
-
const ln = (e) => {
|
|
2534
|
-
let t = "";
|
|
2535
|
-
if (typeof e == "number" || typeof e == "string")
|
|
2536
|
-
t = "m-" + e;
|
|
2537
|
-
else {
|
|
2538
|
-
const r = [];
|
|
2539
|
-
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2540
|
-
}
|
|
2541
|
-
return t;
|
|
2542
|
-
}, dn = ({
|
|
2550
|
+
const cn = ({
|
|
2543
2551
|
className: e,
|
|
2544
2552
|
headerClassName: t,
|
|
2545
2553
|
bodyClassName: r,
|
|
2546
2554
|
footerClassName: a,
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
noBorder: i
|
|
2555
|
+
mode: n,
|
|
2556
|
+
compact: o,
|
|
2557
|
+
noBorder: s
|
|
2551
2558
|
}) => {
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2554
|
-
e,
|
|
2559
|
+
const i = g(
|
|
2560
|
+
ve,
|
|
2555
2561
|
"rounded-md",
|
|
2556
|
-
ln(n),
|
|
2557
2562
|
{
|
|
2558
|
-
"border-none":
|
|
2559
|
-
"border-2": !
|
|
2560
|
-
"p-4": !
|
|
2561
|
-
"p-1 sm:p-2":
|
|
2562
|
-
"border-border-accent bg-surface-darker text-copy-light":
|
|
2563
|
-
"border-border-accent bg-surface-dark text-copy-light":
|
|
2564
|
-
"border-border-dark bg-surface-lighter text-copy-dark":
|
|
2565
|
-
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light":
|
|
2566
|
-
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark":
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
"border-border-accent":
|
|
2571
|
-
"border-border-
|
|
2572
|
-
"border-border-medium
|
|
2573
|
-
"border-border-
|
|
2574
|
-
"
|
|
2575
|
-
"mb-
|
|
2576
|
-
|
|
2563
|
+
"border-none": s,
|
|
2564
|
+
"border-2": !s,
|
|
2565
|
+
"p-4": !o,
|
|
2566
|
+
"p-1 sm:p-2": o,
|
|
2567
|
+
"border-border-accent bg-surface-darker text-copy-light": n === "darker",
|
|
2568
|
+
"border-border-accent bg-surface-dark text-copy-light": n === "dark",
|
|
2569
|
+
"border-border-dark bg-surface-lighter text-copy-dark": n === "light",
|
|
2570
|
+
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": n === "system",
|
|
2571
|
+
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": n === "alt-system"
|
|
2572
|
+
},
|
|
2573
|
+
e
|
|
2574
|
+
), d = t || g(`${ve}__header mt-0 border-b-2`, {
|
|
2575
|
+
"text-copy-light border-border-accent": n === "darker",
|
|
2576
|
+
"border-border-accent": n === "dark",
|
|
2577
|
+
"border-border-medium": n === "light",
|
|
2578
|
+
"border-border-medium dark:border-border-accent": n === "system",
|
|
2579
|
+
"border-border-accent dark:border-border-medium": n === "alt-system",
|
|
2580
|
+
"mb-4": !o,
|
|
2581
|
+
"mb-2": o
|
|
2582
|
+
}), m = g(r), p = a || g(`${ve}__footer pt-2`);
|
|
2577
2583
|
return {
|
|
2578
|
-
wrapper:
|
|
2579
|
-
header:
|
|
2580
|
-
body:
|
|
2581
|
-
footer:
|
|
2584
|
+
wrapper: i,
|
|
2585
|
+
header: d,
|
|
2586
|
+
body: m,
|
|
2587
|
+
footer: p
|
|
2582
2588
|
};
|
|
2583
2589
|
};
|
|
2584
|
-
function
|
|
2590
|
+
function ln({
|
|
2585
2591
|
id: e,
|
|
2586
2592
|
content: t,
|
|
2587
2593
|
userAriaLabelledby: r,
|
|
@@ -2589,7 +2595,7 @@ function un({
|
|
|
2589
2595
|
}) {
|
|
2590
2596
|
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;
|
|
2591
2597
|
}
|
|
2592
|
-
const
|
|
2598
|
+
const dn = ({
|
|
2593
2599
|
header: e,
|
|
2594
2600
|
headerClassName: t,
|
|
2595
2601
|
footer: r,
|
|
@@ -2598,36 +2604,34 @@ const mn = ({
|
|
|
2598
2604
|
className: o,
|
|
2599
2605
|
bodyClassName: s,
|
|
2600
2606
|
"aria-labelledby": i,
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
...c
|
|
2607
|
+
mode: d = "system",
|
|
2608
|
+
compact: m = !1,
|
|
2609
|
+
noBorder: p = !1,
|
|
2610
|
+
...u
|
|
2606
2611
|
}) => {
|
|
2607
|
-
let
|
|
2608
|
-
const
|
|
2612
|
+
let c = null, h = null;
|
|
2613
|
+
const f = typeof e == "string", E = sn(ve), w = cn({
|
|
2609
2614
|
className: o,
|
|
2610
2615
|
headerClassName: t,
|
|
2611
2616
|
bodyClassName: s,
|
|
2612
2617
|
footerClassName: a,
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
noBorder: m
|
|
2618
|
+
mode: d,
|
|
2619
|
+
compact: m,
|
|
2620
|
+
noBorder: p
|
|
2617
2621
|
});
|
|
2618
|
-
return
|
|
2622
|
+
return f ? (c = E, h = c) : !f && e && i ? (c = null, h = i) : !f && e && !i ? (c = E, h = c) : (c = null, h = i || null), /* @__PURE__ */ l("div", { className: w.wrapper, children: /* @__PURE__ */ I(
|
|
2619
2623
|
"section",
|
|
2620
2624
|
{
|
|
2621
|
-
...
|
|
2622
|
-
"aria-labelledby":
|
|
2625
|
+
...h && {
|
|
2626
|
+
"aria-labelledby": h
|
|
2623
2627
|
},
|
|
2624
2628
|
className: w.body,
|
|
2625
|
-
...
|
|
2629
|
+
...u,
|
|
2626
2630
|
children: [
|
|
2627
2631
|
/* @__PURE__ */ l(
|
|
2628
|
-
|
|
2632
|
+
ln,
|
|
2629
2633
|
{
|
|
2630
|
-
...
|
|
2634
|
+
...c && { id: c },
|
|
2631
2635
|
content: e,
|
|
2632
2636
|
className: w.header,
|
|
2633
2637
|
userAriaLabelledby: i
|
|
@@ -2638,46 +2642,19 @@ const mn = ({
|
|
|
2638
2642
|
]
|
|
2639
2643
|
}
|
|
2640
2644
|
) });
|
|
2641
|
-
}
|
|
2642
|
-
/*!
|
|
2643
|
-
@versini/ui-spacing v1.1.0
|
|
2644
|
-
© 2024 gizmette.com
|
|
2645
|
-
*/
|
|
2646
|
-
try {
|
|
2647
|
-
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
2648
|
-
version: "1.1.0",
|
|
2649
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
2650
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2651
|
-
license: "MIT"
|
|
2652
|
-
});
|
|
2653
|
-
} catch {
|
|
2654
|
-
}
|
|
2655
|
-
const hn = (e) => {
|
|
2656
|
-
let t = "";
|
|
2657
|
-
if (typeof e == "number" || typeof e == "string")
|
|
2658
|
-
t = "m-" + e;
|
|
2659
|
-
else {
|
|
2660
|
-
const r = [];
|
|
2661
|
-
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2662
|
-
}
|
|
2663
|
-
return t;
|
|
2664
|
-
}, Me = ({
|
|
2645
|
+
}, $e = ({
|
|
2665
2646
|
children: e,
|
|
2666
2647
|
fill: t,
|
|
2667
2648
|
viewBox: r,
|
|
2668
2649
|
className: a,
|
|
2669
2650
|
defaultViewBox: n,
|
|
2670
2651
|
defaultClassName: o,
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
...h
|
|
2652
|
+
title: s,
|
|
2653
|
+
semantic: i = !1,
|
|
2654
|
+
...d
|
|
2675
2655
|
}) => {
|
|
2676
|
-
const
|
|
2677
|
-
|
|
2678
|
-
a || o
|
|
2679
|
-
);
|
|
2680
|
-
return /* @__PURE__ */ _(fe, { children: [
|
|
2656
|
+
const m = g(a || o);
|
|
2657
|
+
return /* @__PURE__ */ I(fe, { children: [
|
|
2681
2658
|
/* @__PURE__ */ l(
|
|
2682
2659
|
"svg",
|
|
2683
2660
|
{
|
|
@@ -2686,43 +2663,37 @@ const hn = (e) => {
|
|
|
2686
2663
|
viewBox: r || n,
|
|
2687
2664
|
fill: t || "currentColor",
|
|
2688
2665
|
role: "img",
|
|
2689
|
-
"aria-hidden": !
|
|
2666
|
+
"aria-hidden": !i,
|
|
2690
2667
|
focusable: !1,
|
|
2691
|
-
...
|
|
2668
|
+
...d,
|
|
2692
2669
|
children: e
|
|
2693
2670
|
}
|
|
2694
2671
|
),
|
|
2695
|
-
|
|
2672
|
+
s && i && /* @__PURE__ */ l("span", { className: "sr-only", children: s })
|
|
2696
2673
|
] });
|
|
2697
2674
|
};
|
|
2698
2675
|
/*!
|
|
2699
|
-
@versini/ui-svgicon
|
|
2676
|
+
@versini/ui-svgicon v2.0.0
|
|
2700
2677
|
© 2024 gizmette.com
|
|
2701
2678
|
*/
|
|
2702
2679
|
try {
|
|
2703
2680
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
2704
|
-
version: "
|
|
2705
|
-
buildTime: "12/
|
|
2681
|
+
version: "2.0.0",
|
|
2682
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
2706
2683
|
homepage: "https://github.com/aversini/ui-components",
|
|
2707
2684
|
license: "MIT"
|
|
2708
2685
|
});
|
|
2709
2686
|
} catch {
|
|
2710
2687
|
}
|
|
2711
|
-
const
|
|
2712
|
-
|
|
2713
|
-
viewBox: t,
|
|
2714
|
-
spacing: r,
|
|
2715
|
-
...a
|
|
2716
|
-
}) => /* @__PURE__ */ l(
|
|
2717
|
-
Me,
|
|
2688
|
+
const un = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
2689
|
+
$e,
|
|
2718
2690
|
{
|
|
2719
2691
|
defaultViewBox: "0 0 1200 500",
|
|
2720
2692
|
defaultClassName: "w-full",
|
|
2721
2693
|
viewBox: t,
|
|
2722
2694
|
className: e,
|
|
2723
|
-
spacing: r,
|
|
2724
2695
|
title: "Sassy Dog",
|
|
2725
|
-
...
|
|
2696
|
+
...r,
|
|
2726
2697
|
children: /* @__PURE__ */ l("g", { transform: "matrix(11.9092 0 0 11.9092 470.0017 250.0009)", id: "879221", children: /* @__PURE__ */ l(
|
|
2727
2698
|
"path",
|
|
2728
2699
|
{
|
|
@@ -2733,65 +2704,61 @@ const pn = ({
|
|
|
2733
2704
|
}
|
|
2734
2705
|
) })
|
|
2735
2706
|
}
|
|
2736
|
-
),
|
|
2707
|
+
), hn = ({
|
|
2737
2708
|
className: e,
|
|
2738
2709
|
viewBox: t,
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
Me,
|
|
2710
|
+
title: r,
|
|
2711
|
+
monotone: a,
|
|
2712
|
+
...n
|
|
2713
|
+
}) => /* @__PURE__ */ I(
|
|
2714
|
+
$e,
|
|
2745
2715
|
{
|
|
2746
2716
|
defaultViewBox: "0 0 640 512",
|
|
2747
2717
|
defaultClassName: "size-5",
|
|
2748
2718
|
viewBox: t,
|
|
2749
2719
|
className: e,
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
...o,
|
|
2720
|
+
title: r || "Hide",
|
|
2721
|
+
...n,
|
|
2753
2722
|
children: [
|
|
2754
2723
|
/* @__PURE__ */ l(
|
|
2755
2724
|
"path",
|
|
2756
2725
|
{
|
|
2757
|
-
opacity:
|
|
2726
|
+
opacity: a ? "1" : "0.4",
|
|
2758
2727
|
d: "M360.8 380.3C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144c0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5zM198.5 252.4c-3.7 .8-6.7 3.7-6.5 7.7c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9c1.9-.5 3.9-1.1 5.7-1.7l-120-94.6zm89-52.4l94.8 74.3c2.7-13.9 2.4-28.6-1.5-43.2c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 2.7-.2 5.4-.5 8zM432 256c0 17.7-3.2 34.6-9 50.2l84.1 65.9c32.3-36.6 54.6-75.4 66.4-103.9c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32c-60 0-111.1 20.3-152.8 48.7L207 136.9c23.1-15.7 51-24.9 81-24.9c79.5 0 144 64.5 144 144z"
|
|
2759
2728
|
}
|
|
2760
2729
|
),
|
|
2761
2730
|
/* @__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.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
|
|
2762
2731
|
]
|
|
2763
2732
|
}
|
|
2764
|
-
),
|
|
2733
|
+
), mn = ({
|
|
2765
2734
|
className: e,
|
|
2766
2735
|
viewBox: t,
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
...o
|
|
2736
|
+
title: r,
|
|
2737
|
+
monotone: a,
|
|
2738
|
+
...n
|
|
2771
2739
|
}) => {
|
|
2772
|
-
const
|
|
2773
|
-
return /* @__PURE__ */
|
|
2774
|
-
|
|
2740
|
+
const o = a ? "1" : "0.4";
|
|
2741
|
+
return /* @__PURE__ */ I(
|
|
2742
|
+
$e,
|
|
2775
2743
|
{
|
|
2776
2744
|
defaultViewBox: "0 0 190 190",
|
|
2777
2745
|
defaultClassName: "size-5",
|
|
2778
2746
|
viewBox: t,
|
|
2779
2747
|
className: e,
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
...o,
|
|
2748
|
+
title: r || "Passkey",
|
|
2749
|
+
...n,
|
|
2783
2750
|
children: [
|
|
2784
2751
|
/* @__PURE__ */ l(
|
|
2785
2752
|
"path",
|
|
2786
2753
|
{
|
|
2787
|
-
opacity:
|
|
2754
|
+
opacity: o,
|
|
2788
2755
|
d: "M172.32,96.79c0,13.78-8.48,25.5-20.29,29.78l7.14,11.83l-10.57,13l10.57,12.71l-17.04,22.87l-12.01-12.82 v-25.9v-22.56c-10.68-4.85-18.15-15.97-18.15-28.91c0-17.4,13.51-31.51,30.18-31.51C158.81,65.28,172.32,79.39,172.32,96.79z M142.14,101.61c4.02,0,7.28-3.4,7.28-7.6c0-4.2-3.26-7.61-7.28-7.61s-7.28,3.4-7.28,7.61 C134.85,98.21,138.12,101.61,142.14,101.61z"
|
|
2789
2756
|
}
|
|
2790
2757
|
),
|
|
2791
2758
|
/* @__PURE__ */ l(
|
|
2792
2759
|
"path",
|
|
2793
2760
|
{
|
|
2794
|
-
opacity:
|
|
2761
|
+
opacity: o,
|
|
2795
2762
|
d: "M172.41,96.88c0,13.62-8.25,25.23-19.83,29.67l6.58,11.84l-9.73,13l9.73,12.71l-17.03,23.05v-25.9v-32.77 v-26.87c4.02,0,7.28-3.41,7.28-7.6c0-4.2-3.26-7.61-7.28-7.61V65.28C158.86,65.28,172.41,79.43,172.41,96.88z"
|
|
2796
2763
|
}
|
|
2797
2764
|
),
|
|
@@ -2800,28 +2767,26 @@ const pn = ({
|
|
|
2800
2767
|
]
|
|
2801
2768
|
}
|
|
2802
2769
|
);
|
|
2803
|
-
},
|
|
2770
|
+
}, pn = ({
|
|
2804
2771
|
className: e,
|
|
2805
2772
|
viewBox: t,
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
Me,
|
|
2773
|
+
title: r,
|
|
2774
|
+
monotone: a,
|
|
2775
|
+
...n
|
|
2776
|
+
}) => /* @__PURE__ */ I(
|
|
2777
|
+
$e,
|
|
2812
2778
|
{
|
|
2813
2779
|
defaultViewBox: "0 0 576 512",
|
|
2814
2780
|
defaultClassName: "size-5",
|
|
2815
2781
|
viewBox: t,
|
|
2816
2782
|
className: e,
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
...o,
|
|
2783
|
+
title: r || "Show",
|
|
2784
|
+
...n,
|
|
2820
2785
|
children: [
|
|
2821
2786
|
/* @__PURE__ */ l(
|
|
2822
2787
|
"path",
|
|
2823
2788
|
{
|
|
2824
|
-
opacity:
|
|
2789
|
+
opacity: a ? "1" : "0.4",
|
|
2825
2790
|
d: "M95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 400a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
|
|
2826
2791
|
}
|
|
2827
2792
|
),
|
|
@@ -2830,91 +2795,44 @@ const pn = ({
|
|
|
2830
2795
|
}
|
|
2831
2796
|
);
|
|
2832
2797
|
/*!
|
|
2833
|
-
@versini/ui-icons
|
|
2798
|
+
@versini/ui-icons v2.0.0
|
|
2834
2799
|
© 2024 gizmette.com
|
|
2835
2800
|
*/
|
|
2836
2801
|
try {
|
|
2837
2802
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
2838
|
-
version: "
|
|
2839
|
-
buildTime: "12/
|
|
2803
|
+
version: "2.0.0",
|
|
2804
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
2840
2805
|
homepage: "https://github.com/aversini/ui-components",
|
|
2841
2806
|
license: "MIT"
|
|
2842
2807
|
});
|
|
2843
2808
|
} catch {
|
|
2844
2809
|
}
|
|
2845
2810
|
/*!
|
|
2846
|
-
@versini/ui-main
|
|
2811
|
+
@versini/ui-main v2.0.0
|
|
2847
2812
|
© 2024 gizmette.com
|
|
2848
2813
|
*/
|
|
2849
2814
|
try {
|
|
2850
2815
|
window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
|
|
2851
|
-
version: "
|
|
2852
|
-
buildTime: "12/
|
|
2853
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2854
|
-
license: "MIT"
|
|
2855
|
-
});
|
|
2856
|
-
} catch {
|
|
2857
|
-
}
|
|
2858
|
-
const bn = "av-main";
|
|
2859
|
-
/*!
|
|
2860
|
-
@versini/ui-spacing v1.1.0
|
|
2861
|
-
© 2024 gizmette.com
|
|
2862
|
-
*/
|
|
2863
|
-
try {
|
|
2864
|
-
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
2865
|
-
version: "1.1.0",
|
|
2866
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
2816
|
+
version: "2.0.0",
|
|
2817
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
2867
2818
|
homepage: "https://github.com/aversini/ui-components",
|
|
2868
2819
|
license: "MIT"
|
|
2869
2820
|
});
|
|
2870
2821
|
} catch {
|
|
2871
2822
|
}
|
|
2872
|
-
const
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
return
|
|
2881
|
-
},
|
|
2882
|
-
children: e,
|
|
2883
|
-
className: t,
|
|
2884
|
-
raw: r = !1,
|
|
2885
|
-
spacing: a
|
|
2886
|
-
}) => {
|
|
2887
|
-
const n = y(t, bn, En(a), {
|
|
2888
|
-
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2889
|
-
});
|
|
2890
|
-
return /* @__PURE__ */ l("main", { className: n, children: e });
|
|
2891
|
-
};
|
|
2892
|
-
/*!
|
|
2893
|
-
@versini/ui-spacing v1.1.0
|
|
2894
|
-
© 2024 gizmette.com
|
|
2895
|
-
*/
|
|
2896
|
-
try {
|
|
2897
|
-
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
2898
|
-
version: "1.1.0",
|
|
2899
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
2900
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2901
|
-
license: "MIT"
|
|
2902
|
-
});
|
|
2903
|
-
} catch {
|
|
2904
|
-
}
|
|
2905
|
-
const In = (e) => {
|
|
2906
|
-
let t = "";
|
|
2907
|
-
if (typeof e == "number" || typeof e == "string")
|
|
2908
|
-
t = "m-" + e;
|
|
2909
|
-
else {
|
|
2910
|
-
const r = [];
|
|
2911
|
-
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2912
|
-
}
|
|
2913
|
-
return t;
|
|
2914
|
-
}, _n = "av-flexgrid", ve = "av-flexgrid-item", Oe = 0.25, er = P.createContext({
|
|
2823
|
+
const gn = "av-main", yn = ({ children: e, className: t, raw: r = !1 }) => {
|
|
2824
|
+
const a = g(
|
|
2825
|
+
gn,
|
|
2826
|
+
{
|
|
2827
|
+
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2828
|
+
},
|
|
2829
|
+
t
|
|
2830
|
+
);
|
|
2831
|
+
return /* @__PURE__ */ l("main", { className: a, children: e });
|
|
2832
|
+
}, fn = "av-flexgrid", Se = "av-flexgrid-item", Oe = 0.25, Xe = P.createContext({
|
|
2915
2833
|
columnGap: 0,
|
|
2916
2834
|
rowGap: 0
|
|
2917
|
-
}),
|
|
2835
|
+
}), Tt = ({
|
|
2918
2836
|
children: e,
|
|
2919
2837
|
className: t,
|
|
2920
2838
|
columnGap: r = 1,
|
|
@@ -2923,14 +2841,13 @@ const In = (e) => {
|
|
|
2923
2841
|
width: o = "auto",
|
|
2924
2842
|
direction: s = "row",
|
|
2925
2843
|
alignHorizontal: i = "normal",
|
|
2926
|
-
alignVertical:
|
|
2927
|
-
|
|
2928
|
-
...p
|
|
2844
|
+
alignVertical: d = "normal",
|
|
2845
|
+
...m
|
|
2929
2846
|
}) => {
|
|
2930
|
-
const
|
|
2847
|
+
const p = {
|
|
2931
2848
|
flexDirection: s,
|
|
2932
2849
|
justifyContent: i,
|
|
2933
|
-
alignItems:
|
|
2850
|
+
alignItems: d,
|
|
2934
2851
|
height: n,
|
|
2935
2852
|
width: o,
|
|
2936
2853
|
/**
|
|
@@ -2940,13 +2857,12 @@ const In = (e) => {
|
|
|
2940
2857
|
*/
|
|
2941
2858
|
marginLeft: r * -1 * Oe + "rem",
|
|
2942
2859
|
marginTop: a * -1 * Oe + "rem"
|
|
2943
|
-
},
|
|
2944
|
-
|
|
2945
|
-
t,
|
|
2860
|
+
}, u = g(
|
|
2861
|
+
fn,
|
|
2946
2862
|
"box-border flex flex-wrap"
|
|
2947
|
-
),
|
|
2948
|
-
return /* @__PURE__ */ l(
|
|
2949
|
-
}, Ye = (e, t) =>
|
|
2863
|
+
), c = { columnGap: r, rowGap: a };
|
|
2864
|
+
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: p, ...m, children: /* @__PURE__ */ l(Xe.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: p, ...m, children: /* @__PURE__ */ l(Xe.Provider, { value: c, children: e }) });
|
|
2865
|
+
}, Ye = (e, t) => g({
|
|
2950
2866
|
"basis-1/12": e === 1 && !t,
|
|
2951
2867
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2952
2868
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -3019,25 +2935,25 @@ const In = (e) => {
|
|
|
3019
2935
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3020
2936
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3021
2937
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3022
|
-
}),
|
|
2938
|
+
}), bn = ({
|
|
3023
2939
|
className: e,
|
|
3024
2940
|
span: t
|
|
3025
2941
|
}) => {
|
|
3026
2942
|
if (!t)
|
|
3027
|
-
return
|
|
2943
|
+
return g(e, Se, "box-border basis-auto");
|
|
3028
2944
|
if (typeof t == "number")
|
|
3029
|
-
return
|
|
2945
|
+
return g(e, Se, "box-border max-w-full", {
|
|
3030
2946
|
[`${Ye(t)}`]: !0
|
|
3031
2947
|
});
|
|
3032
2948
|
if (typeof t == "string")
|
|
3033
|
-
return
|
|
2949
|
+
return g(e, Se, "box-border basis-auto", {
|
|
3034
2950
|
"max-w-full grow": t === "auto"
|
|
3035
2951
|
});
|
|
3036
2952
|
if (typeof t == "object") {
|
|
3037
2953
|
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Ye(n) : Ye(n, a));
|
|
3038
|
-
return
|
|
2954
|
+
return g(
|
|
3039
2955
|
e,
|
|
3040
|
-
|
|
2956
|
+
Se,
|
|
3041
2957
|
"box-border",
|
|
3042
2958
|
r
|
|
3043
2959
|
);
|
|
@@ -3048,36 +2964,36 @@ const In = (e) => {
|
|
|
3048
2964
|
span: r,
|
|
3049
2965
|
...a
|
|
3050
2966
|
}) => {
|
|
3051
|
-
const { columnGap: n, rowGap: o } = Xe
|
|
2967
|
+
const { columnGap: n, rowGap: o } = Qe(Xe), s = {
|
|
3052
2968
|
paddingLeft: n * Oe + "rem",
|
|
3053
2969
|
paddingTop: o * Oe + "rem"
|
|
3054
|
-
}, i =
|
|
2970
|
+
}, i = bn({
|
|
3055
2971
|
className: t,
|
|
3056
2972
|
span: r
|
|
3057
2973
|
});
|
|
3058
2974
|
return /* @__PURE__ */ l("div", { className: i, style: s, ...a, children: e });
|
|
3059
2975
|
};
|
|
3060
2976
|
/*!
|
|
3061
|
-
@versini/ui-system
|
|
2977
|
+
@versini/ui-system v2.0.1
|
|
3062
2978
|
© 2024 gizmette.com
|
|
3063
2979
|
*/
|
|
3064
2980
|
try {
|
|
3065
2981
|
window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
|
|
3066
|
-
version: "
|
|
3067
|
-
buildTime: "12/
|
|
2982
|
+
version: "2.0.1",
|
|
2983
|
+
buildTime: "12/29/2024 06:28 PM EST",
|
|
3068
2984
|
homepage: "https://github.com/aversini/ui-components",
|
|
3069
2985
|
license: "MIT"
|
|
3070
2986
|
});
|
|
3071
2987
|
} catch {
|
|
3072
2988
|
}
|
|
3073
|
-
const tr = "av-text-input",
|
|
3074
|
-
function
|
|
3075
|
-
const e =
|
|
3076
|
-
return
|
|
2989
|
+
const tr = "av-text-input", En = "av-text-input-wrapper", Fe = "av-text-input-helper-text";
|
|
2990
|
+
function wn() {
|
|
2991
|
+
const e = $(!1);
|
|
2992
|
+
return Q(() => (e.current = !0, () => {
|
|
3077
2993
|
e.current = !1;
|
|
3078
|
-
}), []),
|
|
2994
|
+
}), []), q(() => e.current, []);
|
|
3079
2995
|
}
|
|
3080
|
-
const
|
|
2996
|
+
const Tn = {
|
|
3081
2997
|
x: 0,
|
|
3082
2998
|
y: 0,
|
|
3083
2999
|
width: 0,
|
|
@@ -3087,19 +3003,19 @@ const An = {
|
|
|
3087
3003
|
bottom: 0,
|
|
3088
3004
|
right: 0
|
|
3089
3005
|
};
|
|
3090
|
-
function
|
|
3091
|
-
const t =
|
|
3092
|
-
const
|
|
3093
|
-
|
|
3094
|
-
a.current && t() && o(
|
|
3006
|
+
function In(e) {
|
|
3007
|
+
const t = wn(), r = $(0), a = $(null), [n, o] = j(Tn), s = St(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3008
|
+
const d = i[0];
|
|
3009
|
+
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3010
|
+
a.current && t() && o(d.contentRect);
|
|
3095
3011
|
}));
|
|
3096
3012
|
}), [t]);
|
|
3097
|
-
return
|
|
3013
|
+
return Q(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
3098
3014
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3099
3015
|
}), [s, e]), [a, n];
|
|
3100
3016
|
}
|
|
3101
|
-
function
|
|
3102
|
-
const t =
|
|
3017
|
+
function _n(e) {
|
|
3018
|
+
const t = kt();
|
|
3103
3019
|
if (!e)
|
|
3104
3020
|
return t;
|
|
3105
3021
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3109,7 +3025,7 @@ function Nn(e) {
|
|
|
3109
3025
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3110
3026
|
}
|
|
3111
3027
|
}
|
|
3112
|
-
const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT",
|
|
3028
|
+
const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", kn = {
|
|
3113
3029
|
alert: null,
|
|
3114
3030
|
alertdialog: null,
|
|
3115
3031
|
log: "polite",
|
|
@@ -3117,7 +3033,7 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Rn = {
|
|
|
3117
3033
|
progressbar: null,
|
|
3118
3034
|
status: "polite",
|
|
3119
3035
|
timer: "assertive"
|
|
3120
|
-
},
|
|
3036
|
+
}, Sn = (e, t) => {
|
|
3121
3037
|
switch (t == null ? void 0 : t.type) {
|
|
3122
3038
|
case rr:
|
|
3123
3039
|
return {
|
|
@@ -3132,7 +3048,7 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Rn = {
|
|
|
3132
3048
|
default:
|
|
3133
3049
|
return e;
|
|
3134
3050
|
}
|
|
3135
|
-
},
|
|
3051
|
+
}, An = ({
|
|
3136
3052
|
onAnnouncementClear: e,
|
|
3137
3053
|
dispatch: t
|
|
3138
3054
|
}) => {
|
|
@@ -3150,13 +3066,13 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", Rn = {
|
|
|
3150
3066
|
type: rr,
|
|
3151
3067
|
payload: e
|
|
3152
3068
|
}), t && (r.current = setTimeout(
|
|
3153
|
-
() =>
|
|
3069
|
+
() => An({
|
|
3154
3070
|
onAnnouncementClear: a,
|
|
3155
3071
|
dispatch: n
|
|
3156
3072
|
}),
|
|
3157
3073
|
t
|
|
3158
3074
|
));
|
|
3159
|
-
},
|
|
3075
|
+
}, vn = ({
|
|
3160
3076
|
children: e,
|
|
3161
3077
|
announcementTimeoutRef: t,
|
|
3162
3078
|
announcementDelay: r,
|
|
@@ -3188,15 +3104,15 @@ function nr({
|
|
|
3188
3104
|
clearAnnouncementDelay: o,
|
|
3189
3105
|
onAnnouncementClear: s,
|
|
3190
3106
|
visible: i,
|
|
3191
|
-
...
|
|
3107
|
+
...d
|
|
3192
3108
|
}) {
|
|
3193
|
-
const
|
|
3109
|
+
const m = $(null), p = $(null), [u, c] = _t(Sn, {
|
|
3194
3110
|
announcement: null
|
|
3195
3111
|
});
|
|
3196
|
-
let
|
|
3197
|
-
typeof
|
|
3198
|
-
|
|
3199
|
-
announcementTimeoutRef:
|
|
3112
|
+
let h = r;
|
|
3113
|
+
typeof h > "u" && (h = a ? kn[a] : "assertive"), Q(() => {
|
|
3114
|
+
vn({
|
|
3115
|
+
announcementTimeoutRef: m,
|
|
3200
3116
|
announcementDelay: n,
|
|
3201
3117
|
children: e,
|
|
3202
3118
|
clearAnnouncementDelay: o,
|
|
@@ -3210,78 +3126,56 @@ function nr({
|
|
|
3210
3126
|
o,
|
|
3211
3127
|
s
|
|
3212
3128
|
]);
|
|
3213
|
-
const f =
|
|
3129
|
+
const f = g(t, {
|
|
3214
3130
|
"sr-only": !i
|
|
3215
3131
|
});
|
|
3216
3132
|
return /* @__PURE__ */ l(
|
|
3217
3133
|
"div",
|
|
3218
3134
|
{
|
|
3219
|
-
"aria-live":
|
|
3135
|
+
"aria-live": h,
|
|
3220
3136
|
...a && { role: a },
|
|
3221
3137
|
className: f,
|
|
3222
|
-
...
|
|
3223
|
-
children:
|
|
3138
|
+
...d,
|
|
3139
|
+
children: u.announcement
|
|
3224
3140
|
}
|
|
3225
3141
|
);
|
|
3226
3142
|
}
|
|
3227
3143
|
/*!
|
|
3228
|
-
@versini/ui-liveregion v1.2.
|
|
3144
|
+
@versini/ui-liveregion v1.2.2
|
|
3229
3145
|
© 2024 gizmette.com
|
|
3230
3146
|
*/
|
|
3231
3147
|
try {
|
|
3232
3148
|
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
3233
|
-
version: "1.2.
|
|
3234
|
-
buildTime: "12/
|
|
3149
|
+
version: "1.2.2",
|
|
3150
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
3235
3151
|
homepage: "https://github.com/aversini/ui-components",
|
|
3236
3152
|
license: "MIT"
|
|
3237
3153
|
});
|
|
3238
3154
|
} catch {
|
|
3239
3155
|
}
|
|
3240
|
-
|
|
3241
|
-
@versini/ui-spacing v1.1.0
|
|
3242
|
-
© 2024 gizmette.com
|
|
3243
|
-
*/
|
|
3244
|
-
try {
|
|
3245
|
-
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
3246
|
-
version: "1.1.0",
|
|
3247
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
3248
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3249
|
-
license: "MIT"
|
|
3250
|
-
});
|
|
3251
|
-
} catch {
|
|
3252
|
-
}
|
|
3253
|
-
const Pn = (e) => {
|
|
3254
|
-
let t = "";
|
|
3255
|
-
if (typeof e == "number" || typeof e == "string")
|
|
3256
|
-
t = "m-" + e;
|
|
3257
|
-
else {
|
|
3258
|
-
const r = [];
|
|
3259
|
-
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
3260
|
-
}
|
|
3261
|
-
return t;
|
|
3262
|
-
}, Dn = ({
|
|
3156
|
+
const Nn = ({
|
|
3263
3157
|
mode: e
|
|
3264
|
-
}) =>
|
|
3158
|
+
}) => g({
|
|
3265
3159
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3266
3160
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3267
3161
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3268
3162
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3269
|
-
}),
|
|
3163
|
+
}), Rn = ({
|
|
3270
3164
|
focusMode: e
|
|
3271
|
-
}) =>
|
|
3165
|
+
}) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3272
3166
|
"focus:outline-focus-dark": e === "dark",
|
|
3273
3167
|
"focus:outline-focus-light": e === "light",
|
|
3274
3168
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3275
3169
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3276
|
-
}),
|
|
3170
|
+
}), xn = ({
|
|
3277
3171
|
noBorder: e,
|
|
3278
3172
|
error: t
|
|
3279
|
-
}) =>
|
|
3173
|
+
}) => g("border-2", {
|
|
3280
3174
|
"border-border-dark": !e && !t,
|
|
3281
3175
|
"focus:border-border-dark": !e && t,
|
|
3282
3176
|
"border-border-error-dark": !e && t,
|
|
3283
3177
|
"border-transparent": e
|
|
3284
|
-
}),
|
|
3178
|
+
}), Cn = ({
|
|
3285
3179
|
disabled: e,
|
|
3286
3180
|
raw: t,
|
|
3287
3181
|
error: r,
|
|
@@ -3290,22 +3184,22 @@ const Pn = (e) => {
|
|
|
3290
3184
|
if (t)
|
|
3291
3185
|
return "";
|
|
3292
3186
|
if (e)
|
|
3293
|
-
return
|
|
3187
|
+
return g("absolute px-2 cursor-not-allowed opacity-50 font-medium");
|
|
3294
3188
|
if (!r)
|
|
3295
|
-
return
|
|
3189
|
+
return g("absolute px-2 cursor-text font-medium", {
|
|
3296
3190
|
"text-copy-lighter": a === "dark",
|
|
3297
3191
|
"text-copy-dark": a === "light",
|
|
3298
3192
|
"text-copy-dark dark:text-copy-lighter": a === "system",
|
|
3299
3193
|
"text-copy-lighter dark:text-copy-dark": a === "alt-system"
|
|
3300
3194
|
});
|
|
3301
3195
|
if (r)
|
|
3302
|
-
return
|
|
3196
|
+
return g("absolute px-2 cursor-text font-medium", {
|
|
3303
3197
|
"text-copy-lighter": a === "dark",
|
|
3304
3198
|
"text-copy-error-dark": a === "light",
|
|
3305
3199
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3306
3200
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3307
3201
|
});
|
|
3308
|
-
},
|
|
3202
|
+
}, On = ({
|
|
3309
3203
|
error: e,
|
|
3310
3204
|
raw: t,
|
|
3311
3205
|
mode: r,
|
|
@@ -3314,92 +3208,90 @@ const Pn = (e) => {
|
|
|
3314
3208
|
if (t)
|
|
3315
3209
|
return "";
|
|
3316
3210
|
if (a)
|
|
3317
|
-
return
|
|
3211
|
+
return g(
|
|
3318
3212
|
Fe,
|
|
3319
3213
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3320
3214
|
);
|
|
3321
3215
|
if (!e)
|
|
3322
|
-
return
|
|
3216
|
+
return g(Fe, "absolute px-2 font-medium", {
|
|
3323
3217
|
"text-copy-lighter": r === "dark",
|
|
3324
3218
|
"text-copy-dark": r === "light",
|
|
3325
3219
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3326
3220
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3327
3221
|
});
|
|
3328
3222
|
if (e)
|
|
3329
|
-
return
|
|
3223
|
+
return g(Fe, "absolute px-2 font-medium", {
|
|
3330
3224
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3331
3225
|
"text-copy-error-dark": r === "light",
|
|
3332
3226
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3333
3227
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3334
3228
|
});
|
|
3335
|
-
},
|
|
3229
|
+
}, Pn = ({
|
|
3336
3230
|
className: e,
|
|
3337
3231
|
inputClassName: t,
|
|
3338
3232
|
raw: r,
|
|
3339
3233
|
disabled: a,
|
|
3340
3234
|
noBorder: n,
|
|
3341
3235
|
error: o,
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
rightElementClassName: p
|
|
3236
|
+
mode: s,
|
|
3237
|
+
focusMode: i,
|
|
3238
|
+
size: d,
|
|
3239
|
+
rightElementClassName: m
|
|
3347
3240
|
}) => {
|
|
3348
|
-
const
|
|
3241
|
+
const p = r ? e : g(
|
|
3349
3242
|
"relative flex w-full flex-col justify-center",
|
|
3350
|
-
|
|
3351
|
-
e
|
|
3352
|
-
Pn(s)
|
|
3243
|
+
En,
|
|
3244
|
+
e
|
|
3353
3245
|
);
|
|
3354
|
-
let
|
|
3355
|
-
switch (
|
|
3246
|
+
let u = "";
|
|
3247
|
+
switch (d) {
|
|
3356
3248
|
case "xs":
|
|
3357
|
-
|
|
3249
|
+
u = "h-8";
|
|
3358
3250
|
break;
|
|
3359
3251
|
case "sm":
|
|
3360
|
-
|
|
3252
|
+
u = "h-10";
|
|
3361
3253
|
break;
|
|
3362
3254
|
case "lg":
|
|
3363
|
-
|
|
3255
|
+
u = "h-14";
|
|
3364
3256
|
break;
|
|
3365
3257
|
case "xl":
|
|
3366
|
-
|
|
3258
|
+
u = "h-16";
|
|
3367
3259
|
break;
|
|
3368
3260
|
default:
|
|
3369
|
-
|
|
3261
|
+
u = "h-12";
|
|
3370
3262
|
break;
|
|
3371
3263
|
}
|
|
3372
|
-
const
|
|
3264
|
+
const c = r ? g(t) : g(
|
|
3373
3265
|
tr,
|
|
3374
|
-
|
|
3375
|
-
c,
|
|
3266
|
+
u,
|
|
3376
3267
|
"rounded-md text-base px-4",
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3268
|
+
Nn({ mode: s }),
|
|
3269
|
+
Rn({ focusMode: i }),
|
|
3270
|
+
xn({ noBorder: n, error: o }),
|
|
3380
3271
|
{
|
|
3381
3272
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3382
|
-
}
|
|
3383
|
-
|
|
3273
|
+
},
|
|
3274
|
+
t
|
|
3275
|
+
), h = r ? void 0 : "sr-only", f = Cn({
|
|
3384
3276
|
disabled: a,
|
|
3385
3277
|
raw: r,
|
|
3386
3278
|
error: o,
|
|
3387
|
-
mode:
|
|
3388
|
-
}),
|
|
3279
|
+
mode: s
|
|
3280
|
+
}), E = On({
|
|
3389
3281
|
error: o,
|
|
3390
3282
|
raw: r,
|
|
3391
|
-
mode:
|
|
3283
|
+
mode: s,
|
|
3392
3284
|
disabled: a
|
|
3393
|
-
}), w = r ? void 0 :
|
|
3285
|
+
}), w = r ? void 0 : g("absolute right-3", m);
|
|
3394
3286
|
return {
|
|
3395
|
-
wrapper:
|
|
3396
|
-
input:
|
|
3397
|
-
accessibleLabel:
|
|
3398
|
-
visibleLabel:
|
|
3399
|
-
helperText:
|
|
3287
|
+
wrapper: p,
|
|
3288
|
+
input: c,
|
|
3289
|
+
accessibleLabel: h,
|
|
3290
|
+
visibleLabel: f,
|
|
3291
|
+
helperText: E,
|
|
3400
3292
|
rightElement: w
|
|
3401
3293
|
};
|
|
3402
|
-
},
|
|
3294
|
+
}, ot = P.forwardRef(
|
|
3403
3295
|
({
|
|
3404
3296
|
id: e,
|
|
3405
3297
|
name: t,
|
|
@@ -3409,106 +3301,104 @@ const Pn = (e) => {
|
|
|
3409
3301
|
className: o,
|
|
3410
3302
|
inputClassName: s,
|
|
3411
3303
|
mode: i = "system",
|
|
3412
|
-
focusMode:
|
|
3413
|
-
disabled:
|
|
3304
|
+
focusMode: d = "system",
|
|
3305
|
+
disabled: m = !1,
|
|
3414
3306
|
noBorder: p = !1,
|
|
3415
|
-
labelId:
|
|
3307
|
+
labelId: u,
|
|
3416
3308
|
labelHidden: c = !1,
|
|
3417
|
-
type:
|
|
3309
|
+
type: h = "text",
|
|
3418
3310
|
helperText: f = "",
|
|
3419
|
-
rightElement:
|
|
3420
|
-
rightElementClassName:
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
const [ee, N] = kn(), [J, D] = q(0), Y = Nn({ id: e, prefix: `${tr}-` }), pe = `${t} error, ${f}`, te = K(null), R = K(null), L = {
|
|
3311
|
+
rightElement: E,
|
|
3312
|
+
rightElementClassName: w,
|
|
3313
|
+
size: _ = "md",
|
|
3314
|
+
...U
|
|
3315
|
+
}, K) => {
|
|
3316
|
+
const [H, O] = In(), [W, G] = j(0), x = _n({ id: e, prefix: `${tr}-` }), pe = `${t} error, ${f}`, Z = $(null), N = $(null), D = {
|
|
3426
3317
|
xs: { label: "-25px", helperText: "30px" },
|
|
3427
3318
|
sm: { label: "-29px", helperText: "34px" },
|
|
3428
3319
|
md: { label: "-33px", helperText: "38px" },
|
|
3429
3320
|
lg: { label: "-15px", helperText: "22px" },
|
|
3430
3321
|
xl: { label: "-19px", helperText: "25px" }
|
|
3431
|
-
},
|
|
3322
|
+
}, B = Pn({
|
|
3432
3323
|
className: o,
|
|
3433
3324
|
inputClassName: s,
|
|
3434
3325
|
error: a,
|
|
3435
3326
|
raw: n,
|
|
3436
|
-
focusMode:
|
|
3437
|
-
disabled:
|
|
3327
|
+
focusMode: d,
|
|
3328
|
+
disabled: m,
|
|
3438
3329
|
noBorder: p,
|
|
3439
|
-
spacing: w,
|
|
3440
3330
|
mode: i,
|
|
3441
|
-
size:
|
|
3442
|
-
rightElementClassName:
|
|
3331
|
+
size: _,
|
|
3332
|
+
rightElementClassName: w
|
|
3443
3333
|
});
|
|
3444
|
-
return
|
|
3445
|
-
|
|
3446
|
-
}, [
|
|
3447
|
-
var
|
|
3448
|
-
const { label:
|
|
3449
|
-
(
|
|
3334
|
+
return it(() => {
|
|
3335
|
+
O && O.width && G(O.width + 18 + 10);
|
|
3336
|
+
}, [O]), it(() => {
|
|
3337
|
+
var ee, y;
|
|
3338
|
+
const { label: T, helperText: b } = D[_];
|
|
3339
|
+
(ee = Z == null ? void 0 : Z.current) == null || ee.style.setProperty("--av-text-input-label", T), (y = N == null ? void 0 : N.current) == null || y.style.setProperty(
|
|
3450
3340
|
"--av-text-input-helper-text",
|
|
3451
|
-
|
|
3341
|
+
b
|
|
3452
3342
|
);
|
|
3453
|
-
}, [
|
|
3343
|
+
}, [_]), /* @__PURE__ */ I("div", { className: B.wrapper, children: [
|
|
3454
3344
|
/* @__PURE__ */ l(
|
|
3455
3345
|
"label",
|
|
3456
3346
|
{
|
|
3457
|
-
htmlFor:
|
|
3458
|
-
id:
|
|
3459
|
-
className:
|
|
3347
|
+
htmlFor: x,
|
|
3348
|
+
id: u,
|
|
3349
|
+
className: B.accessibleLabel,
|
|
3460
3350
|
children: r
|
|
3461
3351
|
}
|
|
3462
3352
|
),
|
|
3463
3353
|
/* @__PURE__ */ l(
|
|
3464
3354
|
"input",
|
|
3465
3355
|
{
|
|
3466
|
-
ref:
|
|
3467
|
-
id:
|
|
3356
|
+
ref: K,
|
|
3357
|
+
id: x,
|
|
3468
3358
|
name: t,
|
|
3469
|
-
type:
|
|
3470
|
-
disabled:
|
|
3359
|
+
type: h,
|
|
3360
|
+
disabled: m,
|
|
3471
3361
|
placeholder: n ? void 0 : " ",
|
|
3472
|
-
className:
|
|
3473
|
-
...f && { "aria-describedby": `${
|
|
3362
|
+
className: B.input,
|
|
3363
|
+
...f && { "aria-describedby": `${x}-helper` },
|
|
3474
3364
|
...a && { "aria-invalid": "true" },
|
|
3475
|
-
...
|
|
3476
|
-
|
|
3365
|
+
...E && !n && { style: { paddingRight: W } },
|
|
3366
|
+
...U
|
|
3477
3367
|
}
|
|
3478
3368
|
),
|
|
3479
3369
|
!n && !c && /* @__PURE__ */ l(
|
|
3480
3370
|
"label",
|
|
3481
3371
|
{
|
|
3482
|
-
ref:
|
|
3372
|
+
ref: Z,
|
|
3483
3373
|
"aria-hidden": !0,
|
|
3484
|
-
htmlFor:
|
|
3485
|
-
className:
|
|
3374
|
+
htmlFor: x,
|
|
3375
|
+
className: B.visibleLabel,
|
|
3486
3376
|
children: r
|
|
3487
3377
|
}
|
|
3488
3378
|
),
|
|
3489
3379
|
f && /* @__PURE__ */ l(
|
|
3490
3380
|
"div",
|
|
3491
3381
|
{
|
|
3492
|
-
ref:
|
|
3493
|
-
id: `${
|
|
3494
|
-
className:
|
|
3382
|
+
ref: N,
|
|
3383
|
+
id: `${x}-helper`,
|
|
3384
|
+
className: B.helperText,
|
|
3495
3385
|
children: f
|
|
3496
3386
|
}
|
|
3497
3387
|
),
|
|
3498
|
-
|
|
3388
|
+
E && /* @__PURE__ */ l(
|
|
3499
3389
|
"div",
|
|
3500
3390
|
{
|
|
3501
|
-
ref:
|
|
3502
|
-
className:
|
|
3503
|
-
children:
|
|
3391
|
+
ref: H,
|
|
3392
|
+
className: B.rightElement,
|
|
3393
|
+
children: E
|
|
3504
3394
|
}
|
|
3505
3395
|
),
|
|
3506
3396
|
a && f && /* @__PURE__ */ l(nr, { politeness: "polite", clearAnnouncementDelay: 500, children: pe })
|
|
3507
3397
|
] });
|
|
3508
3398
|
}
|
|
3509
3399
|
);
|
|
3510
|
-
|
|
3511
|
-
function
|
|
3400
|
+
ot.displayName = "TextInput";
|
|
3401
|
+
function Dn(e) {
|
|
3512
3402
|
return St(() => e.every((t) => t == null) ? () => {
|
|
3513
3403
|
} : (t) => {
|
|
3514
3404
|
e.forEach((r) => {
|
|
@@ -3516,7 +3406,7 @@ function Hn(e) {
|
|
|
3516
3406
|
});
|
|
3517
3407
|
}, e);
|
|
3518
3408
|
}
|
|
3519
|
-
const
|
|
3409
|
+
const Ln = 500, Mn = 5e3, $n = 2e4, or = P.forwardRef(
|
|
3520
3410
|
({
|
|
3521
3411
|
name: e,
|
|
3522
3412
|
disabled: t,
|
|
@@ -3526,74 +3416,72 @@ const Gn = 500, Wn = 5e3, Vn = 2e4, or = P.forwardRef(
|
|
|
3526
3416
|
onChange: o,
|
|
3527
3417
|
onBlur: s,
|
|
3528
3418
|
onFocus: i,
|
|
3529
|
-
onTextInputMaskBlur:
|
|
3530
|
-
rightElement:
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
const [d, f] = q(!0), [b, T] = q({
|
|
3419
|
+
onTextInputMaskBlur: d,
|
|
3420
|
+
rightElement: m,
|
|
3421
|
+
...p
|
|
3422
|
+
}, u) => {
|
|
3423
|
+
const [c, h] = j(!0), [f, E] = j({
|
|
3535
3424
|
message: null,
|
|
3536
3425
|
politeness: null
|
|
3537
|
-
}), w =
|
|
3538
|
-
|
|
3539
|
-
w.current = !0,
|
|
3540
|
-
announcementTimeout:
|
|
3426
|
+
}), w = $(!0), _ = $(null), U = $(null), K = Dn([u, U]), H = c ? "Show" : "Hide", O = () => {
|
|
3427
|
+
_.current && clearTimeout(_.current), w.current || (_.current = setTimeout(() => {
|
|
3428
|
+
w.current = !0, h(!0), E({
|
|
3429
|
+
announcementTimeout: Mn,
|
|
3541
3430
|
politeness: "polite",
|
|
3542
3431
|
message: `${r} hiding characters`
|
|
3543
3432
|
}), n && n(!0);
|
|
3544
|
-
},
|
|
3545
|
-
},
|
|
3546
|
-
|
|
3547
|
-
const
|
|
3548
|
-
w.current =
|
|
3549
|
-
announcementTimeout:
|
|
3433
|
+
}, $n));
|
|
3434
|
+
}, W = (N) => {
|
|
3435
|
+
N.preventDefault();
|
|
3436
|
+
const D = !w.current;
|
|
3437
|
+
w.current = D, O(), h(D), E({
|
|
3438
|
+
announcementTimeout: Ln,
|
|
3550
3439
|
politeness: "assertive",
|
|
3551
|
-
message:
|
|
3552
|
-
}), n && n(
|
|
3553
|
-
},
|
|
3554
|
-
var
|
|
3555
|
-
const { relatedTarget:
|
|
3556
|
-
|
|
3557
|
-
},
|
|
3558
|
-
|
|
3559
|
-
}, pe = (
|
|
3560
|
-
|
|
3561
|
-
},
|
|
3562
|
-
|
|
3440
|
+
message: D ? "Characters hidden" : "Characters showing"
|
|
3441
|
+
}), n && n(D);
|
|
3442
|
+
}, G = (N) => {
|
|
3443
|
+
var D;
|
|
3444
|
+
const { relatedTarget: B } = N, ee = (D = U.current) == null ? void 0 : D.parentElement;
|
|
3445
|
+
ee != null && ee.contains(B) || d && d();
|
|
3446
|
+
}, x = (N) => {
|
|
3447
|
+
O(), s && s(N), G(N);
|
|
3448
|
+
}, pe = (N) => {
|
|
3449
|
+
O(), i && i(N);
|
|
3450
|
+
}, Z = (N) => {
|
|
3451
|
+
O(), o && o(N);
|
|
3563
3452
|
};
|
|
3564
|
-
return
|
|
3565
|
-
|
|
3566
|
-
}, []), /* @__PURE__ */
|
|
3453
|
+
return Q(() => () => {
|
|
3454
|
+
_.current && clearTimeout(_.current);
|
|
3455
|
+
}, []), /* @__PURE__ */ I(fe, { children: [
|
|
3567
3456
|
/* @__PURE__ */ l(
|
|
3568
|
-
|
|
3457
|
+
ot,
|
|
3569
3458
|
{
|
|
3570
|
-
ref:
|
|
3459
|
+
ref: K,
|
|
3571
3460
|
name: e,
|
|
3572
3461
|
label: r,
|
|
3573
3462
|
labelHidden: a,
|
|
3574
|
-
type:
|
|
3463
|
+
type: c ? "password" : "text",
|
|
3575
3464
|
disabled: t,
|
|
3576
|
-
|
|
3577
|
-
onBlur: Y,
|
|
3465
|
+
onBlur: x,
|
|
3578
3466
|
onFocus: pe,
|
|
3579
|
-
onChange:
|
|
3580
|
-
rightElement: P.cloneElement(
|
|
3581
|
-
ref:
|
|
3582
|
-
label:
|
|
3583
|
-
onClick:
|
|
3584
|
-
onBlur:
|
|
3467
|
+
onChange: Z,
|
|
3468
|
+
rightElement: P.cloneElement(m, {
|
|
3469
|
+
ref: u,
|
|
3470
|
+
label: H,
|
|
3471
|
+
onClick: W,
|
|
3472
|
+
onBlur: G,
|
|
3585
3473
|
disabled: t
|
|
3586
3474
|
}),
|
|
3587
|
-
...
|
|
3475
|
+
...p
|
|
3588
3476
|
}
|
|
3589
3477
|
),
|
|
3590
3478
|
/* @__PURE__ */ l(
|
|
3591
3479
|
nr,
|
|
3592
3480
|
{
|
|
3593
3481
|
role: "status",
|
|
3594
|
-
politeness:
|
|
3595
|
-
clearAnnouncementDelay:
|
|
3596
|
-
children:
|
|
3482
|
+
politeness: f.politeness,
|
|
3483
|
+
clearAnnouncementDelay: f.announcementTimeout,
|
|
3484
|
+
children: f.message
|
|
3597
3485
|
}
|
|
3598
3486
|
)
|
|
3599
3487
|
] });
|
|
@@ -3601,26 +3489,26 @@ const Gn = 500, Wn = 5e3, Vn = 2e4, or = P.forwardRef(
|
|
|
3601
3489
|
);
|
|
3602
3490
|
or.displayName = "TextInputMask";
|
|
3603
3491
|
/*!
|
|
3604
|
-
@versini/ui-textinput
|
|
3492
|
+
@versini/ui-textinput v2.0.0
|
|
3605
3493
|
© 2024 gizmette.com
|
|
3606
3494
|
*/
|
|
3607
3495
|
try {
|
|
3608
3496
|
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
3609
|
-
version: "
|
|
3610
|
-
buildTime: "12/
|
|
3497
|
+
version: "2.0.0",
|
|
3498
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
3611
3499
|
homepage: "https://github.com/aversini/ui-components",
|
|
3612
3500
|
license: "MIT"
|
|
3613
3501
|
});
|
|
3614
3502
|
} catch {
|
|
3615
3503
|
}
|
|
3616
|
-
const
|
|
3504
|
+
const Un = "ASK! ME! ANYTHING!", sr = "LeeLou", Kn = "gizmette.com", Hn = "Log in", Wn = "Sign in with a Passkey", Vo = "Log out", Gn = "Password", Bn = "Powered by ", Yo = "Send", Fo = "Profile", zo = "Statistics", jo = "Chat history", qo = "About", Xo = "Type your question here", Qo = "<clipboard>", Zo = {
|
|
3617
3505
|
ACTION_WHILE_STREAMING: {
|
|
3618
3506
|
content: "Cancel chat"
|
|
3619
3507
|
},
|
|
3620
3508
|
ACTION_WHILE_NOT_STREAMING: {
|
|
3621
3509
|
content: "New chat"
|
|
3622
3510
|
}
|
|
3623
|
-
},
|
|
3511
|
+
}, es = "N/A", ts = "Tags 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.", rs = {
|
|
3624
3512
|
PREFERENCES: {
|
|
3625
3513
|
TITLE: "User settings",
|
|
3626
3514
|
NAME: "Name",
|
|
@@ -3656,67 +3544,47 @@ const Bn = "ASK! ME! ANYTHING!", sr = "LeeLou", Jn = "gizmette.com", Yn = "Log i
|
|
|
3656
3544
|
}
|
|
3657
3545
|
};
|
|
3658
3546
|
/*!
|
|
3659
|
-
@versini/ui-footer
|
|
3547
|
+
@versini/ui-footer v2.0.0
|
|
3660
3548
|
© 2024 gizmette.com
|
|
3661
3549
|
*/
|
|
3662
3550
|
try {
|
|
3663
3551
|
window.__VERSINI_UI_FOOTER__ || (window.__VERSINI_UI_FOOTER__ = {
|
|
3664
|
-
version: "
|
|
3665
|
-
buildTime: "12/
|
|
3552
|
+
version: "2.0.0",
|
|
3553
|
+
buildTime: "12/29/2024 04:16 PM EST",
|
|
3666
3554
|
homepage: "https://github.com/aversini/ui-components",
|
|
3667
3555
|
license: "MIT"
|
|
3668
3556
|
});
|
|
3669
3557
|
} catch {
|
|
3670
3558
|
}
|
|
3671
|
-
const
|
|
3672
|
-
/*!
|
|
3673
|
-
@versini/ui-spacing v1.1.0
|
|
3674
|
-
© 2024 gizmette.com
|
|
3675
|
-
*/
|
|
3676
|
-
try {
|
|
3677
|
-
window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
|
|
3678
|
-
version: "1.1.0",
|
|
3679
|
-
buildTime: "12/26/2024 06:05 PM EST",
|
|
3680
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3681
|
-
license: "MIT"
|
|
3682
|
-
});
|
|
3683
|
-
} catch {
|
|
3684
|
-
}
|
|
3685
|
-
const Xn = (e) => {
|
|
3686
|
-
let t = "";
|
|
3687
|
-
if (typeof e == "number" || typeof e == "string")
|
|
3688
|
-
t = "m-" + e;
|
|
3689
|
-
else {
|
|
3690
|
-
const r = [];
|
|
3691
|
-
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
3692
|
-
}
|
|
3693
|
-
return t;
|
|
3694
|
-
}, Qn = ({
|
|
3559
|
+
const Jn = "av-footer", Vn = ({
|
|
3695
3560
|
className: e,
|
|
3696
3561
|
mode: t = "system",
|
|
3697
3562
|
row1: r,
|
|
3698
3563
|
row2: a,
|
|
3699
3564
|
noMargins: n = !1,
|
|
3700
|
-
|
|
3701
|
-
raw: s = !1
|
|
3565
|
+
raw: o = !1
|
|
3702
3566
|
}) => {
|
|
3703
|
-
const
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3567
|
+
const s = g(
|
|
3568
|
+
Jn,
|
|
3569
|
+
{
|
|
3570
|
+
"text-copy-dark": !o && t === "dark",
|
|
3571
|
+
"text-copy-lighter": !o && t === "light",
|
|
3572
|
+
"text-copy-dark dark:text-copy-lighter": !o && t === "system",
|
|
3573
|
+
"text-copy-lighter dark:text-copy-dark": !o && t === "alt-system",
|
|
3574
|
+
"mb-[100px]": !n && !o,
|
|
3575
|
+
"mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !o
|
|
3576
|
+
},
|
|
3577
|
+
e
|
|
3578
|
+
);
|
|
3579
|
+
return /* @__PURE__ */ I("footer", { className: s, children: [
|
|
3712
3580
|
r && /* @__PURE__ */ l("div", { children: r }),
|
|
3713
3581
|
a && /* @__PURE__ */ l("div", { children: a })
|
|
3714
3582
|
] });
|
|
3715
|
-
},
|
|
3583
|
+
}, Yn = P.createContext({
|
|
3716
3584
|
state: {
|
|
3717
3585
|
id: "",
|
|
3718
|
-
model:
|
|
3719
|
-
engine:
|
|
3586
|
+
model: Ve,
|
|
3587
|
+
engine: Ve,
|
|
3720
3588
|
usage: 0,
|
|
3721
3589
|
messages: [],
|
|
3722
3590
|
isComponent: !1,
|
|
@@ -3728,82 +3596,82 @@ const Xn = (e) => {
|
|
|
3728
3596
|
version: "",
|
|
3729
3597
|
models: [],
|
|
3730
3598
|
plugins: [],
|
|
3731
|
-
engine:
|
|
3599
|
+
engine: Ve,
|
|
3732
3600
|
engines: []
|
|
3733
3601
|
}
|
|
3734
|
-
}),
|
|
3602
|
+
}), as = P.createContext({
|
|
3735
3603
|
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
3736
3604
|
dispatch: () => {
|
|
3737
3605
|
}
|
|
3738
|
-
}),
|
|
3606
|
+
}), ns = P.createContext({
|
|
3739
3607
|
state: { tag: "" },
|
|
3740
3608
|
dispatch: () => {
|
|
3741
3609
|
}
|
|
3742
|
-
}),
|
|
3610
|
+
}), Fn = ({
|
|
3743
3611
|
serverStats: e
|
|
3744
3612
|
}) => {
|
|
3745
|
-
const { state: t } =
|
|
3613
|
+
const { state: t } = Qe(Yn);
|
|
3746
3614
|
return /* @__PURE__ */ l(
|
|
3747
|
-
|
|
3615
|
+
Vn,
|
|
3748
3616
|
{
|
|
3749
3617
|
mode: "light",
|
|
3750
|
-
row1: /* @__PURE__ */
|
|
3618
|
+
row1: /* @__PURE__ */ I("div", { children: [
|
|
3751
3619
|
sr,
|
|
3752
3620
|
" v",
|
|
3753
|
-
"5.10.
|
|
3621
|
+
"5.10.2",
|
|
3754
3622
|
" - ",
|
|
3755
|
-
|
|
3623
|
+
Bn,
|
|
3756
3624
|
t && t.engine,
|
|
3757
|
-
|
|
3625
|
+
rt && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3758
3626
|
] }),
|
|
3759
|
-
row2: /* @__PURE__ */
|
|
3627
|
+
row2: /* @__PURE__ */ I("div", { children: [
|
|
3760
3628
|
"© ",
|
|
3761
3629
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3762
3630
|
" ",
|
|
3763
|
-
|
|
3631
|
+
Kn
|
|
3764
3632
|
] })
|
|
3765
3633
|
}
|
|
3766
3634
|
);
|
|
3767
|
-
},
|
|
3635
|
+
}, zn = At(
|
|
3768
3636
|
() => import(
|
|
3769
3637
|
/* webpackChunkName: "LazyHeader" */
|
|
3770
|
-
"./LazyHeader.
|
|
3638
|
+
"./LazyHeader.CbHns6B6.js"
|
|
3771
3639
|
)
|
|
3772
|
-
),
|
|
3773
|
-
const { isAuthenticated: e } =
|
|
3774
|
-
return /* @__PURE__ */
|
|
3775
|
-
e && /* @__PURE__ */ l(
|
|
3776
|
-
/* @__PURE__ */
|
|
3777
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3778
|
-
/* @__PURE__ */
|
|
3640
|
+
), jn = () => {
|
|
3641
|
+
const { isAuthenticated: e } = tt();
|
|
3642
|
+
return /* @__PURE__ */ I(fe, { children: [
|
|
3643
|
+
e && /* @__PURE__ */ l(vt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(zn, {}) }),
|
|
3644
|
+
/* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
|
|
3645
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(un, {}) }),
|
|
3646
|
+
/* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3779
3647
|
/* @__PURE__ */ l("h1", { children: sr }),
|
|
3780
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3648
|
+
/* @__PURE__ */ l("h2", { children: Un })
|
|
3781
3649
|
] })
|
|
3782
3650
|
] })
|
|
3783
3651
|
] });
|
|
3784
|
-
},
|
|
3785
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3652
|
+
}, qn = () => {
|
|
3653
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = tt(), [a, n] = j(""), [o, s] = j(""), [i, d] = j(!0), [m, p] = j({
|
|
3786
3654
|
username: "",
|
|
3787
3655
|
password: ""
|
|
3788
|
-
}),
|
|
3789
|
-
c.preventDefault(), await e(
|
|
3656
|
+
}), u = async (c) => {
|
|
3657
|
+
c.preventDefault(), await e(m.username, m.password) || (s(""), n("Invalid username or password"));
|
|
3790
3658
|
};
|
|
3791
|
-
return
|
|
3659
|
+
return Q(() => {
|
|
3792
3660
|
var c;
|
|
3793
3661
|
(c = document.getElementById("logo")) == null || c.classList.add("fadeOut"), setTimeout(() => {
|
|
3794
|
-
var
|
|
3795
|
-
(
|
|
3662
|
+
var h;
|
|
3663
|
+
(h = document.getElementById("root")) == null || h.classList.replace("app-hidden", "fadeIn");
|
|
3796
3664
|
}, 500);
|
|
3797
|
-
}),
|
|
3665
|
+
}), Q(() => {
|
|
3798
3666
|
t && s(t);
|
|
3799
|
-
}, [t]), /* @__PURE__ */
|
|
3800
|
-
/* @__PURE__ */
|
|
3801
|
-
/* @__PURE__ */ l("div", { className: qa(), children: /* @__PURE__ */ l(
|
|
3802
|
-
/* @__PURE__ */
|
|
3803
|
-
/* @__PURE__ */ l(
|
|
3667
|
+
}, [t]), /* @__PURE__ */ I(fe, { children: [
|
|
3668
|
+
/* @__PURE__ */ I(yn, { children: [
|
|
3669
|
+
/* @__PURE__ */ l("div", { className: qa(), children: /* @__PURE__ */ l(jn, {}) }),
|
|
3670
|
+
/* @__PURE__ */ I("form", { className: "mt-5", onSubmit: u, children: [
|
|
3671
|
+
/* @__PURE__ */ l(Tt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ I(dn, { mode: "dark", children: [
|
|
3804
3672
|
/* @__PURE__ */ l(le, { span: 12, children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3805
3673
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3806
|
-
|
|
3674
|
+
ot,
|
|
3807
3675
|
{
|
|
3808
3676
|
required: !0,
|
|
3809
3677
|
autoCapitalize: "off",
|
|
@@ -3815,7 +3683,7 @@ const Xn = (e) => {
|
|
|
3815
3683
|
label: "Username",
|
|
3816
3684
|
onChange: (c) => {
|
|
3817
3685
|
p({
|
|
3818
|
-
...
|
|
3686
|
+
...m,
|
|
3819
3687
|
username: c.target.value
|
|
3820
3688
|
}), n("");
|
|
3821
3689
|
},
|
|
@@ -3832,12 +3700,12 @@ const Xn = (e) => {
|
|
|
3832
3700
|
mode: "dark",
|
|
3833
3701
|
focusMode: "light",
|
|
3834
3702
|
name: "password",
|
|
3835
|
-
label:
|
|
3836
|
-
rightElement: /* @__PURE__ */ l(qe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(
|
|
3837
|
-
onMaskChange:
|
|
3703
|
+
label: Gn,
|
|
3704
|
+
rightElement: /* @__PURE__ */ l(qe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(pn, {}) : /* @__PURE__ */ l(hn, {}) }),
|
|
3705
|
+
onMaskChange: d,
|
|
3838
3706
|
onChange: (c) => {
|
|
3839
3707
|
p({
|
|
3840
|
-
...
|
|
3708
|
+
...m,
|
|
3841
3709
|
password: c.target.value
|
|
3842
3710
|
}), n("");
|
|
3843
3711
|
},
|
|
@@ -3846,7 +3714,7 @@ const Xn = (e) => {
|
|
|
3846
3714
|
}
|
|
3847
3715
|
) }),
|
|
3848
3716
|
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3849
|
-
|
|
3717
|
+
er,
|
|
3850
3718
|
{
|
|
3851
3719
|
mode: "light",
|
|
3852
3720
|
focusMode: "light",
|
|
@@ -3854,12 +3722,12 @@ const Xn = (e) => {
|
|
|
3854
3722
|
noBorder: !0,
|
|
3855
3723
|
type: "submit",
|
|
3856
3724
|
className: "mb-4 mt-6",
|
|
3857
|
-
children:
|
|
3725
|
+
children: Hn
|
|
3858
3726
|
}
|
|
3859
3727
|
) })
|
|
3860
3728
|
] }) }) }),
|
|
3861
3729
|
/* @__PURE__ */ l("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3862
|
-
/* @__PURE__ */ l(
|
|
3730
|
+
/* @__PURE__ */ l(Tt, { alignHorizontal: "center", children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ l(
|
|
3863
3731
|
qe,
|
|
3864
3732
|
{
|
|
3865
3733
|
mode: "dark",
|
|
@@ -3867,93 +3735,92 @@ const Xn = (e) => {
|
|
|
3867
3735
|
fullWidth: !0,
|
|
3868
3736
|
noBorder: !0,
|
|
3869
3737
|
className: "mb-4 mt-1",
|
|
3870
|
-
labelRight:
|
|
3738
|
+
labelRight: Wn,
|
|
3871
3739
|
onClick: r,
|
|
3872
|
-
children: /* @__PURE__ */ l(
|
|
3740
|
+
children: /* @__PURE__ */ l(mn, { className: "size-7" })
|
|
3873
3741
|
}
|
|
3874
3742
|
) }) })
|
|
3875
3743
|
] })
|
|
3876
3744
|
] }),
|
|
3877
|
-
/* @__PURE__ */ l(
|
|
3745
|
+
/* @__PURE__ */ l(Fn, {})
|
|
3878
3746
|
] });
|
|
3879
|
-
},
|
|
3747
|
+
}, Xn = new URL(document.location.href).searchParams, Qn = !!Xn.get("debug") || !1, Zn = At(
|
|
3880
3748
|
() => import(
|
|
3881
3749
|
/* webpackChunkName: "LazyApp" */
|
|
3882
|
-
"./LazyApp.
|
|
3750
|
+
"./LazyApp.DIxe0fTu.js"
|
|
3883
3751
|
).then((e) => e.LazyApp)
|
|
3884
|
-
),
|
|
3885
|
-
const { isAuthenticated: t } =
|
|
3886
|
-
return t ? /* @__PURE__ */ l(
|
|
3887
|
-
},
|
|
3752
|
+
), eo = ({ isComponent: e }) => {
|
|
3753
|
+
const { isAuthenticated: t } = tt();
|
|
3754
|
+
return t ? /* @__PURE__ */ l(vt, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(Zn, { isComponent: e }) }) : /* @__PURE__ */ l(qn, {});
|
|
3755
|
+
}, to = ({
|
|
3888
3756
|
isComponent: e = !1,
|
|
3889
3757
|
domain: t = ja
|
|
3890
|
-
}) => /* @__PURE__ */ l(fe, { children: /* @__PURE__ */ l(Ua, { clientId: Ka, domain: t, debug:
|
|
3758
|
+
}) => /* @__PURE__ */ l(fe, { children: /* @__PURE__ */ l(Ua, { clientId: Ka, domain: t, debug: Qn, children: /* @__PURE__ */ l(eo, { isComponent: e }) }) }), os = ({ domain: e }) => /* @__PURE__ */ l(to, { isComponent: !0, domain: e });
|
|
3891
3759
|
export {
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3760
|
+
qo as ABOUT_TITLE,
|
|
3761
|
+
So as ACTION_ENGINE,
|
|
3762
|
+
wo as ACTION_MESSAGE,
|
|
3763
|
+
Io as ACTION_MODEL,
|
|
3764
|
+
To as ACTION_RESET,
|
|
3765
|
+
Ro as ACTION_RESET_TAGS,
|
|
3766
|
+
_o as ACTION_RESTORE,
|
|
3767
|
+
Ao as ACTION_SEARCH,
|
|
3768
|
+
xo as ACTION_SET_TAGS,
|
|
3769
|
+
vo as ACTION_SORT,
|
|
3770
|
+
ko as ACTION_STREAMING,
|
|
3771
|
+
No as ACTION_TOGGLE_TAG,
|
|
3904
3772
|
sr as APP_NAME,
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3773
|
+
Yn as AppContext,
|
|
3774
|
+
Fn as AppFooter,
|
|
3775
|
+
er as C,
|
|
3776
|
+
rs as CARDS,
|
|
3777
|
+
Qo as CLIPBOARD_TAG,
|
|
3778
|
+
Ve as DEFAULT_AI_ENGINE,
|
|
3779
|
+
bo as ENGINE_ANTHROPIC,
|
|
3780
|
+
fo as ENGINE_OPENAI,
|
|
3781
|
+
yo as ERROR_MESSAGE,
|
|
3782
|
+
Eo as GPT4_MAX_TOKENS,
|
|
3783
|
+
jo as HISTORY_TITLE,
|
|
3784
|
+
as as HistoryContext,
|
|
3785
|
+
Tt as L,
|
|
3786
|
+
Oo as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3787
|
+
Lo as LOCAL_STORAGE_ENGINE_TOGGLE,
|
|
3788
|
+
Co as LOCAL_STORAGE_PREFIX,
|
|
3789
|
+
Po as LOCAL_STORAGE_SEARCH,
|
|
3790
|
+
Do as LOCAL_STORAGE_SORT,
|
|
3791
|
+
Vo as LOG_OUT,
|
|
3923
3792
|
ue as M,
|
|
3924
|
-
|
|
3925
|
-
|
|
3793
|
+
jn as MessagesContainerHeader,
|
|
3794
|
+
es as NA,
|
|
3926
3795
|
qe as O,
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
Me as g,
|
|
3949
|
-
Yo as getCurrentGeoLocation,
|
|
3796
|
+
Fo as PROFILE_TITLE,
|
|
3797
|
+
dn as R,
|
|
3798
|
+
ho as ROLE_ASSISTANT,
|
|
3799
|
+
go as ROLE_HIDDEN,
|
|
3800
|
+
po as ROLE_INTERNAL,
|
|
3801
|
+
mo as ROLE_SYSTEM,
|
|
3802
|
+
uo as ROLE_USER,
|
|
3803
|
+
Yo as SEND,
|
|
3804
|
+
zo as STATS,
|
|
3805
|
+
Mo as STATS_SEPARATOR,
|
|
3806
|
+
os as SassySaint,
|
|
3807
|
+
ts as TAGS_DESCRIPTION,
|
|
3808
|
+
Zo as TOOLBOX,
|
|
3809
|
+
Xo as TYPE_QUESTION,
|
|
3810
|
+
ns as TagsContext,
|
|
3811
|
+
yn as _,
|
|
3812
|
+
Jo as debounce,
|
|
3813
|
+
Go as durationFormatter,
|
|
3814
|
+
Ko as extractAverage,
|
|
3815
|
+
$e as g,
|
|
3816
|
+
$o as getCurrentGeoLocation,
|
|
3950
3817
|
qa as getMessageContaintWrapperClass,
|
|
3951
|
-
|
|
3818
|
+
mn as i,
|
|
3819
|
+
Ho as isLastMessageFromRole,
|
|
3952
3820
|
le as j,
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
yn as v
|
|
3821
|
+
Wo as numberFormatter,
|
|
3822
|
+
Bo as pluralize,
|
|
3823
|
+
Uo as renderDataAsList,
|
|
3824
|
+
tt as un,
|
|
3825
|
+
ot as ye
|
|
3959
3826
|
};
|