@versini/sassysaint 7.1.6 → 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.fUQ6Upmp.js → App.Dy701JAx.js} +3 -3
- package/dist/chunks/{ChatBubbleAssistant.CVd9nqvb.js → ChatBubbleAssistant.rvXLFo_B.js} +3 -3
- package/dist/chunks/{HeaderEntry.DiaiGqp6.js → HeaderEntry.AcZmU5Vm.js} +4 -4
- package/dist/chunks/{MarkdownWithExtra.D22TGTzU.js → MarkdownWithExtra.0R-faVRz.js} +2 -2
- package/dist/chunks/{index.B6-d6CvP.js → index.DAXcx2b2.js} +1168 -1129
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,123 +1,123 @@
|
|
|
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);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function tt() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
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 ur({ 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 mr {
|
|
|
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
|
|
151
|
-
if (!
|
|
149
|
+
async function Er(e) {
|
|
150
|
+
var m;
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
function
|
|
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
|
|
217
|
-
if (!
|
|
216
|
+
function wr() {
|
|
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 gr({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
264
|
-
var
|
|
265
|
-
if (!
|
|
263
|
+
async function Tr(e, t = !1) {
|
|
264
|
+
var m, l;
|
|
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 yr(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
|
|
@@ -346,134 +346,134 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
|
|
|
346
346
|
l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
|
|
347
347
|
sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
|
|
348
348
|
awIDAQAB
|
|
349
|
-
-----END PUBLIC KEY-----`,
|
|
349
|
+
-----END PUBLIC KEY-----`, $e = {
|
|
350
350
|
CODE: "code",
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
},
|
|
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
|
|
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
|
-
|
|
395
|
-
class
|
|
394
|
+
Xe.code = "ERR_JWT_EXPIRED";
|
|
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
|
-
function
|
|
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 Nr(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,35 +495,35 @@ function vr(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
|
-
if (
|
|
506
|
+
if (Ve(e.algorithm.hash) !== a)
|
|
507
507
|
throw j(`SHA-${a}`, "algorithm.hash");
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
case "RS256":
|
|
511
511
|
case "RS384":
|
|
512
512
|
case "RS512": {
|
|
513
|
-
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
|
-
if (
|
|
516
|
+
if (Ve(e.algorithm.hash) !== a)
|
|
517
517
|
throw j(`SHA-${a}`, "algorithm.hash");
|
|
518
518
|
break;
|
|
519
519
|
}
|
|
520
520
|
case "PS256":
|
|
521
521
|
case "PS384":
|
|
522
522
|
case "PS512": {
|
|
523
|
-
if (!
|
|
523
|
+
if (!Ie(e.algorithm, "RSA-PSS"))
|
|
524
524
|
throw j("RSA-PSS");
|
|
525
525
|
const a = parseInt(t.slice(2), 10);
|
|
526
|
-
if (
|
|
526
|
+
if (Ve(e.algorithm.hash) !== a)
|
|
527
527
|
throw j(`SHA-${a}`, "algorithm.hash");
|
|
528
528
|
break;
|
|
529
529
|
}
|
|
@@ -535,9 +535,9 @@ function xr(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 xr(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 Ot(e, t, ...r) {
|
|
|
555
555
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
556
556
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
557
557
|
}
|
|
558
|
-
const
|
|
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 Dt = (e) => vt(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,43 +682,43 @@ function Mr(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
|
-
return delete n.alg, delete n.use,
|
|
694
|
-
},
|
|
695
|
-
let
|
|
696
|
-
const
|
|
693
|
+
return delete n.alg, delete n.use, Me.subtle.importKey("jwk", n, ...a);
|
|
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)
|
|
718
718
|
return !1;
|
|
719
719
|
const n = e.subarray(a, a + t.length);
|
|
720
720
|
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || ee(e, t, a + 1);
|
|
721
|
-
},
|
|
721
|
+
}, ct = (e) => {
|
|
722
722
|
switch (!0) {
|
|
723
723
|
case ee(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
724
724
|
return "P-256";
|
|
@@ -737,9 +737,9 @@ const Mt = (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,25 +773,25 @@ const Mt = (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":
|
|
781
|
-
o = { name:
|
|
781
|
+
o = { name: ct(i) }, s = ["verify"];
|
|
782
782
|
break;
|
|
783
783
|
default:
|
|
784
784
|
throw new W('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
785
|
}
|
|
786
|
-
return
|
|
787
|
-
},
|
|
788
|
-
async function
|
|
786
|
+
return Me.subtle.importKey(t, i, o, !1, s);
|
|
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 Jr(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], Xe = (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
|
|
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 Fr(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 zr(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(
|
|
918
|
-
return
|
|
917
|
+
throw new TypeError(it(t, ...Ce));
|
|
918
|
+
return Me.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
919
919
|
}
|
|
920
|
-
throw new TypeError(
|
|
920
|
+
throw new TypeError(it(t, ...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
|
-
return await
|
|
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,202 +1020,202 @@ const ea = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, tt = Ht
|
|
|
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":
|
|
1034
1034
|
case "d":
|
|
1035
|
-
n = Math.round(r *
|
|
1035
|
+
n = Math.round(r * rt);
|
|
1036
1036
|
break;
|
|
1037
1037
|
case "week":
|
|
1038
1038
|
case "weeks":
|
|
1039
1039
|
case "w":
|
|
1040
|
-
n = Math.round(r *
|
|
1040
|
+
n = Math.round(r * 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
|
-
},
|
|
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
|
-
if (n && (typeof e.typ != "string" ||
|
|
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 <=
|
|
1096
|
-
throw new
|
|
1097
|
-
}
|
|
1098
|
-
if (
|
|
1099
|
-
const y =
|
|
1100
|
-
if (y -
|
|
1101
|
-
throw new
|
|
1102
|
-
if (y < 0 -
|
|
1095
|
+
if (a.exp <= u - m)
|
|
1096
|
+
throw new Xe('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1097
|
+
}
|
|
1098
|
+
if (f) {
|
|
1099
|
+
const y = u - a.iat, E = typeof f == "number" ? f : dt(f);
|
|
1100
|
+
if (y - m > E)
|
|
1101
|
+
throw new Xe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
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
|
-
let
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1166
|
-
if (!
|
|
1163
|
+
let Je;
|
|
1164
|
+
const ga = new Uint8Array(16);
|
|
1165
|
+
function ya() {
|
|
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
|
|
1171
|
+
return Je(ga);
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1174
|
-
function
|
|
1175
|
-
if (
|
|
1176
|
-
return
|
|
1173
|
+
const ba = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: ba };
|
|
1174
|
+
function ht(e, t, r) {
|
|
1175
|
+
if (mt.randomUUID && !e)
|
|
1176
|
+
return mt.randomUUID();
|
|
1177
1177
|
e = e || {};
|
|
1178
|
-
const a = e.random || (e.rng ||
|
|
1179
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1178
|
+
const a = e.random || (e.rng || ya)();
|
|
1179
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, fa(a);
|
|
1180
1180
|
}
|
|
1181
|
-
const
|
|
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
|
|
1185
|
-
if (!
|
|
1184
|
+
async function Ia(e) {
|
|
1185
|
+
if (!pt.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1190
|
-
return
|
|
1189
|
+
const t = new TextEncoder().encode(e), r = await pt.subtle.digest("SHA-256", t);
|
|
1190
|
+
return 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
|
-
const
|
|
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
|
-
},
|
|
1210
|
-
function
|
|
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
|
+
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,9 +1226,9 @@ function Ie({
|
|
|
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) {
|
|
1233
1233
|
console.warn(s);
|
|
1234
1234
|
}
|
|
@@ -1237,28 +1237,28 @@ function Ie({
|
|
|
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
|
-
let
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1246
|
-
if (!
|
|
1243
|
+
let Ge;
|
|
1244
|
+
const Aa = new Uint8Array(16);
|
|
1245
|
+
function Ra() {
|
|
1246
|
+
if (!Ge) {
|
|
1247
1247
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
1248
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
|
-
|
|
1249
|
+
Ge = crypto.getRandomValues.bind(crypto);
|
|
1250
1250
|
}
|
|
1251
|
-
return
|
|
1251
|
+
return Ge(Aa);
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1254
|
-
function
|
|
1255
|
-
if (
|
|
1256
|
-
return
|
|
1253
|
+
const Na = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: Na };
|
|
1254
|
+
function Ye(e, t, r) {
|
|
1255
|
+
if (yt.randomUUID && !e)
|
|
1256
|
+
return yt.randomUUID();
|
|
1257
1257
|
e = e || {};
|
|
1258
|
-
const a = e.random || (e.rng ||
|
|
1259
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1258
|
+
const a = e.random || (e.rng || 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,120 +1339,121 @@ 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
|
-
credentials:
|
|
1368
|
-
method:
|
|
1367
|
+
const o = `Bearer ${e}`, s = await fetch(`${n}/graphql`, {
|
|
1368
|
+
credentials: jt,
|
|
1369
|
+
method: zt,
|
|
1369
1370
|
headers: {
|
|
1370
|
-
authorization:
|
|
1371
|
-
"Content-Type":
|
|
1372
|
-
[
|
|
1371
|
+
authorization: o,
|
|
1372
|
+
"Content-Type": qt,
|
|
1373
|
+
[Pt.CLIENT_ID]: `${r}`
|
|
1373
1374
|
},
|
|
1374
1375
|
body: JSON.stringify({
|
|
1375
1376
|
query: t.schema,
|
|
1376
1377
|
variables: a
|
|
1377
1378
|
})
|
|
1378
1379
|
});
|
|
1379
|
-
if (
|
|
1380
|
-
return { status:
|
|
1381
|
-
const { data:
|
|
1380
|
+
if (s.status !== 200)
|
|
1381
|
+
return { status: Y, data: [] };
|
|
1382
|
+
const { data: i } = await s.json();
|
|
1382
1383
|
return {
|
|
1383
|
-
status:
|
|
1384
|
-
data:
|
|
1384
|
+
status: Ee,
|
|
1385
|
+
data: i[t.method]
|
|
1385
1386
|
};
|
|
1386
|
-
} catch (
|
|
1387
|
-
return console.error(
|
|
1387
|
+
} catch (o) {
|
|
1388
|
+
return console.error(o), { status: Y, data: [] };
|
|
1388
1389
|
}
|
|
1389
|
-
},
|
|
1390
|
+
}, Ue = async ({
|
|
1390
1391
|
type: e,
|
|
1391
1392
|
clientId: t,
|
|
1392
|
-
params: r = {}
|
|
1393
|
+
params: r = {},
|
|
1394
|
+
endpoint: a
|
|
1393
1395
|
}) => {
|
|
1394
1396
|
try {
|
|
1395
|
-
const
|
|
1396
|
-
credentials:
|
|
1397
|
-
method:
|
|
1397
|
+
const n = await fetch(`${a}/${e}`, {
|
|
1398
|
+
credentials: jt,
|
|
1399
|
+
method: zt,
|
|
1398
1400
|
headers: {
|
|
1399
|
-
"Content-Type":
|
|
1400
|
-
[
|
|
1401
|
+
"Content-Type": qt,
|
|
1402
|
+
[Pt.CLIENT_ID]: `${t}`
|
|
1401
1403
|
},
|
|
1402
1404
|
body: JSON.stringify(r)
|
|
1403
1405
|
});
|
|
1404
|
-
if (
|
|
1405
|
-
return { status:
|
|
1406
|
-
const { data:
|
|
1406
|
+
if (n.status !== 200)
|
|
1407
|
+
return { status: Y, data: [] };
|
|
1408
|
+
const { data: o } = await n.json();
|
|
1407
1409
|
return {
|
|
1408
|
-
status:
|
|
1409
|
-
data:
|
|
1410
|
+
status: Ee,
|
|
1411
|
+
data: o || []
|
|
1410
1412
|
};
|
|
1411
|
-
} catch (
|
|
1412
|
-
return console.error(
|
|
1413
|
+
} catch (n) {
|
|
1414
|
+
return console.error(n), { status: Y, data: [] };
|
|
1413
1415
|
}
|
|
1414
|
-
},
|
|
1415
|
-
var e, t;
|
|
1416
|
-
return Na ? process && ((e = process == null ? void 0 : process.env) != null && e.PUBLIC_AUTH_SERVER_URL) ? (t = process == null ? void 0 : process.env) == null ? void 0 : t.PUBLIC_AUTH_SERVER_URL : "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth";
|
|
1417
|
-
}, Ft = {
|
|
1416
|
+
}, Oa = process.env.NODE_ENV === "production", Pa = !Oa, Xt = {
|
|
1418
1417
|
isLoading: !0,
|
|
1419
1418
|
isAuthenticated: !1,
|
|
1420
1419
|
user: void 0,
|
|
1421
1420
|
logoutReason: "",
|
|
1422
1421
|
debug: !1,
|
|
1423
1422
|
authenticationType: ""
|
|
1424
|
-
},
|
|
1423
|
+
}, Da = (e) => {
|
|
1425
1424
|
try {
|
|
1426
|
-
const t =
|
|
1425
|
+
const t = pa(e);
|
|
1427
1426
|
return t ? t[N.USER_ID_KEY] : "";
|
|
1428
1427
|
} catch {
|
|
1429
1428
|
return "";
|
|
1430
1429
|
}
|
|
1431
|
-
},
|
|
1430
|
+
}, La = async ({
|
|
1432
1431
|
userId: e,
|
|
1433
1432
|
clientId: t,
|
|
1434
1433
|
domain: r,
|
|
1435
|
-
idToken: a = ""
|
|
1434
|
+
idToken: a = "",
|
|
1435
|
+
endpoint: n
|
|
1436
1436
|
}) => {
|
|
1437
|
-
var
|
|
1437
|
+
var o;
|
|
1438
1438
|
try {
|
|
1439
1439
|
return {
|
|
1440
|
-
status: ((
|
|
1441
|
-
|
|
1440
|
+
status: ((o = await Ue({
|
|
1441
|
+
endpoint: n,
|
|
1442
|
+
type: $e.LOGOUT,
|
|
1442
1443
|
clientId: t,
|
|
1443
1444
|
params: {
|
|
1444
1445
|
userId: e,
|
|
1445
1446
|
domain: r,
|
|
1446
1447
|
idToken: a
|
|
1447
1448
|
}
|
|
1448
|
-
})) == null ? void 0 :
|
|
1449
|
+
})) == null ? void 0 : o.status) || Y
|
|
1449
1450
|
};
|
|
1450
1451
|
} catch {
|
|
1451
1452
|
return {
|
|
1452
|
-
status:
|
|
1453
|
+
status: Y
|
|
1453
1454
|
};
|
|
1454
1455
|
}
|
|
1455
|
-
},
|
|
1456
|
+
}, $a = async ({
|
|
1456
1457
|
username: e,
|
|
1457
1458
|
password: t,
|
|
1458
1459
|
clientId: r,
|
|
@@ -1461,32 +1462,34 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1461
1462
|
sessionExpiration: o,
|
|
1462
1463
|
code: s,
|
|
1463
1464
|
code_verifier: i,
|
|
1464
|
-
domain:
|
|
1465
|
-
ua:
|
|
1465
|
+
domain: c,
|
|
1466
|
+
ua: f,
|
|
1467
|
+
endpoint: h
|
|
1466
1468
|
}) => {
|
|
1467
|
-
var
|
|
1469
|
+
var m;
|
|
1468
1470
|
try {
|
|
1469
|
-
const
|
|
1470
|
-
|
|
1471
|
+
const l = await Ue({
|
|
1472
|
+
endpoint: h,
|
|
1473
|
+
type: $e.LOGIN,
|
|
1471
1474
|
clientId: r,
|
|
1472
1475
|
params: {
|
|
1473
|
-
type: n ||
|
|
1476
|
+
type: n || he.ID_AND_ACCESS_TOKEN,
|
|
1474
1477
|
username: e,
|
|
1475
1478
|
password: t,
|
|
1476
1479
|
sessionExpiration: o,
|
|
1477
1480
|
nonce: a,
|
|
1478
1481
|
code: s,
|
|
1479
1482
|
code_verifier: i,
|
|
1480
|
-
domain:
|
|
1481
|
-
ua:
|
|
1483
|
+
domain: c,
|
|
1484
|
+
ua: f
|
|
1482
1485
|
}
|
|
1483
|
-
}),
|
|
1484
|
-
return
|
|
1485
|
-
idToken:
|
|
1486
|
-
accessToken:
|
|
1487
|
-
refreshToken:
|
|
1488
|
-
userId:
|
|
1489
|
-
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],
|
|
1490
1493
|
status: !0
|
|
1491
1494
|
} : {
|
|
1492
1495
|
status: !1
|
|
@@ -1496,61 +1499,65 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1496
1499
|
status: !1
|
|
1497
1500
|
};
|
|
1498
1501
|
}
|
|
1499
|
-
},
|
|
1502
|
+
}, Ma = async ({
|
|
1500
1503
|
nonce: e,
|
|
1501
1504
|
clientId: t,
|
|
1502
|
-
code_challenge: r
|
|
1505
|
+
code_challenge: r,
|
|
1506
|
+
endpoint: a
|
|
1503
1507
|
}) => {
|
|
1504
|
-
var
|
|
1508
|
+
var n;
|
|
1505
1509
|
try {
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1510
|
+
const o = await Ue({
|
|
1511
|
+
endpoint: a,
|
|
1512
|
+
type: $e.CODE,
|
|
1508
1513
|
clientId: t,
|
|
1509
1514
|
params: {
|
|
1510
|
-
type:
|
|
1515
|
+
type: he.CODE,
|
|
1511
1516
|
nonce: e,
|
|
1512
1517
|
code_challenge: r
|
|
1513
1518
|
}
|
|
1514
1519
|
});
|
|
1515
|
-
return (
|
|
1516
|
-
status:
|
|
1517
|
-
data:
|
|
1520
|
+
return (n = o == null ? void 0 : o.data) != null && n.code ? {
|
|
1521
|
+
status: Ee,
|
|
1522
|
+
data: o.data.code
|
|
1518
1523
|
} : {
|
|
1519
|
-
status:
|
|
1524
|
+
status: Y,
|
|
1520
1525
|
data: ""
|
|
1521
1526
|
};
|
|
1522
1527
|
} catch {
|
|
1523
1528
|
return {
|
|
1524
|
-
status:
|
|
1529
|
+
status: Y,
|
|
1525
1530
|
data: ""
|
|
1526
1531
|
};
|
|
1527
1532
|
}
|
|
1528
|
-
},
|
|
1533
|
+
}, Ua = async ({
|
|
1529
1534
|
clientId: e,
|
|
1530
1535
|
userId: t,
|
|
1531
1536
|
nonce: r,
|
|
1532
1537
|
refreshToken: a,
|
|
1533
1538
|
accessToken: n,
|
|
1534
|
-
domain: o
|
|
1539
|
+
domain: o,
|
|
1540
|
+
endpoint: s
|
|
1535
1541
|
}) => {
|
|
1536
|
-
var
|
|
1542
|
+
var i;
|
|
1537
1543
|
try {
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1544
|
+
const c = await Ue({
|
|
1545
|
+
endpoint: s,
|
|
1546
|
+
type: $e.REFRESH,
|
|
1540
1547
|
clientId: e,
|
|
1541
1548
|
params: {
|
|
1542
|
-
type:
|
|
1549
|
+
type: he.REFRESH_TOKEN,
|
|
1543
1550
|
userId: t,
|
|
1544
1551
|
nonce: r,
|
|
1545
1552
|
refreshToken: a,
|
|
1546
1553
|
accessToken: n,
|
|
1547
1554
|
domain: o
|
|
1548
1555
|
}
|
|
1549
|
-
}),
|
|
1550
|
-
return
|
|
1551
|
-
accessToken:
|
|
1552
|
-
refreshToken:
|
|
1553
|
-
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],
|
|
1554
1561
|
status: !0
|
|
1555
1562
|
} : {
|
|
1556
1563
|
status: !1
|
|
@@ -1561,17 +1568,19 @@ const ie = "Your session has expired. For your security, please log in again to
|
|
|
1561
1568
|
};
|
|
1562
1569
|
}
|
|
1563
1570
|
};
|
|
1564
|
-
class
|
|
1571
|
+
class Ka {
|
|
1565
1572
|
constructor(t = null, r = null) {
|
|
1566
|
-
|
|
1573
|
+
We(this, "refreshTokenPromise", null), We(this, "accessToken"), We(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1567
1574
|
}
|
|
1568
1575
|
async refreshtoken({
|
|
1569
1576
|
clientId: t,
|
|
1570
1577
|
userId: r,
|
|
1571
1578
|
nonce: a,
|
|
1572
|
-
domain: n
|
|
1579
|
+
domain: n,
|
|
1580
|
+
endpoint: o
|
|
1573
1581
|
}) {
|
|
1574
1582
|
this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
|
|
1583
|
+
endpoint: o,
|
|
1575
1584
|
clientId: t,
|
|
1576
1585
|
userId: r,
|
|
1577
1586
|
nonce: a,
|
|
@@ -1584,136 +1593,148 @@ class Da {
|
|
|
1584
1593
|
}
|
|
1585
1594
|
}
|
|
1586
1595
|
async _refreshToken({
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1596
|
+
endpoint: t,
|
|
1597
|
+
clientId: r,
|
|
1598
|
+
userId: a,
|
|
1599
|
+
nonce: n,
|
|
1600
|
+
domain: o
|
|
1591
1601
|
}) {
|
|
1592
|
-
const
|
|
1593
|
-
if (
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
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,
|
|
1598
1609
|
refreshToken: this.refreshToken,
|
|
1599
1610
|
accessToken: this.accessToken,
|
|
1600
|
-
domain:
|
|
1611
|
+
domain: o
|
|
1601
1612
|
});
|
|
1602
|
-
return
|
|
1603
|
-
status:
|
|
1604
|
-
newAccessToken:
|
|
1605
|
-
newRefreshToken:
|
|
1613
|
+
return i.status ? (this.accessToken = i.accessToken, this.refreshToken = i.refreshToken, {
|
|
1614
|
+
status: Ee,
|
|
1615
|
+
newAccessToken: i.accessToken,
|
|
1616
|
+
newRefreshToken: i.refreshToken
|
|
1606
1617
|
}) : {
|
|
1607
|
-
status:
|
|
1618
|
+
status: Y
|
|
1608
1619
|
};
|
|
1609
1620
|
} else
|
|
1610
1621
|
return {
|
|
1611
|
-
status:
|
|
1622
|
+
status: Y
|
|
1612
1623
|
};
|
|
1613
1624
|
}
|
|
1614
1625
|
}
|
|
1615
|
-
const
|
|
1626
|
+
const Ha = (e) => q(
|
|
1616
1627
|
(...t) => {
|
|
1617
1628
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1618
1629
|
},
|
|
1619
1630
|
[e]
|
|
1620
|
-
),
|
|
1621
|
-
throw new Error(
|
|
1622
|
-
},
|
|
1631
|
+
), ue = () => {
|
|
1632
|
+
throw new Error(Ca);
|
|
1633
|
+
}, Qt = dr({
|
|
1623
1634
|
isAuthenticated: !1,
|
|
1624
1635
|
isLoading: !1,
|
|
1625
|
-
login:
|
|
1626
|
-
logout:
|
|
1627
|
-
getAccessToken:
|
|
1628
|
-
getIdToken:
|
|
1629
|
-
registeringForPasskey:
|
|
1630
|
-
loginWithPasskey:
|
|
1636
|
+
login: ue,
|
|
1637
|
+
logout: ue,
|
|
1638
|
+
getAccessToken: ue,
|
|
1639
|
+
getIdToken: ue,
|
|
1640
|
+
registeringForPasskey: ue,
|
|
1641
|
+
loginWithPasskey: ue,
|
|
1631
1642
|
logoutReason: "",
|
|
1632
1643
|
authenticationType: ""
|
|
1633
|
-
}),
|
|
1634
|
-
state:
|
|
1644
|
+
}), Wa = X.createContext({
|
|
1645
|
+
state: Xt,
|
|
1635
1646
|
dispatch: () => {
|
|
1636
1647
|
}
|
|
1637
|
-
}),
|
|
1648
|
+
}), Ba = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1638
1649
|
...e,
|
|
1639
1650
|
isLoading: t.payload.isLoading
|
|
1640
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1651
|
+
} : (t == null ? void 0 : t.type) === Ae ? {
|
|
1641
1652
|
...e,
|
|
1642
1653
|
isLoading: !1,
|
|
1643
1654
|
isAuthenticated: !0,
|
|
1644
1655
|
user: t.payload.user,
|
|
1645
1656
|
authenticationType: t.payload.authenticationType,
|
|
1646
1657
|
logoutReason: ""
|
|
1647
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1658
|
+
} : (t == null ? void 0 : t.type) === Ft ? {
|
|
1648
1659
|
...e,
|
|
1649
1660
|
isLoading: !1,
|
|
1650
1661
|
isAuthenticated: !1,
|
|
1651
1662
|
user: void 0,
|
|
1652
1663
|
authenticationType: "",
|
|
1653
1664
|
logoutReason: t.payload.logoutReason
|
|
1654
|
-
} : e,
|
|
1665
|
+
} : e, bt = ({
|
|
1655
1666
|
children: e,
|
|
1656
1667
|
sessionExpiration: t,
|
|
1657
1668
|
clientId: r,
|
|
1658
1669
|
domain: a = "",
|
|
1659
|
-
debug: n = !1
|
|
1670
|
+
debug: n = !1,
|
|
1671
|
+
endpoint: o = Pa ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
1660
1672
|
}) => {
|
|
1661
|
-
const [
|
|
1662
|
-
...
|
|
1673
|
+
const [s, i] = At(Ba, {
|
|
1674
|
+
...Xt,
|
|
1663
1675
|
debug: n
|
|
1664
|
-
}),
|
|
1665
|
-
key: `${
|
|
1666
|
-
}), [
|
|
1667
|
-
key: `${
|
|
1668
|
-
}), [
|
|
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(
|
|
1669
1681
|
{
|
|
1670
|
-
key: `${
|
|
1682
|
+
key: `${Se}::${r}::@@refresh@@`
|
|
1671
1683
|
}
|
|
1672
|
-
), [
|
|
1673
|
-
key: `${
|
|
1674
|
-
}),
|
|
1675
|
-
|
|
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();
|
|
1676
1688
|
}, [
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
]),
|
|
1689
|
+
E,
|
|
1690
|
+
l,
|
|
1691
|
+
L,
|
|
1692
|
+
F,
|
|
1693
|
+
c
|
|
1694
|
+
]), v = q(
|
|
1683
1695
|
(g) => {
|
|
1684
|
-
|
|
1696
|
+
c(
|
|
1685
1697
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1686
1698
|
g
|
|
1687
|
-
),
|
|
1688
|
-
type:
|
|
1699
|
+
), i({
|
|
1700
|
+
type: Ft,
|
|
1689
1701
|
payload: {
|
|
1690
|
-
logoutReason: g ||
|
|
1702
|
+
logoutReason: g || ce
|
|
1691
1703
|
}
|
|
1692
|
-
}),
|
|
1704
|
+
}), U(), i({ type: ge, payload: { isLoading: !1 } });
|
|
1693
1705
|
},
|
|
1694
|
-
[
|
|
1706
|
+
[U, c]
|
|
1695
1707
|
), S = q(
|
|
1696
1708
|
async (g) => {
|
|
1697
|
-
|
|
1698
|
-
const { user:
|
|
1699
|
-
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(
|
|
1700
1712
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1701
|
-
), await
|
|
1713
|
+
), await La({
|
|
1702
1714
|
userId: b,
|
|
1703
1715
|
clientId: r,
|
|
1704
1716
|
domain: a,
|
|
1705
|
-
idToken: h
|
|
1706
|
-
|
|
1717
|
+
idToken: h,
|
|
1718
|
+
endpoint: o
|
|
1719
|
+
}), v(g || ce);
|
|
1707
1720
|
},
|
|
1708
|
-
[
|
|
1721
|
+
[
|
|
1722
|
+
h,
|
|
1723
|
+
s,
|
|
1724
|
+
r,
|
|
1725
|
+
a,
|
|
1726
|
+
v,
|
|
1727
|
+
c,
|
|
1728
|
+
o
|
|
1729
|
+
]
|
|
1709
1730
|
);
|
|
1710
|
-
|
|
1711
|
-
if (!
|
|
1712
|
-
return
|
|
1731
|
+
G(() => {
|
|
1732
|
+
if (!f.current)
|
|
1733
|
+
return s.isLoading && h !== null ? (async () => {
|
|
1713
1734
|
try {
|
|
1714
|
-
const g = await
|
|
1715
|
-
g && g.payload[N.USER_ID_KEY] !== "" ? (
|
|
1716
|
-
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,
|
|
1717
1738
|
payload: {
|
|
1718
1739
|
authenticationType: g.payload[N.AUTH_TYPE_KEY],
|
|
1719
1740
|
user: {
|
|
@@ -1722,113 +1743,119 @@ const La = (e) => q(
|
|
|
1722
1743
|
email: g.payload[N.EMAIL_KEY]
|
|
1723
1744
|
}
|
|
1724
1745
|
}
|
|
1725
|
-
})) : (
|
|
1746
|
+
})) : (c("useEffect: invalid JWT, invalidating and logging out"), await S(ce));
|
|
1726
1747
|
} catch {
|
|
1727
|
-
|
|
1748
|
+
c(
|
|
1728
1749
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
1729
|
-
), await S(
|
|
1750
|
+
), await S(ce);
|
|
1730
1751
|
}
|
|
1731
|
-
})() : (
|
|
1732
|
-
|
|
1752
|
+
})() : (c("useEffect: setting the loading state to false"), i({ type: ge, payload: { isLoading: !1 } })), () => {
|
|
1753
|
+
f.current = !0;
|
|
1733
1754
|
};
|
|
1734
|
-
}, [
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1737
|
-
const b =
|
|
1738
|
-
|
|
1739
|
-
const { code_verifier:
|
|
1755
|
+
}, [s.isLoading, h, S, c]);
|
|
1756
|
+
const K = async (g, I) => {
|
|
1757
|
+
i({ type: ge, payload: { isLoading: !0 } }), U();
|
|
1758
|
+
const b = Ye();
|
|
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,
|
|
1740
1762
|
nonce: b,
|
|
1741
1763
|
clientId: r,
|
|
1742
|
-
code_challenge:
|
|
1764
|
+
code_challenge: lr
|
|
1743
1765
|
});
|
|
1744
|
-
if (
|
|
1745
|
-
const
|
|
1766
|
+
if (st.status) {
|
|
1767
|
+
const oe = await $a({
|
|
1768
|
+
endpoint: o,
|
|
1746
1769
|
username: g,
|
|
1747
|
-
password:
|
|
1770
|
+
password: I,
|
|
1748
1771
|
clientId: r,
|
|
1749
1772
|
sessionExpiration: t,
|
|
1750
1773
|
nonce: b,
|
|
1751
|
-
type:
|
|
1752
|
-
code:
|
|
1753
|
-
code_verifier:
|
|
1774
|
+
type: he.CODE,
|
|
1775
|
+
code: st.data,
|
|
1776
|
+
code_verifier: ne,
|
|
1754
1777
|
domain: a,
|
|
1755
1778
|
ua: navigator.userAgent
|
|
1756
1779
|
});
|
|
1757
|
-
return
|
|
1758
|
-
type:
|
|
1780
|
+
return oe.status ? (m(oe.idToken), y(oe.accessToken), _(oe.refreshToken), i({
|
|
1781
|
+
type: Ae,
|
|
1759
1782
|
payload: {
|
|
1760
|
-
authenticationType:
|
|
1783
|
+
authenticationType: he.CODE,
|
|
1761
1784
|
user: {
|
|
1762
|
-
userId:
|
|
1785
|
+
userId: oe.userId,
|
|
1763
1786
|
username: g,
|
|
1764
|
-
email:
|
|
1787
|
+
email: oe.email
|
|
1765
1788
|
}
|
|
1766
1789
|
}
|
|
1767
|
-
}), !0) : (
|
|
1790
|
+
}), !0) : (v(Fe), !1);
|
|
1768
1791
|
}
|
|
1769
1792
|
return !1;
|
|
1770
|
-
},
|
|
1771
|
-
g == null || g.preventDefault(), await S(
|
|
1772
|
-
},
|
|
1773
|
-
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;
|
|
1774
1797
|
try {
|
|
1775
|
-
if (g &&
|
|
1776
|
-
if (
|
|
1777
|
-
|
|
1778
|
-
const
|
|
1779
|
-
if (
|
|
1780
|
-
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;
|
|
1781
1804
|
}
|
|
1782
|
-
|
|
1783
|
-
const b = await
|
|
1805
|
+
c("getAccessToken: invalid access token, trying to refresh it");
|
|
1806
|
+
const b = await re.refreshtoken({
|
|
1807
|
+
endpoint: o,
|
|
1784
1808
|
clientId: r,
|
|
1785
|
-
userId:
|
|
1786
|
-
nonce:
|
|
1809
|
+
userId: I.userId,
|
|
1810
|
+
nonce: M,
|
|
1787
1811
|
domain: a
|
|
1788
1812
|
});
|
|
1789
|
-
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(
|
|
1790
1814
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1791
|
-
), await S(
|
|
1815
|
+
), await S(ce), "");
|
|
1792
1816
|
}
|
|
1793
|
-
return
|
|
1817
|
+
return c(
|
|
1794
1818
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
1795
|
-
), await S(
|
|
1819
|
+
), await S(ce), "";
|
|
1796
1820
|
} catch {
|
|
1797
|
-
return
|
|
1821
|
+
return c(
|
|
1798
1822
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1799
|
-
), await S(
|
|
1823
|
+
), await S(xa), "";
|
|
1800
1824
|
}
|
|
1801
|
-
},
|
|
1802
|
-
const { user: g } =
|
|
1803
|
-
let
|
|
1804
|
-
|
|
1825
|
+
}, P = () => s.isAuthenticated && h ? h : "", B = async () => {
|
|
1826
|
+
const { user: g } = s;
|
|
1827
|
+
let I = await de({
|
|
1828
|
+
endpoint: o,
|
|
1829
|
+
accessToken: u,
|
|
1805
1830
|
clientId: r,
|
|
1806
|
-
type:
|
|
1831
|
+
type: le.GET_REGISTRATION_OPTIONS,
|
|
1807
1832
|
params: {
|
|
1808
1833
|
clientId: r,
|
|
1809
1834
|
id: g == null ? void 0 : g.userId,
|
|
1810
1835
|
username: g == null ? void 0 : g.username
|
|
1811
1836
|
}
|
|
1812
1837
|
});
|
|
1813
|
-
if (
|
|
1838
|
+
if (I.status)
|
|
1814
1839
|
try {
|
|
1815
|
-
const b = await
|
|
1816
|
-
return
|
|
1817
|
-
|
|
1840
|
+
const b = await Er(I.data);
|
|
1841
|
+
return I = await de({
|
|
1842
|
+
endpoint: o,
|
|
1843
|
+
accessToken: u,
|
|
1818
1844
|
clientId: r,
|
|
1819
|
-
type:
|
|
1845
|
+
type: le.VERIFY_REGISTRATION,
|
|
1820
1846
|
params: {
|
|
1821
1847
|
clientId: r,
|
|
1822
1848
|
id: g == null ? void 0 : g.userId,
|
|
1823
1849
|
username: g == null ? void 0 : g.username,
|
|
1824
1850
|
registration: b
|
|
1825
1851
|
}
|
|
1826
|
-
}), !!(
|
|
1852
|
+
}), !!(I.status && I.data.length > 0);
|
|
1827
1853
|
} catch {
|
|
1828
|
-
return await
|
|
1829
|
-
|
|
1854
|
+
return await de({
|
|
1855
|
+
endpoint: o,
|
|
1856
|
+
accessToken: u,
|
|
1830
1857
|
clientId: r,
|
|
1831
|
-
type:
|
|
1858
|
+
type: le.VERIFY_REGISTRATION,
|
|
1832
1859
|
params: {
|
|
1833
1860
|
clientId: r,
|
|
1834
1861
|
id: g == null ? void 0 : g.userId,
|
|
@@ -1838,92 +1865,95 @@ const La = (e) => q(
|
|
|
1838
1865
|
}), !1;
|
|
1839
1866
|
}
|
|
1840
1867
|
return !1;
|
|
1841
|
-
},
|
|
1842
|
-
|
|
1843
|
-
const g =
|
|
1844
|
-
|
|
1845
|
-
const
|
|
1846
|
-
let b = await
|
|
1847
|
-
|
|
1868
|
+
}, Z = async () => {
|
|
1869
|
+
i({ type: ge, payload: { isLoading: !0 } }), U();
|
|
1870
|
+
const g = Ye();
|
|
1871
|
+
Q(g), c("loginWithPasskey");
|
|
1872
|
+
const I = Ye();
|
|
1873
|
+
let b = await de({
|
|
1874
|
+
endpoint: o,
|
|
1875
|
+
accessToken: u,
|
|
1848
1876
|
clientId: r,
|
|
1849
|
-
type:
|
|
1877
|
+
type: le.GET_AUTHENTICATION_OPTIONS,
|
|
1850
1878
|
params: {
|
|
1851
|
-
id:
|
|
1879
|
+
id: I,
|
|
1852
1880
|
clientId: r
|
|
1853
1881
|
}
|
|
1854
1882
|
});
|
|
1855
1883
|
if (b.status)
|
|
1856
1884
|
try {
|
|
1857
|
-
const
|
|
1858
|
-
return b = await
|
|
1859
|
-
|
|
1885
|
+
const ne = await Tr(b.data);
|
|
1886
|
+
return b = await de({
|
|
1887
|
+
endpoint: o,
|
|
1888
|
+
accessToken: u,
|
|
1860
1889
|
clientId: r,
|
|
1861
|
-
type:
|
|
1890
|
+
type: le.VERIFY_AUTHENTICATION,
|
|
1862
1891
|
params: {
|
|
1863
1892
|
clientId: r,
|
|
1864
|
-
id:
|
|
1865
|
-
authentication:
|
|
1893
|
+
id: I,
|
|
1894
|
+
authentication: ne,
|
|
1866
1895
|
nonce: g,
|
|
1867
1896
|
domain: a,
|
|
1868
1897
|
sessionExpiration: t,
|
|
1869
1898
|
ua: navigator.userAgent
|
|
1870
1899
|
}
|
|
1871
|
-
}), b.data.status ===
|
|
1872
|
-
type:
|
|
1900
|
+
}), b.data.status === Ee ? (m(b.data.idToken), y(b.data.accessToken), _(b.data.refreshToken), i({
|
|
1901
|
+
type: Ae,
|
|
1873
1902
|
payload: {
|
|
1874
|
-
authenticationType:
|
|
1903
|
+
authenticationType: he.PASSKEY,
|
|
1875
1904
|
user: {
|
|
1876
1905
|
userId: b.data.userId,
|
|
1877
1906
|
username: b.data.username,
|
|
1878
1907
|
email: b.data.email
|
|
1879
1908
|
}
|
|
1880
1909
|
}
|
|
1881
|
-
}), !0) : (
|
|
1910
|
+
}), !0) : (v(Fe), !1);
|
|
1882
1911
|
} catch {
|
|
1883
|
-
return await
|
|
1884
|
-
|
|
1912
|
+
return await de({
|
|
1913
|
+
endpoint: o,
|
|
1914
|
+
accessToken: u,
|
|
1885
1915
|
clientId: r,
|
|
1886
|
-
type:
|
|
1916
|
+
type: le.VERIFY_AUTHENTICATION,
|
|
1887
1917
|
params: {
|
|
1888
1918
|
clientId: r,
|
|
1889
|
-
id:
|
|
1919
|
+
id: I,
|
|
1890
1920
|
authentication: {},
|
|
1891
1921
|
nonce: g,
|
|
1892
1922
|
domain: a,
|
|
1893
1923
|
sessionExpiration: t
|
|
1894
1924
|
}
|
|
1895
|
-
}),
|
|
1925
|
+
}), v(Fe), !1;
|
|
1896
1926
|
}
|
|
1897
1927
|
return !1;
|
|
1898
1928
|
};
|
|
1899
|
-
return /* @__PURE__ */
|
|
1900
|
-
|
|
1929
|
+
return /* @__PURE__ */ d(Wa.Provider, { value: { state: s, dispatch: i }, children: /* @__PURE__ */ d(
|
|
1930
|
+
Qt.Provider,
|
|
1901
1931
|
{
|
|
1902
1932
|
value: {
|
|
1903
|
-
...
|
|
1904
|
-
login:
|
|
1905
|
-
logout:
|
|
1906
|
-
getAccessToken:
|
|
1907
|
-
getIdToken:
|
|
1908
|
-
registeringForPasskey:
|
|
1909
|
-
loginWithPasskey:
|
|
1933
|
+
...s,
|
|
1934
|
+
login: K,
|
|
1935
|
+
logout: w,
|
|
1936
|
+
getAccessToken: O,
|
|
1937
|
+
getIdToken: P,
|
|
1938
|
+
registeringForPasskey: B,
|
|
1939
|
+
loginWithPasskey: Z
|
|
1910
1940
|
},
|
|
1911
1941
|
children: e
|
|
1912
1942
|
}
|
|
1913
1943
|
) });
|
|
1914
|
-
},
|
|
1915
|
-
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) {
|
|
1916
1946
|
return {
|
|
1917
1947
|
days: Math.trunc(e / 864e5),
|
|
1918
1948
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1919
1949
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1920
1950
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1921
1951
|
milliseconds: Math.trunc(e % 1e3),
|
|
1922
|
-
microseconds: Math.trunc(
|
|
1923
|
-
nanoseconds: Math.trunc(
|
|
1952
|
+
microseconds: Math.trunc(wt(e * 1e3) % 1e3),
|
|
1953
|
+
nanoseconds: Math.trunc(wt(e * 1e6) % 1e3)
|
|
1924
1954
|
};
|
|
1925
1955
|
}
|
|
1926
|
-
function
|
|
1956
|
+
function Ja(e) {
|
|
1927
1957
|
return {
|
|
1928
1958
|
days: e / 86400000n,
|
|
1929
1959
|
hours: e / 3600000n % 24n,
|
|
@@ -1934,20 +1964,20 @@ function Wa(e) {
|
|
|
1934
1964
|
nanoseconds: 0n
|
|
1935
1965
|
};
|
|
1936
1966
|
}
|
|
1937
|
-
function
|
|
1967
|
+
function Ga(e) {
|
|
1938
1968
|
switch (typeof e) {
|
|
1939
1969
|
case "number": {
|
|
1940
1970
|
if (Number.isFinite(e))
|
|
1941
|
-
return
|
|
1971
|
+
return Va(e);
|
|
1942
1972
|
break;
|
|
1943
1973
|
}
|
|
1944
1974
|
case "bigint":
|
|
1945
|
-
return
|
|
1975
|
+
return Ja(e);
|
|
1946
1976
|
}
|
|
1947
1977
|
throw new TypeError("Expected a finite number or bigint");
|
|
1948
1978
|
}
|
|
1949
|
-
const
|
|
1950
|
-
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) {
|
|
1951
1981
|
const r = typeof e == "bigint";
|
|
1952
1982
|
if (!r && !Number.isFinite(e))
|
|
1953
1983
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1955,43 +1985,43 @@ function Fa(e, t) {
|
|
|
1955
1985
|
const a = e < 0 ? "-" : "";
|
|
1956
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);
|
|
1957
1987
|
let n = [];
|
|
1958
|
-
const o = (
|
|
1959
|
-
const
|
|
1960
|
-
return (Math.round(
|
|
1961
|
-
}, s = (
|
|
1962
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1963
|
-
if (
|
|
1964
|
-
const y =
|
|
1965
|
-
|
|
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;
|
|
1966
1996
|
} else
|
|
1967
|
-
|
|
1968
|
-
n.push(
|
|
1997
|
+
u += t.verbose ? " " + Fa(m, h) : l;
|
|
1998
|
+
n.push(u);
|
|
1969
1999
|
}
|
|
1970
|
-
}, i =
|
|
1971
|
-
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)
|
|
1972
2002
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1973
|
-
const
|
|
1974
|
-
if (s(
|
|
1975
|
-
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");
|
|
1976
2006
|
else {
|
|
1977
|
-
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;
|
|
1978
2008
|
s(
|
|
1979
|
-
Number.parseFloat(
|
|
2009
|
+
Number.parseFloat(_),
|
|
1980
2010
|
"millisecond",
|
|
1981
2011
|
"ms",
|
|
1982
|
-
|
|
2012
|
+
_
|
|
1983
2013
|
);
|
|
1984
2014
|
}
|
|
1985
2015
|
} else {
|
|
1986
|
-
const
|
|
1987
|
-
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);
|
|
1988
2018
|
}
|
|
1989
2019
|
if (n.length === 0)
|
|
1990
2020
|
return a + "0" + (t.verbose ? " milliseconds" : "ms");
|
|
1991
|
-
const
|
|
1992
|
-
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);
|
|
1993
2023
|
}
|
|
1994
|
-
const
|
|
2024
|
+
const Xa = process.env.NODE_ENV === "production", er = !Xa, Qa = er ? "gizmette.local.com" : "gizmette.com", Jo = async () => {
|
|
1995
2025
|
const e = {
|
|
1996
2026
|
/**
|
|
1997
2027
|
* A boolean value that indicates the application would
|
|
@@ -2040,35 +2070,35 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2040
2070
|
e
|
|
2041
2071
|
);
|
|
2042
2072
|
});
|
|
2043
|
-
}, Go = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */
|
|
2044
|
-
/* @__PURE__ */
|
|
2045
|
-
/* @__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] })
|
|
2046
2076
|
] }) }, `${e}-${r}`)) : null, Yo = new Intl.NumberFormat("en", {
|
|
2047
2077
|
style: "decimal",
|
|
2048
2078
|
signDisplay: "never",
|
|
2049
2079
|
minimumFractionDigits: 0,
|
|
2050
2080
|
maximumFractionDigits: 0
|
|
2051
|
-
}), Fo = (e) => e > 0 ?
|
|
2081
|
+
}), Fo = (e) => e > 0 ? qa(e, {
|
|
2052
2082
|
secondsDecimalDigits: 2,
|
|
2053
2083
|
unitCount: 2
|
|
2054
|
-
}) : "N/A",
|
|
2084
|
+
}) : "N/A", Za = ({
|
|
2055
2085
|
isAuthenticated: e,
|
|
2056
2086
|
extraClass: t
|
|
2057
2087
|
}) => p(
|
|
2058
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",
|
|
2059
2089
|
e ? "pt-0" : "pt-10",
|
|
2060
2090
|
t
|
|
2061
|
-
),
|
|
2091
|
+
), en = ({
|
|
2062
2092
|
extraClass: e
|
|
2063
2093
|
}) => p("px-2 sm:px-0", e), jo = (e, t) => t === 1 ? e : `${e}s`, zo = (e, t) => {
|
|
2064
2094
|
let r;
|
|
2065
2095
|
return (...a) => {
|
|
2066
2096
|
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2067
2097
|
};
|
|
2068
|
-
},
|
|
2069
|
-
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;
|
|
2070
2100
|
return e && t && r && a;
|
|
2071
|
-
},
|
|
2101
|
+
}, It = "av-button", Ke = "icon", at = "button", Ze = "link", an = ({
|
|
2072
2102
|
type: e,
|
|
2073
2103
|
size: t,
|
|
2074
2104
|
labelRight: r,
|
|
@@ -2076,16 +2106,16 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2076
2106
|
align: n,
|
|
2077
2107
|
animated: o
|
|
2078
2108
|
}) => {
|
|
2079
|
-
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";
|
|
2080
2110
|
switch (e) {
|
|
2081
|
-
case
|
|
2082
|
-
case
|
|
2111
|
+
case at:
|
|
2112
|
+
case Ze:
|
|
2083
2113
|
return p({
|
|
2084
2114
|
[s]: t === "small",
|
|
2085
2115
|
[i]: t === "medium",
|
|
2086
|
-
[
|
|
2116
|
+
[c]: t === "large"
|
|
2087
2117
|
});
|
|
2088
|
-
case
|
|
2118
|
+
case Ke:
|
|
2089
2119
|
return p("flex items-center", {
|
|
2090
2120
|
"justify-center": n === "center",
|
|
2091
2121
|
"justify-start": n === "left",
|
|
@@ -2104,7 +2134,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2104
2134
|
"h-12": t === "large" && o && (r || a)
|
|
2105
2135
|
});
|
|
2106
2136
|
}
|
|
2107
|
-
},
|
|
2137
|
+
}, nn = ({
|
|
2108
2138
|
type: e,
|
|
2109
2139
|
size: t,
|
|
2110
2140
|
labelRight: r,
|
|
@@ -2112,22 +2142,22 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2112
2142
|
}) => {
|
|
2113
2143
|
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
2114
2144
|
switch (e) {
|
|
2115
|
-
case
|
|
2116
|
-
case
|
|
2145
|
+
case at:
|
|
2146
|
+
case Ze:
|
|
2117
2147
|
return p({
|
|
2118
|
-
"text-center": e ===
|
|
2148
|
+
"text-center": e === Ze,
|
|
2119
2149
|
[n]: t === "small",
|
|
2120
2150
|
[o]: t === "medium",
|
|
2121
2151
|
[s]: t === "large"
|
|
2122
2152
|
});
|
|
2123
|
-
case
|
|
2153
|
+
case Ke:
|
|
2124
2154
|
return p({
|
|
2125
2155
|
[n]: t === "small" && (r || a),
|
|
2126
2156
|
[o]: t === "medium" && (r || a),
|
|
2127
2157
|
[s]: t === "large" && (r || a)
|
|
2128
2158
|
});
|
|
2129
2159
|
}
|
|
2130
|
-
},
|
|
2160
|
+
}, on = ({
|
|
2131
2161
|
mode: e,
|
|
2132
2162
|
noBackground: t,
|
|
2133
2163
|
noTruncate: r,
|
|
@@ -2163,7 +2193,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2163
2193
|
return p("not-prose text-copy-lighter", {
|
|
2164
2194
|
truncate: !r
|
|
2165
2195
|
});
|
|
2166
|
-
},
|
|
2196
|
+
}, sn = ({
|
|
2167
2197
|
mode: e,
|
|
2168
2198
|
noBackground: t,
|
|
2169
2199
|
variant: r
|
|
@@ -2193,13 +2223,13 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2193
2223
|
if (r === "selected")
|
|
2194
2224
|
return "bg-action-selected-dark";
|
|
2195
2225
|
}
|
|
2196
|
-
},
|
|
2226
|
+
}, cn = ({
|
|
2197
2227
|
radius: e
|
|
2198
2228
|
}) => p({
|
|
2199
2229
|
"rounded-full": e === "large",
|
|
2200
2230
|
"rounded-md": e === "medium",
|
|
2201
2231
|
"rounded-sm": e === "small"
|
|
2202
|
-
}),
|
|
2232
|
+
}), ln = ({
|
|
2203
2233
|
mode: e,
|
|
2204
2234
|
disabled: t,
|
|
2205
2235
|
variant: r
|
|
@@ -2229,7 +2259,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2229
2259
|
});
|
|
2230
2260
|
if (r === "selected")
|
|
2231
2261
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
2232
|
-
},
|
|
2262
|
+
}, dn = ({
|
|
2233
2263
|
mode: e,
|
|
2234
2264
|
disabled: t,
|
|
2235
2265
|
variant: r
|
|
@@ -2259,7 +2289,7 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2259
2289
|
});
|
|
2260
2290
|
if (r === "selected")
|
|
2261
2291
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
2262
|
-
},
|
|
2292
|
+
}, un = ({
|
|
2263
2293
|
mode: e,
|
|
2264
2294
|
noBorder: t,
|
|
2265
2295
|
variant: r
|
|
@@ -2289,14 +2319,14 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2289
2319
|
});
|
|
2290
2320
|
if (r === "selected")
|
|
2291
2321
|
return "border border-border-selected-dark";
|
|
2292
|
-
},
|
|
2322
|
+
}, mn = ({
|
|
2293
2323
|
focusMode: e
|
|
2294
2324
|
}) => p("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2295
2325
|
"focus:outline-focus-dark": e === "dark",
|
|
2296
2326
|
"focus:outline-focus-light": e === "light",
|
|
2297
2327
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2298
2328
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2299
|
-
}),
|
|
2329
|
+
}), hn = ({
|
|
2300
2330
|
mode: e,
|
|
2301
2331
|
raw: t,
|
|
2302
2332
|
iconClassName: r
|
|
@@ -2308,11 +2338,11 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2308
2338
|
"dark:text-copy-accent-dark": e === "system"
|
|
2309
2339
|
},
|
|
2310
2340
|
r
|
|
2311
|
-
),
|
|
2341
|
+
), pn = ({
|
|
2312
2342
|
animated: e
|
|
2313
2343
|
}) => p({
|
|
2314
2344
|
"transition-opacity duration-300 ease-in": e
|
|
2315
|
-
}),
|
|
2345
|
+
}), tr = ({
|
|
2316
2346
|
type: e,
|
|
2317
2347
|
className: t,
|
|
2318
2348
|
raw: r,
|
|
@@ -2321,64 +2351,64 @@ const ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.
|
|
|
2321
2351
|
disabled: o,
|
|
2322
2352
|
fullWidth: s,
|
|
2323
2353
|
size: i,
|
|
2324
|
-
noBorder:
|
|
2325
|
-
labelRight:
|
|
2326
|
-
labelLeft:
|
|
2327
|
-
noBackground:
|
|
2328
|
-
variant:
|
|
2329
|
-
noTruncate:
|
|
2354
|
+
noBorder: c,
|
|
2355
|
+
labelRight: f,
|
|
2356
|
+
labelLeft: h,
|
|
2357
|
+
noBackground: m,
|
|
2358
|
+
variant: l,
|
|
2359
|
+
noTruncate: u,
|
|
2330
2360
|
align: y,
|
|
2331
|
-
radius:
|
|
2332
|
-
animated:
|
|
2333
|
-
}) => (
|
|
2334
|
-
|
|
2335
|
-
|
|
2361
|
+
radius: E,
|
|
2362
|
+
animated: T
|
|
2363
|
+
}) => (l || (l = "primary"), r ? p(It, t) : p(
|
|
2364
|
+
It,
|
|
2365
|
+
on({
|
|
2336
2366
|
mode: a,
|
|
2337
|
-
variant:
|
|
2338
|
-
noBackground:
|
|
2339
|
-
noTruncate:
|
|
2367
|
+
variant: l,
|
|
2368
|
+
noBackground: m,
|
|
2369
|
+
noTruncate: u
|
|
2340
2370
|
}),
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2371
|
+
sn({ mode: a, noBackground: m, variant: l }),
|
|
2372
|
+
cn({ radius: E }),
|
|
2373
|
+
an({
|
|
2344
2374
|
type: e,
|
|
2345
2375
|
size: i,
|
|
2346
|
-
labelRight:
|
|
2347
|
-
labelLeft:
|
|
2376
|
+
labelRight: f,
|
|
2377
|
+
labelLeft: h,
|
|
2348
2378
|
align: y,
|
|
2349
|
-
animated:
|
|
2379
|
+
animated: T
|
|
2350
2380
|
}),
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
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 }),
|
|
2356
2386
|
{
|
|
2357
2387
|
"w-full": s,
|
|
2358
2388
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2359
2389
|
},
|
|
2360
2390
|
p({
|
|
2361
|
-
"transition-[width] duration-300 ease-in-out": e ===
|
|
2391
|
+
"transition-[width] duration-300 ease-in-out": e === Ke && T
|
|
2362
2392
|
}),
|
|
2363
2393
|
t
|
|
2364
|
-
)),
|
|
2394
|
+
)), fn = (e, t, r) => {
|
|
2365
2395
|
var a;
|
|
2366
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);
|
|
2367
|
-
},
|
|
2397
|
+
}, nt = X.forwardRef((e, t) => {
|
|
2368
2398
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2369
|
-
return /* @__PURE__ */
|
|
2399
|
+
return /* @__PURE__ */ d(
|
|
2370
2400
|
"button",
|
|
2371
2401
|
{
|
|
2372
2402
|
ref: t,
|
|
2373
2403
|
onClick: (o) => {
|
|
2374
|
-
|
|
2404
|
+
fn(o, a, r);
|
|
2375
2405
|
},
|
|
2376
2406
|
...n
|
|
2377
2407
|
}
|
|
2378
2408
|
);
|
|
2379
2409
|
});
|
|
2380
|
-
|
|
2381
|
-
const
|
|
2410
|
+
nt.displayName = "BaseButton";
|
|
2411
|
+
const rr = X.forwardRef(
|
|
2382
2412
|
({
|
|
2383
2413
|
children: e,
|
|
2384
2414
|
disabled: t = !1,
|
|
@@ -2388,14 +2418,14 @@ const Xt = X.forwardRef(
|
|
|
2388
2418
|
className: o,
|
|
2389
2419
|
size: s = "medium",
|
|
2390
2420
|
raw: i = !1,
|
|
2391
|
-
noBorder:
|
|
2392
|
-
variant:
|
|
2393
|
-
noTruncate:
|
|
2394
|
-
radius:
|
|
2395
|
-
...
|
|
2396
|
-
},
|
|
2397
|
-
const y =
|
|
2398
|
-
type:
|
|
2421
|
+
noBorder: c = !1,
|
|
2422
|
+
variant: f = "primary",
|
|
2423
|
+
noTruncate: h = !1,
|
|
2424
|
+
radius: m = "large",
|
|
2425
|
+
...l
|
|
2426
|
+
}, u) => {
|
|
2427
|
+
const y = tr({
|
|
2428
|
+
type: at,
|
|
2399
2429
|
mode: r,
|
|
2400
2430
|
focusMode: a,
|
|
2401
2431
|
fullWidth: n,
|
|
@@ -2403,39 +2433,39 @@ const Xt = X.forwardRef(
|
|
|
2403
2433
|
raw: i,
|
|
2404
2434
|
className: o,
|
|
2405
2435
|
size: s,
|
|
2406
|
-
noBorder:
|
|
2407
|
-
variant:
|
|
2408
|
-
noTruncate:
|
|
2409
|
-
radius:
|
|
2436
|
+
noBorder: c,
|
|
2437
|
+
variant: f,
|
|
2438
|
+
noTruncate: h,
|
|
2439
|
+
radius: m
|
|
2410
2440
|
});
|
|
2411
|
-
return /* @__PURE__ */
|
|
2412
|
-
|
|
2441
|
+
return /* @__PURE__ */ d(
|
|
2442
|
+
nt,
|
|
2413
2443
|
{
|
|
2414
|
-
ref:
|
|
2444
|
+
ref: u,
|
|
2415
2445
|
className: y,
|
|
2416
2446
|
disabled: t,
|
|
2417
|
-
...
|
|
2447
|
+
...l,
|
|
2418
2448
|
children: e
|
|
2419
2449
|
}
|
|
2420
2450
|
);
|
|
2421
2451
|
}
|
|
2422
2452
|
);
|
|
2423
|
-
|
|
2424
|
-
function
|
|
2425
|
-
const e =
|
|
2426
|
-
return
|
|
2453
|
+
rr.displayName = "Button";
|
|
2454
|
+
function gn() {
|
|
2455
|
+
const e = C(!1);
|
|
2456
|
+
return G(() => (e.current = !0, () => {
|
|
2427
2457
|
e.current = !1;
|
|
2428
2458
|
}), []), q(() => e.current, []);
|
|
2429
2459
|
}
|
|
2430
|
-
function
|
|
2431
|
-
return
|
|
2460
|
+
function yn(e) {
|
|
2461
|
+
return Le(() => e.every((t) => t == null) ? () => {
|
|
2432
2462
|
} : (t) => {
|
|
2433
2463
|
e.forEach((r) => {
|
|
2434
2464
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
2435
2465
|
});
|
|
2436
2466
|
}, e);
|
|
2437
2467
|
}
|
|
2438
|
-
const
|
|
2468
|
+
const bn = {
|
|
2439
2469
|
x: 0,
|
|
2440
2470
|
y: 0,
|
|
2441
2471
|
width: 0,
|
|
@@ -2445,32 +2475,32 @@ const gn = {
|
|
|
2445
2475
|
bottom: 0,
|
|
2446
2476
|
right: 0
|
|
2447
2477
|
};
|
|
2448
|
-
function
|
|
2449
|
-
const t =
|
|
2450
|
-
const
|
|
2451
|
-
|
|
2452
|
-
a.current && t() && o(
|
|
2478
|
+
function je(e) {
|
|
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);
|
|
2453
2483
|
}));
|
|
2454
2484
|
}), [t]);
|
|
2455
|
-
return
|
|
2485
|
+
return G(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
2456
2486
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2457
2487
|
}), [s, e]), [a, n];
|
|
2458
2488
|
}
|
|
2459
|
-
const
|
|
2489
|
+
const En = {
|
|
2460
2490
|
small: 24,
|
|
2461
2491
|
// w-6
|
|
2462
2492
|
medium: 32,
|
|
2463
2493
|
// w-8
|
|
2464
2494
|
large: 48
|
|
2465
2495
|
// w-12
|
|
2466
|
-
},
|
|
2496
|
+
}, wn = {
|
|
2467
2497
|
small: 8 * 2,
|
|
2468
2498
|
// px-2 x 2
|
|
2469
2499
|
medium: 12 * 2,
|
|
2470
2500
|
// px-3 x 2
|
|
2471
2501
|
large: 16 * 2
|
|
2472
2502
|
// px-4 x 2
|
|
2473
|
-
},
|
|
2503
|
+
}, In = 2, Pe = X.forwardRef(
|
|
2474
2504
|
({
|
|
2475
2505
|
children: e,
|
|
2476
2506
|
disabled: t = !1,
|
|
@@ -2480,77 +2510,77 @@ const yn = {
|
|
|
2480
2510
|
className: o,
|
|
2481
2511
|
type: s = "button",
|
|
2482
2512
|
raw: i = !1,
|
|
2483
|
-
noBorder:
|
|
2484
|
-
"aria-label":
|
|
2485
|
-
label:
|
|
2486
|
-
size:
|
|
2487
|
-
labelRight:
|
|
2488
|
-
labelLeft:
|
|
2513
|
+
noBorder: c = !1,
|
|
2514
|
+
"aria-label": f,
|
|
2515
|
+
label: h,
|
|
2516
|
+
size: m = "medium",
|
|
2517
|
+
labelRight: l,
|
|
2518
|
+
labelLeft: u,
|
|
2489
2519
|
noBackground: y = !1,
|
|
2490
|
-
align:
|
|
2491
|
-
radius:
|
|
2492
|
-
variant:
|
|
2493
|
-
iconClassName:
|
|
2494
|
-
animated:
|
|
2495
|
-
...
|
|
2496
|
-
},
|
|
2497
|
-
const
|
|
2498
|
-
type:
|
|
2520
|
+
align: E = "center",
|
|
2521
|
+
radius: T = "large",
|
|
2522
|
+
variant: _ = "primary",
|
|
2523
|
+
iconClassName: F,
|
|
2524
|
+
animated: M = !1,
|
|
2525
|
+
...Q
|
|
2526
|
+
}, L) => {
|
|
2527
|
+
const re = tr({
|
|
2528
|
+
type: Ke,
|
|
2499
2529
|
mode: r,
|
|
2500
2530
|
focusMode: a,
|
|
2501
2531
|
fullWidth: n,
|
|
2502
2532
|
disabled: t,
|
|
2503
2533
|
raw: i,
|
|
2504
2534
|
className: o,
|
|
2505
|
-
noBorder:
|
|
2506
|
-
size:
|
|
2507
|
-
labelRight:
|
|
2508
|
-
labelLeft:
|
|
2535
|
+
noBorder: c,
|
|
2536
|
+
size: m,
|
|
2537
|
+
labelRight: l,
|
|
2538
|
+
labelLeft: u,
|
|
2509
2539
|
noBackground: y,
|
|
2510
|
-
align:
|
|
2511
|
-
radius:
|
|
2512
|
-
variant:
|
|
2513
|
-
animated:
|
|
2514
|
-
}), U =
|
|
2515
|
-
return
|
|
2516
|
-
|
|
2517
|
-
}, [
|
|
2518
|
-
|
|
2540
|
+
align: E,
|
|
2541
|
+
radius: T,
|
|
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`));
|
|
2519
2549
|
}, [
|
|
2520
2550
|
K,
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
m,
|
|
2525
|
-
T,
|
|
2551
|
+
l,
|
|
2552
|
+
S,
|
|
2553
|
+
O,
|
|
2526
2554
|
u,
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2555
|
+
w,
|
|
2556
|
+
m,
|
|
2557
|
+
M
|
|
2558
|
+
]), /* @__PURE__ */ $(
|
|
2559
|
+
nt,
|
|
2530
2560
|
{
|
|
2531
|
-
ref:
|
|
2532
|
-
className:
|
|
2561
|
+
ref: I,
|
|
2562
|
+
className: re,
|
|
2533
2563
|
disabled: t,
|
|
2534
2564
|
type: s,
|
|
2535
|
-
"aria-label":
|
|
2536
|
-
...
|
|
2565
|
+
"aria-label": f || h,
|
|
2566
|
+
...Q,
|
|
2537
2567
|
children: [
|
|
2538
|
-
/* @__PURE__ */
|
|
2539
|
-
|
|
2568
|
+
/* @__PURE__ */ d(
|
|
2569
|
+
Tt,
|
|
2540
2570
|
{
|
|
2541
|
-
label:
|
|
2542
|
-
labelRef:
|
|
2543
|
-
labelClass:
|
|
2571
|
+
label: u,
|
|
2572
|
+
labelRef: w,
|
|
2573
|
+
labelClass: v,
|
|
2544
2574
|
labelInnerClass: "pr-2"
|
|
2545
2575
|
}
|
|
2546
2576
|
),
|
|
2547
|
-
/* @__PURE__ */
|
|
2548
|
-
/* @__PURE__ */
|
|
2549
|
-
|
|
2577
|
+
/* @__PURE__ */ d("span", { ref: P, className: U, children: e }),
|
|
2578
|
+
/* @__PURE__ */ d(
|
|
2579
|
+
Tt,
|
|
2550
2580
|
{
|
|
2551
|
-
label:
|
|
2552
|
-
labelRef:
|
|
2553
|
-
labelClass:
|
|
2581
|
+
label: l,
|
|
2582
|
+
labelRef: S,
|
|
2583
|
+
labelClass: v,
|
|
2554
2584
|
labelInnerClass: "pl-2"
|
|
2555
2585
|
}
|
|
2556
2586
|
)
|
|
@@ -2558,13 +2588,13 @@ const yn = {
|
|
|
2558
2588
|
}
|
|
2559
2589
|
);
|
|
2560
2590
|
}
|
|
2561
|
-
),
|
|
2591
|
+
), Tt = ({
|
|
2562
2592
|
labelRef: e,
|
|
2563
2593
|
labelClass: t,
|
|
2564
2594
|
label: r,
|
|
2565
2595
|
labelInnerClass: a
|
|
2566
|
-
}) => /* @__PURE__ */
|
|
2567
|
-
|
|
2596
|
+
}) => /* @__PURE__ */ d("span", { ref: e, className: t, children: r && /* @__PURE__ */ d("span", { className: a, children: r }) });
|
|
2597
|
+
Pe.displayName = "ButtonIcon";
|
|
2568
2598
|
/*!
|
|
2569
2599
|
@versini/ui-button v4.2.4
|
|
2570
2600
|
© 2025 gizmette.com
|
|
@@ -2578,7 +2608,7 @@ try {
|
|
|
2578
2608
|
});
|
|
2579
2609
|
} catch {
|
|
2580
2610
|
}
|
|
2581
|
-
const
|
|
2611
|
+
const Tn = X.forwardRef(
|
|
2582
2612
|
({
|
|
2583
2613
|
children: e,
|
|
2584
2614
|
mode: t = "system",
|
|
@@ -2603,8 +2633,8 @@ const wn = X.forwardRef(
|
|
|
2603
2633
|
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
2604
2634
|
}
|
|
2605
2635
|
) : "";
|
|
2606
|
-
return /* @__PURE__ */
|
|
2607
|
-
|
|
2636
|
+
return /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
|
|
2637
|
+
Pe,
|
|
2608
2638
|
{
|
|
2609
2639
|
className: p("justify-center", r),
|
|
2610
2640
|
ref: o,
|
|
@@ -2616,7 +2646,7 @@ const wn = X.forwardRef(
|
|
|
2616
2646
|
) });
|
|
2617
2647
|
}
|
|
2618
2648
|
);
|
|
2619
|
-
|
|
2649
|
+
Tn.displayName = "ButtonSort";
|
|
2620
2650
|
/*!
|
|
2621
2651
|
@versini/ui-card v3.0.13
|
|
2622
2652
|
© 2025 gizmette.com
|
|
@@ -2630,12 +2660,12 @@ try {
|
|
|
2630
2660
|
});
|
|
2631
2661
|
} catch {
|
|
2632
2662
|
}
|
|
2633
|
-
const
|
|
2634
|
-
function
|
|
2635
|
-
const t =
|
|
2663
|
+
const Re = "av-card";
|
|
2664
|
+
function Sn(e) {
|
|
2665
|
+
const t = Nt();
|
|
2636
2666
|
return `${e}${t}`;
|
|
2637
2667
|
}
|
|
2638
|
-
const
|
|
2668
|
+
const _n = ({
|
|
2639
2669
|
className: e,
|
|
2640
2670
|
headerClassName: t,
|
|
2641
2671
|
bodyClassName: r,
|
|
@@ -2645,7 +2675,7 @@ const Tn = ({
|
|
|
2645
2675
|
noBorder: s
|
|
2646
2676
|
}) => {
|
|
2647
2677
|
const i = p(
|
|
2648
|
-
|
|
2678
|
+
Re,
|
|
2649
2679
|
"rounded-md",
|
|
2650
2680
|
{
|
|
2651
2681
|
"border-none": s,
|
|
@@ -2659,7 +2689,7 @@ const Tn = ({
|
|
|
2659
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"
|
|
2660
2690
|
},
|
|
2661
2691
|
e
|
|
2662
|
-
),
|
|
2692
|
+
), c = t || p(`${Re}__header mt-0 border-b-2`, {
|
|
2663
2693
|
"text-copy-light border-border-accent": n === "darker",
|
|
2664
2694
|
"border-border-accent": n === "dark",
|
|
2665
2695
|
"border-border-medium": n === "light",
|
|
@@ -2667,23 +2697,23 @@ const Tn = ({
|
|
|
2667
2697
|
"border-border-accent dark:border-border-medium": n === "alt-system",
|
|
2668
2698
|
"mb-4": !o,
|
|
2669
2699
|
"mb-2": o
|
|
2670
|
-
}),
|
|
2700
|
+
}), f = p(r), h = a || p(`${Re}__footer pt-2`);
|
|
2671
2701
|
return {
|
|
2672
2702
|
wrapper: i,
|
|
2673
|
-
header:
|
|
2674
|
-
body:
|
|
2675
|
-
footer:
|
|
2703
|
+
header: c,
|
|
2704
|
+
body: f,
|
|
2705
|
+
footer: h
|
|
2676
2706
|
};
|
|
2677
2707
|
};
|
|
2678
|
-
function
|
|
2708
|
+
function kn({
|
|
2679
2709
|
id: e,
|
|
2680
2710
|
content: t,
|
|
2681
2711
|
userAriaLabelledby: r,
|
|
2682
2712
|
className: a
|
|
2683
2713
|
}) {
|
|
2684
|
-
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;
|
|
2685
2715
|
}
|
|
2686
|
-
const
|
|
2716
|
+
const An = ({
|
|
2687
2717
|
header: e,
|
|
2688
2718
|
headerClassName: t,
|
|
2689
2719
|
footer: r,
|
|
@@ -2692,45 +2722,45 @@ const _n = ({
|
|
|
2692
2722
|
className: o,
|
|
2693
2723
|
bodyClassName: s,
|
|
2694
2724
|
"aria-labelledby": i,
|
|
2695
|
-
mode:
|
|
2696
|
-
compact:
|
|
2697
|
-
noBorder:
|
|
2698
|
-
...
|
|
2725
|
+
mode: c = "system",
|
|
2726
|
+
compact: f = !1,
|
|
2727
|
+
noBorder: h = !1,
|
|
2728
|
+
...m
|
|
2699
2729
|
}) => {
|
|
2700
|
-
let
|
|
2701
|
-
const y = typeof e == "string",
|
|
2730
|
+
let l = null, u = null;
|
|
2731
|
+
const y = typeof e == "string", E = Sn(Re), T = _n({
|
|
2702
2732
|
className: o,
|
|
2703
2733
|
headerClassName: t,
|
|
2704
2734
|
bodyClassName: s,
|
|
2705
2735
|
footerClassName: a,
|
|
2706
|
-
mode:
|
|
2707
|
-
compact:
|
|
2708
|
-
noBorder:
|
|
2736
|
+
mode: c,
|
|
2737
|
+
compact: f,
|
|
2738
|
+
noBorder: h
|
|
2709
2739
|
});
|
|
2710
|
-
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__ */ $(
|
|
2711
2741
|
"section",
|
|
2712
2742
|
{
|
|
2713
|
-
...
|
|
2714
|
-
"aria-labelledby":
|
|
2743
|
+
...u && {
|
|
2744
|
+
"aria-labelledby": u
|
|
2715
2745
|
},
|
|
2716
|
-
className:
|
|
2717
|
-
...
|
|
2746
|
+
className: T.body,
|
|
2747
|
+
...m,
|
|
2718
2748
|
children: [
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
|
|
2749
|
+
/* @__PURE__ */ d(
|
|
2750
|
+
kn,
|
|
2721
2751
|
{
|
|
2722
|
-
...
|
|
2752
|
+
...l && { id: l },
|
|
2723
2753
|
content: e,
|
|
2724
|
-
className:
|
|
2754
|
+
className: T.header,
|
|
2725
2755
|
userAriaLabelledby: i
|
|
2726
2756
|
}
|
|
2727
2757
|
),
|
|
2728
|
-
/* @__PURE__ */
|
|
2729
|
-
r ? /* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ d("div", { children: n }),
|
|
2759
|
+
r ? /* @__PURE__ */ d("div", { className: T.footer, children: r }) : null
|
|
2730
2760
|
]
|
|
2731
2761
|
}
|
|
2732
2762
|
) });
|
|
2733
|
-
},
|
|
2763
|
+
}, He = ({
|
|
2734
2764
|
children: e,
|
|
2735
2765
|
fill: t,
|
|
2736
2766
|
viewBox: r,
|
|
@@ -2739,25 +2769,25 @@ const _n = ({
|
|
|
2739
2769
|
size: o,
|
|
2740
2770
|
title: s,
|
|
2741
2771
|
semantic: i = !1,
|
|
2742
|
-
...
|
|
2772
|
+
...c
|
|
2743
2773
|
}) => {
|
|
2744
|
-
const
|
|
2745
|
-
return /* @__PURE__ */
|
|
2746
|
-
/* @__PURE__ */
|
|
2774
|
+
const f = p(o, a);
|
|
2775
|
+
return /* @__PURE__ */ $(Ne, { children: [
|
|
2776
|
+
/* @__PURE__ */ d(
|
|
2747
2777
|
"svg",
|
|
2748
2778
|
{
|
|
2749
2779
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2750
|
-
className:
|
|
2780
|
+
className: f,
|
|
2751
2781
|
viewBox: r || n,
|
|
2752
2782
|
fill: t || "currentColor",
|
|
2753
2783
|
role: "img",
|
|
2754
2784
|
"aria-hidden": !i,
|
|
2755
2785
|
focusable: !1,
|
|
2756
|
-
...
|
|
2786
|
+
...c,
|
|
2757
2787
|
children: e
|
|
2758
2788
|
}
|
|
2759
2789
|
),
|
|
2760
|
-
s && i && /* @__PURE__ */
|
|
2790
|
+
s && i && /* @__PURE__ */ d("span", { className: "sr-only", children: s })
|
|
2761
2791
|
] });
|
|
2762
2792
|
};
|
|
2763
2793
|
/*!
|
|
@@ -2773,14 +2803,14 @@ try {
|
|
|
2773
2803
|
});
|
|
2774
2804
|
} catch {
|
|
2775
2805
|
}
|
|
2776
|
-
const
|
|
2806
|
+
const Rn = ({
|
|
2777
2807
|
className: e,
|
|
2778
2808
|
viewBox: t,
|
|
2779
2809
|
title: r,
|
|
2780
2810
|
monotone: a,
|
|
2781
2811
|
...n
|
|
2782
|
-
}) => /* @__PURE__ */
|
|
2783
|
-
|
|
2812
|
+
}) => /* @__PURE__ */ d(
|
|
2813
|
+
He,
|
|
2784
2814
|
{
|
|
2785
2815
|
defaultViewBox: "0 0 1200 500",
|
|
2786
2816
|
size: "w-full",
|
|
@@ -2788,16 +2818,16 @@ const kn = ({
|
|
|
2788
2818
|
className: e,
|
|
2789
2819
|
title: r || "Dog",
|
|
2790
2820
|
...n,
|
|
2791
|
-
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" })
|
|
2792
2822
|
}
|
|
2793
|
-
),
|
|
2823
|
+
), Nn = ({
|
|
2794
2824
|
className: e,
|
|
2795
2825
|
viewBox: t,
|
|
2796
2826
|
title: r,
|
|
2797
2827
|
monotone: a,
|
|
2798
2828
|
...n
|
|
2799
|
-
}) => /* @__PURE__ */
|
|
2800
|
-
|
|
2829
|
+
}) => /* @__PURE__ */ $(
|
|
2830
|
+
He,
|
|
2801
2831
|
{
|
|
2802
2832
|
defaultViewBox: "0 0 640 512",
|
|
2803
2833
|
size: "size-5",
|
|
@@ -2806,17 +2836,17 @@ const kn = ({
|
|
|
2806
2836
|
title: r || "Hide",
|
|
2807
2837
|
...n,
|
|
2808
2838
|
children: [
|
|
2809
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ d(
|
|
2810
2840
|
"path",
|
|
2811
2841
|
{
|
|
2812
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",
|
|
2813
2843
|
opacity: a ? "1" : "0.4"
|
|
2814
2844
|
}
|
|
2815
2845
|
),
|
|
2816
|
-
/* @__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" })
|
|
2817
2847
|
]
|
|
2818
2848
|
}
|
|
2819
|
-
),
|
|
2849
|
+
), vn = ({
|
|
2820
2850
|
className: e,
|
|
2821
2851
|
viewBox: t,
|
|
2822
2852
|
title: r,
|
|
@@ -2824,8 +2854,8 @@ const kn = ({
|
|
|
2824
2854
|
...n
|
|
2825
2855
|
}) => {
|
|
2826
2856
|
const o = a ? "1" : "0.4";
|
|
2827
|
-
return /* @__PURE__ */
|
|
2828
|
-
|
|
2857
|
+
return /* @__PURE__ */ $(
|
|
2858
|
+
He,
|
|
2829
2859
|
{
|
|
2830
2860
|
defaultViewBox: "0 0 190 190",
|
|
2831
2861
|
size: "size-5",
|
|
@@ -2834,32 +2864,32 @@ const kn = ({
|
|
|
2834
2864
|
title: r || "Passkey",
|
|
2835
2865
|
...n,
|
|
2836
2866
|
children: [
|
|
2837
|
-
/* @__PURE__ */
|
|
2867
|
+
/* @__PURE__ */ d(
|
|
2838
2868
|
"path",
|
|
2839
2869
|
{
|
|
2840
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",
|
|
2841
2871
|
opacity: o
|
|
2842
2872
|
}
|
|
2843
2873
|
),
|
|
2844
|
-
/* @__PURE__ */
|
|
2874
|
+
/* @__PURE__ */ d(
|
|
2845
2875
|
"path",
|
|
2846
2876
|
{
|
|
2847
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",
|
|
2848
2878
|
opacity: o
|
|
2849
2879
|
}
|
|
2850
2880
|
),
|
|
2851
|
-
/* @__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" })
|
|
2852
2882
|
]
|
|
2853
2883
|
}
|
|
2854
2884
|
);
|
|
2855
|
-
},
|
|
2885
|
+
}, xn = ({
|
|
2856
2886
|
className: e,
|
|
2857
2887
|
viewBox: t,
|
|
2858
2888
|
title: r,
|
|
2859
2889
|
monotone: a,
|
|
2860
2890
|
...n
|
|
2861
|
-
}) => /* @__PURE__ */
|
|
2862
|
-
|
|
2891
|
+
}) => /* @__PURE__ */ $(
|
|
2892
|
+
He,
|
|
2863
2893
|
{
|
|
2864
2894
|
defaultViewBox: "0 0 576 512",
|
|
2865
2895
|
size: "size-5",
|
|
@@ -2868,14 +2898,14 @@ const kn = ({
|
|
|
2868
2898
|
title: r || "Show",
|
|
2869
2899
|
...n,
|
|
2870
2900
|
children: [
|
|
2871
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ d(
|
|
2872
2902
|
"path",
|
|
2873
2903
|
{
|
|
2874
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",
|
|
2875
2905
|
opacity: a ? "1" : "0.4"
|
|
2876
2906
|
}
|
|
2877
2907
|
),
|
|
2878
|
-
/* @__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" })
|
|
2879
2909
|
]
|
|
2880
2910
|
}
|
|
2881
2911
|
);
|
|
@@ -2905,7 +2935,7 @@ try {
|
|
|
2905
2935
|
});
|
|
2906
2936
|
} catch {
|
|
2907
2937
|
}
|
|
2908
|
-
const
|
|
2938
|
+
const Cn = "av-main", On = ({
|
|
2909
2939
|
children: e,
|
|
2910
2940
|
className: t,
|
|
2911
2941
|
raw: r = !1,
|
|
@@ -2913,7 +2943,7 @@ const vn = "av-main", xn = ({
|
|
|
2913
2943
|
noPadding: n = !1
|
|
2914
2944
|
}) => {
|
|
2915
2945
|
const o = p(
|
|
2916
|
-
|
|
2946
|
+
Cn,
|
|
2917
2947
|
{
|
|
2918
2948
|
"mt-2 sm:mt-3": !r && !a,
|
|
2919
2949
|
"p-2": !r && !n,
|
|
@@ -2921,11 +2951,11 @@ const vn = "av-main", xn = ({
|
|
|
2921
2951
|
},
|
|
2922
2952
|
t
|
|
2923
2953
|
);
|
|
2924
|
-
return /* @__PURE__ */
|
|
2925
|
-
},
|
|
2954
|
+
return /* @__PURE__ */ d("main", { className: o, children: e });
|
|
2955
|
+
}, Pn = "av-flexgrid", ke = "av-flexgrid-item", De = 0.25, et = X.createContext({
|
|
2926
2956
|
columnGap: 0,
|
|
2927
2957
|
rowGap: 0
|
|
2928
|
-
}),
|
|
2958
|
+
}), Dn = ({
|
|
2929
2959
|
children: e,
|
|
2930
2960
|
className: t,
|
|
2931
2961
|
columnGap: r = 1,
|
|
@@ -2934,13 +2964,13 @@ const vn = "av-main", xn = ({
|
|
|
2934
2964
|
width: o = "auto",
|
|
2935
2965
|
direction: s = "row",
|
|
2936
2966
|
alignHorizontal: i = "normal",
|
|
2937
|
-
alignVertical:
|
|
2938
|
-
...
|
|
2967
|
+
alignVertical: c = "normal",
|
|
2968
|
+
...f
|
|
2939
2969
|
}) => {
|
|
2940
|
-
const
|
|
2970
|
+
const h = {
|
|
2941
2971
|
flexDirection: s,
|
|
2942
2972
|
justifyContent: i,
|
|
2943
|
-
alignItems:
|
|
2973
|
+
alignItems: c,
|
|
2944
2974
|
height: n,
|
|
2945
2975
|
width: o,
|
|
2946
2976
|
/**
|
|
@@ -2948,14 +2978,14 @@ const vn = "av-main", xn = ({
|
|
|
2948
2978
|
* by the columnGap and rowGap that will be applied
|
|
2949
2979
|
* to all FlexgridItems (see context and paddings).
|
|
2950
2980
|
*/
|
|
2951
|
-
marginLeft: r * -1 *
|
|
2952
|
-
marginTop: a * -1 *
|
|
2953
|
-
},
|
|
2954
|
-
|
|
2981
|
+
marginLeft: r * -1 * De + "rem",
|
|
2982
|
+
marginTop: a * -1 * De + "rem"
|
|
2983
|
+
}, m = p(
|
|
2984
|
+
Pn,
|
|
2955
2985
|
"box-border flex flex-wrap"
|
|
2956
|
-
),
|
|
2957
|
-
return t ? /* @__PURE__ */
|
|
2958
|
-
},
|
|
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 }) });
|
|
2988
|
+
}, ze = (e, t) => p({
|
|
2959
2989
|
"basis-1/12": e === 1 && !t,
|
|
2960
2990
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2961
2991
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -3028,43 +3058,43 @@ const vn = "av-main", xn = ({
|
|
|
3028
3058
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3029
3059
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3030
3060
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3031
|
-
}),
|
|
3061
|
+
}), Ln = ({
|
|
3032
3062
|
className: e,
|
|
3033
3063
|
span: t
|
|
3034
3064
|
}) => {
|
|
3035
3065
|
if (!t)
|
|
3036
|
-
return p(e,
|
|
3066
|
+
return p(e, ke, "box-border basis-auto");
|
|
3037
3067
|
if (typeof t == "number")
|
|
3038
|
-
return p(e,
|
|
3039
|
-
[`${
|
|
3068
|
+
return p(e, ke, "box-border max-w-full", {
|
|
3069
|
+
[`${ze(t)}`]: !0
|
|
3040
3070
|
});
|
|
3041
3071
|
if (typeof t == "string")
|
|
3042
|
-
return p(e,
|
|
3072
|
+
return p(e, ke, "box-border basis-auto", {
|
|
3043
3073
|
"max-w-full grow": t === "auto"
|
|
3044
3074
|
});
|
|
3045
3075
|
if (typeof t == "object") {
|
|
3046
|
-
const r = Object.entries(t).map(([a, n]) => a === "fallback" ?
|
|
3076
|
+
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? ze(n) : ze(n, a));
|
|
3047
3077
|
return p(
|
|
3048
3078
|
e,
|
|
3049
|
-
|
|
3079
|
+
ke,
|
|
3050
3080
|
"box-border",
|
|
3051
3081
|
r
|
|
3052
3082
|
);
|
|
3053
3083
|
}
|
|
3054
|
-
},
|
|
3084
|
+
}, ae = ({
|
|
3055
3085
|
children: e,
|
|
3056
3086
|
className: t,
|
|
3057
3087
|
span: r,
|
|
3058
3088
|
...a
|
|
3059
3089
|
}) => {
|
|
3060
|
-
const { columnGap: n, rowGap: o } =
|
|
3061
|
-
paddingLeft: n *
|
|
3062
|
-
paddingTop: o *
|
|
3063
|
-
}, i =
|
|
3090
|
+
const { columnGap: n, rowGap: o } = Rt(et), s = {
|
|
3091
|
+
paddingLeft: n * De + "rem",
|
|
3092
|
+
paddingTop: o * De + "rem"
|
|
3093
|
+
}, i = Ln({
|
|
3064
3094
|
className: t,
|
|
3065
3095
|
span: r
|
|
3066
3096
|
});
|
|
3067
|
-
return /* @__PURE__ */
|
|
3097
|
+
return /* @__PURE__ */ d("div", { className: i, style: s, ...a, children: e });
|
|
3068
3098
|
};
|
|
3069
3099
|
/*!
|
|
3070
3100
|
@versini/ui-system v3.0.8
|
|
@@ -3079,14 +3109,14 @@ try {
|
|
|
3079
3109
|
});
|
|
3080
3110
|
} catch {
|
|
3081
3111
|
}
|
|
3082
|
-
const
|
|
3083
|
-
function
|
|
3084
|
-
const e =
|
|
3085
|
-
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, () => {
|
|
3086
3116
|
e.current = !1;
|
|
3087
3117
|
}), []), q(() => e.current, []);
|
|
3088
3118
|
}
|
|
3089
|
-
const
|
|
3119
|
+
const Un = {
|
|
3090
3120
|
x: 0,
|
|
3091
3121
|
y: 0,
|
|
3092
3122
|
width: 0,
|
|
@@ -3096,19 +3126,19 @@ const $n = {
|
|
|
3096
3126
|
bottom: 0,
|
|
3097
3127
|
right: 0
|
|
3098
3128
|
};
|
|
3099
|
-
function
|
|
3100
|
-
const t =
|
|
3101
|
-
const
|
|
3102
|
-
|
|
3103
|
-
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);
|
|
3104
3134
|
}));
|
|
3105
3135
|
}), [t]);
|
|
3106
|
-
return
|
|
3136
|
+
return G(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
3107
3137
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3108
3138
|
}), [s, e]), [a, n];
|
|
3109
3139
|
}
|
|
3110
|
-
function
|
|
3111
|
-
const t =
|
|
3140
|
+
function Hn(e) {
|
|
3141
|
+
const t = Nt();
|
|
3112
3142
|
if (!e)
|
|
3113
3143
|
return t;
|
|
3114
3144
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3118,7 +3148,7 @@ function Un(e) {
|
|
|
3118
3148
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3119
3149
|
}
|
|
3120
3150
|
}
|
|
3121
|
-
const
|
|
3151
|
+
const nr = "SET_ANNOUNCEMENT", or = "CLEAR_ANNOUNCEMENT", Wn = {
|
|
3122
3152
|
alert: null,
|
|
3123
3153
|
alertdialog: null,
|
|
3124
3154
|
log: "polite",
|
|
@@ -3126,14 +3156,14 @@ const Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3126
3156
|
progressbar: null,
|
|
3127
3157
|
status: "polite",
|
|
3128
3158
|
timer: "assertive"
|
|
3129
|
-
},
|
|
3159
|
+
}, Bn = (e, t) => {
|
|
3130
3160
|
switch (t == null ? void 0 : t.type) {
|
|
3131
|
-
case
|
|
3161
|
+
case nr:
|
|
3132
3162
|
return {
|
|
3133
3163
|
...e,
|
|
3134
3164
|
announcement: t.payload
|
|
3135
3165
|
};
|
|
3136
|
-
case
|
|
3166
|
+
case or:
|
|
3137
3167
|
return {
|
|
3138
3168
|
...e,
|
|
3139
3169
|
announcement: null
|
|
@@ -3141,14 +3171,14 @@ const Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3141
3171
|
default:
|
|
3142
3172
|
return e;
|
|
3143
3173
|
}
|
|
3144
|
-
},
|
|
3174
|
+
}, Vn = ({
|
|
3145
3175
|
onAnnouncementClear: e,
|
|
3146
3176
|
dispatch: t
|
|
3147
3177
|
}) => {
|
|
3148
3178
|
t({
|
|
3149
|
-
type:
|
|
3179
|
+
type: or
|
|
3150
3180
|
}), typeof e == "function" && e();
|
|
3151
|
-
},
|
|
3181
|
+
}, St = ({
|
|
3152
3182
|
children: e,
|
|
3153
3183
|
clearAnnouncementDelay: t,
|
|
3154
3184
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -3156,16 +3186,16 @@ const Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3156
3186
|
dispatch: n
|
|
3157
3187
|
}) => {
|
|
3158
3188
|
clearTimeout(r.current), e !== null && n({
|
|
3159
|
-
type:
|
|
3189
|
+
type: nr,
|
|
3160
3190
|
payload: e
|
|
3161
3191
|
}), t && (r.current = setTimeout(
|
|
3162
|
-
() =>
|
|
3192
|
+
() => Vn({
|
|
3163
3193
|
onAnnouncementClear: a,
|
|
3164
3194
|
dispatch: n
|
|
3165
3195
|
}),
|
|
3166
3196
|
t
|
|
3167
3197
|
));
|
|
3168
|
-
},
|
|
3198
|
+
}, Jn = ({
|
|
3169
3199
|
children: e,
|
|
3170
3200
|
announcementTimeoutRef: t,
|
|
3171
3201
|
announcementDelay: r,
|
|
@@ -3174,13 +3204,13 @@ const Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3174
3204
|
onAnnouncementClear: o,
|
|
3175
3205
|
dispatch: s
|
|
3176
3206
|
}) => {
|
|
3177
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
3207
|
+
clearTimeout(t.current), r ? t.current = setTimeout(St, r, {
|
|
3178
3208
|
children: e,
|
|
3179
3209
|
clearAnnouncementDelay: a,
|
|
3180
3210
|
clearAnnouncementTimeoutRef: n,
|
|
3181
3211
|
onAnnouncementClear: o,
|
|
3182
3212
|
dispatch: s
|
|
3183
|
-
}) :
|
|
3213
|
+
}) : St({
|
|
3184
3214
|
children: e,
|
|
3185
3215
|
clearAnnouncementDelay: a,
|
|
3186
3216
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -3188,7 +3218,7 @@ const Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", Kn = {
|
|
|
3188
3218
|
dispatch: s
|
|
3189
3219
|
});
|
|
3190
3220
|
};
|
|
3191
|
-
function
|
|
3221
|
+
function sr({
|
|
3192
3222
|
children: e,
|
|
3193
3223
|
className: t,
|
|
3194
3224
|
politeness: r,
|
|
@@ -3197,21 +3227,21 @@ function tr({
|
|
|
3197
3227
|
clearAnnouncementDelay: o,
|
|
3198
3228
|
onAnnouncementClear: s,
|
|
3199
3229
|
visible: i,
|
|
3200
|
-
...
|
|
3230
|
+
...c
|
|
3201
3231
|
}) {
|
|
3202
|
-
const
|
|
3232
|
+
const f = C(null), h = C(null), [m, l] = At(Bn, {
|
|
3203
3233
|
announcement: null
|
|
3204
3234
|
});
|
|
3205
|
-
let
|
|
3206
|
-
typeof
|
|
3207
|
-
|
|
3208
|
-
announcementTimeoutRef:
|
|
3235
|
+
let u = r;
|
|
3236
|
+
typeof u > "u" && (u = a ? Wn[a] : "assertive"), G(() => {
|
|
3237
|
+
Jn({
|
|
3238
|
+
announcementTimeoutRef: f,
|
|
3209
3239
|
announcementDelay: n,
|
|
3210
3240
|
children: e,
|
|
3211
3241
|
clearAnnouncementDelay: o,
|
|
3212
|
-
clearAnnouncementTimeoutRef:
|
|
3242
|
+
clearAnnouncementTimeoutRef: h,
|
|
3213
3243
|
onAnnouncementClear: s,
|
|
3214
|
-
dispatch:
|
|
3244
|
+
dispatch: l
|
|
3215
3245
|
});
|
|
3216
3246
|
}, [
|
|
3217
3247
|
e,
|
|
@@ -3222,14 +3252,14 @@ function tr({
|
|
|
3222
3252
|
const y = p(t, {
|
|
3223
3253
|
"sr-only": !i
|
|
3224
3254
|
});
|
|
3225
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ d(
|
|
3226
3256
|
"div",
|
|
3227
3257
|
{
|
|
3228
|
-
"aria-live":
|
|
3258
|
+
"aria-live": u,
|
|
3229
3259
|
...a && { role: a },
|
|
3230
3260
|
className: y,
|
|
3231
|
-
...
|
|
3232
|
-
children:
|
|
3261
|
+
...c,
|
|
3262
|
+
children: m.announcement
|
|
3233
3263
|
}
|
|
3234
3264
|
);
|
|
3235
3265
|
}
|
|
@@ -3246,21 +3276,21 @@ try {
|
|
|
3246
3276
|
});
|
|
3247
3277
|
} catch {
|
|
3248
3278
|
}
|
|
3249
|
-
const
|
|
3279
|
+
const Gn = ({
|
|
3250
3280
|
mode: e
|
|
3251
3281
|
}) => p({
|
|
3252
3282
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3253
3283
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3254
3284
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3255
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"
|
|
3256
|
-
}),
|
|
3286
|
+
}), Yn = ({
|
|
3257
3287
|
focusMode: e
|
|
3258
3288
|
}) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3259
3289
|
"focus:outline-focus-dark": e === "dark",
|
|
3260
3290
|
"focus:outline-focus-light": e === "light",
|
|
3261
3291
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3262
3292
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3263
|
-
}),
|
|
3293
|
+
}), Fn = ({
|
|
3264
3294
|
noBorder: e,
|
|
3265
3295
|
error: t
|
|
3266
3296
|
}) => p("border-2", {
|
|
@@ -3268,7 +3298,7 @@ const Vn = ({
|
|
|
3268
3298
|
"focus:border-border-dark": !e && t,
|
|
3269
3299
|
"border-border-error-dark": !e && t,
|
|
3270
3300
|
"border-transparent": e
|
|
3271
|
-
}),
|
|
3301
|
+
}), jn = ({
|
|
3272
3302
|
disabled: e,
|
|
3273
3303
|
raw: t,
|
|
3274
3304
|
error: r,
|
|
@@ -3292,7 +3322,7 @@ const Vn = ({
|
|
|
3292
3322
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3293
3323
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3294
3324
|
});
|
|
3295
|
-
},
|
|
3325
|
+
}, zn = ({
|
|
3296
3326
|
error: e,
|
|
3297
3327
|
raw: t,
|
|
3298
3328
|
mode: r,
|
|
@@ -3302,24 +3332,24 @@ const Vn = ({
|
|
|
3302
3332
|
return "";
|
|
3303
3333
|
if (a)
|
|
3304
3334
|
return p(
|
|
3305
|
-
|
|
3335
|
+
qe,
|
|
3306
3336
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3307
3337
|
);
|
|
3308
3338
|
if (!e)
|
|
3309
|
-
return p(
|
|
3339
|
+
return p(qe, "absolute px-2 font-medium", {
|
|
3310
3340
|
"text-copy-lighter": r === "dark",
|
|
3311
3341
|
"text-copy-dark": r === "light",
|
|
3312
3342
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3313
3343
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3314
3344
|
});
|
|
3315
3345
|
if (e)
|
|
3316
|
-
return p(
|
|
3346
|
+
return p(qe, "absolute px-2 font-medium", {
|
|
3317
3347
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3318
3348
|
"text-copy-error-dark": r === "light",
|
|
3319
3349
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3320
3350
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3321
3351
|
});
|
|
3322
|
-
},
|
|
3352
|
+
}, qn = ({
|
|
3323
3353
|
className: e,
|
|
3324
3354
|
inputClassName: t,
|
|
3325
3355
|
raw: r,
|
|
@@ -3328,63 +3358,63 @@ const Vn = ({
|
|
|
3328
3358
|
error: o,
|
|
3329
3359
|
mode: s,
|
|
3330
3360
|
focusMode: i,
|
|
3331
|
-
size:
|
|
3332
|
-
rightElementClassName:
|
|
3361
|
+
size: c,
|
|
3362
|
+
rightElementClassName: f
|
|
3333
3363
|
}) => {
|
|
3334
|
-
const
|
|
3364
|
+
const h = r ? e : p(
|
|
3335
3365
|
"relative flex w-full flex-col justify-center",
|
|
3336
|
-
|
|
3366
|
+
$n,
|
|
3337
3367
|
e
|
|
3338
3368
|
);
|
|
3339
|
-
let
|
|
3340
|
-
switch (
|
|
3369
|
+
let m = "";
|
|
3370
|
+
switch (c) {
|
|
3341
3371
|
case "xs":
|
|
3342
|
-
|
|
3372
|
+
m = "h-8";
|
|
3343
3373
|
break;
|
|
3344
3374
|
case "sm":
|
|
3345
|
-
|
|
3375
|
+
m = "h-10";
|
|
3346
3376
|
break;
|
|
3347
3377
|
case "lg":
|
|
3348
|
-
|
|
3378
|
+
m = "h-14";
|
|
3349
3379
|
break;
|
|
3350
3380
|
case "xl":
|
|
3351
|
-
|
|
3381
|
+
m = "h-16";
|
|
3352
3382
|
break;
|
|
3353
3383
|
default:
|
|
3354
|
-
|
|
3384
|
+
m = "h-12";
|
|
3355
3385
|
break;
|
|
3356
3386
|
}
|
|
3357
|
-
const
|
|
3358
|
-
|
|
3359
|
-
|
|
3387
|
+
const l = r ? p(t) : p(
|
|
3388
|
+
ar,
|
|
3389
|
+
m,
|
|
3360
3390
|
"rounded-md text-base px-4",
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3391
|
+
Gn({ mode: s }),
|
|
3392
|
+
Yn({ focusMode: i }),
|
|
3393
|
+
Fn({ noBorder: n, error: o }),
|
|
3364
3394
|
{
|
|
3365
3395
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3366
3396
|
},
|
|
3367
3397
|
t
|
|
3368
|
-
),
|
|
3398
|
+
), u = r ? void 0 : "sr-only", y = jn({
|
|
3369
3399
|
disabled: a,
|
|
3370
3400
|
raw: r,
|
|
3371
3401
|
error: o,
|
|
3372
3402
|
mode: s
|
|
3373
|
-
}),
|
|
3403
|
+
}), E = zn({
|
|
3374
3404
|
error: o,
|
|
3375
3405
|
raw: r,
|
|
3376
3406
|
mode: s,
|
|
3377
3407
|
disabled: a
|
|
3378
|
-
}),
|
|
3408
|
+
}), T = r ? void 0 : p("absolute right-3", f);
|
|
3379
3409
|
return {
|
|
3380
|
-
wrapper:
|
|
3381
|
-
input:
|
|
3382
|
-
accessibleLabel:
|
|
3410
|
+
wrapper: h,
|
|
3411
|
+
input: l,
|
|
3412
|
+
accessibleLabel: u,
|
|
3383
3413
|
visibleLabel: y,
|
|
3384
|
-
helperText:
|
|
3385
|
-
rightElement:
|
|
3414
|
+
helperText: E,
|
|
3415
|
+
rightElement: T
|
|
3386
3416
|
};
|
|
3387
|
-
},
|
|
3417
|
+
}, ot = X.forwardRef(
|
|
3388
3418
|
({
|
|
3389
3419
|
id: e,
|
|
3390
3420
|
name: t,
|
|
@@ -3394,112 +3424,112 @@ const Vn = ({
|
|
|
3394
3424
|
className: o,
|
|
3395
3425
|
inputClassName: s,
|
|
3396
3426
|
mode: i = "system",
|
|
3397
|
-
focusMode:
|
|
3398
|
-
disabled:
|
|
3399
|
-
noBorder:
|
|
3400
|
-
labelId:
|
|
3401
|
-
labelHidden:
|
|
3402
|
-
type:
|
|
3427
|
+
focusMode: c = "system",
|
|
3428
|
+
disabled: f = !1,
|
|
3429
|
+
noBorder: h = !1,
|
|
3430
|
+
labelId: m,
|
|
3431
|
+
labelHidden: l = !1,
|
|
3432
|
+
type: u = "text",
|
|
3403
3433
|
helperText: y = "",
|
|
3404
|
-
rightElement:
|
|
3405
|
-
rightElementClassName:
|
|
3406
|
-
size:
|
|
3407
|
-
...
|
|
3408
|
-
},
|
|
3409
|
-
const [
|
|
3434
|
+
rightElement: E,
|
|
3435
|
+
rightElementClassName: T,
|
|
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 = {
|
|
3410
3440
|
xs: { label: "-25px", helperText: "30px" },
|
|
3411
3441
|
sm: { label: "-29px", helperText: "34px" },
|
|
3412
3442
|
md: { label: "-33px", helperText: "38px" },
|
|
3413
3443
|
lg: { label: "-15px", helperText: "22px" },
|
|
3414
3444
|
xl: { label: "-19px", helperText: "25px" }
|
|
3415
|
-
},
|
|
3445
|
+
}, P = qn({
|
|
3416
3446
|
className: o,
|
|
3417
3447
|
inputClassName: s,
|
|
3418
3448
|
error: a,
|
|
3419
3449
|
raw: n,
|
|
3420
|
-
focusMode:
|
|
3421
|
-
disabled:
|
|
3422
|
-
noBorder:
|
|
3450
|
+
focusMode: c,
|
|
3451
|
+
disabled: f,
|
|
3452
|
+
noBorder: h,
|
|
3423
3453
|
mode: i,
|
|
3424
|
-
size:
|
|
3425
|
-
rightElementClassName:
|
|
3454
|
+
size: _,
|
|
3455
|
+
rightElementClassName: T
|
|
3426
3456
|
});
|
|
3427
|
-
return
|
|
3428
|
-
|
|
3429
|
-
}, [
|
|
3430
|
-
var
|
|
3431
|
-
const { label:
|
|
3432
|
-
(
|
|
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(
|
|
3433
3463
|
"--av-text-input-helper-text",
|
|
3434
|
-
|
|
3464
|
+
I
|
|
3435
3465
|
);
|
|
3436
|
-
}, [
|
|
3437
|
-
/* @__PURE__ */
|
|
3466
|
+
}, [_]), /* @__PURE__ */ $("div", { className: P.wrapper, children: [
|
|
3467
|
+
/* @__PURE__ */ d(
|
|
3438
3468
|
"label",
|
|
3439
3469
|
{
|
|
3440
|
-
htmlFor:
|
|
3441
|
-
id:
|
|
3442
|
-
className:
|
|
3470
|
+
htmlFor: v,
|
|
3471
|
+
id: m,
|
|
3472
|
+
className: P.accessibleLabel,
|
|
3443
3473
|
children: r
|
|
3444
3474
|
}
|
|
3445
3475
|
),
|
|
3446
|
-
/* @__PURE__ */
|
|
3476
|
+
/* @__PURE__ */ d(
|
|
3447
3477
|
"input",
|
|
3448
3478
|
{
|
|
3449
|
-
ref:
|
|
3450
|
-
id:
|
|
3479
|
+
ref: M,
|
|
3480
|
+
id: v,
|
|
3451
3481
|
name: t,
|
|
3452
|
-
type:
|
|
3453
|
-
disabled:
|
|
3482
|
+
type: u,
|
|
3483
|
+
disabled: f,
|
|
3454
3484
|
placeholder: n ? void 0 : " ",
|
|
3455
|
-
className:
|
|
3456
|
-
...y && { "aria-describedby": `${
|
|
3485
|
+
className: P.input,
|
|
3486
|
+
...y && { "aria-describedby": `${v}-helper` },
|
|
3457
3487
|
...a && { "aria-invalid": "true" },
|
|
3458
|
-
...
|
|
3459
|
-
...
|
|
3488
|
+
...E && !n && { style: { paddingRight: re } },
|
|
3489
|
+
...F
|
|
3460
3490
|
}
|
|
3461
3491
|
),
|
|
3462
|
-
!n && !
|
|
3492
|
+
!n && !l && /* @__PURE__ */ d(
|
|
3463
3493
|
"label",
|
|
3464
3494
|
{
|
|
3465
3495
|
ref: K,
|
|
3466
3496
|
"aria-hidden": !0,
|
|
3467
|
-
htmlFor:
|
|
3468
|
-
className:
|
|
3497
|
+
htmlFor: v,
|
|
3498
|
+
className: P.visibleLabel,
|
|
3469
3499
|
children: r
|
|
3470
3500
|
}
|
|
3471
3501
|
),
|
|
3472
|
-
y && /* @__PURE__ */
|
|
3502
|
+
y && /* @__PURE__ */ d(
|
|
3473
3503
|
"div",
|
|
3474
3504
|
{
|
|
3475
|
-
ref:
|
|
3476
|
-
id: `${
|
|
3477
|
-
className:
|
|
3505
|
+
ref: w,
|
|
3506
|
+
id: `${v}-helper`,
|
|
3507
|
+
className: P.helperText,
|
|
3478
3508
|
children: y
|
|
3479
3509
|
}
|
|
3480
3510
|
),
|
|
3481
|
-
|
|
3511
|
+
E && /* @__PURE__ */ d(
|
|
3482
3512
|
"div",
|
|
3483
3513
|
{
|
|
3484
|
-
ref:
|
|
3485
|
-
className:
|
|
3486
|
-
children:
|
|
3514
|
+
ref: Q,
|
|
3515
|
+
className: P.rightElement,
|
|
3516
|
+
children: E
|
|
3487
3517
|
}
|
|
3488
3518
|
),
|
|
3489
|
-
a && y && /* @__PURE__ */
|
|
3519
|
+
a && y && /* @__PURE__ */ d(sr, { politeness: "polite", clearAnnouncementDelay: 500, children: S })
|
|
3490
3520
|
] });
|
|
3491
3521
|
}
|
|
3492
3522
|
);
|
|
3493
|
-
|
|
3494
|
-
function
|
|
3495
|
-
return
|
|
3523
|
+
ot.displayName = "TextInput";
|
|
3524
|
+
function Xn(e) {
|
|
3525
|
+
return Le(() => e.every((t) => t == null) ? () => {
|
|
3496
3526
|
} : (t) => {
|
|
3497
3527
|
e.forEach((r) => {
|
|
3498
3528
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
3499
3529
|
});
|
|
3500
3530
|
}, e);
|
|
3501
3531
|
}
|
|
3502
|
-
const
|
|
3532
|
+
const Qn = 500, Zn = 5e3, eo = 2e4, ir = X.forwardRef(
|
|
3503
3533
|
({
|
|
3504
3534
|
name: e,
|
|
3505
3535
|
disabled: t,
|
|
@@ -3509,67 +3539,67 @@ const qn = 500, Xn = 5e3, Qn = 2e4, rr = X.forwardRef(
|
|
|
3509
3539
|
onChange: o,
|
|
3510
3540
|
onBlur: s,
|
|
3511
3541
|
onFocus: i,
|
|
3512
|
-
onTextInputMaskBlur:
|
|
3513
|
-
rightElement:
|
|
3514
|
-
...
|
|
3515
|
-
},
|
|
3516
|
-
const [
|
|
3542
|
+
onTextInputMaskBlur: c,
|
|
3543
|
+
rightElement: f,
|
|
3544
|
+
...h
|
|
3545
|
+
}, m) => {
|
|
3546
|
+
const [l, u] = z(!0), [y, E] = z({
|
|
3517
3547
|
message: null,
|
|
3518
3548
|
politeness: null
|
|
3519
|
-
}),
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
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,
|
|
3523
3553
|
politeness: "polite",
|
|
3524
3554
|
message: `${r} hiding characters`
|
|
3525
3555
|
}), n && n(!0);
|
|
3526
|
-
},
|
|
3527
|
-
},
|
|
3528
|
-
|
|
3529
|
-
const
|
|
3530
|
-
|
|
3531
|
-
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,
|
|
3532
3562
|
politeness: "assertive",
|
|
3533
|
-
message:
|
|
3534
|
-
}), n && n(
|
|
3535
|
-
}, U = (
|
|
3536
|
-
var
|
|
3537
|
-
const { relatedTarget:
|
|
3538
|
-
|
|
3539
|
-
},
|
|
3540
|
-
|
|
3541
|
-
},
|
|
3542
|
-
|
|
3543
|
-
}, K = (
|
|
3544
|
-
|
|
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);
|
|
3545
3575
|
};
|
|
3546
|
-
return
|
|
3547
|
-
|
|
3548
|
-
}, []), /* @__PURE__ */
|
|
3549
|
-
/* @__PURE__ */
|
|
3550
|
-
|
|
3576
|
+
return G(() => () => {
|
|
3577
|
+
_.current && clearTimeout(_.current);
|
|
3578
|
+
}, []), /* @__PURE__ */ $(Ne, { children: [
|
|
3579
|
+
/* @__PURE__ */ d(
|
|
3580
|
+
ot,
|
|
3551
3581
|
{
|
|
3552
|
-
ref:
|
|
3582
|
+
ref: M,
|
|
3553
3583
|
name: e,
|
|
3554
3584
|
label: r,
|
|
3555
3585
|
labelHidden: a,
|
|
3556
|
-
type:
|
|
3586
|
+
type: l ? "password" : "text",
|
|
3557
3587
|
disabled: t,
|
|
3558
|
-
onBlur:
|
|
3559
|
-
onFocus:
|
|
3588
|
+
onBlur: v,
|
|
3589
|
+
onFocus: S,
|
|
3560
3590
|
onChange: K,
|
|
3561
|
-
rightElement: X.cloneElement(
|
|
3562
|
-
ref:
|
|
3563
|
-
label:
|
|
3564
|
-
onClick:
|
|
3591
|
+
rightElement: X.cloneElement(f, {
|
|
3592
|
+
ref: m,
|
|
3593
|
+
label: Q,
|
|
3594
|
+
onClick: re,
|
|
3565
3595
|
onBlur: U,
|
|
3566
3596
|
disabled: t
|
|
3567
3597
|
}),
|
|
3568
|
-
...
|
|
3598
|
+
...h
|
|
3569
3599
|
}
|
|
3570
3600
|
),
|
|
3571
|
-
/* @__PURE__ */
|
|
3572
|
-
|
|
3601
|
+
/* @__PURE__ */ d(
|
|
3602
|
+
sr,
|
|
3573
3603
|
{
|
|
3574
3604
|
role: "status",
|
|
3575
3605
|
politeness: y.politeness,
|
|
@@ -3580,7 +3610,7 @@ const qn = 500, Xn = 5e3, Qn = 2e4, rr = X.forwardRef(
|
|
|
3580
3610
|
] });
|
|
3581
3611
|
}
|
|
3582
3612
|
);
|
|
3583
|
-
|
|
3613
|
+
ir.displayName = "TextInputMask";
|
|
3584
3614
|
/*!
|
|
3585
3615
|
@versini/ui-textinput v3.0.13
|
|
3586
3616
|
© 2025 gizmette.com
|
|
@@ -3594,7 +3624,7 @@ try {
|
|
|
3594
3624
|
});
|
|
3595
3625
|
} catch {
|
|
3596
3626
|
}
|
|
3597
|
-
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 = {
|
|
3598
3628
|
PREFERENCES: {
|
|
3599
3629
|
TITLE: "User profile",
|
|
3600
3630
|
NAME: "Name",
|
|
@@ -3634,49 +3664,49 @@ const Zn = "ASK! ME! ANYTHING!", ar = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3634
3664
|
TITLE: "Chat Details",
|
|
3635
3665
|
INSTRUCTION: "This option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more."
|
|
3636
3666
|
}
|
|
3637
|
-
},
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3640
|
-
/* @__PURE__ */
|
|
3641
|
-
/* @__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 })
|
|
3642
3672
|
] })
|
|
3643
|
-
] }),
|
|
3644
|
-
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({
|
|
3645
3675
|
username: "",
|
|
3646
3676
|
password: ""
|
|
3647
|
-
}),
|
|
3648
|
-
|
|
3677
|
+
}), m = async (l) => {
|
|
3678
|
+
l.preventDefault(), await e(f.username, f.password) || (s(""), n("Invalid username or password"));
|
|
3649
3679
|
};
|
|
3650
|
-
return
|
|
3651
|
-
var
|
|
3652
|
-
(
|
|
3653
|
-
var
|
|
3654
|
-
(
|
|
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");
|
|
3655
3685
|
}, 500);
|
|
3656
|
-
}),
|
|
3686
|
+
}), G(() => {
|
|
3657
3687
|
t && s(t);
|
|
3658
|
-
}, [t]), /* @__PURE__ */
|
|
3659
|
-
|
|
3688
|
+
}, [t]), /* @__PURE__ */ d(Ne, { children: /* @__PURE__ */ $(
|
|
3689
|
+
On,
|
|
3660
3690
|
{
|
|
3661
|
-
className:
|
|
3691
|
+
className: en({
|
|
3662
3692
|
extraClass: "mt-5"
|
|
3663
3693
|
}),
|
|
3664
3694
|
noMargin: !0,
|
|
3665
3695
|
noPadding: !0,
|
|
3666
3696
|
children: [
|
|
3667
|
-
/* @__PURE__ */
|
|
3697
|
+
/* @__PURE__ */ d(
|
|
3668
3698
|
"div",
|
|
3669
3699
|
{
|
|
3670
|
-
className:
|
|
3700
|
+
className: Za({
|
|
3671
3701
|
extraClass: "rounded-md"
|
|
3672
3702
|
}),
|
|
3673
|
-
children: /* @__PURE__ */
|
|
3703
|
+
children: /* @__PURE__ */ d(oo, {})
|
|
3674
3704
|
}
|
|
3675
3705
|
),
|
|
3676
|
-
/* @__PURE__ */
|
|
3677
|
-
/* @__PURE__ */
|
|
3678
|
-
/* @__PURE__ */
|
|
3679
|
-
|
|
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(
|
|
3709
|
+
ot,
|
|
3680
3710
|
{
|
|
3681
3711
|
className: "mt-7",
|
|
3682
3712
|
required: !0,
|
|
@@ -3687,17 +3717,17 @@ const Zn = "ASK! ME! ANYTHING!", ar = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3687
3717
|
focusMode: "light",
|
|
3688
3718
|
name: "username",
|
|
3689
3719
|
label: "Username",
|
|
3690
|
-
onChange: (
|
|
3691
|
-
|
|
3692
|
-
...
|
|
3693
|
-
username:
|
|
3720
|
+
onChange: (l) => {
|
|
3721
|
+
h({
|
|
3722
|
+
...f,
|
|
3723
|
+
username: l.target.value
|
|
3694
3724
|
}), n("");
|
|
3695
3725
|
},
|
|
3696
3726
|
error: a !== ""
|
|
3697
3727
|
}
|
|
3698
3728
|
) }),
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
|
|
3729
|
+
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3730
|
+
ir,
|
|
3701
3731
|
{
|
|
3702
3732
|
className: "mt-7",
|
|
3703
3733
|
required: !0,
|
|
@@ -3707,29 +3737,29 @@ const Zn = "ASK! ME! ANYTHING!", ar = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3707
3737
|
mode: "dark",
|
|
3708
3738
|
focusMode: "light",
|
|
3709
3739
|
name: "password",
|
|
3710
|
-
label:
|
|
3711
|
-
rightElement: /* @__PURE__ */
|
|
3712
|
-
|
|
3740
|
+
label: no,
|
|
3741
|
+
rightElement: /* @__PURE__ */ d(
|
|
3742
|
+
Pe,
|
|
3713
3743
|
{
|
|
3714
3744
|
focusMode: "light",
|
|
3715
3745
|
mode: "dark",
|
|
3716
3746
|
label: i ? "Show" : "Hide",
|
|
3717
|
-
children: i ? /* @__PURE__ */
|
|
3747
|
+
children: i ? /* @__PURE__ */ d(xn, {}) : /* @__PURE__ */ d(Nn, {})
|
|
3718
3748
|
}
|
|
3719
3749
|
),
|
|
3720
|
-
onMaskChange:
|
|
3721
|
-
onChange: (
|
|
3722
|
-
|
|
3723
|
-
...
|
|
3724
|
-
password:
|
|
3750
|
+
onMaskChange: c,
|
|
3751
|
+
onChange: (l) => {
|
|
3752
|
+
h({
|
|
3753
|
+
...f,
|
|
3754
|
+
password: l.target.value
|
|
3725
3755
|
}), n("");
|
|
3726
3756
|
},
|
|
3727
3757
|
error: a !== "",
|
|
3728
3758
|
helperText: a
|
|
3729
3759
|
}
|
|
3730
3760
|
) }),
|
|
3731
|
-
/* @__PURE__ */
|
|
3732
|
-
|
|
3761
|
+
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3762
|
+
rr,
|
|
3733
3763
|
{
|
|
3734
3764
|
mode: "light",
|
|
3735
3765
|
focusMode: "light",
|
|
@@ -3737,22 +3767,22 @@ const Zn = "ASK! ME! ANYTHING!", ar = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3737
3767
|
noBorder: !0,
|
|
3738
3768
|
type: "submit",
|
|
3739
3769
|
className: "mt-7",
|
|
3740
|
-
children:
|
|
3770
|
+
children: ro
|
|
3741
3771
|
}
|
|
3742
3772
|
) }),
|
|
3743
|
-
!
|
|
3744
|
-
/* @__PURE__ */
|
|
3745
|
-
/* @__PURE__ */
|
|
3746
|
-
|
|
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(
|
|
3776
|
+
Pe,
|
|
3747
3777
|
{
|
|
3748
3778
|
variant: "selected",
|
|
3749
3779
|
mode: "dark",
|
|
3750
3780
|
focusMode: "light",
|
|
3751
3781
|
fullWidth: !0,
|
|
3752
3782
|
className: "mb-4",
|
|
3753
|
-
labelRight:
|
|
3783
|
+
labelRight: ao,
|
|
3754
3784
|
onClick: r,
|
|
3755
|
-
children: /* @__PURE__ */
|
|
3785
|
+
children: /* @__PURE__ */ d(vn, { size: "size-7" })
|
|
3756
3786
|
}
|
|
3757
3787
|
) })
|
|
3758
3788
|
] })
|
|
@@ -3760,24 +3790,33 @@ const Zn = "ASK! ME! ANYTHING!", ar = "Callisto", eo = "Log in", to = "Sign in w
|
|
|
3760
3790
|
]
|
|
3761
3791
|
}
|
|
3762
3792
|
) });
|
|
3763
|
-
},
|
|
3793
|
+
}, io = new URL(document.location.href).searchParams, _t = !!io.get("debug") || !1, co = mr(() => import(
|
|
3764
3794
|
/* webpackChunkName: "LazyApp" */
|
|
3765
|
-
"./App.
|
|
3766
|
-
).then((e) => e.App)),
|
|
3767
|
-
const { isAuthenticated: t } =
|
|
3768
|
-
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, {});
|
|
3769
3799
|
}, lo = ({
|
|
3770
3800
|
isComponent: e = !1,
|
|
3771
|
-
domain: t =
|
|
3772
|
-
}) =>
|
|
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 });
|
|
3773
3812
|
export {
|
|
3774
3813
|
ts as ABOUT_TITLE,
|
|
3775
3814
|
Oo as ACTION_RESET_PROMPT,
|
|
3776
3815
|
vo as ACTION_SEARCH,
|
|
3777
3816
|
xo as ACTION_SORT,
|
|
3778
3817
|
Co as ACTION_TOGGLE_PROMPT,
|
|
3779
|
-
|
|
3780
|
-
|
|
3818
|
+
cr as APP_NAME,
|
|
3819
|
+
rr as C,
|
|
3781
3820
|
ss as CARDS,
|
|
3782
3821
|
as as CLIPBOARD_PROMPT,
|
|
3783
3822
|
Ao as DEFAULT_AI_PROVIDER,
|
|
@@ -3787,22 +3826,22 @@ export {
|
|
|
3787
3826
|
es as HISTORY_TITLE,
|
|
3788
3827
|
Ho as INFINITE_SCROLL_LIMIT,
|
|
3789
3828
|
Ko as INFINITE_SCROLL_THRESHOLD,
|
|
3790
|
-
|
|
3829
|
+
Dn as L,
|
|
3791
3830
|
Do as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3792
3831
|
Po as LOCAL_STORAGE_PREFIX,
|
|
3793
3832
|
Mo as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
3794
3833
|
Lo as LOCAL_STORAGE_SEARCH,
|
|
3795
3834
|
$o as LOCAL_STORAGE_SORT,
|
|
3796
3835
|
Xo as LOG_OUT,
|
|
3797
|
-
|
|
3798
|
-
|
|
3836
|
+
oo as Logo,
|
|
3837
|
+
he as M,
|
|
3799
3838
|
Qo as PROFILE_TITLE,
|
|
3800
3839
|
os as PROMPTS_DESCRIPTION,
|
|
3801
3840
|
Wo as PROMPT_CLASSNAME,
|
|
3802
3841
|
Bo as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
3803
3842
|
No as PROVIDER_ANTHROPIC,
|
|
3804
3843
|
Ro as PROVIDER_OPENAI,
|
|
3805
|
-
|
|
3844
|
+
An as R,
|
|
3806
3845
|
Io as ROLE_ASSISTANT,
|
|
3807
3846
|
_o as ROLE_HIDDEN,
|
|
3808
3847
|
So as ROLE_INTERNAL,
|
|
@@ -3814,20 +3853,20 @@ export {
|
|
|
3814
3853
|
rs as TYPE_QUESTION,
|
|
3815
3854
|
zo as debounce,
|
|
3816
3855
|
Fo as durationFormatter,
|
|
3817
|
-
|
|
3818
|
-
|
|
3856
|
+
He as f,
|
|
3857
|
+
ot as fe,
|
|
3819
3858
|
Jo as getCurrentGeoLocation,
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3859
|
+
en as getMainPaddingClass,
|
|
3860
|
+
Za as getMessageContaintWrapperClass,
|
|
3861
|
+
tn as isElectron,
|
|
3862
|
+
rn as isProbablyMobile,
|
|
3824
3863
|
qo as isProbablyiPhone,
|
|
3825
|
-
|
|
3826
|
-
|
|
3864
|
+
ae as j,
|
|
3865
|
+
vn as l,
|
|
3827
3866
|
Yo as numberFormatter,
|
|
3828
3867
|
jo as pluralize,
|
|
3829
|
-
|
|
3830
|
-
|
|
3868
|
+
On as r,
|
|
3869
|
+
Pe as re,
|
|
3831
3870
|
Go as renderDataAsList,
|
|
3832
|
-
|
|
3871
|
+
Zt as un
|
|
3833
3872
|
};
|