@versini/sassysaint 1.0.6 → 1.0.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,3466 +0,0 @@
1
- import { jsx as c, jsxs as T, Fragment as ne } from "react/jsx-runtime";
2
- import H, { createContext as Qt, useReducer as ht, useRef as V, useCallback as re, useEffect as z, useContext as pt, useSyncExternalStore as Xt, useId as gt, useMemo as Zt, useState as G, useLayoutEffect as er, lazy as ft, Suspense as yt } from "react";
3
- import f from "clsx";
4
- var tr = Object.defineProperty, rr = (e, t, r) => t in e ? tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ce = (e, t, r) => rr(e, typeof t != "symbol" ? t + "" : t, r);
5
- /*!
6
- @versini/auth-provider v6.0.0
7
- © 2024 gizmette.com
8
- */
9
- try {
10
- window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
11
- version: "6.0.0",
12
- buildTime: "07/15/2024 12:46 PM EDT",
13
- homepage: "https://github.com/aversini/auth-client",
14
- license: "MIT"
15
- });
16
- } catch {
17
- }
18
- function M(e) {
19
- const t = new Uint8Array(e);
20
- let r = "";
21
- for (const a of t)
22
- r += String.fromCharCode(a);
23
- return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
24
- }
25
- function be(e) {
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
- for (let i = 0; i < n.length; i++)
28
- s[i] = n.charCodeAt(i);
29
- return o;
30
- }
31
- function We() {
32
- return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
33
- }
34
- function bt(e) {
35
- const { id: t } = e;
36
- return {
37
- ...e,
38
- id: be(t),
39
- transports: e.transports
40
- };
41
- }
42
- function Et(e) {
43
- return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
44
- }
45
- let S = class extends Error {
46
- constructor({ message: t, code: r, cause: a, name: n }) {
47
- super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
48
- }
49
- };
50
- function ar({ error: e, options: t }) {
51
- var r, a;
52
- const { publicKey: n } = t;
53
- if (!n)
54
- throw Error("options was missing required publicKey property");
55
- if (e.name === "AbortError") {
56
- if (t.signal instanceof AbortSignal)
57
- return new S({
58
- message: "Registration ceremony was sent an abort signal",
59
- code: "ERROR_CEREMONY_ABORTED",
60
- cause: e
61
- });
62
- } else if (e.name === "ConstraintError") {
63
- if (((r = n.authenticatorSelection) == null ? void 0 : r.requireResidentKey) === !0)
64
- return new S({
65
- message: "Discoverable credentials were required but no available authenticator supported it",
66
- code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
67
- cause: e
68
- });
69
- if (((a = n.authenticatorSelection) == null ? void 0 : a.userVerification) === "required")
70
- return new S({
71
- message: "User verification was required but no available authenticator supported it",
72
- code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
73
- cause: e
74
- });
75
- } else {
76
- if (e.name === "InvalidStateError")
77
- return new S({
78
- message: "The authenticator was previously registered",
79
- code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
80
- cause: e
81
- });
82
- if (e.name === "NotAllowedError")
83
- return new S({
84
- message: e.message,
85
- code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
86
- cause: e
87
- });
88
- if (e.name === "NotSupportedError")
89
- return n.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new S({
90
- message: 'No entry in pubKeyCredParams was of type "public-key"',
91
- code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
92
- cause: e
93
- }) : new S({
94
- message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
95
- code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
96
- cause: e
97
- });
98
- if (e.name === "SecurityError") {
99
- const o = window.location.hostname;
100
- if (Et(o)) {
101
- if (n.rp.id !== o)
102
- return new S({
103
- message: `The RP ID "${n.rp.id}" is invalid for this domain`,
104
- code: "ERROR_INVALID_RP_ID",
105
- cause: e
106
- });
107
- } else return new S({
108
- message: `${window.location.hostname} is an invalid domain`,
109
- code: "ERROR_INVALID_DOMAIN",
110
- cause: e
111
- });
112
- } else if (e.name === "TypeError") {
113
- if (n.user.id.byteLength < 1 || n.user.id.byteLength > 64)
114
- return new S({
115
- message: "User ID was not between 1 and 64 characters",
116
- code: "ERROR_INVALID_USER_ID_LENGTH",
117
- cause: e
118
- });
119
- } else if (e.name === "UnknownError")
120
- return new S({
121
- message: "The authenticator was unable to process the specified options, or could not create a new credential",
122
- code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
123
- cause: e
124
- });
125
- }
126
- return e;
127
- }
128
- class nr {
129
- createNewAbortSignal() {
130
- if (this.controller) {
131
- const r = new Error("Cancelling existing WebAuthn API call for new one");
132
- r.name = "AbortError", this.controller.abort(r);
133
- }
134
- const t = new AbortController();
135
- return this.controller = t, t.signal;
136
- }
137
- cancelCeremony() {
138
- if (this.controller) {
139
- const t = new Error("Manually cancelling existing WebAuthn API call");
140
- t.name = "AbortError", this.controller.abort(t), this.controller = void 0;
141
- }
142
- }
143
- }
144
- const wt = new nr(), or = ["cross-platform", "platform"];
145
- function Tt(e) {
146
- if (e && !(or.indexOf(e) < 0))
147
- return e;
148
- }
149
- async function sr(e) {
150
- var t;
151
- if (!We())
152
- throw new Error("WebAuthn is not supported in this browser");
153
- const r = { publicKey: {
154
- ...e,
155
- challenge: be(e.challenge),
156
- user: {
157
- ...e.user,
158
- id: be(e.user.id)
159
- },
160
- excludeCredentials: (t = e.excludeCredentials) == null ? void 0 : t.map(bt)
161
- } };
162
- r.signal = wt.createNewAbortSignal();
163
- let a;
164
- try {
165
- a = await navigator.credentials.create(r);
166
- } catch (l) {
167
- throw ar({ error: l, options: r });
168
- }
169
- if (!a)
170
- throw new Error("Registration was not completed");
171
- const { id: n, rawId: o, response: s, type: i } = a;
172
- let h;
173
- typeof s.getTransports == "function" && (h = s.getTransports());
174
- let u;
175
- if (typeof s.getPublicKeyAlgorithm == "function")
176
- try {
177
- u = s.getPublicKeyAlgorithm();
178
- } catch (l) {
179
- Oe("getPublicKeyAlgorithm()", l);
180
- }
181
- let d;
182
- if (typeof s.getPublicKey == "function")
183
- try {
184
- const l = s.getPublicKey();
185
- l !== null && (d = M(l));
186
- } catch (l) {
187
- Oe("getPublicKey()", l);
188
- }
189
- let p;
190
- if (typeof s.getAuthenticatorData == "function")
191
- try {
192
- p = M(s.getAuthenticatorData());
193
- } catch (l) {
194
- Oe("getAuthenticatorData()", l);
195
- }
196
- return {
197
- id: n,
198
- rawId: M(o),
199
- response: {
200
- attestationObject: M(s.attestationObject),
201
- clientDataJSON: M(s.clientDataJSON),
202
- transports: h,
203
- publicKeyAlgorithm: u,
204
- publicKey: d,
205
- authenticatorData: p
206
- },
207
- type: i,
208
- clientExtensionResults: a.getClientExtensionResults(),
209
- authenticatorAttachment: Tt(a.authenticatorAttachment)
210
- };
211
- }
212
- function Oe(e, t) {
213
- console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
214
- `, t);
215
- }
216
- function ir() {
217
- if (!We())
218
- return new Promise((t) => t(!1));
219
- const e = window.PublicKeyCredential;
220
- return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
221
- }
222
- function cr({ error: e, options: t }) {
223
- const { publicKey: r } = t;
224
- if (!r)
225
- throw Error("options was missing required publicKey property");
226
- if (e.name === "AbortError") {
227
- if (t.signal instanceof AbortSignal)
228
- return new S({
229
- message: "Authentication ceremony was sent an abort signal",
230
- code: "ERROR_CEREMONY_ABORTED",
231
- cause: e
232
- });
233
- } else {
234
- if (e.name === "NotAllowedError")
235
- return new S({
236
- message: e.message,
237
- code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
238
- cause: e
239
- });
240
- if (e.name === "SecurityError") {
241
- const a = window.location.hostname;
242
- if (Et(a)) {
243
- if (r.rpId !== a)
244
- return new S({
245
- message: `The RP ID "${r.rpId}" is invalid for this domain`,
246
- code: "ERROR_INVALID_RP_ID",
247
- cause: e
248
- });
249
- } else return new S({
250
- message: `${window.location.hostname} is an invalid domain`,
251
- code: "ERROR_INVALID_DOMAIN",
252
- cause: e
253
- });
254
- } else if (e.name === "UnknownError")
255
- return new S({
256
- message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
257
- code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
258
- cause: e
259
- });
260
- }
261
- return e;
262
- }
263
- async function lr(e, t = !1) {
264
- var r, a;
265
- if (!We())
266
- throw new Error("WebAuthn is not supported in this browser");
267
- let n;
268
- ((r = e.allowCredentials) == null ? void 0 : r.length) !== 0 && (n = (a = e.allowCredentials) == null ? void 0 : a.map(bt));
269
- const o = {
270
- ...e,
271
- challenge: be(e.challenge),
272
- allowCredentials: n
273
- }, s = {};
274
- if (t) {
275
- if (!await ir())
276
- throw Error("Browser does not support WebAuthn autofill");
277
- if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
278
- throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
279
- s.mediation = "conditional", o.allowCredentials = [];
280
- }
281
- s.publicKey = o, s.signal = wt.createNewAbortSignal();
282
- let i;
283
- try {
284
- i = await navigator.credentials.get(s);
285
- } catch (m) {
286
- throw cr({ error: m, options: s });
287
- }
288
- if (!i)
289
- throw new Error("Authentication was not completed");
290
- const { id: h, rawId: u, response: d, type: p } = i;
291
- let l;
292
- return d.userHandle && (l = M(d.userHandle)), {
293
- id: h,
294
- rawId: M(u),
295
- response: {
296
- authenticatorData: M(d.authenticatorData),
297
- clientDataJSON: M(d.clientDataJSON),
298
- signature: M(d.signature),
299
- userHandle: l
300
- },
301
- type: p,
302
- clientExtensionResults: i.getClientExtensionResults(),
303
- authenticatorAttachment: Tt(i.authenticatorAttachment)
304
- };
305
- }
306
- /*!
307
- @versini/auth-common v2.12.1
308
- © 2024 gizmette.com
309
- */
310
- try {
311
- window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
312
- version: "2.12.1",
313
- buildTime: "07/15/2024 12:46 PM EDT",
314
- homepage: "https://github.com/aversini/auth-client",
315
- license: "MIT"
316
- });
317
- } catch {
318
- }
319
- const q = {
320
- ID_TOKEN: "id_token",
321
- ACCESS_TOKEN: "token",
322
- ID_AND_ACCESS_TOKEN: "id_token token",
323
- CODE: "code",
324
- REFRESH_TOKEN: "refresh_token",
325
- PASSKEY: "passkey"
326
- }, It = {
327
- CLIENT_ID: "X-Auth-ClientId"
328
- }, R = {
329
- ALG: "RS256",
330
- USER_ID_KEY: "sub",
331
- TOKEN_ID_KEY: "__raw",
332
- NONCE_KEY: "_nonce",
333
- USERNAME_KEY: "username",
334
- AUTH_TYPE_KEY: "auth_type",
335
- ISSUER: "gizmette.com"
336
- }, dr = `-----BEGIN PUBLIC KEY-----
337
- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
338
- w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
339
- i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
340
- aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
341
- l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
342
- sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
343
- awIDAQAB
344
- -----END PUBLIC KEY-----`, Ie = {
345
- AUTHENTICATE: "authenticate",
346
- CODE: "code",
347
- LOGOUT: "logout"
348
- }, ve = crypto, vt = (e) => e instanceof CryptoKey, oe = new TextEncoder(), Ae = new TextDecoder();
349
- function ur(...e) {
350
- const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
351
- let a = 0;
352
- for (const n of e)
353
- r.set(n, a), a += n.length;
354
- return r;
355
- }
356
- const mr = (e) => {
357
- const t = atob(e), r = new Uint8Array(t.length);
358
- for (let a = 0; a < t.length; a++)
359
- r[a] = t.charCodeAt(a);
360
- return r;
361
- }, ge = (e) => {
362
- let t = e;
363
- t instanceof Uint8Array && (t = Ae.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
364
- try {
365
- return mr(t);
366
- } catch {
367
- throw new TypeError("The input to be decoded is not correctly encoded.");
368
- }
369
- };
370
- let W = class extends Error {
371
- static get code() {
372
- return "ERR_JOSE_GENERIC";
373
- }
374
- constructor(t) {
375
- var r;
376
- super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
377
- }
378
- }, L = class extends W {
379
- static get code() {
380
- return "ERR_JWT_CLAIM_VALIDATION_FAILED";
381
- }
382
- constructor(t, r, a = "unspecified", n = "unspecified") {
383
- super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
384
- }
385
- };
386
- class Qe extends W {
387
- static get code() {
388
- return "ERR_JWT_EXPIRED";
389
- }
390
- constructor(t, r, a = "unspecified", n = "unspecified") {
391
- super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
392
- }
393
- }
394
- class hr extends W {
395
- constructor() {
396
- super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
397
- }
398
- static get code() {
399
- return "ERR_JOSE_ALG_NOT_ALLOWED";
400
- }
401
- }
402
- let B = class extends W {
403
- constructor() {
404
- super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
405
- }
406
- static get code() {
407
- return "ERR_JOSE_NOT_SUPPORTED";
408
- }
409
- }, A = class extends W {
410
- constructor() {
411
- super(...arguments), this.code = "ERR_JWS_INVALID";
412
- }
413
- static get code() {
414
- return "ERR_JWS_INVALID";
415
- }
416
- }, At = class extends W {
417
- constructor() {
418
- super(...arguments), this.code = "ERR_JWT_INVALID";
419
- }
420
- static get code() {
421
- return "ERR_JWT_INVALID";
422
- }
423
- };
424
- class pr extends W {
425
- constructor() {
426
- super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
427
- }
428
- static get code() {
429
- return "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
430
- }
431
- }
432
- function U(e, t = "algorithm.name") {
433
- return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
434
- }
435
- function se(e, t) {
436
- return e.name === t;
437
- }
438
- function Pe(e) {
439
- return parseInt(e.name.slice(4), 10);
440
- }
441
- function gr(e) {
442
- switch (e) {
443
- case "ES256":
444
- return "P-256";
445
- case "ES384":
446
- return "P-384";
447
- case "ES512":
448
- return "P-521";
449
- default:
450
- throw new Error("unreachable");
451
- }
452
- }
453
- function fr(e, t) {
454
- if (t.length && !t.some((r) => e.usages.includes(r))) {
455
- let r = "CryptoKey does not support this operation, its usages must include ";
456
- if (t.length > 2) {
457
- const a = t.pop();
458
- r += `one of ${t.join(", ")}, or ${a}.`;
459
- } else t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
460
- throw new TypeError(r);
461
- }
462
- }
463
- function yr(e, t, ...r) {
464
- switch (t) {
465
- case "HS256":
466
- case "HS384":
467
- case "HS512": {
468
- if (!se(e.algorithm, "HMAC"))
469
- throw U("HMAC");
470
- const a = parseInt(t.slice(2), 10);
471
- if (Pe(e.algorithm.hash) !== a)
472
- throw U(`SHA-${a}`, "algorithm.hash");
473
- break;
474
- }
475
- case "RS256":
476
- case "RS384":
477
- case "RS512": {
478
- if (!se(e.algorithm, "RSASSA-PKCS1-v1_5"))
479
- throw U("RSASSA-PKCS1-v1_5");
480
- const a = parseInt(t.slice(2), 10);
481
- if (Pe(e.algorithm.hash) !== a)
482
- throw U(`SHA-${a}`, "algorithm.hash");
483
- break;
484
- }
485
- case "PS256":
486
- case "PS384":
487
- case "PS512": {
488
- if (!se(e.algorithm, "RSA-PSS"))
489
- throw U("RSA-PSS");
490
- const a = parseInt(t.slice(2), 10);
491
- if (Pe(e.algorithm.hash) !== a)
492
- throw U(`SHA-${a}`, "algorithm.hash");
493
- break;
494
- }
495
- case "EdDSA": {
496
- if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
497
- throw U("Ed25519 or Ed448");
498
- break;
499
- }
500
- case "ES256":
501
- case "ES384":
502
- case "ES512": {
503
- if (!se(e.algorithm, "ECDSA"))
504
- throw U("ECDSA");
505
- const a = gr(t);
506
- if (e.algorithm.namedCurve !== a)
507
- throw U(a, "algorithm.namedCurve");
508
- break;
509
- }
510
- default:
511
- throw new TypeError("CryptoKey does not support this operation");
512
- }
513
- fr(e, r);
514
- }
515
- function kt(e, t, ...r) {
516
- var a;
517
- if (r.length > 2) {
518
- const n = r.pop();
519
- e += `one of type ${r.join(", ")}, or ${n}.`;
520
- } else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
521
- 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;
522
- }
523
- const Xe = (e, ...t) => kt("Key must be ", e, ...t);
524
- function St(e, t, ...r) {
525
- return kt(`Key for the ${e} algorithm must be `, t, ...r);
526
- }
527
- const _t = (e) => vt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ee = ["CryptoKey"], br = (...e) => {
528
- const t = e.filter(Boolean);
529
- if (t.length === 0 || t.length === 1)
530
- return !0;
531
- let r;
532
- for (const a of t) {
533
- const n = Object.keys(a);
534
- if (!r || r.size === 0) {
535
- r = new Set(n);
536
- continue;
537
- }
538
- for (const o of n) {
539
- if (r.has(o))
540
- return !1;
541
- r.add(o);
542
- }
543
- }
544
- return !0;
545
- };
546
- function Er(e) {
547
- return typeof e == "object" && e !== null;
548
- }
549
- function Ge(e) {
550
- if (!Er(e) || Object.prototype.toString.call(e) !== "[object Object]")
551
- return !1;
552
- if (Object.getPrototypeOf(e) === null)
553
- return !0;
554
- let t = e;
555
- for (; Object.getPrototypeOf(t) !== null; )
556
- t = Object.getPrototypeOf(t);
557
- return Object.getPrototypeOf(e) === t;
558
- }
559
- const wr = (e, t) => {
560
- if (e.startsWith("RS") || e.startsWith("PS")) {
561
- const { modulusLength: r } = t.algorithm;
562
- if (typeof r != "number" || r < 2048)
563
- throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
564
- }
565
- };
566
- function Tr(e) {
567
- let t, r;
568
- switch (e.kty) {
569
- case "RSA": {
570
- switch (e.alg) {
571
- case "PS256":
572
- case "PS384":
573
- case "PS512":
574
- t = { name: "RSA-PSS", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
575
- break;
576
- case "RS256":
577
- case "RS384":
578
- case "RS512":
579
- t = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
580
- break;
581
- case "RSA-OAEP":
582
- case "RSA-OAEP-256":
583
- case "RSA-OAEP-384":
584
- case "RSA-OAEP-512":
585
- t = {
586
- name: "RSA-OAEP",
587
- hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}`
588
- }, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
589
- break;
590
- default:
591
- throw new B('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
592
- }
593
- break;
594
- }
595
- case "EC": {
596
- switch (e.alg) {
597
- case "ES256":
598
- t = { name: "ECDSA", namedCurve: "P-256" }, r = e.d ? ["sign"] : ["verify"];
599
- break;
600
- case "ES384":
601
- t = { name: "ECDSA", namedCurve: "P-384" }, r = e.d ? ["sign"] : ["verify"];
602
- break;
603
- case "ES512":
604
- t = { name: "ECDSA", namedCurve: "P-521" }, r = e.d ? ["sign"] : ["verify"];
605
- break;
606
- case "ECDH-ES":
607
- case "ECDH-ES+A128KW":
608
- case "ECDH-ES+A192KW":
609
- case "ECDH-ES+A256KW":
610
- t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
611
- break;
612
- default:
613
- throw new B('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
614
- }
615
- break;
616
- }
617
- case "OKP": {
618
- switch (e.alg) {
619
- case "EdDSA":
620
- t = { name: e.crv }, r = e.d ? ["sign"] : ["verify"];
621
- break;
622
- case "ECDH-ES":
623
- case "ECDH-ES+A128KW":
624
- case "ECDH-ES+A192KW":
625
- case "ECDH-ES+A256KW":
626
- t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
627
- break;
628
- default:
629
- throw new B('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
630
- }
631
- break;
632
- }
633
- default:
634
- throw new B('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
635
- }
636
- return { algorithm: t, keyUsages: r };
637
- }
638
- const Ir = async (e) => {
639
- if (!e.alg)
640
- throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
641
- const { algorithm: t, keyUsages: r } = Tr(e), a = [
642
- t,
643
- e.ext ?? !1,
644
- e.key_ops ?? r
645
- ], n = { ...e };
646
- return delete n.alg, delete n.use, ve.subtle.importKey("jwk", n, ...a);
647
- }, Rt = (e) => ge(e);
648
- let De, $e;
649
- const Nt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xt = async (e, t, r, a) => {
650
- let n = e.get(t);
651
- if (n != null && n[a])
652
- return n[a];
653
- const o = await Ir({ ...r, alg: a });
654
- return n ? n[a] = o : e.set(t, { [a]: o }), o;
655
- }, vr = (e, t) => {
656
- if (Nt(e)) {
657
- let r = e.export({ format: "jwk" });
658
- return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Rt(r.k) : ($e || ($e = /* @__PURE__ */ new WeakMap()), xt($e, e, r, t));
659
- }
660
- return e;
661
- }, Ar = (e, t) => {
662
- if (Nt(e)) {
663
- let r = e.export({ format: "jwk" });
664
- return r.k ? Rt(r.k) : (De || (De = /* @__PURE__ */ new WeakMap()), xt(De, e, r, t));
665
- }
666
- return e;
667
- }, kr = { normalizePublicKey: vr, normalizePrivateKey: Ar }, K = (e, t, r = 0) => {
668
- r === 0 && (t.unshift(t.length), t.unshift(6));
669
- const a = e.indexOf(t[0], r);
670
- if (a === -1)
671
- return !1;
672
- const n = e.subarray(a, a + t.length);
673
- return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || K(e, t, a + 1);
674
- }, Ze = (e) => {
675
- switch (!0) {
676
- case K(e, [42, 134, 72, 206, 61, 3, 1, 7]):
677
- return "P-256";
678
- case K(e, [43, 129, 4, 0, 34]):
679
- return "P-384";
680
- case K(e, [43, 129, 4, 0, 35]):
681
- return "P-521";
682
- case K(e, [43, 101, 110]):
683
- return "X25519";
684
- case K(e, [43, 101, 111]):
685
- return "X448";
686
- case K(e, [43, 101, 112]):
687
- return "Ed25519";
688
- case K(e, [43, 101, 113]):
689
- return "Ed448";
690
- default:
691
- throw new B("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
692
- }
693
- }, Sr = async (e, t, r, a, n) => {
694
- let o, s;
695
- const i = new Uint8Array(atob(r.replace(e, "")).split("").map((h) => h.charCodeAt(0)));
696
- switch (a) {
697
- case "PS256":
698
- case "PS384":
699
- case "PS512":
700
- o = { name: "RSA-PSS", hash: `SHA-${a.slice(-3)}` }, s = ["verify"];
701
- break;
702
- case "RS256":
703
- case "RS384":
704
- case "RS512":
705
- o = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${a.slice(-3)}` }, s = ["verify"];
706
- break;
707
- case "RSA-OAEP":
708
- case "RSA-OAEP-256":
709
- case "RSA-OAEP-384":
710
- case "RSA-OAEP-512":
711
- o = {
712
- name: "RSA-OAEP",
713
- hash: `SHA-${parseInt(a.slice(-3), 10) || 1}`
714
- }, s = ["encrypt", "wrapKey"];
715
- break;
716
- case "ES256":
717
- o = { name: "ECDSA", namedCurve: "P-256" }, s = ["verify"];
718
- break;
719
- case "ES384":
720
- o = { name: "ECDSA", namedCurve: "P-384" }, s = ["verify"];
721
- break;
722
- case "ES512":
723
- o = { name: "ECDSA", namedCurve: "P-521" }, s = ["verify"];
724
- break;
725
- case "ECDH-ES":
726
- case "ECDH-ES+A128KW":
727
- case "ECDH-ES+A192KW":
728
- case "ECDH-ES+A256KW": {
729
- const h = Ze(i);
730
- o = h.startsWith("P-") ? { name: "ECDH", namedCurve: h } : { name: h }, s = [];
731
- break;
732
- }
733
- case "EdDSA":
734
- o = { name: Ze(i) }, s = ["verify"];
735
- break;
736
- default:
737
- throw new B('Invalid or unsupported "alg" (Algorithm) value');
738
- }
739
- return ve.subtle.importKey(t, i, o, !1, s);
740
- }, _r = (e, t, r) => Sr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
741
- async function Rr(e, t, r) {
742
- if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
743
- throw new TypeError('"spki" must be SPKI formatted string');
744
- return _r(e, t);
745
- }
746
- const fe = (e) => e == null ? void 0 : e[Symbol.toStringTag], Nr = (e, t) => {
747
- if (!(t instanceof Uint8Array)) {
748
- if (!_t(t))
749
- throw new TypeError(St(e, t, ...Ee, "Uint8Array"));
750
- if (t.type !== "secret")
751
- throw new TypeError(`${fe(t)} instances for symmetric algorithms must be of type "secret"`);
752
- }
753
- }, xr = (e, t, r) => {
754
- if (!_t(t))
755
- throw new TypeError(St(e, t, ...Ee));
756
- if (t.type === "secret")
757
- throw new TypeError(`${fe(t)} instances for asymmetric algorithms must not be of type "secret"`);
758
- if (t.algorithm && r === "verify" && t.type === "private")
759
- throw new TypeError(`${fe(t)} instances for asymmetric algorithm verifying must be of type "public"`);
760
- if (t.algorithm && r === "encrypt" && t.type === "private")
761
- throw new TypeError(`${fe(t)} instances for asymmetric algorithm encryption must be of type "public"`);
762
- }, Cr = (e, t, r) => {
763
- e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Nr(e, t) : xr(e, t, r);
764
- };
765
- function Or(e, t, r, a, n) {
766
- if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
767
- throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
768
- if (!a || a.crit === void 0)
769
- return /* @__PURE__ */ new Set();
770
- if (!Array.isArray(a.crit) || a.crit.length === 0 || a.crit.some((s) => typeof s != "string" || s.length === 0))
771
- throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
772
- let o;
773
- r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
774
- for (const s of a.crit) {
775
- if (!o.has(s))
776
- throw new B(`Extension Header Parameter "${s}" is not recognized`);
777
- if (n[s] === void 0)
778
- throw new e(`Extension Header Parameter "${s}" is missing`);
779
- if (o.get(s) && a[s] === void 0)
780
- throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`);
781
- }
782
- return new Set(a.crit);
783
- }
784
- const Pr = (e, t) => {
785
- if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
786
- throw new TypeError(`"${e}" option must be an array of strings`);
787
- if (t)
788
- return new Set(t);
789
- };
790
- function Dr(e, t) {
791
- const r = `SHA-${e.slice(-3)}`;
792
- switch (e) {
793
- case "HS256":
794
- case "HS384":
795
- case "HS512":
796
- return { hash: r, name: "HMAC" };
797
- case "PS256":
798
- case "PS384":
799
- case "PS512":
800
- return { hash: r, name: "RSA-PSS", saltLength: e.slice(-3) >> 3 };
801
- case "RS256":
802
- case "RS384":
803
- case "RS512":
804
- return { hash: r, name: "RSASSA-PKCS1-v1_5" };
805
- case "ES256":
806
- case "ES384":
807
- case "ES512":
808
- return { hash: r, name: "ECDSA", namedCurve: t.namedCurve };
809
- case "EdDSA":
810
- return { name: t.name };
811
- default:
812
- throw new B(`alg ${e} is not supported either by JOSE or your javascript runtime`);
813
- }
814
- }
815
- async function $r(e, t, r) {
816
- if (t = await kr.normalizePublicKey(t, e), vt(t))
817
- return yr(t, e, r), t;
818
- if (t instanceof Uint8Array) {
819
- if (!e.startsWith("HS"))
820
- throw new TypeError(Xe(t, ...Ee));
821
- return ve.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
822
- }
823
- throw new TypeError(Xe(t, ...Ee, "Uint8Array"));
824
- }
825
- const Lr = async (e, t, r, a) => {
826
- const n = await $r(e, t, "verify");
827
- wr(e, n);
828
- const o = Dr(e, n.algorithm);
829
- try {
830
- return await ve.subtle.verify(o, n, r, a);
831
- } catch {
832
- return !1;
833
- }
834
- };
835
- async function Mr(e, t, r) {
836
- if (!Ge(e))
837
- throw new A("Flattened JWS must be an object");
838
- if (e.protected === void 0 && e.header === void 0)
839
- throw new A('Flattened JWS must have either of the "protected" or "header" members');
840
- if (e.protected !== void 0 && typeof e.protected != "string")
841
- throw new A("JWS Protected Header incorrect type");
842
- if (e.payload === void 0)
843
- throw new A("JWS Payload missing");
844
- if (typeof e.signature != "string")
845
- throw new A("JWS Signature missing or incorrect type");
846
- if (e.header !== void 0 && !Ge(e.header))
847
- throw new A("JWS Unprotected Header incorrect type");
848
- let a = {};
849
- if (e.protected)
850
- try {
851
- const y = ge(e.protected);
852
- a = JSON.parse(Ae.decode(y));
853
- } catch {
854
- throw new A("JWS Protected Header is invalid");
855
- }
856
- if (!br(a, e.header))
857
- throw new A("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
858
- const n = {
859
- ...a,
860
- ...e.header
861
- }, o = Or(A, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
862
- let s = !0;
863
- if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
864
- throw new A('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
865
- const { alg: i } = n;
866
- if (typeof i != "string" || !i)
867
- throw new A('JWS "alg" (Algorithm) Header Parameter missing or invalid');
868
- const h = r && Pr("algorithms", r.algorithms);
869
- if (h && !h.has(i))
870
- throw new hr('"alg" (Algorithm) Header Parameter value not allowed');
871
- if (s) {
872
- if (typeof e.payload != "string")
873
- throw new A("JWS Payload must be a string");
874
- } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
875
- throw new A("JWS Payload must be a string or an Uint8Array instance");
876
- let u = !1;
877
- typeof t == "function" && (t = await t(a, e), u = !0), Cr(i, t, "verify");
878
- const d = ur(oe.encode(e.protected ?? ""), oe.encode("."), typeof e.payload == "string" ? oe.encode(e.payload) : e.payload);
879
- let p;
880
- try {
881
- p = ge(e.signature);
882
- } catch {
883
- throw new A("Failed to base64url decode the signature");
884
- }
885
- if (!await Lr(i, t, p, d))
886
- throw new pr();
887
- let l;
888
- if (s)
889
- try {
890
- l = ge(e.payload);
891
- } catch {
892
- throw new A("Failed to base64url decode the payload");
893
- }
894
- else typeof e.payload == "string" ? l = oe.encode(e.payload) : l = e.payload;
895
- const m = { payload: l };
896
- return e.protected !== void 0 && (m.protectedHeader = a), e.header !== void 0 && (m.unprotectedHeader = e.header), u ? { ...m, key: t } : m;
897
- }
898
- async function Ur(e, t, r) {
899
- if (e instanceof Uint8Array && (e = Ae.decode(e)), typeof e != "string")
900
- throw new A("Compact JWS must be a string or Uint8Array");
901
- const { 0: a, 1: n, 2: o, length: s } = e.split(".");
902
- if (s !== 3)
903
- throw new A("Invalid Compact JWS");
904
- const i = await Mr({ payload: n, protected: a, signature: o }, t, r), h = { payload: i.payload, protectedHeader: i.protectedHeader };
905
- return typeof t == "function" ? { ...h, key: i.key } : h;
906
- }
907
- const Hr = (e) => Math.floor(e.getTime() / 1e3), Ct = 60, Ot = Ct * 60, Ye = Ot * 24, Kr = Ye * 7, Br = Ye * 365.25, Gr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, et = (e) => {
908
- const t = Gr.exec(e);
909
- if (!t || t[4] && t[1])
910
- throw new TypeError("Invalid time period format");
911
- const r = parseFloat(t[2]), a = t[3].toLowerCase();
912
- let n;
913
- switch (a) {
914
- case "sec":
915
- case "secs":
916
- case "second":
917
- case "seconds":
918
- case "s":
919
- n = Math.round(r);
920
- break;
921
- case "minute":
922
- case "minutes":
923
- case "min":
924
- case "mins":
925
- case "m":
926
- n = Math.round(r * Ct);
927
- break;
928
- case "hour":
929
- case "hours":
930
- case "hr":
931
- case "hrs":
932
- case "h":
933
- n = Math.round(r * Ot);
934
- break;
935
- case "day":
936
- case "days":
937
- case "d":
938
- n = Math.round(r * Ye);
939
- break;
940
- case "week":
941
- case "weeks":
942
- case "w":
943
- n = Math.round(r * Kr);
944
- break;
945
- default:
946
- n = Math.round(r * Br);
947
- break;
948
- }
949
- return t[1] === "-" || t[4] === "ago" ? -n : n;
950
- }, tt = (e) => e.toLowerCase().replace(/^application\//, ""), Vr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, Wr = (e, t, r = {}) => {
951
- let a;
952
- try {
953
- a = JSON.parse(Ae.decode(t));
954
- } catch {
955
- }
956
- if (!Ge(a))
957
- throw new At("JWT Claims Set must be a top-level JSON object");
958
- const { typ: n } = r;
959
- if (n && (typeof e.typ != "string" || tt(e.typ) !== tt(n)))
960
- throw new L('unexpected "typ" JWT header value', a, "typ", "check_failed");
961
- const { requiredClaims: o = [], issuer: s, subject: i, audience: h, maxTokenAge: u } = r, d = [...o];
962
- u !== void 0 && d.push("iat"), h !== void 0 && d.push("aud"), i !== void 0 && d.push("sub"), s !== void 0 && d.push("iss");
963
- for (const y of new Set(d.reverse()))
964
- if (!(y in a))
965
- throw new L(`missing required "${y}" claim`, a, y, "missing");
966
- if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
967
- throw new L('unexpected "iss" claim value', a, "iss", "check_failed");
968
- if (i && a.sub !== i)
969
- throw new L('unexpected "sub" claim value', a, "sub", "check_failed");
970
- if (h && !Vr(a.aud, typeof h == "string" ? [h] : h))
971
- throw new L('unexpected "aud" claim value', a, "aud", "check_failed");
972
- let p;
973
- switch (typeof r.clockTolerance) {
974
- case "string":
975
- p = et(r.clockTolerance);
976
- break;
977
- case "number":
978
- p = r.clockTolerance;
979
- break;
980
- case "undefined":
981
- p = 0;
982
- break;
983
- default:
984
- throw new TypeError("Invalid clockTolerance option type");
985
- }
986
- const { currentDate: l } = r, m = Hr(l || /* @__PURE__ */ new Date());
987
- if ((a.iat !== void 0 || u) && typeof a.iat != "number")
988
- throw new L('"iat" claim must be a number', a, "iat", "invalid");
989
- if (a.nbf !== void 0) {
990
- if (typeof a.nbf != "number")
991
- throw new L('"nbf" claim must be a number', a, "nbf", "invalid");
992
- if (a.nbf > m + p)
993
- throw new L('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
994
- }
995
- if (a.exp !== void 0) {
996
- if (typeof a.exp != "number")
997
- throw new L('"exp" claim must be a number', a, "exp", "invalid");
998
- if (a.exp <= m - p)
999
- throw new Qe('"exp" claim timestamp check failed', a, "exp", "check_failed");
1000
- }
1001
- if (u) {
1002
- const y = m - a.iat, w = typeof u == "number" ? u : et(u);
1003
- if (y - p > w)
1004
- throw new Qe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
1005
- if (y < 0 - p)
1006
- throw new L('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
1007
- }
1008
- return a;
1009
- };
1010
- async function Yr(e, t, r) {
1011
- var a;
1012
- const n = await Ur(e, t, r);
1013
- if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
1014
- throw new At("JWTs MUST NOT use unencoded payload");
1015
- const o = { payload: Wr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1016
- return typeof t == "function" ? { ...o, key: n.key } : o;
1017
- }
1018
- const ae = async (e) => {
1019
- try {
1020
- const t = R.ALG, r = await Rr(dr, t);
1021
- return await Yr(e, r, {
1022
- issuer: R.ISSUER
1023
- });
1024
- } catch {
1025
- return;
1026
- }
1027
- };
1028
- var I = [];
1029
- for (var Le = 0; Le < 256; ++Le)
1030
- I.push((Le + 256).toString(16).slice(1));
1031
- function jr(e, t = 0) {
1032
- return (I[e[t + 0]] + I[e[t + 1]] + I[e[t + 2]] + I[e[t + 3]] + "-" + I[e[t + 4]] + I[e[t + 5]] + "-" + I[e[t + 6]] + I[e[t + 7]] + "-" + I[e[t + 8]] + I[e[t + 9]] + "-" + I[e[t + 10]] + I[e[t + 11]] + I[e[t + 12]] + I[e[t + 13]] + I[e[t + 14]] + I[e[t + 15]]).toLowerCase();
1033
- }
1034
- var ie, Fr = new Uint8Array(16);
1035
- function Jr() {
1036
- if (!ie && (ie = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ie))
1037
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1038
- return ie(Fr);
1039
- }
1040
- var zr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1041
- const rt = {
1042
- randomUUID: zr
1043
- };
1044
- function at(e, t, r) {
1045
- if (rt.randomUUID && !t && !e)
1046
- return rt.randomUUID();
1047
- e = e || {};
1048
- var a = e.random || (e.rng || Jr)();
1049
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, jr(a);
1050
- }
1051
- const nt = globalThis.crypto, qr = (e) => `${at()}${at()}`.slice(0, e), Qr = (e) => btoa(
1052
- [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
1053
- );
1054
- async function Xr(e) {
1055
- if (!nt.subtle)
1056
- throw new Error(
1057
- "crypto.subtle is available only in secure contexts (HTTPS)."
1058
- );
1059
- const t = new TextEncoder().encode(e), r = await nt.subtle.digest("SHA-256", t);
1060
- return Qr(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1061
- }
1062
- async function Zr(e) {
1063
- const t = qr(43), r = await Xr(t);
1064
- return {
1065
- code_verifier: t,
1066
- code_challenge: r
1067
- };
1068
- }
1069
- function Pt(e, t) {
1070
- window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
1071
- }
1072
- const ot = (e, t) => {
1073
- const r = JSON.stringify(
1074
- typeof t == "function" ? t() : t
1075
- );
1076
- window.localStorage.setItem(e, r), Pt(e, r);
1077
- }, ea = (e) => {
1078
- window.localStorage.removeItem(e), Pt(e, null);
1079
- }, st = (e) => window.localStorage.getItem(e), ta = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1080
- function ce({
1081
- key: e,
1082
- initialValue: t
1083
- }) {
1084
- const r = Xt(ta, () => st(e)), a = re(
1085
- (s) => {
1086
- try {
1087
- const i = typeof s == "function" ? s(JSON.parse(r)) : s;
1088
- i == null ? ea(e) : ot(e, i);
1089
- } catch (i) {
1090
- console.warn(i);
1091
- }
1092
- },
1093
- [e, r]
1094
- ), n = re(() => {
1095
- a(t);
1096
- }, [t, a]), o = re(() => {
1097
- a(null);
1098
- }, [a]);
1099
- return z(() => {
1100
- try {
1101
- st(e) === null && typeof t < "u" && ot(e, t);
1102
- } catch (s) {
1103
- console.warn(s);
1104
- }
1105
- }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
1106
- }
1107
- var v = [];
1108
- for (var Me = 0; Me < 256; ++Me)
1109
- v.push((Me + 256).toString(16).slice(1));
1110
- function ra(e, t = 0) {
1111
- return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
1112
- }
1113
- var le, aa = new Uint8Array(16);
1114
- function na() {
1115
- if (!le && (le = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !le))
1116
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1117
- return le(aa);
1118
- }
1119
- var oa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1120
- const it = {
1121
- randomUUID: oa
1122
- };
1123
- function Ue(e, t, r) {
1124
- if (it.randomUUID && !t && !e)
1125
- return it.randomUUID();
1126
- e = e || {};
1127
- var a = e.random || (e.rng || na)();
1128
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ra(a);
1129
- }
1130
- const de = "Oops! It looks like your session has expired. For your security, please log in again to continue.", sa = "Your session has been successfully terminated.", ue = "Login failed. Please try again.", He = "Error getting access token, please re-authenticate.", ia = "You forgot to wrap your component in <AuthProvider>.", we = {
1131
- dev: "https://auth.gizmette.local.com:3003",
1132
- prod: "https://mylogin.gizmette.com/auth"
1133
- }, me = "@@auth@@", ee = "LOADING", te = "LOGIN", Dt = "LOGOUT", ca = process.env.NODE_ENV === "production", $t = !ca, ke = async ({
1134
- type: e,
1135
- clientId: t,
1136
- params: r = {}
1137
- }) => {
1138
- try {
1139
- const a = await fetch(
1140
- $t ? `${we.dev}/${e}` : `${we.prod}/${e}`,
1141
- {
1142
- credentials: "include",
1143
- method: "POST",
1144
- headers: {
1145
- "Content-Type": "application/json",
1146
- [It.CLIENT_ID]: `${t}`
1147
- },
1148
- body: JSON.stringify(r)
1149
- }
1150
- );
1151
- if (a.status !== 200)
1152
- return { status: a.status, data: [] };
1153
- const { data: n, errors: o } = await a.json();
1154
- return {
1155
- status: a.status,
1156
- data: n,
1157
- errors: o
1158
- };
1159
- } catch (a) {
1160
- return console.error(a), { status: 500, data: [] };
1161
- }
1162
- }, la = async ({
1163
- userId: e,
1164
- idToken: t,
1165
- accessToken: r,
1166
- refreshToken: a,
1167
- clientId: n,
1168
- domain: o
1169
- }) => {
1170
- try {
1171
- return {
1172
- status: (await ke({
1173
- type: Ie.LOGOUT,
1174
- clientId: n,
1175
- params: {
1176
- userId: e,
1177
- idToken: t,
1178
- accessToken: r,
1179
- refreshToken: a,
1180
- domain: o
1181
- }
1182
- })).status === 200
1183
- };
1184
- } catch {
1185
- return {
1186
- status: !1
1187
- };
1188
- }
1189
- }, ct = async ({
1190
- username: e,
1191
- password: t,
1192
- clientId: r,
1193
- nonce: a,
1194
- type: n,
1195
- sessionExpiration: o,
1196
- code: s,
1197
- code_verifier: i,
1198
- domain: h
1199
- }) => {
1200
- try {
1201
- const u = await ke({
1202
- type: Ie.AUTHENTICATE,
1203
- clientId: r,
1204
- params: {
1205
- type: n || q.ID_AND_ACCESS_TOKEN,
1206
- username: e,
1207
- password: t,
1208
- sessionExpiration: o,
1209
- nonce: a,
1210
- code: s,
1211
- code_verifier: i,
1212
- domain: h
1213
- }
1214
- }), d = await ae(u.data.idToken);
1215
- return d && d.payload[R.USER_ID_KEY] !== "" && d.payload[R.NONCE_KEY] === a ? {
1216
- idToken: u.data.idToken,
1217
- accessToken: u.data.accessToken,
1218
- refreshToken: u.data.refreshToken,
1219
- userId: d.payload[R.USER_ID_KEY],
1220
- status: !0
1221
- } : {
1222
- status: !1
1223
- };
1224
- } catch {
1225
- return {
1226
- status: !1
1227
- };
1228
- }
1229
- }, da = async ({
1230
- nonce: e,
1231
- clientId: t,
1232
- code_challenge: r
1233
- }) => {
1234
- try {
1235
- const a = await ke({
1236
- type: Ie.CODE,
1237
- clientId: t,
1238
- params: {
1239
- type: q.CODE,
1240
- nonce: e,
1241
- code_challenge: r
1242
- }
1243
- });
1244
- return a.data.code ? {
1245
- status: !0,
1246
- code: a.data.code
1247
- } : {
1248
- status: !1
1249
- };
1250
- } catch {
1251
- return {
1252
- status: !1
1253
- };
1254
- }
1255
- }, ua = async ({
1256
- clientId: e,
1257
- userId: t,
1258
- nonce: r,
1259
- refreshToken: a,
1260
- accessToken: n,
1261
- domain: o
1262
- }) => {
1263
- try {
1264
- const s = await ke({
1265
- type: Ie.AUTHENTICATE,
1266
- clientId: e,
1267
- params: {
1268
- type: q.REFRESH_TOKEN,
1269
- userId: t,
1270
- nonce: r,
1271
- refreshToken: a,
1272
- accessToken: n,
1273
- domain: o
1274
- }
1275
- }), i = await ae(s.data.accessToken);
1276
- return i && i.payload[R.USER_ID_KEY] !== "" && i.payload[R.NONCE_KEY] === r ? {
1277
- accessToken: s.data.accessToken,
1278
- refreshToken: s.data.refreshToken,
1279
- userId: i.payload[R.USER_ID_KEY],
1280
- status: !0
1281
- } : {
1282
- status: !1
1283
- };
1284
- } catch {
1285
- return {
1286
- status: !1
1287
- };
1288
- }
1289
- }, he = {
1290
- GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
1291
- $clientId: String!,
1292
- $username: String!,
1293
- $id: String!) {
1294
- getPasskeyRegistrationOptions(clientId: $clientId, username: $username, id: $id) {
1295
- challenge
1296
- rp {
1297
- id
1298
- name
1299
- }
1300
- user {
1301
- id
1302
- name
1303
- displayName
1304
- }
1305
- pubKeyCredParams {
1306
- type
1307
- alg
1308
- }
1309
- timeout
1310
-
1311
- attestation
1312
- }
1313
- }`,
1314
- VERIFY_REGISTRATION: `mutation VerifyPasskeyRegistration(
1315
- $clientId: String!,
1316
- $username: String!,
1317
- $id: String!,
1318
- $registration: RegistrationOptionsInput!) {
1319
- verifyPasskeyRegistration(
1320
- clientId: $clientId,
1321
- username: $username,
1322
- id: $id,
1323
- registration: $registration) {
1324
- status
1325
- message
1326
- }
1327
- }`,
1328
- GET_AUTHENTICATION_OPTIONS: `mutation GetPasskeyAuthenticationOptions(
1329
- $id: String!,
1330
- $clientId: String!,
1331
- ) {
1332
- getPasskeyAuthenticationOptions(
1333
- id: $id,
1334
- clientId: $clientId) {
1335
- rpId,
1336
- challenge,
1337
- allowCredentials,
1338
- timeout,
1339
- userVerification,
1340
- }
1341
- }`,
1342
- VERIFY_AUTHENTICATION: `mutation VerifyPasskeyAuthentication(
1343
- $clientId: String!,
1344
- $id: String!,
1345
- $authentication: AuthenticationOptionsInput!,
1346
- $nonce: String!,
1347
- $domain: String) {
1348
- verifyPasskeyAuthentication(
1349
- clientId: $clientId,
1350
- id: $id,
1351
- authentication: $authentication,
1352
- nonce: $nonce,
1353
- domain: $domain) {
1354
- status,
1355
- idToken,
1356
- accessToken,
1357
- refreshToken,
1358
- userId,
1359
- username,
1360
- }
1361
- }`
1362
- }, Y = {
1363
- GET_REGISTRATION_OPTIONS: {
1364
- schema: he.GET_REGISTRATION_OPTIONS,
1365
- method: "getPasskeyRegistrationOptions"
1366
- },
1367
- VERIFY_REGISTRATION: {
1368
- schema: he.VERIFY_REGISTRATION,
1369
- method: "verifyPasskeyRegistration"
1370
- },
1371
- GET_AUTHENTICATION_OPTIONS: {
1372
- schema: he.GET_AUTHENTICATION_OPTIONS,
1373
- method: "getPasskeyAuthenticationOptions"
1374
- },
1375
- VERIFY_AUTHENTICATION: {
1376
- schema: he.VERIFY_AUTHENTICATION,
1377
- method: "verifyPasskeyAuthentication"
1378
- }
1379
- }, j = async ({
1380
- accessToken: e,
1381
- type: t,
1382
- clientId: r,
1383
- params: a = {}
1384
- }) => {
1385
- try {
1386
- const n = t != null && t.data ? t.data(a) : a, o = `Bearer ${e}`, s = await fetch(
1387
- $t ? `${we.dev}/graphql` : `${we.prod}/graphql`,
1388
- {
1389
- method: "POST",
1390
- credentials: "include",
1391
- headers: {
1392
- authorization: o,
1393
- "Content-Type": "application/json",
1394
- Accept: "application/json",
1395
- [It.CLIENT_ID]: `${r}`
1396
- },
1397
- body: JSON.stringify({
1398
- query: t.schema,
1399
- variables: n
1400
- })
1401
- }
1402
- );
1403
- if (s.status !== 200)
1404
- return { status: s.status, data: [] };
1405
- const { data: i, errors: h } = await s.json();
1406
- return {
1407
- status: s.status,
1408
- data: i[t.method],
1409
- errors: h
1410
- };
1411
- } catch (n) {
1412
- return console.error(n), { status: 500, data: [] };
1413
- }
1414
- };
1415
- class ma {
1416
- constructor(t = null, r = null) {
1417
- Ce(this, "refreshTokenPromise", null), Ce(this, "accessToken"), Ce(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
1418
- }
1419
- async refreshtoken({
1420
- clientId: t,
1421
- userId: r,
1422
- nonce: a,
1423
- domain: n
1424
- }) {
1425
- this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
1426
- clientId: t,
1427
- userId: r,
1428
- nonce: a,
1429
- domain: n
1430
- }));
1431
- try {
1432
- return await this.refreshTokenPromise;
1433
- } finally {
1434
- this.refreshTokenPromise = null;
1435
- }
1436
- }
1437
- async _refreshToken({
1438
- clientId: t,
1439
- userId: r,
1440
- nonce: a,
1441
- domain: n
1442
- }) {
1443
- const o = await ae(this.refreshToken);
1444
- if (o && o.payload[R.USER_ID_KEY] !== "") {
1445
- const s = await ua({
1446
- clientId: t,
1447
- userId: r,
1448
- nonce: a,
1449
- refreshToken: this.refreshToken,
1450
- accessToken: this.accessToken,
1451
- domain: n
1452
- });
1453
- return s.status ? (this.accessToken = s.accessToken, this.refreshToken = s.refreshToken, {
1454
- status: "success",
1455
- newAccessToken: s.accessToken,
1456
- newRefreshToken: s.refreshToken
1457
- }) : {
1458
- status: "failure"
1459
- };
1460
- } else
1461
- return {
1462
- status: "failure"
1463
- };
1464
- }
1465
- }
1466
- const F = () => {
1467
- throw new Error(ia);
1468
- }, Lt = Qt({
1469
- isAuthenticated: !1,
1470
- isLoading: !1,
1471
- authenticationType: null,
1472
- login: F,
1473
- logout: F,
1474
- getAccessToken: F,
1475
- getIdToken: F,
1476
- registeringForPasskey: F,
1477
- loginWithPasskey: F,
1478
- logoutReason: ""
1479
- }), ha = H.createContext({
1480
- state: {
1481
- isLoading: !0,
1482
- isAuthenticated: !1,
1483
- authenticationType: null,
1484
- user: void 0,
1485
- logoutReason: ""
1486
- },
1487
- dispatch: () => {
1488
- }
1489
- }), pa = (e, t) => (t == null ? void 0 : t.type) === ee ? {
1490
- ...e,
1491
- isLoading: t.payload.isLoading
1492
- } : (t == null ? void 0 : t.type) === te ? {
1493
- ...e,
1494
- isLoading: !1,
1495
- isAuthenticated: !0,
1496
- user: t.payload.user,
1497
- authenticationType: t.payload.authenticationType,
1498
- logoutReason: ""
1499
- } : (t == null ? void 0 : t.type) === Dt ? {
1500
- ...e,
1501
- isLoading: !1,
1502
- isAuthenticated: !1,
1503
- user: void 0,
1504
- authenticationType: null,
1505
- logoutReason: t.payload.logoutReason
1506
- } : e, ga = ({
1507
- children: e,
1508
- sessionExpiration: t,
1509
- clientId: r,
1510
- domain: a = ""
1511
- }) => {
1512
- const [n, o] = ht(pa, {
1513
- isLoading: !0,
1514
- isAuthenticated: !1,
1515
- authenticationType: null,
1516
- user: void 0,
1517
- logoutReason: ""
1518
- }), s = V(!1), [i, h, , u] = ce({
1519
- key: `${me}::${r}::@@user@@`
1520
- }), [d, p, , l] = ce({
1521
- key: `${me}::${r}::@@access@@`
1522
- }), [m, y, , w] = ce(
1523
- {
1524
- key: `${me}::${r}::@@refresh@@`
1525
- }
1526
- ), [_, k, , D] = ce({
1527
- key: `${me}::${r}::@@nonce@@`
1528
- }), $ = new ma(d, m), N = re(
1529
- (g) => {
1530
- console.warn(g), o({
1531
- type: Dt,
1532
- payload: {
1533
- logoutReason: g || de
1534
- }
1535
- }), u(), l(), w(), D(), o({ type: ee, payload: { isLoading: !1 } });
1536
- },
1537
- [l, u, D, w]
1538
- ), O = re(
1539
- async (g) => {
1540
- const { user: b } = n;
1541
- await la({
1542
- userId: (b == null ? void 0 : b.userId) || "",
1543
- idToken: i,
1544
- accessToken: d,
1545
- refreshToken: m,
1546
- clientId: r,
1547
- domain: a
1548
- }), N(g || de);
1549
- },
1550
- [
1551
- d,
1552
- n,
1553
- r,
1554
- a,
1555
- i,
1556
- m,
1557
- N
1558
- ]
1559
- );
1560
- z(() => {
1561
- if (!s.current)
1562
- return n.isLoading && i !== null ? (async () => {
1563
- try {
1564
- const g = await ae(i);
1565
- g && g.payload[R.USER_ID_KEY] !== "" ? o({
1566
- type: te,
1567
- payload: {
1568
- authenticationType: g.payload[R.AUTH_TYPE_KEY],
1569
- user: {
1570
- userId: g.payload[R.USER_ID_KEY],
1571
- username: g.payload[R.USERNAME_KEY]
1572
- }
1573
- }
1574
- }) : await O(de);
1575
- } catch {
1576
- await O(de);
1577
- }
1578
- })() : o({ type: ee, payload: { isLoading: !1 } }), () => {
1579
- s.current = !0;
1580
- };
1581
- }, [n.isLoading, i, O]);
1582
- const x = async (g, b, E) => {
1583
- const C = Ue();
1584
- if (k(C), o({ type: ee, payload: { isLoading: !0 } }), u(), l(), w(), E === q.CODE) {
1585
- const { code_verifier: zt, code_challenge: qt } = await Zr(), qe = await da({
1586
- nonce: C,
1587
- clientId: r,
1588
- code_challenge: qt
1589
- });
1590
- if (qe.status) {
1591
- const Z = await ct({
1592
- username: g,
1593
- password: b,
1594
- clientId: r,
1595
- sessionExpiration: t,
1596
- nonce: C,
1597
- type: E,
1598
- code: qe.code,
1599
- code_verifier: zt,
1600
- domain: a
1601
- });
1602
- return Z.status ? (h(Z.idToken), p(Z.accessToken), y(Z.refreshToken), o({
1603
- type: te,
1604
- payload: {
1605
- authenticationType: E,
1606
- user: {
1607
- userId: Z.userId,
1608
- username: g
1609
- }
1610
- }
1611
- }), !0) : (N(ue), !1);
1612
- }
1613
- return !1;
1614
- }
1615
- const X = await ct({
1616
- username: g,
1617
- password: b,
1618
- clientId: r,
1619
- sessionExpiration: t,
1620
- nonce: C,
1621
- type: E,
1622
- domain: a
1623
- });
1624
- return X.status ? (h(X.idToken), p(X.accessToken), y(X.refreshToken), o({
1625
- type: te,
1626
- payload: {
1627
- authenticationType: E,
1628
- user: {
1629
- userId: X.userId,
1630
- username: g
1631
- }
1632
- }
1633
- }), !0) : (N(ue), !1);
1634
- }, Q = async (g) => {
1635
- g == null || g.preventDefault(), await O(sa);
1636
- }, P = async () => {
1637
- const { isAuthenticated: g, user: b } = n;
1638
- try {
1639
- if (g && b && b.userId) {
1640
- if (d) {
1641
- const C = await ae(d);
1642
- if (C && C.payload[R.USER_ID_KEY] !== "")
1643
- return d;
1644
- }
1645
- const E = await $.refreshtoken({
1646
- clientId: r,
1647
- userId: b.userId,
1648
- nonce: _,
1649
- domain: a
1650
- });
1651
- return E.status && E.status === "success" ? (p(E.newAccessToken), y(E.newRefreshToken), E.newAccessToken) : (await O(He), "");
1652
- }
1653
- return await O(He), "";
1654
- } catch {
1655
- return await O(He), "";
1656
- }
1657
- }, Re = () => {
1658
- if (n.isAuthenticated && i)
1659
- return i;
1660
- }, Ne = async () => {
1661
- const { user: g } = n;
1662
- let b = await j({
1663
- accessToken: d,
1664
- clientId: r,
1665
- type: Y.GET_REGISTRATION_OPTIONS,
1666
- params: {
1667
- clientId: r,
1668
- id: g == null ? void 0 : g.userId,
1669
- username: g == null ? void 0 : g.username
1670
- }
1671
- });
1672
- if (b.status)
1673
- try {
1674
- const E = await sr(b.data);
1675
- b = await j({
1676
- accessToken: d,
1677
- clientId: r,
1678
- type: Y.VERIFY_REGISTRATION,
1679
- params: {
1680
- clientId: r,
1681
- id: g == null ? void 0 : g.userId,
1682
- username: g == null ? void 0 : g.username,
1683
- registration: E
1684
- }
1685
- });
1686
- } catch {
1687
- return await j({
1688
- accessToken: d,
1689
- clientId: r,
1690
- type: Y.VERIFY_REGISTRATION,
1691
- params: {
1692
- clientId: r,
1693
- id: g == null ? void 0 : g.userId,
1694
- username: g == null ? void 0 : g.username,
1695
- registration: {}
1696
- }
1697
- }), !1;
1698
- }
1699
- }, xe = async () => {
1700
- const g = Ue();
1701
- k(g), o({ type: ee, payload: { isLoading: !0 } }), u(), l(), w();
1702
- const b = Ue();
1703
- let E = await j({
1704
- accessToken: d,
1705
- clientId: r,
1706
- type: Y.GET_AUTHENTICATION_OPTIONS,
1707
- params: {
1708
- id: b,
1709
- clientId: r
1710
- }
1711
- });
1712
- if (E.status)
1713
- try {
1714
- const C = await lr(E.data);
1715
- return E = await j({
1716
- accessToken: d,
1717
- clientId: r,
1718
- type: Y.VERIFY_AUTHENTICATION,
1719
- params: {
1720
- clientId: r,
1721
- id: b,
1722
- authentication: C,
1723
- nonce: g,
1724
- domain: a
1725
- }
1726
- }), E.data.status === "success" ? (h(E.data.idToken), p(E.data.accessToken), y(E.data.refreshToken), o({
1727
- type: te,
1728
- payload: {
1729
- authenticationType: q.PASSKEY,
1730
- user: {
1731
- userId: E.data.userId,
1732
- username: E.data.username
1733
- }
1734
- }
1735
- }), !0) : (N(ue), !1);
1736
- } catch {
1737
- return await j({
1738
- accessToken: d,
1739
- clientId: r,
1740
- type: Y.VERIFY_AUTHENTICATION,
1741
- params: {
1742
- clientId: r,
1743
- id: b,
1744
- authentication: {},
1745
- nonce: g,
1746
- domain: a
1747
- }
1748
- }), N(ue), !1;
1749
- }
1750
- };
1751
- return /* @__PURE__ */ c(ha.Provider, { value: { state: n, dispatch: o }, children: /* @__PURE__ */ c(
1752
- Lt.Provider,
1753
- {
1754
- value: {
1755
- ...n,
1756
- login: x,
1757
- logout: Q,
1758
- getAccessToken: P,
1759
- getIdToken: Re,
1760
- registeringForPasskey: Ne,
1761
- loginWithPasskey: xe
1762
- },
1763
- children: e
1764
- }
1765
- ) });
1766
- }, je = (e = Lt) => pt(e), Un = "user", Hn = "assistant", Kn = "system", Bn = "internal", Gn = "hidden", Vn = "I'm having trouble right now. Please try again later.", Wn = "gpt-4", Yn = 128e3, jn = "action-message", Fn = "action-reset", Jn = "action-model", zn = "action-restore", qn = "action-location", Qn = "action-streaming", Xn = "action-search", Zn = "action-sort", eo = "sassy-saint-", to = "details", ro = "search", ao = "sort", no = "location", oo = "==stats==", fa = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", lt = (e) => Number.isFinite(e) ? e : 0;
1767
- function ya(e) {
1768
- return {
1769
- days: Math.trunc(e / 864e5),
1770
- hours: Math.trunc(e / 36e5 % 24),
1771
- minutes: Math.trunc(e / 6e4 % 60),
1772
- seconds: Math.trunc(e / 1e3 % 60),
1773
- milliseconds: Math.trunc(e % 1e3),
1774
- microseconds: Math.trunc(lt(e * 1e3) % 1e3),
1775
- nanoseconds: Math.trunc(lt(e * 1e6) % 1e3)
1776
- };
1777
- }
1778
- function ba(e) {
1779
- return {
1780
- days: e / 86400000n,
1781
- hours: e / 3600000n % 24n,
1782
- minutes: e / 60000n % 60n,
1783
- seconds: e / 1000n % 60n,
1784
- milliseconds: e % 1000n,
1785
- microseconds: 0n,
1786
- nanoseconds: 0n
1787
- };
1788
- }
1789
- function Ea(e) {
1790
- switch (typeof e) {
1791
- case "number": {
1792
- if (Number.isFinite(e))
1793
- return ya(e);
1794
- break;
1795
- }
1796
- case "bigint":
1797
- return ba(e);
1798
- }
1799
- throw new TypeError("Expected a finite number or bigint");
1800
- }
1801
- const wa = (e) => e === 0 || e === 0n, Ta = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ia = 1e-7, va = 24n * 60n * 60n * 1000n;
1802
- function Aa(e, t) {
1803
- const r = typeof e == "bigint";
1804
- if (!r && !Number.isFinite(e))
1805
- throw new TypeError("Expected a finite number or bigint");
1806
- t = { ...t }, 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);
1807
- let a = [];
1808
- const n = (u, d) => {
1809
- const p = Math.floor(u * 10 ** d + Ia);
1810
- return (Math.round(p) / 10 ** d).toFixed(d);
1811
- }, o = (u, d, p, l) => {
1812
- if (!((a.length === 0 || !t.colonNotation) && wa(u) && !(t.colonNotation && p === "m"))) {
1813
- if (l = l ?? String(u), t.colonNotation) {
1814
- const m = l.includes(".") ? l.split(".")[0].length : l.length, y = a.length > 0 ? 2 : 1;
1815
- l = "0".repeat(Math.max(0, y - m)) + l;
1816
- } else
1817
- l += t.verbose ? " " + Ta(d, u) : p;
1818
- a.push(l);
1819
- }
1820
- }, s = Ea(e), i = BigInt(s.days);
1821
- if (o(i / 365n, "year", "y"), o(i % 365n, "day", "d"), o(Number(s.hours), "hour", "h"), o(Number(s.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
1822
- const u = Number(s.seconds), d = Number(s.milliseconds), p = Number(s.microseconds), l = Number(s.nanoseconds);
1823
- if (o(u, "second", "s"), t.formatSubMilliseconds)
1824
- o(d, "millisecond", "ms"), o(p, "microsecond", "µs"), o(l, "nanosecond", "ns");
1825
- else {
1826
- const m = d + p / 1e3 + l / 1e6, y = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = m >= 1 ? Math.round(m) : Math.ceil(m), _ = y ? m.toFixed(y) : w;
1827
- o(
1828
- Number.parseFloat(_),
1829
- "millisecond",
1830
- "ms",
1831
- _
1832
- );
1833
- }
1834
- } else {
1835
- const u = (r ? Number(e % va) : e) / 1e3 % 60, d = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, p = n(u, d), l = t.keepDecimalsOnWholeSeconds ? p : p.replace(/\.0+$/, "");
1836
- o(Number.parseFloat(l), "second", "s", l);
1837
- }
1838
- if (a.length === 0)
1839
- return "0" + (t.verbose ? " milliseconds" : "ms");
1840
- const h = t.colonNotation ? ":" : " ";
1841
- return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), a.join(h);
1842
- }
1843
- const ka = process.env.NODE_ENV === "production", Fe = !ka, Sa = Fe ? "gizmette.local.com" : "gizmette.com", so = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Mt = (e, t) => {
1844
- const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", a = 0 | Math.abs(e), n = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
1845
- return {
1846
- dir: r,
1847
- deg: a,
1848
- min: n,
1849
- sec: o
1850
- };
1851
- }, io = (e) => {
1852
- if (!e && e !== 0)
1853
- return "N/A";
1854
- const t = Mt(e, !1);
1855
- return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
1856
- }, co = (e) => {
1857
- if (!e && e !== 0)
1858
- return "N/A";
1859
- const t = Mt(e, !0);
1860
- return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
1861
- }, lo = async () => {
1862
- const e = {
1863
- /**
1864
- * A boolean value that indicates the application would
1865
- * like to receive the best possible results. If true
1866
- * and if the device is able to provide a more accurate
1867
- * position, it will do so. Note that this can result in
1868
- * slower response times or increased power consumption
1869
- * (with a GPS chip on a mobile device for example). On
1870
- * the other hand, if false, the device can take the
1871
- * liberty to save resources by responding more quickly
1872
- * and/or using less power. Default: false.
1873
- */
1874
- enableHighAccuracy: !1,
1875
- /**
1876
- * A positive long value representing the maximum length
1877
- * of time (in milliseconds) the device is allowed to
1878
- * take in order to return a position. The default value
1879
- * is Infinity, meaning that getCurrentPosition() won't
1880
- * return until the position is available.
1881
- */
1882
- timeout: 1e4,
1883
- /**
1884
- * A positive long value indicating the maximum age in
1885
- * milliseconds of a possible cached position that is
1886
- * acceptable to return. If set to 0, it means that the
1887
- * device cannot use a cached position and must attempt
1888
- * to retrieve the real current position. If set to
1889
- * Infinity the device must return a cached position
1890
- * regardless of its age. Default: 0.
1891
- */
1892
- maximumAge: 6e4
1893
- };
1894
- return new Promise((t, r) => {
1895
- var a;
1896
- (a = navigator == null ? void 0 : navigator.geolocation) == null || a.getCurrentPosition(
1897
- (n) => {
1898
- t({
1899
- latitude: n.coords.latitude,
1900
- longitude: n.coords.longitude,
1901
- accuracy: n.coords.accuracy
1902
- });
1903
- },
1904
- (n) => {
1905
- r(n);
1906
- },
1907
- e
1908
- );
1909
- });
1910
- }, uo = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
1911
- /* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
1912
- /* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
1913
- ] }) }, `${e}-${r}`)) : null;
1914
- function mo({
1915
- data: e,
1916
- formatter: t = (r) => r
1917
- }) {
1918
- const r = e.filter(
1919
- (n) => typeof n == "number" && n > 0
1920
- ), a = r.reduce(
1921
- (n, o) => (n || 0) + (o || 0),
1922
- 0
1923
- );
1924
- return t(a ? a / r.length : 0);
1925
- }
1926
- const ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, po = new Intl.NumberFormat("en", {
1927
- style: "decimal",
1928
- signDisplay: "never",
1929
- minimumFractionDigits: 0,
1930
- maximumFractionDigits: 0
1931
- }), go = (e) => Aa(e, {
1932
- secondsDecimalDigits: 2,
1933
- unitCount: 2
1934
- }), _a = (e) => f(
1935
- "flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
1936
- e || Fe ? "pt-4" : "pt-10"
1937
- ), fo = (e, t) => t === 1 ? e : `${e}s`, Se = (e) => {
1938
- let t = "";
1939
- if (typeof e == "number" || typeof e == "string")
1940
- t = "m-" + e;
1941
- else {
1942
- const r = [];
1943
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
1944
- }
1945
- return t;
1946
- }, yo = "av-bubble", dt = "av-button", ye = "av-card", Ra = "av-footer", Na = "av-main", bo = "av-messagebox", Eo = "av-panel", wo = "av-spinner", Ut = "icon", Ht = "button", xa = "link", Ca = ({
1947
- type: e,
1948
- size: t,
1949
- labelRight: r,
1950
- labelLeft: a,
1951
- align: n
1952
- }) => {
1953
- const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", i = "text-lg font-medium max-h-12 py-2";
1954
- switch (e) {
1955
- case Ht:
1956
- return f("px-4", {
1957
- [o]: t === "small",
1958
- [s]: t === "medium",
1959
- [i]: t === "large"
1960
- });
1961
- case xa:
1962
- return f("px-4 text-center", {
1963
- [o]: t === "small",
1964
- [s]: t === "medium",
1965
- [i]: t === "large"
1966
- });
1967
- case Ut:
1968
- return f("inline-flex items-center", {
1969
- "justify-center": n === "center",
1970
- "justify-start": n === "left",
1971
- "justify-end": n === "right",
1972
- "h-6 w-6 p-0": t === "small" && !(r || a),
1973
- "h-6 px-4 text-sm font-medium": t === "small" && (r || a),
1974
- "h-8 w-8 p-1": t === "medium" && !(r || a),
1975
- "h-8 px-4 text-base font-medium": t === "medium" && (r || a),
1976
- "h-12 w-12 p-2": t === "large" && !(r || a),
1977
- "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
1978
- });
1979
- }
1980
- }, Oa = ({
1981
- mode: e,
1982
- noBackground: t,
1983
- noTruncate: r,
1984
- variant: a
1985
- }) => {
1986
- if (t)
1987
- return "not-prose rounded-full";
1988
- if (a === "primary")
1989
- return f("not-prose rounded-full", {
1990
- truncate: !r,
1991
- "bg-action-dark text-copy-light": e === "dark",
1992
- "bg-action-light text-copy-lighter": e === "light",
1993
- "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
1994
- "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
1995
- });
1996
- if (a === "secondary")
1997
- return f("not-prose rounded-full", {
1998
- truncate: !r,
1999
- "bg-action-dark text-copy-light": e === "light",
2000
- "bg-action-light text-copy-lighter": e === "dark",
2001
- "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
2002
- "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
2003
- });
2004
- if (a === "danger")
2005
- return f("not-prose rounded-full", {
2006
- truncate: !r,
2007
- "bg-action-danger-dark text-copy-light": e === "dark",
2008
- "bg-action-danger-light text-copy-lighter": e === "light",
2009
- "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
2010
- "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
2011
- });
2012
- }, Pa = ({
2013
- mode: e,
2014
- disabled: t,
2015
- variant: r
2016
- }) => {
2017
- if (t)
2018
- return "";
2019
- if (r === "primary")
2020
- return f("hover:text-copy-light-hover", {
2021
- "hover:bg-action-dark-hover": e === "dark",
2022
- "hover:bg-action-light-hover": e === "light",
2023
- "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
2024
- "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
2025
- });
2026
- if (r === "secondary")
2027
- return f("hover:text-copy-light-hover", {
2028
- "hover:bg-action-dark-hover": e === "light",
2029
- "hover:bg-action-light-hover": e === "dark",
2030
- "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
2031
- "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
2032
- });
2033
- if (r === "danger")
2034
- return f("hover:text-copy-light-hover", {
2035
- "hover:bg-action-danger-dark-hover": e === "dark",
2036
- "hover:bg-action-danger-light-hover": e === "light",
2037
- "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
2038
- "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
2039
- });
2040
- }, Da = ({
2041
- mode: e,
2042
- disabled: t,
2043
- variant: r
2044
- }) => {
2045
- if (t)
2046
- return "";
2047
- if (r === "primary")
2048
- return f("active:text-copy-light-active", {
2049
- "active:bg-action-dark-active": e === "dark",
2050
- "active:bg-action-light-active": e === "light",
2051
- "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
2052
- "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
2053
- });
2054
- if (r === "secondary")
2055
- return f("active:text-copy-light-active", {
2056
- "active:bg-action-dark-active": e === "light",
2057
- "active:bg-action-light-active": e === "dark",
2058
- "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
2059
- "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
2060
- });
2061
- if (r === "danger")
2062
- return f("active:text-copy-lighter-active", {
2063
- "active:bg-action-danger-dark-active": e === "dark",
2064
- "active:bg-action-danger-light-active": e === "light",
2065
- "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
2066
- "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
2067
- });
2068
- }, $a = ({
2069
- mode: e,
2070
- noBorder: t,
2071
- variant: r
2072
- }) => {
2073
- if (t)
2074
- return "border border-transparent";
2075
- if (r === "primary")
2076
- return f("border", {
2077
- "border-border-dark": e === "dark",
2078
- "border-border-accent": e === "light",
2079
- "border-border-dark dark:border-border-accent": e === "system",
2080
- "border-border-accent dark:border-border-dark": e === "alt-system"
2081
- });
2082
- if (r === "secondary")
2083
- return f("border", {
2084
- "border-border-dark": e === "light",
2085
- "border-border-accent": e === "dark",
2086
- "border-border-dark dark:border-border-accent": e === "alt-system",
2087
- "border-border-accent dark:border-border-dark": e === "system"
2088
- });
2089
- if (r === "danger")
2090
- return f("border", {
2091
- "border-border-danger-dark": e === "dark",
2092
- "border-border-danger-medium": e === "light",
2093
- "border-border-danger-dark dark:border-border-danger-medium": e === "system",
2094
- "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
2095
- });
2096
- }, La = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
2097
- "focus:outline-focus-dark": e === "dark",
2098
- "focus:outline-focus-light": e === "light",
2099
- "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2100
- "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2101
- }), Kt = ({
2102
- type: e,
2103
- className: t,
2104
- raw: r,
2105
- mode: a,
2106
- focusMode: n,
2107
- disabled: o,
2108
- fullWidth: s,
2109
- size: i,
2110
- noBorder: h,
2111
- labelRight: u,
2112
- labelLeft: d,
2113
- spacing: p,
2114
- noBackground: l,
2115
- variant: m,
2116
- noTruncate: y,
2117
- align: w
2118
- }) => (m || (m = "primary"), r ? f(dt, t) : f(
2119
- dt,
2120
- t,
2121
- Se(p),
2122
- Oa({ mode: a, variant: m, noBackground: l, noTruncate: y }),
2123
- Ca({ type: e, size: i, labelRight: u, labelLeft: d, align: w }),
2124
- $a({ mode: a, variant: m, noBorder: h }),
2125
- La({ focusMode: n }),
2126
- Pa({ mode: a, variant: m, disabled: o }),
2127
- Da({ mode: a, variant: m, disabled: o }),
2128
- {
2129
- "w-full": s,
2130
- "disabled:cursor-not-allowed disabled:opacity-50": o
2131
- }
2132
- )), Ma = (e, t, r) => {
2133
- var a;
2134
- !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);
2135
- }, Je = H.forwardRef(
2136
- (e, t) => {
2137
- const { onClick: r, noInternalClick: a = !1, ...n } = e;
2138
- return /* @__PURE__ */ c(
2139
- "button",
2140
- {
2141
- ref: t,
2142
- onClick: (o) => {
2143
- Ma(o, a, r);
2144
- },
2145
- ...n
2146
- }
2147
- );
2148
- }
2149
- );
2150
- Je.displayName = "BaseButton";
2151
- const Ve = H.forwardRef(
2152
- ({
2153
- children: e,
2154
- disabled: t = !1,
2155
- mode: r = "system",
2156
- focusMode: a = "system",
2157
- fullWidth: n = !1,
2158
- className: o,
2159
- type: s = "button",
2160
- raw: i = !1,
2161
- noBorder: h = !1,
2162
- "aria-label": u,
2163
- label: d,
2164
- size: p = "medium",
2165
- labelRight: l,
2166
- labelLeft: m,
2167
- spacing: y,
2168
- noBackground: w = !1,
2169
- align: _ = "center",
2170
- ...k
2171
- }, D) => {
2172
- const $ = Kt({
2173
- type: Ut,
2174
- mode: r,
2175
- focusMode: a,
2176
- fullWidth: n,
2177
- disabled: t,
2178
- raw: i,
2179
- className: o,
2180
- noBorder: h,
2181
- size: p,
2182
- labelRight: l,
2183
- labelLeft: m,
2184
- spacing: y,
2185
- noBackground: w,
2186
- align: _
2187
- }), N = f({
2188
- "text-copy-accent-dark": r === "light" && !i,
2189
- "text-copy-light": r === "dark" && !i,
2190
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
2191
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
2192
- });
2193
- return /* @__PURE__ */ T(
2194
- Je,
2195
- {
2196
- ref: D,
2197
- className: $,
2198
- disabled: t,
2199
- type: s,
2200
- "aria-label": u || d,
2201
- ...k,
2202
- children: [
2203
- m && /* @__PURE__ */ c("span", { className: "pr-2", children: m }),
2204
- /* @__PURE__ */ c("div", { className: N, children: e }),
2205
- l && /* @__PURE__ */ c("span", { className: "pl-2", children: l })
2206
- ]
2207
- }
2208
- );
2209
- }
2210
- );
2211
- Ve.displayName = "ButtonIcon";
2212
- const Bt = H.forwardRef(
2213
- ({
2214
- children: e,
2215
- disabled: t = !1,
2216
- mode: r = "system",
2217
- focusMode: a = "system",
2218
- fullWidth: n = !1,
2219
- className: o,
2220
- size: s = "medium",
2221
- raw: i = !1,
2222
- noBorder: h = !1,
2223
- spacing: u,
2224
- variant: d = "primary",
2225
- noTruncate: p = !1,
2226
- ...l
2227
- }, m) => {
2228
- const y = Kt({
2229
- type: Ht,
2230
- mode: r,
2231
- focusMode: a,
2232
- fullWidth: n,
2233
- disabled: t,
2234
- raw: i,
2235
- className: o,
2236
- size: s,
2237
- noBorder: h,
2238
- spacing: u,
2239
- variant: d,
2240
- noTruncate: p
2241
- });
2242
- return /* @__PURE__ */ c(
2243
- Je,
2244
- {
2245
- ref: m,
2246
- className: y,
2247
- disabled: t,
2248
- ...l,
2249
- children: e
2250
- }
2251
- );
2252
- }
2253
- );
2254
- Bt.displayName = "Button";
2255
- function Ua(e) {
2256
- const t = gt();
2257
- return `${e}${t}`;
2258
- }
2259
- const Ha = ({
2260
- className: e,
2261
- headerClassName: t,
2262
- bodyClassName: r,
2263
- footerClassName: a,
2264
- spacing: n,
2265
- mode: o,
2266
- compact: s,
2267
- noBorder: i
2268
- }) => {
2269
- const h = f(
2270
- ye,
2271
- e,
2272
- "rounded-md",
2273
- Se(n),
2274
- {
2275
- "border-none": i,
2276
- "border-2": !i,
2277
- "p-4": !s,
2278
- "p-1 sm:p-2": s,
2279
- "border-border-accent bg-surface-darker text-copy-light": o === "darker",
2280
- "border-border-accent bg-surface-dark text-copy-light": o === "dark",
2281
- "border-border-dark bg-surface-lighter text-copy-dark": o === "light",
2282
- "border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": o === "system",
2283
- "border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": o === "alt-system"
2284
- }
2285
- ), u = t || f(`${ye}__header mt-0 border-b-2`, {
2286
- "text-copy-light border-border-accent": o === "darker",
2287
- "border-border-accent": o === "dark",
2288
- "border-border-medium": o === "light",
2289
- "border-border-medium dark:border-border-accent": o === "system",
2290
- "border-border-accent dark:border-border-medium": o === "alt-system",
2291
- "mb-4": !s,
2292
- "mb-2": s
2293
- }), d = f(r), p = a || f(`${ye}__footer pt-2`);
2294
- return {
2295
- wrapper: h,
2296
- header: u,
2297
- body: d,
2298
- footer: p
2299
- };
2300
- };
2301
- function Ka({
2302
- id: e,
2303
- content: t,
2304
- userAriaLabelledby: r,
2305
- className: a
2306
- }) {
2307
- return typeof t == "string" ? /* @__PURE__ */ c("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ c("div", { className: a, children: t }) : t ? /* @__PURE__ */ c("div", { className: a, id: e, children: t }) : null;
2308
- }
2309
- const Ba = ({
2310
- header: e,
2311
- headerClassName: t,
2312
- footer: r,
2313
- footerClassName: a,
2314
- children: n,
2315
- className: o,
2316
- bodyClassName: s,
2317
- "aria-labelledby": i,
2318
- spacing: h,
2319
- mode: u = "system",
2320
- compact: d = !1,
2321
- noBorder: p = !1,
2322
- ...l
2323
- }) => {
2324
- let m = null, y = null;
2325
- const w = typeof e == "string", _ = Ua(ye), k = Ha({
2326
- className: o,
2327
- headerClassName: t,
2328
- bodyClassName: s,
2329
- footerClassName: a,
2330
- spacing: h,
2331
- mode: u,
2332
- compact: d,
2333
- noBorder: p
2334
- });
2335
- return w ? (m = _, y = m) : !w && e && i ? (m = null, y = i) : !w && e && !i ? (m = _, y = m) : (m = null, y = i || null), /* @__PURE__ */ c("div", { className: k.wrapper, children: /* @__PURE__ */ T(
2336
- "section",
2337
- {
2338
- ...y && {
2339
- "aria-labelledby": y
2340
- },
2341
- className: k.body,
2342
- ...l,
2343
- children: [
2344
- /* @__PURE__ */ c(
2345
- Ka,
2346
- {
2347
- ...m && { id: m },
2348
- content: e,
2349
- className: k.header,
2350
- userAriaLabelledby: i
2351
- }
2352
- ),
2353
- /* @__PURE__ */ c("div", { children: n }),
2354
- r ? /* @__PURE__ */ c("div", { className: k.footer, children: r }) : null
2355
- ]
2356
- }
2357
- ) });
2358
- }, Ga = ({
2359
- className: e,
2360
- mode: t = "system",
2361
- row1: r,
2362
- row2: a,
2363
- noMargins: n = !1,
2364
- spacing: o,
2365
- raw: s = !1
2366
- }) => {
2367
- const i = f(Ra, e, Se(o), {
2368
- "text-copy-dark": !s && t === "dark",
2369
- "text-copy-lighter": !s && t === "light",
2370
- "text-copy-dark dark:text-copy-lighter": !s && t === "system",
2371
- "text-copy-lighter dark:text-copy-dark": !s && t === "alt-system",
2372
- "mb-[100px]": !n && !s,
2373
- "mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
2374
- });
2375
- return /* @__PURE__ */ T("footer", { className: i, children: [
2376
- r && /* @__PURE__ */ c("div", { children: r }),
2377
- a && /* @__PURE__ */ c("div", { children: a })
2378
- ] });
2379
- }, Va = ({
2380
- children: e,
2381
- className: t,
2382
- raw: r = !1,
2383
- spacing: a
2384
- }) => {
2385
- const n = f(t, Na, Se(a), {
2386
- "mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
2387
- });
2388
- return /* @__PURE__ */ c("main", { className: n, children: e });
2389
- };
2390
- /*!
2391
- @versini/ui-components v5.20.0
2392
- © 2024 gizmette.com
2393
- */
2394
- try {
2395
- window.__VERSINI_UI_GLOBAL__ || (window.__VERSINI_UI_GLOBAL__ = {
2396
- version: "5.20.0",
2397
- buildTime: "07/06/2024 10:24 AM EDT",
2398
- homepage: "https://github.com/aversini/ui-components",
2399
- license: "MIT"
2400
- });
2401
- } catch {
2402
- }
2403
- function Wa(e) {
2404
- return Zt(() => e.every((t) => t == null) ? () => {
2405
- } : (t) => {
2406
- e.forEach((r) => {
2407
- typeof r == "function" ? r(t) : r != null && (r.current = t);
2408
- });
2409
- }, e);
2410
- }
2411
- function Ya(e) {
2412
- const t = gt();
2413
- if (!e)
2414
- return t;
2415
- if (typeof e == "number" || typeof e == "string")
2416
- return `${e}${t}`;
2417
- if (typeof e == "object") {
2418
- const { id: r, prefix: a = "" } = e;
2419
- return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
2420
- }
2421
- }
2422
- const Gt = "SET_ANNOUNCEMENT", Vt = "CLEAR_ANNOUNCEMENT", ja = {
2423
- alert: null,
2424
- alertdialog: null,
2425
- log: "polite",
2426
- marquee: null,
2427
- progressbar: null,
2428
- status: "polite",
2429
- timer: "assertive"
2430
- }, Fa = (e, t) => {
2431
- switch (t == null ? void 0 : t.type) {
2432
- case Gt:
2433
- return {
2434
- ...e,
2435
- announcement: t.payload
2436
- };
2437
- case Vt:
2438
- return {
2439
- ...e,
2440
- announcement: null
2441
- };
2442
- default:
2443
- return e;
2444
- }
2445
- }, Ja = ({
2446
- onAnnouncementClear: e,
2447
- dispatch: t
2448
- }) => {
2449
- t({
2450
- type: Vt
2451
- }), typeof e == "function" && e();
2452
- }, ut = ({
2453
- children: e,
2454
- clearAnnouncementDelay: t,
2455
- clearAnnouncementTimeoutRef: r,
2456
- onAnnouncementClear: a,
2457
- dispatch: n
2458
- }) => {
2459
- (r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
2460
- type: Gt,
2461
- payload: e
2462
- }), t && (r.current = setTimeout(
2463
- () => Ja({
2464
- onAnnouncementClear: a,
2465
- dispatch: n
2466
- }),
2467
- t
2468
- ));
2469
- }, za = ({
2470
- children: e,
2471
- announcementTimeoutRef: t,
2472
- announcementDelay: r,
2473
- clearAnnouncementDelay: a,
2474
- clearAnnouncementTimeoutRef: n,
2475
- onAnnouncementClear: o,
2476
- dispatch: s
2477
- }) => {
2478
- clearTimeout(t.current), r ? t.current = setTimeout(ut, r, {
2479
- children: e,
2480
- clearAnnouncementDelay: a,
2481
- clearAnnouncementTimeoutRef: n,
2482
- onAnnouncementClear: o,
2483
- dispatch: s
2484
- }) : ut({
2485
- children: e,
2486
- clearAnnouncementDelay: a,
2487
- clearAnnouncementTimeoutRef: n,
2488
- onAnnouncementClear: o,
2489
- dispatch: s
2490
- });
2491
- };
2492
- function Wt({
2493
- children: e,
2494
- className: t,
2495
- politeness: r,
2496
- role: a = null,
2497
- announcementDelay: n,
2498
- clearAnnouncementDelay: o,
2499
- onAnnouncementClear: s,
2500
- visible: i,
2501
- ...h
2502
- }) {
2503
- const u = V(), d = V(), [p, l] = ht(Fa, {
2504
- announcement: null
2505
- });
2506
- let m = r;
2507
- typeof m > "u" && (m = a ? ja[a] : "assertive"), z(() => {
2508
- za({
2509
- announcementTimeoutRef: u,
2510
- announcementDelay: n,
2511
- children: e,
2512
- clearAnnouncementDelay: o,
2513
- clearAnnouncementTimeoutRef: d,
2514
- onAnnouncementClear: s,
2515
- dispatch: l
2516
- });
2517
- }, [
2518
- e,
2519
- n,
2520
- o,
2521
- s
2522
- ]);
2523
- const y = f(t, {
2524
- "sr-only": !i
2525
- });
2526
- return /* @__PURE__ */ c(
2527
- "div",
2528
- {
2529
- "aria-live": m,
2530
- ...a && { role: a },
2531
- className: y,
2532
- ...h,
2533
- children: p.announcement
2534
- }
2535
- );
2536
- }
2537
- /*!
2538
- @versini/ui-private v1.4.6
2539
- © 2024 gizmette.com
2540
- */
2541
- try {
2542
- window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
2543
- version: "1.4.6",
2544
- buildTime: "07/08/2024 04:31 PM EDT",
2545
- homepage: "https://github.com/aversini/ui-components",
2546
- license: "MIT"
2547
- });
2548
- } catch {
2549
- }
2550
- const qa = (e) => {
2551
- let t = "";
2552
- if (typeof e == "number" || typeof e == "string")
2553
- t = "m-" + e;
2554
- else {
2555
- const r = [];
2556
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2557
- }
2558
- return t;
2559
- }, Yt = "av-text-input", Qa = "av-text-input-wrapper", Ke = "av-text-input-helper-text", To = "av-text-area", Io = "av-text-area-wrapper", vo = "av-text-area-helper-text", Ao = "av-text-area__control--right", ko = "av-toggle", Xa = ({
2560
- mode: e
2561
- }) => f({
2562
- "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
2563
- "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
2564
- "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
2565
- "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
2566
- }), Za = ({
2567
- focusMode: e
2568
- }) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
2569
- "focus:outline-focus-dark": e === "dark",
2570
- "focus:outline-focus-light": e === "light",
2571
- "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2572
- "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2573
- }), en = ({
2574
- noBorder: e,
2575
- error: t
2576
- }) => f("border-2", {
2577
- "border-border-dark": !e && !t,
2578
- "focus:border-border-dark": !e && t,
2579
- "border-border-error-dark": !e && t,
2580
- "border-transparent": e
2581
- }), tn = ({
2582
- disabled: e,
2583
- raw: t,
2584
- error: r,
2585
- mode: a
2586
- }) => {
2587
- if (t)
2588
- return "";
2589
- if (e)
2590
- return f("absolute px-2 cursor-not-allowed opacity-50 font-medium");
2591
- if (!r)
2592
- return f("absolute px-2 cursor-text font-medium", {
2593
- "text-copy-lighter": a === "dark",
2594
- "text-copy-dark": a === "light",
2595
- "text-copy-dark dark:text-copy-lighter": a === "system",
2596
- "text-copy-lighter dark:text-copy-dark": a === "alt-system"
2597
- });
2598
- if (r)
2599
- return f("absolute px-2 cursor-text font-medium", {
2600
- "text-copy-lighter": a === "dark",
2601
- "text-copy-error-dark": a === "light",
2602
- "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
2603
- "text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
2604
- });
2605
- }, rn = ({
2606
- error: e,
2607
- raw: t,
2608
- mode: r,
2609
- disabled: a
2610
- }) => {
2611
- if (t)
2612
- return "";
2613
- if (a)
2614
- return f(
2615
- Ke,
2616
- "absolute px-2 cursor-not-allowed opacity-50 font-medium"
2617
- );
2618
- if (!e)
2619
- return f(Ke, "absolute px-2 font-medium", {
2620
- "text-copy-lighter": r === "dark",
2621
- "text-copy-dark": r === "light",
2622
- "text-copy-dark dark:text-copy-lighter": r === "system",
2623
- "text-copy-lighter dark:text-copy-dark": r === "alt-system"
2624
- });
2625
- if (e)
2626
- return f(Ke, "absolute px-2 font-medium", {
2627
- "text-copy-error-light bg-surface-darker": r === "dark",
2628
- "text-copy-error-dark": r === "light",
2629
- "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
2630
- "dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
2631
- });
2632
- }, an = ({
2633
- className: e,
2634
- inputClassName: t,
2635
- raw: r,
2636
- disabled: a,
2637
- noBorder: n,
2638
- error: o,
2639
- spacing: s,
2640
- mode: i,
2641
- focusMode: h
2642
- }) => {
2643
- const u = r ? e : f(
2644
- "relative flex w-full flex-col justify-center",
2645
- Qa,
2646
- e,
2647
- qa(s)
2648
- ), d = r ? f(t) : f(
2649
- Yt,
2650
- t,
2651
- "h-12 rounded-md px-4 text-base",
2652
- Xa({ mode: i }),
2653
- Za({ focusMode: h }),
2654
- en({ noBorder: n, error: o }),
2655
- {
2656
- "disabled:cursor-not-allowed disabled:opacity-50": a
2657
- }
2658
- ), p = r ? void 0 : "sr-only", l = tn({
2659
- disabled: a,
2660
- raw: r,
2661
- error: o,
2662
- mode: i
2663
- }), m = rn({
2664
- error: o,
2665
- raw: r,
2666
- mode: i,
2667
- disabled: a
2668
- });
2669
- return {
2670
- wrapper: u,
2671
- input: d,
2672
- accessibleLabel: p,
2673
- visibleLabel: l,
2674
- helperText: m,
2675
- rightElement: r ? void 0 : "absolute right-3"
2676
- };
2677
- }, ze = H.forwardRef(
2678
- ({
2679
- id: e,
2680
- name: t,
2681
- label: r,
2682
- error: a = !1,
2683
- raw: n = !1,
2684
- className: o,
2685
- inputClassName: s,
2686
- mode: i = "system",
2687
- focusMode: h = "system",
2688
- disabled: u = !1,
2689
- noBorder: d = !1,
2690
- labelId: p,
2691
- labelHidden: l = !1,
2692
- type: m = "text",
2693
- helperText: y = "",
2694
- rightElement: w,
2695
- spacing: _,
2696
- ...k
2697
- }, D) => {
2698
- const $ = V(null), [N, O] = G(0), x = Ya({ id: e, prefix: `${Yt}-` }), Q = `${t} error, ${y}`, P = an({
2699
- className: o,
2700
- inputClassName: s,
2701
- error: a,
2702
- raw: n,
2703
- focusMode: h,
2704
- disabled: u,
2705
- noBorder: d,
2706
- spacing: _,
2707
- mode: i
2708
- });
2709
- return er(() => {
2710
- $.current && O($.current.offsetWidth + 18 + 10);
2711
- }, []), /* @__PURE__ */ T("div", { className: P.wrapper, children: [
2712
- /* @__PURE__ */ c(
2713
- "label",
2714
- {
2715
- htmlFor: x,
2716
- id: p,
2717
- className: P.accessibleLabel,
2718
- children: r
2719
- }
2720
- ),
2721
- /* @__PURE__ */ c(
2722
- "input",
2723
- {
2724
- ref: D,
2725
- id: x,
2726
- name: t,
2727
- type: m,
2728
- disabled: u,
2729
- placeholder: n ? void 0 : " ",
2730
- className: P.input,
2731
- ...y && { "aria-describedby": `${x}-helper` },
2732
- ...a && { "aria-invalid": "true" },
2733
- ...w && !n && { style: { paddingRight: N } },
2734
- ...k
2735
- }
2736
- ),
2737
- !n && !l && /* @__PURE__ */ c(
2738
- "label",
2739
- {
2740
- "aria-hidden": !0,
2741
- htmlFor: x,
2742
- className: P.visibleLabel,
2743
- children: r
2744
- }
2745
- ),
2746
- y && /* @__PURE__ */ c(
2747
- "div",
2748
- {
2749
- id: `${x}-helper`,
2750
- className: P.helperText,
2751
- children: y
2752
- }
2753
- ),
2754
- w && /* @__PURE__ */ c(
2755
- "div",
2756
- {
2757
- ref: $,
2758
- className: P.rightElement,
2759
- children: w
2760
- }
2761
- ),
2762
- a && y && /* @__PURE__ */ c(Wt, { politeness: "polite", clearAnnouncementDelay: 500, children: Q })
2763
- ] });
2764
- }
2765
- );
2766
- ze.displayName = "TextInput";
2767
- const nn = 500, on = 5e3, sn = 2e4, jt = H.forwardRef(
2768
- ({
2769
- name: e,
2770
- disabled: t,
2771
- label: r,
2772
- labelHidden: a,
2773
- onMaskChange: n,
2774
- onChange: o,
2775
- onBlur: s,
2776
- onFocus: i,
2777
- onTextInputMaskBlur: h,
2778
- rightElement: u,
2779
- spacing: d,
2780
- ...p
2781
- }, l) => {
2782
- const [m, y] = G(!0), [w, _] = G({
2783
- message: null,
2784
- politeness: null
2785
- }), k = V(!0), D = V(), $ = V(null), N = Wa([l, $]), O = m ? "Show" : "Hide", x = () => {
2786
- clearTimeout(D.current), k.current || (D.current = window.setTimeout(() => {
2787
- k.current = !0, y(!0), _({
2788
- announcementTimeout: on,
2789
- politeness: "polite",
2790
- message: `${r} hiding characters`
2791
- }), n && n(!0);
2792
- }, sn));
2793
- }, Q = (g) => {
2794
- g.preventDefault();
2795
- const b = !k.current;
2796
- k.current = b, x(), y(b), _({
2797
- announcementTimeout: nn,
2798
- politeness: "assertive",
2799
- message: b ? "Characters hidden" : "Characters showing"
2800
- }), n && n(b);
2801
- }, P = (g) => {
2802
- var b;
2803
- const { relatedTarget: E } = g, C = (b = $.current) == null ? void 0 : b.parentElement;
2804
- C != null && C.contains(E) || h && h();
2805
- }, Re = (g) => {
2806
- x(), s && s(g), P(g);
2807
- }, Ne = (g) => {
2808
- x(), i && i(g);
2809
- }, xe = (g) => {
2810
- x(), o && o(g);
2811
- };
2812
- return z(() => () => {
2813
- clearTimeout(D.current);
2814
- }, []), /* @__PURE__ */ T(ne, { children: [
2815
- /* @__PURE__ */ c(
2816
- ze,
2817
- {
2818
- ref: N,
2819
- name: e,
2820
- label: r,
2821
- labelHidden: a,
2822
- type: m ? "password" : "text",
2823
- disabled: t,
2824
- spacing: d,
2825
- onBlur: Re,
2826
- onFocus: Ne,
2827
- onChange: xe,
2828
- rightElement: H.cloneElement(u, {
2829
- ref: l,
2830
- label: O,
2831
- onClick: Q,
2832
- onBlur: P,
2833
- disabled: t
2834
- }),
2835
- ...p
2836
- }
2837
- ),
2838
- /* @__PURE__ */ c(
2839
- Wt,
2840
- {
2841
- role: "status",
2842
- politeness: w.politeness,
2843
- clearAnnouncementDelay: w.announcementTimeout,
2844
- children: w.message
2845
- }
2846
- )
2847
- ] });
2848
- }
2849
- );
2850
- jt.displayName = "TextInputMask";
2851
- /*!
2852
- @versini/ui-form v1.3.6
2853
- © 2024 gizmette.com
2854
- */
2855
- try {
2856
- window.__VERSINI_UI_FORM__ || (window.__VERSINI_UI_FORM__ = {
2857
- version: "1.3.6",
2858
- buildTime: "07/08/2024 04:31 PM EDT",
2859
- homepage: "https://github.com/aversini/ui-components",
2860
- license: "MIT"
2861
- });
2862
- } catch {
2863
- }
2864
- const cn = (e) => {
2865
- let t = "";
2866
- if (typeof e == "number" || typeof e == "string")
2867
- t = "m-" + e;
2868
- else {
2869
- const r = [];
2870
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2871
- }
2872
- return t;
2873
- }, _e = ({
2874
- children: e,
2875
- fill: t,
2876
- viewBox: r,
2877
- className: a,
2878
- defaultViewBox: n,
2879
- defaultClassName: o,
2880
- spacing: s,
2881
- title: i,
2882
- semantic: h = !1,
2883
- ...u
2884
- }) => {
2885
- const d = cn(s), p = f(
2886
- d,
2887
- a || o
2888
- );
2889
- return /* @__PURE__ */ T(ne, { children: [
2890
- /* @__PURE__ */ c(
2891
- "svg",
2892
- {
2893
- xmlns: "http://www.w3.org/2000/svg",
2894
- className: p,
2895
- viewBox: r || n,
2896
- fill: t || "currentColor",
2897
- role: "img",
2898
- "aria-hidden": !h,
2899
- focusable: !1,
2900
- ...u,
2901
- children: e
2902
- }
2903
- ),
2904
- i && h && /* @__PURE__ */ c("span", { className: "sr-only", children: i })
2905
- ] });
2906
- };
2907
- /*!
2908
- @versini/ui-private v1.4.6
2909
- © 2024 gizmette.com
2910
- */
2911
- try {
2912
- window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
2913
- version: "1.4.6",
2914
- buildTime: "07/14/2024 07:45 PM EDT",
2915
- homepage: "https://github.com/aversini/ui-components",
2916
- license: "MIT"
2917
- });
2918
- } catch {
2919
- }
2920
- const ln = ({
2921
- className: e,
2922
- viewBox: t,
2923
- spacing: r,
2924
- ...a
2925
- }) => /* @__PURE__ */ c(
2926
- _e,
2927
- {
2928
- defaultViewBox: "0 0 1200 500",
2929
- defaultClassName: "w-full",
2930
- viewBox: t,
2931
- className: e,
2932
- spacing: r,
2933
- title: "Sassy Dog",
2934
- ...a,
2935
- children: /* @__PURE__ */ c("g", { transform: "matrix(11.9092 0 0 11.9092 470.0017 250.0009)", id: "879221", children: /* @__PURE__ */ c(
2936
- "path",
2937
- {
2938
- vectorEffect: "non-scaling-stroke",
2939
- transform: " translate(-50.7473, -45.4051)",
2940
- d: "M 89.2 27 c 0 -0.2 -0.1 -0.5 -0.3 -0.6 c -0.6 -0.4 -1.6 -0.1 -2.2 0 c -1.5 0.2 -2.9 0.4 -4.5 0.4 c -2.2 0 -4.5 -0.1 -6.7 -0.4 c -2 -0.3 -3.7 -0.9 -5.8 -0.3 c -3 0.8 -4.9 3.2 -4.8 6.3 c 0.1 1.8 -0.2 3.2 -0.8 4.8 c -0.6 1.5 -1.3 1.7 -2.7 1.7 c -9.7 0 -19.3 -0.1 -29 0 c -1.7 0 -3.5 0 -5.3 0 c -2.5 0 -5 0.5 -7.5 0 c -1.8 -0.4 -3.6 -1.3 -4.9 -2.6 c -0.3 -0.3 -0.9 -1.2 -1.2 -1.2 c -0.4 0.1 -0.4 1.3 -0.4 1.6 c 0 1.3 0.5 2.6 0.5 3.9 c 0 1.3 -0.6 2.4 -1 3.6 c -0.4 1.4 -0.4 2.8 -0.2 4.2 c 0.4 2.3 0.8 4.7 1 7.1 c 0.2 2.1 0.2 4.1 0.4 6.2 c 0.2 1.7 0.3 2.5 2.5 2.8 c 2.6 0.4 2.6 -0.5 3.2 -2.2 c 0.8 -2.1 1.5 -4.3 2.3 -6.4 c 0.7 -1.6 1.3 -5.1 5.7 -3.4 c 2.4 0.9 4.9 1.4 7.4 2.1 c 2.7 0.7 5.5 1.4 8.2 1.9 c 5.5 1.1 11.1 1.7 16.8 2 c 0.6 0 1 0 1.4 0.5 c 1.5 1.9 -0.3 5.3 3.5 5.9 c 3.4 0.5 3.4 -1.9 3.8 -4 c 0.2 -1.2 0.4 -2.3 0.7 -3.4 c 0.1 -0.5 0.5 -1 0.9 -1.3 c 4.7 -2.8 7.4 -8.3 6.6 -13.8 c -0.1 -0.9 -0.4 -1.8 -0.3 -2.8 c 0.2 -2 2.7 -2.8 4.2 -3.6 c 1.9 -1.1 4 -2.1 5.6 -3.6 c 1.1 -1 2 -2.3 2.5 -3.7 C 89.1 28.2 89.3 27.5 89.2 27 z M 73.2 40.4 c -0.2 2.1 -1.1 3.1 -3 3.5 c -3.4 0.7 -5.6 -1.6 -4.6 -4.9 c 0.7 -2.2 1.5 -4.3 2.5 -6.3 c 1 -2 1.9 -2 3.1 -0.1 C 72.7 35 73.5 37.6 73.2 40.4 z M 76.4 31.2 c -0.6 0 -1.1 -0.5 -1.1 -1.1 c 0 -0.6 0.5 -1.1 1.1 -1.1 c 0.6 0 1.1 0.5 1.1 1.1 C 77.5 30.7 77 31.2 76.4 31.2 z",
2941
- strokeLinecap: "round"
2942
- }
2943
- ) })
2944
- }
2945
- ), dn = ({
2946
- className: e,
2947
- viewBox: t,
2948
- spacing: r,
2949
- title: a,
2950
- monotone: n,
2951
- ...o
2952
- }) => /* @__PURE__ */ T(
2953
- _e,
2954
- {
2955
- defaultViewBox: "0 0 640 512",
2956
- defaultClassName: "size-5",
2957
- viewBox: t,
2958
- className: e,
2959
- spacing: r,
2960
- title: a || "Hide",
2961
- ...o,
2962
- children: [
2963
- /* @__PURE__ */ c(
2964
- "path",
2965
- {
2966
- opacity: n ? "1" : "0.4",
2967
- d: "M360.8 380.3C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144c0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5zM198.5 252.4c-3.7 .8-6.7 3.7-6.5 7.7c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9c1.9-.5 3.9-1.1 5.7-1.7l-120-94.6zm89-52.4l94.8 74.3c2.7-13.9 2.4-28.6-1.5-43.2c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 2.7-.2 5.4-.5 8zM432 256c0 17.7-3.2 34.6-9 50.2l84.1 65.9c32.3-36.6 54.6-75.4 66.4-103.9c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32c-60 0-111.1 20.3-152.8 48.7L207 136.9c23.1-15.7 51-24.9 81-24.9c79.5 0 144 64.5 144 144z"
2968
- }
2969
- ),
2970
- /* @__PURE__ */ c("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
2971
- ]
2972
- }
2973
- ), un = ({
2974
- className: e,
2975
- viewBox: t,
2976
- spacing: r,
2977
- title: a,
2978
- monotone: n,
2979
- ...o
2980
- }) => /* @__PURE__ */ T(
2981
- _e,
2982
- {
2983
- defaultViewBox: "0 0 512 512",
2984
- defaultClassName: "size-5",
2985
- viewBox: t,
2986
- className: e,
2987
- spacing: r,
2988
- title: a || "Key",
2989
- ...o,
2990
- children: [
2991
- /* @__PURE__ */ c(
2992
- "path",
2993
- {
2994
- className: "fa-secondary",
2995
- opacity: n ? "1" : "0.4",
2996
- d: "M168.3 229.7L282.3 343.7l0 0s0 0 0 0L249 377c-4.5 4.5-10.6 7-17 7H192v40c0 13.3-10.7 24-24 24H128v40c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V408c0-6.4 2.5-12.5 7-17L168.3 229.7s0 0 0 0l0 0z"
2997
- }
2998
- ),
2999
- /* @__PURE__ */ c(
3000
- "path",
3001
- {
3002
- className: "fa-primary",
3003
- d: "M168.3 229.7L282.3 343.7l0 0c16.9 5.4 35 8.3 53.7 8.3c97.2 0 176-78.8 176-176S433.2 0 336 0S160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7l0 0zM336 136a40 40 0 1 1 80 0 40 40 0 1 1 -80 0z"
3004
- }
3005
- )
3006
- ]
3007
- }
3008
- ), mn = ({
3009
- className: e,
3010
- viewBox: t,
3011
- spacing: r,
3012
- title: a,
3013
- monotone: n,
3014
- ...o
3015
- }) => /* @__PURE__ */ T(
3016
- _e,
3017
- {
3018
- defaultViewBox: "0 0 576 512",
3019
- defaultClassName: "size-5",
3020
- viewBox: t,
3021
- className: e,
3022
- spacing: r,
3023
- title: a || "Show",
3024
- ...o,
3025
- children: [
3026
- /* @__PURE__ */ c(
3027
- "path",
3028
- {
3029
- opacity: n ? "1" : "0.4",
3030
- d: "M95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 400a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
3031
- }
3032
- ),
3033
- /* @__PURE__ */ c("path", { d: "M224 256c35.3 0 64-28.7 64-64c0-7.1-1.2-13.9-3.3-20.3c-1.8-5.5 1.6-11.9 7.4-11.7c40.8 1.7 77.5 29.6 88.6 71.1c13.7 51.2-16.7 103.9-67.9 117.6s-103.9-16.7-117.6-67.9c-1.9-6.9-2.9-13.9-3.2-20.7c-.3-5.8 6.1-9.2 11.7-7.4c6.4 2.1 13.2 3.3 20.3 3.3z" })
3034
- ]
3035
- }
3036
- );
3037
- /*!
3038
- @versini/ui-icons v1.11.0
3039
- © 2024 gizmette.com
3040
- */
3041
- try {
3042
- window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
3043
- version: "1.11.0",
3044
- buildTime: "07/14/2024 07:45 PM EDT",
3045
- homepage: "https://github.com/aversini/ui-components",
3046
- license: "MIT"
3047
- });
3048
- } catch {
3049
- }
3050
- const hn = (e) => {
3051
- let t = "";
3052
- if (typeof e == "number" || typeof e == "string")
3053
- t = "m-" + e;
3054
- else {
3055
- const r = [];
3056
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
3057
- }
3058
- return t;
3059
- }, pn = "av-flexgrid", pe = "av-flexgrid-item", Te = 0.25, Ft = H.createContext({
3060
- columnGap: 0,
3061
- rowGap: 0
3062
- }), mt = ({
3063
- children: e,
3064
- className: t,
3065
- columnGap: r = 1,
3066
- rowGap: a = 0,
3067
- height: n = "auto",
3068
- width: o = "auto",
3069
- direction: s = "row",
3070
- alignHorizontal: i = "normal",
3071
- alignVertical: h = "normal",
3072
- spacing: u,
3073
- ...d
3074
- }) => {
3075
- const p = {
3076
- flexDirection: s,
3077
- justifyContent: i,
3078
- alignItems: h,
3079
- height: n,
3080
- width: o,
3081
- /**
3082
- * Trick to account for the extra space taken
3083
- * by the columnGap and rowGap that will be applied
3084
- * to all FlexgridItems (see context and paddings).
3085
- */
3086
- marginLeft: r * -1 * Te + "rem",
3087
- marginTop: a * -1 * Te + "rem"
3088
- }, l = f(
3089
- pn,
3090
- t,
3091
- "box-border flex flex-wrap"
3092
- ), m = { columnGap: r, rowGap: a }, y = u ? "div" : H.Fragment;
3093
- return /* @__PURE__ */ c(y, { ...u ? { className: hn(u) } : {}, children: /* @__PURE__ */ c("div", { className: l, style: p, ...d, children: /* @__PURE__ */ c(Ft.Provider, { value: m, children: e }) }) });
3094
- }, Be = (e, t) => f({
3095
- "basis-1/12": e === 1 && !t,
3096
- "sm:basis-1/12": e === 1 && t === "sm",
3097
- "md:basis-1/12": e === 1 && t === "md",
3098
- "lg:basis-1/12": e === 1 && t === "lg",
3099
- "xl:basis-1/12": e === 1 && t === "xl",
3100
- "2xl:basis-1/12": e === 1 && t === "2xl",
3101
- "basis-2/12": e === 2 && !t,
3102
- "sm:basis-2/12": e === 2 && t === "sm",
3103
- "md:basis-2/12": e === 2 && t === "md",
3104
- "lg:basis-2/12": e === 2 && t === "lg",
3105
- "xl:basis-2/12": e === 2 && t === "xl",
3106
- "2xl:basis-2/12": e === 2 && t === "2xl",
3107
- "basis-3/12": e === 3 && !t,
3108
- "sm:basis-3/12": e === 3 && t === "sm",
3109
- "md:basis-3/12": e === 3 && t === "md",
3110
- "lg:basis-3/12": e === 3 && t === "lg",
3111
- "xl:basis-3/12": e === 3 && t === "xl",
3112
- "2xl:basis-3/12": e === 3 && t === "2xl",
3113
- "basis-4/12": e === 4 && !t,
3114
- "sm:basis-4/12": e === 4 && t === "sm",
3115
- "md:basis-4/12": e === 4 && t === "md",
3116
- "lg:basis-4/12": e === 4 && t === "lg",
3117
- "xl:basis-4/12": e === 4 && t === "xl",
3118
- "2xl:basis-4/12": e === 4 && t === "2xl",
3119
- "basis-5/12": e === 5 && !t,
3120
- "sm:basis-5/12": e === 5 && t === "sm",
3121
- "md:basis-5/12": e === 5 && t === "md",
3122
- "lg:basis-5/12": e === 5 && t === "lg",
3123
- "xl:basis-5/12": e === 5 && t === "xl",
3124
- "2xl:basis-5/12": e === 5 && t === "2xl",
3125
- "basis-6/12": e === 6 && !t,
3126
- "sm:basis-6/12": e === 6 && t === "sm",
3127
- "md:basis-6/12": e === 6 && t === "md",
3128
- "lg:basis-6/12": e === 6 && t === "lg",
3129
- "xl:basis-6/12": e === 6 && t === "xl",
3130
- "2xl:basis-6/12": e === 6 && t === "2xl",
3131
- "basis-7/12": e === 7 && !t,
3132
- "sm:basis-7/12": e === 7 && t === "sm",
3133
- "md:basis-7/12": e === 7 && t === "md",
3134
- "lg:basis-7/12": e === 7 && t === "lg",
3135
- "xl:basis-7/12": e === 7 && t === "xl",
3136
- "2xl:basis-7/12": e === 7 && t === "2xl",
3137
- "basis-8/12": e === 8 && !t,
3138
- "sm:basis-8/12": e === 8 && t === "sm",
3139
- "md:basis-8/12": e === 8 && t === "md",
3140
- "lg:basis-8/12": e === 8 && t === "lg",
3141
- "xl:basis-8/12": e === 8 && t === "xl",
3142
- "2xl:basis-8/12": e === 8 && t === "2xl",
3143
- "basis-9/12": e === 9 && !t,
3144
- "sm:basis-9/12": e === 9 && t === "sm",
3145
- "md:basis-9/12": e === 9 && t === "md",
3146
- "lg:basis-9/12": e === 9 && t === "lg",
3147
- "xl:basis-9/12": e === 9 && t === "xl",
3148
- "2xl:basis-9/12": e === 9 && t === "2xl",
3149
- "basis-10/12": e === 10 && !t,
3150
- "sm:basis-10/12": e === 10 && t === "sm",
3151
- "md:basis-10/12": e === 10 && t === "md",
3152
- "lg:basis-10/12": e === 10 && t === "lg",
3153
- "xl:basis-10/12": e === 10 && t === "xl",
3154
- "2xl:basis-10/12": e === 10 && t === "2xl",
3155
- "basis-11/12": e === 11 && !t,
3156
- "sm:basis-11/12": e === 11 && t === "sm",
3157
- "md:basis-11/12": e === 11 && t === "md",
3158
- "lg:basis-11/12": e === 11 && t === "lg",
3159
- "xl:basis-11/12": e === 11 && t === "xl",
3160
- "2xl:basis-11/12": e === 11 && t === "2xl",
3161
- "basis-full": e === 12 && !t,
3162
- "sm:basis-full": e === 12 && t === "sm",
3163
- "md:basis-full": e === 12 && t === "md",
3164
- "lg:basis-full": e === 12 && t === "lg",
3165
- "xl:basis-full": e === 12 && t === "xl",
3166
- "2xl:basis-full": e === 12 && t === "2xl"
3167
- }), gn = ({
3168
- className: e,
3169
- span: t
3170
- }) => {
3171
- if (!t)
3172
- return f(e, pe, "box-border basis-auto");
3173
- if (typeof t == "number")
3174
- return f(e, pe, "box-border max-w-full", {
3175
- [`${Be(t)}`]: !0
3176
- });
3177
- if (typeof t == "string")
3178
- return f(e, pe, "box-border basis-auto", {
3179
- "max-w-full grow": t === "auto"
3180
- });
3181
- if (typeof t == "object") {
3182
- const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Be(n) : Be(n, a));
3183
- return f(
3184
- e,
3185
- pe,
3186
- "box-border",
3187
- r
3188
- );
3189
- }
3190
- }, J = ({
3191
- children: e,
3192
- className: t,
3193
- span: r,
3194
- ...a
3195
- }) => {
3196
- const { columnGap: n, rowGap: o } = pt(Ft), s = {
3197
- paddingLeft: n * Te + "rem",
3198
- paddingTop: o * Te + "rem"
3199
- }, i = gn({
3200
- className: t,
3201
- span: r
3202
- });
3203
- return /* @__PURE__ */ c("div", { className: i, style: s, ...a, children: e });
3204
- };
3205
- /*!
3206
- @versini/ui-system v1.4.2
3207
- © 2024 gizmette.com
3208
- */
3209
- try {
3210
- window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
3211
- version: "1.4.2",
3212
- buildTime: "07/05/2024 05:27 PM EDT",
3213
- homepage: "https://github.com/aversini/ui-components",
3214
- license: "MIT"
3215
- });
3216
- } catch {
3217
- }
3218
- const fn = "ASK! ME! ANYTHING!", Jt = "Sassy Saint", yn = "gizmette.com", bn = "Log in", En = "Sign in with a Passkey", So = "Log out", wn = "Password", Tn = "Powered by OpenAI", _o = "Send", Ro = "Profile", No = "Statistics", xo = "Chat history", Co = "About", Oo = "Type your question here", Po = "Clear chat", Do = "Cancel chat", $o = "N/A", Lo = {
3219
- PREFERENCES: {
3220
- TITLE: "User preferences",
3221
- NAME: "Name",
3222
- EMAIL: "Email",
3223
- ENGINE_DETAILS: "Show message statistics",
3224
- LOCATION: "Current location",
3225
- MODEL_TYPE: "Use GPT model 4"
3226
- },
3227
- CURRENT_STATISTICS: {
3228
- TITLE: "Current chat statistics",
3229
- MODEL_NAME: "GPT model",
3230
- TOKENS_USED: "Tokens used",
3231
- REMAINING_TOKENS: "Remaining tokens",
3232
- PROCESSING_TIME: "Average response time"
3233
- },
3234
- MAIN_STATISTICS: {
3235
- TITLE: "Lifetime statistics",
3236
- TOTAL: "Total chat session",
3237
- PROCESSING_TIME: "Average response time"
3238
- },
3239
- HISTORY: {
3240
- TITLE: "Chat history"
3241
- },
3242
- ABOUT: {
3243
- TITLE_CLIENT: "Client details",
3244
- TITLE_SERVER: "Server details",
3245
- VERSION: "Version",
3246
- BUILD_TIMESTAMP: "Build date",
3247
- ENGINE: "OpenAI model",
3248
- PLUGIN: "Plugin"
3249
- }
3250
- }, In = ({
3251
- serverStats: e
3252
- }) => /* @__PURE__ */ c(
3253
- Ga,
3254
- {
3255
- mode: "light",
3256
- row1: /* @__PURE__ */ T("div", { children: [
3257
- Jt,
3258
- " v",
3259
- "3.4.0",
3260
- " - ",
3261
- Tn,
3262
- Fe && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
3263
- ] }),
3264
- row2: /* @__PURE__ */ T("div", { children: [
3265
- "© ",
3266
- (/* @__PURE__ */ new Date()).getFullYear(),
3267
- " ",
3268
- yn
3269
- ] })
3270
- }
3271
- ), vn = ft(() => import("./LazyHeader.C1RUIYBp.js")), An = () => {
3272
- const { isAuthenticated: e } = je();
3273
- return /* @__PURE__ */ T(ne, { children: [
3274
- e && /* @__PURE__ */ c(yt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(vn, {}) }),
3275
- /* @__PURE__ */ T("div", { className: "flex items-center justify-center", children: [
3276
- /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(ln, {}) }),
3277
- /* @__PURE__ */ T("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3278
- /* @__PURE__ */ c("h1", { children: Jt }),
3279
- /* @__PURE__ */ c("h2", { children: fn })
3280
- ] })
3281
- ] })
3282
- ] });
3283
- }, kn = () => {
3284
- const { login: e, logoutReason: t, loginWithPasskey: r } = je(), [a, n] = G(""), [o, s] = G(""), [i, h] = G(!0), [u, d] = G({
3285
- username: "",
3286
- password: ""
3287
- }), p = async (l) => {
3288
- l.preventDefault(), await e(
3289
- u.username,
3290
- u.password,
3291
- q.CODE
3292
- ) || (s(""), n("Invalid username or password"));
3293
- };
3294
- return z(() => {
3295
- var l;
3296
- (l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
3297
- var m;
3298
- (m = document.getElementById("root")) == null || m.classList.replace("app-hidden", "fadeIn");
3299
- }, 500);
3300
- }), z(() => {
3301
- t && s(t);
3302
- }, [t]), /* @__PURE__ */ T(ne, { children: [
3303
- /* @__PURE__ */ T(Va, { children: [
3304
- /* @__PURE__ */ c("div", { className: _a(), children: /* @__PURE__ */ c(An, {}) }),
3305
- /* @__PURE__ */ T("form", { className: "mt-5", onSubmit: p, children: [
3306
- /* @__PURE__ */ c(mt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(J, { span: 6, children: /* @__PURE__ */ T(Ba, { mode: "dark", children: [
3307
- /* @__PURE__ */ c(J, { span: 12, children: o && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
3308
- /* @__PURE__ */ c(J, { span: 12, children: /* @__PURE__ */ c(
3309
- ze,
3310
- {
3311
- required: !0,
3312
- autoCapitalize: "off",
3313
- autoComplete: "off",
3314
- autoCorrect: "off",
3315
- mode: "dark",
3316
- focusMode: "light",
3317
- name: "username",
3318
- label: "Username",
3319
- onChange: (l) => {
3320
- d({
3321
- ...u,
3322
- username: l.target.value
3323
- }), n("");
3324
- },
3325
- error: a !== ""
3326
- }
3327
- ) }),
3328
- /* @__PURE__ */ c(J, { span: 12, children: /* @__PURE__ */ c(
3329
- jt,
3330
- {
3331
- required: !0,
3332
- autoCapitalize: "off",
3333
- autoComplete: "off",
3334
- autoCorrect: "off",
3335
- mode: "dark",
3336
- focusMode: "light",
3337
- name: "password",
3338
- label: wn,
3339
- rightElement: /* @__PURE__ */ c(Ve, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(mn, {}) : /* @__PURE__ */ c(dn, {}) }),
3340
- onMaskChange: h,
3341
- onChange: (l) => {
3342
- d({
3343
- ...u,
3344
- password: l.target.value
3345
- }), n("");
3346
- },
3347
- error: a !== "",
3348
- helperText: a
3349
- }
3350
- ) }),
3351
- /* @__PURE__ */ c(J, { span: 12, children: /* @__PURE__ */ c(
3352
- Bt,
3353
- {
3354
- mode: "light",
3355
- focusMode: "light",
3356
- fullWidth: !0,
3357
- noBorder: !0,
3358
- type: "submit",
3359
- className: "mb-4 mt-6",
3360
- children: bn
3361
- }
3362
- ) })
3363
- ] }) }) }),
3364
- /* @__PURE__ */ c("div", { className: "text-center text-copy-light", children: "or" }),
3365
- /* @__PURE__ */ c(mt, { alignHorizontal: "center", children: /* @__PURE__ */ c(J, { span: 6, children: /* @__PURE__ */ c(
3366
- Ve,
3367
- {
3368
- mode: "dark",
3369
- focusMode: "light",
3370
- fullWidth: !0,
3371
- noBorder: !0,
3372
- className: "mb-4 mt-1",
3373
- labelRight: En,
3374
- onClick: r,
3375
- children: /* @__PURE__ */ c(un, { className: "size-4" })
3376
- }
3377
- ) }) })
3378
- ] })
3379
- ] }),
3380
- /* @__PURE__ */ c(In, {})
3381
- ] });
3382
- }, Sn = ft(() => import("./App.DpwMzH8A.js").then((e) => e.App)), _n = ({ isComponent: e }) => {
3383
- const { isAuthenticated: t } = je();
3384
- return t ? /* @__PURE__ */ c(yt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Sn, { isComponent: e }) }) : /* @__PURE__ */ c(kn, {});
3385
- }, Rn = ({
3386
- isComponent: e = !1,
3387
- domain: t = Sa
3388
- }) => /* @__PURE__ */ c(ne, { children: /* @__PURE__ */ c(ga, { clientId: fa, domain: t, children: /* @__PURE__ */ c(_n, { isComponent: e }) }) }), Nn = ({ domain: e }) => /* @__PURE__ */ c(Rn, { isComponent: !0, domain: e });
3389
- Nn.displayName = "SassySaint-3.4.0";
3390
- export {
3391
- Kt as A,
3392
- Co as ABOUT_TITLE,
3393
- qn as ACTION_LOCATION,
3394
- jn as ACTION_MESSAGE,
3395
- Jn as ACTION_MODEL,
3396
- Fn as ACTION_RESET,
3397
- zn as ACTION_RESTORE,
3398
- Xn as ACTION_SEARCH,
3399
- Zn as ACTION_SORT,
3400
- Qn as ACTION_STREAMING,
3401
- In as AppFooter,
3402
- Do as CANCEL,
3403
- Lo as CARDS,
3404
- Po as CLEAR,
3405
- Vn as ERROR_MESSAGE,
3406
- ze as G,
3407
- Yn as GPT4_MAX_TOKENS,
3408
- xo as HISTORY_TITLE,
3409
- je as Hr,
3410
- to as LOCAL_STORAGE_CHAT_DETAILS,
3411
- no as LOCAL_STORAGE_LOCATION,
3412
- eo as LOCAL_STORAGE_PREFIX,
3413
- ro as LOCAL_STORAGE_SEARCH,
3414
- ao as LOCAL_STORAGE_SORT,
3415
- So as LOG_OUT,
3416
- Ya as M,
3417
- Wn as MODEL_GPT4,
3418
- An as MessagesContainerHeader,
3419
- bo as N,
3420
- Ba as N$1,
3421
- $o as NA,
3422
- Ve as O,
3423
- Ro as PROFILE_TITLE,
3424
- Hn as ROLE_ASSISTANT,
3425
- Gn as ROLE_HIDDEN,
3426
- Bn as ROLE_INTERNAL,
3427
- Kn as ROLE_SYSTEM,
3428
- Un as ROLE_USER,
3429
- Se as S,
3430
- _o as SEND,
3431
- No as STATS,
3432
- oo as STATS_SEPARATOR,
3433
- Nn as SassySaint,
3434
- Oo as TYPE_QUESTION,
3435
- Wt as U,
3436
- q as Y,
3437
- vo as a,
3438
- mt as b,
3439
- Va as c,
3440
- wo as c$1,
3441
- io as convertLatitudeToDMS,
3442
- co as convertLongitudeToDMS,
3443
- go as durationFormatter,
3444
- mo as extractAverage,
3445
- Ut as f,
3446
- Wa as f$1,
3447
- un as f$2,
3448
- _e as g,
3449
- lo as getCurrentGeoLocation,
3450
- _a as getMessageContaintWrapperClass,
3451
- Je as i,
3452
- Eo as i$1,
3453
- ho as isLastMessageFromRole,
3454
- J as j,
3455
- Ao as l,
3456
- To as n,
3457
- po as numberFormatter,
3458
- qa as o,
3459
- ko as p,
3460
- fo as pluralize,
3461
- Io as r,
3462
- uo as renderDataAsList,
3463
- yo as s,
3464
- so as truncate,
3465
- Bt as x
3466
- };