@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.
@@ -1,123 +1,123 @@
1
- import { jsx as l, jsxs as D, Fragment as Re } from "react/jsx-runtime";
2
- import X, { createContext as or, useReducer as It, useRef as x, useCallback as q, useEffect as Y, useContext as Tt, useSyncExternalStore as sr, useLayoutEffect as Ne, useMemo as De, useState as z, useId as St, lazy as ir, Suspense as cr } from "react";
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 lr = Object.defineProperty, dr = (e, t, r) => t in e ? lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, He = (e, t, r) => dr(e, typeof t != "symbol" ? t + "" : t, r);
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.4.3
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.4.3",
12
- buildTime: "02/09/2025 06:40 PM EST",
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 G(e) {
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 ve(e) {
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 et() {
31
+ function tt() {
32
32
  return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
33
33
  }
34
- function _t(e) {
34
+ function vt(e) {
35
35
  const { id: t } = e;
36
36
  return {
37
37
  ...e,
38
- id: ve(t),
38
+ id: xe(t),
39
39
  transports: e.transports
40
40
  };
41
41
  }
42
- function kt(e) {
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 v = class extends Error {
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 ur({ error: e, options: t }) {
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 v({
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 v({
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 v({
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 v({
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 v({
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 v({
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 v({
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 (kt(o)) {
100
+ if (xt(o)) {
101
101
  if (r.rp.id !== o)
102
- return new v({
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 v({
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 v({
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 v({
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 mr {
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 At = new mr(), hr = ["cross-platform", "platform"];
145
- function Rt(e) {
146
- if (e && !(hr.indexOf(e) < 0))
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 pr(e) {
150
- var u;
151
- if (!et())
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: ve(e.challenge),
155
+ challenge: xe(e.challenge),
156
156
  user: {
157
157
  ...e.user,
158
- id: ve(e.user.id)
158
+ id: xe(e.user.id)
159
159
  },
160
- excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(_t)
160
+ excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(vt)
161
161
  } };
162
- t.signal = At.createNewAbortSignal();
162
+ t.signal = Ct.createNewAbortSignal();
163
163
  let r;
164
164
  try {
165
165
  r = await navigator.credentials.create(t);
166
- } catch (c) {
167
- throw ur({ error: c, options: t });
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 d;
174
+ let c;
175
175
  if (typeof o.getPublicKeyAlgorithm == "function")
176
176
  try {
177
- d = o.getPublicKeyAlgorithm();
178
- } catch (c) {
179
- We("getPublicKeyAlgorithm()", c);
177
+ c = o.getPublicKeyAlgorithm();
178
+ } catch (l) {
179
+ Be("getPublicKeyAlgorithm()", l);
180
180
  }
181
- let h;
181
+ let f;
182
182
  if (typeof o.getPublicKey == "function")
183
183
  try {
184
- const c = o.getPublicKey();
185
- c !== null && (h = G(c));
186
- } catch (c) {
187
- We("getPublicKey()", c);
184
+ const l = o.getPublicKey();
185
+ l !== null && (f = J(l));
186
+ } catch (l) {
187
+ Be("getPublicKey()", l);
188
188
  }
189
- let f;
189
+ let h;
190
190
  if (typeof o.getAuthenticatorData == "function")
191
191
  try {
192
- f = G(o.getAuthenticatorData());
193
- } catch (c) {
194
- We("getAuthenticatorData()", c);
192
+ h = J(o.getAuthenticatorData());
193
+ } catch (l) {
194
+ Be("getAuthenticatorData()", l);
195
195
  }
196
196
  return {
197
197
  id: a,
198
- rawId: G(n),
198
+ rawId: J(n),
199
199
  response: {
200
- attestationObject: G(o.attestationObject),
201
- clientDataJSON: G(o.clientDataJSON),
200
+ attestationObject: J(o.attestationObject),
201
+ clientDataJSON: J(o.clientDataJSON),
202
202
  transports: i,
203
- publicKeyAlgorithm: d,
204
- publicKey: h,
205
- authenticatorData: f
203
+ publicKeyAlgorithm: c,
204
+ publicKey: f,
205
+ authenticatorData: h
206
206
  },
207
207
  type: s,
208
208
  clientExtensionResults: r.getClientExtensionResults(),
209
- authenticatorAttachment: Rt(r.authenticatorAttachment)
209
+ authenticatorAttachment: Ot(r.authenticatorAttachment)
210
210
  };
211
211
  }
212
- function We(e, t) {
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 fr() {
217
- if (!et())
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 gr({ error: e, options: t }) {
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 v({
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 v({
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 (kt(a)) {
242
+ if (xt(a)) {
243
243
  if (r.rpId !== a)
244
- return new v({
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 v({
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 v({
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 yr(e, t = !1) {
264
- var u, c;
265
- if (!et())
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
- ((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(_t));
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: ve(e.challenge),
271
+ challenge: xe(e.challenge),
272
272
  allowCredentials: r
273
273
  }, n = {};
274
274
  if (t) {
275
- if (!await fr())
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 = At.createNewAbortSignal();
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 (m) {
286
- throw gr({ error: m, options: n });
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: d, type: h } = o;
291
- let f;
292
- return d.userHandle && (f = G(d.userHandle)), {
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: G(i),
294
+ rawId: J(i),
295
295
  response: {
296
- authenticatorData: G(d.authenticatorData),
297
- clientDataJSON: G(d.clientDataJSON),
298
- signature: G(d.signature),
299
- userHandle: f
296
+ authenticatorData: J(c.authenticatorData),
297
+ clientDataJSON: J(c.clientDataJSON),
298
+ signature: J(c.signature),
299
+ userHandle: h
300
300
  },
301
- type: h,
301
+ type: f,
302
302
  clientExtensionResults: o.getClientExtensionResults(),
303
- authenticatorAttachment: Rt(o.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 06:40 PM EST",
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 me = {
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
- }, Nt = {
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
- }, br = `-----BEGIN PUBLIC KEY-----
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-----`, Le = {
349
+ -----END PUBLIC KEY-----`, $e = {
350
350
  CODE: "code",
351
351
  LOGOUT: "logout",
352
352
  LOGIN: "login",
353
353
  REFRESH: "refresh"
354
- }, $e = crypto, vt = (e) => e instanceof CryptoKey, Ee = new TextEncoder(), ye = new TextDecoder();
355
- function Er(...e) {
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 wr = (e) => {
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 = ye.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
369
+ t instanceof Uint8Array && (t = be.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
370
370
  try {
371
- return wr(t);
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 P = class extends Error {
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
- P.code = "ERR_JOSE_GENERIC";
383
- let H = class extends P {
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 qe extends P {
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
- qe.code = "ERR_JWT_EXPIRED";
395
- class xt extends P {
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
- xt.code = "ERR_JOSE_ALG_NOT_ALLOWED";
401
- let W = class extends P {
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 Ir extends P {
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
- Ir.code = "ERR_JWE_DECRYPTION_FAILED";
413
- class Tr extends P {
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
- Tr.code = "ERR_JWE_INVALID";
419
- let _ = class extends P {
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
- _.code = "ERR_JWS_INVALID";
425
- let J = class extends P {
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
- J.code = "ERR_JWT_INVALID";
431
- class Sr extends P {
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
- Sr.code = "ERR_JWK_INVALID";
437
- class _r extends P {
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
- _r.code = "ERR_JWKS_INVALID";
443
- class kr extends P {
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
- kr.code = "ERR_JWKS_NO_MATCHING_KEY";
449
- class Ar extends P {
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
- Ar.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
455
- class Rr extends P {
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
- Rr.code = "ERR_JWKS_TIMEOUT";
461
- class Ct extends P {
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
- Ct.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
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 we(e, t) {
470
+ function Ie(e, t) {
471
471
  return e.name === t;
472
472
  }
473
- function Be(e) {
473
+ function Ve(e) {
474
474
  return parseInt(e.name.slice(4), 10);
475
475
  }
476
- function Nr(e) {
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 vr(e, t) {
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 xr(e, t, ...r) {
498
+ function Lr(e, t, ...r) {
499
499
  switch (t) {
500
500
  case "HS256":
501
501
  case "HS384":
502
502
  case "HS512": {
503
- if (!we(e.algorithm, "HMAC"))
503
+ if (!Ie(e.algorithm, "HMAC"))
504
504
  throw j("HMAC");
505
505
  const a = parseInt(t.slice(2), 10);
506
- if (Be(e.algorithm.hash) !== a)
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 (!we(e.algorithm, "RSASSA-PKCS1-v1_5"))
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 (Be(e.algorithm.hash) !== a)
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 (!we(e.algorithm, "RSA-PSS"))
523
+ if (!Ie(e.algorithm, "RSA-PSS"))
524
524
  throw j("RSA-PSS");
525
525
  const a = parseInt(t.slice(2), 10);
526
- if (Be(e.algorithm.hash) !== a)
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 (!we(e.algorithm, "ECDSA"))
538
+ if (!Ie(e.algorithm, "ECDSA"))
539
539
  throw j("ECDSA");
540
- const a = Nr(t);
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
- vr(e, r);
548
+ Dr(e, r);
549
549
  }
550
- function Ot(e, t, ...r) {
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 st = (e, ...t) => Ot("Key must be ", e, ...t);
559
- function Pt(e, t, ...r) {
560
- return Ot(`Key for the ${e} algorithm must be `, t, ...r);
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 Dt = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xe = ["CryptoKey"], Cr = (...e) => {
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 Or(e) {
581
+ function Mr(e) {
582
582
  return typeof e == "object" && e !== null;
583
583
  }
584
- function he(e) {
585
- if (!Or(e) || Object.prototype.toString.call(e) !== "[object Object]")
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 Pr = (e, t) => {
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 pe(e) {
602
- return he(e) && typeof e.kty == "string";
601
+ function fe(e) {
602
+ return pe(e) && typeof e.kty == "string";
603
603
  }
604
- function Dr(e) {
604
+ function Kr(e) {
605
605
  return e.kty !== "oct" && typeof e.d == "string";
606
606
  }
607
- function Lr(e) {
607
+ function Hr(e) {
608
608
  return e.kty !== "oct" && typeof e.d > "u";
609
609
  }
610
- function $r(e) {
611
- return pe(e) && e.kty === "oct" && typeof e.k == "string";
610
+ function Wr(e) {
611
+ return fe(e) && e.kty === "oct" && typeof e.k == "string";
612
612
  }
613
- function Mr(e) {
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 Lt = async (e) => {
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 } = Mr(e), a = [
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, $e.subtle.importKey("jwk", n, ...a);
694
- }, $t = (e) => te(e);
695
- let oe, se;
696
- const Mt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ce = async (e, t, r, a, n = !1) => {
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 Lt({ ...r, alg: a });
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
- }, Ur = (e, t) => {
703
- if (Mt(e)) {
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 ? $t(r.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Ce(se, e, r, t));
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 pe(e) ? e.k ? te(e.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Ce(se, e, e, t, !0)) : e;
708
- }, Kr = (e, t) => {
709
- if (Mt(e)) {
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 ? $t(r.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), Ce(oe, e, r, t));
711
+ return r.k ? Wt(r.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Oe(se, e, r, t));
712
712
  }
713
- return pe(e) ? e.k ? te(e.k) : (oe || (oe = /* @__PURE__ */ new WeakMap()), Ce(oe, e, e, t, !0)) : e;
714
- }, Hr = { normalizePublicKey: Ur, normalizePrivateKey: Kr }, ee = (e, t, r = 0) => {
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
- }, it = (e) => {
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
- }, Wr = async (e, t, r, a, n) => {
740
+ }, Yr = async (e, t, r, a, n) => {
741
741
  let o, s;
742
- const i = new Uint8Array(atob(r.replace(e, "")).split("").map((d) => d.charCodeAt(0)));
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 d = it(i);
777
- o = d.startsWith("P-") ? { name: "ECDH", namedCurve: d } : { name: d }, s = [];
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: it(i) }, s = ["verify"];
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 $e.subtle.importKey(t, i, o, !1, s);
787
- }, Br = (e, t, r) => Wr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
788
- async function Vr(e, t, r) {
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 Br(e, t);
791
+ return Fr(e, t);
792
792
  }
793
- async function Jr(e, t) {
794
- if (!he(e))
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 Lt({ ...e, alg: t });
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 ue = (e) => e == null ? void 0 : e[Symbol.toStringTag], Xe = (e, t, r) => {
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
- }, Gr = (e, t, r, a) => {
820
+ }, qr = (e, t, r, a) => {
821
821
  if (!(t instanceof Uint8Array)) {
822
- if (a && pe(t)) {
823
- if ($r(t) && Xe(e, t, r))
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 (!Dt(t))
828
- throw new TypeError(Pt(e, t, ...xe, "Uint8Array", a ? "JSON Web Key" : null));
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(`${ue(t)} instances for symmetric algorithms must be of type "secret"`);
830
+ throw new TypeError(`${me(t)} instances for symmetric algorithms must be of type "secret"`);
831
831
  }
832
- }, Yr = (e, t, r, a) => {
833
- if (a && pe(t))
832
+ }, Xr = (e, t, r, a) => {
833
+ if (a && fe(t))
834
834
  switch (r) {
835
835
  case "sign":
836
- if (Dr(t) && Xe(e, t, r))
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 (Lr(t) && Xe(e, t, r))
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 (!Dt(t))
845
- throw new TypeError(Pt(e, t, ...xe, a ? "JSON Web Key" : null));
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(`${ue(t)} instances for asymmetric algorithms must not be of type "secret"`);
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(`${ue(t)} instances for asymmetric algorithm signing must be of type "private"`);
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(`${ue(t)} instances for asymmetric algorithm decryption must be of type "private"`);
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(`${ue(t)} instances for asymmetric algorithm verifying must be of type "public"`);
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(`${ue(t)} instances for asymmetric algorithm encryption must be of type "public"`);
855
+ throw new TypeError(`${me(t)} instances for asymmetric algorithm encryption must be of type "public"`);
856
856
  };
857
- function Ut(e, t, r, a) {
858
- t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Gr(t, r, a, e) : Yr(t, r, a, e);
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
- Ut.bind(void 0, !1);
861
- const ct = Ut.bind(void 0, !0);
862
- function Fr(e, t, r, a, n) {
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 jr = (e, t) => {
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 zr(e, t) {
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 qr(e, t, r) {
913
- if (t = await Hr.normalizePublicKey(t, e), vt(t))
914
- return xr(t, e, r), t;
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(st(t, ...xe));
918
- return $e.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
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(st(t, ...xe, "Uint8Array", "JSON Web Key"));
920
+ throw new TypeError(it(t, ...Ce, "Uint8Array", "JSON Web Key"));
921
921
  }
922
- const Xr = async (e, t, r, a) => {
923
- const n = await qr(e, t, "verify");
924
- Pr(e, n);
925
- const o = zr(e, n.algorithm);
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 $e.subtle.verify(o, n, r, a);
927
+ return await Me.subtle.verify(o, n, r, a);
928
928
  } catch {
929
929
  return !1;
930
930
  }
931
931
  };
932
- async function Qr(e, t, r) {
933
- if (!he(e))
934
- throw new _("Flattened JWS must be an object");
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 _('Flattened JWS must have either of the "protected" or "header" members');
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 _("JWS Protected Header incorrect type");
938
+ throw new k("JWS Protected Header incorrect type");
939
939
  if (e.payload === void 0)
940
- throw new _("JWS Payload missing");
940
+ throw new k("JWS Payload missing");
941
941
  if (typeof e.signature != "string")
942
- throw new _("JWS Signature missing or incorrect type");
943
- if (e.header !== void 0 && !he(e.header))
944
- throw new _("JWS Unprotected Header incorrect type");
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(ye.decode(y));
949
+ a = JSON.parse(be.decode(y));
950
950
  } catch {
951
- throw new _("JWS Protected Header is invalid");
951
+ throw new k("JWS Protected Header is invalid");
952
952
  }
953
- if (!Cr(a, e.header))
954
- throw new _("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
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 = Fr(_, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
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 _('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
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 _('JWS "alg" (Algorithm) Header Parameter missing or invalid');
965
- const d = jr("algorithms", r.algorithms);
966
- if (d && !d.has(i))
967
- throw new xt('"alg" (Algorithm) Header Parameter value not allowed');
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 _("JWS Payload must be a string");
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 _("JWS Payload must be a string or an Uint8Array instance");
973
- let h = !1;
974
- typeof t == "function" ? (t = await t(a, e), h = !0, ct(i, t, "verify"), pe(t) && (t = await Jr(t, i))) : ct(i, t, "verify");
975
- const f = Er(Ee.encode(e.protected ?? ""), Ee.encode("."), typeof e.payload == "string" ? Ee.encode(e.payload) : e.payload);
976
- let u;
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
- u = te(e.signature);
978
+ m = te(e.signature);
979
979
  } catch {
980
- throw new _("Failed to base64url decode the signature");
980
+ throw new k("Failed to base64url decode the signature");
981
981
  }
982
- if (!await Xr(i, t, u, f))
983
- throw new Ct();
984
- let c;
982
+ if (!await ra(i, t, m, h))
983
+ throw new $t();
984
+ let l;
985
985
  if (s)
986
986
  try {
987
- c = te(e.payload);
987
+ l = te(e.payload);
988
988
  } catch {
989
- throw new _("Failed to base64url decode the payload");
989
+ throw new k("Failed to base64url decode the payload");
990
990
  }
991
- else typeof e.payload == "string" ? c = Ee.encode(e.payload) : c = e.payload;
992
- const m = { payload: c };
993
- return e.protected !== void 0 && (m.protectedHeader = a), e.header !== void 0 && (m.unprotectedHeader = e.header), h ? { ...m, key: t } : m;
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 Zr(e, t, r) {
996
- if (e instanceof Uint8Array && (e = ye.decode(e)), typeof e != "string")
997
- throw new _("Compact JWS must be a string or Uint8Array");
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 _("Invalid Compact JWS");
1001
- const i = await Qr({ payload: n, protected: a, signature: o }, t, r), d = { payload: i.payload, protectedHeader: i.protectedHeader };
1002
- return typeof t == "function" ? { ...d, key: i.key } : d;
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 ea = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Ht = Kt * 60, tt = Ht * 24, ta = tt * 7, ra = tt * 365.25, aa = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, lt = (e) => {
1005
- const t = aa.exec(e);
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 * Kt);
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 * Ht);
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 * tt);
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 * ta);
1040
+ n = Math.round(r * sa);
1041
1041
  break;
1042
1042
  default:
1043
- n = Math.round(r * ra);
1043
+ n = Math.round(r * ia);
1044
1044
  break;
1045
1045
  }
1046
1046
  return t[1] === "-" || t[4] === "ago" ? -n : n;
1047
- }, dt = (e) => e.toLowerCase().replace(/^application\//, ""), na = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, oa = (e, t, r = {}) => {
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(ye.decode(t));
1050
+ a = JSON.parse(be.decode(t));
1051
1051
  } catch {
1052
1052
  }
1053
- if (!he(a))
1054
- throw new J("JWT Claims Set must be a top-level JSON object");
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" || dt(e.typ) !== dt(n)))
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: d, maxTokenAge: h } = r, f = [...o];
1059
- h !== void 0 && f.push("iat"), d !== void 0 && f.push("aud"), i !== void 0 && f.push("sub"), s !== void 0 && f.push("iss");
1060
- for (const y of new Set(f.reverse()))
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 (d && !na(a.aud, typeof d == "string" ? [d] : d))
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 u;
1069
+ let m;
1070
1070
  switch (typeof r.clockTolerance) {
1071
1071
  case "string":
1072
- u = lt(r.clockTolerance);
1072
+ m = dt(r.clockTolerance);
1073
1073
  break;
1074
1074
  case "number":
1075
- u = r.clockTolerance;
1075
+ m = r.clockTolerance;
1076
1076
  break;
1077
1077
  case "undefined":
1078
- u = 0;
1078
+ m = 0;
1079
1079
  break;
1080
1080
  default:
1081
1081
  throw new TypeError("Invalid clockTolerance option type");
1082
1082
  }
1083
- const { currentDate: c } = r, m = ea(c || /* @__PURE__ */ new Date());
1084
- if ((a.iat !== void 0 || h) && typeof a.iat != "number")
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 > m + u)
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 <= m - u)
1096
- throw new qe('"exp" claim timestamp check failed', a, "exp", "check_failed");
1097
- }
1098
- if (h) {
1099
- const y = m - a.iat, w = typeof h == "number" ? h : lt(h);
1100
- if (y - u > w)
1101
- throw new qe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
1102
- if (y < 0 - u)
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 sa(e, t, r) {
1107
+ async function ua(e, t, r) {
1108
1108
  var a;
1109
- const n = await Zr(e, t, r);
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 J("JWTs MUST NOT use unencoded payload");
1112
- const o = { payload: oa(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
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 ia = te;
1116
- function ca(e) {
1115
+ const ma = te;
1116
+ function ha(e) {
1117
1117
  if (typeof e != "string")
1118
- throw new J("JWTs must use Compact JWS serialization, JWT must be a string");
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 J("Only JWTs using Compact JWS serialization can be decoded");
1121
+ throw new V("Only JWTs using Compact JWS serialization can be decoded");
1122
1122
  if (r !== 3)
1123
- throw new J("Invalid JWT");
1123
+ throw new V("Invalid JWT");
1124
1124
  if (!t)
1125
- throw new J("JWTs must contain a payload");
1125
+ throw new V("JWTs must contain a payload");
1126
1126
  let a;
1127
1127
  try {
1128
- a = ia(t);
1128
+ a = ma(t);
1129
1129
  } catch {
1130
- throw new J("Failed to base64url decode the payload");
1130
+ throw new V("Failed to base64url decode the payload");
1131
1131
  }
1132
1132
  let n;
1133
1133
  try {
1134
- n = JSON.parse(ye.decode(a));
1134
+ n = JSON.parse(be.decode(a));
1135
1135
  } catch {
1136
- throw new J("Failed to parse the decoded payload as JSON");
1136
+ throw new V("Failed to parse the decoded payload as JSON");
1137
1137
  }
1138
- if (!he(n))
1139
- throw new J("Invalid JWT Claims Set");
1138
+ if (!pe(n))
1139
+ throw new V("Invalid JWT Claims Set");
1140
1140
  return n;
1141
1141
  }
1142
- const ge = async (e) => {
1142
+ const ye = async (e) => {
1143
1143
  try {
1144
- const t = N.ALG, r = await Vr(br, t);
1145
- return await sa(e, r, {
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
- }, la = (e) => {
1151
+ }, pa = (e) => {
1152
1152
  try {
1153
- return ca(e);
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 da(e, t = 0) {
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 Ve;
1164
- const ua = new Uint8Array(16);
1165
- function ma() {
1166
- if (!Ve) {
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
- Ve = crypto.getRandomValues.bind(crypto);
1169
+ Je = crypto.getRandomValues.bind(crypto);
1170
1170
  }
1171
- return Ve(ua);
1171
+ return Je(ga);
1172
1172
  }
1173
- const ha = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ut = { randomUUID: ha };
1174
- function mt(e, t, r) {
1175
- if (ut.randomUUID && !e)
1176
- return ut.randomUUID();
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 || ma)();
1179
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, da(a);
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 ht = globalThis.crypto, pa = (e) => `${mt()}${mt()}`.slice(0, e), fa = (e) => btoa(
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 ga(e) {
1185
- if (!ht.subtle)
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 ht.subtle.digest("SHA-256", t);
1190
- return fa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
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 ya(e) {
1193
- const t = pa(43), r = await ga(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 Wt(e, t) {
1199
+ function Yt(e, t) {
1200
1200
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
1201
1201
  }
1202
- const pt = (e, t) => {
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), Wt(e, r);
1207
- }, ba = (e) => {
1208
- window.localStorage.removeItem(e), Wt(e, null);
1209
- }, ft = (e) => window.localStorage.getItem(e), Ea = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1210
- function Ie({
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 = sr(Ea, () => ft(e)), a = q(
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 ? ba(e) : pt(e, i);
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 Y(() => {
1229
+ return G(() => {
1230
1230
  try {
1231
- ft(e) === null && typeof t < "u" && pt(e, t);
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 wa(e, t = 0) {
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 Je;
1244
- const Ia = new Uint8Array(16);
1245
- function Ta() {
1246
- if (!Je) {
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
- Je = crypto.getRandomValues.bind(crypto);
1249
+ Ge = crypto.getRandomValues.bind(crypto);
1250
1250
  }
1251
- return Je(Ia);
1251
+ return Ge(Aa);
1252
1252
  }
1253
- const Sa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), gt = { randomUUID: Sa };
1254
- function Ge(e, t, r) {
1255
- if (gt.randomUUID && !e)
1256
- return gt.randomUUID();
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 || Ta)();
1259
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, wa(a);
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 ie = "Your session has expired. For your security, please log in again to continue.", _a = "Your session has been successfully terminated.", Ye = "Login failed. Please try again.", ka = "Error getting access token, please re-authenticate.", Aa = "You forgot to wrap your component in <AuthProvider>.", Te = "@@auth@@", fe = "LOADING", ke = "LOGIN", Bt = "LOGOUT", be = "success", F = "failure", Vt = "include", Jt = "POST", Gt = "application/json", Se = {
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
- }, ce = {
1342
+ }, le = {
1343
1343
  GET_REGISTRATION_OPTIONS: {
1344
- schema: Se.GET_REGISTRATION_OPTIONS,
1344
+ schema: _e.GET_REGISTRATION_OPTIONS,
1345
1345
  method: "getPasskeyRegistrationOptions"
1346
1346
  },
1347
1347
  VERIFY_REGISTRATION: {
1348
- schema: Se.VERIFY_REGISTRATION,
1348
+ schema: _e.VERIFY_REGISTRATION,
1349
1349
  method: "verifyPasskeyRegistration"
1350
1350
  },
1351
1351
  GET_AUTHENTICATION_OPTIONS: {
1352
- schema: Se.GET_AUTHENTICATION_OPTIONS,
1352
+ schema: _e.GET_AUTHENTICATION_OPTIONS,
1353
1353
  method: "getPasskeyAuthenticationOptions"
1354
1354
  },
1355
1355
  VERIFY_AUTHENTICATION: {
1356
- schema: Se.VERIFY_AUTHENTICATION,
1356
+ schema: _e.VERIFY_AUTHENTICATION,
1357
1357
  method: "verifyPasskeyAuthentication"
1358
1358
  }
1359
- }, le = async ({
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 n = `Bearer ${e}`, o = await fetch(`${Yt()}/graphql`, {
1367
- credentials: Vt,
1368
- method: Jt,
1367
+ const o = `Bearer ${e}`, s = await fetch(`${n}/graphql`, {
1368
+ credentials: jt,
1369
+ method: zt,
1369
1370
  headers: {
1370
- authorization: n,
1371
- "Content-Type": Gt,
1372
- [Nt.CLIENT_ID]: `${r}`
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 (o.status !== 200)
1380
- return { status: F, data: [] };
1381
- const { data: s } = await o.json();
1380
+ if (s.status !== 200)
1381
+ return { status: Y, data: [] };
1382
+ const { data: i } = await s.json();
1382
1383
  return {
1383
- status: be,
1384
- data: s[t.method]
1384
+ status: Ee,
1385
+ data: i[t.method]
1385
1386
  };
1386
- } catch (n) {
1387
- return console.error(n), { status: F, data: [] };
1387
+ } catch (o) {
1388
+ return console.error(o), { status: Y, data: [] };
1388
1389
  }
1389
- }, Me = async ({
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 a = await fetch(`${Yt()}/${e}`, {
1396
- credentials: Vt,
1397
- method: Jt,
1397
+ const n = await fetch(`${a}/${e}`, {
1398
+ credentials: jt,
1399
+ method: zt,
1398
1400
  headers: {
1399
- "Content-Type": Gt,
1400
- [Nt.CLIENT_ID]: `${t}`
1401
+ "Content-Type": qt,
1402
+ [Pt.CLIENT_ID]: `${t}`
1401
1403
  },
1402
1404
  body: JSON.stringify(r)
1403
1405
  });
1404
- if (a.status !== 200)
1405
- return { status: F, data: [] };
1406
- const { data: n } = await a.json();
1406
+ if (n.status !== 200)
1407
+ return { status: Y, data: [] };
1408
+ const { data: o } = await n.json();
1407
1409
  return {
1408
- status: be,
1409
- data: n || []
1410
+ status: Ee,
1411
+ data: o || []
1410
1412
  };
1411
- } catch (a) {
1412
- return console.error(a), { status: F, data: [] };
1413
+ } catch (n) {
1414
+ return console.error(n), { status: Y, data: [] };
1413
1415
  }
1414
- }, Ra = process.env.NODE_ENV === "production", Na = !Ra, Yt = () => {
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
- }, va = (e) => {
1423
+ }, Da = (e) => {
1425
1424
  try {
1426
- const t = la(e);
1425
+ const t = pa(e);
1427
1426
  return t ? t[N.USER_ID_KEY] : "";
1428
1427
  } catch {
1429
1428
  return "";
1430
1429
  }
1431
- }, xa = async ({
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 n;
1437
+ var o;
1438
1438
  try {
1439
1439
  return {
1440
- status: ((n = await Me({
1441
- type: Le.LOGOUT,
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 : n.status) || F
1449
+ })) == null ? void 0 : o.status) || Y
1449
1450
  };
1450
1451
  } catch {
1451
1452
  return {
1452
- status: F
1453
+ status: Y
1453
1454
  };
1454
1455
  }
1455
- }, Ca = async ({
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: d,
1465
- ua: h
1465
+ domain: c,
1466
+ ua: f,
1467
+ endpoint: h
1466
1468
  }) => {
1467
- var f;
1469
+ var m;
1468
1470
  try {
1469
- const u = await Me({
1470
- type: Le.LOGIN,
1471
+ const l = await Ue({
1472
+ endpoint: h,
1473
+ type: $e.LOGIN,
1471
1474
  clientId: r,
1472
1475
  params: {
1473
- type: n || me.ID_AND_ACCESS_TOKEN,
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: d,
1481
- ua: h
1483
+ domain: c,
1484
+ ua: f
1482
1485
  }
1483
- }), c = await ge((f = u == null ? void 0 : u.data) == null ? void 0 : f.idToken);
1484
- return c && c.payload[N.USER_ID_KEY] !== "" && c.payload[N.NONCE_KEY] === a ? {
1485
- idToken: u.data.idToken,
1486
- accessToken: u.data.accessToken,
1487
- refreshToken: u.data.refreshToken,
1488
- userId: c.payload[N.USER_ID_KEY],
1489
- email: c.payload[N.EMAIL_KEY],
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
- }, Oa = async ({
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 a;
1508
+ var n;
1505
1509
  try {
1506
- const n = await Me({
1507
- type: Le.CODE,
1510
+ const o = await Ue({
1511
+ endpoint: a,
1512
+ type: $e.CODE,
1508
1513
  clientId: t,
1509
1514
  params: {
1510
- type: me.CODE,
1515
+ type: he.CODE,
1511
1516
  nonce: e,
1512
1517
  code_challenge: r
1513
1518
  }
1514
1519
  });
1515
- return (a = n == null ? void 0 : n.data) != null && a.code ? {
1516
- status: be,
1517
- data: n.data.code
1520
+ return (n = o == null ? void 0 : o.data) != null && n.code ? {
1521
+ status: Ee,
1522
+ data: o.data.code
1518
1523
  } : {
1519
- status: F,
1524
+ status: Y,
1520
1525
  data: ""
1521
1526
  };
1522
1527
  } catch {
1523
1528
  return {
1524
- status: F,
1529
+ status: Y,
1525
1530
  data: ""
1526
1531
  };
1527
1532
  }
1528
- }, Pa = async ({
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 s;
1542
+ var i;
1537
1543
  try {
1538
- const i = await Me({
1539
- type: Le.REFRESH,
1544
+ const c = await Ue({
1545
+ endpoint: s,
1546
+ type: $e.REFRESH,
1540
1547
  clientId: e,
1541
1548
  params: {
1542
- type: me.REFRESH_TOKEN,
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
- }), d = await ge((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
1550
- return d && d.payload[N.USER_ID_KEY] !== "" && d.payload[N.NONCE_KEY] === r ? {
1551
- accessToken: i.data.accessToken,
1552
- refreshToken: i.data.refreshToken,
1553
- userId: d.payload[N.USER_ID_KEY],
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 Da {
1571
+ class Ka {
1565
1572
  constructor(t = null, r = null) {
1566
- He(this, "refreshTokenPromise", null), He(this, "accessToken"), He(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
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
- clientId: t,
1588
- userId: r,
1589
- nonce: a,
1590
- domain: n
1596
+ endpoint: t,
1597
+ clientId: r,
1598
+ userId: a,
1599
+ nonce: n,
1600
+ domain: o
1591
1601
  }) {
1592
- const o = await ge(this.refreshToken);
1593
- if (o && o.payload[N.USER_ID_KEY] !== "") {
1594
- const s = await Pa({
1595
- clientId: t,
1596
- userId: r,
1597
- nonce: a,
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: n
1611
+ domain: o
1601
1612
  });
1602
- return s.status ? (this.accessToken = s.accessToken, this.refreshToken = s.refreshToken, {
1603
- status: be,
1604
- newAccessToken: s.accessToken,
1605
- newRefreshToken: s.refreshToken
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: F
1618
+ status: Y
1608
1619
  };
1609
1620
  } else
1610
1621
  return {
1611
- status: F
1622
+ status: Y
1612
1623
  };
1613
1624
  }
1614
1625
  }
1615
- const La = (e) => q(
1626
+ const Ha = (e) => q(
1616
1627
  (...t) => {
1617
1628
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
1618
1629
  },
1619
1630
  [e]
1620
- ), de = () => {
1621
- throw new Error(Aa);
1622
- }, jt = or({
1631
+ ), ue = () => {
1632
+ throw new Error(Ca);
1633
+ }, Qt = dr({
1623
1634
  isAuthenticated: !1,
1624
1635
  isLoading: !1,
1625
- login: de,
1626
- logout: de,
1627
- getAccessToken: de,
1628
- getIdToken: de,
1629
- registeringForPasskey: de,
1630
- loginWithPasskey: de,
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
- }), $a = X.createContext({
1634
- state: Ft,
1644
+ }), Wa = X.createContext({
1645
+ state: Xt,
1635
1646
  dispatch: () => {
1636
1647
  }
1637
- }), Ma = (e, t) => (t == null ? void 0 : t.type) === fe ? {
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) === ke ? {
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) === Bt ? {
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, Ua = ({
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 [o, s] = It(Ma, {
1662
- ...Ft,
1673
+ const [s, i] = At(Ba, {
1674
+ ...Xt,
1663
1675
  debug: n
1664
- }), i = La(n), d = x(!1), [h, f, , u] = Ie({
1665
- key: `${Te}::${r}::@@user@@`
1666
- }), [c, m, , y] = Ie({
1667
- key: `${Te}::${r}::@@access@@`
1668
- }), [w, I, , k] = Ie(
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: `${Te}::${r}::@@refresh@@`
1682
+ key: `${Se}::${r}::@@refresh@@`
1671
1683
  }
1672
- ), [Q, L, , Z] = Ie({
1673
- key: `${Te}::${r}::@@nonce@@`
1674
- }), $ = new Da(c, w), B = q(() => {
1675
- i("removeLocalStorage: removing local storage"), u(), y(), k(), Z();
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
- y,
1678
- u,
1679
- Z,
1680
- k,
1681
- i
1682
- ]), U = q(
1689
+ E,
1690
+ l,
1691
+ L,
1692
+ F,
1693
+ c
1694
+ ]), v = q(
1683
1695
  (g) => {
1684
- i(
1696
+ c(
1685
1697
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
1686
1698
  g
1687
- ), s({
1688
- type: Bt,
1699
+ ), i({
1700
+ type: Ft,
1689
1701
  payload: {
1690
- logoutReason: g || ie
1702
+ logoutReason: g || ce
1691
1703
  }
1692
- }), B(), s({ type: fe, payload: { isLoading: !1 } });
1704
+ }), U(), i({ type: ge, payload: { isLoading: !1 } });
1693
1705
  },
1694
- [B, i]
1706
+ [U, c]
1695
1707
  ), S = q(
1696
1708
  async (g) => {
1697
- i("invalidateAndLogout: invalidating and logging out");
1698
- const { user: E } = o, b = (E == null ? void 0 : E.userId) || va(h);
1699
- b || i(
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 xa({
1713
+ ), await La({
1702
1714
  userId: b,
1703
1715
  clientId: r,
1704
1716
  domain: a,
1705
- idToken: h
1706
- }), U(g || ie);
1717
+ idToken: h,
1718
+ endpoint: o
1719
+ }), v(g || ce);
1707
1720
  },
1708
- [h, o, r, a, U, i]
1721
+ [
1722
+ h,
1723
+ s,
1724
+ r,
1725
+ a,
1726
+ v,
1727
+ c,
1728
+ o
1729
+ ]
1709
1730
  );
1710
- Y(() => {
1711
- if (!d.current)
1712
- return o.isLoading && h !== null ? (async () => {
1731
+ G(() => {
1732
+ if (!f.current)
1733
+ return s.isLoading && h !== null ? (async () => {
1713
1734
  try {
1714
- const g = await ge(h);
1715
- g && g.payload[N.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
1716
- type: ke,
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
- })) : (i("useEffect: invalid JWT, invalidating and logging out"), await S(ie));
1746
+ })) : (c("useEffect: invalid JWT, invalidating and logging out"), await S(ce));
1726
1747
  } catch {
1727
- i(
1748
+ c(
1728
1749
  "useEffect: exception validating JWT, invalidating and logging out"
1729
- ), await S(ie);
1750
+ ), await S(ce);
1730
1751
  }
1731
- })() : (i("useEffect: setting the loading state to false"), s({ type: fe, payload: { isLoading: !1 } })), () => {
1732
- d.current = !0;
1752
+ })() : (c("useEffect: setting the loading state to false"), i({ type: ge, payload: { isLoading: !1 } })), () => {
1753
+ f.current = !0;
1733
1754
  };
1734
- }, [o.isLoading, h, S, i]);
1735
- const M = async (g, E) => {
1736
- s({ type: fe, payload: { isLoading: !0 } }), B();
1737
- const b = Ge();
1738
- L(b), i("login: Logging in with password");
1739
- const { code_verifier: ae, code_challenge: nr } = await ya(), ot = await Oa({
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: nr
1764
+ code_challenge: lr
1743
1765
  });
1744
- if (ot.status) {
1745
- const ne = await Ca({
1766
+ if (st.status) {
1767
+ const oe = await $a({
1768
+ endpoint: o,
1746
1769
  username: g,
1747
- password: E,
1770
+ password: I,
1748
1771
  clientId: r,
1749
1772
  sessionExpiration: t,
1750
1773
  nonce: b,
1751
- type: me.CODE,
1752
- code: ot.data,
1753
- code_verifier: ae,
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 ne.status ? (f(ne.idToken), m(ne.accessToken), I(ne.refreshToken), s({
1758
- type: ke,
1780
+ return oe.status ? (m(oe.idToken), y(oe.accessToken), _(oe.refreshToken), i({
1781
+ type: Ae,
1759
1782
  payload: {
1760
- authenticationType: me.CODE,
1783
+ authenticationType: he.CODE,
1761
1784
  user: {
1762
- userId: ne.userId,
1785
+ userId: oe.userId,
1763
1786
  username: g,
1764
- email: ne.email
1787
+ email: oe.email
1765
1788
  }
1766
1789
  }
1767
- }), !0) : (U(Ye), !1);
1790
+ }), !0) : (v(Fe), !1);
1768
1791
  }
1769
1792
  return !1;
1770
- }, K = async (g) => {
1771
- g == null || g.preventDefault(), await S(_a);
1772
- }, T = async () => {
1773
- const { isAuthenticated: g, user: E } = o;
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 && E && E.userId) {
1776
- if (c) {
1777
- i("getAccessToken");
1778
- const ae = await ge(c);
1779
- if (ae && ae.payload[N.USER_ID_KEY] !== "")
1780
- return c;
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
- i("getAccessToken: invalid access token, trying to refresh it");
1783
- const b = await $.refreshtoken({
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: E.userId,
1786
- nonce: Q,
1809
+ userId: I.userId,
1810
+ nonce: M,
1787
1811
  domain: a
1788
1812
  });
1789
- return b.status && b.status === "success" && b.newAccessToken ? (m(b.newAccessToken), I(b.newRefreshToken), b.newAccessToken) : (i(
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(ie), "");
1815
+ ), await S(ce), "");
1792
1816
  }
1793
- return i(
1817
+ return c(
1794
1818
  "getAccessToken: user is not authenticated, cannot get access token"
1795
- ), await S(ie), "";
1819
+ ), await S(ce), "";
1796
1820
  } catch {
1797
- return i(
1821
+ return c(
1798
1822
  "getAccessToken: exception occurred, invalidating and logging out"
1799
- ), await S(ka), "";
1823
+ ), await S(xa), "";
1800
1824
  }
1801
- }, C = () => o.isAuthenticated && h ? h : "", O = async () => {
1802
- const { user: g } = o;
1803
- let E = await le({
1804
- accessToken: c,
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: ce.GET_REGISTRATION_OPTIONS,
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 (E.status)
1838
+ if (I.status)
1814
1839
  try {
1815
- const b = await pr(E.data);
1816
- return E = await le({
1817
- accessToken: c,
1840
+ const b = await Er(I.data);
1841
+ return I = await de({
1842
+ endpoint: o,
1843
+ accessToken: u,
1818
1844
  clientId: r,
1819
- type: ce.VERIFY_REGISTRATION,
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
- }), !!(E.status && E.data.length > 0);
1852
+ }), !!(I.status && I.data.length > 0);
1827
1853
  } catch {
1828
- return await le({
1829
- accessToken: c,
1854
+ return await de({
1855
+ endpoint: o,
1856
+ accessToken: u,
1830
1857
  clientId: r,
1831
- type: ce.VERIFY_REGISTRATION,
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
- }, V = async () => {
1842
- s({ type: fe, payload: { isLoading: !0 } }), B();
1843
- const g = Ge();
1844
- L(g), i("loginWithPasskey");
1845
- const E = Ge();
1846
- let b = await le({
1847
- accessToken: c,
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: ce.GET_AUTHENTICATION_OPTIONS,
1877
+ type: le.GET_AUTHENTICATION_OPTIONS,
1850
1878
  params: {
1851
- id: E,
1879
+ id: I,
1852
1880
  clientId: r
1853
1881
  }
1854
1882
  });
1855
1883
  if (b.status)
1856
1884
  try {
1857
- const ae = await yr(b.data);
1858
- return b = await le({
1859
- accessToken: c,
1885
+ const ne = await Tr(b.data);
1886
+ return b = await de({
1887
+ endpoint: o,
1888
+ accessToken: u,
1860
1889
  clientId: r,
1861
- type: ce.VERIFY_AUTHENTICATION,
1890
+ type: le.VERIFY_AUTHENTICATION,
1862
1891
  params: {
1863
1892
  clientId: r,
1864
- id: E,
1865
- authentication: ae,
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 === be ? (f(b.data.idToken), m(b.data.accessToken), I(b.data.refreshToken), s({
1872
- type: ke,
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: me.PASSKEY,
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) : (U(Ye), !1);
1910
+ }), !0) : (v(Fe), !1);
1882
1911
  } catch {
1883
- return await le({
1884
- accessToken: c,
1912
+ return await de({
1913
+ endpoint: o,
1914
+ accessToken: u,
1885
1915
  clientId: r,
1886
- type: ce.VERIFY_AUTHENTICATION,
1916
+ type: le.VERIFY_AUTHENTICATION,
1887
1917
  params: {
1888
1918
  clientId: r,
1889
- id: E,
1919
+ id: I,
1890
1920
  authentication: {},
1891
1921
  nonce: g,
1892
1922
  domain: a,
1893
1923
  sessionExpiration: t
1894
1924
  }
1895
- }), U(Ye), !1;
1925
+ }), v(Fe), !1;
1896
1926
  }
1897
1927
  return !1;
1898
1928
  };
1899
- return /* @__PURE__ */ l($a.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
1900
- jt.Provider,
1929
+ return /* @__PURE__ */ d(Wa.Provider, { value: { state: s, dispatch: i }, children: /* @__PURE__ */ d(
1930
+ Qt.Provider,
1901
1931
  {
1902
1932
  value: {
1903
- ...o,
1904
- login: M,
1905
- logout: K,
1906
- getAccessToken: T,
1907
- getIdToken: C,
1908
- registeringForPasskey: O,
1909
- loginWithPasskey: V
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
- }, zt = (e = jt) => Tt(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==", Ka = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ko = 10, Ho = 30, Wo = "av-prompt", Bo = "av-prompt-editable", Vo = "size-5 sm:size-4", yt = (e) => Number.isFinite(e) ? e : 0;
1915
- function Ha(e) {
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(yt(e * 1e3) % 1e3),
1923
- nanoseconds: Math.trunc(yt(e * 1e6) % 1e3)
1952
+ microseconds: Math.trunc(wt(e * 1e3) % 1e3),
1953
+ nanoseconds: Math.trunc(wt(e * 1e6) % 1e3)
1924
1954
  };
1925
1955
  }
1926
- function Wa(e) {
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 Ba(e) {
1967
+ function Ga(e) {
1938
1968
  switch (typeof e) {
1939
1969
  case "number": {
1940
1970
  if (Number.isFinite(e))
1941
- return Ha(e);
1971
+ return Va(e);
1942
1972
  break;
1943
1973
  }
1944
1974
  case "bigint":
1945
- return Wa(e);
1975
+ return Ja(e);
1946
1976
  }
1947
1977
  throw new TypeError("Expected a finite number or bigint");
1948
1978
  }
1949
- const Va = (e) => e === 0 || e === 0n, Ja = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ga = 1e-7, Ya = 24n * 60n * 60n * 1000n;
1950
- function Fa(e, t) {
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 = (f, u) => {
1959
- const c = Math.floor(f * 10 ** u + Ga);
1960
- return (Math.round(c) / 10 ** u).toFixed(u);
1961
- }, s = (f, u, c, m) => {
1962
- if (!((n.length === 0 || !t.colonNotation) && Va(f) && !(t.colonNotation && c === "m"))) {
1963
- if (m ?? (m = String(f)), t.colonNotation) {
1964
- const y = m.includes(".") ? m.split(".")[0].length : m.length, w = n.length > 0 ? 2 : 1;
1965
- m = "0".repeat(Math.max(0, w - y)) + m;
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
- m += t.verbose ? " " + Ja(u, f) : c;
1968
- n.push(m);
1997
+ u += t.verbose ? " " + Fa(m, h) : l;
1998
+ n.push(u);
1969
1999
  }
1970
- }, i = Ba(e), d = BigInt(i.days);
1971
- if (t.hideYearAndDays ? s(BigInt(d) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(d, "day", "d") : (s(d / 365n, "year", "y"), s(d % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
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 f = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), m = Number(i.nanoseconds);
1974
- if (s(f, "second", "s"), t.formatSubMilliseconds)
1975
- s(u, "millisecond", "ms"), s(c, "microsecond", "µs"), s(m, "nanosecond", "ns");
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 = u + c / 1e3 + m / 1e6, w = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, I = y >= 1 ? Math.round(y) : Math.ceil(y), k = w ? y.toFixed(w) : I;
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(k),
2009
+ Number.parseFloat(_),
1980
2010
  "millisecond",
1981
2011
  "ms",
1982
- k
2012
+ _
1983
2013
  );
1984
2014
  }
1985
2015
  } else {
1986
- const f = (r ? Number(e % Ya) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(f, u), m = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
1987
- s(Number.parseFloat(m), "second", "s", m);
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 h = t.colonNotation ? ":" : " ";
1992
- return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
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 ja = process.env.NODE_ENV === "production", za = !ja, qa = za ? "gizmette.local.com" : "gizmette.com", Jo = async () => {
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__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ D("div", { className: "flex items-center justify-between", children: [
2044
- /* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
2045
- /* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
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 ? Fa(e, {
2081
+ }), Fo = (e) => e > 0 ? qa(e, {
2052
2082
  secondsDecimalDigits: 2,
2053
2083
  unitCount: 2
2054
- }) : "N/A", Xa = ({
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
- ), Qa = ({
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
- }, Za = () => !!(window != null && window.__VERSINI_CALLISTO_ELECTRON__), en = () => window.innerWidth < 403, qo = () => {
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 = en(), a = navigator.maxTouchPoints > 1;
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
- }, bt = "av-button", Ue = "icon", rt = "button", Qe = "link", tn = ({
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", d = "max-h-12 py-2 px-4";
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 rt:
2082
- case Qe:
2111
+ case at:
2112
+ case Ze:
2083
2113
  return p({
2084
2114
  [s]: t === "small",
2085
2115
  [i]: t === "medium",
2086
- [d]: t === "large"
2116
+ [c]: t === "large"
2087
2117
  });
2088
- case Ue:
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
- }, rn = ({
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 rt:
2116
- case Qe:
2145
+ case at:
2146
+ case Ze:
2117
2147
  return p({
2118
- "text-center": e === Qe,
2148
+ "text-center": e === Ze,
2119
2149
  [n]: t === "small",
2120
2150
  [o]: t === "medium",
2121
2151
  [s]: t === "large"
2122
2152
  });
2123
- case Ue:
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
- }, an = ({
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
- }, nn = ({
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
- }, on = ({
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
- }), sn = ({
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
- }, cn = ({
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
- }, ln = ({
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
- }, dn = ({
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
- }), un = ({
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
- ), mn = ({
2341
+ ), pn = ({
2312
2342
  animated: e
2313
2343
  }) => p({
2314
2344
  "transition-opacity duration-300 ease-in": e
2315
- }), qt = ({
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: d,
2325
- labelRight: h,
2326
- labelLeft: f,
2327
- noBackground: u,
2328
- variant: c,
2329
- noTruncate: m,
2354
+ noBorder: c,
2355
+ labelRight: f,
2356
+ labelLeft: h,
2357
+ noBackground: m,
2358
+ variant: l,
2359
+ noTruncate: u,
2330
2360
  align: y,
2331
- radius: w,
2332
- animated: I
2333
- }) => (c || (c = "primary"), r ? p(bt, t) : p(
2334
- bt,
2335
- an({
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: c,
2338
- noBackground: u,
2339
- noTruncate: m
2367
+ variant: l,
2368
+ noBackground: m,
2369
+ noTruncate: u
2340
2370
  }),
2341
- nn({ mode: a, noBackground: u, variant: c }),
2342
- on({ radius: w }),
2343
- tn({
2371
+ sn({ mode: a, noBackground: m, variant: l }),
2372
+ cn({ radius: E }),
2373
+ an({
2344
2374
  type: e,
2345
2375
  size: i,
2346
- labelRight: h,
2347
- labelLeft: f,
2376
+ labelRight: f,
2377
+ labelLeft: h,
2348
2378
  align: y,
2349
- animated: I
2379
+ animated: T
2350
2380
  }),
2351
- rn({ type: e, size: i, labelRight: h, labelLeft: f }),
2352
- ln({ mode: a, variant: c, noBorder: d }),
2353
- dn({ focusMode: n }),
2354
- sn({ mode: a, variant: c, disabled: o }),
2355
- cn({ mode: a, variant: c, disabled: o }),
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 === Ue && I
2391
+ "transition-[width] duration-300 ease-in-out": e === Ke && T
2362
2392
  }),
2363
2393
  t
2364
- )), hn = (e, t, r) => {
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
- }, at = X.forwardRef((e, t) => {
2397
+ }, nt = X.forwardRef((e, t) => {
2368
2398
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
2369
- return /* @__PURE__ */ l(
2399
+ return /* @__PURE__ */ d(
2370
2400
  "button",
2371
2401
  {
2372
2402
  ref: t,
2373
2403
  onClick: (o) => {
2374
- hn(o, a, r);
2404
+ fn(o, a, r);
2375
2405
  },
2376
2406
  ...n
2377
2407
  }
2378
2408
  );
2379
2409
  });
2380
- at.displayName = "BaseButton";
2381
- const Xt = X.forwardRef(
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: d = !1,
2392
- variant: h = "primary",
2393
- noTruncate: f = !1,
2394
- radius: u = "large",
2395
- ...c
2396
- }, m) => {
2397
- const y = qt({
2398
- type: rt,
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: d,
2407
- variant: h,
2408
- noTruncate: f,
2409
- radius: u
2436
+ noBorder: c,
2437
+ variant: f,
2438
+ noTruncate: h,
2439
+ radius: m
2410
2440
  });
2411
- return /* @__PURE__ */ l(
2412
- at,
2441
+ return /* @__PURE__ */ d(
2442
+ nt,
2413
2443
  {
2414
- ref: m,
2444
+ ref: u,
2415
2445
  className: y,
2416
2446
  disabled: t,
2417
- ...c,
2447
+ ...l,
2418
2448
  children: e
2419
2449
  }
2420
2450
  );
2421
2451
  }
2422
2452
  );
2423
- Xt.displayName = "Button";
2424
- function pn() {
2425
- const e = x(!1);
2426
- return Y(() => (e.current = !0, () => {
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 fn(e) {
2431
- return De(() => e.every((t) => t == null) ? () => {
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 gn = {
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 Fe(e) {
2449
- const t = pn(), r = x(0), a = x(null), [n, o] = z(gn), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
2450
- const d = i[0];
2451
- d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2452
- a.current && t() && o(d.contentRect);
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 Y(() => (a.current && (s == null || s.observe(a.current, e)), () => {
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 yn = {
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
- }, bn = {
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
- }, En = 2, Oe = X.forwardRef(
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: d = !1,
2484
- "aria-label": h,
2485
- label: f,
2486
- size: u = "medium",
2487
- labelRight: c,
2488
- labelLeft: m,
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: w = "center",
2491
- radius: I = "large",
2492
- variant: k = "primary",
2493
- iconClassName: Q,
2494
- animated: L = !1,
2495
- ...Z
2496
- }, $) => {
2497
- const B = qt({
2498
- type: Ue,
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: d,
2506
- size: u,
2507
- labelRight: c,
2508
- labelLeft: m,
2535
+ noBorder: c,
2536
+ size: m,
2537
+ labelRight: l,
2538
+ labelLeft: u,
2509
2539
  noBackground: y,
2510
- align: w,
2511
- radius: I,
2512
- variant: k,
2513
- animated: L
2514
- }), U = un({ mode: r, raw: i, iconClassName: Q }), S = mn({ animated: L }), [M, K] = Fe(), [T, C] = Fe(), [O, V] = Fe(), g = x(0), E = x(null), b = fn([$, E]);
2515
- return Ne(() => {
2516
- O && O.current && L && (g.current = V.width + bn[u] + (d ? 0 : En));
2517
- }, [V, O, u, d, L]), Ne(() => {
2518
- E && E.current && L && (c && M && K.width > 0 ? (M.current && (M.current.style.opacity = "100"), E.current.style.width = `${K.width + g.current}px`) : m && C.width > 0 ? (T.current && (T.current.style.opacity = "100"), E.current.style.width = `${C.width + g.current}px`) : (M.current && (M.current.style.opacity = "0"), T.current && (T.current.style.opacity = "0"), E.current.style.width = `${yn[u]}px`));
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
- c,
2522
- M,
2523
- C,
2524
- m,
2525
- T,
2551
+ l,
2552
+ S,
2553
+ O,
2526
2554
  u,
2527
- L
2528
- ]), /* @__PURE__ */ D(
2529
- at,
2555
+ w,
2556
+ m,
2557
+ M
2558
+ ]), /* @__PURE__ */ $(
2559
+ nt,
2530
2560
  {
2531
- ref: b,
2532
- className: B,
2561
+ ref: I,
2562
+ className: re,
2533
2563
  disabled: t,
2534
2564
  type: s,
2535
- "aria-label": h || f,
2536
- ...Z,
2565
+ "aria-label": f || h,
2566
+ ...Q,
2537
2567
  children: [
2538
- /* @__PURE__ */ l(
2539
- Et,
2568
+ /* @__PURE__ */ d(
2569
+ Tt,
2540
2570
  {
2541
- label: m,
2542
- labelRef: T,
2543
- labelClass: S,
2571
+ label: u,
2572
+ labelRef: w,
2573
+ labelClass: v,
2544
2574
  labelInnerClass: "pr-2"
2545
2575
  }
2546
2576
  ),
2547
- /* @__PURE__ */ l("span", { ref: O, className: U, children: e }),
2548
- /* @__PURE__ */ l(
2549
- Et,
2577
+ /* @__PURE__ */ d("span", { ref: P, className: U, children: e }),
2578
+ /* @__PURE__ */ d(
2579
+ Tt,
2550
2580
  {
2551
- label: c,
2552
- labelRef: M,
2553
- labelClass: S,
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
- ), Et = ({
2591
+ ), Tt = ({
2562
2592
  labelRef: e,
2563
2593
  labelClass: t,
2564
2594
  label: r,
2565
2595
  labelInnerClass: a
2566
- }) => /* @__PURE__ */ l("span", { ref: e, className: t, children: r && /* @__PURE__ */ l("span", { className: a, children: r }) });
2567
- Oe.displayName = "ButtonIcon";
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 wn = X.forwardRef(
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__ */ l("div", { className: s, children: /* @__PURE__ */ l(
2607
- Oe,
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
- wn.displayName = "ButtonSort";
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 Ae = "av-card";
2634
- function In(e) {
2635
- const t = St();
2663
+ const Re = "av-card";
2664
+ function Sn(e) {
2665
+ const t = Nt();
2636
2666
  return `${e}${t}`;
2637
2667
  }
2638
- const Tn = ({
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
- Ae,
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
- ), d = t || p(`${Ae}__header mt-0 border-b-2`, {
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
- }), h = p(r), f = a || p(`${Ae}__footer pt-2`);
2700
+ }), f = p(r), h = a || p(`${Re}__footer pt-2`);
2671
2701
  return {
2672
2702
  wrapper: i,
2673
- header: d,
2674
- body: h,
2675
- footer: f
2703
+ header: c,
2704
+ body: f,
2705
+ footer: h
2676
2706
  };
2677
2707
  };
2678
- function Sn({
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__ */ l("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ l("div", { className: a, children: t }) : t ? /* @__PURE__ */ l("div", { className: a, id: e, children: t }) : null;
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 _n = ({
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: d = "system",
2696
- compact: h = !1,
2697
- noBorder: f = !1,
2698
- ...u
2725
+ mode: c = "system",
2726
+ compact: f = !1,
2727
+ noBorder: h = !1,
2728
+ ...m
2699
2729
  }) => {
2700
- let c = null, m = null;
2701
- const y = typeof e == "string", w = In(Ae), I = Tn({
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: d,
2707
- compact: h,
2708
- noBorder: f
2736
+ mode: c,
2737
+ compact: f,
2738
+ noBorder: h
2709
2739
  });
2710
- return y ? (c = w, m = c) : !y && e && i ? (c = null, m = i) : !y && e && !i ? (c = w, m = c) : (c = null, m = i || null), /* @__PURE__ */ l("div", { className: I.wrapper, children: /* @__PURE__ */ D(
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
- ...m && {
2714
- "aria-labelledby": m
2743
+ ...u && {
2744
+ "aria-labelledby": u
2715
2745
  },
2716
- className: I.body,
2717
- ...u,
2746
+ className: T.body,
2747
+ ...m,
2718
2748
  children: [
2719
- /* @__PURE__ */ l(
2720
- Sn,
2749
+ /* @__PURE__ */ d(
2750
+ kn,
2721
2751
  {
2722
- ...c && { id: c },
2752
+ ...l && { id: l },
2723
2753
  content: e,
2724
- className: I.header,
2754
+ className: T.header,
2725
2755
  userAriaLabelledby: i
2726
2756
  }
2727
2757
  ),
2728
- /* @__PURE__ */ l("div", { children: n }),
2729
- r ? /* @__PURE__ */ l("div", { className: I.footer, children: r }) : null
2758
+ /* @__PURE__ */ d("div", { children: n }),
2759
+ r ? /* @__PURE__ */ d("div", { className: T.footer, children: r }) : null
2730
2760
  ]
2731
2761
  }
2732
2762
  ) });
2733
- }, Ke = ({
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
- ...d
2772
+ ...c
2743
2773
  }) => {
2744
- const h = p(o, a);
2745
- return /* @__PURE__ */ D(Re, { children: [
2746
- /* @__PURE__ */ l(
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: h,
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
- ...d,
2786
+ ...c,
2757
2787
  children: e
2758
2788
  }
2759
2789
  ),
2760
- s && i && /* @__PURE__ */ l("span", { className: "sr-only", children: s })
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 kn = ({
2806
+ const Rn = ({
2777
2807
  className: e,
2778
2808
  viewBox: t,
2779
2809
  title: r,
2780
2810
  monotone: a,
2781
2811
  ...n
2782
- }) => /* @__PURE__ */ l(
2783
- Ke,
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__ */ l("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
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
- ), An = ({
2823
+ ), Nn = ({
2794
2824
  className: e,
2795
2825
  viewBox: t,
2796
2826
  title: r,
2797
2827
  monotone: a,
2798
2828
  ...n
2799
- }) => /* @__PURE__ */ D(
2800
- Ke,
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__ */ l(
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__ */ l("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
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
- ), Rn = ({
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__ */ D(
2828
- Ke,
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__ */ l(
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__ */ l(
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__ */ l("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" })
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
- }, Nn = ({
2885
+ }, xn = ({
2856
2886
  className: e,
2857
2887
  viewBox: t,
2858
2888
  title: r,
2859
2889
  monotone: a,
2860
2890
  ...n
2861
- }) => /* @__PURE__ */ D(
2862
- Ke,
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__ */ l(
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__ */ l("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" })
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 vn = "av-main", xn = ({
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
- vn,
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__ */ l("main", { className: o, children: e });
2925
- }, Cn = "av-flexgrid", _e = "av-flexgrid-item", Pe = 0.25, Ze = X.createContext({
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
- }), On = ({
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: d = "normal",
2938
- ...h
2967
+ alignVertical: c = "normal",
2968
+ ...f
2939
2969
  }) => {
2940
- const f = {
2970
+ const h = {
2941
2971
  flexDirection: s,
2942
2972
  justifyContent: i,
2943
- alignItems: d,
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 * Pe + "rem",
2952
- marginTop: a * -1 * Pe + "rem"
2953
- }, u = p(
2954
- Cn,
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
- ), c = { columnGap: r, rowGap: a };
2957
- return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(Ze.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: f, ...h, children: /* @__PURE__ */ l(Ze.Provider, { value: c, children: e }) });
2958
- }, je = (e, t) => p({
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
- }), Pn = ({
3061
+ }), Ln = ({
3032
3062
  className: e,
3033
3063
  span: t
3034
3064
  }) => {
3035
3065
  if (!t)
3036
- return p(e, _e, "box-border basis-auto");
3066
+ return p(e, ke, "box-border basis-auto");
3037
3067
  if (typeof t == "number")
3038
- return p(e, _e, "box-border max-w-full", {
3039
- [`${je(t)}`]: !0
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, _e, "box-border basis-auto", {
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" ? je(n) : je(n, a));
3076
+ const r = Object.entries(t).map(([a, n]) => a === "fallback" ? ze(n) : ze(n, a));
3047
3077
  return p(
3048
3078
  e,
3049
- _e,
3079
+ ke,
3050
3080
  "box-border",
3051
3081
  r
3052
3082
  );
3053
3083
  }
3054
- }, re = ({
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 } = Tt(Ze), s = {
3061
- paddingLeft: n * Pe + "rem",
3062
- paddingTop: o * Pe + "rem"
3063
- }, i = Pn({
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__ */ l("div", { className: i, style: s, ...a, children: e });
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 Qt = "av-text-input", Dn = "av-text-input-wrapper", ze = "av-text-input-helper-text";
3083
- function Ln() {
3084
- const e = x(!1);
3085
- return Y(() => (e.current = !0, () => {
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 $n = {
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 Mn(e) {
3100
- const t = Ln(), r = x(0), a = x(null), [n, o] = z($n), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
3101
- const d = i[0];
3102
- d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
3103
- a.current && t() && o(d.contentRect);
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 Y(() => (a.current && (s == null || s.observe(a.current, e)), () => {
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 Un(e) {
3111
- const t = St();
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 Zt = "SET_ANNOUNCEMENT", er = "CLEAR_ANNOUNCEMENT", Kn = {
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
- }, Hn = (e, t) => {
3159
+ }, Bn = (e, t) => {
3130
3160
  switch (t == null ? void 0 : t.type) {
3131
- case Zt:
3161
+ case nr:
3132
3162
  return {
3133
3163
  ...e,
3134
3164
  announcement: t.payload
3135
3165
  };
3136
- case er:
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
- }, Wn = ({
3174
+ }, Vn = ({
3145
3175
  onAnnouncementClear: e,
3146
3176
  dispatch: t
3147
3177
  }) => {
3148
3178
  t({
3149
- type: er
3179
+ type: or
3150
3180
  }), typeof e == "function" && e();
3151
- }, wt = ({
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: Zt,
3189
+ type: nr,
3160
3190
  payload: e
3161
3191
  }), t && (r.current = setTimeout(
3162
- () => Wn({
3192
+ () => Vn({
3163
3193
  onAnnouncementClear: a,
3164
3194
  dispatch: n
3165
3195
  }),
3166
3196
  t
3167
3197
  ));
3168
- }, Bn = ({
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(wt, r, {
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
- }) : wt({
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 tr({
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
- ...d
3230
+ ...c
3201
3231
  }) {
3202
- const h = x(null), f = x(null), [u, c] = It(Hn, {
3232
+ const f = C(null), h = C(null), [m, l] = At(Bn, {
3203
3233
  announcement: null
3204
3234
  });
3205
- let m = r;
3206
- typeof m > "u" && (m = a ? Kn[a] : "assertive"), Y(() => {
3207
- Bn({
3208
- announcementTimeoutRef: h,
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: f,
3242
+ clearAnnouncementTimeoutRef: h,
3213
3243
  onAnnouncementClear: s,
3214
- dispatch: c
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__ */ l(
3255
+ return /* @__PURE__ */ d(
3226
3256
  "div",
3227
3257
  {
3228
- "aria-live": m,
3258
+ "aria-live": u,
3229
3259
  ...a && { role: a },
3230
3260
  className: y,
3231
- ...d,
3232
- children: u.announcement
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 Vn = ({
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
- }), Jn = ({
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
- }), Gn = ({
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
- }), Yn = ({
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
- }, Fn = ({
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
- ze,
3335
+ qe,
3306
3336
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
3307
3337
  );
3308
3338
  if (!e)
3309
- return p(ze, "absolute px-2 font-medium", {
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(ze, "absolute px-2 font-medium", {
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
- }, jn = ({
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: d,
3332
- rightElementClassName: h
3361
+ size: c,
3362
+ rightElementClassName: f
3333
3363
  }) => {
3334
- const f = r ? e : p(
3364
+ const h = r ? e : p(
3335
3365
  "relative flex w-full flex-col justify-center",
3336
- Dn,
3366
+ $n,
3337
3367
  e
3338
3368
  );
3339
- let u = "";
3340
- switch (d) {
3369
+ let m = "";
3370
+ switch (c) {
3341
3371
  case "xs":
3342
- u = "h-8";
3372
+ m = "h-8";
3343
3373
  break;
3344
3374
  case "sm":
3345
- u = "h-10";
3375
+ m = "h-10";
3346
3376
  break;
3347
3377
  case "lg":
3348
- u = "h-14";
3378
+ m = "h-14";
3349
3379
  break;
3350
3380
  case "xl":
3351
- u = "h-16";
3381
+ m = "h-16";
3352
3382
  break;
3353
3383
  default:
3354
- u = "h-12";
3384
+ m = "h-12";
3355
3385
  break;
3356
3386
  }
3357
- const c = r ? p(t) : p(
3358
- Qt,
3359
- u,
3387
+ const l = r ? p(t) : p(
3388
+ ar,
3389
+ m,
3360
3390
  "rounded-md text-base px-4",
3361
- Vn({ mode: s }),
3362
- Jn({ focusMode: i }),
3363
- Gn({ noBorder: n, error: o }),
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
- ), m = r ? void 0 : "sr-only", y = Yn({
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
- }), w = Fn({
3403
+ }), E = zn({
3374
3404
  error: o,
3375
3405
  raw: r,
3376
3406
  mode: s,
3377
3407
  disabled: a
3378
- }), I = r ? void 0 : p("absolute right-3", h);
3408
+ }), T = r ? void 0 : p("absolute right-3", f);
3379
3409
  return {
3380
- wrapper: f,
3381
- input: c,
3382
- accessibleLabel: m,
3410
+ wrapper: h,
3411
+ input: l,
3412
+ accessibleLabel: u,
3383
3413
  visibleLabel: y,
3384
- helperText: w,
3385
- rightElement: I
3414
+ helperText: E,
3415
+ rightElement: T
3386
3416
  };
3387
- }, nt = X.forwardRef(
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: d = "system",
3398
- disabled: h = !1,
3399
- noBorder: f = !1,
3400
- labelId: u,
3401
- labelHidden: c = !1,
3402
- type: m = "text",
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: w,
3405
- rightElementClassName: I,
3406
- size: k = "md",
3407
- ...Q
3408
- }, L) => {
3409
- const [Z, $] = Mn(), [B, U] = z(0), S = Un({ id: e, prefix: `${Qt}-` }), M = `${t} error, ${y}`, K = x(null), T = x(null), C = {
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
- }, O = jn({
3445
+ }, P = qn({
3416
3446
  className: o,
3417
3447
  inputClassName: s,
3418
3448
  error: a,
3419
3449
  raw: n,
3420
- focusMode: d,
3421
- disabled: h,
3422
- noBorder: f,
3450
+ focusMode: c,
3451
+ disabled: f,
3452
+ noBorder: h,
3423
3453
  mode: i,
3424
- size: k,
3425
- rightElementClassName: I
3454
+ size: _,
3455
+ rightElementClassName: T
3426
3456
  });
3427
- return Ne(() => {
3428
- $ && $.width && U($.width + 18 + 10);
3429
- }, [$]), Ne(() => {
3430
- var V, g;
3431
- const { label: E, helperText: b } = C[k];
3432
- (V = K == null ? void 0 : K.current) == null || V.style.setProperty("--av-text-input-label", E), (g = T == null ? void 0 : T.current) == null || g.style.setProperty(
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
- b
3464
+ I
3435
3465
  );
3436
- }, [k]), /* @__PURE__ */ D("div", { className: O.wrapper, children: [
3437
- /* @__PURE__ */ l(
3466
+ }, [_]), /* @__PURE__ */ $("div", { className: P.wrapper, children: [
3467
+ /* @__PURE__ */ d(
3438
3468
  "label",
3439
3469
  {
3440
- htmlFor: S,
3441
- id: u,
3442
- className: O.accessibleLabel,
3470
+ htmlFor: v,
3471
+ id: m,
3472
+ className: P.accessibleLabel,
3443
3473
  children: r
3444
3474
  }
3445
3475
  ),
3446
- /* @__PURE__ */ l(
3476
+ /* @__PURE__ */ d(
3447
3477
  "input",
3448
3478
  {
3449
- ref: L,
3450
- id: S,
3479
+ ref: M,
3480
+ id: v,
3451
3481
  name: t,
3452
- type: m,
3453
- disabled: h,
3482
+ type: u,
3483
+ disabled: f,
3454
3484
  placeholder: n ? void 0 : " ",
3455
- className: O.input,
3456
- ...y && { "aria-describedby": `${S}-helper` },
3485
+ className: P.input,
3486
+ ...y && { "aria-describedby": `${v}-helper` },
3457
3487
  ...a && { "aria-invalid": "true" },
3458
- ...w && !n && { style: { paddingRight: B } },
3459
- ...Q
3488
+ ...E && !n && { style: { paddingRight: re } },
3489
+ ...F
3460
3490
  }
3461
3491
  ),
3462
- !n && !c && /* @__PURE__ */ l(
3492
+ !n && !l && /* @__PURE__ */ d(
3463
3493
  "label",
3464
3494
  {
3465
3495
  ref: K,
3466
3496
  "aria-hidden": !0,
3467
- htmlFor: S,
3468
- className: O.visibleLabel,
3497
+ htmlFor: v,
3498
+ className: P.visibleLabel,
3469
3499
  children: r
3470
3500
  }
3471
3501
  ),
3472
- y && /* @__PURE__ */ l(
3502
+ y && /* @__PURE__ */ d(
3473
3503
  "div",
3474
3504
  {
3475
- ref: T,
3476
- id: `${S}-helper`,
3477
- className: O.helperText,
3505
+ ref: w,
3506
+ id: `${v}-helper`,
3507
+ className: P.helperText,
3478
3508
  children: y
3479
3509
  }
3480
3510
  ),
3481
- w && /* @__PURE__ */ l(
3511
+ E && /* @__PURE__ */ d(
3482
3512
  "div",
3483
3513
  {
3484
- ref: Z,
3485
- className: O.rightElement,
3486
- children: w
3514
+ ref: Q,
3515
+ className: P.rightElement,
3516
+ children: E
3487
3517
  }
3488
3518
  ),
3489
- a && y && /* @__PURE__ */ l(tr, { politeness: "polite", clearAnnouncementDelay: 500, children: M })
3519
+ a && y && /* @__PURE__ */ d(sr, { politeness: "polite", clearAnnouncementDelay: 500, children: S })
3490
3520
  ] });
3491
3521
  }
3492
3522
  );
3493
- nt.displayName = "TextInput";
3494
- function zn(e) {
3495
- return De(() => e.every((t) => t == null) ? () => {
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 qn = 500, Xn = 5e3, Qn = 2e4, rr = X.forwardRef(
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: d,
3513
- rightElement: h,
3514
- ...f
3515
- }, u) => {
3516
- const [c, m] = z(!0), [y, w] = z({
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
- }), I = x(!0), k = x(null), Q = x(null), L = zn([u, Q]), Z = c ? "Show" : "Hide", $ = () => {
3520
- k.current && clearTimeout(k.current), I.current || (k.current = setTimeout(() => {
3521
- I.current = !0, m(!0), w({
3522
- announcementTimeout: Xn,
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
- }, Qn));
3527
- }, B = (T) => {
3528
- T.preventDefault();
3529
- const C = !I.current;
3530
- I.current = C, $(), m(C), w({
3531
- announcementTimeout: qn,
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: C ? "Characters hidden" : "Characters showing"
3534
- }), n && n(C);
3535
- }, U = (T) => {
3536
- var C;
3537
- const { relatedTarget: O } = T, V = (C = Q.current) == null ? void 0 : C.parentElement;
3538
- V != null && V.contains(O) || d && d();
3539
- }, S = (T) => {
3540
- $(), s && s(T), U(T);
3541
- }, M = (T) => {
3542
- $(), i && i(T);
3543
- }, K = (T) => {
3544
- $(), o && o(T);
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 Y(() => () => {
3547
- k.current && clearTimeout(k.current);
3548
- }, []), /* @__PURE__ */ D(Re, { children: [
3549
- /* @__PURE__ */ l(
3550
- nt,
3576
+ return G(() => () => {
3577
+ _.current && clearTimeout(_.current);
3578
+ }, []), /* @__PURE__ */ $(Ne, { children: [
3579
+ /* @__PURE__ */ d(
3580
+ ot,
3551
3581
  {
3552
- ref: L,
3582
+ ref: M,
3553
3583
  name: e,
3554
3584
  label: r,
3555
3585
  labelHidden: a,
3556
- type: c ? "password" : "text",
3586
+ type: l ? "password" : "text",
3557
3587
  disabled: t,
3558
- onBlur: S,
3559
- onFocus: M,
3588
+ onBlur: v,
3589
+ onFocus: S,
3560
3590
  onChange: K,
3561
- rightElement: X.cloneElement(h, {
3562
- ref: u,
3563
- label: Z,
3564
- onClick: B,
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
- ...f
3598
+ ...h
3569
3599
  }
3570
3600
  ),
3571
- /* @__PURE__ */ l(
3572
- tr,
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
- rr.displayName = "TextInputMask";
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 Zn = "ASK! ME! ANYTHING!", ar = "Callisto", eo = "Log in", to = "Sign in with a Passkey", Xo = "Log out", ro = "Password", Qo = "Profile", Zo = "Settings", es = "Chat history", ts = "About", rs = "Type your question here", as = "{{clipboard}}", ns = `Sometimes, ${ar} 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 = {
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
- }, ao = () => /* @__PURE__ */ D("div", { className: "flex items-center justify-center", children: [
3638
- /* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(kn, {}) }),
3639
- /* @__PURE__ */ D("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3640
- /* @__PURE__ */ l("h1", { children: ar }),
3641
- /* @__PURE__ */ l("h2", { children: Zn })
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
- ] }), no = () => {
3644
- const { login: e, logoutReason: t, loginWithPasskey: r } = zt(), [a, n] = z(""), [o, s] = z(""), [i, d] = z(!0), [h, f] = z({
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
- }), u = async (c) => {
3648
- c.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
3677
+ }), m = async (l) => {
3678
+ l.preventDefault(), await e(f.username, f.password) || (s(""), n("Invalid username or password"));
3649
3679
  };
3650
- return Y(() => {
3651
- var c;
3652
- (c = document.getElementById("logo")) == null || c.classList.add("fadeOut"), setTimeout(() => {
3653
- var m;
3654
- (m = document.getElementById("root")) == null || m.classList.replace("app-hidden", "fadeIn");
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
- }), Y(() => {
3686
+ }), G(() => {
3657
3687
  t && s(t);
3658
- }, [t]), /* @__PURE__ */ l(Re, { children: /* @__PURE__ */ D(
3659
- xn,
3688
+ }, [t]), /* @__PURE__ */ d(Ne, { children: /* @__PURE__ */ $(
3689
+ On,
3660
3690
  {
3661
- className: Qa({
3691
+ className: en({
3662
3692
  extraClass: "mt-5"
3663
3693
  }),
3664
3694
  noMargin: !0,
3665
3695
  noPadding: !0,
3666
3696
  children: [
3667
- /* @__PURE__ */ l(
3697
+ /* @__PURE__ */ d(
3668
3698
  "div",
3669
3699
  {
3670
- className: Xa({
3700
+ className: Za({
3671
3701
  extraClass: "rounded-md"
3672
3702
  }),
3673
- children: /* @__PURE__ */ l(ao, {})
3703
+ children: /* @__PURE__ */ d(oo, {})
3674
3704
  }
3675
3705
  ),
3676
- /* @__PURE__ */ l("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ l(On, { alignHorizontal: "center", children: /* @__PURE__ */ l(re, { span: 6, children: /* @__PURE__ */ D(_n, { mode: "dark", children: [
3677
- /* @__PURE__ */ l(re, { span: 12, className: "mt-7", children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
3678
- /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3679
- nt,
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: (c) => {
3691
- f({
3692
- ...h,
3693
- username: c.target.value
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__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3700
- rr,
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: ro,
3711
- rightElement: /* @__PURE__ */ l(
3712
- Oe,
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__ */ l(Nn, {}) : /* @__PURE__ */ l(An, {})
3747
+ children: i ? /* @__PURE__ */ d(xn, {}) : /* @__PURE__ */ d(Nn, {})
3718
3748
  }
3719
3749
  ),
3720
- onMaskChange: d,
3721
- onChange: (c) => {
3722
- f({
3723
- ...h,
3724
- password: c.target.value
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__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3732
- Xt,
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: eo
3770
+ children: ro
3741
3771
  }
3742
3772
  ) }),
3743
- !Za() && /* @__PURE__ */ D(Re, { children: [
3744
- /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
3745
- /* @__PURE__ */ l(re, { span: 12, children: /* @__PURE__ */ l(
3746
- Oe,
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: to,
3783
+ labelRight: ao,
3754
3784
  onClick: r,
3755
- children: /* @__PURE__ */ l(Rn, { size: "size-7" })
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
- }, oo = new URL(document.location.href).searchParams, so = !!oo.get("debug") || !1, io = ir(() => import(
3793
+ }, io = new URL(document.location.href).searchParams, _t = !!io.get("debug") || !1, co = mr(() => import(
3764
3794
  /* webpackChunkName: "LazyApp" */
3765
- "./App.fUQ6Upmp.js"
3766
- ).then((e) => e.App)), co = ({ isComponent: e }) => {
3767
- const { isAuthenticated: t } = zt();
3768
- return t ? /* @__PURE__ */ l(cr, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(io, { isComponent: e }) }) : /* @__PURE__ */ l(no, {});
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 = qa
3772
- }) => /* @__PURE__ */ l(Ua, { clientId: Ka, domain: t, debug: so, children: /* @__PURE__ */ l(co, { isComponent: e }) }), is = ({ domain: e }) => /* @__PURE__ */ l(lo, { isComponent: !0, domain: e });
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
- ar as APP_NAME,
3780
- Xt as C,
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
- On as L,
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
- ao as Logo,
3798
- me as M,
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
- _n as R,
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
- Ke as f,
3818
- nt as fe,
3856
+ He as f,
3857
+ ot as fe,
3819
3858
  Jo as getCurrentGeoLocation,
3820
- Qa as getMainPaddingClass,
3821
- Xa as getMessageContaintWrapperClass,
3822
- Za as isElectron,
3823
- en as isProbablyMobile,
3859
+ en as getMainPaddingClass,
3860
+ Za as getMessageContaintWrapperClass,
3861
+ tn as isElectron,
3862
+ rn as isProbablyMobile,
3824
3863
  qo as isProbablyiPhone,
3825
- re as j,
3826
- Rn as l,
3864
+ ae as j,
3865
+ vn as l,
3827
3866
  Yo as numberFormatter,
3828
3867
  jo as pluralize,
3829
- xn as r,
3830
- Oe as re,
3868
+ On as r,
3869
+ Pe as re,
3831
3870
  Go as renderDataAsList,
3832
- zt as un
3871
+ Zt as un
3833
3872
  };