@versini/sassysaint 7.1.5 → 7.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.Cc0p_pSJ.js → App.Dy701JAx.js} +3 -3
- package/dist/chunks/{ChatBubbleAssistant.BVWvPevO.js → ChatBubbleAssistant.rvXLFo_B.js} +3 -3
- package/dist/chunks/{HeaderEntry.D8k-CVJ5.js → HeaderEntry.AcZmU5Vm.js} +4 -4
- package/dist/chunks/{MarkdownWithExtra.B--K8Hs_.js → MarkdownWithExtra.0R-faVRz.js} +2 -2
- package/dist/chunks/{index.Cnd32U9a.js → index.DAXcx2b2.js} +1080 -1047
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import X, { createContext as
|
|
1
|
+
import { jsx as d, jsxs as $, Fragment as Ne } from "react/jsx-runtime";
|
|
2
|
+
import X, { createContext as dr, useReducer as At, useRef as C, useCallback as q, useEffect as G, useContext as Rt, useSyncExternalStore as ur, useLayoutEffect as ve, useMemo as Le, useState as z, useId as Nt, lazy as mr, Suspense as hr } from "react";
|
|
3
3
|
import p from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var pr = Object.defineProperty, fr = (e, t, r) => t in e ? pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, We = (e, t, r) => fr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
|
-
@versini/auth-provider v7.
|
|
6
|
+
@versini/auth-provider v7.5.0
|
|
7
7
|
© 2025 gizmette.com
|
|
8
8
|
*/
|
|
9
9
|
try {
|
|
10
10
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
11
|
-
version: "7.
|
|
12
|
-
buildTime: "02/09/2025
|
|
11
|
+
version: "7.5.0",
|
|
12
|
+
buildTime: "02/09/2025 07:44 PM EST",
|
|
13
13
|
homepage: "https://github.com/aversini/auth-client",
|
|
14
14
|
license: "MIT"
|
|
15
15
|
});
|
|
16
16
|
} catch {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function J(e) {
|
|
19
19
|
const t = new Uint8Array(e);
|
|
20
20
|
let r = "";
|
|
21
21
|
for (const a of t)
|
|
22
22
|
r += String.fromCharCode(a);
|
|
23
23
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function xe(e) {
|
|
26
26
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, a = t.padEnd(t.length + r, "="), n = atob(a), o = new ArrayBuffer(n.length), s = new Uint8Array(o);
|
|
27
27
|
for (let i = 0; i < n.length; i++)
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
@@ -31,93 +31,93 @@ function ve(e) {
|
|
|
31
31
|
function tt() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function vt(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
38
|
-
id:
|
|
38
|
+
id: xe(t),
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function xt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
|
-
let
|
|
45
|
+
let x = 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 gr({ 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 x({
|
|
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 x({
|
|
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 x({
|
|
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 x({
|
|
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 x({
|
|
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 x({
|
|
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 x({
|
|
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 (xt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
|
-
return new
|
|
102
|
+
return new x({
|
|
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 x({
|
|
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 x({
|
|
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 x({
|
|
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 yr {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,118 +141,118 @@ class hr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
if (e && !(
|
|
144
|
+
const Ct = new yr(), br = ["cross-platform", "platform"];
|
|
145
|
+
function Ot(e) {
|
|
146
|
+
if (e && !(br.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
150
|
-
var
|
|
149
|
+
async function Er(e) {
|
|
150
|
+
var m;
|
|
151
151
|
if (!tt())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const t = { publicKey: {
|
|
154
154
|
...e,
|
|
155
|
-
challenge:
|
|
155
|
+
challenge: xe(e.challenge),
|
|
156
156
|
user: {
|
|
157
157
|
...e.user,
|
|
158
|
-
id:
|
|
158
|
+
id: xe(e.user.id)
|
|
159
159
|
},
|
|
160
|
-
excludeCredentials: (
|
|
160
|
+
excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(vt)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = Ct.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
|
-
} catch (
|
|
167
|
-
throw
|
|
166
|
+
} catch (l) {
|
|
167
|
+
throw gr({ error: l, 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 c;
|
|
175
175
|
if (typeof o.getPublicKeyAlgorithm == "function")
|
|
176
176
|
try {
|
|
177
|
-
|
|
178
|
-
} catch (
|
|
179
|
-
Be("getPublicKeyAlgorithm()",
|
|
177
|
+
c = o.getPublicKeyAlgorithm();
|
|
178
|
+
} catch (l) {
|
|
179
|
+
Be("getPublicKeyAlgorithm()", l);
|
|
180
180
|
}
|
|
181
|
-
let
|
|
181
|
+
let f;
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
} catch (
|
|
187
|
-
Be("getPublicKey()",
|
|
184
|
+
const l = o.getPublicKey();
|
|
185
|
+
l !== null && (f = J(l));
|
|
186
|
+
} catch (l) {
|
|
187
|
+
Be("getPublicKey()", l);
|
|
188
188
|
}
|
|
189
|
-
let
|
|
189
|
+
let h;
|
|
190
190
|
if (typeof o.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
|
-
|
|
193
|
-
} catch (
|
|
194
|
-
Be("getAuthenticatorData()",
|
|
192
|
+
h = J(o.getAuthenticatorData());
|
|
193
|
+
} catch (l) {
|
|
194
|
+
Be("getAuthenticatorData()", l);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
197
|
id: a,
|
|
198
|
-
rawId:
|
|
198
|
+
rawId: J(n),
|
|
199
199
|
response: {
|
|
200
|
-
attestationObject:
|
|
201
|
-
clientDataJSON:
|
|
200
|
+
attestationObject: J(o.attestationObject),
|
|
201
|
+
clientDataJSON: J(o.clientDataJSON),
|
|
202
202
|
transports: i,
|
|
203
|
-
publicKeyAlgorithm:
|
|
204
|
-
publicKey:
|
|
205
|
-
authenticatorData:
|
|
203
|
+
publicKeyAlgorithm: c,
|
|
204
|
+
publicKey: f,
|
|
205
|
+
authenticatorData: h
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: Ot(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function Be(e, t) {
|
|
213
213
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function wr() {
|
|
217
217
|
if (!tt())
|
|
218
218
|
return new Promise((t) => t(!1));
|
|
219
219
|
const e = window.PublicKeyCredential;
|
|
220
220
|
return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Ir({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
226
226
|
if (e.name === "AbortError") {
|
|
227
227
|
if (t.signal instanceof AbortSignal)
|
|
228
|
-
return new
|
|
228
|
+
return new x({
|
|
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 x({
|
|
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 (xt(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
|
-
return new
|
|
244
|
+
return new x({
|
|
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 x({
|
|
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 x({
|
|
256
256
|
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
257
257
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
258
258
|
cause: e
|
|
@@ -260,47 +260,47 @@ function yr({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
264
|
-
var
|
|
263
|
+
async function Tr(e, t = !1) {
|
|
264
|
+
var m, l;
|
|
265
265
|
if (!tt())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let r;
|
|
268
|
-
((
|
|
268
|
+
((m = e.allowCredentials) == null ? void 0 : m.length) !== 0 && (r = (l = e.allowCredentials) == null ? void 0 : l.map(vt));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
|
-
challenge:
|
|
271
|
+
challenge: xe(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await wr())
|
|
276
276
|
throw Error("Browser does not support WebAuthn autofill");
|
|
277
277
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
|
|
278
278
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
279
279
|
n.mediation = "conditional", a.allowCredentials = [];
|
|
280
280
|
}
|
|
281
|
-
n.publicKey = a, n.signal =
|
|
281
|
+
n.publicKey = a, n.signal = Ct.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
|
-
} catch (
|
|
286
|
-
throw
|
|
285
|
+
} catch (u) {
|
|
286
|
+
throw Ir({ error: u, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
|
-
const { id: s, rawId: i, response:
|
|
291
|
-
let
|
|
292
|
-
return
|
|
290
|
+
const { id: s, rawId: i, response: c, type: f } = o;
|
|
291
|
+
let h;
|
|
292
|
+
return c.userHandle && (h = J(c.userHandle)), {
|
|
293
293
|
id: s,
|
|
294
|
-
rawId:
|
|
294
|
+
rawId: J(i),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData:
|
|
297
|
-
clientDataJSON:
|
|
298
|
-
signature:
|
|
299
|
-
userHandle:
|
|
296
|
+
authenticatorData: J(c.authenticatorData),
|
|
297
|
+
clientDataJSON: J(c.clientDataJSON),
|
|
298
|
+
signature: J(c.signature),
|
|
299
|
+
userHandle: h
|
|
300
300
|
},
|
|
301
|
-
type:
|
|
301
|
+
type: f,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: Ot(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
@@ -310,20 +310,20 @@ async function br(e, t = !1) {
|
|
|
310
310
|
try {
|
|
311
311
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
312
312
|
version: "4.2.0",
|
|
313
|
-
buildTime: "02/09/2025
|
|
313
|
+
buildTime: "02/09/2025 07:44 PM EST",
|
|
314
314
|
homepage: "https://github.com/aversini/auth-client",
|
|
315
315
|
license: "MIT"
|
|
316
316
|
});
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const he = {
|
|
320
320
|
ID_TOKEN: "id_token",
|
|
321
321
|
ACCESS_TOKEN: "token",
|
|
322
322
|
ID_AND_ACCESS_TOKEN: "id_token token",
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, Pt = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
328
|
}, N = {
|
|
329
329
|
ALG: "RS256",
|
|
@@ -338,7 +338,7 @@ const me = {
|
|
|
338
338
|
SCOPES_KEY: "scopes",
|
|
339
339
|
CLIENT_ID_KEY: "aud",
|
|
340
340
|
ISSUER: "gizmette.com"
|
|
341
|
-
},
|
|
341
|
+
}, Sr = `-----BEGIN PUBLIC KEY-----
|
|
342
342
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
343
343
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
344
344
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -351,129 +351,129 @@ awIDAQAB
|
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
}, Me = crypto,
|
|
355
|
-
function
|
|
354
|
+
}, Me = crypto, Dt = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
|
|
355
|
+
function _r(...e) {
|
|
356
356
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
357
357
|
let a = 0;
|
|
358
358
|
for (const n of e)
|
|
359
359
|
r.set(n, a), a += n.length;
|
|
360
360
|
return r;
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const kr = (e) => {
|
|
363
363
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
364
364
|
for (let a = 0; a < t.length; a++)
|
|
365
365
|
r[a] = t.charCodeAt(a);
|
|
366
366
|
return r;
|
|
367
367
|
}, te = (e) => {
|
|
368
368
|
let t = e;
|
|
369
|
-
t instanceof Uint8Array && (t =
|
|
369
|
+
t instanceof Uint8Array && (t = be.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return kr(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 D = 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 H = class extends
|
|
382
|
+
D.code = "ERR_JOSE_GENERIC";
|
|
383
|
+
let H = class extends D {
|
|
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
388
|
H.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
389
|
-
class Xe extends
|
|
389
|
+
class Xe extends D {
|
|
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
|
Xe.code = "ERR_JWT_EXPIRED";
|
|
395
|
-
class
|
|
395
|
+
class Lt extends D {
|
|
396
396
|
constructor() {
|
|
397
397
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
|
|
401
|
-
let W = class extends
|
|
400
|
+
Lt.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
401
|
+
let W = class extends D {
|
|
402
402
|
constructor() {
|
|
403
403
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
W.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
-
class
|
|
407
|
+
class Ar extends D {
|
|
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
|
+
Ar.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
413
|
+
class Rr extends D {
|
|
414
414
|
constructor() {
|
|
415
415
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
|
|
419
|
-
let
|
|
418
|
+
Rr.code = "ERR_JWE_INVALID";
|
|
419
|
+
let k = class extends D {
|
|
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 V = class extends D {
|
|
426
426
|
constructor() {
|
|
427
427
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
|
|
431
|
-
class
|
|
430
|
+
V.code = "ERR_JWT_INVALID";
|
|
431
|
+
class Nr extends D {
|
|
432
432
|
constructor() {
|
|
433
433
|
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
class
|
|
436
|
+
Nr.code = "ERR_JWK_INVALID";
|
|
437
|
+
class vr extends D {
|
|
438
438
|
constructor() {
|
|
439
439
|
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
class
|
|
442
|
+
vr.code = "ERR_JWKS_INVALID";
|
|
443
|
+
class xr extends D {
|
|
444
444
|
constructor(t = "no applicable key found in the JSON Web Key Set", r) {
|
|
445
445
|
super(t, r), this.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
|
|
449
|
-
class
|
|
448
|
+
xr.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
+
class Cr extends D {
|
|
450
450
|
constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
|
|
451
451
|
super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
|
|
455
|
-
class
|
|
454
|
+
Cr.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
+
class Or extends D {
|
|
456
456
|
constructor(t = "request timed out", r) {
|
|
457
457
|
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
|
|
461
|
-
class
|
|
460
|
+
Or.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
+
class $t extends D {
|
|
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
|
+
$t.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
467
|
function j(e, t = "algorithm.name") {
|
|
468
468
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Ie(e, t) {
|
|
471
471
|
return e.name === t;
|
|
472
472
|
}
|
|
473
473
|
function Ve(e) {
|
|
474
474
|
return parseInt(e.name.slice(4), 10);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Pr(e) {
|
|
477
477
|
switch (e) {
|
|
478
478
|
case "ES256":
|
|
479
479
|
return "P-256";
|
|
@@ -485,7 +485,7 @@ function vr(e) {
|
|
|
485
485
|
throw new Error("unreachable");
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Dr(e, t) {
|
|
489
489
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
490
490
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
491
491
|
if (t.length > 2) {
|
|
@@ -495,12 +495,12 @@ function xr(e, t) {
|
|
|
495
495
|
throw new TypeError(r);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Lr(e, t, ...r) {
|
|
499
499
|
switch (t) {
|
|
500
500
|
case "HS256":
|
|
501
501
|
case "HS384":
|
|
502
502
|
case "HS512": {
|
|
503
|
-
if (!
|
|
503
|
+
if (!Ie(e.algorithm, "HMAC"))
|
|
504
504
|
throw j("HMAC");
|
|
505
505
|
const a = parseInt(t.slice(2), 10);
|
|
506
506
|
if (Ve(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 (!Ie(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
514
514
|
throw j("RSASSA-PKCS1-v1_5");
|
|
515
515
|
const a = parseInt(t.slice(2), 10);
|
|
516
516
|
if (Ve(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 (!Ie(e.algorithm, "RSA-PSS"))
|
|
524
524
|
throw j("RSA-PSS");
|
|
525
525
|
const a = parseInt(t.slice(2), 10);
|
|
526
526
|
if (Ve(e.algorithm.hash) !== a)
|
|
@@ -535,9 +535,9 @@ function Cr(e, t, ...r) {
|
|
|
535
535
|
case "ES256":
|
|
536
536
|
case "ES384":
|
|
537
537
|
case "ES512": {
|
|
538
|
-
if (!
|
|
538
|
+
if (!Ie(e.algorithm, "ECDSA"))
|
|
539
539
|
throw j("ECDSA");
|
|
540
|
-
const a =
|
|
540
|
+
const a = Pr(t);
|
|
541
541
|
if (e.algorithm.namedCurve !== a)
|
|
542
542
|
throw j(a, "algorithm.namedCurve");
|
|
543
543
|
break;
|
|
@@ -545,9 +545,9 @@ function Cr(e, t, ...r) {
|
|
|
545
545
|
default:
|
|
546
546
|
throw new TypeError("CryptoKey does not support this operation");
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
Dr(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 Pt(e, t, ...r) {
|
|
|
555
555
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
556
556
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
557
557
|
}
|
|
558
|
-
const it = (e, ...t) =>
|
|
559
|
-
function
|
|
560
|
-
return
|
|
558
|
+
const it = (e, ...t) => Mt("Key must be ", e, ...t);
|
|
559
|
+
function Ut(e, t, ...r) {
|
|
560
|
+
return Mt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
561
|
}
|
|
562
|
-
const
|
|
562
|
+
const Kt = (e) => Dt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ce = ["CryptoKey"], $r = (...e) => {
|
|
563
563
|
const t = e.filter(Boolean);
|
|
564
564
|
if (t.length === 0 || t.length === 1)
|
|
565
565
|
return !0;
|
|
@@ -578,11 +578,11 @@ const Lt = (e) => xt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
578
578
|
}
|
|
579
579
|
return !0;
|
|
580
580
|
};
|
|
581
|
-
function
|
|
581
|
+
function Mr(e) {
|
|
582
582
|
return typeof e == "object" && e !== null;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
if (!
|
|
584
|
+
function pe(e) {
|
|
585
|
+
if (!Mr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
586
|
return !1;
|
|
587
587
|
if (Object.getPrototypeOf(e) === null)
|
|
588
588
|
return !0;
|
|
@@ -591,26 +591,26 @@ function he(e) {
|
|
|
591
591
|
t = Object.getPrototypeOf(t);
|
|
592
592
|
return Object.getPrototypeOf(e) === t;
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Ur = (e, t) => {
|
|
595
595
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
596
596
|
const { modulusLength: r } = t.algorithm;
|
|
597
597
|
if (typeof r != "number" || r < 2048)
|
|
598
598
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function fe(e) {
|
|
602
|
+
return pe(e) && typeof e.kty == "string";
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Kr(e) {
|
|
605
605
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function Hr(e) {
|
|
608
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
610
|
+
function Wr(e) {
|
|
611
|
+
return fe(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Br(e) {
|
|
614
614
|
let t, r;
|
|
615
615
|
switch (e.kty) {
|
|
616
616
|
case "RSA": {
|
|
@@ -682,36 +682,36 @@ function Ur(e) {
|
|
|
682
682
|
}
|
|
683
683
|
return { algorithm: t, keyUsages: r };
|
|
684
684
|
}
|
|
685
|
-
const
|
|
685
|
+
const Ht = async (e) => {
|
|
686
686
|
if (!e.alg)
|
|
687
687
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
688
|
-
const { algorithm: t, keyUsages: r } =
|
|
688
|
+
const { algorithm: t, keyUsages: r } = Br(e), a = [
|
|
689
689
|
t,
|
|
690
690
|
e.ext ?? !1,
|
|
691
691
|
e.key_ops ?? r
|
|
692
692
|
], n = { ...e };
|
|
693
693
|
return delete n.alg, delete n.use, Me.subtle.importKey("jwk", n, ...a);
|
|
694
|
-
},
|
|
695
|
-
let
|
|
696
|
-
const
|
|
694
|
+
}, Wt = (e) => te(e);
|
|
695
|
+
let se, ie;
|
|
696
|
+
const Bt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Oe = 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 Ht({ ...r, alg: a });
|
|
701
701
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
702
|
-
},
|
|
703
|
-
if (
|
|
702
|
+
}, Vr = (e, t) => {
|
|
703
|
+
if (Bt(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 ? Wt(r.k) : (ie || (ie = /* @__PURE__ */ new WeakMap()), Oe(ie, e, r, t));
|
|
706
706
|
}
|
|
707
|
-
return
|
|
708
|
-
},
|
|
709
|
-
if (
|
|
707
|
+
return fe(e) ? e.k ? te(e.k) : (ie || (ie = /* @__PURE__ */ new WeakMap()), Oe(ie, e, e, t, !0)) : e;
|
|
708
|
+
}, Jr = (e, t) => {
|
|
709
|
+
if (Bt(e)) {
|
|
710
710
|
let r = e.export({ format: "jwk" });
|
|
711
|
-
return r.k ?
|
|
711
|
+
return r.k ? Wt(r.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Oe(se, e, r, t));
|
|
712
712
|
}
|
|
713
|
-
return
|
|
714
|
-
},
|
|
713
|
+
return fe(e) ? e.k ? te(e.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Oe(se, e, e, t, !0)) : e;
|
|
714
|
+
}, Gr = { normalizePublicKey: Vr, normalizePrivateKey: Jr }, ee = (e, t, r = 0) => {
|
|
715
715
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
716
716
|
const a = e.indexOf(t[0], r);
|
|
717
717
|
if (a === -1)
|
|
@@ -737,9 +737,9 @@ const Ut = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
737
737
|
default:
|
|
738
738
|
throw new W("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
739
739
|
}
|
|
740
|
-
},
|
|
740
|
+
}, Yr = 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((c) => c.charCodeAt(0)));
|
|
743
743
|
switch (a) {
|
|
744
744
|
case "PS256":
|
|
745
745
|
case "PS384":
|
|
@@ -773,8 +773,8 @@ const Ut = (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 c = ct(i);
|
|
777
|
+
o = c.startsWith("P-") ? { name: "ECDH", namedCurve: c } : { name: c }, s = [];
|
|
778
778
|
break;
|
|
779
779
|
}
|
|
780
780
|
case "EdDSA":
|
|
@@ -784,14 +784,14 @@ const Ut = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
784
784
|
throw new W('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
785
|
}
|
|
786
786
|
return Me.subtle.importKey(t, i, o, !1, s);
|
|
787
|
-
},
|
|
788
|
-
async function
|
|
787
|
+
}, Fr = (e, t, r) => Yr(/(?:-----(?: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 Fr(e, t);
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
794
|
-
if (!
|
|
793
|
+
async function zr(e, t) {
|
|
794
|
+
if (!pe(e))
|
|
795
795
|
throw new TypeError("JWK must be an object");
|
|
796
796
|
switch (t || (t = e.alg), e.kty) {
|
|
797
797
|
case "oct":
|
|
@@ -803,12 +803,12 @@ async function Gr(e, t) {
|
|
|
803
803
|
throw new W('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
804
804
|
case "EC":
|
|
805
805
|
case "OKP":
|
|
806
|
-
return
|
|
806
|
+
return Ht({ ...e, alg: t });
|
|
807
807
|
default:
|
|
808
808
|
throw new W('Unsupported "kty" (Key Type) Parameter value');
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
const
|
|
811
|
+
const me = (e) => e == null ? void 0 : e[Symbol.toStringTag], Qe = (e, t, r) => {
|
|
812
812
|
var a, n;
|
|
813
813
|
if (t.use !== void 0 && t.use !== "sig")
|
|
814
814
|
throw new TypeError("Invalid key for this operation, when present its use must be sig");
|
|
@@ -817,49 +817,49 @@ const ue = (e) => e == null ? void 0 : e[Symbol.toStringTag], Qe = (e, t, r) =>
|
|
|
817
817
|
if (t.alg !== void 0 && t.alg !== e)
|
|
818
818
|
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
819
819
|
return !0;
|
|
820
|
-
},
|
|
820
|
+
}, qr = (e, t, r, a) => {
|
|
821
821
|
if (!(t instanceof Uint8Array)) {
|
|
822
|
-
if (a &&
|
|
823
|
-
if (
|
|
822
|
+
if (a && fe(t)) {
|
|
823
|
+
if (Wr(t) && Qe(e, t, r))
|
|
824
824
|
return;
|
|
825
825
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
826
826
|
}
|
|
827
|
-
if (!
|
|
828
|
-
throw new TypeError(
|
|
827
|
+
if (!Kt(t))
|
|
828
|
+
throw new TypeError(Ut(e, t, ...Ce, "Uint8Array", a ? "JSON Web Key" : null));
|
|
829
829
|
if (t.type !== "secret")
|
|
830
|
-
throw new TypeError(`${
|
|
830
|
+
throw new TypeError(`${me(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
831
|
}
|
|
832
|
-
},
|
|
833
|
-
if (a &&
|
|
832
|
+
}, Xr = (e, t, r, a) => {
|
|
833
|
+
if (a && fe(t))
|
|
834
834
|
switch (r) {
|
|
835
835
|
case "sign":
|
|
836
|
-
if (
|
|
836
|
+
if (Kr(t) && Qe(e, t, r))
|
|
837
837
|
return;
|
|
838
838
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
839
839
|
case "verify":
|
|
840
|
-
if (
|
|
840
|
+
if (Hr(t) && Qe(e, t, r))
|
|
841
841
|
return;
|
|
842
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
843
843
|
}
|
|
844
|
-
if (!
|
|
845
|
-
throw new TypeError(
|
|
844
|
+
if (!Kt(t))
|
|
845
|
+
throw new TypeError(Ut(e, t, ...Ce, a ? "JSON Web Key" : null));
|
|
846
846
|
if (t.type === "secret")
|
|
847
|
-
throw new TypeError(`${
|
|
847
|
+
throw new TypeError(`${me(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
848
|
if (r === "sign" && t.type === "public")
|
|
849
|
-
throw new TypeError(`${
|
|
849
|
+
throw new TypeError(`${me(t)} instances for asymmetric algorithm signing must be of type "private"`);
|
|
850
850
|
if (r === "decrypt" && t.type === "public")
|
|
851
|
-
throw new TypeError(`${
|
|
851
|
+
throw new TypeError(`${me(t)} instances for asymmetric algorithm decryption must be of type "private"`);
|
|
852
852
|
if (t.algorithm && r === "verify" && t.type === "private")
|
|
853
|
-
throw new TypeError(`${
|
|
853
|
+
throw new TypeError(`${me(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
854
854
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
855
|
-
throw new TypeError(`${
|
|
855
|
+
throw new TypeError(`${me(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
856
856
|
};
|
|
857
|
-
function
|
|
858
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
857
|
+
function Vt(e, t, r, a) {
|
|
858
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? qr(t, r, a, e) : Xr(t, r, a, e);
|
|
859
859
|
}
|
|
860
|
-
|
|
861
|
-
const lt =
|
|
862
|
-
function
|
|
860
|
+
Vt.bind(void 0, !1);
|
|
861
|
+
const lt = Vt.bind(void 0, !0);
|
|
862
|
+
function Qr(e, t, r, a, n) {
|
|
863
863
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
864
864
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
865
865
|
if (!a || a.crit === void 0)
|
|
@@ -878,13 +878,13 @@ function jr(e, t, r, a, n) {
|
|
|
878
878
|
}
|
|
879
879
|
return new Set(a.crit);
|
|
880
880
|
}
|
|
881
|
-
const
|
|
881
|
+
const Zr = (e, t) => {
|
|
882
882
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
883
883
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
884
884
|
if (t)
|
|
885
885
|
return new Set(t);
|
|
886
886
|
};
|
|
887
|
-
function
|
|
887
|
+
function ea(e, t) {
|
|
888
888
|
const r = `SHA-${e.slice(-3)}`;
|
|
889
889
|
switch (e) {
|
|
890
890
|
case "HS256":
|
|
@@ -909,100 +909,100 @@ function qr(e, t) {
|
|
|
909
909
|
throw new W(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
async function
|
|
913
|
-
if (t = await
|
|
914
|
-
return
|
|
912
|
+
async function ta(e, t, r) {
|
|
913
|
+
if (t = await Gr.normalizePublicKey(t, e), Dt(t))
|
|
914
|
+
return Lr(t, e, r), t;
|
|
915
915
|
if (t instanceof Uint8Array) {
|
|
916
916
|
if (!e.startsWith("HS"))
|
|
917
|
-
throw new TypeError(it(t, ...
|
|
917
|
+
throw new TypeError(it(t, ...Ce));
|
|
918
918
|
return Me.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
919
919
|
}
|
|
920
|
-
throw new TypeError(it(t, ...
|
|
920
|
+
throw new TypeError(it(t, ...Ce, "Uint8Array", "JSON Web Key"));
|
|
921
921
|
}
|
|
922
|
-
const
|
|
923
|
-
const n = await
|
|
924
|
-
|
|
925
|
-
const o =
|
|
922
|
+
const ra = async (e, t, r, a) => {
|
|
923
|
+
const n = await ta(e, t, "verify");
|
|
924
|
+
Ur(e, n);
|
|
925
|
+
const o = ea(e, n.algorithm);
|
|
926
926
|
try {
|
|
927
927
|
return await Me.subtle.verify(o, n, r, a);
|
|
928
928
|
} catch {
|
|
929
929
|
return !1;
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
|
-
async function
|
|
933
|
-
if (!
|
|
934
|
-
throw new
|
|
932
|
+
async function aa(e, t, r) {
|
|
933
|
+
if (!pe(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 && !pe(e.header))
|
|
944
|
+
throw new k("JWS Unprotected Header incorrect type");
|
|
945
945
|
let a = {};
|
|
946
946
|
if (e.protected)
|
|
947
947
|
try {
|
|
948
948
|
const y = te(e.protected);
|
|
949
|
-
a = JSON.parse(
|
|
949
|
+
a = JSON.parse(be.decode(y));
|
|
950
950
|
} catch {
|
|
951
|
-
throw new
|
|
951
|
+
throw new k("JWS Protected Header is invalid");
|
|
952
952
|
}
|
|
953
|
-
if (
|
|
954
|
-
throw new
|
|
953
|
+
if (!$r(a, e.header))
|
|
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 =
|
|
958
|
+
}, o = Qr(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 c = Zr("algorithms", r.algorithms);
|
|
966
|
+
if (c && !c.has(i))
|
|
967
|
+
throw new Lt('"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),
|
|
975
|
-
const
|
|
976
|
-
let
|
|
972
|
+
throw new k("JWS Payload must be a string or an Uint8Array instance");
|
|
973
|
+
let f = !1;
|
|
974
|
+
typeof t == "function" ? (t = await t(a, e), f = !0, lt(i, t, "verify"), fe(t) && (t = await zr(t, i))) : lt(i, t, "verify");
|
|
975
|
+
const h = _r(we.encode(e.protected ?? ""), we.encode("."), typeof e.payload == "string" ? we.encode(e.payload) : e.payload);
|
|
976
|
+
let m;
|
|
977
977
|
try {
|
|
978
|
-
|
|
978
|
+
m = te(e.signature);
|
|
979
979
|
} catch {
|
|
980
|
-
throw new
|
|
980
|
+
throw new k("Failed to base64url decode the signature");
|
|
981
981
|
}
|
|
982
|
-
if (!await
|
|
983
|
-
throw new
|
|
984
|
-
let
|
|
982
|
+
if (!await ra(i, t, m, h))
|
|
983
|
+
throw new $t();
|
|
984
|
+
let l;
|
|
985
985
|
if (s)
|
|
986
986
|
try {
|
|
987
|
-
|
|
987
|
+
l = te(e.payload);
|
|
988
988
|
} catch {
|
|
989
|
-
throw new
|
|
989
|
+
throw new k("Failed to base64url decode the payload");
|
|
990
990
|
}
|
|
991
|
-
else typeof e.payload == "string" ?
|
|
992
|
-
const
|
|
993
|
-
return e.protected !== void 0 && (
|
|
991
|
+
else typeof e.payload == "string" ? l = we.encode(e.payload) : l = e.payload;
|
|
992
|
+
const u = { payload: l };
|
|
993
|
+
return e.protected !== void 0 && (u.protectedHeader = a), e.header !== void 0 && (u.unprotectedHeader = e.header), f ? { ...u, key: t } : u;
|
|
994
994
|
}
|
|
995
|
-
async function
|
|
996
|
-
if (e instanceof Uint8Array && (e =
|
|
997
|
-
throw new
|
|
995
|
+
async function na(e, t, r) {
|
|
996
|
+
if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
|
|
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
|
|
1002
|
-
return typeof t == "function" ? { ...
|
|
1000
|
+
throw new k("Invalid Compact JWS");
|
|
1001
|
+
const i = await aa({ payload: n, protected: a, signature: o }, t, r), c = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
1002
|
+
return typeof t == "function" ? { ...c, key: i.key } : c;
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1005
|
-
const t =
|
|
1004
|
+
const oa = (e) => Math.floor(e.getTime() / 1e3), Jt = 60, Gt = Jt * 60, rt = Gt * 24, sa = rt * 7, ia = rt * 365.25, ca = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, dt = (e) => {
|
|
1005
|
+
const t = ca.exec(e);
|
|
1006
1006
|
if (!t || t[4] && t[1])
|
|
1007
1007
|
throw new TypeError("Invalid time period format");
|
|
1008
1008
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -1020,14 +1020,14 @@ const ta = (e) => Math.floor(e.getTime() / 1e3), Ht = 60, Wt = Ht * 60, rt = Wt
|
|
|
1020
1020
|
case "min":
|
|
1021
1021
|
case "mins":
|
|
1022
1022
|
case "m":
|
|
1023
|
-
n = Math.round(r *
|
|
1023
|
+
n = Math.round(r * Jt);
|
|
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 * Gt);
|
|
1031
1031
|
break;
|
|
1032
1032
|
case "day":
|
|
1033
1033
|
case "days":
|
|
@@ -1037,185 +1037,185 @@ const ta = (e) => Math.floor(e.getTime() / 1e3), Ht = 60, Wt = Ht * 60, rt = Wt
|
|
|
1037
1037
|
case "week":
|
|
1038
1038
|
case "weeks":
|
|
1039
1039
|
case "w":
|
|
1040
|
-
n = Math.round(r *
|
|
1040
|
+
n = Math.round(r * sa);
|
|
1041
1041
|
break;
|
|
1042
1042
|
default:
|
|
1043
|
-
n = Math.round(r *
|
|
1043
|
+
n = Math.round(r * ia);
|
|
1044
1044
|
break;
|
|
1045
1045
|
}
|
|
1046
1046
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1047
|
-
}, ut = (e) => e.toLowerCase().replace(/^application\//, ""),
|
|
1047
|
+
}, ut = (e) => e.toLowerCase().replace(/^application\//, ""), la = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, da = (e, t, r = {}) => {
|
|
1048
1048
|
let a;
|
|
1049
1049
|
try {
|
|
1050
|
-
a = JSON.parse(
|
|
1050
|
+
a = JSON.parse(be.decode(t));
|
|
1051
1051
|
} catch {
|
|
1052
1052
|
}
|
|
1053
|
-
if (!
|
|
1054
|
-
throw new
|
|
1053
|
+
if (!pe(a))
|
|
1054
|
+
throw new V("JWT Claims Set must be a top-level JSON object");
|
|
1055
1055
|
const { typ: n } = r;
|
|
1056
1056
|
if (n && (typeof e.typ != "string" || ut(e.typ) !== ut(n)))
|
|
1057
1057
|
throw new H('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1058
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience:
|
|
1059
|
-
|
|
1060
|
-
for (const y of new Set(
|
|
1058
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: c, maxTokenAge: f } = r, h = [...o];
|
|
1059
|
+
f !== void 0 && h.push("iat"), c !== void 0 && h.push("aud"), i !== void 0 && h.push("sub"), s !== void 0 && h.push("iss");
|
|
1060
|
+
for (const y of new Set(h.reverse()))
|
|
1061
1061
|
if (!(y in a))
|
|
1062
1062
|
throw new H(`missing required "${y}" claim`, a, y, "missing");
|
|
1063
1063
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
1064
1064
|
throw new H('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1065
1065
|
if (i && a.sub !== i)
|
|
1066
1066
|
throw new H('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1067
|
-
if (
|
|
1067
|
+
if (c && !la(a.aud, typeof c == "string" ? [c] : c))
|
|
1068
1068
|
throw new H('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1069
|
-
let
|
|
1069
|
+
let m;
|
|
1070
1070
|
switch (typeof r.clockTolerance) {
|
|
1071
1071
|
case "string":
|
|
1072
|
-
|
|
1072
|
+
m = dt(r.clockTolerance);
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "number":
|
|
1075
|
-
|
|
1075
|
+
m = r.clockTolerance;
|
|
1076
1076
|
break;
|
|
1077
1077
|
case "undefined":
|
|
1078
|
-
|
|
1078
|
+
m = 0;
|
|
1079
1079
|
break;
|
|
1080
1080
|
default:
|
|
1081
1081
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1082
1082
|
}
|
|
1083
|
-
const { currentDate:
|
|
1084
|
-
if ((a.iat !== void 0 ||
|
|
1083
|
+
const { currentDate: l } = r, u = oa(l || /* @__PURE__ */ new Date());
|
|
1084
|
+
if ((a.iat !== void 0 || f) && typeof a.iat != "number")
|
|
1085
1085
|
throw new H('"iat" claim must be a number', a, "iat", "invalid");
|
|
1086
1086
|
if (a.nbf !== void 0) {
|
|
1087
1087
|
if (typeof a.nbf != "number")
|
|
1088
1088
|
throw new H('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1089
|
-
if (a.nbf >
|
|
1089
|
+
if (a.nbf > u + m)
|
|
1090
1090
|
throw new H('"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
1094
|
throw new H('"exp" claim must be a number', a, "exp", "invalid");
|
|
1095
|
-
if (a.exp <=
|
|
1095
|
+
if (a.exp <= u - m)
|
|
1096
1096
|
throw new Xe('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1097
1097
|
}
|
|
1098
|
-
if (
|
|
1099
|
-
const y =
|
|
1100
|
-
if (y -
|
|
1098
|
+
if (f) {
|
|
1099
|
+
const y = u - a.iat, E = typeof f == "number" ? f : dt(f);
|
|
1100
|
+
if (y - m > E)
|
|
1101
1101
|
throw new Xe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1102
|
-
if (y < 0 -
|
|
1102
|
+
if (y < 0 - m)
|
|
1103
1103
|
throw new H('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
1104
1104
|
}
|
|
1105
1105
|
return a;
|
|
1106
1106
|
};
|
|
1107
|
-
async function
|
|
1107
|
+
async function ua(e, t, r) {
|
|
1108
1108
|
var a;
|
|
1109
|
-
const n = await
|
|
1109
|
+
const n = await na(e, t, r);
|
|
1110
1110
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1111
|
-
throw new
|
|
1112
|
-
const o = { payload:
|
|
1111
|
+
throw new V("JWTs MUST NOT use unencoded payload");
|
|
1112
|
+
const o = { payload: da(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1113
1113
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1116
|
-
function
|
|
1115
|
+
const ma = te;
|
|
1116
|
+
function ha(e) {
|
|
1117
1117
|
if (typeof e != "string")
|
|
1118
|
-
throw new
|
|
1118
|
+
throw new V("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 V("Only JWTs using Compact JWS serialization can be decoded");
|
|
1122
1122
|
if (r !== 3)
|
|
1123
|
-
throw new
|
|
1123
|
+
throw new V("Invalid JWT");
|
|
1124
1124
|
if (!t)
|
|
1125
|
-
throw new
|
|
1125
|
+
throw new V("JWTs must contain a payload");
|
|
1126
1126
|
let a;
|
|
1127
1127
|
try {
|
|
1128
|
-
a =
|
|
1128
|
+
a = ma(t);
|
|
1129
1129
|
} catch {
|
|
1130
|
-
throw new
|
|
1130
|
+
throw new V("Failed to base64url decode the payload");
|
|
1131
1131
|
}
|
|
1132
1132
|
let n;
|
|
1133
1133
|
try {
|
|
1134
|
-
n = JSON.parse(
|
|
1134
|
+
n = JSON.parse(be.decode(a));
|
|
1135
1135
|
} catch {
|
|
1136
|
-
throw new
|
|
1136
|
+
throw new V("Failed to parse the decoded payload as JSON");
|
|
1137
1137
|
}
|
|
1138
|
-
if (!
|
|
1139
|
-
throw new
|
|
1138
|
+
if (!pe(n))
|
|
1139
|
+
throw new V("Invalid JWT Claims Set");
|
|
1140
1140
|
return n;
|
|
1141
1141
|
}
|
|
1142
|
-
const
|
|
1142
|
+
const ye = async (e) => {
|
|
1143
1143
|
try {
|
|
1144
|
-
const t = N.ALG, r = await
|
|
1145
|
-
return await
|
|
1144
|
+
const t = N.ALG, r = await jr(Sr, t);
|
|
1145
|
+
return await ua(e, r, {
|
|
1146
1146
|
issuer: N.ISSUER
|
|
1147
1147
|
});
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, pa = (e) => {
|
|
1152
1152
|
try {
|
|
1153
|
-
return
|
|
1153
|
+
return ha(e);
|
|
1154
1154
|
} catch {
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
}, A = [];
|
|
1158
1158
|
for (let e = 0; e < 256; ++e)
|
|
1159
1159
|
A.push((e + 256).toString(16).slice(1));
|
|
1160
|
-
function
|
|
1160
|
+
function fa(e, t = 0) {
|
|
1161
1161
|
return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
|
|
1162
1162
|
}
|
|
1163
1163
|
let Je;
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1164
|
+
const ga = new Uint8Array(16);
|
|
1165
|
+
function ya() {
|
|
1166
1166
|
if (!Je) {
|
|
1167
1167
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1168
1168
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1169
1169
|
Je = crypto.getRandomValues.bind(crypto);
|
|
1170
1170
|
}
|
|
1171
|
-
return Je(
|
|
1171
|
+
return Je(ga);
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1173
|
+
const ba = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: ba };
|
|
1174
1174
|
function ht(e, t, r) {
|
|
1175
1175
|
if (mt.randomUUID && !e)
|
|
1176
1176
|
return mt.randomUUID();
|
|
1177
1177
|
e = e || {};
|
|
1178
|
-
const a = e.random || (e.rng ||
|
|
1179
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1178
|
+
const a = e.random || (e.rng || ya)();
|
|
1179
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, fa(a);
|
|
1180
1180
|
}
|
|
1181
|
-
const pt = globalThis.crypto,
|
|
1181
|
+
const pt = globalThis.crypto, Ea = (e) => `${ht()}${ht()}`.slice(0, e), wa = (e) => btoa(
|
|
1182
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
1183
|
);
|
|
1184
|
-
async function
|
|
1184
|
+
async function Ia(e) {
|
|
1185
1185
|
if (!pt.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
1189
|
const t = new TextEncoder().encode(e), r = await pt.subtle.digest("SHA-256", t);
|
|
1190
|
-
return
|
|
1190
|
+
return wa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
1191
|
}
|
|
1192
|
-
async function
|
|
1193
|
-
const t =
|
|
1192
|
+
async function Ta(e) {
|
|
1193
|
+
const t = Ea(43), r = await Ia(t);
|
|
1194
1194
|
return {
|
|
1195
1195
|
code_verifier: t,
|
|
1196
1196
|
code_challenge: r
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Yt(e, t) {
|
|
1200
1200
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1201
1201
|
}
|
|
1202
1202
|
const ft = (e, t) => {
|
|
1203
1203
|
const r = JSON.stringify(
|
|
1204
1204
|
typeof t == "function" ? t() : t
|
|
1205
1205
|
);
|
|
1206
|
-
window.localStorage.setItem(e, r),
|
|
1207
|
-
},
|
|
1208
|
-
window.localStorage.removeItem(e),
|
|
1209
|
-
}, gt = (e) => window.localStorage.getItem(e),
|
|
1206
|
+
window.localStorage.setItem(e, r), Yt(e, r);
|
|
1207
|
+
}, Sa = (e) => {
|
|
1208
|
+
window.localStorage.removeItem(e), Yt(e, null);
|
|
1209
|
+
}, gt = (e) => window.localStorage.getItem(e), _a = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1210
1210
|
function Te({
|
|
1211
1211
|
key: e,
|
|
1212
1212
|
initialValue: t
|
|
1213
1213
|
}) {
|
|
1214
|
-
const r =
|
|
1214
|
+
const r = ur(_a, () => gt(e)), a = q(
|
|
1215
1215
|
(s) => {
|
|
1216
1216
|
try {
|
|
1217
1217
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1218
|
-
i == null ?
|
|
1218
|
+
i == null ? Sa(e) : ft(e, i);
|
|
1219
1219
|
} catch (i) {
|
|
1220
1220
|
console.warn(i);
|
|
1221
1221
|
}
|
|
@@ -1226,7 +1226,7 @@ function Te({
|
|
|
1226
1226
|
}, [t, a]), o = q(() => {
|
|
1227
1227
|
a(null);
|
|
1228
1228
|
}, [a]);
|
|
1229
|
-
return
|
|
1229
|
+
return G(() => {
|
|
1230
1230
|
try {
|
|
1231
1231
|
gt(e) === null && typeof t < "u" && ft(e, t);
|
|
1232
1232
|
} catch (s) {
|
|
@@ -1237,28 +1237,28 @@ function Te({
|
|
|
1237
1237
|
const R = [];
|
|
1238
1238
|
for (let e = 0; e < 256; ++e)
|
|
1239
1239
|
R.push((e + 256).toString(16).slice(1));
|
|
1240
|
-
function
|
|
1240
|
+
function ka(e, t = 0) {
|
|
1241
1241
|
return (R[e[t + 0]] + R[e[t + 1]] + R[e[t + 2]] + R[e[t + 3]] + "-" + R[e[t + 4]] + R[e[t + 5]] + "-" + R[e[t + 6]] + R[e[t + 7]] + "-" + R[e[t + 8]] + R[e[t + 9]] + "-" + R[e[t + 10]] + R[e[t + 11]] + R[e[t + 12]] + R[e[t + 13]] + R[e[t + 14]] + R[e[t + 15]]).toLowerCase();
|
|
1242
1242
|
}
|
|
1243
1243
|
let Ge;
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1244
|
+
const Aa = new Uint8Array(16);
|
|
1245
|
+
function Ra() {
|
|
1246
1246
|
if (!Ge) {
|
|
1247
1247
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
1248
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
1249
|
Ge = crypto.getRandomValues.bind(crypto);
|
|
1250
1250
|
}
|
|
1251
|
-
return Ge(
|
|
1251
|
+
return Ge(Aa);
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1253
|
+
const Na = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: Na };
|
|
1254
1254
|
function Ye(e, t, r) {
|
|
1255
1255
|
if (yt.randomUUID && !e)
|
|
1256
1256
|
return yt.randomUUID();
|
|
1257
1257
|
e = e || {};
|
|
1258
|
-
const a = e.random || (e.rng ||
|
|
1259
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1258
|
+
const a = e.random || (e.rng || Ra)();
|
|
1259
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ka(a);
|
|
1260
1260
|
}
|
|
1261
|
-
const
|
|
1261
|
+
const ce = "Your session has expired. For your security, please log in again to continue.", va = "Your session has been successfully terminated.", Fe = "Login failed. Please try again.", xa = "Error getting access token, please re-authenticate.", Ca = "You forgot to wrap your component in <AuthProvider>.", Se = "@@auth@@", ge = "LOADING", Ae = "LOGIN", Ft = "LOGOUT", Ee = "success", Y = "failure", jt = "include", zt = "POST", qt = "application/json", _e = {
|
|
1262
1262
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1263
1263
|
$clientId: String!,
|
|
1264
1264
|
$username: String!,
|
|
@@ -1339,111 +1339,106 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1339
1339
|
email
|
|
1340
1340
|
}
|
|
1341
1341
|
}`
|
|
1342
|
-
},
|
|
1342
|
+
}, le = {
|
|
1343
1343
|
GET_REGISTRATION_OPTIONS: {
|
|
1344
|
-
schema:
|
|
1344
|
+
schema: _e.GET_REGISTRATION_OPTIONS,
|
|
1345
1345
|
method: "getPasskeyRegistrationOptions"
|
|
1346
1346
|
},
|
|
1347
1347
|
VERIFY_REGISTRATION: {
|
|
1348
|
-
schema:
|
|
1348
|
+
schema: _e.VERIFY_REGISTRATION,
|
|
1349
1349
|
method: "verifyPasskeyRegistration"
|
|
1350
1350
|
},
|
|
1351
1351
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1352
|
-
schema:
|
|
1352
|
+
schema: _e.GET_AUTHENTICATION_OPTIONS,
|
|
1353
1353
|
method: "getPasskeyAuthenticationOptions"
|
|
1354
1354
|
},
|
|
1355
1355
|
VERIFY_AUTHENTICATION: {
|
|
1356
|
-
schema:
|
|
1356
|
+
schema: _e.VERIFY_AUTHENTICATION,
|
|
1357
1357
|
method: "verifyPasskeyAuthentication"
|
|
1358
1358
|
}
|
|
1359
|
-
},
|
|
1359
|
+
}, de = async ({
|
|
1360
1360
|
accessToken: e,
|
|
1361
1361
|
type: t,
|
|
1362
1362
|
clientId: r,
|
|
1363
|
-
params: a = {}
|
|
1363
|
+
params: a = {},
|
|
1364
|
+
endpoint: n
|
|
1364
1365
|
}) => {
|
|
1365
1366
|
try {
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
}
|
|
1381
|
-
);
|
|
1382
|
-
if (o.status !== 200)
|
|
1383
|
-
return { status: F, data: [] };
|
|
1384
|
-
const { data: s } = await o.json();
|
|
1367
|
+
const o = `Bearer ${e}`, s = await fetch(`${n}/graphql`, {
|
|
1368
|
+
credentials: jt,
|
|
1369
|
+
method: zt,
|
|
1370
|
+
headers: {
|
|
1371
|
+
authorization: o,
|
|
1372
|
+
"Content-Type": qt,
|
|
1373
|
+
[Pt.CLIENT_ID]: `${r}`
|
|
1374
|
+
},
|
|
1375
|
+
body: JSON.stringify({
|
|
1376
|
+
query: t.schema,
|
|
1377
|
+
variables: a
|
|
1378
|
+
})
|
|
1379
|
+
});
|
|
1380
|
+
if (s.status !== 200)
|
|
1381
|
+
return { status: Y, data: [] };
|
|
1382
|
+
const { data: i } = await s.json();
|
|
1385
1383
|
return {
|
|
1386
|
-
status:
|
|
1387
|
-
data:
|
|
1384
|
+
status: Ee,
|
|
1385
|
+
data: i[t.method]
|
|
1388
1386
|
};
|
|
1389
|
-
} catch (
|
|
1390
|
-
return console.error(
|
|
1387
|
+
} catch (o) {
|
|
1388
|
+
return console.error(o), { status: Y, data: [] };
|
|
1391
1389
|
}
|
|
1392
1390
|
}, Ue = async ({
|
|
1393
1391
|
type: e,
|
|
1394
1392
|
clientId: t,
|
|
1395
|
-
params: r = {}
|
|
1393
|
+
params: r = {},
|
|
1394
|
+
endpoint: a
|
|
1396
1395
|
}) => {
|
|
1397
1396
|
try {
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
}
|
|
1409
|
-
);
|
|
1410
|
-
if (a.status !== 200)
|
|
1411
|
-
return { status: F, data: [] };
|
|
1412
|
-
const { data: n } = await a.json();
|
|
1397
|
+
const n = await fetch(`${a}/${e}`, {
|
|
1398
|
+
credentials: jt,
|
|
1399
|
+
method: zt,
|
|
1400
|
+
headers: {
|
|
1401
|
+
"Content-Type": qt,
|
|
1402
|
+
[Pt.CLIENT_ID]: `${t}`
|
|
1403
|
+
},
|
|
1404
|
+
body: JSON.stringify(r)
|
|
1405
|
+
});
|
|
1406
|
+
if (n.status !== 200)
|
|
1407
|
+
return { status: Y, data: [] };
|
|
1408
|
+
const { data: o } = await n.json();
|
|
1413
1409
|
return {
|
|
1414
|
-
status:
|
|
1415
|
-
data:
|
|
1410
|
+
status: Ee,
|
|
1411
|
+
data: o || []
|
|
1416
1412
|
};
|
|
1417
|
-
} catch (
|
|
1418
|
-
return console.error(
|
|
1413
|
+
} catch (n) {
|
|
1414
|
+
return console.error(n), { status: Y, data: [] };
|
|
1419
1415
|
}
|
|
1420
|
-
},
|
|
1421
|
-
dev: process.env.PUBLIC_AUTH_SERVER_URL || "https://auth.gizmette.local.com:3003",
|
|
1422
|
-
prod: "https://mylogin.gizmette.com/auth"
|
|
1423
|
-
}, jt = {
|
|
1416
|
+
}, Oa = process.env.NODE_ENV === "production", Pa = !Oa, Xt = {
|
|
1424
1417
|
isLoading: !0,
|
|
1425
1418
|
isAuthenticated: !1,
|
|
1426
1419
|
user: void 0,
|
|
1427
1420
|
logoutReason: "",
|
|
1428
1421
|
debug: !1,
|
|
1429
1422
|
authenticationType: ""
|
|
1430
|
-
},
|
|
1423
|
+
}, Da = (e) => {
|
|
1431
1424
|
try {
|
|
1432
|
-
const t =
|
|
1425
|
+
const t = pa(e);
|
|
1433
1426
|
return t ? t[N.USER_ID_KEY] : "";
|
|
1434
1427
|
} catch {
|
|
1435
1428
|
return "";
|
|
1436
1429
|
}
|
|
1437
|
-
},
|
|
1430
|
+
}, La = async ({
|
|
1438
1431
|
userId: e,
|
|
1439
1432
|
clientId: t,
|
|
1440
1433
|
domain: r,
|
|
1441
|
-
idToken: a = ""
|
|
1434
|
+
idToken: a = "",
|
|
1435
|
+
endpoint: n
|
|
1442
1436
|
}) => {
|
|
1443
|
-
var
|
|
1437
|
+
var o;
|
|
1444
1438
|
try {
|
|
1445
1439
|
return {
|
|
1446
|
-
status: ((
|
|
1440
|
+
status: ((o = await Ue({
|
|
1441
|
+
endpoint: n,
|
|
1447
1442
|
type: $e.LOGOUT,
|
|
1448
1443
|
clientId: t,
|
|
1449
1444
|
params: {
|
|
@@ -1451,14 +1446,14 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1451
1446
|
domain: r,
|
|
1452
1447
|
idToken: a
|
|
1453
1448
|
}
|
|
1454
|
-
})) == null ? void 0 :
|
|
1449
|
+
})) == null ? void 0 : o.status) || Y
|
|
1455
1450
|
};
|
|
1456
1451
|
} catch {
|
|
1457
1452
|
return {
|
|
1458
|
-
status:
|
|
1453
|
+
status: Y
|
|
1459
1454
|
};
|
|
1460
1455
|
}
|
|
1461
|
-
},
|
|
1456
|
+
}, $a = async ({
|
|
1462
1457
|
username: e,
|
|
1463
1458
|
password: t,
|
|
1464
1459
|
clientId: r,
|
|
@@ -1467,32 +1462,34 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1467
1462
|
sessionExpiration: o,
|
|
1468
1463
|
code: s,
|
|
1469
1464
|
code_verifier: i,
|
|
1470
|
-
domain:
|
|
1471
|
-
ua:
|
|
1465
|
+
domain: c,
|
|
1466
|
+
ua: f,
|
|
1467
|
+
endpoint: h
|
|
1472
1468
|
}) => {
|
|
1473
|
-
var
|
|
1469
|
+
var m;
|
|
1474
1470
|
try {
|
|
1475
|
-
const
|
|
1471
|
+
const l = await Ue({
|
|
1472
|
+
endpoint: h,
|
|
1476
1473
|
type: $e.LOGIN,
|
|
1477
1474
|
clientId: r,
|
|
1478
1475
|
params: {
|
|
1479
|
-
type: n ||
|
|
1476
|
+
type: n || he.ID_AND_ACCESS_TOKEN,
|
|
1480
1477
|
username: e,
|
|
1481
1478
|
password: t,
|
|
1482
1479
|
sessionExpiration: o,
|
|
1483
1480
|
nonce: a,
|
|
1484
1481
|
code: s,
|
|
1485
1482
|
code_verifier: i,
|
|
1486
|
-
domain:
|
|
1487
|
-
ua:
|
|
1483
|
+
domain: c,
|
|
1484
|
+
ua: f
|
|
1488
1485
|
}
|
|
1489
|
-
}),
|
|
1490
|
-
return
|
|
1491
|
-
idToken:
|
|
1492
|
-
accessToken:
|
|
1493
|
-
refreshToken:
|
|
1494
|
-
userId:
|
|
1495
|
-
email:
|
|
1486
|
+
}), u = await ye((m = l == null ? void 0 : l.data) == null ? void 0 : m.idToken);
|
|
1487
|
+
return u && u.payload[N.USER_ID_KEY] !== "" && u.payload[N.NONCE_KEY] === a ? {
|
|
1488
|
+
idToken: l.data.idToken,
|
|
1489
|
+
accessToken: l.data.accessToken,
|
|
1490
|
+
refreshToken: l.data.refreshToken,
|
|
1491
|
+
userId: u.payload[N.USER_ID_KEY],
|
|
1492
|
+
email: u.payload[N.EMAIL_KEY],
|
|
1496
1493
|
status: !0
|
|
1497
1494
|
} : {
|
|
1498
1495
|
status: !1
|
|
@@ -1502,61 +1499,65 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1502
1499
|
status: !1
|
|
1503
1500
|
};
|
|
1504
1501
|
}
|
|
1505
|
-
},
|
|
1502
|
+
}, Ma = async ({
|
|
1506
1503
|
nonce: e,
|
|
1507
1504
|
clientId: t,
|
|
1508
|
-
code_challenge: r
|
|
1505
|
+
code_challenge: r,
|
|
1506
|
+
endpoint: a
|
|
1509
1507
|
}) => {
|
|
1510
|
-
var
|
|
1508
|
+
var n;
|
|
1511
1509
|
try {
|
|
1512
|
-
const
|
|
1510
|
+
const o = await Ue({
|
|
1511
|
+
endpoint: a,
|
|
1513
1512
|
type: $e.CODE,
|
|
1514
1513
|
clientId: t,
|
|
1515
1514
|
params: {
|
|
1516
|
-
type:
|
|
1515
|
+
type: he.CODE,
|
|
1517
1516
|
nonce: e,
|
|
1518
1517
|
code_challenge: r
|
|
1519
1518
|
}
|
|
1520
1519
|
});
|
|
1521
|
-
return (
|
|
1522
|
-
status:
|
|
1523
|
-
data:
|
|
1520
|
+
return (n = o == null ? void 0 : o.data) != null && n.code ? {
|
|
1521
|
+
status: Ee,
|
|
1522
|
+
data: o.data.code
|
|
1524
1523
|
} : {
|
|
1525
|
-
status:
|
|
1524
|
+
status: Y,
|
|
1526
1525
|
data: ""
|
|
1527
1526
|
};
|
|
1528
1527
|
} catch {
|
|
1529
1528
|
return {
|
|
1530
|
-
status:
|
|
1529
|
+
status: Y,
|
|
1531
1530
|
data: ""
|
|
1532
1531
|
};
|
|
1533
1532
|
}
|
|
1534
|
-
},
|
|
1533
|
+
}, Ua = async ({
|
|
1535
1534
|
clientId: e,
|
|
1536
1535
|
userId: t,
|
|
1537
1536
|
nonce: r,
|
|
1538
1537
|
refreshToken: a,
|
|
1539
1538
|
accessToken: n,
|
|
1540
|
-
domain: o
|
|
1539
|
+
domain: o,
|
|
1540
|
+
endpoint: s
|
|
1541
1541
|
}) => {
|
|
1542
|
-
var
|
|
1542
|
+
var i;
|
|
1543
1543
|
try {
|
|
1544
|
-
const
|
|
1544
|
+
const c = await Ue({
|
|
1545
|
+
endpoint: s,
|
|
1545
1546
|
type: $e.REFRESH,
|
|
1546
1547
|
clientId: e,
|
|
1547
1548
|
params: {
|
|
1548
|
-
type:
|
|
1549
|
+
type: he.REFRESH_TOKEN,
|
|
1549
1550
|
userId: t,
|
|
1550
1551
|
nonce: r,
|
|
1551
1552
|
refreshToken: a,
|
|
1552
1553
|
accessToken: n,
|
|
1553
1554
|
domain: o
|
|
1554
1555
|
}
|
|
1555
|
-
}),
|
|
1556
|
-
return
|
|
1557
|
-
accessToken:
|
|
1558
|
-
refreshToken:
|
|
1559
|
-
userId:
|
|
1556
|
+
}), f = await ye((i = c == null ? void 0 : c.data) == null ? void 0 : i.accessToken);
|
|
1557
|
+
return f && f.payload[N.USER_ID_KEY] !== "" && f.payload[N.NONCE_KEY] === r ? {
|
|
1558
|
+
accessToken: c.data.accessToken,
|
|
1559
|
+
refreshToken: c.data.refreshToken,
|
|
1560
|
+
userId: f.payload[N.USER_ID_KEY],
|
|
1560
1561
|
status: !0
|
|
1561
1562
|
} : {
|
|
1562
1563
|
status: !1
|
|
@@ -1567,7 +1568,7 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1567
1568
|
};
|
|
1568
1569
|
}
|
|
1569
1570
|
};
|
|
1570
|
-
class
|
|
1571
|
+
class Ka {
|
|
1571
1572
|
constructor(t = null, r = null) {
|
|
1572
1573
|
We(this, "refreshTokenPromise", null), We(this, "accessToken"), We(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1573
1574
|
}
|
|
@@ -1575,9 +1576,11 @@ class Da {
|
|
|
1575
1576
|
clientId: t,
|
|
1576
1577
|
userId: r,
|
|
1577
1578
|
nonce: a,
|
|
1578
|
-
domain: n
|
|
1579
|
+
domain: n,
|
|
1580
|
+
endpoint: o
|
|
1579
1581
|
}) {
|
|
1580
1582
|
this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
|
|
1583
|
+
endpoint: o,
|
|
1581
1584
|
clientId: t,
|
|
1582
1585
|
userId: r,
|
|
1583
1586
|
nonce: a,
|
|
@@ -1590,136 +1593,148 @@ class Da {
|
|
|
1590
1593
|
}
|
|
1591
1594
|
}
|
|
1592
1595
|
async _refreshToken({
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1596
|
+
endpoint: t,
|
|
1597
|
+
clientId: r,
|
|
1598
|
+
userId: a,
|
|
1599
|
+
nonce: n,
|
|
1600
|
+
domain: o
|
|
1597
1601
|
}) {
|
|
1598
|
-
const
|
|
1599
|
-
if (
|
|
1600
|
-
const
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1602
|
+
const s = await ye(this.refreshToken);
|
|
1603
|
+
if (s && s.payload[N.USER_ID_KEY] !== "") {
|
|
1604
|
+
const i = await Ua({
|
|
1605
|
+
endpoint: t,
|
|
1606
|
+
clientId: r,
|
|
1607
|
+
userId: a,
|
|
1608
|
+
nonce: n,
|
|
1604
1609
|
refreshToken: this.refreshToken,
|
|
1605
1610
|
accessToken: this.accessToken,
|
|
1606
|
-
domain:
|
|
1611
|
+
domain: o
|
|
1607
1612
|
});
|
|
1608
|
-
return
|
|
1609
|
-
status:
|
|
1610
|
-
newAccessToken:
|
|
1611
|
-
newRefreshToken:
|
|
1613
|
+
return i.status ? (this.accessToken = i.accessToken, this.refreshToken = i.refreshToken, {
|
|
1614
|
+
status: Ee,
|
|
1615
|
+
newAccessToken: i.accessToken,
|
|
1616
|
+
newRefreshToken: i.refreshToken
|
|
1612
1617
|
}) : {
|
|
1613
|
-
status:
|
|
1618
|
+
status: Y
|
|
1614
1619
|
};
|
|
1615
1620
|
} else
|
|
1616
1621
|
return {
|
|
1617
|
-
status:
|
|
1622
|
+
status: Y
|
|
1618
1623
|
};
|
|
1619
1624
|
}
|
|
1620
1625
|
}
|
|
1621
|
-
const
|
|
1626
|
+
const Ha = (e) => q(
|
|
1622
1627
|
(...t) => {
|
|
1623
1628
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1624
1629
|
},
|
|
1625
1630
|
[e]
|
|
1626
|
-
),
|
|
1627
|
-
throw new Error(
|
|
1628
|
-
},
|
|
1631
|
+
), ue = () => {
|
|
1632
|
+
throw new Error(Ca);
|
|
1633
|
+
}, Qt = dr({
|
|
1629
1634
|
isAuthenticated: !1,
|
|
1630
1635
|
isLoading: !1,
|
|
1631
|
-
login:
|
|
1632
|
-
logout:
|
|
1633
|
-
getAccessToken:
|
|
1634
|
-
getIdToken:
|
|
1635
|
-
registeringForPasskey:
|
|
1636
|
-
loginWithPasskey:
|
|
1636
|
+
login: ue,
|
|
1637
|
+
logout: ue,
|
|
1638
|
+
getAccessToken: ue,
|
|
1639
|
+
getIdToken: ue,
|
|
1640
|
+
registeringForPasskey: ue,
|
|
1641
|
+
loginWithPasskey: ue,
|
|
1637
1642
|
logoutReason: "",
|
|
1638
1643
|
authenticationType: ""
|
|
1639
|
-
}),
|
|
1640
|
-
state:
|
|
1644
|
+
}), Wa = X.createContext({
|
|
1645
|
+
state: Xt,
|
|
1641
1646
|
dispatch: () => {
|
|
1642
1647
|
}
|
|
1643
|
-
}),
|
|
1648
|
+
}), Ba = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1644
1649
|
...e,
|
|
1645
1650
|
isLoading: t.payload.isLoading
|
|
1646
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1651
|
+
} : (t == null ? void 0 : t.type) === Ae ? {
|
|
1647
1652
|
...e,
|
|
1648
1653
|
isLoading: !1,
|
|
1649
1654
|
isAuthenticated: !0,
|
|
1650
1655
|
user: t.payload.user,
|
|
1651
1656
|
authenticationType: t.payload.authenticationType,
|
|
1652
1657
|
logoutReason: ""
|
|
1653
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1658
|
+
} : (t == null ? void 0 : t.type) === Ft ? {
|
|
1654
1659
|
...e,
|
|
1655
1660
|
isLoading: !1,
|
|
1656
1661
|
isAuthenticated: !1,
|
|
1657
1662
|
user: void 0,
|
|
1658
1663
|
authenticationType: "",
|
|
1659
1664
|
logoutReason: t.payload.logoutReason
|
|
1660
|
-
} : e,
|
|
1665
|
+
} : e, bt = ({
|
|
1661
1666
|
children: e,
|
|
1662
1667
|
sessionExpiration: t,
|
|
1663
1668
|
clientId: r,
|
|
1664
1669
|
domain: a = "",
|
|
1665
|
-
debug: n = !1
|
|
1670
|
+
debug: n = !1,
|
|
1671
|
+
endpoint: o = Pa ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
1666
1672
|
}) => {
|
|
1667
|
-
const [
|
|
1668
|
-
...
|
|
1673
|
+
const [s, i] = At(Ba, {
|
|
1674
|
+
...Xt,
|
|
1669
1675
|
debug: n
|
|
1670
|
-
}),
|
|
1671
|
-
key: `${
|
|
1672
|
-
}), [
|
|
1673
|
-
key: `${
|
|
1674
|
-
}), [
|
|
1676
|
+
}), c = Ha(n), f = C(!1), [h, m, , l] = Te({
|
|
1677
|
+
key: `${Se}::${r}::@@user@@`
|
|
1678
|
+
}), [u, y, , E] = Te({
|
|
1679
|
+
key: `${Se}::${r}::@@access@@`
|
|
1680
|
+
}), [T, _, , F] = Te(
|
|
1675
1681
|
{
|
|
1676
|
-
key: `${
|
|
1682
|
+
key: `${Se}::${r}::@@refresh@@`
|
|
1677
1683
|
}
|
|
1678
|
-
), [
|
|
1679
|
-
key: `${
|
|
1680
|
-
}),
|
|
1681
|
-
|
|
1684
|
+
), [M, Q, , L] = Te({
|
|
1685
|
+
key: `${Se}::${r}::@@nonce@@`
|
|
1686
|
+
}), re = new Ka(u, T), U = q(() => {
|
|
1687
|
+
c("removeLocalStorage: removing local storage"), l(), E(), F(), L();
|
|
1682
1688
|
}, [
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
]),
|
|
1689
|
+
E,
|
|
1690
|
+
l,
|
|
1691
|
+
L,
|
|
1692
|
+
F,
|
|
1693
|
+
c
|
|
1694
|
+
]), v = q(
|
|
1689
1695
|
(g) => {
|
|
1690
|
-
|
|
1696
|
+
c(
|
|
1691
1697
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1692
1698
|
g
|
|
1693
|
-
),
|
|
1694
|
-
type:
|
|
1699
|
+
), i({
|
|
1700
|
+
type: Ft,
|
|
1695
1701
|
payload: {
|
|
1696
|
-
logoutReason: g ||
|
|
1702
|
+
logoutReason: g || ce
|
|
1697
1703
|
}
|
|
1698
|
-
}),
|
|
1704
|
+
}), U(), i({ type: ge, payload: { isLoading: !1 } });
|
|
1699
1705
|
},
|
|
1700
|
-
[
|
|
1706
|
+
[U, c]
|
|
1701
1707
|
), S = q(
|
|
1702
1708
|
async (g) => {
|
|
1703
|
-
|
|
1704
|
-
const { user:
|
|
1705
|
-
b ||
|
|
1709
|
+
c("invalidateAndLogout: invalidating and logging out");
|
|
1710
|
+
const { user: I } = s, b = (I == null ? void 0 : I.userId) || Da(h);
|
|
1711
|
+
b || c(
|
|
1706
1712
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1707
|
-
), await
|
|
1713
|
+
), await La({
|
|
1708
1714
|
userId: b,
|
|
1709
1715
|
clientId: r,
|
|
1710
1716
|
domain: a,
|
|
1711
|
-
idToken: h
|
|
1712
|
-
|
|
1717
|
+
idToken: h,
|
|
1718
|
+
endpoint: o
|
|
1719
|
+
}), v(g || ce);
|
|
1713
1720
|
},
|
|
1714
|
-
[
|
|
1721
|
+
[
|
|
1722
|
+
h,
|
|
1723
|
+
s,
|
|
1724
|
+
r,
|
|
1725
|
+
a,
|
|
1726
|
+
v,
|
|
1727
|
+
c,
|
|
1728
|
+
o
|
|
1729
|
+
]
|
|
1715
1730
|
);
|
|
1716
|
-
|
|
1717
|
-
if (!
|
|
1718
|
-
return
|
|
1731
|
+
G(() => {
|
|
1732
|
+
if (!f.current)
|
|
1733
|
+
return s.isLoading && h !== null ? (async () => {
|
|
1719
1734
|
try {
|
|
1720
|
-
const g = await
|
|
1721
|
-
g && g.payload[N.USER_ID_KEY] !== "" ? (
|
|
1722
|
-
type:
|
|
1735
|
+
const g = await ye(h);
|
|
1736
|
+
g && g.payload[N.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), i({
|
|
1737
|
+
type: Ae,
|
|
1723
1738
|
payload: {
|
|
1724
1739
|
authenticationType: g.payload[N.AUTH_TYPE_KEY],
|
|
1725
1740
|
user: {
|
|
@@ -1728,113 +1743,119 @@ const La = (e) => q(
|
|
|
1728
1743
|
email: g.payload[N.EMAIL_KEY]
|
|
1729
1744
|
}
|
|
1730
1745
|
}
|
|
1731
|
-
})) : (
|
|
1746
|
+
})) : (c("useEffect: invalid JWT, invalidating and logging out"), await S(ce));
|
|
1732
1747
|
} catch {
|
|
1733
|
-
|
|
1748
|
+
c(
|
|
1734
1749
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
1735
|
-
), await S(
|
|
1750
|
+
), await S(ce);
|
|
1736
1751
|
}
|
|
1737
|
-
})() : (
|
|
1738
|
-
|
|
1752
|
+
})() : (c("useEffect: setting the loading state to false"), i({ type: ge, payload: { isLoading: !1 } })), () => {
|
|
1753
|
+
f.current = !0;
|
|
1739
1754
|
};
|
|
1740
|
-
}, [
|
|
1741
|
-
const
|
|
1742
|
-
|
|
1755
|
+
}, [s.isLoading, h, S, c]);
|
|
1756
|
+
const K = async (g, I) => {
|
|
1757
|
+
i({ type: ge, payload: { isLoading: !0 } }), U();
|
|
1743
1758
|
const b = Ye();
|
|
1744
|
-
|
|
1745
|
-
const { code_verifier:
|
|
1759
|
+
Q(b), c("login: Logging in with password");
|
|
1760
|
+
const { code_verifier: ne, code_challenge: lr } = await Ta(), st = await Ma({
|
|
1761
|
+
endpoint: o,
|
|
1746
1762
|
nonce: b,
|
|
1747
1763
|
clientId: r,
|
|
1748
|
-
code_challenge:
|
|
1764
|
+
code_challenge: lr
|
|
1749
1765
|
});
|
|
1750
1766
|
if (st.status) {
|
|
1751
|
-
const
|
|
1767
|
+
const oe = await $a({
|
|
1768
|
+
endpoint: o,
|
|
1752
1769
|
username: g,
|
|
1753
|
-
password:
|
|
1770
|
+
password: I,
|
|
1754
1771
|
clientId: r,
|
|
1755
1772
|
sessionExpiration: t,
|
|
1756
1773
|
nonce: b,
|
|
1757
|
-
type:
|
|
1774
|
+
type: he.CODE,
|
|
1758
1775
|
code: st.data,
|
|
1759
|
-
code_verifier:
|
|
1776
|
+
code_verifier: ne,
|
|
1760
1777
|
domain: a,
|
|
1761
1778
|
ua: navigator.userAgent
|
|
1762
1779
|
});
|
|
1763
|
-
return
|
|
1764
|
-
type:
|
|
1780
|
+
return oe.status ? (m(oe.idToken), y(oe.accessToken), _(oe.refreshToken), i({
|
|
1781
|
+
type: Ae,
|
|
1765
1782
|
payload: {
|
|
1766
|
-
authenticationType:
|
|
1783
|
+
authenticationType: he.CODE,
|
|
1767
1784
|
user: {
|
|
1768
|
-
userId:
|
|
1785
|
+
userId: oe.userId,
|
|
1769
1786
|
username: g,
|
|
1770
|
-
email:
|
|
1787
|
+
email: oe.email
|
|
1771
1788
|
}
|
|
1772
1789
|
}
|
|
1773
|
-
}), !0) : (
|
|
1790
|
+
}), !0) : (v(Fe), !1);
|
|
1774
1791
|
}
|
|
1775
1792
|
return !1;
|
|
1776
|
-
},
|
|
1777
|
-
g == null || g.preventDefault(), await S(
|
|
1778
|
-
},
|
|
1779
|
-
const { isAuthenticated: g, user:
|
|
1793
|
+
}, w = async (g) => {
|
|
1794
|
+
g == null || g.preventDefault(), await S(va);
|
|
1795
|
+
}, O = async () => {
|
|
1796
|
+
const { isAuthenticated: g, user: I } = s;
|
|
1780
1797
|
try {
|
|
1781
|
-
if (g &&
|
|
1782
|
-
if (
|
|
1783
|
-
|
|
1784
|
-
const
|
|
1785
|
-
if (
|
|
1786
|
-
return
|
|
1798
|
+
if (g && I && I.userId) {
|
|
1799
|
+
if (u) {
|
|
1800
|
+
c("getAccessToken");
|
|
1801
|
+
const ne = await ye(u);
|
|
1802
|
+
if (ne && ne.payload[N.USER_ID_KEY] !== "")
|
|
1803
|
+
return u;
|
|
1787
1804
|
}
|
|
1788
|
-
|
|
1789
|
-
const b = await
|
|
1805
|
+
c("getAccessToken: invalid access token, trying to refresh it");
|
|
1806
|
+
const b = await re.refreshtoken({
|
|
1807
|
+
endpoint: o,
|
|
1790
1808
|
clientId: r,
|
|
1791
|
-
userId:
|
|
1792
|
-
nonce:
|
|
1809
|
+
userId: I.userId,
|
|
1810
|
+
nonce: M,
|
|
1793
1811
|
domain: a
|
|
1794
1812
|
});
|
|
1795
|
-
return b.status && b.status === "success" && b.newAccessToken ? (
|
|
1813
|
+
return b.status && b.status === "success" && b.newAccessToken ? (y(b.newAccessToken), _(b.newRefreshToken), b.newAccessToken) : (c(
|
|
1796
1814
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1797
|
-
), await S(
|
|
1815
|
+
), await S(ce), "");
|
|
1798
1816
|
}
|
|
1799
|
-
return
|
|
1817
|
+
return c(
|
|
1800
1818
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
1801
|
-
), await S(
|
|
1819
|
+
), await S(ce), "";
|
|
1802
1820
|
} catch {
|
|
1803
|
-
return
|
|
1821
|
+
return c(
|
|
1804
1822
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1805
|
-
), await S(
|
|
1823
|
+
), await S(xa), "";
|
|
1806
1824
|
}
|
|
1807
|
-
},
|
|
1808
|
-
const { user: g } =
|
|
1809
|
-
let
|
|
1810
|
-
|
|
1825
|
+
}, P = () => s.isAuthenticated && h ? h : "", B = async () => {
|
|
1826
|
+
const { user: g } = s;
|
|
1827
|
+
let I = await de({
|
|
1828
|
+
endpoint: o,
|
|
1829
|
+
accessToken: u,
|
|
1811
1830
|
clientId: r,
|
|
1812
|
-
type:
|
|
1831
|
+
type: le.GET_REGISTRATION_OPTIONS,
|
|
1813
1832
|
params: {
|
|
1814
1833
|
clientId: r,
|
|
1815
1834
|
id: g == null ? void 0 : g.userId,
|
|
1816
1835
|
username: g == null ? void 0 : g.username
|
|
1817
1836
|
}
|
|
1818
1837
|
});
|
|
1819
|
-
if (
|
|
1838
|
+
if (I.status)
|
|
1820
1839
|
try {
|
|
1821
|
-
const b = await
|
|
1822
|
-
return
|
|
1823
|
-
|
|
1840
|
+
const b = await Er(I.data);
|
|
1841
|
+
return I = await de({
|
|
1842
|
+
endpoint: o,
|
|
1843
|
+
accessToken: u,
|
|
1824
1844
|
clientId: r,
|
|
1825
|
-
type:
|
|
1845
|
+
type: le.VERIFY_REGISTRATION,
|
|
1826
1846
|
params: {
|
|
1827
1847
|
clientId: r,
|
|
1828
1848
|
id: g == null ? void 0 : g.userId,
|
|
1829
1849
|
username: g == null ? void 0 : g.username,
|
|
1830
1850
|
registration: b
|
|
1831
1851
|
}
|
|
1832
|
-
}), !!(
|
|
1852
|
+
}), !!(I.status && I.data.length > 0);
|
|
1833
1853
|
} catch {
|
|
1834
|
-
return await
|
|
1835
|
-
|
|
1854
|
+
return await de({
|
|
1855
|
+
endpoint: o,
|
|
1856
|
+
accessToken: u,
|
|
1836
1857
|
clientId: r,
|
|
1837
|
-
type:
|
|
1858
|
+
type: le.VERIFY_REGISTRATION,
|
|
1838
1859
|
params: {
|
|
1839
1860
|
clientId: r,
|
|
1840
1861
|
id: g == null ? void 0 : g.userId,
|
|
@@ -1844,92 +1865,95 @@ const La = (e) => q(
|
|
|
1844
1865
|
}), !1;
|
|
1845
1866
|
}
|
|
1846
1867
|
return !1;
|
|
1847
|
-
},
|
|
1848
|
-
|
|
1868
|
+
}, Z = async () => {
|
|
1869
|
+
i({ type: ge, payload: { isLoading: !0 } }), U();
|
|
1849
1870
|
const g = Ye();
|
|
1850
|
-
|
|
1851
|
-
const
|
|
1852
|
-
let b = await
|
|
1853
|
-
|
|
1871
|
+
Q(g), c("loginWithPasskey");
|
|
1872
|
+
const I = Ye();
|
|
1873
|
+
let b = await de({
|
|
1874
|
+
endpoint: o,
|
|
1875
|
+
accessToken: u,
|
|
1854
1876
|
clientId: r,
|
|
1855
|
-
type:
|
|
1877
|
+
type: le.GET_AUTHENTICATION_OPTIONS,
|
|
1856
1878
|
params: {
|
|
1857
|
-
id:
|
|
1879
|
+
id: I,
|
|
1858
1880
|
clientId: r
|
|
1859
1881
|
}
|
|
1860
1882
|
});
|
|
1861
1883
|
if (b.status)
|
|
1862
1884
|
try {
|
|
1863
|
-
const
|
|
1864
|
-
return b = await
|
|
1865
|
-
|
|
1885
|
+
const ne = await Tr(b.data);
|
|
1886
|
+
return b = await de({
|
|
1887
|
+
endpoint: o,
|
|
1888
|
+
accessToken: u,
|
|
1866
1889
|
clientId: r,
|
|
1867
|
-
type:
|
|
1890
|
+
type: le.VERIFY_AUTHENTICATION,
|
|
1868
1891
|
params: {
|
|
1869
1892
|
clientId: r,
|
|
1870
|
-
id:
|
|
1871
|
-
authentication:
|
|
1893
|
+
id: I,
|
|
1894
|
+
authentication: ne,
|
|
1872
1895
|
nonce: g,
|
|
1873
1896
|
domain: a,
|
|
1874
1897
|
sessionExpiration: t,
|
|
1875
1898
|
ua: navigator.userAgent
|
|
1876
1899
|
}
|
|
1877
|
-
}), b.data.status ===
|
|
1878
|
-
type:
|
|
1900
|
+
}), b.data.status === Ee ? (m(b.data.idToken), y(b.data.accessToken), _(b.data.refreshToken), i({
|
|
1901
|
+
type: Ae,
|
|
1879
1902
|
payload: {
|
|
1880
|
-
authenticationType:
|
|
1903
|
+
authenticationType: he.PASSKEY,
|
|
1881
1904
|
user: {
|
|
1882
1905
|
userId: b.data.userId,
|
|
1883
1906
|
username: b.data.username,
|
|
1884
1907
|
email: b.data.email
|
|
1885
1908
|
}
|
|
1886
1909
|
}
|
|
1887
|
-
}), !0) : (
|
|
1910
|
+
}), !0) : (v(Fe), !1);
|
|
1888
1911
|
} catch {
|
|
1889
|
-
return await
|
|
1890
|
-
|
|
1912
|
+
return await de({
|
|
1913
|
+
endpoint: o,
|
|
1914
|
+
accessToken: u,
|
|
1891
1915
|
clientId: r,
|
|
1892
|
-
type:
|
|
1916
|
+
type: le.VERIFY_AUTHENTICATION,
|
|
1893
1917
|
params: {
|
|
1894
1918
|
clientId: r,
|
|
1895
|
-
id:
|
|
1919
|
+
id: I,
|
|
1896
1920
|
authentication: {},
|
|
1897
1921
|
nonce: g,
|
|
1898
1922
|
domain: a,
|
|
1899
1923
|
sessionExpiration: t
|
|
1900
1924
|
}
|
|
1901
|
-
}),
|
|
1925
|
+
}), v(Fe), !1;
|
|
1902
1926
|
}
|
|
1903
1927
|
return !1;
|
|
1904
1928
|
};
|
|
1905
|
-
return /* @__PURE__ */
|
|
1906
|
-
|
|
1929
|
+
return /* @__PURE__ */ d(Wa.Provider, { value: { state: s, dispatch: i }, children: /* @__PURE__ */ d(
|
|
1930
|
+
Qt.Provider,
|
|
1907
1931
|
{
|
|
1908
1932
|
value: {
|
|
1909
|
-
...
|
|
1910
|
-
login:
|
|
1911
|
-
logout:
|
|
1912
|
-
getAccessToken:
|
|
1913
|
-
getIdToken:
|
|
1914
|
-
registeringForPasskey:
|
|
1915
|
-
loginWithPasskey:
|
|
1933
|
+
...s,
|
|
1934
|
+
login: K,
|
|
1935
|
+
logout: w,
|
|
1936
|
+
getAccessToken: O,
|
|
1937
|
+
getIdToken: P,
|
|
1938
|
+
registeringForPasskey: B,
|
|
1939
|
+
loginWithPasskey: Z
|
|
1916
1940
|
},
|
|
1917
1941
|
children: e
|
|
1918
1942
|
}
|
|
1919
1943
|
) });
|
|
1920
|
-
},
|
|
1921
|
-
function
|
|
1944
|
+
}, Zt = (e = Qt) => Rt(e), wo = "user", Io = "assistant", To = "system", So = "internal", _o = "hidden", ko = "I'm having trouble right now. Please try again later.", Ao = "OpenAI", Ro = "OpenAI", No = "Anthropic", vo = "action-search", xo = "action-sort", Co = "action-toggle-prompt", Oo = "action-reset-prompt", Po = "sassy-saint-", Do = "details", Lo = "search", $o = "sort", Mo = "private-disclosure", Uo = "==stats==", Et = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ko = 10, Ho = 30, Wo = "av-prompt", Bo = "av-prompt-editable", Vo = "size-5 sm:size-4", wt = (e) => Number.isFinite(e) ? e : 0;
|
|
1945
|
+
function Va(e) {
|
|
1922
1946
|
return {
|
|
1923
1947
|
days: Math.trunc(e / 864e5),
|
|
1924
1948
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1925
1949
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1926
1950
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1927
1951
|
milliseconds: Math.trunc(e % 1e3),
|
|
1928
|
-
microseconds: Math.trunc(
|
|
1929
|
-
nanoseconds: Math.trunc(
|
|
1952
|
+
microseconds: Math.trunc(wt(e * 1e3) % 1e3),
|
|
1953
|
+
nanoseconds: Math.trunc(wt(e * 1e6) % 1e3)
|
|
1930
1954
|
};
|
|
1931
1955
|
}
|
|
1932
|
-
function
|
|
1956
|
+
function Ja(e) {
|
|
1933
1957
|
return {
|
|
1934
1958
|
days: e / 86400000n,
|
|
1935
1959
|
hours: e / 3600000n % 24n,
|
|
@@ -1940,20 +1964,20 @@ function Wa(e) {
|
|
|
1940
1964
|
nanoseconds: 0n
|
|
1941
1965
|
};
|
|
1942
1966
|
}
|
|
1943
|
-
function
|
|
1967
|
+
function Ga(e) {
|
|
1944
1968
|
switch (typeof e) {
|
|
1945
1969
|
case "number": {
|
|
1946
1970
|
if (Number.isFinite(e))
|
|
1947
|
-
return
|
|
1971
|
+
return Va(e);
|
|
1948
1972
|
break;
|
|
1949
1973
|
}
|
|
1950
1974
|
case "bigint":
|
|
1951
|
-
return
|
|
1975
|
+
return Ja(e);
|
|
1952
1976
|
}
|
|
1953
1977
|
throw new TypeError("Expected a finite number or bigint");
|
|
1954
1978
|
}
|
|
1955
|
-
const
|
|
1956
|
-
function
|
|
1979
|
+
const Ya = (e) => e === 0 || e === 0n, Fa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ja = 1e-7, za = 24n * 60n * 60n * 1000n;
|
|
1980
|
+
function qa(e, t) {
|
|
1957
1981
|
const r = typeof e == "bigint";
|
|
1958
1982
|
if (!r && !Number.isFinite(e))
|
|
1959
1983
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1961,43 +1985,43 @@ function Fa(e, t) {
|
|
|
1961
1985
|
const a = e < 0 ? "-" : "";
|
|
1962
1986
|
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
1987
|
let n = [];
|
|
1964
|
-
const o = (
|
|
1965
|
-
const
|
|
1966
|
-
return (Math.round(
|
|
1967
|
-
}, s = (
|
|
1968
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1969
|
-
if (
|
|
1970
|
-
const y =
|
|
1971
|
-
|
|
1988
|
+
const o = (h, m) => {
|
|
1989
|
+
const l = Math.floor(h * 10 ** m + ja);
|
|
1990
|
+
return (Math.round(l) / 10 ** m).toFixed(m);
|
|
1991
|
+
}, s = (h, m, l, u) => {
|
|
1992
|
+
if (!((n.length === 0 || !t.colonNotation) && Ya(h) && !(t.colonNotation && l === "m"))) {
|
|
1993
|
+
if (u ?? (u = String(h)), t.colonNotation) {
|
|
1994
|
+
const y = u.includes(".") ? u.split(".")[0].length : u.length, E = n.length > 0 ? 2 : 1;
|
|
1995
|
+
u = "0".repeat(Math.max(0, E - y)) + u;
|
|
1972
1996
|
} else
|
|
1973
|
-
|
|
1974
|
-
n.push(
|
|
1997
|
+
u += t.verbose ? " " + Fa(m, h) : l;
|
|
1998
|
+
n.push(u);
|
|
1975
1999
|
}
|
|
1976
|
-
}, i =
|
|
1977
|
-
if (t.hideYearAndDays ? s(BigInt(
|
|
2000
|
+
}, i = Ga(e), c = BigInt(i.days);
|
|
2001
|
+
if (t.hideYearAndDays ? s(BigInt(c) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(c, "day", "d") : (s(c / 365n, "year", "y"), s(c % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
1978
2002
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1979
|
-
const
|
|
1980
|
-
if (s(
|
|
1981
|
-
s(
|
|
2003
|
+
const h = Number(i.seconds), m = Number(i.milliseconds), l = Number(i.microseconds), u = Number(i.nanoseconds);
|
|
2004
|
+
if (s(h, "second", "s"), t.formatSubMilliseconds)
|
|
2005
|
+
s(m, "millisecond", "ms"), s(l, "microsecond", "µs"), s(u, "nanosecond", "ns");
|
|
1982
2006
|
else {
|
|
1983
|
-
const y =
|
|
2007
|
+
const y = m + l / 1e3 + u / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, T = y >= 1 ? Math.round(y) : Math.ceil(y), _ = E ? y.toFixed(E) : T;
|
|
1984
2008
|
s(
|
|
1985
|
-
Number.parseFloat(
|
|
2009
|
+
Number.parseFloat(_),
|
|
1986
2010
|
"millisecond",
|
|
1987
2011
|
"ms",
|
|
1988
|
-
|
|
2012
|
+
_
|
|
1989
2013
|
);
|
|
1990
2014
|
}
|
|
1991
2015
|
} else {
|
|
1992
|
-
const
|
|
1993
|
-
s(Number.parseFloat(
|
|
2016
|
+
const h = (r ? Number(e % za) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(h, m), u = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
|
|
2017
|
+
s(Number.parseFloat(u), "second", "s", u);
|
|
1994
2018
|
}
|
|
1995
2019
|
if (n.length === 0)
|
|
1996
2020
|
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(
|
|
2021
|
+
const f = t.colonNotation ? ":" : " ";
|
|
2022
|
+
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(f);
|
|
1999
2023
|
}
|
|
2000
|
-
const
|
|
2024
|
+
const Xa = process.env.NODE_ENV === "production", er = !Xa, Qa = er ? "gizmette.local.com" : "gizmette.com", Jo = async () => {
|
|
2001
2025
|
const e = {
|
|
2002
2026
|
/**
|
|
2003
2027
|
* A boolean value that indicates the application would
|
|
@@ -2046,35 +2070,35 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2046
2070
|
e
|
|
2047
2071
|
);
|
|
2048
2072
|
});
|
|
2049
|
-
}, Go = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */
|
|
2050
|
-
/* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2073
|
+
}, Go = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ d("dl", { className: "my-0", children: /* @__PURE__ */ $("div", { className: "flex items-center justify-between", children: [
|
|
2074
|
+
/* @__PURE__ */ d("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2075
|
+
/* @__PURE__ */ d("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2052
2076
|
] }) }, `${e}-${r}`)) : null, Yo = new Intl.NumberFormat("en", {
|
|
2053
2077
|
style: "decimal",
|
|
2054
2078
|
signDisplay: "never",
|
|
2055
2079
|
minimumFractionDigits: 0,
|
|
2056
2080
|
maximumFractionDigits: 0
|
|
2057
|
-
}), Fo = (e) => e > 0 ?
|
|
2081
|
+
}), Fo = (e) => e > 0 ? qa(e, {
|
|
2058
2082
|
secondsDecimalDigits: 2,
|
|
2059
2083
|
unitCount: 2
|
|
2060
|
-
}) : "N/A",
|
|
2084
|
+
}) : "N/A", Za = ({
|
|
2061
2085
|
isAuthenticated: e,
|
|
2062
2086
|
extraClass: t
|
|
2063
2087
|
}) => p(
|
|
2064
2088
|
"flex-1 overflow-y-auto bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
|
|
2065
2089
|
e ? "pt-0" : "pt-10",
|
|
2066
2090
|
t
|
|
2067
|
-
),
|
|
2091
|
+
), en = ({
|
|
2068
2092
|
extraClass: e
|
|
2069
2093
|
}) => p("px-2 sm:px-0", e), jo = (e, t) => t === 1 ? e : `${e}s`, zo = (e, t) => {
|
|
2070
2094
|
let r;
|
|
2071
2095
|
return (...a) => {
|
|
2072
2096
|
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2073
2097
|
};
|
|
2074
|
-
},
|
|
2075
|
-
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r =
|
|
2098
|
+
}, tn = () => !!(window != null && window.__VERSINI_CALLISTO_ELECTRON__), rn = () => window.innerWidth < 403, qo = () => {
|
|
2099
|
+
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = rn(), a = navigator.maxTouchPoints > 1;
|
|
2076
2100
|
return e && t && r && a;
|
|
2077
|
-
},
|
|
2101
|
+
}, It = "av-button", Ke = "icon", at = "button", Ze = "link", an = ({
|
|
2078
2102
|
type: e,
|
|
2079
2103
|
size: t,
|
|
2080
2104
|
labelRight: r,
|
|
@@ -2082,14 +2106,14 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2082
2106
|
align: n,
|
|
2083
2107
|
animated: o
|
|
2084
2108
|
}) => {
|
|
2085
|
-
const s = "max-h-8 py-0 px-2", i = "max-h-9 h-8 px-3",
|
|
2109
|
+
const s = "max-h-8 py-0 px-2", i = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
2086
2110
|
switch (e) {
|
|
2087
2111
|
case at:
|
|
2088
2112
|
case Ze:
|
|
2089
2113
|
return p({
|
|
2090
2114
|
[s]: t === "small",
|
|
2091
2115
|
[i]: t === "medium",
|
|
2092
|
-
[
|
|
2116
|
+
[c]: t === "large"
|
|
2093
2117
|
});
|
|
2094
2118
|
case Ke:
|
|
2095
2119
|
return p("flex items-center", {
|
|
@@ -2110,7 +2134,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2110
2134
|
"h-12": t === "large" && o && (r || a)
|
|
2111
2135
|
});
|
|
2112
2136
|
}
|
|
2113
|
-
},
|
|
2137
|
+
}, nn = ({
|
|
2114
2138
|
type: e,
|
|
2115
2139
|
size: t,
|
|
2116
2140
|
labelRight: r,
|
|
@@ -2133,7 +2157,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2133
2157
|
[s]: t === "large" && (r || a)
|
|
2134
2158
|
});
|
|
2135
2159
|
}
|
|
2136
|
-
},
|
|
2160
|
+
}, on = ({
|
|
2137
2161
|
mode: e,
|
|
2138
2162
|
noBackground: t,
|
|
2139
2163
|
noTruncate: r,
|
|
@@ -2169,7 +2193,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2169
2193
|
return p("not-prose text-copy-lighter", {
|
|
2170
2194
|
truncate: !r
|
|
2171
2195
|
});
|
|
2172
|
-
},
|
|
2196
|
+
}, sn = ({
|
|
2173
2197
|
mode: e,
|
|
2174
2198
|
noBackground: t,
|
|
2175
2199
|
variant: r
|
|
@@ -2199,13 +2223,13 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2199
2223
|
if (r === "selected")
|
|
2200
2224
|
return "bg-action-selected-dark";
|
|
2201
2225
|
}
|
|
2202
|
-
},
|
|
2226
|
+
}, cn = ({
|
|
2203
2227
|
radius: e
|
|
2204
2228
|
}) => p({
|
|
2205
2229
|
"rounded-full": e === "large",
|
|
2206
2230
|
"rounded-md": e === "medium",
|
|
2207
2231
|
"rounded-sm": e === "small"
|
|
2208
|
-
}),
|
|
2232
|
+
}), ln = ({
|
|
2209
2233
|
mode: e,
|
|
2210
2234
|
disabled: t,
|
|
2211
2235
|
variant: r
|
|
@@ -2235,7 +2259,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2235
2259
|
});
|
|
2236
2260
|
if (r === "selected")
|
|
2237
2261
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
2238
|
-
},
|
|
2262
|
+
}, dn = ({
|
|
2239
2263
|
mode: e,
|
|
2240
2264
|
disabled: t,
|
|
2241
2265
|
variant: r
|
|
@@ -2265,7 +2289,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2265
2289
|
});
|
|
2266
2290
|
if (r === "selected")
|
|
2267
2291
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
2268
|
-
},
|
|
2292
|
+
}, un = ({
|
|
2269
2293
|
mode: e,
|
|
2270
2294
|
noBorder: t,
|
|
2271
2295
|
variant: r
|
|
@@ -2295,14 +2319,14 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2295
2319
|
});
|
|
2296
2320
|
if (r === "selected")
|
|
2297
2321
|
return "border border-border-selected-dark";
|
|
2298
|
-
},
|
|
2322
|
+
}, mn = ({
|
|
2299
2323
|
focusMode: e
|
|
2300
2324
|
}) => p("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2301
2325
|
"focus:outline-focus-dark": e === "dark",
|
|
2302
2326
|
"focus:outline-focus-light": e === "light",
|
|
2303
2327
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2304
2328
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2305
|
-
}),
|
|
2329
|
+
}), hn = ({
|
|
2306
2330
|
mode: e,
|
|
2307
2331
|
raw: t,
|
|
2308
2332
|
iconClassName: r
|
|
@@ -2314,11 +2338,11 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2314
2338
|
"dark:text-copy-accent-dark": e === "system"
|
|
2315
2339
|
},
|
|
2316
2340
|
r
|
|
2317
|
-
),
|
|
2341
|
+
), pn = ({
|
|
2318
2342
|
animated: e
|
|
2319
2343
|
}) => p({
|
|
2320
2344
|
"transition-opacity duration-300 ease-in": e
|
|
2321
|
-
}),
|
|
2345
|
+
}), tr = ({
|
|
2322
2346
|
type: e,
|
|
2323
2347
|
className: t,
|
|
2324
2348
|
raw: r,
|
|
@@ -2327,38 +2351,38 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2327
2351
|
disabled: o,
|
|
2328
2352
|
fullWidth: s,
|
|
2329
2353
|
size: i,
|
|
2330
|
-
noBorder:
|
|
2331
|
-
labelRight:
|
|
2332
|
-
labelLeft:
|
|
2333
|
-
noBackground:
|
|
2334
|
-
variant:
|
|
2335
|
-
noTruncate:
|
|
2354
|
+
noBorder: c,
|
|
2355
|
+
labelRight: f,
|
|
2356
|
+
labelLeft: h,
|
|
2357
|
+
noBackground: m,
|
|
2358
|
+
variant: l,
|
|
2359
|
+
noTruncate: u,
|
|
2336
2360
|
align: y,
|
|
2337
|
-
radius:
|
|
2361
|
+
radius: E,
|
|
2338
2362
|
animated: T
|
|
2339
|
-
}) => (
|
|
2340
|
-
|
|
2341
|
-
|
|
2363
|
+
}) => (l || (l = "primary"), r ? p(It, t) : p(
|
|
2364
|
+
It,
|
|
2365
|
+
on({
|
|
2342
2366
|
mode: a,
|
|
2343
|
-
variant:
|
|
2344
|
-
noBackground:
|
|
2345
|
-
noTruncate:
|
|
2367
|
+
variant: l,
|
|
2368
|
+
noBackground: m,
|
|
2369
|
+
noTruncate: u
|
|
2346
2370
|
}),
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2371
|
+
sn({ mode: a, noBackground: m, variant: l }),
|
|
2372
|
+
cn({ radius: E }),
|
|
2373
|
+
an({
|
|
2350
2374
|
type: e,
|
|
2351
2375
|
size: i,
|
|
2352
|
-
labelRight:
|
|
2353
|
-
labelLeft:
|
|
2376
|
+
labelRight: f,
|
|
2377
|
+
labelLeft: h,
|
|
2354
2378
|
align: y,
|
|
2355
2379
|
animated: T
|
|
2356
2380
|
}),
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2381
|
+
nn({ type: e, size: i, labelRight: f, labelLeft: h }),
|
|
2382
|
+
un({ mode: a, variant: l, noBorder: c }),
|
|
2383
|
+
mn({ focusMode: n }),
|
|
2384
|
+
ln({ mode: a, variant: l, disabled: o }),
|
|
2385
|
+
dn({ mode: a, variant: l, disabled: o }),
|
|
2362
2386
|
{
|
|
2363
2387
|
"w-full": s,
|
|
2364
2388
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
@@ -2367,24 +2391,24 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2367
2391
|
"transition-[width] duration-300 ease-in-out": e === Ke && T
|
|
2368
2392
|
}),
|
|
2369
2393
|
t
|
|
2370
|
-
)),
|
|
2394
|
+
)), fn = (e, t, r) => {
|
|
2371
2395
|
var a;
|
|
2372
2396
|
!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);
|
|
2373
2397
|
}, nt = X.forwardRef((e, t) => {
|
|
2374
2398
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2375
|
-
return /* @__PURE__ */
|
|
2399
|
+
return /* @__PURE__ */ d(
|
|
2376
2400
|
"button",
|
|
2377
2401
|
{
|
|
2378
2402
|
ref: t,
|
|
2379
2403
|
onClick: (o) => {
|
|
2380
|
-
|
|
2404
|
+
fn(o, a, r);
|
|
2381
2405
|
},
|
|
2382
2406
|
...n
|
|
2383
2407
|
}
|
|
2384
2408
|
);
|
|
2385
2409
|
});
|
|
2386
2410
|
nt.displayName = "BaseButton";
|
|
2387
|
-
const
|
|
2411
|
+
const rr = X.forwardRef(
|
|
2388
2412
|
({
|
|
2389
2413
|
children: e,
|
|
2390
2414
|
disabled: t = !1,
|
|
@@ -2394,13 +2418,13 @@ const Qt = X.forwardRef(
|
|
|
2394
2418
|
className: o,
|
|
2395
2419
|
size: s = "medium",
|
|
2396
2420
|
raw: i = !1,
|
|
2397
|
-
noBorder:
|
|
2398
|
-
variant:
|
|
2399
|
-
noTruncate:
|
|
2400
|
-
radius:
|
|
2401
|
-
...
|
|
2402
|
-
},
|
|
2403
|
-
const y =
|
|
2421
|
+
noBorder: c = !1,
|
|
2422
|
+
variant: f = "primary",
|
|
2423
|
+
noTruncate: h = !1,
|
|
2424
|
+
radius: m = "large",
|
|
2425
|
+
...l
|
|
2426
|
+
}, u) => {
|
|
2427
|
+
const y = tr({
|
|
2404
2428
|
type: at,
|
|
2405
2429
|
mode: r,
|
|
2406
2430
|
focusMode: a,
|
|
@@ -2409,31 +2433,31 @@ const Qt = X.forwardRef(
|
|
|
2409
2433
|
raw: i,
|
|
2410
2434
|
className: o,
|
|
2411
2435
|
size: s,
|
|
2412
|
-
noBorder:
|
|
2413
|
-
variant:
|
|
2414
|
-
noTruncate:
|
|
2415
|
-
radius:
|
|
2436
|
+
noBorder: c,
|
|
2437
|
+
variant: f,
|
|
2438
|
+
noTruncate: h,
|
|
2439
|
+
radius: m
|
|
2416
2440
|
});
|
|
2417
|
-
return /* @__PURE__ */
|
|
2441
|
+
return /* @__PURE__ */ d(
|
|
2418
2442
|
nt,
|
|
2419
2443
|
{
|
|
2420
|
-
ref:
|
|
2444
|
+
ref: u,
|
|
2421
2445
|
className: y,
|
|
2422
2446
|
disabled: t,
|
|
2423
|
-
...
|
|
2447
|
+
...l,
|
|
2424
2448
|
children: e
|
|
2425
2449
|
}
|
|
2426
2450
|
);
|
|
2427
2451
|
}
|
|
2428
2452
|
);
|
|
2429
|
-
|
|
2430
|
-
function
|
|
2431
|
-
const e =
|
|
2432
|
-
return
|
|
2453
|
+
rr.displayName = "Button";
|
|
2454
|
+
function gn() {
|
|
2455
|
+
const e = C(!1);
|
|
2456
|
+
return G(() => (e.current = !0, () => {
|
|
2433
2457
|
e.current = !1;
|
|
2434
2458
|
}), []), q(() => e.current, []);
|
|
2435
2459
|
}
|
|
2436
|
-
function
|
|
2460
|
+
function yn(e) {
|
|
2437
2461
|
return Le(() => e.every((t) => t == null) ? () => {
|
|
2438
2462
|
} : (t) => {
|
|
2439
2463
|
e.forEach((r) => {
|
|
@@ -2441,7 +2465,7 @@ function fn(e) {
|
|
|
2441
2465
|
});
|
|
2442
2466
|
}, e);
|
|
2443
2467
|
}
|
|
2444
|
-
const
|
|
2468
|
+
const bn = {
|
|
2445
2469
|
x: 0,
|
|
2446
2470
|
y: 0,
|
|
2447
2471
|
width: 0,
|
|
@@ -2452,31 +2476,31 @@ const gn = {
|
|
|
2452
2476
|
right: 0
|
|
2453
2477
|
};
|
|
2454
2478
|
function je(e) {
|
|
2455
|
-
const t =
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
a.current && t() && o(
|
|
2479
|
+
const t = gn(), r = C(0), a = C(null), [n, o] = z(bn), s = Le(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
2480
|
+
const c = i[0];
|
|
2481
|
+
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2482
|
+
a.current && t() && o(c.contentRect);
|
|
2459
2483
|
}));
|
|
2460
2484
|
}), [t]);
|
|
2461
|
-
return
|
|
2485
|
+
return G(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
2462
2486
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2463
2487
|
}), [s, e]), [a, n];
|
|
2464
2488
|
}
|
|
2465
|
-
const
|
|
2489
|
+
const En = {
|
|
2466
2490
|
small: 24,
|
|
2467
2491
|
// w-6
|
|
2468
2492
|
medium: 32,
|
|
2469
2493
|
// w-8
|
|
2470
2494
|
large: 48
|
|
2471
2495
|
// w-12
|
|
2472
|
-
},
|
|
2496
|
+
}, wn = {
|
|
2473
2497
|
small: 8 * 2,
|
|
2474
2498
|
// px-2 x 2
|
|
2475
2499
|
medium: 12 * 2,
|
|
2476
2500
|
// px-3 x 2
|
|
2477
2501
|
large: 16 * 2
|
|
2478
2502
|
// px-4 x 2
|
|
2479
|
-
},
|
|
2503
|
+
}, In = 2, Pe = X.forwardRef(
|
|
2480
2504
|
({
|
|
2481
2505
|
children: e,
|
|
2482
2506
|
disabled: t = !1,
|
|
@@ -2486,21 +2510,21 @@ const yn = {
|
|
|
2486
2510
|
className: o,
|
|
2487
2511
|
type: s = "button",
|
|
2488
2512
|
raw: i = !1,
|
|
2489
|
-
noBorder:
|
|
2490
|
-
"aria-label":
|
|
2491
|
-
label:
|
|
2492
|
-
size:
|
|
2493
|
-
labelRight:
|
|
2494
|
-
labelLeft:
|
|
2513
|
+
noBorder: c = !1,
|
|
2514
|
+
"aria-label": f,
|
|
2515
|
+
label: h,
|
|
2516
|
+
size: m = "medium",
|
|
2517
|
+
labelRight: l,
|
|
2518
|
+
labelLeft: u,
|
|
2495
2519
|
noBackground: y = !1,
|
|
2496
|
-
align:
|
|
2520
|
+
align: E = "center",
|
|
2497
2521
|
radius: T = "large",
|
|
2498
|
-
variant:
|
|
2499
|
-
iconClassName:
|
|
2500
|
-
animated:
|
|
2501
|
-
...
|
|
2502
|
-
},
|
|
2503
|
-
const
|
|
2522
|
+
variant: _ = "primary",
|
|
2523
|
+
iconClassName: F,
|
|
2524
|
+
animated: M = !1,
|
|
2525
|
+
...Q
|
|
2526
|
+
}, L) => {
|
|
2527
|
+
const re = tr({
|
|
2504
2528
|
type: Ke,
|
|
2505
2529
|
mode: r,
|
|
2506
2530
|
focusMode: a,
|
|
@@ -2508,55 +2532,55 @@ const yn = {
|
|
|
2508
2532
|
disabled: t,
|
|
2509
2533
|
raw: i,
|
|
2510
2534
|
className: o,
|
|
2511
|
-
noBorder:
|
|
2512
|
-
size:
|
|
2513
|
-
labelRight:
|
|
2514
|
-
labelLeft:
|
|
2535
|
+
noBorder: c,
|
|
2536
|
+
size: m,
|
|
2537
|
+
labelRight: l,
|
|
2538
|
+
labelLeft: u,
|
|
2515
2539
|
noBackground: y,
|
|
2516
|
-
align:
|
|
2540
|
+
align: E,
|
|
2517
2541
|
radius: T,
|
|
2518
|
-
variant:
|
|
2519
|
-
animated:
|
|
2520
|
-
}), U =
|
|
2521
|
-
return
|
|
2522
|
-
|
|
2523
|
-
}, [
|
|
2524
|
-
|
|
2542
|
+
variant: _,
|
|
2543
|
+
animated: M
|
|
2544
|
+
}), U = hn({ mode: r, raw: i, iconClassName: F }), v = pn({ animated: M }), [S, K] = je(), [w, O] = je(), [P, B] = je(), Z = C(0), g = C(null), I = yn([L, g]);
|
|
2545
|
+
return ve(() => {
|
|
2546
|
+
P && P.current && M && (Z.current = B.width + wn[m] + (c ? 0 : In));
|
|
2547
|
+
}, [B, P, m, c, M]), ve(() => {
|
|
2548
|
+
g && g.current && M && (l && S && K.width > 0 ? (S.current && (S.current.style.opacity = "100"), g.current.style.width = `${K.width + Z.current}px`) : u && O.width > 0 ? (w.current && (w.current.style.opacity = "100"), g.current.style.width = `${O.width + Z.current}px`) : (S.current && (S.current.style.opacity = "0"), w.current && (w.current.style.opacity = "0"), g.current.style.width = `${En[m]}px`));
|
|
2525
2549
|
}, [
|
|
2526
2550
|
K,
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
m,
|
|
2531
|
-
I,
|
|
2551
|
+
l,
|
|
2552
|
+
S,
|
|
2553
|
+
O,
|
|
2532
2554
|
u,
|
|
2533
|
-
|
|
2534
|
-
|
|
2555
|
+
w,
|
|
2556
|
+
m,
|
|
2557
|
+
M
|
|
2558
|
+
]), /* @__PURE__ */ $(
|
|
2535
2559
|
nt,
|
|
2536
2560
|
{
|
|
2537
|
-
ref:
|
|
2538
|
-
className:
|
|
2561
|
+
ref: I,
|
|
2562
|
+
className: re,
|
|
2539
2563
|
disabled: t,
|
|
2540
2564
|
type: s,
|
|
2541
|
-
"aria-label":
|
|
2542
|
-
...
|
|
2565
|
+
"aria-label": f || h,
|
|
2566
|
+
...Q,
|
|
2543
2567
|
children: [
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
|
|
2568
|
+
/* @__PURE__ */ d(
|
|
2569
|
+
Tt,
|
|
2546
2570
|
{
|
|
2547
|
-
label:
|
|
2548
|
-
labelRef:
|
|
2549
|
-
labelClass:
|
|
2571
|
+
label: u,
|
|
2572
|
+
labelRef: w,
|
|
2573
|
+
labelClass: v,
|
|
2550
2574
|
labelInnerClass: "pr-2"
|
|
2551
2575
|
}
|
|
2552
2576
|
),
|
|
2553
|
-
/* @__PURE__ */
|
|
2554
|
-
/* @__PURE__ */
|
|
2555
|
-
|
|
2577
|
+
/* @__PURE__ */ d("span", { ref: P, className: U, children: e }),
|
|
2578
|
+
/* @__PURE__ */ d(
|
|
2579
|
+
Tt,
|
|
2556
2580
|
{
|
|
2557
|
-
label:
|
|
2558
|
-
labelRef:
|
|
2559
|
-
labelClass:
|
|
2581
|
+
label: l,
|
|
2582
|
+
labelRef: S,
|
|
2583
|
+
labelClass: v,
|
|
2560
2584
|
labelInnerClass: "pl-2"
|
|
2561
2585
|
}
|
|
2562
2586
|
)
|
|
@@ -2564,12 +2588,12 @@ const yn = {
|
|
|
2564
2588
|
}
|
|
2565
2589
|
);
|
|
2566
2590
|
}
|
|
2567
|
-
),
|
|
2591
|
+
), Tt = ({
|
|
2568
2592
|
labelRef: e,
|
|
2569
2593
|
labelClass: t,
|
|
2570
2594
|
label: r,
|
|
2571
2595
|
labelInnerClass: a
|
|
2572
|
-
}) => /* @__PURE__ */
|
|
2596
|
+
}) => /* @__PURE__ */ d("span", { ref: e, className: t, children: r && /* @__PURE__ */ d("span", { className: a, children: r }) });
|
|
2573
2597
|
Pe.displayName = "ButtonIcon";
|
|
2574
2598
|
/*!
|
|
2575
2599
|
@versini/ui-button v4.2.4
|
|
@@ -2584,7 +2608,7 @@ try {
|
|
|
2584
2608
|
});
|
|
2585
2609
|
} catch {
|
|
2586
2610
|
}
|
|
2587
|
-
const
|
|
2611
|
+
const Tn = X.forwardRef(
|
|
2588
2612
|
({
|
|
2589
2613
|
children: e,
|
|
2590
2614
|
mode: t = "system",
|
|
@@ -2609,7 +2633,7 @@ const wn = X.forwardRef(
|
|
|
2609
2633
|
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
2610
2634
|
}
|
|
2611
2635
|
) : "";
|
|
2612
|
-
return /* @__PURE__ */
|
|
2636
|
+
return /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
|
|
2613
2637
|
Pe,
|
|
2614
2638
|
{
|
|
2615
2639
|
className: p("justify-center", r),
|
|
@@ -2622,7 +2646,7 @@ const wn = X.forwardRef(
|
|
|
2622
2646
|
) });
|
|
2623
2647
|
}
|
|
2624
2648
|
);
|
|
2625
|
-
|
|
2649
|
+
Tn.displayName = "ButtonSort";
|
|
2626
2650
|
/*!
|
|
2627
2651
|
@versini/ui-card v3.0.13
|
|
2628
2652
|
© 2025 gizmette.com
|
|
@@ -2636,12 +2660,12 @@ try {
|
|
|
2636
2660
|
});
|
|
2637
2661
|
} catch {
|
|
2638
2662
|
}
|
|
2639
|
-
const
|
|
2640
|
-
function
|
|
2641
|
-
const t =
|
|
2663
|
+
const Re = "av-card";
|
|
2664
|
+
function Sn(e) {
|
|
2665
|
+
const t = Nt();
|
|
2642
2666
|
return `${e}${t}`;
|
|
2643
2667
|
}
|
|
2644
|
-
const
|
|
2668
|
+
const _n = ({
|
|
2645
2669
|
className: e,
|
|
2646
2670
|
headerClassName: t,
|
|
2647
2671
|
bodyClassName: r,
|
|
@@ -2651,7 +2675,7 @@ const In = ({
|
|
|
2651
2675
|
noBorder: s
|
|
2652
2676
|
}) => {
|
|
2653
2677
|
const i = p(
|
|
2654
|
-
|
|
2678
|
+
Re,
|
|
2655
2679
|
"rounded-md",
|
|
2656
2680
|
{
|
|
2657
2681
|
"border-none": s,
|
|
@@ -2665,7 +2689,7 @@ const In = ({
|
|
|
2665
2689
|
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": n === "alt-system"
|
|
2666
2690
|
},
|
|
2667
2691
|
e
|
|
2668
|
-
),
|
|
2692
|
+
), c = t || p(`${Re}__header mt-0 border-b-2`, {
|
|
2669
2693
|
"text-copy-light border-border-accent": n === "darker",
|
|
2670
2694
|
"border-border-accent": n === "dark",
|
|
2671
2695
|
"border-border-medium": n === "light",
|
|
@@ -2673,23 +2697,23 @@ const In = ({
|
|
|
2673
2697
|
"border-border-accent dark:border-border-medium": n === "alt-system",
|
|
2674
2698
|
"mb-4": !o,
|
|
2675
2699
|
"mb-2": o
|
|
2676
|
-
}),
|
|
2700
|
+
}), f = p(r), h = a || p(`${Re}__footer pt-2`);
|
|
2677
2701
|
return {
|
|
2678
2702
|
wrapper: i,
|
|
2679
|
-
header:
|
|
2680
|
-
body:
|
|
2681
|
-
footer:
|
|
2703
|
+
header: c,
|
|
2704
|
+
body: f,
|
|
2705
|
+
footer: h
|
|
2682
2706
|
};
|
|
2683
2707
|
};
|
|
2684
|
-
function
|
|
2708
|
+
function kn({
|
|
2685
2709
|
id: e,
|
|
2686
2710
|
content: t,
|
|
2687
2711
|
userAriaLabelledby: r,
|
|
2688
2712
|
className: a
|
|
2689
2713
|
}) {
|
|
2690
|
-
return typeof t == "string" ? /* @__PURE__ */
|
|
2714
|
+
return typeof t == "string" ? /* @__PURE__ */ d("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ d("div", { className: a, children: t }) : t ? /* @__PURE__ */ d("div", { className: a, id: e, children: t }) : null;
|
|
2691
2715
|
}
|
|
2692
|
-
const
|
|
2716
|
+
const An = ({
|
|
2693
2717
|
header: e,
|
|
2694
2718
|
headerClassName: t,
|
|
2695
2719
|
footer: r,
|
|
@@ -2698,41 +2722,41 @@ const _n = ({
|
|
|
2698
2722
|
className: o,
|
|
2699
2723
|
bodyClassName: s,
|
|
2700
2724
|
"aria-labelledby": i,
|
|
2701
|
-
mode:
|
|
2702
|
-
compact:
|
|
2703
|
-
noBorder:
|
|
2704
|
-
...
|
|
2725
|
+
mode: c = "system",
|
|
2726
|
+
compact: f = !1,
|
|
2727
|
+
noBorder: h = !1,
|
|
2728
|
+
...m
|
|
2705
2729
|
}) => {
|
|
2706
|
-
let
|
|
2707
|
-
const y = typeof e == "string",
|
|
2730
|
+
let l = null, u = null;
|
|
2731
|
+
const y = typeof e == "string", E = Sn(Re), T = _n({
|
|
2708
2732
|
className: o,
|
|
2709
2733
|
headerClassName: t,
|
|
2710
2734
|
bodyClassName: s,
|
|
2711
2735
|
footerClassName: a,
|
|
2712
|
-
mode:
|
|
2713
|
-
compact:
|
|
2714
|
-
noBorder:
|
|
2736
|
+
mode: c,
|
|
2737
|
+
compact: f,
|
|
2738
|
+
noBorder: h
|
|
2715
2739
|
});
|
|
2716
|
-
return y ? (
|
|
2740
|
+
return y ? (l = E, u = l) : !y && e && i ? (l = null, u = i) : !y && e && !i ? (l = E, u = l) : (l = null, u = i || null), /* @__PURE__ */ d("div", { className: T.wrapper, children: /* @__PURE__ */ $(
|
|
2717
2741
|
"section",
|
|
2718
2742
|
{
|
|
2719
|
-
...
|
|
2720
|
-
"aria-labelledby":
|
|
2743
|
+
...u && {
|
|
2744
|
+
"aria-labelledby": u
|
|
2721
2745
|
},
|
|
2722
2746
|
className: T.body,
|
|
2723
|
-
...
|
|
2747
|
+
...m,
|
|
2724
2748
|
children: [
|
|
2725
|
-
/* @__PURE__ */
|
|
2726
|
-
|
|
2749
|
+
/* @__PURE__ */ d(
|
|
2750
|
+
kn,
|
|
2727
2751
|
{
|
|
2728
|
-
...
|
|
2752
|
+
...l && { id: l },
|
|
2729
2753
|
content: e,
|
|
2730
2754
|
className: T.header,
|
|
2731
2755
|
userAriaLabelledby: i
|
|
2732
2756
|
}
|
|
2733
2757
|
),
|
|
2734
|
-
/* @__PURE__ */
|
|
2735
|
-
r ? /* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ d("div", { children: n }),
|
|
2759
|
+
r ? /* @__PURE__ */ d("div", { className: T.footer, children: r }) : null
|
|
2736
2760
|
]
|
|
2737
2761
|
}
|
|
2738
2762
|
) });
|
|
@@ -2745,25 +2769,25 @@ const _n = ({
|
|
|
2745
2769
|
size: o,
|
|
2746
2770
|
title: s,
|
|
2747
2771
|
semantic: i = !1,
|
|
2748
|
-
...
|
|
2772
|
+
...c
|
|
2749
2773
|
}) => {
|
|
2750
|
-
const
|
|
2751
|
-
return /* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2774
|
+
const f = p(o, a);
|
|
2775
|
+
return /* @__PURE__ */ $(Ne, { children: [
|
|
2776
|
+
/* @__PURE__ */ d(
|
|
2753
2777
|
"svg",
|
|
2754
2778
|
{
|
|
2755
2779
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2756
|
-
className:
|
|
2780
|
+
className: f,
|
|
2757
2781
|
viewBox: r || n,
|
|
2758
2782
|
fill: t || "currentColor",
|
|
2759
2783
|
role: "img",
|
|
2760
2784
|
"aria-hidden": !i,
|
|
2761
2785
|
focusable: !1,
|
|
2762
|
-
...
|
|
2786
|
+
...c,
|
|
2763
2787
|
children: e
|
|
2764
2788
|
}
|
|
2765
2789
|
),
|
|
2766
|
-
s && i && /* @__PURE__ */
|
|
2790
|
+
s && i && /* @__PURE__ */ d("span", { className: "sr-only", children: s })
|
|
2767
2791
|
] });
|
|
2768
2792
|
};
|
|
2769
2793
|
/*!
|
|
@@ -2779,13 +2803,13 @@ try {
|
|
|
2779
2803
|
});
|
|
2780
2804
|
} catch {
|
|
2781
2805
|
}
|
|
2782
|
-
const
|
|
2806
|
+
const Rn = ({
|
|
2783
2807
|
className: e,
|
|
2784
2808
|
viewBox: t,
|
|
2785
2809
|
title: r,
|
|
2786
2810
|
monotone: a,
|
|
2787
2811
|
...n
|
|
2788
|
-
}) => /* @__PURE__ */
|
|
2812
|
+
}) => /* @__PURE__ */ d(
|
|
2789
2813
|
He,
|
|
2790
2814
|
{
|
|
2791
2815
|
defaultViewBox: "0 0 1200 500",
|
|
@@ -2794,15 +2818,15 @@ const kn = ({
|
|
|
2794
2818
|
className: e,
|
|
2795
2819
|
title: r || "Dog",
|
|
2796
2820
|
...n,
|
|
2797
|
-
children: /* @__PURE__ */
|
|
2821
|
+
children: /* @__PURE__ */ d("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
|
|
2798
2822
|
}
|
|
2799
|
-
),
|
|
2823
|
+
), Nn = ({
|
|
2800
2824
|
className: e,
|
|
2801
2825
|
viewBox: t,
|
|
2802
2826
|
title: r,
|
|
2803
2827
|
monotone: a,
|
|
2804
2828
|
...n
|
|
2805
|
-
}) => /* @__PURE__ */
|
|
2829
|
+
}) => /* @__PURE__ */ $(
|
|
2806
2830
|
He,
|
|
2807
2831
|
{
|
|
2808
2832
|
defaultViewBox: "0 0 640 512",
|
|
@@ -2812,17 +2836,17 @@ const kn = ({
|
|
|
2812
2836
|
title: r || "Hide",
|
|
2813
2837
|
...n,
|
|
2814
2838
|
children: [
|
|
2815
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ d(
|
|
2816
2840
|
"path",
|
|
2817
2841
|
{
|
|
2818
2842
|
d: "M0 256c0 4.2.8 8.4 2.5 12.3C17.3 304 48.6 356 95.4 399.4 142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144 0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6-1.6 4-2.4 8.2-2.4 12.4M135.2 80.7l71.8 56.2c23.1-15.7 51-24.9 81-24.9 79.5 0 144 64.5 144 144 0 17.7-3.2 34.6-9 50.2 28 22 56.1 44 84.1 65.9 32.3-36.6 54.6-75.4 66.4-103.9 1.6-3.9 2.5-8.1 2.5-12.3s-.8-8.4-2.5-12.3c-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.7M192 260.1c.3 6.9 1.3 13.8 3.2 20.7 13.7 51.2 66.4 81.6 117.6 67.9 1.9-.5 3.9-1.1 5.7-1.7l-120-94.6c-3.7.8-6.7 3.7-6.5 7.7m92.7-88.4c2.1 6.4 3.3 13.2 3.3 20.3 0 2.7-.2 5.4-.5 8 31.6 24.8 63.2 49.5 94.8 74.3 2.7-13.9 2.4-28.6-1.5-43.2-11.1-41.5-47.8-69.4-88.6-71.1-5.8-.2-9.2 6.1-7.4 11.7z",
|
|
2819
2843
|
opacity: a ? "1" : "0.4"
|
|
2820
2844
|
}
|
|
2821
2845
|
),
|
|
2822
|
-
/* @__PURE__ */
|
|
2846
|
+
/* @__PURE__ */ d("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
|
|
2823
2847
|
]
|
|
2824
2848
|
}
|
|
2825
|
-
),
|
|
2849
|
+
), vn = ({
|
|
2826
2850
|
className: e,
|
|
2827
2851
|
viewBox: t,
|
|
2828
2852
|
title: r,
|
|
@@ -2830,7 +2854,7 @@ const kn = ({
|
|
|
2830
2854
|
...n
|
|
2831
2855
|
}) => {
|
|
2832
2856
|
const o = a ? "1" : "0.4";
|
|
2833
|
-
return /* @__PURE__ */
|
|
2857
|
+
return /* @__PURE__ */ $(
|
|
2834
2858
|
He,
|
|
2835
2859
|
{
|
|
2836
2860
|
defaultViewBox: "0 0 190 190",
|
|
@@ -2840,31 +2864,31 @@ const kn = ({
|
|
|
2840
2864
|
title: r || "Passkey",
|
|
2841
2865
|
...n,
|
|
2842
2866
|
children: [
|
|
2843
|
-
/* @__PURE__ */
|
|
2867
|
+
/* @__PURE__ */ d(
|
|
2844
2868
|
"path",
|
|
2845
2869
|
{
|
|
2846
2870
|
d: "M172.32 96.79c0 13.78-8.48 25.5-20.29 29.78l7.14 11.83-10.57 13 10.57 12.71-17.04 22.87-12.01-12.82V125.7c-10.68-4.85-18.15-15.97-18.15-28.91 0-17.4 13.51-31.51 30.18-31.51 16.66 0 30.17 14.11 30.17 31.51m-30.18 4.82c4.02 0 7.28-3.4 7.28-7.6s-3.26-7.61-7.28-7.61-7.28 3.4-7.28 7.61c-.01 4.2 3.26 7.6 7.28 7.6",
|
|
2847
2871
|
opacity: o
|
|
2848
2872
|
}
|
|
2849
2873
|
),
|
|
2850
|
-
/* @__PURE__ */
|
|
2874
|
+
/* @__PURE__ */ d(
|
|
2851
2875
|
"path",
|
|
2852
2876
|
{
|
|
2853
2877
|
d: "M172.41 96.88c0 13.62-8.25 25.23-19.83 29.67l6.58 11.84-9.73 13 9.73 12.71-17.03 23.05v-85.54c4.02 0 7.28-3.41 7.28-7.6 0-4.2-3.26-7.61-7.28-7.61V65.28c16.73 0 30.28 14.15 30.28 31.6",
|
|
2854
2878
|
opacity: o
|
|
2855
2879
|
}
|
|
2856
2880
|
),
|
|
2857
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ d("path", { d: "M120.24 131.43c-9.75-8-16.3-20.3-17.2-34.27H50.8c-10.96 0-19.84 9.01-19.84 20.13v25.17c0 5.56 4.44 10.07 9.92 10.07h69.44c5.48 0 9.92-4.51 9.92-10.07zM73.16 91.13c-2.42-.46-4.82-.89-7.11-1.86-8.65-3.63-13.69-10.32-15.32-19.77-1.12-6.47-.59-12.87 2.03-18.92 3.72-8.6 10.39-13.26 19.15-14.84 5.24-.94 10.46-.73 15.5 1.15 7.59 2.82 12.68 8.26 15.03 16.24 2.38 8.05 2.03 16.1-1.56 23.72-3.72 7.96-10.21 12.23-18.42 13.9-.68.14-1.37.27-2.05.41-2.41-.03-4.83-.03-7.25-.03" })
|
|
2858
2882
|
]
|
|
2859
2883
|
}
|
|
2860
2884
|
);
|
|
2861
|
-
},
|
|
2885
|
+
}, xn = ({
|
|
2862
2886
|
className: e,
|
|
2863
2887
|
viewBox: t,
|
|
2864
2888
|
title: r,
|
|
2865
2889
|
monotone: a,
|
|
2866
2890
|
...n
|
|
2867
|
-
}) => /* @__PURE__ */
|
|
2891
|
+
}) => /* @__PURE__ */ $(
|
|
2868
2892
|
He,
|
|
2869
2893
|
{
|
|
2870
2894
|
defaultViewBox: "0 0 576 512",
|
|
@@ -2874,14 +2898,14 @@ const kn = ({
|
|
|
2874
2898
|
title: r || "Show",
|
|
2875
2899
|
...n,
|
|
2876
2900
|
children: [
|
|
2877
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ d(
|
|
2878
2902
|
"path",
|
|
2879
2903
|
{
|
|
2880
2904
|
d: "M0 256c0 4.2.8 8.4 2.5 12.3C17.3 304 48.6 356 95.4 399.4 142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1 1.6-3.9 2.5-8.1 2.5-12.3s-.8-8.4-2.5-12.3c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32S142.5 68.8 95.4 112.6C48.6 156 17.3 208 2.5 243.7.8 247.6 0 251.8 0 256m432 0a144 144 0 1 1-288 0 144 144 0 1 1 288 0",
|
|
2881
2905
|
opacity: a ? "1" : "0.4"
|
|
2882
2906
|
}
|
|
2883
2907
|
),
|
|
2884
|
-
/* @__PURE__ */
|
|
2908
|
+
/* @__PURE__ */ d("path", { d: "M224 256c35.3 0 64-28.7 64-64 0-7.1-1.2-13.9-3.3-20.3-1.8-5.5 1.6-11.9 7.4-11.7 40.8 1.7 77.5 29.6 88.6 71.1 13.7 51.2-16.7 103.9-67.9 117.6S208.9 332 195.2 280.8c-1.9-6.9-2.9-13.9-3.2-20.7-.3-5.8 6.1-9.2 11.7-7.4 6.4 2.1 13.2 3.3 20.3 3.3" })
|
|
2885
2909
|
]
|
|
2886
2910
|
}
|
|
2887
2911
|
);
|
|
@@ -2911,7 +2935,7 @@ try {
|
|
|
2911
2935
|
});
|
|
2912
2936
|
} catch {
|
|
2913
2937
|
}
|
|
2914
|
-
const
|
|
2938
|
+
const Cn = "av-main", On = ({
|
|
2915
2939
|
children: e,
|
|
2916
2940
|
className: t,
|
|
2917
2941
|
raw: r = !1,
|
|
@@ -2919,7 +2943,7 @@ const vn = "av-main", xn = ({
|
|
|
2919
2943
|
noPadding: n = !1
|
|
2920
2944
|
}) => {
|
|
2921
2945
|
const o = p(
|
|
2922
|
-
|
|
2946
|
+
Cn,
|
|
2923
2947
|
{
|
|
2924
2948
|
"mt-2 sm:mt-3": !r && !a,
|
|
2925
2949
|
"p-2": !r && !n,
|
|
@@ -2927,11 +2951,11 @@ const vn = "av-main", xn = ({
|
|
|
2927
2951
|
},
|
|
2928
2952
|
t
|
|
2929
2953
|
);
|
|
2930
|
-
return /* @__PURE__ */
|
|
2931
|
-
},
|
|
2954
|
+
return /* @__PURE__ */ d("main", { className: o, children: e });
|
|
2955
|
+
}, Pn = "av-flexgrid", ke = "av-flexgrid-item", De = 0.25, et = X.createContext({
|
|
2932
2956
|
columnGap: 0,
|
|
2933
2957
|
rowGap: 0
|
|
2934
|
-
}),
|
|
2958
|
+
}), Dn = ({
|
|
2935
2959
|
children: e,
|
|
2936
2960
|
className: t,
|
|
2937
2961
|
columnGap: r = 1,
|
|
@@ -2940,13 +2964,13 @@ const vn = "av-main", xn = ({
|
|
|
2940
2964
|
width: o = "auto",
|
|
2941
2965
|
direction: s = "row",
|
|
2942
2966
|
alignHorizontal: i = "normal",
|
|
2943
|
-
alignVertical:
|
|
2944
|
-
...
|
|
2967
|
+
alignVertical: c = "normal",
|
|
2968
|
+
...f
|
|
2945
2969
|
}) => {
|
|
2946
|
-
const
|
|
2970
|
+
const h = {
|
|
2947
2971
|
flexDirection: s,
|
|
2948
2972
|
justifyContent: i,
|
|
2949
|
-
alignItems:
|
|
2973
|
+
alignItems: c,
|
|
2950
2974
|
height: n,
|
|
2951
2975
|
width: o,
|
|
2952
2976
|
/**
|
|
@@ -2956,11 +2980,11 @@ const vn = "av-main", xn = ({
|
|
|
2956
2980
|
*/
|
|
2957
2981
|
marginLeft: r * -1 * De + "rem",
|
|
2958
2982
|
marginTop: a * -1 * De + "rem"
|
|
2959
|
-
},
|
|
2960
|
-
|
|
2983
|
+
}, m = p(
|
|
2984
|
+
Pn,
|
|
2961
2985
|
"box-border flex flex-wrap"
|
|
2962
|
-
),
|
|
2963
|
-
return t ? /* @__PURE__ */
|
|
2986
|
+
), l = { columnGap: r, rowGap: a };
|
|
2987
|
+
return t ? /* @__PURE__ */ d("div", { className: t, children: /* @__PURE__ */ d("div", { className: m, style: h, ...f, children: /* @__PURE__ */ d(et.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ d("div", { className: m, style: h, ...f, children: /* @__PURE__ */ d(et.Provider, { value: l, children: e }) });
|
|
2964
2988
|
}, ze = (e, t) => p({
|
|
2965
2989
|
"basis-1/12": e === 1 && !t,
|
|
2966
2990
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -3034,43 +3058,43 @@ const vn = "av-main", xn = ({
|
|
|
3034
3058
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3035
3059
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3036
3060
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3037
|
-
}),
|
|
3061
|
+
}), Ln = ({
|
|
3038
3062
|
className: e,
|
|
3039
3063
|
span: t
|
|
3040
3064
|
}) => {
|
|
3041
3065
|
if (!t)
|
|
3042
|
-
return p(e,
|
|
3066
|
+
return p(e, ke, "box-border basis-auto");
|
|
3043
3067
|
if (typeof t == "number")
|
|
3044
|
-
return p(e,
|
|
3068
|
+
return p(e, ke, "box-border max-w-full", {
|
|
3045
3069
|
[`${ze(t)}`]: !0
|
|
3046
3070
|
});
|
|
3047
3071
|
if (typeof t == "string")
|
|
3048
|
-
return p(e,
|
|
3072
|
+
return p(e, ke, "box-border basis-auto", {
|
|
3049
3073
|
"max-w-full grow": t === "auto"
|
|
3050
3074
|
});
|
|
3051
3075
|
if (typeof t == "object") {
|
|
3052
3076
|
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? ze(n) : ze(n, a));
|
|
3053
3077
|
return p(
|
|
3054
3078
|
e,
|
|
3055
|
-
|
|
3079
|
+
ke,
|
|
3056
3080
|
"box-border",
|
|
3057
3081
|
r
|
|
3058
3082
|
);
|
|
3059
3083
|
}
|
|
3060
|
-
},
|
|
3084
|
+
}, ae = ({
|
|
3061
3085
|
children: e,
|
|
3062
3086
|
className: t,
|
|
3063
3087
|
span: r,
|
|
3064
3088
|
...a
|
|
3065
3089
|
}) => {
|
|
3066
|
-
const { columnGap: n, rowGap: o } =
|
|
3090
|
+
const { columnGap: n, rowGap: o } = Rt(et), s = {
|
|
3067
3091
|
paddingLeft: n * De + "rem",
|
|
3068
3092
|
paddingTop: o * De + "rem"
|
|
3069
|
-
}, i =
|
|
3093
|
+
}, i = Ln({
|
|
3070
3094
|
className: t,
|
|
3071
3095
|
span: r
|
|
3072
3096
|
});
|
|
3073
|
-
return /* @__PURE__ */
|
|
3097
|
+
return /* @__PURE__ */ d("div", { className: i, style: s, ...a, children: e });
|
|
3074
3098
|
};
|
|
3075
3099
|
/*!
|
|
3076
3100
|
@versini/ui-system v3.0.8
|
|
@@ -3085,14 +3109,14 @@ try {
|
|
|
3085
3109
|
});
|
|
3086
3110
|
} catch {
|
|
3087
3111
|
}
|
|
3088
|
-
const
|
|
3089
|
-
function
|
|
3090
|
-
const e =
|
|
3091
|
-
return
|
|
3112
|
+
const ar = "av-text-input", $n = "av-text-input-wrapper", qe = "av-text-input-helper-text";
|
|
3113
|
+
function Mn() {
|
|
3114
|
+
const e = C(!1);
|
|
3115
|
+
return G(() => (e.current = !0, () => {
|
|
3092
3116
|
e.current = !1;
|
|
3093
3117
|
}), []), q(() => e.current, []);
|
|
3094
3118
|
}
|
|
3095
|
-
const
|
|
3119
|
+
const Un = {
|
|
3096
3120
|
x: 0,
|
|
3097
3121
|
y: 0,
|
|
3098
3122
|
width: 0,
|
|
@@ -3102,19 +3126,19 @@ const $n = {
|
|
|
3102
3126
|
bottom: 0,
|
|
3103
3127
|
right: 0
|
|
3104
3128
|
};
|
|
3105
|
-
function
|
|
3106
|
-
const t =
|
|
3107
|
-
const
|
|
3108
|
-
|
|
3109
|
-
a.current && t() && o(
|
|
3129
|
+
function Kn(e) {
|
|
3130
|
+
const t = Mn(), r = C(0), a = C(null), [n, o] = z(Un), s = Le(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3131
|
+
const c = i[0];
|
|
3132
|
+
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3133
|
+
a.current && t() && o(c.contentRect);
|
|
3110
3134
|
}));
|
|
3111
3135
|
}), [t]);
|
|
3112
|
-
return
|
|
3136
|
+
return G(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
3113
3137
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3114
3138
|
}), [s, e]), [a, n];
|
|
3115
3139
|
}
|
|
3116
|
-
function
|
|
3117
|
-
const t =
|
|
3140
|
+
function Hn(e) {
|
|
3141
|
+
const t = Nt();
|
|
3118
3142
|
if (!e)
|
|
3119
3143
|
return t;
|
|
3120
3144
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3124,7 +3148,7 @@ function Un(e) {
|
|
|
3124
3148
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3125
3149
|
}
|
|
3126
3150
|
}
|
|
3127
|
-
const
|
|
3151
|
+
const nr = "SET_ANNOUNCEMENT", or = "CLEAR_ANNOUNCEMENT", Wn = {
|
|
3128
3152
|
alert: null,
|
|
3129
3153
|
alertdialog: null,
|
|
3130
3154
|
log: "polite",
|
|
@@ -3132,14 +3156,14 @@ const er = "SET_ANNOUNCEMENT", tr = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3132
3156
|
progressbar: null,
|
|
3133
3157
|
status: "polite",
|
|
3134
3158
|
timer: "assertive"
|
|
3135
|
-
},
|
|
3159
|
+
}, Bn = (e, t) => {
|
|
3136
3160
|
switch (t == null ? void 0 : t.type) {
|
|
3137
|
-
case
|
|
3161
|
+
case nr:
|
|
3138
3162
|
return {
|
|
3139
3163
|
...e,
|
|
3140
3164
|
announcement: t.payload
|
|
3141
3165
|
};
|
|
3142
|
-
case
|
|
3166
|
+
case or:
|
|
3143
3167
|
return {
|
|
3144
3168
|
...e,
|
|
3145
3169
|
announcement: null
|
|
@@ -3147,14 +3171,14 @@ const er = "SET_ANNOUNCEMENT", tr = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3147
3171
|
default:
|
|
3148
3172
|
return e;
|
|
3149
3173
|
}
|
|
3150
|
-
},
|
|
3174
|
+
}, Vn = ({
|
|
3151
3175
|
onAnnouncementClear: e,
|
|
3152
3176
|
dispatch: t
|
|
3153
3177
|
}) => {
|
|
3154
3178
|
t({
|
|
3155
|
-
type:
|
|
3179
|
+
type: or
|
|
3156
3180
|
}), typeof e == "function" && e();
|
|
3157
|
-
},
|
|
3181
|
+
}, St = ({
|
|
3158
3182
|
children: e,
|
|
3159
3183
|
clearAnnouncementDelay: t,
|
|
3160
3184
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -3162,16 +3186,16 @@ const er = "SET_ANNOUNCEMENT", tr = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3162
3186
|
dispatch: n
|
|
3163
3187
|
}) => {
|
|
3164
3188
|
clearTimeout(r.current), e !== null && n({
|
|
3165
|
-
type:
|
|
3189
|
+
type: nr,
|
|
3166
3190
|
payload: e
|
|
3167
3191
|
}), t && (r.current = setTimeout(
|
|
3168
|
-
() =>
|
|
3192
|
+
() => Vn({
|
|
3169
3193
|
onAnnouncementClear: a,
|
|
3170
3194
|
dispatch: n
|
|
3171
3195
|
}),
|
|
3172
3196
|
t
|
|
3173
3197
|
));
|
|
3174
|
-
},
|
|
3198
|
+
}, Jn = ({
|
|
3175
3199
|
children: e,
|
|
3176
3200
|
announcementTimeoutRef: t,
|
|
3177
3201
|
announcementDelay: r,
|
|
@@ -3180,13 +3204,13 @@ const er = "SET_ANNOUNCEMENT", tr = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3180
3204
|
onAnnouncementClear: o,
|
|
3181
3205
|
dispatch: s
|
|
3182
3206
|
}) => {
|
|
3183
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
3207
|
+
clearTimeout(t.current), r ? t.current = setTimeout(St, r, {
|
|
3184
3208
|
children: e,
|
|
3185
3209
|
clearAnnouncementDelay: a,
|
|
3186
3210
|
clearAnnouncementTimeoutRef: n,
|
|
3187
3211
|
onAnnouncementClear: o,
|
|
3188
3212
|
dispatch: s
|
|
3189
|
-
}) :
|
|
3213
|
+
}) : St({
|
|
3190
3214
|
children: e,
|
|
3191
3215
|
clearAnnouncementDelay: a,
|
|
3192
3216
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -3194,7 +3218,7 @@ const er = "SET_ANNOUNCEMENT", tr = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3194
3218
|
dispatch: s
|
|
3195
3219
|
});
|
|
3196
3220
|
};
|
|
3197
|
-
function
|
|
3221
|
+
function sr({
|
|
3198
3222
|
children: e,
|
|
3199
3223
|
className: t,
|
|
3200
3224
|
politeness: r,
|
|
@@ -3203,21 +3227,21 @@ function rr({
|
|
|
3203
3227
|
clearAnnouncementDelay: o,
|
|
3204
3228
|
onAnnouncementClear: s,
|
|
3205
3229
|
visible: i,
|
|
3206
|
-
...
|
|
3230
|
+
...c
|
|
3207
3231
|
}) {
|
|
3208
|
-
const
|
|
3232
|
+
const f = C(null), h = C(null), [m, l] = At(Bn, {
|
|
3209
3233
|
announcement: null
|
|
3210
3234
|
});
|
|
3211
|
-
let
|
|
3212
|
-
typeof
|
|
3213
|
-
|
|
3214
|
-
announcementTimeoutRef:
|
|
3235
|
+
let u = r;
|
|
3236
|
+
typeof u > "u" && (u = a ? Wn[a] : "assertive"), G(() => {
|
|
3237
|
+
Jn({
|
|
3238
|
+
announcementTimeoutRef: f,
|
|
3215
3239
|
announcementDelay: n,
|
|
3216
3240
|
children: e,
|
|
3217
3241
|
clearAnnouncementDelay: o,
|
|
3218
|
-
clearAnnouncementTimeoutRef:
|
|
3242
|
+
clearAnnouncementTimeoutRef: h,
|
|
3219
3243
|
onAnnouncementClear: s,
|
|
3220
|
-
dispatch:
|
|
3244
|
+
dispatch: l
|
|
3221
3245
|
});
|
|
3222
3246
|
}, [
|
|
3223
3247
|
e,
|
|
@@ -3228,14 +3252,14 @@ function rr({
|
|
|
3228
3252
|
const y = p(t, {
|
|
3229
3253
|
"sr-only": !i
|
|
3230
3254
|
});
|
|
3231
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ d(
|
|
3232
3256
|
"div",
|
|
3233
3257
|
{
|
|
3234
|
-
"aria-live":
|
|
3258
|
+
"aria-live": u,
|
|
3235
3259
|
...a && { role: a },
|
|
3236
3260
|
className: y,
|
|
3237
|
-
...
|
|
3238
|
-
children:
|
|
3261
|
+
...c,
|
|
3262
|
+
children: m.announcement
|
|
3239
3263
|
}
|
|
3240
3264
|
);
|
|
3241
3265
|
}
|
|
@@ -3252,21 +3276,21 @@ try {
|
|
|
3252
3276
|
});
|
|
3253
3277
|
} catch {
|
|
3254
3278
|
}
|
|
3255
|
-
const
|
|
3279
|
+
const Gn = ({
|
|
3256
3280
|
mode: e
|
|
3257
3281
|
}) => p({
|
|
3258
3282
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3259
3283
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3260
3284
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3261
3285
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3262
|
-
}),
|
|
3286
|
+
}), Yn = ({
|
|
3263
3287
|
focusMode: e
|
|
3264
3288
|
}) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3265
3289
|
"focus:outline-focus-dark": e === "dark",
|
|
3266
3290
|
"focus:outline-focus-light": e === "light",
|
|
3267
3291
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3268
3292
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3269
|
-
}),
|
|
3293
|
+
}), Fn = ({
|
|
3270
3294
|
noBorder: e,
|
|
3271
3295
|
error: t
|
|
3272
3296
|
}) => p("border-2", {
|
|
@@ -3274,7 +3298,7 @@ const Vn = ({
|
|
|
3274
3298
|
"focus:border-border-dark": !e && t,
|
|
3275
3299
|
"border-border-error-dark": !e && t,
|
|
3276
3300
|
"border-transparent": e
|
|
3277
|
-
}),
|
|
3301
|
+
}), jn = ({
|
|
3278
3302
|
disabled: e,
|
|
3279
3303
|
raw: t,
|
|
3280
3304
|
error: r,
|
|
@@ -3298,7 +3322,7 @@ const Vn = ({
|
|
|
3298
3322
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3299
3323
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3300
3324
|
});
|
|
3301
|
-
},
|
|
3325
|
+
}, zn = ({
|
|
3302
3326
|
error: e,
|
|
3303
3327
|
raw: t,
|
|
3304
3328
|
mode: r,
|
|
@@ -3325,7 +3349,7 @@ const Vn = ({
|
|
|
3325
3349
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3326
3350
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3327
3351
|
});
|
|
3328
|
-
},
|
|
3352
|
+
}, qn = ({
|
|
3329
3353
|
className: e,
|
|
3330
3354
|
inputClassName: t,
|
|
3331
3355
|
raw: r,
|
|
@@ -3334,60 +3358,60 @@ const Vn = ({
|
|
|
3334
3358
|
error: o,
|
|
3335
3359
|
mode: s,
|
|
3336
3360
|
focusMode: i,
|
|
3337
|
-
size:
|
|
3338
|
-
rightElementClassName:
|
|
3361
|
+
size: c,
|
|
3362
|
+
rightElementClassName: f
|
|
3339
3363
|
}) => {
|
|
3340
|
-
const
|
|
3364
|
+
const h = r ? e : p(
|
|
3341
3365
|
"relative flex w-full flex-col justify-center",
|
|
3342
|
-
|
|
3366
|
+
$n,
|
|
3343
3367
|
e
|
|
3344
3368
|
);
|
|
3345
|
-
let
|
|
3346
|
-
switch (
|
|
3369
|
+
let m = "";
|
|
3370
|
+
switch (c) {
|
|
3347
3371
|
case "xs":
|
|
3348
|
-
|
|
3372
|
+
m = "h-8";
|
|
3349
3373
|
break;
|
|
3350
3374
|
case "sm":
|
|
3351
|
-
|
|
3375
|
+
m = "h-10";
|
|
3352
3376
|
break;
|
|
3353
3377
|
case "lg":
|
|
3354
|
-
|
|
3378
|
+
m = "h-14";
|
|
3355
3379
|
break;
|
|
3356
3380
|
case "xl":
|
|
3357
|
-
|
|
3381
|
+
m = "h-16";
|
|
3358
3382
|
break;
|
|
3359
3383
|
default:
|
|
3360
|
-
|
|
3384
|
+
m = "h-12";
|
|
3361
3385
|
break;
|
|
3362
3386
|
}
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3365
|
-
|
|
3387
|
+
const l = r ? p(t) : p(
|
|
3388
|
+
ar,
|
|
3389
|
+
m,
|
|
3366
3390
|
"rounded-md text-base px-4",
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3391
|
+
Gn({ mode: s }),
|
|
3392
|
+
Yn({ focusMode: i }),
|
|
3393
|
+
Fn({ noBorder: n, error: o }),
|
|
3370
3394
|
{
|
|
3371
3395
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3372
3396
|
},
|
|
3373
3397
|
t
|
|
3374
|
-
),
|
|
3398
|
+
), u = r ? void 0 : "sr-only", y = jn({
|
|
3375
3399
|
disabled: a,
|
|
3376
3400
|
raw: r,
|
|
3377
3401
|
error: o,
|
|
3378
3402
|
mode: s
|
|
3379
|
-
}),
|
|
3403
|
+
}), E = zn({
|
|
3380
3404
|
error: o,
|
|
3381
3405
|
raw: r,
|
|
3382
3406
|
mode: s,
|
|
3383
3407
|
disabled: a
|
|
3384
|
-
}), T = r ? void 0 : p("absolute right-3",
|
|
3408
|
+
}), T = r ? void 0 : p("absolute right-3", f);
|
|
3385
3409
|
return {
|
|
3386
|
-
wrapper:
|
|
3387
|
-
input:
|
|
3388
|
-
accessibleLabel:
|
|
3410
|
+
wrapper: h,
|
|
3411
|
+
input: l,
|
|
3412
|
+
accessibleLabel: u,
|
|
3389
3413
|
visibleLabel: y,
|
|
3390
|
-
helperText:
|
|
3414
|
+
helperText: E,
|
|
3391
3415
|
rightElement: T
|
|
3392
3416
|
};
|
|
3393
3417
|
}, ot = X.forwardRef(
|
|
@@ -3400,104 +3424,104 @@ const Vn = ({
|
|
|
3400
3424
|
className: o,
|
|
3401
3425
|
inputClassName: s,
|
|
3402
3426
|
mode: i = "system",
|
|
3403
|
-
focusMode:
|
|
3404
|
-
disabled:
|
|
3405
|
-
noBorder:
|
|
3406
|
-
labelId:
|
|
3407
|
-
labelHidden:
|
|
3408
|
-
type:
|
|
3427
|
+
focusMode: c = "system",
|
|
3428
|
+
disabled: f = !1,
|
|
3429
|
+
noBorder: h = !1,
|
|
3430
|
+
labelId: m,
|
|
3431
|
+
labelHidden: l = !1,
|
|
3432
|
+
type: u = "text",
|
|
3409
3433
|
helperText: y = "",
|
|
3410
|
-
rightElement:
|
|
3434
|
+
rightElement: E,
|
|
3411
3435
|
rightElementClassName: T,
|
|
3412
|
-
size:
|
|
3413
|
-
...
|
|
3414
|
-
},
|
|
3415
|
-
const [
|
|
3436
|
+
size: _ = "md",
|
|
3437
|
+
...F
|
|
3438
|
+
}, M) => {
|
|
3439
|
+
const [Q, L] = Kn(), [re, U] = z(0), v = Hn({ id: e, prefix: `${ar}-` }), S = `${t} error, ${y}`, K = C(null), w = C(null), O = {
|
|
3416
3440
|
xs: { label: "-25px", helperText: "30px" },
|
|
3417
3441
|
sm: { label: "-29px", helperText: "34px" },
|
|
3418
3442
|
md: { label: "-33px", helperText: "38px" },
|
|
3419
3443
|
lg: { label: "-15px", helperText: "22px" },
|
|
3420
3444
|
xl: { label: "-19px", helperText: "25px" }
|
|
3421
|
-
},
|
|
3445
|
+
}, P = qn({
|
|
3422
3446
|
className: o,
|
|
3423
3447
|
inputClassName: s,
|
|
3424
3448
|
error: a,
|
|
3425
3449
|
raw: n,
|
|
3426
|
-
focusMode:
|
|
3427
|
-
disabled:
|
|
3428
|
-
noBorder:
|
|
3450
|
+
focusMode: c,
|
|
3451
|
+
disabled: f,
|
|
3452
|
+
noBorder: h,
|
|
3429
3453
|
mode: i,
|
|
3430
|
-
size:
|
|
3454
|
+
size: _,
|
|
3431
3455
|
rightElementClassName: T
|
|
3432
3456
|
});
|
|
3433
|
-
return
|
|
3434
|
-
|
|
3435
|
-
}, [
|
|
3436
|
-
var
|
|
3437
|
-
const { label:
|
|
3438
|
-
(
|
|
3457
|
+
return ve(() => {
|
|
3458
|
+
L && L.width && U(L.width + 18 + 10);
|
|
3459
|
+
}, [L]), ve(() => {
|
|
3460
|
+
var B, Z;
|
|
3461
|
+
const { label: g, helperText: I } = O[_];
|
|
3462
|
+
(B = K == null ? void 0 : K.current) == null || B.style.setProperty("--av-text-input-label", g), (Z = w == null ? void 0 : w.current) == null || Z.style.setProperty(
|
|
3439
3463
|
"--av-text-input-helper-text",
|
|
3440
|
-
|
|
3464
|
+
I
|
|
3441
3465
|
);
|
|
3442
|
-
}, [
|
|
3443
|
-
/* @__PURE__ */
|
|
3466
|
+
}, [_]), /* @__PURE__ */ $("div", { className: P.wrapper, children: [
|
|
3467
|
+
/* @__PURE__ */ d(
|
|
3444
3468
|
"label",
|
|
3445
3469
|
{
|
|
3446
|
-
htmlFor:
|
|
3447
|
-
id:
|
|
3448
|
-
className:
|
|
3470
|
+
htmlFor: v,
|
|
3471
|
+
id: m,
|
|
3472
|
+
className: P.accessibleLabel,
|
|
3449
3473
|
children: r
|
|
3450
3474
|
}
|
|
3451
3475
|
),
|
|
3452
|
-
/* @__PURE__ */
|
|
3476
|
+
/* @__PURE__ */ d(
|
|
3453
3477
|
"input",
|
|
3454
3478
|
{
|
|
3455
|
-
ref:
|
|
3456
|
-
id:
|
|
3479
|
+
ref: M,
|
|
3480
|
+
id: v,
|
|
3457
3481
|
name: t,
|
|
3458
|
-
type:
|
|
3459
|
-
disabled:
|
|
3482
|
+
type: u,
|
|
3483
|
+
disabled: f,
|
|
3460
3484
|
placeholder: n ? void 0 : " ",
|
|
3461
|
-
className:
|
|
3462
|
-
...y && { "aria-describedby": `${
|
|
3485
|
+
className: P.input,
|
|
3486
|
+
...y && { "aria-describedby": `${v}-helper` },
|
|
3463
3487
|
...a && { "aria-invalid": "true" },
|
|
3464
|
-
...
|
|
3465
|
-
...
|
|
3488
|
+
...E && !n && { style: { paddingRight: re } },
|
|
3489
|
+
...F
|
|
3466
3490
|
}
|
|
3467
3491
|
),
|
|
3468
|
-
!n && !
|
|
3492
|
+
!n && !l && /* @__PURE__ */ d(
|
|
3469
3493
|
"label",
|
|
3470
3494
|
{
|
|
3471
3495
|
ref: K,
|
|
3472
3496
|
"aria-hidden": !0,
|
|
3473
|
-
htmlFor:
|
|
3474
|
-
className:
|
|
3497
|
+
htmlFor: v,
|
|
3498
|
+
className: P.visibleLabel,
|
|
3475
3499
|
children: r
|
|
3476
3500
|
}
|
|
3477
3501
|
),
|
|
3478
|
-
y && /* @__PURE__ */
|
|
3502
|
+
y && /* @__PURE__ */ d(
|
|
3479
3503
|
"div",
|
|
3480
3504
|
{
|
|
3481
|
-
ref:
|
|
3482
|
-
id: `${
|
|
3483
|
-
className:
|
|
3505
|
+
ref: w,
|
|
3506
|
+
id: `${v}-helper`,
|
|
3507
|
+
className: P.helperText,
|
|
3484
3508
|
children: y
|
|
3485
3509
|
}
|
|
3486
3510
|
),
|
|
3487
|
-
|
|
3511
|
+
E && /* @__PURE__ */ d(
|
|
3488
3512
|
"div",
|
|
3489
3513
|
{
|
|
3490
|
-
ref:
|
|
3491
|
-
className:
|
|
3492
|
-
children:
|
|
3514
|
+
ref: Q,
|
|
3515
|
+
className: P.rightElement,
|
|
3516
|
+
children: E
|
|
3493
3517
|
}
|
|
3494
3518
|
),
|
|
3495
|
-
a && y && /* @__PURE__ */
|
|
3519
|
+
a && y && /* @__PURE__ */ d(sr, { politeness: "polite", clearAnnouncementDelay: 500, children: S })
|
|
3496
3520
|
] });
|
|
3497
3521
|
}
|
|
3498
3522
|
);
|
|
3499
3523
|
ot.displayName = "TextInput";
|
|
3500
|
-
function
|
|
3524
|
+
function Xn(e) {
|
|
3501
3525
|
return Le(() => e.every((t) => t == null) ? () => {
|
|
3502
3526
|
} : (t) => {
|
|
3503
3527
|
e.forEach((r) => {
|
|
@@ -3505,7 +3529,7 @@ function zn(e) {
|
|
|
3505
3529
|
});
|
|
3506
3530
|
}, e);
|
|
3507
3531
|
}
|
|
3508
|
-
const
|
|
3532
|
+
const Qn = 500, Zn = 5e3, eo = 2e4, ir = X.forwardRef(
|
|
3509
3533
|
({
|
|
3510
3534
|
name: e,
|
|
3511
3535
|
disabled: t,
|
|
@@ -3515,67 +3539,67 @@ const qn = 500, Xn = 5e3, Qn = 2e4, ar = X.forwardRef(
|
|
|
3515
3539
|
onChange: o,
|
|
3516
3540
|
onBlur: s,
|
|
3517
3541
|
onFocus: i,
|
|
3518
|
-
onTextInputMaskBlur:
|
|
3519
|
-
rightElement:
|
|
3520
|
-
...
|
|
3521
|
-
},
|
|
3522
|
-
const [
|
|
3542
|
+
onTextInputMaskBlur: c,
|
|
3543
|
+
rightElement: f,
|
|
3544
|
+
...h
|
|
3545
|
+
}, m) => {
|
|
3546
|
+
const [l, u] = z(!0), [y, E] = z({
|
|
3523
3547
|
message: null,
|
|
3524
3548
|
politeness: null
|
|
3525
|
-
}), T =
|
|
3526
|
-
|
|
3527
|
-
T.current = !0,
|
|
3528
|
-
announcementTimeout:
|
|
3549
|
+
}), T = C(!0), _ = C(null), F = C(null), M = Xn([m, F]), Q = l ? "Show" : "Hide", L = () => {
|
|
3550
|
+
_.current && clearTimeout(_.current), T.current || (_.current = setTimeout(() => {
|
|
3551
|
+
T.current = !0, u(!0), E({
|
|
3552
|
+
announcementTimeout: Zn,
|
|
3529
3553
|
politeness: "polite",
|
|
3530
3554
|
message: `${r} hiding characters`
|
|
3531
3555
|
}), n && n(!0);
|
|
3532
|
-
},
|
|
3533
|
-
},
|
|
3534
|
-
|
|
3535
|
-
const
|
|
3536
|
-
T.current =
|
|
3537
|
-
announcementTimeout:
|
|
3556
|
+
}, eo));
|
|
3557
|
+
}, re = (w) => {
|
|
3558
|
+
w.preventDefault();
|
|
3559
|
+
const O = !T.current;
|
|
3560
|
+
T.current = O, L(), u(O), E({
|
|
3561
|
+
announcementTimeout: Qn,
|
|
3538
3562
|
politeness: "assertive",
|
|
3539
|
-
message:
|
|
3540
|
-
}), n && n(
|
|
3541
|
-
}, U = (
|
|
3542
|
-
var
|
|
3543
|
-
const { relatedTarget:
|
|
3544
|
-
|
|
3545
|
-
},
|
|
3546
|
-
|
|
3547
|
-
},
|
|
3548
|
-
|
|
3549
|
-
}, K = (
|
|
3550
|
-
|
|
3563
|
+
message: O ? "Characters hidden" : "Characters showing"
|
|
3564
|
+
}), n && n(O);
|
|
3565
|
+
}, U = (w) => {
|
|
3566
|
+
var O;
|
|
3567
|
+
const { relatedTarget: P } = w, B = (O = F.current) == null ? void 0 : O.parentElement;
|
|
3568
|
+
B != null && B.contains(P) || c && c();
|
|
3569
|
+
}, v = (w) => {
|
|
3570
|
+
L(), s && s(w), U(w);
|
|
3571
|
+
}, S = (w) => {
|
|
3572
|
+
L(), i && i(w);
|
|
3573
|
+
}, K = (w) => {
|
|
3574
|
+
L(), o && o(w);
|
|
3551
3575
|
};
|
|
3552
|
-
return
|
|
3553
|
-
|
|
3554
|
-
}, []), /* @__PURE__ */
|
|
3555
|
-
/* @__PURE__ */
|
|
3576
|
+
return G(() => () => {
|
|
3577
|
+
_.current && clearTimeout(_.current);
|
|
3578
|
+
}, []), /* @__PURE__ */ $(Ne, { children: [
|
|
3579
|
+
/* @__PURE__ */ d(
|
|
3556
3580
|
ot,
|
|
3557
3581
|
{
|
|
3558
|
-
ref:
|
|
3582
|
+
ref: M,
|
|
3559
3583
|
name: e,
|
|
3560
3584
|
label: r,
|
|
3561
3585
|
labelHidden: a,
|
|
3562
|
-
type:
|
|
3586
|
+
type: l ? "password" : "text",
|
|
3563
3587
|
disabled: t,
|
|
3564
|
-
onBlur:
|
|
3565
|
-
onFocus:
|
|
3588
|
+
onBlur: v,
|
|
3589
|
+
onFocus: S,
|
|
3566
3590
|
onChange: K,
|
|
3567
|
-
rightElement: X.cloneElement(
|
|
3568
|
-
ref:
|
|
3569
|
-
label:
|
|
3570
|
-
onClick:
|
|
3591
|
+
rightElement: X.cloneElement(f, {
|
|
3592
|
+
ref: m,
|
|
3593
|
+
label: Q,
|
|
3594
|
+
onClick: re,
|
|
3571
3595
|
onBlur: U,
|
|
3572
3596
|
disabled: t
|
|
3573
3597
|
}),
|
|
3574
|
-
...
|
|
3598
|
+
...h
|
|
3575
3599
|
}
|
|
3576
3600
|
),
|
|
3577
|
-
/* @__PURE__ */
|
|
3578
|
-
|
|
3601
|
+
/* @__PURE__ */ d(
|
|
3602
|
+
sr,
|
|
3579
3603
|
{
|
|
3580
3604
|
role: "status",
|
|
3581
3605
|
politeness: y.politeness,
|
|
@@ -3586,7 +3610,7 @@ const qn = 500, Xn = 5e3, Qn = 2e4, ar = X.forwardRef(
|
|
|
3586
3610
|
] });
|
|
3587
3611
|
}
|
|
3588
3612
|
);
|
|
3589
|
-
|
|
3613
|
+
ir.displayName = "TextInputMask";
|
|
3590
3614
|
/*!
|
|
3591
3615
|
@versini/ui-textinput v3.0.13
|
|
3592
3616
|
© 2025 gizmette.com
|
|
@@ -3600,7 +3624,7 @@ try {
|
|
|
3600
3624
|
});
|
|
3601
3625
|
} catch {
|
|
3602
3626
|
}
|
|
3603
|
-
const
|
|
3627
|
+
const to = "ASK! ME! ANYTHING!", cr = "Callisto", ro = "Log in", ao = "Sign in with a Passkey", Xo = "Log out", no = "Password", Qo = "Profile", Zo = "Settings", es = "Chat history", ts = "About", rs = "Type your question here", as = "{{clipboard}}", ns = `Sometimes, ${cr} hallucinates. Review important details.`, os = "Prompts are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed. You can use the special placeholder {{clipboard}} to automatically insert the content of your clipboard.", ss = {
|
|
3604
3628
|
PREFERENCES: {
|
|
3605
3629
|
TITLE: "User profile",
|
|
3606
3630
|
NAME: "Name",
|
|
@@ -3640,48 +3664,48 @@ const Zn = "ASK! ME! ANYTHING!", nr = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3640
3664
|
TITLE: "Chat Details",
|
|
3641
3665
|
INSTRUCTION: "This option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more."
|
|
3642
3666
|
}
|
|
3643
|
-
},
|
|
3644
|
-
/* @__PURE__ */
|
|
3645
|
-
/* @__PURE__ */
|
|
3646
|
-
/* @__PURE__ */
|
|
3647
|
-
/* @__PURE__ */
|
|
3667
|
+
}, oo = () => /* @__PURE__ */ $("div", { className: "flex items-center justify-center", children: [
|
|
3668
|
+
/* @__PURE__ */ d("div", { className: "basis-1/4", children: /* @__PURE__ */ d(Rn, {}) }),
|
|
3669
|
+
/* @__PURE__ */ $("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3670
|
+
/* @__PURE__ */ d("h1", { children: cr }),
|
|
3671
|
+
/* @__PURE__ */ d("h2", { children: to })
|
|
3648
3672
|
] })
|
|
3649
|
-
] }),
|
|
3650
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3673
|
+
] }), so = () => {
|
|
3674
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = Zt(), [a, n] = z(""), [o, s] = z(""), [i, c] = z(!0), [f, h] = z({
|
|
3651
3675
|
username: "",
|
|
3652
3676
|
password: ""
|
|
3653
|
-
}),
|
|
3654
|
-
|
|
3677
|
+
}), m = async (l) => {
|
|
3678
|
+
l.preventDefault(), await e(f.username, f.password) || (s(""), n("Invalid username or password"));
|
|
3655
3679
|
};
|
|
3656
|
-
return
|
|
3657
|
-
var
|
|
3658
|
-
(
|
|
3659
|
-
var
|
|
3660
|
-
(
|
|
3680
|
+
return G(() => {
|
|
3681
|
+
var l;
|
|
3682
|
+
(l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
|
|
3683
|
+
var u;
|
|
3684
|
+
(u = document.getElementById("root")) == null || u.classList.replace("app-hidden", "fadeIn");
|
|
3661
3685
|
}, 500);
|
|
3662
|
-
}),
|
|
3686
|
+
}), G(() => {
|
|
3663
3687
|
t && s(t);
|
|
3664
|
-
}, [t]), /* @__PURE__ */
|
|
3665
|
-
|
|
3688
|
+
}, [t]), /* @__PURE__ */ d(Ne, { children: /* @__PURE__ */ $(
|
|
3689
|
+
On,
|
|
3666
3690
|
{
|
|
3667
|
-
className:
|
|
3691
|
+
className: en({
|
|
3668
3692
|
extraClass: "mt-5"
|
|
3669
3693
|
}),
|
|
3670
3694
|
noMargin: !0,
|
|
3671
3695
|
noPadding: !0,
|
|
3672
3696
|
children: [
|
|
3673
|
-
/* @__PURE__ */
|
|
3697
|
+
/* @__PURE__ */ d(
|
|
3674
3698
|
"div",
|
|
3675
3699
|
{
|
|
3676
|
-
className:
|
|
3700
|
+
className: Za({
|
|
3677
3701
|
extraClass: "rounded-md"
|
|
3678
3702
|
}),
|
|
3679
|
-
children: /* @__PURE__ */
|
|
3703
|
+
children: /* @__PURE__ */ d(oo, {})
|
|
3680
3704
|
}
|
|
3681
3705
|
),
|
|
3682
|
-
/* @__PURE__ */
|
|
3683
|
-
/* @__PURE__ */
|
|
3684
|
-
/* @__PURE__ */
|
|
3706
|
+
/* @__PURE__ */ d("form", { className: "mt-5", onSubmit: m, children: /* @__PURE__ */ d(Dn, { alignHorizontal: "center", children: /* @__PURE__ */ d(ae, { span: 6, children: /* @__PURE__ */ $(An, { mode: "dark", children: [
|
|
3707
|
+
/* @__PURE__ */ d(ae, { span: 12, className: "mt-7", children: o && /* @__PURE__ */ d("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3708
|
+
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3685
3709
|
ot,
|
|
3686
3710
|
{
|
|
3687
3711
|
className: "mt-7",
|
|
@@ -3693,17 +3717,17 @@ const Zn = "ASK! ME! ANYTHING!", nr = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3693
3717
|
focusMode: "light",
|
|
3694
3718
|
name: "username",
|
|
3695
3719
|
label: "Username",
|
|
3696
|
-
onChange: (
|
|
3697
|
-
|
|
3698
|
-
...
|
|
3699
|
-
username:
|
|
3720
|
+
onChange: (l) => {
|
|
3721
|
+
h({
|
|
3722
|
+
...f,
|
|
3723
|
+
username: l.target.value
|
|
3700
3724
|
}), n("");
|
|
3701
3725
|
},
|
|
3702
3726
|
error: a !== ""
|
|
3703
3727
|
}
|
|
3704
3728
|
) }),
|
|
3705
|
-
/* @__PURE__ */
|
|
3706
|
-
|
|
3729
|
+
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3730
|
+
ir,
|
|
3707
3731
|
{
|
|
3708
3732
|
className: "mt-7",
|
|
3709
3733
|
required: !0,
|
|
@@ -3713,29 +3737,29 @@ const Zn = "ASK! ME! ANYTHING!", nr = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3713
3737
|
mode: "dark",
|
|
3714
3738
|
focusMode: "light",
|
|
3715
3739
|
name: "password",
|
|
3716
|
-
label:
|
|
3717
|
-
rightElement: /* @__PURE__ */
|
|
3740
|
+
label: no,
|
|
3741
|
+
rightElement: /* @__PURE__ */ d(
|
|
3718
3742
|
Pe,
|
|
3719
3743
|
{
|
|
3720
3744
|
focusMode: "light",
|
|
3721
3745
|
mode: "dark",
|
|
3722
3746
|
label: i ? "Show" : "Hide",
|
|
3723
|
-
children: i ? /* @__PURE__ */
|
|
3747
|
+
children: i ? /* @__PURE__ */ d(xn, {}) : /* @__PURE__ */ d(Nn, {})
|
|
3724
3748
|
}
|
|
3725
3749
|
),
|
|
3726
|
-
onMaskChange:
|
|
3727
|
-
onChange: (
|
|
3728
|
-
|
|
3729
|
-
...
|
|
3730
|
-
password:
|
|
3750
|
+
onMaskChange: c,
|
|
3751
|
+
onChange: (l) => {
|
|
3752
|
+
h({
|
|
3753
|
+
...f,
|
|
3754
|
+
password: l.target.value
|
|
3731
3755
|
}), n("");
|
|
3732
3756
|
},
|
|
3733
3757
|
error: a !== "",
|
|
3734
3758
|
helperText: a
|
|
3735
3759
|
}
|
|
3736
3760
|
) }),
|
|
3737
|
-
/* @__PURE__ */
|
|
3738
|
-
|
|
3761
|
+
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3762
|
+
rr,
|
|
3739
3763
|
{
|
|
3740
3764
|
mode: "light",
|
|
3741
3765
|
focusMode: "light",
|
|
@@ -3743,12 +3767,12 @@ const Zn = "ASK! ME! ANYTHING!", nr = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3743
3767
|
noBorder: !0,
|
|
3744
3768
|
type: "submit",
|
|
3745
3769
|
className: "mt-7",
|
|
3746
|
-
children:
|
|
3770
|
+
children: ro
|
|
3747
3771
|
}
|
|
3748
3772
|
) }),
|
|
3749
|
-
!
|
|
3750
|
-
/* @__PURE__ */
|
|
3751
|
-
/* @__PURE__ */
|
|
3773
|
+
!tn() && /* @__PURE__ */ $(Ne, { children: [
|
|
3774
|
+
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
3775
|
+
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3752
3776
|
Pe,
|
|
3753
3777
|
{
|
|
3754
3778
|
variant: "selected",
|
|
@@ -3756,9 +3780,9 @@ const Zn = "ASK! ME! ANYTHING!", nr = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3756
3780
|
focusMode: "light",
|
|
3757
3781
|
fullWidth: !0,
|
|
3758
3782
|
className: "mb-4",
|
|
3759
|
-
labelRight:
|
|
3783
|
+
labelRight: ao,
|
|
3760
3784
|
onClick: r,
|
|
3761
|
-
children: /* @__PURE__ */
|
|
3785
|
+
children: /* @__PURE__ */ d(vn, { size: "size-7" })
|
|
3762
3786
|
}
|
|
3763
3787
|
) })
|
|
3764
3788
|
] })
|
|
@@ -3766,24 +3790,33 @@ const Zn = "ASK! ME! ANYTHING!", nr = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3766
3790
|
]
|
|
3767
3791
|
}
|
|
3768
3792
|
) });
|
|
3769
|
-
},
|
|
3793
|
+
}, io = new URL(document.location.href).searchParams, _t = !!io.get("debug") || !1, co = mr(() => import(
|
|
3770
3794
|
/* webpackChunkName: "LazyApp" */
|
|
3771
|
-
"./App.
|
|
3772
|
-
).then((e) => e.App)),
|
|
3773
|
-
const { isAuthenticated: t } =
|
|
3774
|
-
return t ? /* @__PURE__ */
|
|
3795
|
+
"./App.Dy701JAx.js"
|
|
3796
|
+
).then((e) => e.App)), kt = ({ isComponent: e }) => {
|
|
3797
|
+
const { isAuthenticated: t } = Zt();
|
|
3798
|
+
return t ? /* @__PURE__ */ d(hr, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(co, { isComponent: e }) }) : /* @__PURE__ */ d(so, {});
|
|
3775
3799
|
}, lo = ({
|
|
3776
3800
|
isComponent: e = !1,
|
|
3777
|
-
domain: t =
|
|
3778
|
-
}) =>
|
|
3801
|
+
domain: t = Qa
|
|
3802
|
+
}) => er ? /* @__PURE__ */ d(
|
|
3803
|
+
bt,
|
|
3804
|
+
{
|
|
3805
|
+
clientId: Et,
|
|
3806
|
+
domain: t,
|
|
3807
|
+
debug: _t,
|
|
3808
|
+
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
|
3809
|
+
children: /* @__PURE__ */ d(kt, { isComponent: e })
|
|
3810
|
+
}
|
|
3811
|
+
) : /* @__PURE__ */ d(bt, { clientId: Et, domain: t, debug: _t, children: /* @__PURE__ */ d(kt, { isComponent: e }) }), is = ({ domain: e }) => /* @__PURE__ */ d(lo, { isComponent: !0, domain: e });
|
|
3779
3812
|
export {
|
|
3780
3813
|
ts as ABOUT_TITLE,
|
|
3781
3814
|
Oo as ACTION_RESET_PROMPT,
|
|
3782
3815
|
vo as ACTION_SEARCH,
|
|
3783
3816
|
xo as ACTION_SORT,
|
|
3784
3817
|
Co as ACTION_TOGGLE_PROMPT,
|
|
3785
|
-
|
|
3786
|
-
|
|
3818
|
+
cr as APP_NAME,
|
|
3819
|
+
rr as C,
|
|
3787
3820
|
ss as CARDS,
|
|
3788
3821
|
as as CLIPBOARD_PROMPT,
|
|
3789
3822
|
Ao as DEFAULT_AI_PROVIDER,
|
|
@@ -3793,26 +3826,26 @@ export {
|
|
|
3793
3826
|
es as HISTORY_TITLE,
|
|
3794
3827
|
Ho as INFINITE_SCROLL_LIMIT,
|
|
3795
3828
|
Ko as INFINITE_SCROLL_THRESHOLD,
|
|
3796
|
-
|
|
3829
|
+
Dn as L,
|
|
3797
3830
|
Do as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3798
3831
|
Po as LOCAL_STORAGE_PREFIX,
|
|
3799
3832
|
Mo as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
3800
3833
|
Lo as LOCAL_STORAGE_SEARCH,
|
|
3801
3834
|
$o as LOCAL_STORAGE_SORT,
|
|
3802
3835
|
Xo as LOG_OUT,
|
|
3803
|
-
|
|
3804
|
-
|
|
3836
|
+
oo as Logo,
|
|
3837
|
+
he as M,
|
|
3805
3838
|
Qo as PROFILE_TITLE,
|
|
3806
3839
|
os as PROMPTS_DESCRIPTION,
|
|
3807
3840
|
Wo as PROMPT_CLASSNAME,
|
|
3808
3841
|
Bo as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
3809
3842
|
No as PROVIDER_ANTHROPIC,
|
|
3810
3843
|
Ro as PROVIDER_OPENAI,
|
|
3811
|
-
|
|
3812
|
-
|
|
3844
|
+
An as R,
|
|
3845
|
+
Io as ROLE_ASSISTANT,
|
|
3813
3846
|
_o as ROLE_HIDDEN,
|
|
3814
3847
|
So as ROLE_INTERNAL,
|
|
3815
|
-
|
|
3848
|
+
To as ROLE_SYSTEM,
|
|
3816
3849
|
wo as ROLE_USER,
|
|
3817
3850
|
Zo as SETTINGS_TITLE,
|
|
3818
3851
|
Uo as STATS_SEPARATOR,
|
|
@@ -3823,17 +3856,17 @@ export {
|
|
|
3823
3856
|
He as f,
|
|
3824
3857
|
ot as fe,
|
|
3825
3858
|
Jo as getCurrentGeoLocation,
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3859
|
+
en as getMainPaddingClass,
|
|
3860
|
+
Za as getMessageContaintWrapperClass,
|
|
3861
|
+
tn as isElectron,
|
|
3862
|
+
rn as isProbablyMobile,
|
|
3830
3863
|
qo as isProbablyiPhone,
|
|
3831
|
-
|
|
3832
|
-
|
|
3864
|
+
ae as j,
|
|
3865
|
+
vn as l,
|
|
3833
3866
|
Yo as numberFormatter,
|
|
3834
3867
|
jo as pluralize,
|
|
3835
|
-
|
|
3868
|
+
On as r,
|
|
3836
3869
|
Pe as re,
|
|
3837
3870
|
Go as renderDataAsList,
|
|
3838
|
-
|
|
3871
|
+
Zt as un
|
|
3839
3872
|
};
|