@versini/sassysaint 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.cLV1bpwK.js → App.DJozcBeB.js} +3 -3
- package/dist/chunks/{LazyHeader.IkHWXL63.js → LazyHeader.B1723ukv.js} +7 -7
- package/dist/chunks/{LazyMarkdownWithExtra.CbkyblK3.js → LazyMarkdownWithExtra.BZSSztwq.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.D1gHF9UN.js → LazyMessageAssistant.uBxG6-gS.js} +4 -4
- package/dist/chunks/{index.DruzEDnN.CpJnm_FK.js → index.DruzEDnN.wUuoTJhD.js} +1 -1
- package/dist/chunks/{index.5k1aFm13.js → index.TaY_5bD3.js} +608 -586
- package/dist/chunks/{useLocalStorage.CgBXkOng.js → useLocalStorage.BXlADEdF.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -2
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as c, jsxs as
|
|
1
|
+
import { jsx as c, jsxs as T, Fragment as q } from "react/jsx-runtime";
|
|
2
2
|
import * as F from "react";
|
|
3
|
-
import K, { createContext as
|
|
3
|
+
import K, { createContext as xt, useRef as W, useState as U, useCallback as $e, useEffect as z, useContext as Xe, useMemo as Nt, useId as Ct, useReducer as Rt, useLayoutEffect as Ot, lazy as Ze, Suspense as et } from "react";
|
|
4
4
|
import g from "clsx";
|
|
5
|
-
var
|
|
5
|
+
var Dt = Object.defineProperty, $t = (e, t, r) => t in e ? Dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ye = (e, t, r) => ($t(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
6
6
|
/*!
|
|
7
|
-
@versini/auth-provider v5.
|
|
7
|
+
@versini/auth-provider v5.1.1
|
|
8
8
|
© 2024 gizmette.com
|
|
9
9
|
*/
|
|
10
10
|
try {
|
|
11
11
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
12
|
-
version: "5.
|
|
13
|
-
buildTime: "07/
|
|
12
|
+
version: "5.1.1",
|
|
13
|
+
buildTime: "07/07/2024 10:59 AM EDT",
|
|
14
14
|
homepage: "https://github.com/aversini/auth-client",
|
|
15
15
|
license: "MIT"
|
|
16
16
|
});
|
|
17
17
|
} catch {
|
|
18
18
|
}
|
|
19
19
|
/*!
|
|
20
|
-
@versini/auth-common v2.
|
|
20
|
+
@versini/auth-common v2.11.0
|
|
21
21
|
© 2024 gizmette.com
|
|
22
22
|
*/
|
|
23
23
|
try {
|
|
24
24
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
25
|
-
version: "2.
|
|
26
|
-
buildTime: "07/
|
|
25
|
+
version: "2.11.0",
|
|
26
|
+
buildTime: "07/07/2024 10:59 AM EDT",
|
|
27
27
|
homepage: "https://github.com/aversini/auth-client",
|
|
28
28
|
license: "MIT"
|
|
29
29
|
});
|
|
@@ -37,14 +37,14 @@ const Q = {
|
|
|
37
37
|
REFRESH_TOKEN: "refresh_token"
|
|
38
38
|
}, Mt = {
|
|
39
39
|
CLIENT_ID: "X-Auth-ClientId"
|
|
40
|
-
},
|
|
40
|
+
}, I = {
|
|
41
41
|
ALG: "RS256",
|
|
42
42
|
USER_ID_KEY: "sub",
|
|
43
43
|
TOKEN_ID_KEY: "__raw",
|
|
44
44
|
NONCE_KEY: "_nonce",
|
|
45
45
|
USERNAME_KEY: "username",
|
|
46
46
|
ISSUER: "gizmette.com"
|
|
47
|
-
},
|
|
47
|
+
}, Lt = `-----BEGIN PUBLIC KEY-----
|
|
48
48
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
49
49
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
50
50
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -52,33 +52,33 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
|
|
|
52
52
|
l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
|
|
53
53
|
sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
|
|
54
54
|
awIDAQAB
|
|
55
|
-
-----END PUBLIC KEY-----`,
|
|
55
|
+
-----END PUBLIC KEY-----`, me = {
|
|
56
56
|
AUTHENTICATE: "authenticate",
|
|
57
57
|
CODE: "code",
|
|
58
58
|
LOGOUT: "logout"
|
|
59
|
-
},
|
|
60
|
-
function
|
|
59
|
+
}, he = crypto, tt = (e) => e instanceof CryptoKey, X = new TextEncoder(), pe = new TextDecoder();
|
|
60
|
+
function Pt(...e) {
|
|
61
61
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
62
62
|
let a = 0;
|
|
63
63
|
for (const n of e)
|
|
64
64
|
r.set(n, a), a += n.length;
|
|
65
65
|
return r;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Ut = (e) => {
|
|
68
68
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
69
69
|
for (let a = 0; a < t.length; a++)
|
|
70
70
|
r[a] = t.charCodeAt(a);
|
|
71
71
|
return r;
|
|
72
|
-
},
|
|
72
|
+
}, ce = (e) => {
|
|
73
73
|
let t = e;
|
|
74
|
-
t instanceof Uint8Array && (t =
|
|
74
|
+
t instanceof Uint8Array && (t = pe.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
75
75
|
try {
|
|
76
|
-
return
|
|
76
|
+
return Ut(t);
|
|
77
77
|
} catch {
|
|
78
78
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
let
|
|
81
|
+
let j = class extends Error {
|
|
82
82
|
static get code() {
|
|
83
83
|
return "ERR_JOSE_GENERIC";
|
|
84
84
|
}
|
|
@@ -86,7 +86,7 @@ let W = class extends Error {
|
|
|
86
86
|
var r;
|
|
87
87
|
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
88
88
|
}
|
|
89
|
-
},
|
|
89
|
+
}, M = class extends j {
|
|
90
90
|
static get code() {
|
|
91
91
|
return "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
92
92
|
}
|
|
@@ -94,7 +94,7 @@ let W = class extends Error {
|
|
|
94
94
|
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
class
|
|
97
|
+
class Me extends j {
|
|
98
98
|
static get code() {
|
|
99
99
|
return "ERR_JWT_EXPIRED";
|
|
100
100
|
}
|
|
@@ -102,7 +102,7 @@ class $e extends W {
|
|
|
102
102
|
super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
class
|
|
105
|
+
class Ht extends j {
|
|
106
106
|
constructor() {
|
|
107
107
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
108
108
|
}
|
|
@@ -110,14 +110,14 @@ class Ut extends W {
|
|
|
110
110
|
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
let H = class extends
|
|
113
|
+
let H = class extends j {
|
|
114
114
|
constructor() {
|
|
115
115
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
116
116
|
}
|
|
117
117
|
static get code() {
|
|
118
118
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
119
119
|
}
|
|
120
|
-
}, k = class extends
|
|
120
|
+
}, k = class extends j {
|
|
121
121
|
constructor() {
|
|
122
122
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
123
123
|
}
|
|
@@ -125,7 +125,7 @@ let H = class extends W {
|
|
|
125
125
|
return "ERR_JWS_INVALID";
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
class rt extends
|
|
128
|
+
class rt extends j {
|
|
129
129
|
constructor() {
|
|
130
130
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
131
131
|
}
|
|
@@ -133,7 +133,7 @@ class rt extends W {
|
|
|
133
133
|
return "ERR_JWT_INVALID";
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
class
|
|
136
|
+
class Kt extends j {
|
|
137
137
|
constructor() {
|
|
138
138
|
super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
|
|
139
139
|
}
|
|
@@ -144,13 +144,13 @@ class Ht extends W {
|
|
|
144
144
|
function L(e, t = "algorithm.name") {
|
|
145
145
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Z(e, t) {
|
|
148
148
|
return e.name === t;
|
|
149
149
|
}
|
|
150
150
|
function be(e) {
|
|
151
151
|
return parseInt(e.name.slice(4), 10);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Bt(e) {
|
|
154
154
|
switch (e) {
|
|
155
155
|
case "ES256":
|
|
156
156
|
return "P-256";
|
|
@@ -162,7 +162,7 @@ function Kt(e) {
|
|
|
162
162
|
throw new Error("unreachable");
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Wt(e, t) {
|
|
166
166
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
167
167
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
168
168
|
if (t.length > 2) {
|
|
@@ -173,12 +173,12 @@ function Bt(e, t) {
|
|
|
173
173
|
throw new TypeError(r);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function jt(e, t, ...r) {
|
|
177
177
|
switch (t) {
|
|
178
178
|
case "HS256":
|
|
179
179
|
case "HS384":
|
|
180
180
|
case "HS512": {
|
|
181
|
-
if (!
|
|
181
|
+
if (!Z(e.algorithm, "HMAC"))
|
|
182
182
|
throw L("HMAC");
|
|
183
183
|
const a = parseInt(t.slice(2), 10);
|
|
184
184
|
if (be(e.algorithm.hash) !== a)
|
|
@@ -188,7 +188,7 @@ function Wt(e, t, ...r) {
|
|
|
188
188
|
case "RS256":
|
|
189
189
|
case "RS384":
|
|
190
190
|
case "RS512": {
|
|
191
|
-
if (!
|
|
191
|
+
if (!Z(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
192
192
|
throw L("RSASSA-PKCS1-v1_5");
|
|
193
193
|
const a = parseInt(t.slice(2), 10);
|
|
194
194
|
if (be(e.algorithm.hash) !== a)
|
|
@@ -198,7 +198,7 @@ function Wt(e, t, ...r) {
|
|
|
198
198
|
case "PS256":
|
|
199
199
|
case "PS384":
|
|
200
200
|
case "PS512": {
|
|
201
|
-
if (!
|
|
201
|
+
if (!Z(e.algorithm, "RSA-PSS"))
|
|
202
202
|
throw L("RSA-PSS");
|
|
203
203
|
const a = parseInt(t.slice(2), 10);
|
|
204
204
|
if (be(e.algorithm.hash) !== a)
|
|
@@ -213,9 +213,9 @@ function Wt(e, t, ...r) {
|
|
|
213
213
|
case "ES256":
|
|
214
214
|
case "ES384":
|
|
215
215
|
case "ES512": {
|
|
216
|
-
if (!
|
|
216
|
+
if (!Z(e.algorithm, "ECDSA"))
|
|
217
217
|
throw L("ECDSA");
|
|
218
|
-
const a =
|
|
218
|
+
const a = Bt(t);
|
|
219
219
|
if (e.algorithm.namedCurve !== a)
|
|
220
220
|
throw L(a, "algorithm.namedCurve");
|
|
221
221
|
break;
|
|
@@ -223,7 +223,7 @@ function Wt(e, t, ...r) {
|
|
|
223
223
|
default:
|
|
224
224
|
throw new TypeError("CryptoKey does not support this operation");
|
|
225
225
|
}
|
|
226
|
-
|
|
226
|
+
Wt(e, r);
|
|
227
227
|
}
|
|
228
228
|
function at(e, t, ...r) {
|
|
229
229
|
var a;
|
|
@@ -238,7 +238,7 @@ const Le = (e, ...t) => at("Key must be ", e, ...t);
|
|
|
238
238
|
function nt(e, t, ...r) {
|
|
239
239
|
return at(`Key for the ${e} algorithm must be `, t, ...r);
|
|
240
240
|
}
|
|
241
|
-
const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
241
|
+
const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", de = ["CryptoKey"], Gt = (...e) => {
|
|
242
242
|
const t = e.filter(Boolean);
|
|
243
243
|
if (t.length === 0 || t.length === 1)
|
|
244
244
|
return !0;
|
|
@@ -257,11 +257,11 @@ const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
257
257
|
}
|
|
258
258
|
return !0;
|
|
259
259
|
};
|
|
260
|
-
function
|
|
260
|
+
function Vt(e) {
|
|
261
261
|
return typeof e == "object" && e !== null;
|
|
262
262
|
}
|
|
263
263
|
function _e(e) {
|
|
264
|
-
if (!
|
|
264
|
+
if (!Vt(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
265
265
|
return !1;
|
|
266
266
|
if (Object.getPrototypeOf(e) === null)
|
|
267
267
|
return !0;
|
|
@@ -270,14 +270,14 @@ function _e(e) {
|
|
|
270
270
|
t = Object.getPrototypeOf(t);
|
|
271
271
|
return Object.getPrototypeOf(e) === t;
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const Jt = (e, t) => {
|
|
274
274
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
275
275
|
const { modulusLength: r } = t.algorithm;
|
|
276
276
|
if (typeof r != "number" || r < 2048)
|
|
277
277
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
278
278
|
}
|
|
279
279
|
};
|
|
280
|
-
function
|
|
280
|
+
function Ft(e) {
|
|
281
281
|
let t, r;
|
|
282
282
|
switch (e.kty) {
|
|
283
283
|
case "RSA": {
|
|
@@ -349,36 +349,36 @@ function Jt(e) {
|
|
|
349
349
|
}
|
|
350
350
|
return { algorithm: t, keyUsages: r };
|
|
351
351
|
}
|
|
352
|
-
const
|
|
352
|
+
const zt = async (e) => {
|
|
353
353
|
if (!e.alg)
|
|
354
354
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
355
|
-
const { algorithm: t, keyUsages: r } =
|
|
355
|
+
const { algorithm: t, keyUsages: r } = Ft(e), a = [
|
|
356
356
|
t,
|
|
357
357
|
e.ext ?? !1,
|
|
358
358
|
e.key_ops ?? r
|
|
359
359
|
], n = { ...e };
|
|
360
|
-
return delete n.alg, delete n.use,
|
|
361
|
-
}, st = (e) =>
|
|
360
|
+
return delete n.alg, delete n.use, he.subtle.importKey("jwk", n, ...a);
|
|
361
|
+
}, st = (e) => ce(e);
|
|
362
362
|
let we, Ee;
|
|
363
363
|
const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ct = async (e, t, r, a) => {
|
|
364
364
|
let n = e.get(t);
|
|
365
365
|
if (n != null && n[a])
|
|
366
366
|
return n[a];
|
|
367
|
-
const o = await
|
|
367
|
+
const o = await zt({ ...r, alg: a });
|
|
368
368
|
return n ? n[a] = o : e.set(t, { [a]: o }), o;
|
|
369
|
-
},
|
|
369
|
+
}, Yt = (e, t) => {
|
|
370
370
|
if (it(e)) {
|
|
371
371
|
let r = e.export({ format: "jwk" });
|
|
372
372
|
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? st(r.k) : (Ee || (Ee = /* @__PURE__ */ new WeakMap()), ct(Ee, e, r, t));
|
|
373
373
|
}
|
|
374
374
|
return e;
|
|
375
|
-
},
|
|
375
|
+
}, qt = (e, t) => {
|
|
376
376
|
if (it(e)) {
|
|
377
377
|
let r = e.export({ format: "jwk" });
|
|
378
378
|
return r.k ? st(r.k) : (we || (we = /* @__PURE__ */ new WeakMap()), ct(we, e, r, t));
|
|
379
379
|
}
|
|
380
380
|
return e;
|
|
381
|
-
},
|
|
381
|
+
}, Qt = { normalizePublicKey: Yt, normalizePrivateKey: qt }, P = (e, t, r = 0) => {
|
|
382
382
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
383
383
|
const a = e.indexOf(t[0], r);
|
|
384
384
|
if (a === -1)
|
|
@@ -404,7 +404,7 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
404
404
|
default:
|
|
405
405
|
throw new H("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
406
406
|
}
|
|
407
|
-
},
|
|
407
|
+
}, Xt = async (e, t, r, a, n) => {
|
|
408
408
|
let o, s;
|
|
409
409
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((l) => l.charCodeAt(0)));
|
|
410
410
|
switch (a) {
|
|
@@ -450,33 +450,33 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
450
450
|
default:
|
|
451
451
|
throw new H('Invalid or unsupported "alg" (Algorithm) value');
|
|
452
452
|
}
|
|
453
|
-
return
|
|
454
|
-
},
|
|
455
|
-
async function
|
|
453
|
+
return he.subtle.importKey(t, i, o, !1, s);
|
|
454
|
+
}, Zt = (e, t, r) => Xt(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
455
|
+
async function er(e, t, r) {
|
|
456
456
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
457
457
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
458
|
-
return
|
|
458
|
+
return Zt(e, t);
|
|
459
459
|
}
|
|
460
|
-
const
|
|
460
|
+
const le = (e) => e == null ? void 0 : e[Symbol.toStringTag], tr = (e, t) => {
|
|
461
461
|
if (!(t instanceof Uint8Array)) {
|
|
462
462
|
if (!ot(t))
|
|
463
|
-
throw new TypeError(nt(e, t, ...
|
|
463
|
+
throw new TypeError(nt(e, t, ...de, "Uint8Array"));
|
|
464
464
|
if (t.type !== "secret")
|
|
465
|
-
throw new TypeError(`${
|
|
465
|
+
throw new TypeError(`${le(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
466
466
|
}
|
|
467
|
-
},
|
|
467
|
+
}, rr = (e, t, r) => {
|
|
468
468
|
if (!ot(t))
|
|
469
|
-
throw new TypeError(nt(e, t, ...
|
|
469
|
+
throw new TypeError(nt(e, t, ...de));
|
|
470
470
|
if (t.type === "secret")
|
|
471
|
-
throw new TypeError(`${
|
|
471
|
+
throw new TypeError(`${le(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
472
472
|
if (t.algorithm && r === "verify" && t.type === "private")
|
|
473
|
-
throw new TypeError(`${
|
|
473
|
+
throw new TypeError(`${le(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
474
474
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
475
|
-
throw new TypeError(`${
|
|
476
|
-
},
|
|
477
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ?
|
|
475
|
+
throw new TypeError(`${le(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
476
|
+
}, ar = (e, t, r) => {
|
|
477
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? tr(e, t) : rr(e, t, r);
|
|
478
478
|
};
|
|
479
|
-
function
|
|
479
|
+
function nr(e, t, r, a, n) {
|
|
480
480
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
481
481
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
482
482
|
if (!a || a.crit === void 0)
|
|
@@ -495,13 +495,13 @@ function ar(e, t, r, a, n) {
|
|
|
495
495
|
}
|
|
496
496
|
return new Set(a.crit);
|
|
497
497
|
}
|
|
498
|
-
const
|
|
498
|
+
const or = (e, t) => {
|
|
499
499
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
500
500
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
501
501
|
if (t)
|
|
502
502
|
return new Set(t);
|
|
503
503
|
};
|
|
504
|
-
function
|
|
504
|
+
function sr(e, t) {
|
|
505
505
|
const r = `SHA-${e.slice(-3)}`;
|
|
506
506
|
switch (e) {
|
|
507
507
|
case "HS256":
|
|
@@ -526,27 +526,27 @@ function or(e, t) {
|
|
|
526
526
|
throw new H(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
async function
|
|
530
|
-
if (t = await
|
|
531
|
-
return
|
|
529
|
+
async function ir(e, t, r) {
|
|
530
|
+
if (t = await Qt.normalizePublicKey(t, e), tt(t))
|
|
531
|
+
return jt(t, e, r), t;
|
|
532
532
|
if (t instanceof Uint8Array) {
|
|
533
533
|
if (!e.startsWith("HS"))
|
|
534
|
-
throw new TypeError(Le(t, ...
|
|
535
|
-
return
|
|
534
|
+
throw new TypeError(Le(t, ...de));
|
|
535
|
+
return he.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
536
536
|
}
|
|
537
|
-
throw new TypeError(Le(t, ...
|
|
537
|
+
throw new TypeError(Le(t, ...de, "Uint8Array"));
|
|
538
538
|
}
|
|
539
|
-
const
|
|
540
|
-
const n = await
|
|
541
|
-
|
|
542
|
-
const o =
|
|
539
|
+
const cr = async (e, t, r, a) => {
|
|
540
|
+
const n = await ir(e, t, "verify");
|
|
541
|
+
Jt(e, n);
|
|
542
|
+
const o = sr(e, n.algorithm);
|
|
543
543
|
try {
|
|
544
|
-
return await
|
|
544
|
+
return await he.subtle.verify(o, n, r, a);
|
|
545
545
|
} catch {
|
|
546
546
|
return !1;
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
async function
|
|
549
|
+
async function lr(e, t, r) {
|
|
550
550
|
if (!_e(e))
|
|
551
551
|
throw new k("Flattened JWS must be an object");
|
|
552
552
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -562,65 +562,65 @@ async function cr(e, t, r) {
|
|
|
562
562
|
let a = {};
|
|
563
563
|
if (e.protected)
|
|
564
564
|
try {
|
|
565
|
-
const f =
|
|
566
|
-
a = JSON.parse(
|
|
565
|
+
const f = ce(e.protected);
|
|
566
|
+
a = JSON.parse(pe.decode(f));
|
|
567
567
|
} catch {
|
|
568
568
|
throw new k("JWS Protected Header is invalid");
|
|
569
569
|
}
|
|
570
|
-
if (!
|
|
570
|
+
if (!Gt(a, e.header))
|
|
571
571
|
throw new k("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
572
572
|
const n = {
|
|
573
573
|
...a,
|
|
574
574
|
...e.header
|
|
575
|
-
}, o =
|
|
575
|
+
}, o = nr(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
576
576
|
let s = !0;
|
|
577
577
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
578
578
|
throw new k('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
579
579
|
const { alg: i } = n;
|
|
580
580
|
if (typeof i != "string" || !i)
|
|
581
581
|
throw new k('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
582
|
-
const l = r &&
|
|
582
|
+
const l = r && or("algorithms", r.algorithms);
|
|
583
583
|
if (l && !l.has(i))
|
|
584
|
-
throw new
|
|
584
|
+
throw new Ht('"alg" (Algorithm) Header Parameter value not allowed');
|
|
585
585
|
if (s) {
|
|
586
586
|
if (typeof e.payload != "string")
|
|
587
587
|
throw new k("JWS Payload must be a string");
|
|
588
588
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
589
589
|
throw new k("JWS Payload must be a string or an Uint8Array instance");
|
|
590
590
|
let d = !1;
|
|
591
|
-
typeof t == "function" && (t = await t(a, e), d = !0),
|
|
592
|
-
const
|
|
591
|
+
typeof t == "function" && (t = await t(a, e), d = !0), ar(i, t, "verify");
|
|
592
|
+
const h = Pt(X.encode(e.protected ?? ""), X.encode("."), typeof e.payload == "string" ? X.encode(e.payload) : e.payload);
|
|
593
593
|
let u;
|
|
594
594
|
try {
|
|
595
|
-
u =
|
|
595
|
+
u = ce(e.signature);
|
|
596
596
|
} catch {
|
|
597
597
|
throw new k("Failed to base64url decode the signature");
|
|
598
598
|
}
|
|
599
|
-
if (!await
|
|
600
|
-
throw new
|
|
599
|
+
if (!await cr(i, t, u, h))
|
|
600
|
+
throw new Kt();
|
|
601
601
|
let m;
|
|
602
602
|
if (s)
|
|
603
603
|
try {
|
|
604
|
-
m =
|
|
604
|
+
m = ce(e.payload);
|
|
605
605
|
} catch {
|
|
606
606
|
throw new k("Failed to base64url decode the payload");
|
|
607
607
|
}
|
|
608
608
|
else
|
|
609
|
-
typeof e.payload == "string" ? m =
|
|
610
|
-
const
|
|
611
|
-
return e.protected !== void 0 && (
|
|
609
|
+
typeof e.payload == "string" ? m = X.encode(e.payload) : m = e.payload;
|
|
610
|
+
const p = { payload: m };
|
|
611
|
+
return e.protected !== void 0 && (p.protectedHeader = a), e.header !== void 0 && (p.unprotectedHeader = e.header), d ? { ...p, key: t } : p;
|
|
612
612
|
}
|
|
613
|
-
async function
|
|
614
|
-
if (e instanceof Uint8Array && (e =
|
|
613
|
+
async function dr(e, t, r) {
|
|
614
|
+
if (e instanceof Uint8Array && (e = pe.decode(e)), typeof e != "string")
|
|
615
615
|
throw new k("Compact JWS must be a string or Uint8Array");
|
|
616
616
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
617
617
|
if (s !== 3)
|
|
618
618
|
throw new k("Invalid Compact JWS");
|
|
619
|
-
const i = await
|
|
619
|
+
const i = await lr({ payload: n, protected: a, signature: o }, t, r), l = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
620
620
|
return typeof t == "function" ? { ...l, key: i.key } : l;
|
|
621
621
|
}
|
|
622
|
-
const
|
|
623
|
-
const t =
|
|
622
|
+
const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt * 24, mr = Ie * 7, hr = Ie * 365.25, pr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, Ue = (e) => {
|
|
623
|
+
const t = pr.exec(e);
|
|
624
624
|
if (!t || t[4] && t[1])
|
|
625
625
|
throw new TypeError("Invalid time period format");
|
|
626
626
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -655,35 +655,35 @@ const dr = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
|
|
|
655
655
|
case "week":
|
|
656
656
|
case "weeks":
|
|
657
657
|
case "w":
|
|
658
|
-
n = Math.round(r *
|
|
658
|
+
n = Math.round(r * mr);
|
|
659
659
|
break;
|
|
660
660
|
default:
|
|
661
|
-
n = Math.round(r *
|
|
661
|
+
n = Math.round(r * hr);
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
664
664
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
665
|
-
}, He = (e) => e.toLowerCase().replace(/^application\//, ""),
|
|
665
|
+
}, He = (e) => e.toLowerCase().replace(/^application\//, ""), gr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, fr = (e, t, r = {}) => {
|
|
666
666
|
let a;
|
|
667
667
|
try {
|
|
668
|
-
a = JSON.parse(
|
|
668
|
+
a = JSON.parse(pe.decode(t));
|
|
669
669
|
} catch {
|
|
670
670
|
}
|
|
671
671
|
if (!_e(a))
|
|
672
672
|
throw new rt("JWT Claims Set must be a top-level JSON object");
|
|
673
673
|
const { typ: n } = r;
|
|
674
674
|
if (n && (typeof e.typ != "string" || He(e.typ) !== He(n)))
|
|
675
|
-
throw new
|
|
676
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience: l, maxTokenAge: d } = r,
|
|
677
|
-
d !== void 0 &&
|
|
678
|
-
for (const f of new Set(
|
|
675
|
+
throw new M('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
676
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: l, maxTokenAge: d } = r, h = [...o];
|
|
677
|
+
d !== void 0 && h.push("iat"), l !== void 0 && h.push("aud"), i !== void 0 && h.push("sub"), s !== void 0 && h.push("iss");
|
|
678
|
+
for (const f of new Set(h.reverse()))
|
|
679
679
|
if (!(f in a))
|
|
680
|
-
throw new
|
|
680
|
+
throw new M(`missing required "${f}" claim`, a, f, "missing");
|
|
681
681
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
682
|
-
throw new
|
|
682
|
+
throw new M('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
683
683
|
if (i && a.sub !== i)
|
|
684
|
-
throw new
|
|
685
|
-
if (l && !
|
|
686
|
-
throw new
|
|
684
|
+
throw new M('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
685
|
+
if (l && !gr(a.aud, typeof l == "string" ? [l] : l))
|
|
686
|
+
throw new M('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
687
687
|
let u;
|
|
688
688
|
switch (typeof r.clockTolerance) {
|
|
689
689
|
case "string":
|
|
@@ -698,43 +698,43 @@ const dr = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
|
|
|
698
698
|
default:
|
|
699
699
|
throw new TypeError("Invalid clockTolerance option type");
|
|
700
700
|
}
|
|
701
|
-
const { currentDate: m } = r,
|
|
701
|
+
const { currentDate: m } = r, p = ur(m || /* @__PURE__ */ new Date());
|
|
702
702
|
if ((a.iat !== void 0 || d) && typeof a.iat != "number")
|
|
703
|
-
throw new
|
|
703
|
+
throw new M('"iat" claim must be a number', a, "iat", "invalid");
|
|
704
704
|
if (a.nbf !== void 0) {
|
|
705
705
|
if (typeof a.nbf != "number")
|
|
706
|
-
throw new
|
|
707
|
-
if (a.nbf >
|
|
708
|
-
throw new
|
|
706
|
+
throw new M('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
707
|
+
if (a.nbf > p + u)
|
|
708
|
+
throw new M('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
709
709
|
}
|
|
710
710
|
if (a.exp !== void 0) {
|
|
711
711
|
if (typeof a.exp != "number")
|
|
712
|
-
throw new
|
|
713
|
-
if (a.exp <=
|
|
714
|
-
throw new
|
|
712
|
+
throw new M('"exp" claim must be a number', a, "exp", "invalid");
|
|
713
|
+
if (a.exp <= p - u)
|
|
714
|
+
throw new Me('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
715
715
|
}
|
|
716
716
|
if (d) {
|
|
717
|
-
const f =
|
|
718
|
-
if (f - u >
|
|
719
|
-
throw new
|
|
717
|
+
const f = p - a.iat, w = typeof d == "number" ? d : Ue(d);
|
|
718
|
+
if (f - u > w)
|
|
719
|
+
throw new Me('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
720
720
|
if (f < 0 - u)
|
|
721
|
-
throw new
|
|
721
|
+
throw new M('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
722
722
|
}
|
|
723
723
|
return a;
|
|
724
724
|
};
|
|
725
|
-
async function
|
|
725
|
+
async function yr(e, t, r) {
|
|
726
726
|
var a;
|
|
727
|
-
const n = await
|
|
727
|
+
const n = await dr(e, t, r);
|
|
728
728
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
729
729
|
throw new rt("JWTs MUST NOT use unencoded payload");
|
|
730
|
-
const o = { payload:
|
|
730
|
+
const o = { payload: fr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
731
731
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
732
732
|
}
|
|
733
733
|
const Y = async (e) => {
|
|
734
734
|
try {
|
|
735
|
-
const t =
|
|
736
|
-
return await
|
|
737
|
-
issuer:
|
|
735
|
+
const t = I.ALG, r = await er(Lt, t);
|
|
736
|
+
return await yr(e, r, {
|
|
737
|
+
issuer: I.ISSUER
|
|
738
738
|
});
|
|
739
739
|
} catch {
|
|
740
740
|
return;
|
|
@@ -743,39 +743,39 @@ const Y = async (e) => {
|
|
|
743
743
|
var E = [];
|
|
744
744
|
for (var ve = 0; ve < 256; ++ve)
|
|
745
745
|
E.push((ve + 256).toString(16).slice(1));
|
|
746
|
-
function
|
|
746
|
+
function br(e, t = 0) {
|
|
747
747
|
return (E[e[t + 0]] + E[e[t + 1]] + E[e[t + 2]] + E[e[t + 3]] + "-" + E[e[t + 4]] + E[e[t + 5]] + "-" + E[e[t + 6]] + E[e[t + 7]] + "-" + E[e[t + 8]] + E[e[t + 9]] + "-" + E[e[t + 10]] + E[e[t + 11]] + E[e[t + 12]] + E[e[t + 13]] + E[e[t + 14]] + E[e[t + 15]]).toLowerCase();
|
|
748
748
|
}
|
|
749
|
-
var
|
|
750
|
-
function
|
|
751
|
-
if (!
|
|
749
|
+
var ee, wr = new Uint8Array(16);
|
|
750
|
+
function Er() {
|
|
751
|
+
if (!ee && (ee = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ee))
|
|
752
752
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
753
|
-
return
|
|
753
|
+
return ee(wr);
|
|
754
754
|
}
|
|
755
|
-
var
|
|
755
|
+
var vr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
756
756
|
const Ke = {
|
|
757
|
-
randomUUID:
|
|
757
|
+
randomUUID: vr
|
|
758
758
|
};
|
|
759
759
|
function Be(e, t, r) {
|
|
760
760
|
if (Ke.randomUUID && !t && !e)
|
|
761
761
|
return Ke.randomUUID();
|
|
762
762
|
e = e || {};
|
|
763
|
-
var a = e.random || (e.rng ||
|
|
764
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
763
|
+
var a = e.random || (e.rng || Er)();
|
|
764
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, br(a);
|
|
765
765
|
}
|
|
766
|
-
const We = globalThis.crypto,
|
|
766
|
+
const We = globalThis.crypto, kr = (e) => `${Be()}${Be()}`.slice(0, e), Sr = (e) => btoa(
|
|
767
767
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
768
768
|
);
|
|
769
|
-
async function
|
|
769
|
+
async function Tr(e) {
|
|
770
770
|
if (!We.subtle)
|
|
771
771
|
throw new Error(
|
|
772
772
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
773
773
|
);
|
|
774
774
|
const t = new TextEncoder().encode(e), r = await We.subtle.digest("SHA-256", t);
|
|
775
|
-
return
|
|
775
|
+
return Sr(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
776
776
|
}
|
|
777
|
-
async function
|
|
778
|
-
const t =
|
|
777
|
+
async function Ar(e) {
|
|
778
|
+
const t = kr(43), r = await Tr(t);
|
|
779
779
|
return {
|
|
780
780
|
code_verifier: t,
|
|
781
781
|
code_challenge: r
|
|
@@ -789,21 +789,21 @@ const je = (e, t) => {
|
|
|
789
789
|
typeof t == "function" ? t() : t
|
|
790
790
|
);
|
|
791
791
|
window.localStorage.setItem(e, r), ut(e, r);
|
|
792
|
-
},
|
|
792
|
+
}, _r = (e) => {
|
|
793
793
|
window.localStorage.removeItem(e), ut(e, null);
|
|
794
|
-
}, Ge = (e) => window.localStorage.getItem(e),
|
|
795
|
-
function
|
|
794
|
+
}, Ge = (e) => window.localStorage.getItem(e), Ir = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
795
|
+
function te({
|
|
796
796
|
key: e,
|
|
797
797
|
initialValue: t
|
|
798
798
|
}) {
|
|
799
799
|
const r = () => Ge(e), a = F.useSyncExternalStore(
|
|
800
|
-
|
|
800
|
+
Ir,
|
|
801
801
|
r
|
|
802
802
|
), n = F.useCallback(
|
|
803
803
|
(i) => {
|
|
804
804
|
try {
|
|
805
805
|
const l = typeof i == "function" ? i(JSON.parse(a)) : i;
|
|
806
|
-
l == null ?
|
|
806
|
+
l == null ? _r(e) : je(e, l);
|
|
807
807
|
} catch (l) {
|
|
808
808
|
console.warn(l);
|
|
809
809
|
}
|
|
@@ -825,37 +825,37 @@ function re({
|
|
|
825
825
|
var v = [];
|
|
826
826
|
for (var ke = 0; ke < 256; ++ke)
|
|
827
827
|
v.push((ke + 256).toString(16).slice(1));
|
|
828
|
-
function
|
|
828
|
+
function xr(e, t = 0) {
|
|
829
829
|
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();
|
|
830
830
|
}
|
|
831
|
-
var
|
|
832
|
-
function
|
|
833
|
-
if (!
|
|
831
|
+
var re, Nr = new Uint8Array(16);
|
|
832
|
+
function Cr() {
|
|
833
|
+
if (!re && (re = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !re))
|
|
834
834
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
835
|
-
return
|
|
835
|
+
return re(Nr);
|
|
836
836
|
}
|
|
837
|
-
var
|
|
837
|
+
var Rr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
838
838
|
const Ve = {
|
|
839
|
-
randomUUID:
|
|
839
|
+
randomUUID: Rr
|
|
840
840
|
};
|
|
841
|
-
function
|
|
841
|
+
function Or(e, t, r) {
|
|
842
842
|
if (Ve.randomUUID && !t && !e)
|
|
843
843
|
return Ve.randomUUID();
|
|
844
844
|
e = e || {};
|
|
845
|
-
var a = e.random || (e.rng ||
|
|
846
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
845
|
+
var a = e.random || (e.rng || Cr)();
|
|
846
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, xr(a);
|
|
847
847
|
}
|
|
848
|
-
const
|
|
848
|
+
const ae = "Oops! It looks like your session has expired. For your security, please log in again to continue.", Dr = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", Se = "Error getting access token, please re-authenticate.", $r = "You forgot to wrap your component in <AuthProvider>.", Fe = {
|
|
849
849
|
dev: "https://auth.gizmette.local.com:3003",
|
|
850
850
|
prod: "https://mylogin.gizmette.com"
|
|
851
|
-
},
|
|
851
|
+
}, ne = "@@auth@@", Mr = process.env.NODE_ENV === "production", Lr = !Mr, ge = async ({
|
|
852
852
|
type: e,
|
|
853
853
|
clientId: t,
|
|
854
854
|
params: r = {}
|
|
855
855
|
}) => {
|
|
856
856
|
try {
|
|
857
857
|
const a = await fetch(
|
|
858
|
-
|
|
858
|
+
Lr ? `${Fe.dev}/${e}` : `${Fe.prod}/${e}`,
|
|
859
859
|
{
|
|
860
860
|
credentials: "include",
|
|
861
861
|
method: "POST",
|
|
@@ -877,21 +877,23 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
|
|
|
877
877
|
} catch (a) {
|
|
878
878
|
return console.error(a), { status: 500, data: [] };
|
|
879
879
|
}
|
|
880
|
-
},
|
|
880
|
+
}, Pr = async ({
|
|
881
881
|
idToken: e,
|
|
882
882
|
accessToken: t,
|
|
883
883
|
refreshToken: r,
|
|
884
|
-
clientId: a
|
|
884
|
+
clientId: a,
|
|
885
|
+
domain: n
|
|
885
886
|
}) => {
|
|
886
887
|
try {
|
|
887
888
|
return {
|
|
888
|
-
status: (await
|
|
889
|
-
type:
|
|
889
|
+
status: (await ge({
|
|
890
|
+
type: me.LOGOUT,
|
|
890
891
|
clientId: a,
|
|
891
892
|
params: {
|
|
892
893
|
idToken: e,
|
|
893
894
|
accessToken: t,
|
|
894
|
-
refreshToken: r
|
|
895
|
+
refreshToken: r,
|
|
896
|
+
domain: n
|
|
895
897
|
}
|
|
896
898
|
})).status === 200
|
|
897
899
|
};
|
|
@@ -908,11 +910,12 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
|
|
|
908
910
|
type: n,
|
|
909
911
|
sessionExpiration: o,
|
|
910
912
|
code: s,
|
|
911
|
-
code_verifier: i
|
|
913
|
+
code_verifier: i,
|
|
914
|
+
domain: l
|
|
912
915
|
}) => {
|
|
913
916
|
try {
|
|
914
|
-
const
|
|
915
|
-
type:
|
|
917
|
+
const d = await ge({
|
|
918
|
+
type: me.AUTHENTICATE,
|
|
916
919
|
clientId: r,
|
|
917
920
|
params: {
|
|
918
921
|
type: n || Q.ID_AND_ACCESS_TOKEN,
|
|
@@ -921,14 +924,15 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
|
|
|
921
924
|
sessionExpiration: o,
|
|
922
925
|
nonce: a,
|
|
923
926
|
code: s,
|
|
924
|
-
code_verifier: i
|
|
927
|
+
code_verifier: i,
|
|
928
|
+
domain: l
|
|
925
929
|
}
|
|
926
|
-
}),
|
|
927
|
-
return
|
|
928
|
-
idToken:
|
|
929
|
-
accessToken:
|
|
930
|
-
refreshToken:
|
|
931
|
-
userId:
|
|
930
|
+
}), h = await Y(d.data.idToken);
|
|
931
|
+
return h && h.payload[I.USER_ID_KEY] !== "" && h.payload[I.NONCE_KEY] === a ? {
|
|
932
|
+
idToken: d.data.idToken,
|
|
933
|
+
accessToken: d.data.accessToken,
|
|
934
|
+
refreshToken: d.data.refreshToken,
|
|
935
|
+
userId: h.payload[I.USER_ID_KEY],
|
|
932
936
|
status: !0
|
|
933
937
|
} : {
|
|
934
938
|
status: !1
|
|
@@ -938,14 +942,14 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
|
|
|
938
942
|
status: !1
|
|
939
943
|
};
|
|
940
944
|
}
|
|
941
|
-
},
|
|
945
|
+
}, Ur = async ({
|
|
942
946
|
nonce: e,
|
|
943
947
|
clientId: t,
|
|
944
948
|
code_challenge: r
|
|
945
949
|
}) => {
|
|
946
950
|
try {
|
|
947
|
-
const a = await
|
|
948
|
-
type:
|
|
951
|
+
const a = await ge({
|
|
952
|
+
type: me.CODE,
|
|
949
953
|
clientId: t,
|
|
950
954
|
params: {
|
|
951
955
|
type: Q.CODE,
|
|
@@ -964,29 +968,31 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
|
|
|
964
968
|
status: !1
|
|
965
969
|
};
|
|
966
970
|
}
|
|
967
|
-
},
|
|
971
|
+
}, Hr = async ({
|
|
968
972
|
clientId: e,
|
|
969
973
|
userId: t,
|
|
970
974
|
nonce: r,
|
|
971
975
|
refreshToken: a,
|
|
972
|
-
accessToken: n
|
|
976
|
+
accessToken: n,
|
|
977
|
+
domain: o
|
|
973
978
|
}) => {
|
|
974
979
|
try {
|
|
975
|
-
const
|
|
976
|
-
type:
|
|
980
|
+
const s = await ge({
|
|
981
|
+
type: me.AUTHENTICATE,
|
|
977
982
|
clientId: e,
|
|
978
983
|
params: {
|
|
979
984
|
type: Q.REFRESH_TOKEN,
|
|
980
985
|
userId: t,
|
|
981
986
|
nonce: r,
|
|
982
987
|
refreshToken: a,
|
|
983
|
-
accessToken: n
|
|
988
|
+
accessToken: n,
|
|
989
|
+
domain: o
|
|
984
990
|
}
|
|
985
|
-
}),
|
|
986
|
-
return
|
|
987
|
-
accessToken:
|
|
988
|
-
refreshToken:
|
|
989
|
-
userId:
|
|
991
|
+
}), i = await Y(s.data.accessToken);
|
|
992
|
+
return i && i.payload[I.USER_ID_KEY] !== "" && i.payload[I.NONCE_KEY] === r ? {
|
|
993
|
+
accessToken: s.data.accessToken,
|
|
994
|
+
refreshToken: s.data.refreshToken,
|
|
995
|
+
userId: i.payload[I.USER_ID_KEY],
|
|
990
996
|
status: !0
|
|
991
997
|
} : {
|
|
992
998
|
status: !1
|
|
@@ -997,19 +1003,21 @@ const ne = "Oops! It looks like your session has expired. For your security, ple
|
|
|
997
1003
|
};
|
|
998
1004
|
}
|
|
999
1005
|
};
|
|
1000
|
-
class
|
|
1006
|
+
class Kr {
|
|
1001
1007
|
constructor(t = null, r = null) {
|
|
1002
1008
|
ye(this, "refreshTokenPromise", null), ye(this, "accessToken"), ye(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1003
1009
|
}
|
|
1004
1010
|
async refreshtoken({
|
|
1005
1011
|
clientId: t,
|
|
1006
1012
|
userId: r,
|
|
1007
|
-
nonce: a
|
|
1013
|
+
nonce: a,
|
|
1014
|
+
domain: n
|
|
1008
1015
|
}) {
|
|
1009
1016
|
this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
|
|
1010
1017
|
clientId: t,
|
|
1011
1018
|
userId: r,
|
|
1012
|
-
nonce: a
|
|
1019
|
+
nonce: a,
|
|
1020
|
+
domain: n
|
|
1013
1021
|
}));
|
|
1014
1022
|
try {
|
|
1015
1023
|
return await this.refreshTokenPromise;
|
|
@@ -1020,21 +1028,23 @@ class Hr {
|
|
|
1020
1028
|
async _refreshToken({
|
|
1021
1029
|
clientId: t,
|
|
1022
1030
|
userId: r,
|
|
1023
|
-
nonce: a
|
|
1031
|
+
nonce: a,
|
|
1032
|
+
domain: n
|
|
1024
1033
|
}) {
|
|
1025
|
-
const
|
|
1026
|
-
if (
|
|
1027
|
-
const
|
|
1034
|
+
const o = await Y(this.refreshToken);
|
|
1035
|
+
if (o && o.payload[I.USER_ID_KEY] !== "") {
|
|
1036
|
+
const s = await Hr({
|
|
1028
1037
|
clientId: t,
|
|
1029
1038
|
userId: r,
|
|
1030
1039
|
nonce: a,
|
|
1031
1040
|
refreshToken: this.refreshToken,
|
|
1032
|
-
accessToken: this.accessToken
|
|
1041
|
+
accessToken: this.accessToken,
|
|
1042
|
+
domain: n
|
|
1033
1043
|
});
|
|
1034
|
-
return
|
|
1044
|
+
return s.status ? (this.accessToken = s.accessToken, this.refreshToken = s.refreshToken, {
|
|
1035
1045
|
status: "success",
|
|
1036
|
-
newAccessToken:
|
|
1037
|
-
newRefreshToken:
|
|
1046
|
+
newAccessToken: s.accessToken,
|
|
1047
|
+
newRefreshToken: s.refreshToken
|
|
1038
1048
|
}) : {
|
|
1039
1049
|
status: "failure"
|
|
1040
1050
|
};
|
|
@@ -1044,107 +1054,117 @@ class Hr {
|
|
|
1044
1054
|
};
|
|
1045
1055
|
}
|
|
1046
1056
|
}
|
|
1047
|
-
const
|
|
1048
|
-
throw new Error(
|
|
1049
|
-
}, mt =
|
|
1057
|
+
const oe = () => {
|
|
1058
|
+
throw new Error($r);
|
|
1059
|
+
}, mt = xt({
|
|
1050
1060
|
isAuthenticated: !1,
|
|
1051
1061
|
isLoading: !1,
|
|
1052
|
-
login:
|
|
1053
|
-
logout:
|
|
1054
|
-
getAccessToken:
|
|
1055
|
-
getIdToken:
|
|
1062
|
+
login: oe,
|
|
1063
|
+
logout: oe,
|
|
1064
|
+
getAccessToken: oe,
|
|
1065
|
+
getIdToken: oe,
|
|
1056
1066
|
logoutReason: ""
|
|
1057
|
-
}),
|
|
1067
|
+
}), Br = ({
|
|
1058
1068
|
children: e,
|
|
1059
1069
|
sessionExpiration: t,
|
|
1060
|
-
clientId: r
|
|
1070
|
+
clientId: r,
|
|
1071
|
+
domain: a = ""
|
|
1061
1072
|
}) => {
|
|
1062
|
-
const
|
|
1063
|
-
key: `${
|
|
1064
|
-
}), [
|
|
1065
|
-
key: `${
|
|
1066
|
-
}), [
|
|
1073
|
+
const n = W(!1), [o, s, , i] = te({
|
|
1074
|
+
key: `${ne}::${r}::@@user@@`
|
|
1075
|
+
}), [l, d, , h] = te({
|
|
1076
|
+
key: `${ne}::${r}::@@access@@`
|
|
1077
|
+
}), [u, m, , p] = te(
|
|
1067
1078
|
{
|
|
1068
|
-
key: `${
|
|
1079
|
+
key: `${ne}::${r}::@@refresh@@`
|
|
1069
1080
|
}
|
|
1070
|
-
), [
|
|
1071
|
-
key: `${
|
|
1072
|
-
}),
|
|
1081
|
+
), [f, w, , x] = te({
|
|
1082
|
+
key: `${ne}::${r}::@@nonce@@`
|
|
1083
|
+
}), O = new Kr(l, u), [_, S] = U({
|
|
1073
1084
|
isLoading: !0,
|
|
1074
1085
|
isAuthenticated: !1,
|
|
1075
1086
|
user: void 0,
|
|
1076
1087
|
logoutReason: ""
|
|
1077
|
-
}),
|
|
1088
|
+
}), D = $e(
|
|
1078
1089
|
(y) => {
|
|
1079
|
-
console.warn(y),
|
|
1090
|
+
console.warn(y), S({
|
|
1080
1091
|
isLoading: !0,
|
|
1081
1092
|
isAuthenticated: !1,
|
|
1082
1093
|
user: void 0,
|
|
1083
|
-
logoutReason: y ||
|
|
1084
|
-
}),
|
|
1094
|
+
logoutReason: y || ae
|
|
1095
|
+
}), i(), h(), p(), x();
|
|
1085
1096
|
},
|
|
1086
|
-
[
|
|
1087
|
-
),
|
|
1097
|
+
[h, i, x, p]
|
|
1098
|
+
), C = $e(
|
|
1088
1099
|
async (y) => {
|
|
1089
|
-
|
|
1090
|
-
idToken:
|
|
1091
|
-
accessToken:
|
|
1092
|
-
refreshToken:
|
|
1093
|
-
clientId: r
|
|
1094
|
-
|
|
1095
|
-
|
|
1100
|
+
D(y || ae), await Pr({
|
|
1101
|
+
idToken: o,
|
|
1102
|
+
accessToken: l,
|
|
1103
|
+
refreshToken: u,
|
|
1104
|
+
clientId: r,
|
|
1105
|
+
domain: a
|
|
1106
|
+
}), S(($) => ({
|
|
1107
|
+
...$,
|
|
1096
1108
|
isLoading: !1
|
|
1097
1109
|
}));
|
|
1098
1110
|
},
|
|
1099
|
-
[
|
|
1111
|
+
[
|
|
1112
|
+
l,
|
|
1113
|
+
r,
|
|
1114
|
+
a,
|
|
1115
|
+
o,
|
|
1116
|
+
u,
|
|
1117
|
+
D
|
|
1118
|
+
]
|
|
1100
1119
|
);
|
|
1101
1120
|
z(() => {
|
|
1102
|
-
if (!
|
|
1103
|
-
return
|
|
1121
|
+
if (!n.current)
|
|
1122
|
+
return _.isLoading && o !== null ? (async () => {
|
|
1104
1123
|
try {
|
|
1105
|
-
const y = await Y(
|
|
1106
|
-
y && y.payload[
|
|
1124
|
+
const y = await Y(o);
|
|
1125
|
+
y && y.payload[I.USER_ID_KEY] !== "" ? S({
|
|
1107
1126
|
isLoading: !1,
|
|
1108
1127
|
isAuthenticated: !0,
|
|
1109
1128
|
user: {
|
|
1110
|
-
userId: y.payload[
|
|
1111
|
-
username: y.payload[
|
|
1129
|
+
userId: y.payload[I.USER_ID_KEY],
|
|
1130
|
+
username: y.payload[I.USERNAME_KEY]
|
|
1112
1131
|
},
|
|
1113
1132
|
logoutReason: ""
|
|
1114
|
-
}) : await
|
|
1133
|
+
}) : await C(ae);
|
|
1115
1134
|
} catch {
|
|
1116
|
-
await
|
|
1135
|
+
await C(ae);
|
|
1117
1136
|
}
|
|
1118
|
-
})() :
|
|
1137
|
+
})() : S((y) => ({
|
|
1119
1138
|
...y,
|
|
1120
1139
|
isLoading: !1
|
|
1121
1140
|
})), () => {
|
|
1122
|
-
|
|
1141
|
+
n.current = !0;
|
|
1123
1142
|
};
|
|
1124
|
-
}, [
|
|
1125
|
-
const
|
|
1126
|
-
const
|
|
1127
|
-
if (
|
|
1128
|
-
...
|
|
1143
|
+
}, [_.isLoading, o, C]);
|
|
1144
|
+
const N = async (y, $, b) => {
|
|
1145
|
+
const A = Or();
|
|
1146
|
+
if (w(A), S((G) => ({
|
|
1147
|
+
...G,
|
|
1129
1148
|
isLoading: !0
|
|
1130
|
-
})),
|
|
1131
|
-
const { code_verifier:
|
|
1132
|
-
nonce:
|
|
1149
|
+
})), i(), h(), p(), b === Q.CODE) {
|
|
1150
|
+
const { code_verifier: G, code_challenge: It } = await Ar(), De = await Ur({
|
|
1151
|
+
nonce: A,
|
|
1133
1152
|
clientId: r,
|
|
1134
|
-
code_challenge:
|
|
1153
|
+
code_challenge: It
|
|
1135
1154
|
});
|
|
1136
1155
|
if (De.status) {
|
|
1137
1156
|
const J = await ze({
|
|
1138
1157
|
username: y,
|
|
1139
|
-
password:
|
|
1158
|
+
password: $,
|
|
1140
1159
|
clientId: r,
|
|
1141
1160
|
sessionExpiration: t,
|
|
1142
|
-
nonce:
|
|
1143
|
-
type:
|
|
1161
|
+
nonce: A,
|
|
1162
|
+
type: b,
|
|
1144
1163
|
code: De.code,
|
|
1145
|
-
code_verifier:
|
|
1164
|
+
code_verifier: G,
|
|
1165
|
+
domain: a
|
|
1146
1166
|
});
|
|
1147
|
-
return J.status ? (
|
|
1167
|
+
return J.status ? (s(J.idToken), d(J.accessToken), m(J.refreshToken), S({
|
|
1148
1168
|
isLoading: !1,
|
|
1149
1169
|
isAuthenticated: !0,
|
|
1150
1170
|
user: {
|
|
@@ -1152,60 +1172,62 @@ const se = () => {
|
|
|
1152
1172
|
username: y
|
|
1153
1173
|
},
|
|
1154
1174
|
logoutReason: ""
|
|
1155
|
-
}), !0) : (
|
|
1175
|
+
}), !0) : (D(Je), !1);
|
|
1156
1176
|
}
|
|
1157
1177
|
return !1;
|
|
1158
1178
|
}
|
|
1159
|
-
const
|
|
1179
|
+
const B = await ze({
|
|
1160
1180
|
username: y,
|
|
1161
|
-
password:
|
|
1181
|
+
password: $,
|
|
1162
1182
|
clientId: r,
|
|
1163
1183
|
sessionExpiration: t,
|
|
1164
|
-
nonce:
|
|
1165
|
-
type:
|
|
1184
|
+
nonce: A,
|
|
1185
|
+
type: b,
|
|
1186
|
+
domain: a
|
|
1166
1187
|
});
|
|
1167
|
-
return
|
|
1188
|
+
return B.status ? (s(B.idToken), d(B.accessToken), m(B.refreshToken), S({
|
|
1168
1189
|
isLoading: !1,
|
|
1169
1190
|
isAuthenticated: !0,
|
|
1170
1191
|
user: {
|
|
1171
|
-
userId:
|
|
1192
|
+
userId: B.userId,
|
|
1172
1193
|
username: y
|
|
1173
1194
|
}
|
|
1174
|
-
}), !0) : (
|
|
1175
|
-
},
|
|
1176
|
-
y == null || y.preventDefault(), await
|
|
1177
|
-
},
|
|
1178
|
-
const { isAuthenticated: y, user:
|
|
1195
|
+
}), !0) : (D(Je), !1);
|
|
1196
|
+
}, V = async (y) => {
|
|
1197
|
+
y == null || y.preventDefault(), await C(Dr);
|
|
1198
|
+
}, R = async () => {
|
|
1199
|
+
const { isAuthenticated: y, user: $ } = _;
|
|
1179
1200
|
try {
|
|
1180
|
-
if (y &&
|
|
1181
|
-
if (
|
|
1182
|
-
const
|
|
1183
|
-
if (
|
|
1184
|
-
return
|
|
1201
|
+
if (y && $ && $.userId) {
|
|
1202
|
+
if (l) {
|
|
1203
|
+
const A = await Y(l);
|
|
1204
|
+
if (A && A.payload[I.USER_ID_KEY] !== "")
|
|
1205
|
+
return l;
|
|
1185
1206
|
}
|
|
1186
|
-
const
|
|
1207
|
+
const b = await O.refreshtoken({
|
|
1187
1208
|
clientId: r,
|
|
1188
|
-
userId:
|
|
1189
|
-
nonce:
|
|
1209
|
+
userId: $.userId,
|
|
1210
|
+
nonce: f,
|
|
1211
|
+
domain: a
|
|
1190
1212
|
});
|
|
1191
|
-
return
|
|
1213
|
+
return b.status && b.status === "success" ? (d(b.newAccessToken), m(b.newRefreshToken), b.newAccessToken) : (await C(Se), "");
|
|
1192
1214
|
}
|
|
1193
|
-
return await
|
|
1215
|
+
return await C(Se), "";
|
|
1194
1216
|
} catch {
|
|
1195
|
-
return await
|
|
1217
|
+
return await C(Se), "";
|
|
1196
1218
|
}
|
|
1197
|
-
},
|
|
1198
|
-
if (
|
|
1199
|
-
return
|
|
1219
|
+
}, fe = () => {
|
|
1220
|
+
if (_.isAuthenticated && o)
|
|
1221
|
+
return o;
|
|
1200
1222
|
};
|
|
1201
1223
|
return /* @__PURE__ */ c(
|
|
1202
1224
|
mt.Provider,
|
|
1203
1225
|
{
|
|
1204
|
-
value: { ...
|
|
1226
|
+
value: { ..._, login: N, logout: V, getAccessToken: R, getIdToken: fe },
|
|
1205
1227
|
children: e
|
|
1206
1228
|
}
|
|
1207
1229
|
);
|
|
1208
|
-
}, xe = (e = mt) => Xe(e),
|
|
1230
|
+
}, xe = (e = mt) => Xe(e), tn = "user", rn = "assistant", an = "system", nn = "internal", on = "hidden", sn = "I'm having trouble right now. Please try again later.", cn = "gpt-4", ln = 128e3, dn = "action-message", un = "action-reset", mn = "action-model", hn = "action-restore", pn = "action-location", gn = "action-streaming", fn = "action-search", yn = "action-sort", bn = "sassy-saint-", wn = "details", En = "search", vn = "sort", kn = "location", Sn = "==stats==", Wr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ne = (e) => {
|
|
1209
1231
|
let t = "";
|
|
1210
1232
|
if (typeof e == "number" || typeof e == "string")
|
|
1211
1233
|
t = "m-" + e;
|
|
@@ -1214,7 +1236,7 @@ const se = () => {
|
|
|
1214
1236
|
(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(" ");
|
|
1215
1237
|
}
|
|
1216
1238
|
return t;
|
|
1217
|
-
},
|
|
1239
|
+
}, Tn = "av-bubble", Ye = "av-button", An = "av-card", jr = "av-footer", Gr = "av-main", _n = "av-messagebox", In = "av-panel", xn = "av-spinner", ht = "icon", pt = "button", Vr = "link", Jr = ({
|
|
1218
1240
|
type: e,
|
|
1219
1241
|
size: t,
|
|
1220
1242
|
labelRight: r,
|
|
@@ -1229,7 +1251,7 @@ const se = () => {
|
|
|
1229
1251
|
[s]: t === "medium",
|
|
1230
1252
|
[i]: t === "large"
|
|
1231
1253
|
});
|
|
1232
|
-
case
|
|
1254
|
+
case Vr:
|
|
1233
1255
|
return g("px-4 text-center", {
|
|
1234
1256
|
[o]: t === "small",
|
|
1235
1257
|
[s]: t === "medium",
|
|
@@ -1248,7 +1270,7 @@ const se = () => {
|
|
|
1248
1270
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
1249
1271
|
});
|
|
1250
1272
|
}
|
|
1251
|
-
},
|
|
1273
|
+
}, Fr = ({
|
|
1252
1274
|
mode: e,
|
|
1253
1275
|
noBackground: t,
|
|
1254
1276
|
noTruncate: r,
|
|
@@ -1280,7 +1302,7 @@ const se = () => {
|
|
|
1280
1302
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
1281
1303
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
1282
1304
|
});
|
|
1283
|
-
},
|
|
1305
|
+
}, zr = ({
|
|
1284
1306
|
mode: e,
|
|
1285
1307
|
disabled: t,
|
|
1286
1308
|
variant: r
|
|
@@ -1308,7 +1330,7 @@ const se = () => {
|
|
|
1308
1330
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
1309
1331
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
1310
1332
|
});
|
|
1311
|
-
},
|
|
1333
|
+
}, Yr = ({
|
|
1312
1334
|
mode: e,
|
|
1313
1335
|
disabled: t,
|
|
1314
1336
|
variant: r
|
|
@@ -1336,7 +1358,7 @@ const se = () => {
|
|
|
1336
1358
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
1337
1359
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
1338
1360
|
});
|
|
1339
|
-
},
|
|
1361
|
+
}, qr = ({
|
|
1340
1362
|
mode: e,
|
|
1341
1363
|
noBorder: t,
|
|
1342
1364
|
variant: r
|
|
@@ -1364,7 +1386,7 @@ const se = () => {
|
|
|
1364
1386
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
1365
1387
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
1366
1388
|
});
|
|
1367
|
-
},
|
|
1389
|
+
}, Qr = ({ focusMode: e }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1368
1390
|
"focus:outline-focus-dark": e === "dark",
|
|
1369
1391
|
"focus:outline-focus-light": e === "light",
|
|
1370
1392
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -1380,27 +1402,27 @@ const se = () => {
|
|
|
1380
1402
|
size: i,
|
|
1381
1403
|
noBorder: l,
|
|
1382
1404
|
labelRight: d,
|
|
1383
|
-
labelLeft:
|
|
1405
|
+
labelLeft: h,
|
|
1384
1406
|
spacing: u,
|
|
1385
1407
|
noBackground: m,
|
|
1386
|
-
variant:
|
|
1408
|
+
variant: p,
|
|
1387
1409
|
noTruncate: f,
|
|
1388
|
-
align:
|
|
1389
|
-
}) => (
|
|
1410
|
+
align: w
|
|
1411
|
+
}) => (p || (p = "primary"), r ? g(Ye, t) : g(
|
|
1390
1412
|
Ye,
|
|
1391
1413
|
t,
|
|
1392
1414
|
Ne(u),
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1415
|
+
Fr({ mode: a, variant: p, noBackground: m, noTruncate: f }),
|
|
1416
|
+
Jr({ type: e, size: i, labelRight: d, labelLeft: h, align: w }),
|
|
1417
|
+
qr({ mode: a, variant: p, noBorder: l }),
|
|
1418
|
+
Qr({ focusMode: n }),
|
|
1419
|
+
zr({ mode: a, variant: p, disabled: o }),
|
|
1420
|
+
Yr({ mode: a, variant: p, disabled: o }),
|
|
1399
1421
|
{
|
|
1400
1422
|
"w-full": s,
|
|
1401
1423
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
1402
1424
|
}
|
|
1403
|
-
)),
|
|
1425
|
+
)), Xr = (e, t, r) => {
|
|
1404
1426
|
var a;
|
|
1405
1427
|
!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);
|
|
1406
1428
|
}, Ce = K.forwardRef(
|
|
@@ -1411,7 +1433,7 @@ const se = () => {
|
|
|
1411
1433
|
{
|
|
1412
1434
|
ref: t,
|
|
1413
1435
|
onClick: (o) => {
|
|
1414
|
-
|
|
1436
|
+
Xr(o, a, r);
|
|
1415
1437
|
},
|
|
1416
1438
|
...n
|
|
1417
1439
|
}
|
|
@@ -1431,16 +1453,16 @@ const ft = K.forwardRef(
|
|
|
1431
1453
|
raw: i = !1,
|
|
1432
1454
|
noBorder: l = !1,
|
|
1433
1455
|
"aria-label": d,
|
|
1434
|
-
label:
|
|
1456
|
+
label: h,
|
|
1435
1457
|
size: u = "medium",
|
|
1436
1458
|
labelRight: m,
|
|
1437
|
-
labelLeft:
|
|
1459
|
+
labelLeft: p,
|
|
1438
1460
|
spacing: f,
|
|
1439
|
-
noBackground:
|
|
1440
|
-
align:
|
|
1441
|
-
...
|
|
1442
|
-
},
|
|
1443
|
-
const
|
|
1461
|
+
noBackground: w = !1,
|
|
1462
|
+
align: x = "center",
|
|
1463
|
+
...O
|
|
1464
|
+
}, _) => {
|
|
1465
|
+
const S = gt({
|
|
1444
1466
|
type: ht,
|
|
1445
1467
|
mode: r,
|
|
1446
1468
|
focusMode: a,
|
|
@@ -1451,28 +1473,28 @@ const ft = K.forwardRef(
|
|
|
1451
1473
|
noBorder: l,
|
|
1452
1474
|
size: u,
|
|
1453
1475
|
labelRight: m,
|
|
1454
|
-
labelLeft:
|
|
1476
|
+
labelLeft: p,
|
|
1455
1477
|
spacing: f,
|
|
1456
|
-
noBackground:
|
|
1457
|
-
align:
|
|
1458
|
-
}),
|
|
1478
|
+
noBackground: w,
|
|
1479
|
+
align: x
|
|
1480
|
+
}), D = g({
|
|
1459
1481
|
"text-copy-accent-dark": r === "light" && !i,
|
|
1460
1482
|
"text-copy-light": r === "dark" && !i,
|
|
1461
1483
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
1462
1484
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
1463
1485
|
});
|
|
1464
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ T(
|
|
1465
1487
|
Ce,
|
|
1466
1488
|
{
|
|
1467
|
-
ref:
|
|
1468
|
-
className:
|
|
1489
|
+
ref: _,
|
|
1490
|
+
className: S,
|
|
1469
1491
|
disabled: t,
|
|
1470
1492
|
type: s,
|
|
1471
|
-
"aria-label": d ||
|
|
1472
|
-
...
|
|
1493
|
+
"aria-label": d || h,
|
|
1494
|
+
...O,
|
|
1473
1495
|
children: [
|
|
1474
|
-
|
|
1475
|
-
/* @__PURE__ */ c("div", { className:
|
|
1496
|
+
p && /* @__PURE__ */ c("span", { className: "pr-2", children: p }),
|
|
1497
|
+
/* @__PURE__ */ c("div", { className: D, children: e }),
|
|
1476
1498
|
m && /* @__PURE__ */ c("span", { className: "pl-2", children: m })
|
|
1477
1499
|
]
|
|
1478
1500
|
}
|
|
@@ -1492,10 +1514,10 @@ const yt = K.forwardRef(
|
|
|
1492
1514
|
raw: i = !1,
|
|
1493
1515
|
noBorder: l = !1,
|
|
1494
1516
|
spacing: d,
|
|
1495
|
-
variant:
|
|
1517
|
+
variant: h = "primary",
|
|
1496
1518
|
noTruncate: u = !1,
|
|
1497
1519
|
...m
|
|
1498
|
-
},
|
|
1520
|
+
}, p) => {
|
|
1499
1521
|
const f = gt({
|
|
1500
1522
|
type: pt,
|
|
1501
1523
|
mode: r,
|
|
@@ -1507,13 +1529,13 @@ const yt = K.forwardRef(
|
|
|
1507
1529
|
size: s,
|
|
1508
1530
|
noBorder: l,
|
|
1509
1531
|
spacing: d,
|
|
1510
|
-
variant:
|
|
1532
|
+
variant: h,
|
|
1511
1533
|
noTruncate: u
|
|
1512
1534
|
});
|
|
1513
1535
|
return /* @__PURE__ */ c(
|
|
1514
1536
|
Ce,
|
|
1515
1537
|
{
|
|
1516
|
-
ref:
|
|
1538
|
+
ref: p,
|
|
1517
1539
|
className: f,
|
|
1518
1540
|
disabled: t,
|
|
1519
1541
|
...m,
|
|
@@ -1523,7 +1545,7 @@ const yt = K.forwardRef(
|
|
|
1523
1545
|
}
|
|
1524
1546
|
);
|
|
1525
1547
|
yt.displayName = "Button";
|
|
1526
|
-
const
|
|
1548
|
+
const Zr = ({
|
|
1527
1549
|
className: e,
|
|
1528
1550
|
mode: t = "system",
|
|
1529
1551
|
row1: r,
|
|
@@ -1532,7 +1554,7 @@ const Xr = ({
|
|
|
1532
1554
|
spacing: o,
|
|
1533
1555
|
raw: s = !1
|
|
1534
1556
|
}) => {
|
|
1535
|
-
const i = g(
|
|
1557
|
+
const i = g(jr, e, Ne(o), {
|
|
1536
1558
|
"text-copy-dark": !s && t === "dark",
|
|
1537
1559
|
"text-copy-lighter": !s && t === "light",
|
|
1538
1560
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
@@ -1540,17 +1562,17 @@ const Xr = ({
|
|
|
1540
1562
|
"mb-[100px]": !n && !s,
|
|
1541
1563
|
"mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
|
|
1542
1564
|
});
|
|
1543
|
-
return /* @__PURE__ */
|
|
1565
|
+
return /* @__PURE__ */ T("footer", { className: i, children: [
|
|
1544
1566
|
r && /* @__PURE__ */ c("div", { children: r }),
|
|
1545
1567
|
a && /* @__PURE__ */ c("div", { children: a })
|
|
1546
1568
|
] });
|
|
1547
|
-
},
|
|
1569
|
+
}, ea = ({
|
|
1548
1570
|
children: e,
|
|
1549
1571
|
className: t,
|
|
1550
1572
|
raw: r = !1,
|
|
1551
1573
|
spacing: a
|
|
1552
1574
|
}) => {
|
|
1553
|
-
const n = g(t,
|
|
1575
|
+
const n = g(t, Gr, Ne(a), {
|
|
1554
1576
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
1555
1577
|
});
|
|
1556
1578
|
return /* @__PURE__ */ c("main", { className: n, children: e });
|
|
@@ -1568,16 +1590,16 @@ try {
|
|
|
1568
1590
|
});
|
|
1569
1591
|
} catch {
|
|
1570
1592
|
}
|
|
1571
|
-
function
|
|
1572
|
-
return
|
|
1593
|
+
function ta(e) {
|
|
1594
|
+
return Nt(() => e.every((t) => t == null) ? () => {
|
|
1573
1595
|
} : (t) => {
|
|
1574
1596
|
e.forEach((r) => {
|
|
1575
1597
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1576
1598
|
});
|
|
1577
1599
|
}, e);
|
|
1578
1600
|
}
|
|
1579
|
-
function
|
|
1580
|
-
const t =
|
|
1601
|
+
function ra(e) {
|
|
1602
|
+
const t = Ct();
|
|
1581
1603
|
if (!e)
|
|
1582
1604
|
return t;
|
|
1583
1605
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -1587,7 +1609,7 @@ function ta(e) {
|
|
|
1587
1609
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
1588
1610
|
}
|
|
1589
1611
|
}
|
|
1590
|
-
const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT",
|
|
1612
|
+
const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
|
|
1591
1613
|
alert: null,
|
|
1592
1614
|
alertdialog: null,
|
|
1593
1615
|
log: "polite",
|
|
@@ -1595,7 +1617,7 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", ra = {
|
|
|
1595
1617
|
progressbar: null,
|
|
1596
1618
|
status: "polite",
|
|
1597
1619
|
timer: "assertive"
|
|
1598
|
-
},
|
|
1620
|
+
}, na = (e, t) => {
|
|
1599
1621
|
switch (t == null ? void 0 : t.type) {
|
|
1600
1622
|
case bt:
|
|
1601
1623
|
return {
|
|
@@ -1610,7 +1632,7 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", ra = {
|
|
|
1610
1632
|
default:
|
|
1611
1633
|
return e;
|
|
1612
1634
|
}
|
|
1613
|
-
},
|
|
1635
|
+
}, oa = ({
|
|
1614
1636
|
onAnnouncementClear: e,
|
|
1615
1637
|
dispatch: t
|
|
1616
1638
|
}) => {
|
|
@@ -1628,13 +1650,13 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", ra = {
|
|
|
1628
1650
|
type: bt,
|
|
1629
1651
|
payload: e
|
|
1630
1652
|
}), t && (r.current = setTimeout(
|
|
1631
|
-
() =>
|
|
1653
|
+
() => oa({
|
|
1632
1654
|
onAnnouncementClear: a,
|
|
1633
1655
|
dispatch: n
|
|
1634
1656
|
}),
|
|
1635
1657
|
t
|
|
1636
1658
|
));
|
|
1637
|
-
},
|
|
1659
|
+
}, sa = ({
|
|
1638
1660
|
children: e,
|
|
1639
1661
|
announcementTimeoutRef: t,
|
|
1640
1662
|
announcementDelay: r,
|
|
@@ -1668,17 +1690,17 @@ function Et({
|
|
|
1668
1690
|
visible: i,
|
|
1669
1691
|
...l
|
|
1670
1692
|
}) {
|
|
1671
|
-
const d =
|
|
1693
|
+
const d = W(), h = W(), [u, m] = Rt(na, {
|
|
1672
1694
|
announcement: null
|
|
1673
1695
|
});
|
|
1674
|
-
let
|
|
1675
|
-
typeof
|
|
1676
|
-
|
|
1696
|
+
let p = r;
|
|
1697
|
+
typeof p > "u" && (p = a ? aa[a] : "assertive"), z(() => {
|
|
1698
|
+
sa({
|
|
1677
1699
|
announcementTimeoutRef: d,
|
|
1678
1700
|
announcementDelay: n,
|
|
1679
1701
|
children: e,
|
|
1680
1702
|
clearAnnouncementDelay: o,
|
|
1681
|
-
clearAnnouncementTimeoutRef:
|
|
1703
|
+
clearAnnouncementTimeoutRef: h,
|
|
1682
1704
|
onAnnouncementClear: s,
|
|
1683
1705
|
dispatch: m
|
|
1684
1706
|
});
|
|
@@ -1694,7 +1716,7 @@ function Et({
|
|
|
1694
1716
|
return /* @__PURE__ */ c(
|
|
1695
1717
|
"div",
|
|
1696
1718
|
{
|
|
1697
|
-
"aria-live":
|
|
1719
|
+
"aria-live": p,
|
|
1698
1720
|
...a && { role: a },
|
|
1699
1721
|
className: f,
|
|
1700
1722
|
...l,
|
|
@@ -1715,7 +1737,7 @@ try {
|
|
|
1715
1737
|
});
|
|
1716
1738
|
} catch {
|
|
1717
1739
|
}
|
|
1718
|
-
const
|
|
1740
|
+
const ia = (e) => {
|
|
1719
1741
|
let t = "";
|
|
1720
1742
|
if (typeof e == "number" || typeof e == "string")
|
|
1721
1743
|
t = "m-" + e;
|
|
@@ -1724,21 +1746,21 @@ const sa = (e) => {
|
|
|
1724
1746
|
(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(" ");
|
|
1725
1747
|
}
|
|
1726
1748
|
return t;
|
|
1727
|
-
}, vt = "av-text-input",
|
|
1749
|
+
}, vt = "av-text-input", ca = "av-text-input-wrapper", Te = "av-text-input-helper-text", Nn = "av-text-area", Cn = "av-text-area-wrapper", Rn = "av-text-area-helper-text", On = "av-text-area__control--right", Dn = "av-toggle", la = ({
|
|
1728
1750
|
mode: e
|
|
1729
1751
|
}) => g({
|
|
1730
1752
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
1731
1753
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
1732
1754
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
1733
1755
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
1734
|
-
}),
|
|
1756
|
+
}), da = ({
|
|
1735
1757
|
focusMode: e
|
|
1736
1758
|
}) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
1737
1759
|
"focus:outline-focus-dark": e === "dark",
|
|
1738
1760
|
"focus:outline-focus-light": e === "light",
|
|
1739
1761
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1740
1762
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1741
|
-
}),
|
|
1763
|
+
}), ua = ({
|
|
1742
1764
|
noBorder: e,
|
|
1743
1765
|
error: t
|
|
1744
1766
|
}) => g("border-2", {
|
|
@@ -1746,7 +1768,7 @@ const sa = (e) => {
|
|
|
1746
1768
|
"focus:border-border-dark": !e && t,
|
|
1747
1769
|
"border-border-error-dark": !e && t,
|
|
1748
1770
|
"border-transparent": e
|
|
1749
|
-
}),
|
|
1771
|
+
}), ma = ({
|
|
1750
1772
|
disabled: e,
|
|
1751
1773
|
raw: t,
|
|
1752
1774
|
error: r,
|
|
@@ -1770,7 +1792,7 @@ const sa = (e) => {
|
|
|
1770
1792
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
1771
1793
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
1772
1794
|
});
|
|
1773
|
-
},
|
|
1795
|
+
}, ha = ({
|
|
1774
1796
|
error: e,
|
|
1775
1797
|
raw: t,
|
|
1776
1798
|
mode: r,
|
|
@@ -1797,7 +1819,7 @@ const sa = (e) => {
|
|
|
1797
1819
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
1798
1820
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
1799
1821
|
});
|
|
1800
|
-
},
|
|
1822
|
+
}, pa = ({
|
|
1801
1823
|
className: e,
|
|
1802
1824
|
inputClassName: t,
|
|
1803
1825
|
raw: r,
|
|
@@ -1810,25 +1832,25 @@ const sa = (e) => {
|
|
|
1810
1832
|
}) => {
|
|
1811
1833
|
const d = r ? e : g(
|
|
1812
1834
|
"relative flex w-full flex-col justify-center",
|
|
1813
|
-
|
|
1835
|
+
ca,
|
|
1814
1836
|
e,
|
|
1815
|
-
|
|
1816
|
-
),
|
|
1837
|
+
ia(s)
|
|
1838
|
+
), h = r ? g(t) : g(
|
|
1817
1839
|
vt,
|
|
1818
1840
|
t,
|
|
1819
1841
|
"h-12 rounded-md px-4 text-base",
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1842
|
+
la({ mode: i }),
|
|
1843
|
+
da({ focusMode: l }),
|
|
1844
|
+
ua({ noBorder: n, error: o }),
|
|
1823
1845
|
{
|
|
1824
1846
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
1825
1847
|
}
|
|
1826
|
-
), u = r ? void 0 : "sr-only", m =
|
|
1848
|
+
), u = r ? void 0 : "sr-only", m = ma({
|
|
1827
1849
|
disabled: a,
|
|
1828
1850
|
raw: r,
|
|
1829
1851
|
error: o,
|
|
1830
1852
|
mode: i
|
|
1831
|
-
}),
|
|
1853
|
+
}), p = ha({
|
|
1832
1854
|
error: o,
|
|
1833
1855
|
raw: r,
|
|
1834
1856
|
mode: i,
|
|
@@ -1836,10 +1858,10 @@ const sa = (e) => {
|
|
|
1836
1858
|
});
|
|
1837
1859
|
return {
|
|
1838
1860
|
wrapper: d,
|
|
1839
|
-
input:
|
|
1861
|
+
input: h,
|
|
1840
1862
|
accessibleLabel: u,
|
|
1841
1863
|
visibleLabel: m,
|
|
1842
|
-
helperText:
|
|
1864
|
+
helperText: p,
|
|
1843
1865
|
rightElement: r ? void 0 : "absolute right-3"
|
|
1844
1866
|
};
|
|
1845
1867
|
}, Re = K.forwardRef(
|
|
@@ -1854,85 +1876,85 @@ const sa = (e) => {
|
|
|
1854
1876
|
mode: i = "system",
|
|
1855
1877
|
focusMode: l = "system",
|
|
1856
1878
|
disabled: d = !1,
|
|
1857
|
-
noBorder:
|
|
1879
|
+
noBorder: h = !1,
|
|
1858
1880
|
labelId: u,
|
|
1859
1881
|
labelHidden: m = !1,
|
|
1860
|
-
type:
|
|
1882
|
+
type: p = "text",
|
|
1861
1883
|
helperText: f = "",
|
|
1862
|
-
rightElement:
|
|
1863
|
-
spacing:
|
|
1864
|
-
...
|
|
1865
|
-
},
|
|
1866
|
-
const
|
|
1884
|
+
rightElement: w,
|
|
1885
|
+
spacing: x,
|
|
1886
|
+
...O
|
|
1887
|
+
}, _) => {
|
|
1888
|
+
const S = W(null), [D, C] = U(0), N = ra({ id: e, prefix: `${vt}-` }), V = `${t} error, ${f}`, R = pa({
|
|
1867
1889
|
className: o,
|
|
1868
1890
|
inputClassName: s,
|
|
1869
1891
|
error: a,
|
|
1870
1892
|
raw: n,
|
|
1871
1893
|
focusMode: l,
|
|
1872
1894
|
disabled: d,
|
|
1873
|
-
noBorder:
|
|
1874
|
-
spacing:
|
|
1895
|
+
noBorder: h,
|
|
1896
|
+
spacing: x,
|
|
1875
1897
|
mode: i
|
|
1876
1898
|
});
|
|
1877
|
-
return
|
|
1878
|
-
|
|
1879
|
-
}, []), /* @__PURE__ */
|
|
1899
|
+
return Ot(() => {
|
|
1900
|
+
S.current && C(S.current.offsetWidth + 18 + 10);
|
|
1901
|
+
}, []), /* @__PURE__ */ T("div", { className: R.wrapper, children: [
|
|
1880
1902
|
/* @__PURE__ */ c(
|
|
1881
1903
|
"label",
|
|
1882
1904
|
{
|
|
1883
|
-
htmlFor:
|
|
1905
|
+
htmlFor: N,
|
|
1884
1906
|
id: u,
|
|
1885
|
-
className:
|
|
1907
|
+
className: R.accessibleLabel,
|
|
1886
1908
|
children: r
|
|
1887
1909
|
}
|
|
1888
1910
|
),
|
|
1889
1911
|
/* @__PURE__ */ c(
|
|
1890
1912
|
"input",
|
|
1891
1913
|
{
|
|
1892
|
-
ref:
|
|
1893
|
-
id:
|
|
1914
|
+
ref: _,
|
|
1915
|
+
id: N,
|
|
1894
1916
|
name: t,
|
|
1895
|
-
type:
|
|
1917
|
+
type: p,
|
|
1896
1918
|
disabled: d,
|
|
1897
1919
|
placeholder: n ? void 0 : " ",
|
|
1898
|
-
className:
|
|
1899
|
-
...f && { "aria-describedby": `${
|
|
1920
|
+
className: R.input,
|
|
1921
|
+
...f && { "aria-describedby": `${N}-helper` },
|
|
1900
1922
|
...a && { "aria-invalid": "true" },
|
|
1901
|
-
...
|
|
1902
|
-
...
|
|
1923
|
+
...w && !n && { style: { paddingRight: D } },
|
|
1924
|
+
...O
|
|
1903
1925
|
}
|
|
1904
1926
|
),
|
|
1905
1927
|
!n && !m && /* @__PURE__ */ c(
|
|
1906
1928
|
"label",
|
|
1907
1929
|
{
|
|
1908
1930
|
"aria-hidden": !0,
|
|
1909
|
-
htmlFor:
|
|
1910
|
-
className:
|
|
1931
|
+
htmlFor: N,
|
|
1932
|
+
className: R.visibleLabel,
|
|
1911
1933
|
children: r
|
|
1912
1934
|
}
|
|
1913
1935
|
),
|
|
1914
1936
|
f && /* @__PURE__ */ c(
|
|
1915
1937
|
"div",
|
|
1916
1938
|
{
|
|
1917
|
-
id: `${
|
|
1918
|
-
className:
|
|
1939
|
+
id: `${N}-helper`,
|
|
1940
|
+
className: R.helperText,
|
|
1919
1941
|
children: f
|
|
1920
1942
|
}
|
|
1921
1943
|
),
|
|
1922
|
-
|
|
1944
|
+
w && /* @__PURE__ */ c(
|
|
1923
1945
|
"div",
|
|
1924
1946
|
{
|
|
1925
|
-
ref:
|
|
1926
|
-
className:
|
|
1927
|
-
children:
|
|
1947
|
+
ref: S,
|
|
1948
|
+
className: R.rightElement,
|
|
1949
|
+
children: w
|
|
1928
1950
|
}
|
|
1929
1951
|
),
|
|
1930
|
-
a && f && /* @__PURE__ */ c(Et, { politeness: "polite", clearAnnouncementDelay: 500, children:
|
|
1952
|
+
a && f && /* @__PURE__ */ c(Et, { politeness: "polite", clearAnnouncementDelay: 500, children: V })
|
|
1931
1953
|
] });
|
|
1932
1954
|
}
|
|
1933
1955
|
);
|
|
1934
1956
|
Re.displayName = "TextInput";
|
|
1935
|
-
const
|
|
1957
|
+
const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
|
|
1936
1958
|
({
|
|
1937
1959
|
name: e,
|
|
1938
1960
|
disabled: t,
|
|
@@ -1944,60 +1966,60 @@ const pa = 500, ga = 5e3, fa = 2e4, kt = K.forwardRef(
|
|
|
1944
1966
|
onFocus: i,
|
|
1945
1967
|
onTextInputMaskBlur: l,
|
|
1946
1968
|
rightElement: d,
|
|
1947
|
-
spacing:
|
|
1969
|
+
spacing: h,
|
|
1948
1970
|
...u
|
|
1949
1971
|
}, m) => {
|
|
1950
|
-
const [
|
|
1972
|
+
const [p, f] = U(!0), [w, x] = U({
|
|
1951
1973
|
message: null,
|
|
1952
1974
|
politeness: null
|
|
1953
|
-
}),
|
|
1954
|
-
clearTimeout(
|
|
1955
|
-
|
|
1956
|
-
announcementTimeout:
|
|
1975
|
+
}), O = W(!0), _ = W(), S = W(null), D = ta([m, S]), C = p ? "Show" : "Hide", N = () => {
|
|
1976
|
+
clearTimeout(_.current), O.current || (_.current = window.setTimeout(() => {
|
|
1977
|
+
O.current = !0, f(!0), x({
|
|
1978
|
+
announcementTimeout: fa,
|
|
1957
1979
|
politeness: "polite",
|
|
1958
1980
|
message: `${r} hiding characters`
|
|
1959
1981
|
}), n && n(!0);
|
|
1960
|
-
},
|
|
1961
|
-
},
|
|
1962
|
-
|
|
1963
|
-
const
|
|
1964
|
-
|
|
1965
|
-
announcementTimeout:
|
|
1982
|
+
}, ya));
|
|
1983
|
+
}, V = (b) => {
|
|
1984
|
+
b.preventDefault();
|
|
1985
|
+
const A = !O.current;
|
|
1986
|
+
O.current = A, N(), f(A), x({
|
|
1987
|
+
announcementTimeout: ga,
|
|
1966
1988
|
politeness: "assertive",
|
|
1967
|
-
message:
|
|
1968
|
-
}), n && n(
|
|
1969
|
-
},
|
|
1970
|
-
var
|
|
1971
|
-
const { relatedTarget:
|
|
1972
|
-
|
|
1973
|
-
},
|
|
1974
|
-
|
|
1975
|
-
},
|
|
1976
|
-
|
|
1977
|
-
},
|
|
1978
|
-
|
|
1989
|
+
message: A ? "Characters hidden" : "Characters showing"
|
|
1990
|
+
}), n && n(A);
|
|
1991
|
+
}, R = (b) => {
|
|
1992
|
+
var A;
|
|
1993
|
+
const { relatedTarget: B } = b, G = (A = S.current) == null ? void 0 : A.parentElement;
|
|
1994
|
+
G != null && G.contains(B) || l && l();
|
|
1995
|
+
}, fe = (b) => {
|
|
1996
|
+
N(), s && s(b), R(b);
|
|
1997
|
+
}, y = (b) => {
|
|
1998
|
+
N(), i && i(b);
|
|
1999
|
+
}, $ = (b) => {
|
|
2000
|
+
N(), o && o(b);
|
|
1979
2001
|
};
|
|
1980
2002
|
return z(() => () => {
|
|
1981
|
-
clearTimeout(
|
|
1982
|
-
}, []), /* @__PURE__ */
|
|
2003
|
+
clearTimeout(_.current);
|
|
2004
|
+
}, []), /* @__PURE__ */ T(q, { children: [
|
|
1983
2005
|
/* @__PURE__ */ c(
|
|
1984
2006
|
Re,
|
|
1985
2007
|
{
|
|
1986
|
-
ref:
|
|
2008
|
+
ref: D,
|
|
1987
2009
|
name: e,
|
|
1988
2010
|
label: r,
|
|
1989
2011
|
labelHidden: a,
|
|
1990
|
-
type:
|
|
2012
|
+
type: p ? "password" : "text",
|
|
1991
2013
|
disabled: t,
|
|
1992
|
-
spacing:
|
|
1993
|
-
onBlur:
|
|
1994
|
-
onFocus:
|
|
1995
|
-
onChange:
|
|
2014
|
+
spacing: h,
|
|
2015
|
+
onBlur: fe,
|
|
2016
|
+
onFocus: y,
|
|
2017
|
+
onChange: $,
|
|
1996
2018
|
rightElement: K.cloneElement(d, {
|
|
1997
2019
|
ref: m,
|
|
1998
|
-
label:
|
|
1999
|
-
onClick:
|
|
2000
|
-
onBlur:
|
|
2020
|
+
label: C,
|
|
2021
|
+
onClick: V,
|
|
2022
|
+
onBlur: R,
|
|
2001
2023
|
disabled: t
|
|
2002
2024
|
}),
|
|
2003
2025
|
...u
|
|
@@ -2007,9 +2029,9 @@ const pa = 500, ga = 5e3, fa = 2e4, kt = K.forwardRef(
|
|
|
2007
2029
|
Et,
|
|
2008
2030
|
{
|
|
2009
2031
|
role: "status",
|
|
2010
|
-
politeness:
|
|
2011
|
-
clearAnnouncementDelay:
|
|
2012
|
-
children:
|
|
2032
|
+
politeness: w.politeness,
|
|
2033
|
+
clearAnnouncementDelay: w.announcementTimeout,
|
|
2034
|
+
children: w.message
|
|
2013
2035
|
}
|
|
2014
2036
|
)
|
|
2015
2037
|
] });
|
|
@@ -2029,7 +2051,7 @@ try {
|
|
|
2029
2051
|
});
|
|
2030
2052
|
} catch {
|
|
2031
2053
|
}
|
|
2032
|
-
const
|
|
2054
|
+
const ba = (e) => {
|
|
2033
2055
|
let t = "";
|
|
2034
2056
|
if (typeof e == "number" || typeof e == "string")
|
|
2035
2057
|
t = "m-" + e;
|
|
@@ -2050,11 +2072,11 @@ const ya = (e) => {
|
|
|
2050
2072
|
semantic: l = !1,
|
|
2051
2073
|
...d
|
|
2052
2074
|
}) => {
|
|
2053
|
-
const
|
|
2054
|
-
|
|
2075
|
+
const h = ba(s), u = g(
|
|
2076
|
+
h,
|
|
2055
2077
|
a || o
|
|
2056
2078
|
);
|
|
2057
|
-
return /* @__PURE__ */
|
|
2079
|
+
return /* @__PURE__ */ T(q, { children: [
|
|
2058
2080
|
/* @__PURE__ */ c(
|
|
2059
2081
|
"svg",
|
|
2060
2082
|
{
|
|
@@ -2085,7 +2107,7 @@ try {
|
|
|
2085
2107
|
});
|
|
2086
2108
|
} catch {
|
|
2087
2109
|
}
|
|
2088
|
-
const
|
|
2110
|
+
const wa = ({
|
|
2089
2111
|
className: e,
|
|
2090
2112
|
viewBox: t,
|
|
2091
2113
|
spacing: r,
|
|
@@ -2110,14 +2132,14 @@ const ba = ({
|
|
|
2110
2132
|
}
|
|
2111
2133
|
) })
|
|
2112
2134
|
}
|
|
2113
|
-
),
|
|
2135
|
+
), Ea = ({
|
|
2114
2136
|
className: e,
|
|
2115
2137
|
viewBox: t,
|
|
2116
2138
|
spacing: r,
|
|
2117
2139
|
title: a,
|
|
2118
2140
|
monotone: n,
|
|
2119
2141
|
...o
|
|
2120
|
-
}) => /* @__PURE__ */
|
|
2142
|
+
}) => /* @__PURE__ */ T(
|
|
2121
2143
|
Oe,
|
|
2122
2144
|
{
|
|
2123
2145
|
defaultViewBox: "0 0 640 512",
|
|
@@ -2138,14 +2160,14 @@ const ba = ({
|
|
|
2138
2160
|
/* @__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" })
|
|
2139
2161
|
]
|
|
2140
2162
|
}
|
|
2141
|
-
),
|
|
2163
|
+
), va = ({
|
|
2142
2164
|
className: e,
|
|
2143
2165
|
viewBox: t,
|
|
2144
2166
|
spacing: r,
|
|
2145
2167
|
title: a,
|
|
2146
2168
|
monotone: n,
|
|
2147
2169
|
...o
|
|
2148
|
-
}) => /* @__PURE__ */
|
|
2170
|
+
}) => /* @__PURE__ */ T(
|
|
2149
2171
|
Oe,
|
|
2150
2172
|
{
|
|
2151
2173
|
defaultViewBox: "0 0 576 512",
|
|
@@ -2180,7 +2202,7 @@ try {
|
|
|
2180
2202
|
});
|
|
2181
2203
|
} catch {
|
|
2182
2204
|
}
|
|
2183
|
-
const
|
|
2205
|
+
const ka = (e) => {
|
|
2184
2206
|
let t = "";
|
|
2185
2207
|
if (typeof e == "number" || typeof e == "string")
|
|
2186
2208
|
t = "m-" + e;
|
|
@@ -2189,10 +2211,10 @@ const va = (e) => {
|
|
|
2189
2211
|
(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(" ");
|
|
2190
2212
|
}
|
|
2191
2213
|
return t;
|
|
2192
|
-
},
|
|
2214
|
+
}, Sa = "av-flexgrid", se = "av-flexgrid-item", ue = 0.25, St = K.createContext({
|
|
2193
2215
|
columnGap: 0,
|
|
2194
2216
|
rowGap: 0
|
|
2195
|
-
}),
|
|
2217
|
+
}), Ta = ({
|
|
2196
2218
|
children: e,
|
|
2197
2219
|
className: t,
|
|
2198
2220
|
columnGap: r = 1,
|
|
@@ -2203,7 +2225,7 @@ const va = (e) => {
|
|
|
2203
2225
|
alignHorizontal: i = "normal",
|
|
2204
2226
|
alignVertical: l = "normal",
|
|
2205
2227
|
spacing: d,
|
|
2206
|
-
...
|
|
2228
|
+
...h
|
|
2207
2229
|
}) => {
|
|
2208
2230
|
const u = {
|
|
2209
2231
|
flexDirection: s,
|
|
@@ -2216,14 +2238,14 @@ const va = (e) => {
|
|
|
2216
2238
|
* by the columnGap and rowGap that will be applied
|
|
2217
2239
|
* to all FlexgridItems (see context and paddings).
|
|
2218
2240
|
*/
|
|
2219
|
-
marginLeft: r * -1 *
|
|
2220
|
-
marginTop: a * -1 *
|
|
2241
|
+
marginLeft: r * -1 * ue + "rem",
|
|
2242
|
+
marginTop: a * -1 * ue + "rem"
|
|
2221
2243
|
}, m = g(
|
|
2222
|
-
|
|
2244
|
+
Sa,
|
|
2223
2245
|
t,
|
|
2224
2246
|
"box-border flex flex-wrap"
|
|
2225
|
-
),
|
|
2226
|
-
return /* @__PURE__ */ c(f, { ...d ? { className:
|
|
2247
|
+
), p = { columnGap: r, rowGap: a }, f = d ? "div" : K.Fragment;
|
|
2248
|
+
return /* @__PURE__ */ c(f, { ...d ? { className: ka(d) } : {}, children: /* @__PURE__ */ c("div", { className: m, style: u, ...h, children: /* @__PURE__ */ c(St.Provider, { value: p, children: e }) }) });
|
|
2227
2249
|
}, Ae = (e, t) => g({
|
|
2228
2250
|
"basis-1/12": e === 1 && !t,
|
|
2229
2251
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -2297,39 +2319,39 @@ const va = (e) => {
|
|
|
2297
2319
|
"lg:basis-full": e === 12 && t === "lg",
|
|
2298
2320
|
"xl:basis-full": e === 12 && t === "xl",
|
|
2299
2321
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
2300
|
-
}),
|
|
2322
|
+
}), Aa = ({
|
|
2301
2323
|
className: e,
|
|
2302
2324
|
span: t
|
|
2303
2325
|
}) => {
|
|
2304
2326
|
if (!t)
|
|
2305
|
-
return g(e,
|
|
2327
|
+
return g(e, se, "box-border basis-auto");
|
|
2306
2328
|
if (typeof t == "number")
|
|
2307
|
-
return g(e,
|
|
2329
|
+
return g(e, se, "box-border max-w-full", {
|
|
2308
2330
|
[`${Ae(t)}`]: !0
|
|
2309
2331
|
});
|
|
2310
2332
|
if (typeof t == "string")
|
|
2311
|
-
return g(e,
|
|
2333
|
+
return g(e, se, "box-border basis-auto", {
|
|
2312
2334
|
"max-w-full grow": t === "auto"
|
|
2313
2335
|
});
|
|
2314
2336
|
if (typeof t == "object") {
|
|
2315
2337
|
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Ae(n) : Ae(n, a));
|
|
2316
2338
|
return g(
|
|
2317
2339
|
e,
|
|
2318
|
-
|
|
2340
|
+
se,
|
|
2319
2341
|
"box-border",
|
|
2320
2342
|
r
|
|
2321
2343
|
);
|
|
2322
2344
|
}
|
|
2323
|
-
},
|
|
2345
|
+
}, ie = ({
|
|
2324
2346
|
children: e,
|
|
2325
2347
|
className: t,
|
|
2326
2348
|
span: r,
|
|
2327
2349
|
...a
|
|
2328
2350
|
}) => {
|
|
2329
2351
|
const { columnGap: n, rowGap: o } = Xe(St), s = {
|
|
2330
|
-
paddingLeft: n *
|
|
2331
|
-
paddingTop: o *
|
|
2332
|
-
}, i =
|
|
2352
|
+
paddingLeft: n * ue + "rem",
|
|
2353
|
+
paddingTop: o * ue + "rem"
|
|
2354
|
+
}, i = Aa({
|
|
2333
2355
|
className: t,
|
|
2334
2356
|
span: r
|
|
2335
2357
|
});
|
|
@@ -2348,7 +2370,7 @@ try {
|
|
|
2348
2370
|
});
|
|
2349
2371
|
} catch {
|
|
2350
2372
|
}
|
|
2351
|
-
const
|
|
2373
|
+
const _a = "ASK! ME! ANYTHING!", Tt = "Sassy Saint", Ia = "gizmette.com", xa = "Log in", $n = "Log out", Na = "Password", Ca = "Powered by OpenAI", Mn = "Send", Ln = "Profile", Pn = "Statistics", Un = "Chat history", Hn = "About", Kn = "Type your question here", Bn = "Clear chat", Wn = "Cancel chat", jn = "N/A", Gn = {
|
|
2352
2374
|
PREFERENCES: {
|
|
2353
2375
|
TITLE: "User preferences",
|
|
2354
2376
|
NAME: "Name",
|
|
@@ -2381,7 +2403,7 @@ const Aa = "ASK! ME! ANYTHING!", Tt = "Sassy Saint", _a = "gizmette.com", Ia = "
|
|
|
2381
2403
|
PLUGIN: "Plugin"
|
|
2382
2404
|
}
|
|
2383
2405
|
}, Qe = (e) => Number.isFinite(e) ? e : 0;
|
|
2384
|
-
function
|
|
2406
|
+
function Ra(e) {
|
|
2385
2407
|
return {
|
|
2386
2408
|
days: Math.trunc(e / 864e5),
|
|
2387
2409
|
hours: Math.trunc(e / 36e5 % 24),
|
|
@@ -2392,7 +2414,7 @@ function Ca(e) {
|
|
|
2392
2414
|
nanoseconds: Math.trunc(Qe(e * 1e6) % 1e3)
|
|
2393
2415
|
};
|
|
2394
2416
|
}
|
|
2395
|
-
function
|
|
2417
|
+
function Oa(e) {
|
|
2396
2418
|
return {
|
|
2397
2419
|
days: e / 86400000n,
|
|
2398
2420
|
hours: e / 3600000n % 24n,
|
|
@@ -2403,53 +2425,53 @@ function Ra(e) {
|
|
|
2403
2425
|
nanoseconds: 0n
|
|
2404
2426
|
};
|
|
2405
2427
|
}
|
|
2406
|
-
function
|
|
2428
|
+
function Da(e) {
|
|
2407
2429
|
switch (typeof e) {
|
|
2408
2430
|
case "number": {
|
|
2409
2431
|
if (Number.isFinite(e))
|
|
2410
|
-
return
|
|
2432
|
+
return Ra(e);
|
|
2411
2433
|
break;
|
|
2412
2434
|
}
|
|
2413
2435
|
case "bigint":
|
|
2414
|
-
return
|
|
2436
|
+
return Oa(e);
|
|
2415
2437
|
}
|
|
2416
2438
|
throw new TypeError("Expected a finite number or bigint");
|
|
2417
2439
|
}
|
|
2418
|
-
const
|
|
2419
|
-
function
|
|
2440
|
+
const $a = (e) => e === 0 || e === 0n, Ma = (e, t) => t === 1 || t === 1n ? e : `${e}s`, La = 1e-7, Pa = 24n * 60n * 60n * 1000n;
|
|
2441
|
+
function Ua(e, t) {
|
|
2420
2442
|
const r = typeof e == "bigint";
|
|
2421
2443
|
if (!r && !Number.isFinite(e))
|
|
2422
2444
|
throw new TypeError("Expected a finite number or bigint");
|
|
2423
2445
|
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);
|
|
2424
2446
|
let a = [];
|
|
2425
|
-
const n = (d,
|
|
2426
|
-
const u = Math.floor(d * 10 **
|
|
2427
|
-
return (Math.round(u) / 10 **
|
|
2428
|
-
}, o = (d,
|
|
2429
|
-
if (!((a.length === 0 || !t.colonNotation) &&
|
|
2447
|
+
const n = (d, h) => {
|
|
2448
|
+
const u = Math.floor(d * 10 ** h + La);
|
|
2449
|
+
return (Math.round(u) / 10 ** h).toFixed(h);
|
|
2450
|
+
}, o = (d, h, u, m) => {
|
|
2451
|
+
if (!((a.length === 0 || !t.colonNotation) && $a(d) && !(t.colonNotation && u === "m"))) {
|
|
2430
2452
|
if (m = m ?? String(d), t.colonNotation) {
|
|
2431
|
-
const
|
|
2432
|
-
m = "0".repeat(Math.max(0, f -
|
|
2453
|
+
const p = m.includes(".") ? m.split(".")[0].length : m.length, f = a.length > 0 ? 2 : 1;
|
|
2454
|
+
m = "0".repeat(Math.max(0, f - p)) + m;
|
|
2433
2455
|
} else
|
|
2434
|
-
m += t.verbose ? " " + Ma(
|
|
2456
|
+
m += t.verbose ? " " + Ma(h, d) : u;
|
|
2435
2457
|
a.push(m);
|
|
2436
2458
|
}
|
|
2437
|
-
}, s =
|
|
2459
|
+
}, s = Da(e), i = BigInt(s.days);
|
|
2438
2460
|
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) {
|
|
2439
|
-
const d = Number(s.seconds),
|
|
2461
|
+
const d = Number(s.seconds), h = Number(s.milliseconds), u = Number(s.microseconds), m = Number(s.nanoseconds);
|
|
2440
2462
|
if (o(d, "second", "s"), t.formatSubMilliseconds)
|
|
2441
|
-
o(
|
|
2463
|
+
o(h, "millisecond", "ms"), o(u, "microsecond", "µs"), o(m, "nanosecond", "ns");
|
|
2442
2464
|
else {
|
|
2443
|
-
const
|
|
2465
|
+
const p = h + u / 1e3 + m / 1e6, f = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = p >= 1 ? Math.round(p) : Math.ceil(p), x = f ? p.toFixed(f) : w;
|
|
2444
2466
|
o(
|
|
2445
|
-
Number.parseFloat(
|
|
2467
|
+
Number.parseFloat(x),
|
|
2446
2468
|
"millisecond",
|
|
2447
2469
|
"ms",
|
|
2448
|
-
|
|
2470
|
+
x
|
|
2449
2471
|
);
|
|
2450
2472
|
}
|
|
2451
2473
|
} else {
|
|
2452
|
-
const d = (r ? Number(e %
|
|
2474
|
+
const d = (r ? Number(e % Pa) : e) / 1e3 % 60, h = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, u = n(d, h), m = t.keepDecimalsOnWholeSeconds ? u : u.replace(/\.0+$/, "");
|
|
2453
2475
|
o(Number.parseFloat(m), "second", "s", m);
|
|
2454
2476
|
}
|
|
2455
2477
|
if (a.length === 0)
|
|
@@ -2457,7 +2479,7 @@ function Pa(e, t) {
|
|
|
2457
2479
|
const l = t.colonNotation ? ":" : " ";
|
|
2458
2480
|
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), a.join(l);
|
|
2459
2481
|
}
|
|
2460
|
-
const
|
|
2482
|
+
const Ha = process.env.NODE_ENV === "production", At = !Ha, Vn = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, _t = (e, t) => {
|
|
2461
2483
|
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;
|
|
2462
2484
|
return {
|
|
2463
2485
|
dir: r,
|
|
@@ -2465,17 +2487,17 @@ const Ua = process.env.NODE_ENV === "production", At = !Ua, Gn = (e, t) => e.len
|
|
|
2465
2487
|
min: n,
|
|
2466
2488
|
sec: o
|
|
2467
2489
|
};
|
|
2468
|
-
},
|
|
2490
|
+
}, Jn = (e) => {
|
|
2469
2491
|
if (!e && e !== 0)
|
|
2470
2492
|
return "N/A";
|
|
2471
2493
|
const t = _t(e, !1);
|
|
2472
2494
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2473
|
-
},
|
|
2495
|
+
}, Fn = (e) => {
|
|
2474
2496
|
if (!e && e !== 0)
|
|
2475
2497
|
return "N/A";
|
|
2476
2498
|
const t = _t(e, !0);
|
|
2477
2499
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2478
|
-
},
|
|
2500
|
+
}, zn = async () => {
|
|
2479
2501
|
const e = {
|
|
2480
2502
|
/**
|
|
2481
2503
|
* A boolean value that indicates the application would
|
|
@@ -2524,11 +2546,11 @@ const Ua = process.env.NODE_ENV === "production", At = !Ua, Gn = (e, t) => e.len
|
|
|
2524
2546
|
e
|
|
2525
2547
|
);
|
|
2526
2548
|
});
|
|
2527
|
-
},
|
|
2549
|
+
}, Yn = (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: [
|
|
2528
2550
|
/* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2529
2551
|
/* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
|
|
2530
2552
|
] }) }, `${e}-${r}`)) : null;
|
|
2531
|
-
function
|
|
2553
|
+
function qn({
|
|
2532
2554
|
data: e,
|
|
2533
2555
|
formatter: t = (r) => r
|
|
2534
2556
|
}) {
|
|
@@ -2540,55 +2562,55 @@ function Yn({
|
|
|
2540
2562
|
);
|
|
2541
2563
|
return t(a ? a / r.length : 0);
|
|
2542
2564
|
}
|
|
2543
|
-
const
|
|
2565
|
+
const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Xn = new Intl.NumberFormat("en", {
|
|
2544
2566
|
style: "decimal",
|
|
2545
2567
|
signDisplay: "never",
|
|
2546
2568
|
minimumFractionDigits: 0,
|
|
2547
2569
|
maximumFractionDigits: 0
|
|
2548
|
-
}),
|
|
2570
|
+
}), Zn = (e) => Ua(e, {
|
|
2549
2571
|
secondsDecimalDigits: 2,
|
|
2550
2572
|
unitCount: 2
|
|
2551
|
-
}),
|
|
2573
|
+
}), Ka = (e) => g(
|
|
2552
2574
|
"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",
|
|
2553
2575
|
e || At ? "pt-4" : "pt-10"
|
|
2554
|
-
),
|
|
2576
|
+
), eo = (e, t) => t === 1 ? e : `${e}s`, Ba = ({
|
|
2555
2577
|
serverStats: e
|
|
2556
2578
|
}) => /* @__PURE__ */ c(
|
|
2557
|
-
|
|
2579
|
+
Zr,
|
|
2558
2580
|
{
|
|
2559
2581
|
mode: "light",
|
|
2560
|
-
row1: /* @__PURE__ */
|
|
2582
|
+
row1: /* @__PURE__ */ T("div", { children: [
|
|
2561
2583
|
Tt,
|
|
2562
2584
|
" v",
|
|
2563
|
-
"3.1.
|
|
2585
|
+
"3.1.2",
|
|
2564
2586
|
" - ",
|
|
2565
|
-
|
|
2587
|
+
Ca,
|
|
2566
2588
|
At && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
2567
2589
|
] }),
|
|
2568
|
-
row2: /* @__PURE__ */
|
|
2590
|
+
row2: /* @__PURE__ */ T("div", { children: [
|
|
2569
2591
|
"© ",
|
|
2570
2592
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
2571
2593
|
" ",
|
|
2572
|
-
|
|
2594
|
+
Ia
|
|
2573
2595
|
] })
|
|
2574
2596
|
}
|
|
2575
|
-
),
|
|
2597
|
+
), Wa = Ze(() => import("./LazyHeader.B1723ukv.js")), ja = () => {
|
|
2576
2598
|
const { isAuthenticated: e } = xe();
|
|
2577
|
-
return /* @__PURE__ */
|
|
2578
|
-
e && /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(
|
|
2579
|
-
/* @__PURE__ */
|
|
2580
|
-
/* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(
|
|
2581
|
-
/* @__PURE__ */
|
|
2599
|
+
return /* @__PURE__ */ T(q, { children: [
|
|
2600
|
+
e && /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Wa, {}) }),
|
|
2601
|
+
/* @__PURE__ */ T("div", { className: "flex items-center justify-center", children: [
|
|
2602
|
+
/* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(wa, {}) }),
|
|
2603
|
+
/* @__PURE__ */ T("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
2582
2604
|
/* @__PURE__ */ c("h1", { children: Tt }),
|
|
2583
|
-
/* @__PURE__ */ c("h2", { children:
|
|
2605
|
+
/* @__PURE__ */ c("h2", { children: _a })
|
|
2584
2606
|
] })
|
|
2585
2607
|
] })
|
|
2586
2608
|
] });
|
|
2587
|
-
},
|
|
2609
|
+
}, Ga = () => {
|
|
2588
2610
|
const { login: e, logoutReason: t } = xe(), [r, a] = U(""), [n, o] = U(""), [s, i] = U(!0), [l, d] = U({
|
|
2589
2611
|
username: "",
|
|
2590
2612
|
password: ""
|
|
2591
|
-
}),
|
|
2613
|
+
}), h = async (u) => {
|
|
2592
2614
|
u.preventDefault(), await e(
|
|
2593
2615
|
l.username,
|
|
2594
2616
|
l.password,
|
|
@@ -2603,12 +2625,12 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2603
2625
|
}, 500);
|
|
2604
2626
|
}), z(() => {
|
|
2605
2627
|
t && o(t);
|
|
2606
|
-
}, [t]), /* @__PURE__ */
|
|
2607
|
-
/* @__PURE__ */
|
|
2608
|
-
/* @__PURE__ */ c("div", { className:
|
|
2609
|
-
/* @__PURE__ */ c("form", { className: "mx-auto mt-5", onSubmit:
|
|
2610
|
-
/* @__PURE__ */ c(
|
|
2611
|
-
/* @__PURE__ */ c(
|
|
2628
|
+
}, [t]), /* @__PURE__ */ T(q, { children: [
|
|
2629
|
+
/* @__PURE__ */ T(ea, { children: [
|
|
2630
|
+
/* @__PURE__ */ c("div", { className: Ka(), children: /* @__PURE__ */ c(ja, {}) }),
|
|
2631
|
+
/* @__PURE__ */ c("form", { className: "mx-auto mt-5", onSubmit: h, children: /* @__PURE__ */ T(Ta, { rowGap: 7, width: "350px", children: [
|
|
2632
|
+
/* @__PURE__ */ c(ie, { span: 12, children: n && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
|
|
2633
|
+
/* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
|
|
2612
2634
|
Re,
|
|
2613
2635
|
{
|
|
2614
2636
|
required: !0,
|
|
@@ -2628,7 +2650,7 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2628
2650
|
error: r !== ""
|
|
2629
2651
|
}
|
|
2630
2652
|
) }),
|
|
2631
|
-
/* @__PURE__ */ c(
|
|
2653
|
+
/* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
|
|
2632
2654
|
kt,
|
|
2633
2655
|
{
|
|
2634
2656
|
required: !0,
|
|
@@ -2638,8 +2660,8 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2638
2660
|
mode: "dark",
|
|
2639
2661
|
focusMode: "light",
|
|
2640
2662
|
name: "password",
|
|
2641
|
-
label:
|
|
2642
|
-
rightElement: /* @__PURE__ */ c(ft, { focusMode: "light", children: s ? /* @__PURE__ */ c(
|
|
2663
|
+
label: Na,
|
|
2664
|
+
rightElement: /* @__PURE__ */ c(ft, { focusMode: "light", children: s ? /* @__PURE__ */ c(va, {}) : /* @__PURE__ */ c(Ea, {}) }),
|
|
2643
2665
|
onMaskChange: i,
|
|
2644
2666
|
onChange: (u) => {
|
|
2645
2667
|
d({
|
|
@@ -2651,7 +2673,7 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2651
2673
|
helperText: r
|
|
2652
2674
|
}
|
|
2653
2675
|
) }),
|
|
2654
|
-
/* @__PURE__ */ c(
|
|
2676
|
+
/* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
|
|
2655
2677
|
yt,
|
|
2656
2678
|
{
|
|
2657
2679
|
focusMode: "light",
|
|
@@ -2659,91 +2681,91 @@ const qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2659
2681
|
noBorder: !0,
|
|
2660
2682
|
type: "submit",
|
|
2661
2683
|
className: "mb-4 mt-6",
|
|
2662
|
-
children:
|
|
2684
|
+
children: xa
|
|
2663
2685
|
}
|
|
2664
2686
|
) })
|
|
2665
2687
|
] }) })
|
|
2666
2688
|
] }),
|
|
2667
|
-
/* @__PURE__ */ c(
|
|
2689
|
+
/* @__PURE__ */ c(Ba, {})
|
|
2668
2690
|
] });
|
|
2669
|
-
},
|
|
2691
|
+
}, Va = Ze(() => import("./App.DJozcBeB.js").then((e) => e.App)), Ja = ({ isComponent: e }) => {
|
|
2670
2692
|
const { isAuthenticated: t } = xe();
|
|
2671
|
-
return t ? /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(
|
|
2672
|
-
},
|
|
2693
|
+
return t ? /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Va, { isComponent: e }) }) : /* @__PURE__ */ c(Ga, {});
|
|
2694
|
+
}, Fa = ({
|
|
2673
2695
|
isComponent: e = !1
|
|
2674
|
-
}) => /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(
|
|
2696
|
+
}) => /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(Br, { clientId: Wr, children: /* @__PURE__ */ c(Ja, { isComponent: e }) }) }), to = () => /* @__PURE__ */ c(Fa, { isComponent: !0 });
|
|
2675
2697
|
export {
|
|
2676
2698
|
gt as A,
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2699
|
+
Hn as ABOUT_TITLE,
|
|
2700
|
+
pn as ACTION_LOCATION,
|
|
2701
|
+
dn as ACTION_MESSAGE,
|
|
2702
|
+
mn as ACTION_MODEL,
|
|
2703
|
+
un as ACTION_RESET,
|
|
2704
|
+
hn as ACTION_RESTORE,
|
|
2705
|
+
fn as ACTION_SEARCH,
|
|
2706
|
+
yn as ACTION_SORT,
|
|
2707
|
+
gn as ACTION_STREAMING,
|
|
2708
|
+
Ba as AppFooter,
|
|
2709
|
+
Wn as CANCEL,
|
|
2710
|
+
Gn as CARDS,
|
|
2711
|
+
Bn as CLEAR,
|
|
2712
|
+
An as E,
|
|
2713
|
+
sn as ERROR_MESSAGE,
|
|
2692
2714
|
Re as G,
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2715
|
+
ln as GPT4_MAX_TOKENS,
|
|
2716
|
+
Un as HISTORY_TITLE,
|
|
2717
|
+
wn as LOCAL_STORAGE_CHAT_DETAILS,
|
|
2718
|
+
kn as LOCAL_STORAGE_LOCATION,
|
|
2719
|
+
bn as LOCAL_STORAGE_PREFIX,
|
|
2720
|
+
En as LOCAL_STORAGE_SEARCH,
|
|
2721
|
+
vn as LOCAL_STORAGE_SORT,
|
|
2722
|
+
$n as LOG_OUT,
|
|
2723
|
+
ra as M,
|
|
2724
|
+
cn as MODEL_GPT4,
|
|
2725
|
+
ja as MessagesContainerHeader,
|
|
2726
|
+
_n as N,
|
|
2727
|
+
jn as NA,
|
|
2706
2728
|
ft as O,
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2729
|
+
Ln as PROFILE_TITLE,
|
|
2730
|
+
rn as ROLE_ASSISTANT,
|
|
2731
|
+
on as ROLE_HIDDEN,
|
|
2732
|
+
nn as ROLE_INTERNAL,
|
|
2733
|
+
an as ROLE_SYSTEM,
|
|
2734
|
+
tn as ROLE_USER,
|
|
2713
2735
|
Ne as S,
|
|
2714
2736
|
Mn as SEND,
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2737
|
+
Pn as STATS,
|
|
2738
|
+
Sn as STATS_SEPARATOR,
|
|
2739
|
+
to as SassySaint,
|
|
2740
|
+
Kn as TYPE_QUESTION,
|
|
2719
2741
|
Et as U,
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2742
|
+
Rn as a,
|
|
2743
|
+
Ta as b,
|
|
2744
|
+
ea as c,
|
|
2745
|
+
xn as c$1,
|
|
2746
|
+
Jn as convertLatitudeToDMS,
|
|
2747
|
+
Fn as convertLongitudeToDMS,
|
|
2748
|
+
xe as dr,
|
|
2749
|
+
Zn as durationFormatter,
|
|
2750
|
+
qn as extractAverage,
|
|
2728
2751
|
ht as f,
|
|
2729
|
-
|
|
2752
|
+
ta as f$1,
|
|
2730
2753
|
Oe as g,
|
|
2731
|
-
|
|
2732
|
-
|
|
2754
|
+
zn as getCurrentGeoLocation,
|
|
2755
|
+
Ka as getMessageContaintWrapperClass,
|
|
2733
2756
|
Ce as i,
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
xe as ur,
|
|
2757
|
+
In as i$1,
|
|
2758
|
+
Qn as isLastMessageFromRole,
|
|
2759
|
+
ie as j,
|
|
2760
|
+
On as l,
|
|
2761
|
+
Nn as n,
|
|
2762
|
+
Xn as numberFormatter,
|
|
2763
|
+
ia as o,
|
|
2764
|
+
Dn as p,
|
|
2765
|
+
eo as pluralize,
|
|
2766
|
+
Cn as r,
|
|
2767
|
+
Yn as renderDataAsList,
|
|
2768
|
+
Tn as s,
|
|
2769
|
+
Vn as truncate,
|
|
2748
2770
|
yt as x
|
|
2749
2771
|
};
|