@versini/sassysaint 8.3.5 → 8.4.0
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.CXxtuimC.js → App.CtGR4dYy.js} +4 -4
- package/dist/chunks/{ChatBubbleAssistant.CfsALTQw.js → ChatBubbleAssistant.BVqD406W.js} +2217 -2057
- package/dist/chunks/{index.BjoSA8Gx.js → index.9jdrTXwh.js} +3 -3
- package/dist/chunks/{index.DPHH2crp.js → index.BR8H2nmi.js} +2 -2
- package/dist/chunks/{index.Cevyj8oy.js → index.Cz0ewyun.js} +1 -1
- package/dist/chunks/{index.0cIpNIn7.js → index.D8pibqe7.js} +568 -555
- package/dist/chunks/{index.Bzwo7fse.js → index.DW_rQCIF.js} +1 -1
- package/dist/chunks/{index.CBr_x36W.js → index.DbmCoXJx.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as h, jsxs as Q, Fragment as at } from "react/jsx-runtime";
|
2
|
-
import Z, { createContext as Vr, useReducer as Wr, useRef as x, useCallback as re, useEffect as
|
2
|
+
import Z, { createContext as Vr, useReducer as Wr, useRef as x, useCallback as re, useEffect as oe, useContext as Zt, useSyncExternalStore as Mn, useLayoutEffect as Ue, useMemo as Ke, useDebugValue as Hn, useState as Ee, useId as Gr, lazy as Kn, Suspense as Vn } from "react";
|
3
3
|
import E from "clsx";
|
4
4
|
var Wn = Object.defineProperty, Gn = (e, t, r) => t in e ? Wn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Tt = (e, t, r) => Gn(e, typeof t != "symbol" ? t + "" : t, r);
|
5
5
|
/*!
|
@@ -22,11 +22,11 @@ function ce(e) {
|
|
22
22
|
r += String.fromCharCode(n);
|
23
23
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
24
24
|
}
|
25
|
-
function
|
26
|
-
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, n = t.padEnd(t.length + r, "="), a = atob(n),
|
25
|
+
function ot(e) {
|
26
|
+
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, n = t.padEnd(t.length + r, "="), a = atob(n), o = new ArrayBuffer(a.length), s = new Uint8Array(o);
|
27
27
|
for (let i = 0; i < a.length; i++)
|
28
|
-
|
29
|
-
return
|
28
|
+
s[i] = a.charCodeAt(i);
|
29
|
+
return o;
|
30
30
|
}
|
31
31
|
function er() {
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
@@ -35,7 +35,7 @@ function Br(e) {
|
|
35
35
|
const { id: t } = e;
|
36
36
|
return {
|
37
37
|
...e,
|
38
|
-
id:
|
38
|
+
id: ot(t),
|
39
39
|
transports: e.transports
|
40
40
|
};
|
41
41
|
}
|
@@ -86,7 +86,7 @@ function Bn({ error: e, options: t }) {
|
|
86
86
|
cause: e
|
87
87
|
});
|
88
88
|
if (e.name === "NotSupportedError")
|
89
|
-
return r.pubKeyCredParams.filter((
|
89
|
+
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new Y({
|
90
90
|
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
91
91
|
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
92
92
|
cause: e
|
@@ -96,9 +96,9 @@ function Bn({ error: e, options: t }) {
|
|
96
96
|
cause: e
|
97
97
|
});
|
98
98
|
if (e.name === "SecurityError") {
|
99
|
-
const
|
100
|
-
if (Fr(
|
101
|
-
if (r.rp.id !==
|
99
|
+
const o = window.location.hostname;
|
100
|
+
if (Fr(o)) {
|
101
|
+
if (r.rp.id !== o)
|
102
102
|
return new Y({
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
104
104
|
code: "ERROR_INVALID_RP_ID",
|
@@ -152,10 +152,10 @@ async function Yn(e) {
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
153
153
|
const t = { publicKey: {
|
154
154
|
...e,
|
155
|
-
challenge:
|
155
|
+
challenge: ot(e.challenge),
|
156
156
|
user: {
|
157
157
|
...e.user,
|
158
|
-
id:
|
158
|
+
id: ot(e.user.id)
|
159
159
|
},
|
160
160
|
excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(Br)
|
161
161
|
} };
|
@@ -168,28 +168,28 @@ async function Yn(e) {
|
|
168
168
|
}
|
169
169
|
if (!r)
|
170
170
|
throw new Error("Registration was not completed");
|
171
|
-
const { id: n, rawId: a, response:
|
171
|
+
const { id: n, rawId: a, response: o, type: s } = r;
|
172
172
|
let i;
|
173
|
-
typeof
|
173
|
+
typeof o.getTransports == "function" && (i = o.getTransports());
|
174
174
|
let c;
|
175
|
-
if (typeof
|
175
|
+
if (typeof o.getPublicKeyAlgorithm == "function")
|
176
176
|
try {
|
177
|
-
c =
|
177
|
+
c = o.getPublicKeyAlgorithm();
|
178
178
|
} catch (l) {
|
179
179
|
_t("getPublicKeyAlgorithm()", l);
|
180
180
|
}
|
181
181
|
let m;
|
182
|
-
if (typeof
|
182
|
+
if (typeof o.getPublicKey == "function")
|
183
183
|
try {
|
184
|
-
const l =
|
184
|
+
const l = o.getPublicKey();
|
185
185
|
l !== null && (m = ce(l));
|
186
186
|
} catch (l) {
|
187
187
|
_t("getPublicKey()", l);
|
188
188
|
}
|
189
189
|
let f;
|
190
|
-
if (typeof
|
190
|
+
if (typeof o.getAuthenticatorData == "function")
|
191
191
|
try {
|
192
|
-
f = ce(
|
192
|
+
f = ce(o.getAuthenticatorData());
|
193
193
|
} catch (l) {
|
194
194
|
_t("getAuthenticatorData()", l);
|
195
195
|
}
|
@@ -197,14 +197,14 @@ async function Yn(e) {
|
|
197
197
|
id: n,
|
198
198
|
rawId: ce(a),
|
199
199
|
response: {
|
200
|
-
attestationObject: ce(
|
201
|
-
clientDataJSON: ce(
|
200
|
+
attestationObject: ce(o.attestationObject),
|
201
|
+
clientDataJSON: ce(o.clientDataJSON),
|
202
202
|
transports: i,
|
203
203
|
publicKeyAlgorithm: c,
|
204
204
|
publicKey: m,
|
205
205
|
authenticatorData: f
|
206
206
|
},
|
207
|
-
type:
|
207
|
+
type: s,
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
209
209
|
authenticatorAttachment: Yr(r.authenticatorAttachment)
|
210
210
|
};
|
@@ -268,7 +268,7 @@ async function zn(e, t = !1) {
|
|
268
268
|
((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (l = e.allowCredentials) == null ? void 0 : l.map(Br));
|
269
269
|
const n = {
|
270
270
|
...e,
|
271
|
-
challenge:
|
271
|
+
challenge: ot(e.challenge),
|
272
272
|
allowCredentials: r
|
273
273
|
}, a = {};
|
274
274
|
if (t) {
|
@@ -279,18 +279,18 @@ async function zn(e, t = !1) {
|
|
279
279
|
a.mediation = "conditional", n.allowCredentials = [];
|
280
280
|
}
|
281
281
|
a.publicKey = n, a.signal = Jr.createNewAbortSignal();
|
282
|
-
let
|
282
|
+
let o;
|
283
283
|
try {
|
284
|
-
|
284
|
+
o = await navigator.credentials.get(a);
|
285
285
|
} catch (d) {
|
286
286
|
throw qn({ error: d, options: a });
|
287
287
|
}
|
288
|
-
if (!
|
288
|
+
if (!o)
|
289
289
|
throw new Error("Authentication was not completed");
|
290
|
-
const { id:
|
290
|
+
const { id: s, rawId: i, response: c, type: m } = o;
|
291
291
|
let f;
|
292
292
|
return c.userHandle && (f = ce(c.userHandle)), {
|
293
|
-
id:
|
293
|
+
id: s,
|
294
294
|
rawId: ce(i),
|
295
295
|
response: {
|
296
296
|
authenticatorData: ce(c.authenticatorData),
|
@@ -299,8 +299,8 @@ async function zn(e, t = !1) {
|
|
299
299
|
userHandle: f
|
300
300
|
},
|
301
301
|
type: m,
|
302
|
-
clientExtensionResults:
|
303
|
-
authenticatorAttachment: Yr(
|
302
|
+
clientExtensionResults: o.getClientExtensionResults(),
|
303
|
+
authenticatorAttachment: Yr(o.authenticatorAttachment)
|
304
304
|
};
|
305
305
|
}
|
306
306
|
/*!
|
@@ -353,7 +353,7 @@ awIDAQAB
|
|
353
353
|
REFRESH: "refresh"
|
354
354
|
}, ut = crypto, qr = (e) => e instanceof CryptoKey, Ye = new TextEncoder(), Ve = new TextDecoder();
|
355
355
|
function Qn(...e) {
|
356
|
-
const t = e.reduce((a, { length:
|
356
|
+
const t = e.reduce((a, { length: o }) => a + o, 0), r = new Uint8Array(t);
|
357
357
|
let n = 0;
|
358
358
|
for (const a of e)
|
359
359
|
r.set(a, n), n += a.length;
|
@@ -446,18 +446,18 @@ class aa extends z {
|
|
446
446
|
}
|
447
447
|
}
|
448
448
|
aa.code = "ERR_JWKS_NO_MATCHING_KEY";
|
449
|
-
class
|
449
|
+
class oa extends z {
|
450
450
|
constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
|
451
451
|
super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
452
452
|
}
|
453
453
|
}
|
454
|
-
|
455
|
-
class
|
454
|
+
oa.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
455
|
+
class sa extends z {
|
456
456
|
constructor(t = "request timed out", r) {
|
457
457
|
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
458
458
|
}
|
459
459
|
}
|
460
|
-
|
460
|
+
sa.code = "ERR_JWKS_TIMEOUT";
|
461
461
|
class Xr extends z {
|
462
462
|
constructor(t = "signature verification failed", r) {
|
463
463
|
super(t, r), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
@@ -559,7 +559,7 @@ const hr = (e, ...t) => Qr("Key must be ", e, ...t);
|
|
559
559
|
function Zr(e, t, ...r) {
|
560
560
|
return Qr(`Key for the ${e} algorithm must be `, t, ...r);
|
561
561
|
}
|
562
|
-
const en = (e) => qr(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
562
|
+
const en = (e) => qr(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", st = ["CryptoKey"], da = (...e) => {
|
563
563
|
const t = e.filter(Boolean);
|
564
564
|
if (t.length === 0 || t.length === 1)
|
565
565
|
return !0;
|
@@ -570,10 +570,10 @@ const en = (e) => qr(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
570
570
|
r = new Set(a);
|
571
571
|
continue;
|
572
572
|
}
|
573
|
-
for (const
|
574
|
-
if (r.has(
|
573
|
+
for (const o of a) {
|
574
|
+
if (r.has(o))
|
575
575
|
return !1;
|
576
|
-
r.add(
|
576
|
+
r.add(o);
|
577
577
|
}
|
578
578
|
}
|
579
579
|
return !0;
|
@@ -694,11 +694,11 @@ const tn = async (e) => {
|
|
694
694
|
}, rn = (e) => we(e);
|
695
695
|
let Ae, Re;
|
696
696
|
const nn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", it = async (e, t, r, n, a = !1) => {
|
697
|
-
let
|
698
|
-
if (
|
699
|
-
return
|
700
|
-
const
|
701
|
-
return a && Object.freeze(t),
|
697
|
+
let o = e.get(t);
|
698
|
+
if (o != null && o[n])
|
699
|
+
return o[n];
|
700
|
+
const s = await tn({ ...r, alg: n });
|
701
|
+
return a && Object.freeze(t), o ? o[n] = s : e.set(t, { [n]: s }), s;
|
702
702
|
}, ya = (e, t) => {
|
703
703
|
if (nn(e)) {
|
704
704
|
let r = e.export({ format: "jwk" });
|
@@ -717,7 +717,7 @@ const nn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
717
717
|
if (n === -1)
|
718
718
|
return !1;
|
719
719
|
const a = e.subarray(n, n + t.length);
|
720
|
-
return a.length !== t.length ? !1 : a.every((
|
720
|
+
return a.length !== t.length ? !1 : a.every((o, s) => o === t[s]) || be(e, t, n + 1);
|
721
721
|
}, mr = (e) => {
|
722
722
|
switch (!0) {
|
723
723
|
case be(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
@@ -738,52 +738,52 @@ const nn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
738
738
|
throw new ae("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
739
739
|
}
|
740
740
|
}, Sa = async (e, t, r, n, a) => {
|
741
|
-
let
|
741
|
+
let o, s;
|
742
742
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((c) => c.charCodeAt(0)));
|
743
743
|
switch (n) {
|
744
744
|
case "PS256":
|
745
745
|
case "PS384":
|
746
746
|
case "PS512":
|
747
|
-
|
747
|
+
o = { name: "RSA-PSS", hash: `SHA-${n.slice(-3)}` }, s = ["verify"];
|
748
748
|
break;
|
749
749
|
case "RS256":
|
750
750
|
case "RS384":
|
751
751
|
case "RS512":
|
752
|
-
|
752
|
+
o = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${n.slice(-3)}` }, s = ["verify"];
|
753
753
|
break;
|
754
754
|
case "RSA-OAEP":
|
755
755
|
case "RSA-OAEP-256":
|
756
756
|
case "RSA-OAEP-384":
|
757
757
|
case "RSA-OAEP-512":
|
758
|
-
|
758
|
+
o = {
|
759
759
|
name: "RSA-OAEP",
|
760
760
|
hash: `SHA-${parseInt(n.slice(-3), 10) || 1}`
|
761
|
-
},
|
761
|
+
}, s = ["encrypt", "wrapKey"];
|
762
762
|
break;
|
763
763
|
case "ES256":
|
764
|
-
|
764
|
+
o = { name: "ECDSA", namedCurve: "P-256" }, s = ["verify"];
|
765
765
|
break;
|
766
766
|
case "ES384":
|
767
|
-
|
767
|
+
o = { name: "ECDSA", namedCurve: "P-384" }, s = ["verify"];
|
768
768
|
break;
|
769
769
|
case "ES512":
|
770
|
-
|
770
|
+
o = { name: "ECDSA", namedCurve: "P-521" }, s = ["verify"];
|
771
771
|
break;
|
772
772
|
case "ECDH-ES":
|
773
773
|
case "ECDH-ES+A128KW":
|
774
774
|
case "ECDH-ES+A192KW":
|
775
775
|
case "ECDH-ES+A256KW": {
|
776
776
|
const c = mr(i);
|
777
|
-
|
777
|
+
o = c.startsWith("P-") ? { name: "ECDH", namedCurve: c } : { name: c }, s = [];
|
778
778
|
break;
|
779
779
|
}
|
780
780
|
case "EdDSA":
|
781
|
-
|
781
|
+
o = { name: mr(i) }, s = ["verify"];
|
782
782
|
break;
|
783
783
|
default:
|
784
784
|
throw new ae('Invalid or unsupported "alg" (Algorithm) value');
|
785
785
|
}
|
786
|
-
return ut.subtle.importKey(t, i,
|
786
|
+
return ut.subtle.importKey(t, i, o, !1, s);
|
787
787
|
}, wa = (e, t, r) => Sa(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
788
788
|
async function Ta(e, t, r) {
|
789
789
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
@@ -825,7 +825,7 @@ const Oe = (e) => e == null ? void 0 : e[Symbol.toStringTag], Vt = (e, t, r) =>
|
|
825
825
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
826
826
|
}
|
827
827
|
if (!en(t))
|
828
|
-
throw new TypeError(Zr(e, t, ...
|
828
|
+
throw new TypeError(Zr(e, t, ...st, "Uint8Array", n ? "JSON Web Key" : null));
|
829
829
|
if (t.type !== "secret")
|
830
830
|
throw new TypeError(`${Oe(t)} instances for symmetric algorithms must be of type "secret"`);
|
831
831
|
}
|
@@ -842,7 +842,7 @@ const Oe = (e) => e == null ? void 0 : e[Symbol.toStringTag], Vt = (e, t, r) =>
|
|
842
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
843
843
|
}
|
844
844
|
if (!en(t))
|
845
|
-
throw new TypeError(Zr(e, t, ...
|
845
|
+
throw new TypeError(Zr(e, t, ...st, n ? "JSON Web Key" : null));
|
846
846
|
if (t.type === "secret")
|
847
847
|
throw new TypeError(`${Oe(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
848
848
|
if (r === "sign" && t.type === "public")
|
@@ -864,17 +864,17 @@ function Ra(e, t, r, n, a) {
|
|
864
864
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
865
865
|
if (!n || n.crit === void 0)
|
866
866
|
return /* @__PURE__ */ new Set();
|
867
|
-
if (!Array.isArray(n.crit) || n.crit.length === 0 || n.crit.some((
|
867
|
+
if (!Array.isArray(n.crit) || n.crit.length === 0 || n.crit.some((s) => typeof s != "string" || s.length === 0))
|
868
868
|
throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
|
869
|
-
let
|
870
|
-
r !== void 0 ?
|
871
|
-
for (const
|
872
|
-
if (!
|
873
|
-
throw new ae(`Extension Header Parameter "${
|
874
|
-
if (a[
|
875
|
-
throw new e(`Extension Header Parameter "${
|
876
|
-
if (
|
877
|
-
throw new e(`Extension Header Parameter "${
|
869
|
+
let o;
|
870
|
+
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
871
|
+
for (const s of n.crit) {
|
872
|
+
if (!o.has(s))
|
873
|
+
throw new ae(`Extension Header Parameter "${s}" is not recognized`);
|
874
|
+
if (a[s] === void 0)
|
875
|
+
throw new e(`Extension Header Parameter "${s}" is missing`);
|
876
|
+
if (o.get(s) && n[s] === void 0)
|
877
|
+
throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`);
|
878
878
|
}
|
879
879
|
return new Set(n.crit);
|
880
880
|
}
|
@@ -914,17 +914,17 @@ async function Ca(e, t, r) {
|
|
914
914
|
return la(t, e, r), t;
|
915
915
|
if (t instanceof Uint8Array) {
|
916
916
|
if (!e.startsWith("HS"))
|
917
|
-
throw new TypeError(hr(t, ...
|
917
|
+
throw new TypeError(hr(t, ...st));
|
918
918
|
return ut.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
919
919
|
}
|
920
|
-
throw new TypeError(hr(t, ...
|
920
|
+
throw new TypeError(hr(t, ...st, "Uint8Array", "JSON Web Key"));
|
921
921
|
}
|
922
922
|
const Na = async (e, t, r, n) => {
|
923
923
|
const a = await Ca(e, t, "verify");
|
924
924
|
fa(e, a);
|
925
|
-
const
|
925
|
+
const o = ka(e, a.algorithm);
|
926
926
|
try {
|
927
|
-
return await ut.subtle.verify(
|
927
|
+
return await ut.subtle.verify(o, a, r, n);
|
928
928
|
} catch {
|
929
929
|
return !1;
|
930
930
|
}
|
@@ -955,9 +955,9 @@ async function Oa(e, t, r) {
|
|
955
955
|
const a = {
|
956
956
|
...n,
|
957
957
|
...e.header
|
958
|
-
},
|
959
|
-
let
|
960
|
-
if (
|
958
|
+
}, o = Ra(H, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, n, a);
|
959
|
+
let s = !0;
|
960
|
+
if (o.has("b64") && (s = n.b64, typeof s != "boolean"))
|
961
961
|
throw new H('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
962
962
|
const { alg: i } = a;
|
963
963
|
if (typeof i != "string" || !i)
|
@@ -965,7 +965,7 @@ async function Oa(e, t, r) {
|
|
965
965
|
const c = va("algorithms", r.algorithms);
|
966
966
|
if (c && !c.has(i))
|
967
967
|
throw new zr('"alg" (Algorithm) Header Parameter value not allowed');
|
968
|
-
if (
|
968
|
+
if (s) {
|
969
969
|
if (typeof e.payload != "string")
|
970
970
|
throw new H("JWS Payload must be a string");
|
971
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
@@ -982,7 +982,7 @@ async function Oa(e, t, r) {
|
|
982
982
|
if (!await Na(i, t, u, f))
|
983
983
|
throw new Xr();
|
984
984
|
let l;
|
985
|
-
if (
|
985
|
+
if (s)
|
986
986
|
try {
|
987
987
|
l = we(e.payload);
|
988
988
|
} catch {
|
@@ -995,13 +995,13 @@ async function Oa(e, t, r) {
|
|
995
995
|
async function xa(e, t, r) {
|
996
996
|
if (e instanceof Uint8Array && (e = Ve.decode(e)), typeof e != "string")
|
997
997
|
throw new H("Compact JWS must be a string or Uint8Array");
|
998
|
-
const { 0: n, 1: a, 2:
|
999
|
-
if (
|
998
|
+
const { 0: n, 1: a, 2: o, length: s } = e.split(".");
|
999
|
+
if (s !== 3)
|
1000
1000
|
throw new H("Invalid Compact JWS");
|
1001
|
-
const i = await Oa({ payload: a, protected: n, signature:
|
1001
|
+
const i = await Oa({ payload: a, protected: n, signature: o }, t, r), c = { payload: i.payload, protectedHeader: i.protectedHeader };
|
1002
1002
|
return typeof t == "function" ? { ...c, key: i.key } : c;
|
1003
1003
|
}
|
1004
|
-
const Pa = (e) => Math.floor(e.getTime() / 1e3),
|
1004
|
+
const Pa = (e) => Math.floor(e.getTime() / 1e3), on = 60, sn = on * 60, tr = sn * 24, Da = tr * 7, La = tr * 365.25, $a = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, gr = (e) => {
|
1005
1005
|
const t = $a.exec(e);
|
1006
1006
|
if (!t || t[4] && t[1])
|
1007
1007
|
throw new TypeError("Invalid time period format");
|
@@ -1020,14 +1020,14 @@ const Pa = (e) => Math.floor(e.getTime() / 1e3), sn = 60, on = sn * 60, tr = on
|
|
1020
1020
|
case "min":
|
1021
1021
|
case "mins":
|
1022
1022
|
case "m":
|
1023
|
-
a = Math.round(r *
|
1023
|
+
a = Math.round(r * on);
|
1024
1024
|
break;
|
1025
1025
|
case "hour":
|
1026
1026
|
case "hours":
|
1027
1027
|
case "hr":
|
1028
1028
|
case "hrs":
|
1029
1029
|
case "h":
|
1030
|
-
a = Math.round(r *
|
1030
|
+
a = Math.round(r * sn);
|
1031
1031
|
break;
|
1032
1032
|
case "day":
|
1033
1033
|
case "days":
|
@@ -1055,12 +1055,12 @@ const Pa = (e) => Math.floor(e.getTime() / 1e3), sn = 60, on = sn * 60, tr = on
|
|
1055
1055
|
const { typ: a } = r;
|
1056
1056
|
if (a && (typeof e.typ != "string" || yr(e.typ) !== yr(a)))
|
1057
1057
|
throw new ne('unexpected "typ" JWT header value', n, "typ", "check_failed");
|
1058
|
-
const { requiredClaims:
|
1059
|
-
m !== void 0 && f.push("iat"), c !== void 0 && f.push("aud"), i !== void 0 && f.push("sub"),
|
1058
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: c, maxTokenAge: m } = r, f = [...o];
|
1059
|
+
m !== void 0 && f.push("iat"), c !== void 0 && f.push("aud"), i !== void 0 && f.push("sub"), s !== void 0 && f.push("iss");
|
1060
1060
|
for (const p of new Set(f.reverse()))
|
1061
1061
|
if (!(p in n))
|
1062
1062
|
throw new ne(`missing required "${p}" claim`, n, p, "missing");
|
1063
|
-
if (
|
1063
|
+
if (s && !(Array.isArray(s) ? s : [s]).includes(n.iss))
|
1064
1064
|
throw new ne('unexpected "iss" claim value', n, "iss", "check_failed");
|
1065
1065
|
if (i && n.sub !== i)
|
1066
1066
|
throw new ne('unexpected "sub" claim value', n, "sub", "check_failed");
|
@@ -1109,8 +1109,8 @@ async function Ha(e, t, r) {
|
|
1109
1109
|
const a = await xa(e, t, r);
|
1110
1110
|
if ((n = a.protectedHeader.crit) != null && n.includes("b64") && a.protectedHeader.b64 === !1)
|
1111
1111
|
throw new ie("JWTs MUST NOT use unencoded payload");
|
1112
|
-
const
|
1113
|
-
return typeof t == "function" ? { ...
|
1112
|
+
const o = { payload: Ma(a.protectedHeader, a.payload, r), protectedHeader: a.protectedHeader };
|
1113
|
+
return typeof t == "function" ? { ...o, key: a.key } : o;
|
1114
1114
|
}
|
1115
1115
|
const Ka = we;
|
1116
1116
|
function Va(e) {
|
@@ -1212,9 +1212,9 @@ function qe({
|
|
1212
1212
|
initialValue: t
|
1213
1213
|
}) {
|
1214
1214
|
const r = Mn(Qa, () => Tr(e)), n = re(
|
1215
|
-
(
|
1215
|
+
(s) => {
|
1216
1216
|
try {
|
1217
|
-
const i = typeof
|
1217
|
+
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
1218
1218
|
i == null ? Xa(e) : wr(e, i);
|
1219
1219
|
} catch (i) {
|
1220
1220
|
console.warn(i);
|
@@ -1223,16 +1223,16 @@ function qe({
|
|
1223
1223
|
[e, r]
|
1224
1224
|
), a = re(() => {
|
1225
1225
|
n(t);
|
1226
|
-
}, [t, n]),
|
1226
|
+
}, [t, n]), o = re(() => {
|
1227
1227
|
n(null);
|
1228
1228
|
}, [n]);
|
1229
|
-
return
|
1229
|
+
return oe(() => {
|
1230
1230
|
try {
|
1231
1231
|
Tr(e) === null && typeof t < "u" && wr(e, t);
|
1232
|
-
} catch (
|
1233
|
-
console.warn(
|
1232
|
+
} catch (s) {
|
1233
|
+
console.warn(s);
|
1234
1234
|
}
|
1235
|
-
}, [e, t]), [r ? JSON.parse(r) : null, n, a,
|
1235
|
+
}, [e, t]), [r ? JSON.parse(r) : null, n, a, o];
|
1236
1236
|
}
|
1237
1237
|
const B = [];
|
1238
1238
|
for (let e = 0; e < 256; ++e)
|
@@ -1241,24 +1241,24 @@ function Za(e, t = 0) {
|
|
1241
1241
|
return (B[e[t + 0]] + B[e[t + 1]] + B[e[t + 2]] + B[e[t + 3]] + "-" + B[e[t + 4]] + B[e[t + 5]] + "-" + B[e[t + 6]] + B[e[t + 7]] + "-" + B[e[t + 8]] + B[e[t + 9]] + "-" + B[e[t + 10]] + B[e[t + 11]] + B[e[t + 12]] + B[e[t + 13]] + B[e[t + 14]] + B[e[t + 15]]).toLowerCase();
|
1242
1242
|
}
|
1243
1243
|
let Rt;
|
1244
|
-
const
|
1245
|
-
function
|
1244
|
+
const eo = new Uint8Array(16);
|
1245
|
+
function to() {
|
1246
1246
|
if (!Rt) {
|
1247
1247
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
1248
1248
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
1249
1249
|
Rt = crypto.getRandomValues.bind(crypto);
|
1250
1250
|
}
|
1251
|
-
return Rt(
|
1251
|
+
return Rt(eo);
|
1252
1252
|
}
|
1253
|
-
const
|
1253
|
+
const ro = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), _r = { randomUUID: ro };
|
1254
1254
|
function vt(e, t, r) {
|
1255
1255
|
if (_r.randomUUID && !e)
|
1256
1256
|
return _r.randomUUID();
|
1257
1257
|
e = e || {};
|
1258
|
-
const n = e.random || (e.rng ||
|
1258
|
+
const n = e.random || (e.rng || to)();
|
1259
1259
|
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Za(n);
|
1260
1260
|
}
|
1261
|
-
const ve = "Your session has expired. For your security, please log in again to continue.",
|
1261
|
+
const ve = "Your session has expired. For your security, please log in again to continue.", no = "Your session has been successfully terminated.", kt = "Login failed. Please try again.", ao = "Error getting access token, please re-authenticate.", oo = "You forgot to wrap your component in <AuthProvider>.", ze = "@@auth@@", $e = "LOADING", rt = "LOGIN", ln = "LOGOUT", We = "success", ue = "failure", dn = "include", un = "POST", fn = "application/json", Xe = {
|
1262
1262
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
1263
1263
|
$clientId: String!,
|
1264
1264
|
$username: String!,
|
@@ -1364,11 +1364,11 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1364
1364
|
endpoint: a
|
1365
1365
|
}) => {
|
1366
1366
|
try {
|
1367
|
-
const
|
1367
|
+
const o = `Bearer ${e}`, s = await fetch(`${a}/graphql`, {
|
1368
1368
|
credentials: dn,
|
1369
1369
|
method: un,
|
1370
1370
|
headers: {
|
1371
|
-
authorization:
|
1371
|
+
authorization: o,
|
1372
1372
|
"Content-Type": fn,
|
1373
1373
|
[jr.CLIENT_ID]: `${r}`
|
1374
1374
|
},
|
@@ -1377,15 +1377,15 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1377
1377
|
variables: n
|
1378
1378
|
})
|
1379
1379
|
});
|
1380
|
-
if (
|
1380
|
+
if (s.status !== 200)
|
1381
1381
|
return { status: ue, data: [] };
|
1382
|
-
const { data: i } = await
|
1382
|
+
const { data: i } = await s.json();
|
1383
1383
|
return {
|
1384
1384
|
status: We,
|
1385
1385
|
data: i[t.method]
|
1386
1386
|
};
|
1387
|
-
} catch (
|
1388
|
-
return console.error(
|
1387
|
+
} catch (o) {
|
1388
|
+
return console.error(o), { status: ue, data: [] };
|
1389
1389
|
}
|
1390
1390
|
}, ft = async ({
|
1391
1391
|
type: e,
|
@@ -1405,39 +1405,39 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1405
1405
|
});
|
1406
1406
|
if (a.status !== 200)
|
1407
1407
|
return { status: ue, data: [] };
|
1408
|
-
const { data:
|
1408
|
+
const { data: o } = await a.json();
|
1409
1409
|
return {
|
1410
1410
|
status: We,
|
1411
|
-
data:
|
1411
|
+
data: o || []
|
1412
1412
|
};
|
1413
1413
|
} catch (a) {
|
1414
1414
|
return console.error(a), { status: ue, data: [] };
|
1415
1415
|
}
|
1416
|
-
},
|
1416
|
+
}, so = process.env.NODE_ENV === "production", io = !so, hn = {
|
1417
1417
|
isLoading: !0,
|
1418
1418
|
isAuthenticated: !1,
|
1419
1419
|
user: void 0,
|
1420
1420
|
logoutReason: "",
|
1421
1421
|
debug: !1,
|
1422
1422
|
authenticationType: ""
|
1423
|
-
},
|
1423
|
+
}, co = (e) => {
|
1424
1424
|
try {
|
1425
1425
|
const t = Wa(e);
|
1426
1426
|
return t ? t[F.USER_ID_KEY] : "";
|
1427
1427
|
} catch {
|
1428
1428
|
return "";
|
1429
1429
|
}
|
1430
|
-
},
|
1430
|
+
}, lo = async ({
|
1431
1431
|
userId: e,
|
1432
1432
|
clientId: t,
|
1433
1433
|
domain: r,
|
1434
1434
|
idToken: n = "",
|
1435
1435
|
endpoint: a
|
1436
1436
|
}) => {
|
1437
|
-
var
|
1437
|
+
var o;
|
1438
1438
|
try {
|
1439
1439
|
return {
|
1440
|
-
status: ((
|
1440
|
+
status: ((o = await ft({
|
1441
1441
|
endpoint: a,
|
1442
1442
|
type: dt.LOGOUT,
|
1443
1443
|
clientId: t,
|
@@ -1446,21 +1446,21 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1446
1446
|
domain: r,
|
1447
1447
|
idToken: n
|
1448
1448
|
}
|
1449
|
-
})) == null ? void 0 :
|
1449
|
+
})) == null ? void 0 : o.status) || ue
|
1450
1450
|
};
|
1451
1451
|
} catch {
|
1452
1452
|
return {
|
1453
1453
|
status: ue
|
1454
1454
|
};
|
1455
1455
|
}
|
1456
|
-
},
|
1456
|
+
}, uo = async ({
|
1457
1457
|
username: e,
|
1458
1458
|
password: t,
|
1459
1459
|
clientId: r,
|
1460
1460
|
nonce: n,
|
1461
1461
|
type: a,
|
1462
|
-
sessionExpiration:
|
1463
|
-
code:
|
1462
|
+
sessionExpiration: o,
|
1463
|
+
code: s,
|
1464
1464
|
code_verifier: i,
|
1465
1465
|
domain: c,
|
1466
1466
|
ua: m,
|
@@ -1476,9 +1476,9 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1476
1476
|
type: a || xe.ID_AND_ACCESS_TOKEN,
|
1477
1477
|
username: e,
|
1478
1478
|
password: t,
|
1479
|
-
sessionExpiration:
|
1479
|
+
sessionExpiration: o,
|
1480
1480
|
nonce: n,
|
1481
|
-
code:
|
1481
|
+
code: s,
|
1482
1482
|
code_verifier: i,
|
1483
1483
|
domain: c,
|
1484
1484
|
ua: m
|
@@ -1499,7 +1499,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1499
1499
|
status: !1
|
1500
1500
|
};
|
1501
1501
|
}
|
1502
|
-
},
|
1502
|
+
}, fo = async ({
|
1503
1503
|
nonce: e,
|
1504
1504
|
clientId: t,
|
1505
1505
|
code_challenge: r,
|
@@ -1507,7 +1507,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1507
1507
|
}) => {
|
1508
1508
|
var a;
|
1509
1509
|
try {
|
1510
|
-
const
|
1510
|
+
const o = await ft({
|
1511
1511
|
endpoint: n,
|
1512
1512
|
type: dt.CODE,
|
1513
1513
|
clientId: t,
|
@@ -1517,9 +1517,9 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1517
1517
|
code_challenge: r
|
1518
1518
|
}
|
1519
1519
|
});
|
1520
|
-
return (a =
|
1520
|
+
return (a = o == null ? void 0 : o.data) != null && a.code ? {
|
1521
1521
|
status: We,
|
1522
|
-
data:
|
1522
|
+
data: o.data.code
|
1523
1523
|
} : {
|
1524
1524
|
status: ue,
|
1525
1525
|
data: ""
|
@@ -1530,19 +1530,19 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1530
1530
|
data: ""
|
1531
1531
|
};
|
1532
1532
|
}
|
1533
|
-
},
|
1533
|
+
}, ho = async ({
|
1534
1534
|
clientId: e,
|
1535
1535
|
userId: t,
|
1536
1536
|
nonce: r,
|
1537
1537
|
refreshToken: n,
|
1538
1538
|
accessToken: a,
|
1539
|
-
domain:
|
1540
|
-
endpoint:
|
1539
|
+
domain: o,
|
1540
|
+
endpoint: s
|
1541
1541
|
}) => {
|
1542
1542
|
var i;
|
1543
1543
|
try {
|
1544
1544
|
const c = await ft({
|
1545
|
-
endpoint:
|
1545
|
+
endpoint: s,
|
1546
1546
|
type: dt.REFRESH,
|
1547
1547
|
clientId: e,
|
1548
1548
|
params: {
|
@@ -1551,7 +1551,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1551
1551
|
nonce: r,
|
1552
1552
|
refreshToken: n,
|
1553
1553
|
accessToken: a,
|
1554
|
-
domain:
|
1554
|
+
domain: o
|
1555
1555
|
}
|
1556
1556
|
}), m = await Me((i = c == null ? void 0 : c.data) == null ? void 0 : i.accessToken);
|
1557
1557
|
return m && m.payload[F.USER_ID_KEY] !== "" && m.payload[F.NONCE_KEY] === r ? {
|
@@ -1568,7 +1568,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
1568
1568
|
};
|
1569
1569
|
}
|
1570
1570
|
};
|
1571
|
-
class
|
1571
|
+
class mo {
|
1572
1572
|
constructor(t = null, r = null) {
|
1573
1573
|
Tt(this, "refreshTokenPromise", null), Tt(this, "accessToken"), Tt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
1574
1574
|
}
|
@@ -1577,10 +1577,10 @@ class hs {
|
|
1577
1577
|
userId: r,
|
1578
1578
|
nonce: n,
|
1579
1579
|
domain: a,
|
1580
|
-
endpoint:
|
1580
|
+
endpoint: o
|
1581
1581
|
}) {
|
1582
1582
|
this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
|
1583
|
-
endpoint:
|
1583
|
+
endpoint: o,
|
1584
1584
|
clientId: t,
|
1585
1585
|
userId: r,
|
1586
1586
|
nonce: n,
|
@@ -1597,18 +1597,18 @@ class hs {
|
|
1597
1597
|
clientId: r,
|
1598
1598
|
userId: n,
|
1599
1599
|
nonce: a,
|
1600
|
-
domain:
|
1600
|
+
domain: o
|
1601
1601
|
}) {
|
1602
|
-
const
|
1603
|
-
if (
|
1604
|
-
const i = await
|
1602
|
+
const s = await Me(this.refreshToken);
|
1603
|
+
if (s && s.payload[F.USER_ID_KEY] !== "") {
|
1604
|
+
const i = await ho({
|
1605
1605
|
endpoint: t,
|
1606
1606
|
clientId: r,
|
1607
1607
|
userId: n,
|
1608
1608
|
nonce: a,
|
1609
1609
|
refreshToken: this.refreshToken,
|
1610
1610
|
accessToken: this.accessToken,
|
1611
|
-
domain:
|
1611
|
+
domain: o
|
1612
1612
|
});
|
1613
1613
|
return i.status ? (this.accessToken = i.accessToken, this.refreshToken = i.refreshToken, {
|
1614
1614
|
status: We,
|
@@ -1623,13 +1623,13 @@ class hs {
|
|
1623
1623
|
};
|
1624
1624
|
}
|
1625
1625
|
}
|
1626
|
-
const
|
1626
|
+
const po = (e) => re(
|
1627
1627
|
(...t) => {
|
1628
1628
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
1629
1629
|
},
|
1630
1630
|
[e]
|
1631
1631
|
), Ne = () => {
|
1632
|
-
throw new Error(
|
1632
|
+
throw new Error(oo);
|
1633
1633
|
}, mn = Vr({
|
1634
1634
|
isAuthenticated: !1,
|
1635
1635
|
isLoading: !1,
|
@@ -1641,11 +1641,11 @@ const ms = (e) => re(
|
|
1641
1641
|
loginWithPasskey: Ne,
|
1642
1642
|
logoutReason: "",
|
1643
1643
|
authenticationType: ""
|
1644
|
-
}),
|
1644
|
+
}), go = Z.createContext({
|
1645
1645
|
state: hn,
|
1646
1646
|
dispatch: () => {
|
1647
1647
|
}
|
1648
|
-
}),
|
1648
|
+
}), yo = (e, t) => (t == null ? void 0 : t.type) === $e ? {
|
1649
1649
|
...e,
|
1650
1650
|
isLoading: t.payload.isLoading
|
1651
1651
|
} : (t == null ? void 0 : t.type) === rt ? {
|
@@ -1668,12 +1668,12 @@ const ms = (e) => re(
|
|
1668
1668
|
clientId: r,
|
1669
1669
|
domain: n = "",
|
1670
1670
|
debug: a = !1,
|
1671
|
-
endpoint:
|
1671
|
+
endpoint: o = io ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
1672
1672
|
}) => {
|
1673
|
-
const [
|
1673
|
+
const [s, i] = Wr(yo, {
|
1674
1674
|
...hn,
|
1675
1675
|
debug: a
|
1676
|
-
}), c =
|
1676
|
+
}), c = po(a), m = x(!1), [f, u, , l] = qe({
|
1677
1677
|
key: `${ze}::${r}::@@user@@`
|
1678
1678
|
}), [d, p, , y] = qe({
|
1679
1679
|
key: `${ze}::${r}::@@access@@`
|
@@ -1683,7 +1683,7 @@ const ms = (e) => re(
|
|
1683
1683
|
}
|
1684
1684
|
), [U, K, , I] = qe({
|
1685
1685
|
key: `${ze}::${r}::@@nonce@@`
|
1686
|
-
}), D = new
|
1686
|
+
}), D = new mo(d, w), M = re(() => {
|
1687
1687
|
c("removeLocalStorage: removing local storage"), l(), y(), $(), I();
|
1688
1688
|
}, [
|
1689
1689
|
y,
|
@@ -1707,30 +1707,30 @@ const ms = (e) => re(
|
|
1707
1707
|
), v = re(
|
1708
1708
|
async (b) => {
|
1709
1709
|
c("invalidateAndLogout: invalidating and logging out");
|
1710
|
-
const { user: k } =
|
1710
|
+
const { user: k } = s, T = (k == null ? void 0 : k.userId) || co(f);
|
1711
1711
|
T || c(
|
1712
1712
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
1713
|
-
), await
|
1713
|
+
), await lo({
|
1714
1714
|
userId: T,
|
1715
1715
|
clientId: r,
|
1716
1716
|
domain: n,
|
1717
1717
|
idToken: f,
|
1718
|
-
endpoint:
|
1718
|
+
endpoint: o
|
1719
1719
|
}), S(b || ve);
|
1720
1720
|
},
|
1721
1721
|
[
|
1722
1722
|
f,
|
1723
|
-
|
1723
|
+
s,
|
1724
1724
|
r,
|
1725
1725
|
n,
|
1726
1726
|
S,
|
1727
1727
|
c,
|
1728
|
-
|
1728
|
+
o
|
1729
1729
|
]
|
1730
1730
|
);
|
1731
|
-
|
1731
|
+
oe(() => {
|
1732
1732
|
if (!m.current)
|
1733
|
-
return
|
1733
|
+
return s.isLoading && f !== null ? (async () => {
|
1734
1734
|
try {
|
1735
1735
|
const b = await Me(f);
|
1736
1736
|
b && b.payload[F.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), i({
|
@@ -1752,20 +1752,20 @@ const ms = (e) => re(
|
|
1752
1752
|
})() : (c("useEffect: setting the loading state to false"), i({ type: $e, payload: { isLoading: !1 } })), () => {
|
1753
1753
|
m.current = !0;
|
1754
1754
|
};
|
1755
|
-
}, [
|
1755
|
+
}, [s.isLoading, f, v, c]);
|
1756
1756
|
const P = async (b, k) => {
|
1757
1757
|
i({ type: $e, payload: { isLoading: !0 } }), M();
|
1758
1758
|
const T = vt();
|
1759
1759
|
K(T), c("login: Logging in with password");
|
1760
|
-
const { code_verifier: fe, code_challenge: Et } = await za(), he = await
|
1761
|
-
endpoint:
|
1760
|
+
const { code_verifier: fe, code_challenge: Et } = await za(), he = await fo({
|
1761
|
+
endpoint: o,
|
1762
1762
|
nonce: T,
|
1763
1763
|
clientId: r,
|
1764
1764
|
code_challenge: Et
|
1765
1765
|
});
|
1766
1766
|
if (he.status) {
|
1767
|
-
const X = await
|
1768
|
-
endpoint:
|
1767
|
+
const X = await uo({
|
1768
|
+
endpoint: o,
|
1769
1769
|
username: b,
|
1770
1770
|
password: k,
|
1771
1771
|
clientId: r,
|
@@ -1791,9 +1791,9 @@ const ms = (e) => re(
|
|
1791
1791
|
}
|
1792
1792
|
return !1;
|
1793
1793
|
}, A = async (b) => {
|
1794
|
-
b == null || b.preventDefault(), await v(
|
1794
|
+
b == null || b.preventDefault(), await v(no);
|
1795
1795
|
}, O = async () => {
|
1796
|
-
const { isAuthenticated: b, user: k } =
|
1796
|
+
const { isAuthenticated: b, user: k } = s;
|
1797
1797
|
try {
|
1798
1798
|
if (b && k && k.userId) {
|
1799
1799
|
if (d) {
|
@@ -1804,7 +1804,7 @@ const ms = (e) => re(
|
|
1804
1804
|
}
|
1805
1805
|
c("getAccessToken: invalid access token, trying to refresh it");
|
1806
1806
|
const T = await D.refreshtoken({
|
1807
|
-
endpoint:
|
1807
|
+
endpoint: o,
|
1808
1808
|
clientId: r,
|
1809
1809
|
userId: k.userId,
|
1810
1810
|
nonce: U,
|
@@ -1820,12 +1820,12 @@ const ms = (e) => re(
|
|
1820
1820
|
} catch {
|
1821
1821
|
return c(
|
1822
1822
|
"getAccessToken: exception occurred, invalidating and logging out"
|
1823
|
-
), await v(
|
1823
|
+
), await v(ao), "";
|
1824
1824
|
}
|
1825
|
-
}, R = () =>
|
1826
|
-
const { user: b } =
|
1825
|
+
}, R = () => s.isAuthenticated && f ? f : "", V = async () => {
|
1826
|
+
const { user: b } = s;
|
1827
1827
|
let k = await Ce({
|
1828
|
-
endpoint:
|
1828
|
+
endpoint: o,
|
1829
1829
|
accessToken: d,
|
1830
1830
|
clientId: r,
|
1831
1831
|
type: ke.GET_REGISTRATION_OPTIONS,
|
@@ -1839,7 +1839,7 @@ const ms = (e) => re(
|
|
1839
1839
|
try {
|
1840
1840
|
const T = await Yn(k.data);
|
1841
1841
|
return k = await Ce({
|
1842
|
-
endpoint:
|
1842
|
+
endpoint: o,
|
1843
1843
|
accessToken: d,
|
1844
1844
|
clientId: r,
|
1845
1845
|
type: ke.VERIFY_REGISTRATION,
|
@@ -1852,7 +1852,7 @@ const ms = (e) => re(
|
|
1852
1852
|
}), !!(k.status && k.data.length > 0);
|
1853
1853
|
} catch {
|
1854
1854
|
return await Ce({
|
1855
|
-
endpoint:
|
1855
|
+
endpoint: o,
|
1856
1856
|
accessToken: d,
|
1857
1857
|
clientId: r,
|
1858
1858
|
type: ke.VERIFY_REGISTRATION,
|
@@ -1871,7 +1871,7 @@ const ms = (e) => re(
|
|
1871
1871
|
K(b), c("loginWithPasskey");
|
1872
1872
|
const k = vt();
|
1873
1873
|
let T = await Ce({
|
1874
|
-
endpoint:
|
1874
|
+
endpoint: o,
|
1875
1875
|
accessToken: d,
|
1876
1876
|
clientId: r,
|
1877
1877
|
type: ke.GET_AUTHENTICATION_OPTIONS,
|
@@ -1884,7 +1884,7 @@ const ms = (e) => re(
|
|
1884
1884
|
try {
|
1885
1885
|
const fe = await zn(T.data);
|
1886
1886
|
return T = await Ce({
|
1887
|
-
endpoint:
|
1887
|
+
endpoint: o,
|
1888
1888
|
accessToken: d,
|
1889
1889
|
clientId: r,
|
1890
1890
|
type: ke.VERIFY_AUTHENTICATION,
|
@@ -1910,7 +1910,7 @@ const ms = (e) => re(
|
|
1910
1910
|
}), !0) : (S(kt), !1);
|
1911
1911
|
} catch {
|
1912
1912
|
return await Ce({
|
1913
|
-
endpoint:
|
1913
|
+
endpoint: o,
|
1914
1914
|
accessToken: d,
|
1915
1915
|
clientId: r,
|
1916
1916
|
type: ke.VERIFY_AUTHENTICATION,
|
@@ -1926,11 +1926,11 @@ const ms = (e) => re(
|
|
1926
1926
|
}
|
1927
1927
|
return !1;
|
1928
1928
|
};
|
1929
|
-
return /* @__PURE__ */ h(
|
1929
|
+
return /* @__PURE__ */ h(go.Provider, { value: { state: s, dispatch: i }, children: /* @__PURE__ */ h(
|
1930
1930
|
mn.Provider,
|
1931
1931
|
{
|
1932
1932
|
value: {
|
1933
|
-
...
|
1933
|
+
...s,
|
1934
1934
|
login: P,
|
1935
1935
|
logout: A,
|
1936
1936
|
getAccessToken: O,
|
@@ -1953,17 +1953,17 @@ var Qe = { exports: {} }, Ct = {};
|
|
1953
1953
|
* LICENSE file in the root directory of this source tree.
|
1954
1954
|
*/
|
1955
1955
|
var Rr;
|
1956
|
-
function
|
1956
|
+
function Eo() {
|
1957
1957
|
if (Rr) return Ct;
|
1958
1958
|
Rr = 1;
|
1959
1959
|
var e = Z;
|
1960
1960
|
function t(u, l) {
|
1961
1961
|
return u === l && (u !== 0 || 1 / u === 1 / l) || u !== u && l !== l;
|
1962
1962
|
}
|
1963
|
-
var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, a = e.useEffect,
|
1963
|
+
var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, a = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
|
1964
1964
|
function i(u, l) {
|
1965
1965
|
var d = l(), p = n({ inst: { value: d, getSnapshot: l } }), y = p[0].inst, w = p[1];
|
1966
|
-
return
|
1966
|
+
return o(
|
1967
1967
|
function() {
|
1968
1968
|
y.value = d, y.getSnapshot = l, c(y) && w({ inst: y });
|
1969
1969
|
},
|
@@ -1975,7 +1975,7 @@ function ys() {
|
|
1975
1975
|
});
|
1976
1976
|
},
|
1977
1977
|
[u]
|
1978
|
-
),
|
1978
|
+
), s(d), d;
|
1979
1979
|
}
|
1980
1980
|
function c(u) {
|
1981
1981
|
var l = u.getSnapshot;
|
@@ -2004,7 +2004,7 @@ var Nt = {};
|
|
2004
2004
|
* LICENSE file in the root directory of this source tree.
|
2005
2005
|
*/
|
2006
2006
|
var vr;
|
2007
|
-
function
|
2007
|
+
function bo() {
|
2008
2008
|
return vr || (vr = 1, process.env.NODE_ENV !== "production" && function() {
|
2009
2009
|
function e(d, p) {
|
2010
2010
|
return d === p && (d !== 0 || 1 / d === 1 / p) || d !== d && p !== p;
|
@@ -2016,11 +2016,11 @@ function Es() {
|
|
2016
2016
|
var y = p();
|
2017
2017
|
if (!u) {
|
2018
2018
|
var w = p();
|
2019
|
-
|
2019
|
+
o(y, w) || (console.error(
|
2020
2020
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
2021
2021
|
), u = !0);
|
2022
2022
|
}
|
2023
|
-
w =
|
2023
|
+
w = s({
|
2024
2024
|
inst: { value: y, getSnapshot: p }
|
2025
2025
|
});
|
2026
2026
|
var g = w[0].inst, $ = w[1];
|
@@ -2043,7 +2043,7 @@ function Es() {
|
|
2043
2043
|
d = d.value;
|
2044
2044
|
try {
|
2045
2045
|
var y = p();
|
2046
|
-
return !
|
2046
|
+
return !o(d, y);
|
2047
2047
|
} catch {
|
2048
2048
|
return !0;
|
2049
2049
|
}
|
@@ -2052,15 +2052,15 @@ function Es() {
|
|
2052
2052
|
return p();
|
2053
2053
|
}
|
2054
2054
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
2055
|
-
var a = Z,
|
2055
|
+
var a = Z, o = typeof Object.is == "function" ? Object.is : e, s = a.useState, i = a.useEffect, c = a.useLayoutEffect, m = a.useDebugValue, f = !1, u = !1, l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : t;
|
2056
2056
|
Nt.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : l, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
2057
2057
|
}()), Nt;
|
2058
2058
|
}
|
2059
2059
|
var kr;
|
2060
|
-
function
|
2061
|
-
return kr || (kr = 1, process.env.NODE_ENV === "production" ? Qe.exports = /* @__PURE__ */
|
2060
|
+
function So() {
|
2061
|
+
return kr || (kr = 1, process.env.NODE_ENV === "production" ? Qe.exports = /* @__PURE__ */ Eo() : Qe.exports = /* @__PURE__ */ bo()), Qe.exports;
|
2062
2062
|
}
|
2063
|
-
var
|
2063
|
+
var wo = /* @__PURE__ */ So();
|
2064
2064
|
const gn = 0, yn = 1, En = 2, Cr = 3;
|
2065
2065
|
var Nr = Object.prototype.hasOwnProperty;
|
2066
2066
|
function Wt(e, t) {
|
@@ -2090,7 +2090,7 @@ const le = /* @__PURE__ */ new WeakMap(), Se = () => {
|
|
2090
2090
|
), Gt = Object, _ = (e) => e === q, de = (e) => typeof e == "function", Te = (e, t) => ({
|
2091
2091
|
...e,
|
2092
2092
|
...t
|
2093
|
-
}), bn = (e) => de(e.then), Ot = {}, Ze = {}, rr = "undefined", Ge = typeof window != rr, Bt = typeof document != rr,
|
2093
|
+
}), bn = (e) => de(e.then), Ot = {}, Ze = {}, rr = "undefined", Ge = typeof window != rr, Bt = typeof document != rr, To = Ge && "Deno" in window, _o = () => Ge && typeof window.requestAnimationFrame != rr, Sn = (e, t) => {
|
2094
2094
|
const r = le.get(e);
|
2095
2095
|
return [
|
2096
2096
|
// Getter
|
@@ -2109,18 +2109,18 @@ const le = /* @__PURE__ */ new WeakMap(), Se = () => {
|
|
2109
2109
|
];
|
2110
2110
|
};
|
2111
2111
|
let Ft = !0;
|
2112
|
-
const
|
2112
|
+
const Io = () => Ft, [Jt, Yt] = Ge && window.addEventListener ? [
|
2113
2113
|
window.addEventListener.bind(window),
|
2114
2114
|
window.removeEventListener.bind(window)
|
2115
2115
|
] : [
|
2116
2116
|
Se,
|
2117
2117
|
Se
|
2118
|
-
],
|
2118
|
+
], Ao = () => {
|
2119
2119
|
const e = Bt && document.visibilityState;
|
2120
2120
|
return _(e) || e !== "hidden";
|
2121
|
-
},
|
2121
|
+
}, Ro = (e) => (Bt && document.addEventListener("visibilitychange", e), Jt("focus", e), () => {
|
2122
2122
|
Bt && document.removeEventListener("visibilitychange", e), Yt("focus", e);
|
2123
|
-
}),
|
2123
|
+
}), vo = (e) => {
|
2124
2124
|
const t = () => {
|
2125
2125
|
Ft = !0, e();
|
2126
2126
|
}, r = () => {
|
@@ -2129,37 +2129,37 @@ const _s = () => Ft, [Jt, Yt] = Ge && window.addEventListener ? [
|
|
2129
2129
|
return Jt("online", t), Jt("offline", r), () => {
|
2130
2130
|
Yt("online", t), Yt("offline", r);
|
2131
2131
|
};
|
2132
|
-
},
|
2133
|
-
isOnline:
|
2134
|
-
isVisible:
|
2135
|
-
},
|
2136
|
-
initFocus:
|
2137
|
-
initReconnect:
|
2138
|
-
}, Or = !Z.useId, He = !Ge ||
|
2132
|
+
}, ko = {
|
2133
|
+
isOnline: Io,
|
2134
|
+
isVisible: Ao
|
2135
|
+
}, Co = {
|
2136
|
+
initFocus: Ro,
|
2137
|
+
initReconnect: vo
|
2138
|
+
}, Or = !Z.useId, He = !Ge || To, No = (e) => _o() ? window.requestAnimationFrame(e) : setTimeout(e, 1), xt = He ? oe : Ue, Pt = typeof navigator < "u" && navigator.connection, xr = !He && Pt && ([
|
2139
2139
|
"slow-2g",
|
2140
2140
|
"2g"
|
2141
2141
|
].includes(Pt.effectiveType) || Pt.saveData), et = /* @__PURE__ */ new WeakMap(), Dt = (e, t) => Gt.prototype.toString.call(e) === `[object ${t}]`;
|
2142
|
-
let
|
2142
|
+
let Oo = 0;
|
2143
2143
|
const jt = (e) => {
|
2144
2144
|
const t = typeof e, r = Dt(e, "Date"), n = Dt(e, "RegExp"), a = Dt(e, "Object");
|
2145
|
-
let
|
2145
|
+
let o, s;
|
2146
2146
|
if (Gt(e) === e && !r && !n) {
|
2147
|
-
if (
|
2148
|
-
if (
|
2149
|
-
for (
|
2150
|
-
|
2151
|
-
et.set(e,
|
2147
|
+
if (o = et.get(e), o) return o;
|
2148
|
+
if (o = ++Oo + "~", et.set(e, o), Array.isArray(e)) {
|
2149
|
+
for (o = "@", s = 0; s < e.length; s++)
|
2150
|
+
o += jt(e[s]) + ",";
|
2151
|
+
et.set(e, o);
|
2152
2152
|
}
|
2153
2153
|
if (a) {
|
2154
|
-
|
2154
|
+
o = "#";
|
2155
2155
|
const i = Gt.keys(e).sort();
|
2156
|
-
for (; !_(
|
2157
|
-
_(e[
|
2158
|
-
et.set(e,
|
2156
|
+
for (; !_(s = i.pop()); )
|
2157
|
+
_(e[s]) || (o += s + ":" + jt(e[s]) + ",");
|
2158
|
+
et.set(e, o);
|
2159
2159
|
}
|
2160
2160
|
} else
|
2161
|
-
|
2162
|
-
return
|
2161
|
+
o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
|
2162
|
+
return o;
|
2163
2163
|
}, ht = (e) => {
|
2164
2164
|
if (de(e))
|
2165
2165
|
try {
|
@@ -2173,19 +2173,19 @@ const jt = (e) => {
|
|
2173
2173
|
t
|
2174
2174
|
];
|
2175
2175
|
};
|
2176
|
-
let
|
2177
|
-
const qt = () => ++
|
2176
|
+
let xo = 0;
|
2177
|
+
const qt = () => ++xo;
|
2178
2178
|
async function wn(...e) {
|
2179
|
-
const [t, r, n, a] = e,
|
2179
|
+
const [t, r, n, a] = e, o = Te({
|
2180
2180
|
populateCache: !0,
|
2181
2181
|
throwOnError: !0
|
2182
2182
|
}, typeof a == "boolean" ? {
|
2183
2183
|
revalidate: a
|
2184
2184
|
} : a || {});
|
2185
|
-
let
|
2186
|
-
const i =
|
2187
|
-
let c =
|
2188
|
-
const m = (l) => typeof i == "function" ? i(l) : i !== !1, f =
|
2185
|
+
let s = o.populateCache;
|
2186
|
+
const i = o.rollbackOnError;
|
2187
|
+
let c = o.optimisticData;
|
2188
|
+
const m = (l) => typeof i == "function" ? i(l) : i !== !1, f = o.throwOnError;
|
2189
2189
|
if (de(r)) {
|
2190
2190
|
const l = r, d = [], p = t.keys();
|
2191
2191
|
for (const y of p)
|
@@ -2199,7 +2199,7 @@ async function wn(...e) {
|
|
2199
2199
|
if (!d) return;
|
2200
2200
|
const [p, y] = Sn(t, d), [w, g, $, U] = le.get(t), K = () => {
|
2201
2201
|
const R = w[d];
|
2202
|
-
return (de(
|
2202
|
+
return (de(o.revalidate) ? o.revalidate(p().data, l) : o.revalidate !== !1) && (delete $[d], delete U[d], R && R[0]) ? R[0](En).then(() => p().data) : p().data;
|
2203
2203
|
};
|
2204
2204
|
if (e.length < 3)
|
2205
2205
|
return K();
|
@@ -2225,13 +2225,13 @@ async function wn(...e) {
|
|
2225
2225
|
}), M !== g[d][0]) {
|
2226
2226
|
if (D) throw D;
|
2227
2227
|
return I;
|
2228
|
-
} else D && S && m(D) && (
|
2228
|
+
} else D && S && m(D) && (s = !0, y({
|
2229
2229
|
data: O,
|
2230
2230
|
_c: q
|
2231
2231
|
}));
|
2232
|
-
if (
|
2233
|
-
if (de(
|
2234
|
-
const R =
|
2232
|
+
if (s && !D)
|
2233
|
+
if (de(s)) {
|
2234
|
+
const R = s(I, O);
|
2235
2235
|
y({
|
2236
2236
|
data: R,
|
2237
2237
|
error: q,
|
@@ -2257,16 +2257,16 @@ async function wn(...e) {
|
|
2257
2257
|
const Pr = (e, t) => {
|
2258
2258
|
for (const r in e)
|
2259
2259
|
e[r][0] && e[r][0](t);
|
2260
|
-
},
|
2260
|
+
}, Po = (e, t) => {
|
2261
2261
|
if (!le.has(e)) {
|
2262
|
-
const r = Te(
|
2263
|
-
let
|
2264
|
-
const
|
2265
|
-
const l =
|
2266
|
-
return
|
2262
|
+
const r = Te(Co, t), n = {}, a = wn.bind(q, e);
|
2263
|
+
let o = Se;
|
2264
|
+
const s = {}, i = (f, u) => {
|
2265
|
+
const l = s[f] || [];
|
2266
|
+
return s[f] = l, l.push(u), () => l.splice(l.indexOf(u), 1);
|
2267
2267
|
}, c = (f, u, l) => {
|
2268
2268
|
e.set(f, u);
|
2269
|
-
const d =
|
2269
|
+
const d = s[f];
|
2270
2270
|
if (d)
|
2271
2271
|
for (const p of d)
|
2272
2272
|
p(u, l);
|
@@ -2281,7 +2281,7 @@ const Pr = (e, t) => {
|
|
2281
2281
|
i
|
2282
2282
|
]), !He)) {
|
2283
2283
|
const f = r.initFocus(setTimeout.bind(q, Pr.bind(q, n, gn))), u = r.initReconnect(setTimeout.bind(q, Pr.bind(q, n, yn)));
|
2284
|
-
|
2284
|
+
o = () => {
|
2285
2285
|
f && f(), u && u(), le.delete(e);
|
2286
2286
|
};
|
2287
2287
|
}
|
@@ -2290,23 +2290,23 @@ const Pr = (e, t) => {
|
|
2290
2290
|
e,
|
2291
2291
|
a,
|
2292
2292
|
m,
|
2293
|
-
|
2293
|
+
o
|
2294
2294
|
];
|
2295
2295
|
}
|
2296
2296
|
return [
|
2297
2297
|
e,
|
2298
2298
|
le.get(e)[4]
|
2299
2299
|
];
|
2300
|
-
},
|
2301
|
-
const
|
2302
|
-
!_(
|
2303
|
-
},
|
2300
|
+
}, Do = (e, t, r, n, a) => {
|
2301
|
+
const o = r.errorRetryCount, s = a.retryCount, i = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
|
2302
|
+
!_(o) && s > o || setTimeout(n, i, a);
|
2303
|
+
}, Lo = Wt, [nr, $o] = Po(/* @__PURE__ */ new Map()), Uo = Te(
|
2304
2304
|
{
|
2305
2305
|
// events
|
2306
2306
|
onLoadingSlow: Se,
|
2307
2307
|
onSuccess: Se,
|
2308
2308
|
onError: Se,
|
2309
|
-
onErrorRetry:
|
2309
|
+
onErrorRetry: Do,
|
2310
2310
|
onDiscarded: Se,
|
2311
2311
|
// switches
|
2312
2312
|
revalidateOnFocus: !0,
|
@@ -2319,24 +2319,24 @@ const Pr = (e, t) => {
|
|
2319
2319
|
dedupingInterval: 2 * 1e3,
|
2320
2320
|
loadingTimeout: xr ? 5e3 : 3e3,
|
2321
2321
|
// providers
|
2322
|
-
compare:
|
2322
|
+
compare: Lo,
|
2323
2323
|
isPaused: () => !1,
|
2324
2324
|
cache: nr,
|
2325
|
-
mutate:
|
2325
|
+
mutate: $o,
|
2326
2326
|
fallback: {}
|
2327
2327
|
},
|
2328
2328
|
// use web preset by default
|
2329
|
-
|
2330
|
-
),
|
2329
|
+
ko
|
2330
|
+
), Mo = (e, t) => {
|
2331
2331
|
const r = Te(e, t);
|
2332
2332
|
if (t) {
|
2333
|
-
const { use: n, fallback: a } = e, { use:
|
2334
|
-
n &&
|
2333
|
+
const { use: n, fallback: a } = e, { use: o, fallback: s } = t;
|
2334
|
+
n && o && (r.use = n.concat(o)), a && s && (r.fallback = Te(a, s));
|
2335
2335
|
}
|
2336
2336
|
return r;
|
2337
|
-
},
|
2337
|
+
}, Ho = Vr({}), Ko = "$inf$", Tn = Ge && window.__SWR_DEVTOOLS_USE__, Vo = Tn ? window.__SWR_DEVTOOLS_USE__ : [], Wo = () => {
|
2338
2338
|
Tn && (window.__SWR_DEVTOOLS_REACT__ = Z);
|
2339
|
-
},
|
2339
|
+
}, Go = (e) => de(e[1]) ? [
|
2340
2340
|
e[0],
|
2341
2341
|
e[1],
|
2342
2342
|
e[2] || {}
|
@@ -2344,32 +2344,32 @@ const Pr = (e, t) => {
|
|
2344
2344
|
e[0],
|
2345
2345
|
null,
|
2346
2346
|
(e[1] === null ? e[2] : e[1]) || {}
|
2347
|
-
],
|
2347
|
+
], Bo = () => Te(Uo, Zt(Ho)), _n = (e, t) => {
|
2348
2348
|
const [r, n] = ht(e), [, , , a] = le.get(nr);
|
2349
2349
|
if (a[r]) return a[r];
|
2350
|
-
const
|
2351
|
-
return a[r] =
|
2352
|
-
},
|
2353
|
-
const [
|
2354
|
-
if (
|
2355
|
-
return r(...
|
2356
|
-
const c = i[
|
2357
|
-
return _(c) ? r(...
|
2358
|
-
}), n),
|
2359
|
-
const n =
|
2350
|
+
const o = t(n);
|
2351
|
+
return a[r] = o, o;
|
2352
|
+
}, Fo = (e) => (t, r, n) => e(t, r && ((...o) => {
|
2353
|
+
const [s] = ht(t), [, , , i] = le.get(nr);
|
2354
|
+
if (s.startsWith(Ko))
|
2355
|
+
return r(...o);
|
2356
|
+
const c = i[s];
|
2357
|
+
return _(c) ? r(...o) : (delete i[s], c);
|
2358
|
+
}), n), Jo = Vo.concat(Fo), Yo = (e) => function(...r) {
|
2359
|
+
const n = Bo(), [a, o, s] = Go(r), i = Mo(n, s);
|
2360
2360
|
let c = e;
|
2361
|
-
const { use: m } = i, f = (m || []).concat(
|
2361
|
+
const { use: m } = i, f = (m || []).concat(Jo);
|
2362
2362
|
for (let u = f.length; u--; )
|
2363
2363
|
c = f[u](c);
|
2364
|
-
return c(a,
|
2365
|
-
},
|
2364
|
+
return c(a, o || i.fetcher || null, i);
|
2365
|
+
}, jo = (e, t, r) => {
|
2366
2366
|
const n = t[e] || (t[e] = []);
|
2367
2367
|
return n.push(r), () => {
|
2368
2368
|
const a = n.indexOf(r);
|
2369
2369
|
a >= 0 && (n[a] = n[n.length - 1], n.pop());
|
2370
2370
|
};
|
2371
2371
|
};
|
2372
|
-
|
2372
|
+
Wo();
|
2373
2373
|
const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
2374
2374
|
// and emitting an error.
|
2375
2375
|
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
@@ -2391,8 +2391,8 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2391
2391
|
}
|
2392
2392
|
}), $t = {
|
2393
2393
|
dedupe: !0
|
2394
|
-
},
|
2395
|
-
const { cache: n, compare: a, suspense:
|
2394
|
+
}, qo = (e, t, r) => {
|
2395
|
+
const { cache: n, compare: a, suspense: o, fallbackData: s, revalidateOnMount: i, revalidateIfStale: c, refreshInterval: m, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: l } = r, [d, p, y, w] = le.get(n), [g, $] = ht(e), U = x(!1), K = x(!1), I = x(g), D = x(t), M = x(r), S = () => M.current, v = () => S().isVisible() && S().isOnline(), [P, A, O, R] = Sn(n, g), V = x({}).current, ee = _(s) ? _(r.fallback) ? q : r.fallback[g] : s, b = (C, N) => {
|
2396
2396
|
for (const J in V) {
|
2397
2397
|
const L = J;
|
2398
2398
|
if (L === "data") {
|
@@ -2403,15 +2403,15 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2403
2403
|
}
|
2404
2404
|
return !0;
|
2405
2405
|
}, k = Ke(() => {
|
2406
|
-
const C = !g || !t ? !1 : _(i) ? S().isPaused() ||
|
2406
|
+
const C = !g || !t ? !1 : _(i) ? S().isPaused() || o ? !1 : c !== !1 : i, N = (j) => {
|
2407
2407
|
const me = Te(j);
|
2408
2408
|
return delete me._k, C ? {
|
2409
2409
|
isValidating: !0,
|
2410
2410
|
isLoading: !0,
|
2411
2411
|
...me
|
2412
2412
|
} : me;
|
2413
|
-
}, J = P(), L = R(),
|
2414
|
-
let W =
|
2413
|
+
}, J = P(), L = R(), se = N(J), Ie = J === L ? se : N(L);
|
2414
|
+
let W = se;
|
2415
2415
|
return [
|
2416
2416
|
() => {
|
2417
2417
|
const j = N(P());
|
@@ -2422,7 +2422,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2422
2422
|
}, [
|
2423
2423
|
n,
|
2424
2424
|
g
|
2425
|
-
]), T =
|
2425
|
+
]), T = wo.useSyncExternalStore(re(
|
2426
2426
|
(C) => O(g, (N, J) => {
|
2427
2427
|
b(J, N) || C();
|
2428
2428
|
}),
|
@@ -2431,12 +2431,12 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2431
2431
|
n,
|
2432
2432
|
g
|
2433
2433
|
]
|
2434
|
-
), k[0], k[1]), fe = !U.current, Et = d[g] && d[g].length > 0, he = T.data, X = _(he) ? ee && bn(ee) ? Lt(ee) : ee : he, Fe = T.error, bt = x(X), Je = l ? _(he) ? _(bt.current) ? X : bt.current : he : X, ir = Et && !_(Fe) ? !1 : fe && !_(i) ? i : S().isPaused() ? !1 :
|
2434
|
+
), k[0], k[1]), fe = !U.current, Et = d[g] && d[g].length > 0, he = T.data, X = _(he) ? ee && bn(ee) ? Lt(ee) : ee : he, Fe = T.error, bt = x(X), Je = l ? _(he) ? _(bt.current) ? X : bt.current : he : X, ir = Et && !_(Fe) ? !1 : fe && !_(i) ? i : S().isPaused() ? !1 : o ? _(X) ? !1 : c : _(X) || c, cr = !!(g && t && fe && ir), Ln = _(T.isValidating) ? cr : T.isValidating, $n = _(T.isLoading) ? cr : T.isLoading, Le = re(
|
2435
2435
|
async (C) => {
|
2436
2436
|
const N = D.current;
|
2437
2437
|
if (!g || !N || K.current || S().isPaused())
|
2438
2438
|
return !1;
|
2439
|
-
let J, L,
|
2439
|
+
let J, L, se = !0;
|
2440
2440
|
const Ie = C || {}, W = !y[g] || !Ie.dedupe, j = () => Or ? !K.current && g === I.current && U.current : g === I.current, me = {
|
2441
2441
|
isValidating: !1,
|
2442
2442
|
isLoading: !1
|
@@ -2451,7 +2451,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2451
2451
|
_(P().data) && (fr.isLoading = !0);
|
2452
2452
|
try {
|
2453
2453
|
if (W && (A(fr), r.loadingTimeout && _(P().data) && setTimeout(() => {
|
2454
|
-
|
2454
|
+
se && j() && S().onLoadingSlow(g, r);
|
2455
2455
|
}, r.loadingTimeout), y[g] = [
|
2456
2456
|
N($),
|
2457
2457
|
qt()
|
@@ -2477,7 +2477,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2477
2477
|
dedupe: !0
|
2478
2478
|
})));
|
2479
2479
|
}
|
2480
|
-
return
|
2480
|
+
return se = !1, dr(), !0;
|
2481
2481
|
},
|
2482
2482
|
// `setState` is immutable, and `eventsCallback`, `fnArg`, and
|
2483
2483
|
// `keyValidating` are depending on `key`, so we can exclude them from
|
@@ -2506,22 +2506,22 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2506
2506
|
if (!g) return;
|
2507
2507
|
const C = Le.bind(q, $t);
|
2508
2508
|
let N = 0;
|
2509
|
-
const L =
|
2510
|
-
if (
|
2509
|
+
const L = jo(g, d, (se, Ie = {}) => {
|
2510
|
+
if (se == gn) {
|
2511
2511
|
const W = Date.now();
|
2512
2512
|
S().revalidateOnFocus && W > N && v() && (N = W + S().focusThrottleInterval, C());
|
2513
|
-
} else if (
|
2513
|
+
} else if (se == yn)
|
2514
2514
|
S().revalidateOnReconnect && v() && C();
|
2515
2515
|
else {
|
2516
|
-
if (
|
2516
|
+
if (se == En)
|
2517
2517
|
return Le();
|
2518
|
-
if (
|
2518
|
+
if (se == Cr)
|
2519
2519
|
return Le(Ie);
|
2520
2520
|
}
|
2521
2521
|
});
|
2522
2522
|
return K.current = !1, I.current = g, U.current = !0, A({
|
2523
2523
|
_k: $
|
2524
|
-
}), ir && (_(X) || He ? C() :
|
2524
|
+
}), ir && (_(X) || He ? C() : No(C)), () => {
|
2525
2525
|
K.current = !0, L();
|
2526
2526
|
};
|
2527
2527
|
}, [
|
@@ -2543,7 +2543,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2543
2543
|
f,
|
2544
2544
|
u,
|
2545
2545
|
g
|
2546
|
-
]), Hn(Je),
|
2546
|
+
]), Hn(Je), o && _(X) && g) {
|
2547
2547
|
if (!Or && He)
|
2548
2548
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
2549
2549
|
D.current = t, M.current = r, K.current = !1;
|
@@ -2573,7 +2573,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2573
2573
|
return V.isLoading = !0, $n;
|
2574
2574
|
}
|
2575
2575
|
};
|
2576
|
-
},
|
2576
|
+
}, zo = Yo(qo), ye = {
|
2577
2577
|
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
2578
2578
|
location(latitude: $latitude, longitude: $longitude) {
|
2579
2579
|
country
|
@@ -2726,11 +2726,11 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2726
2726
|
schema: ye.SET_USER_PREFERENCES,
|
2727
2727
|
method: "setUserPreferences"
|
2728
2728
|
}
|
2729
|
-
},
|
2729
|
+
}, Xo = process.env.PUBLIC_SASSY_API_SERVER_URL, Dr = async ({
|
2730
2730
|
query: e,
|
2731
2731
|
data: t,
|
2732
2732
|
headers: r = {}
|
2733
|
-
}) => await fetch(`${
|
2733
|
+
}) => await fetch(`${Xo}/graphql`, {
|
2734
2734
|
method: "POST",
|
2735
2735
|
credentials: "include",
|
2736
2736
|
headers: {
|
@@ -2753,10 +2753,10 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2753
2753
|
data: t
|
2754
2754
|
});
|
2755
2755
|
else {
|
2756
|
-
const
|
2756
|
+
const s = `Bearer ${e.accessToken}`;
|
2757
2757
|
n = await Dr({
|
2758
2758
|
headers: {
|
2759
|
-
authorization:
|
2759
|
+
authorization: s
|
2760
2760
|
},
|
2761
2761
|
query: e.type.schema,
|
2762
2762
|
data: t
|
@@ -2764,11 +2764,11 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2764
2764
|
}
|
2765
2765
|
if (n.status !== 200)
|
2766
2766
|
return { status: n.status, data: [] };
|
2767
|
-
const { data: a, errors:
|
2767
|
+
const { data: a, errors: o } = await n.json();
|
2768
2768
|
return {
|
2769
2769
|
status: n.status,
|
2770
2770
|
data: a[e.type.method],
|
2771
|
-
errors:
|
2771
|
+
errors: o
|
2772
2772
|
};
|
2773
2773
|
} catch (n) {
|
2774
2774
|
return console.error(n), { status: 500, data: [] };
|
@@ -2796,12 +2796,12 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2796
2796
|
swrOptions: n,
|
2797
2797
|
getAccessToken: a
|
2798
2798
|
}) => {
|
2799
|
-
const { data:
|
2799
|
+
const { data: o, error: s, isLoading: i, mutate: c } = zo(
|
2800
2800
|
[t, ...r],
|
2801
2801
|
(m) => e(m, a),
|
2802
2802
|
{ ...n }
|
2803
2803
|
);
|
2804
|
-
return { data:
|
2804
|
+
return { data: o, error: s, isLoading: i, mutate: c };
|
2805
2805
|
}, pt = async (e) => {
|
2806
2806
|
let t;
|
2807
2807
|
if (e.noAuth === !0)
|
@@ -2821,7 +2821,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2821
2821
|
if (t.status === 200 && t.errors === void 0)
|
2822
2822
|
return t.data;
|
2823
2823
|
throw new Error("An error occurred while fetching the data.");
|
2824
|
-
},
|
2824
|
+
}, Qo = async ([e, t], r) => pt({
|
2825
2825
|
getAccessToken: r,
|
2826
2826
|
type: Be.GET_USER_PREFERENCES,
|
2827
2827
|
params: {
|
@@ -2832,7 +2832,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2832
2832
|
getAccessToken: t,
|
2833
2833
|
isPaused: r = !1
|
2834
2834
|
}) => mt({
|
2835
|
-
fetcher:
|
2835
|
+
fetcher: Qo,
|
2836
2836
|
scope: "/preferences",
|
2837
2837
|
keys: e,
|
2838
2838
|
swrOptions: {
|
@@ -2842,7 +2842,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2842
2842
|
revalidateOnReconnect: r
|
2843
2843
|
},
|
2844
2844
|
getAccessToken: t
|
2845
|
-
}),
|
2845
|
+
}), Zo = async ([e, t], r) => pt({
|
2846
2846
|
getAccessToken: r,
|
2847
2847
|
type: Be.GET_CHATS_STATS,
|
2848
2848
|
params: {
|
@@ -2852,7 +2852,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2852
2852
|
keys: e,
|
2853
2853
|
getAccessToken: t
|
2854
2854
|
}) => mt({
|
2855
|
-
fetcher:
|
2855
|
+
fetcher: Zo,
|
2856
2856
|
scope: "/stats",
|
2857
2857
|
keys: e,
|
2858
2858
|
swrOptions: {
|
@@ -2888,7 +2888,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2888
2888
|
revalidateOnFocus: !0,
|
2889
2889
|
revalidateOnReconnect: !0
|
2890
2890
|
}
|
2891
|
-
}),
|
2891
|
+
}), oc = ({
|
2892
2892
|
keys: e,
|
2893
2893
|
getAccessToken: t
|
2894
2894
|
}) => {
|
@@ -2896,16 +2896,16 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
2896
2896
|
}, An = async ([e]) => pt({
|
2897
2897
|
noAuth: !0,
|
2898
2898
|
type: Be.GET_SERVER_CAPABILITIES
|
2899
|
-
}),
|
2899
|
+
}), sc = () => mt({
|
2900
2900
|
fetcher: An,
|
2901
2901
|
scope: "/capabilities",
|
2902
2902
|
keys: [],
|
2903
2903
|
getAccessToken: () => Promise.resolve("")
|
2904
2904
|
// No auth required
|
2905
|
-
}),
|
2905
|
+
}), es = () => {
|
2906
2906
|
_n(["/capabilities"], (e) => An(e));
|
2907
2907
|
}, Lr = (e) => Number.isFinite(e) ? e : 0;
|
2908
|
-
function
|
2908
|
+
function ts(e) {
|
2909
2909
|
return {
|
2910
2910
|
days: Math.trunc(e / 864e5),
|
2911
2911
|
hours: Math.trunc(e / 36e5 % 24),
|
@@ -2916,7 +2916,7 @@ function eo(e) {
|
|
2916
2916
|
nanoseconds: Math.trunc(Lr(e * 1e6) % 1e3)
|
2917
2917
|
};
|
2918
2918
|
}
|
2919
|
-
function
|
2919
|
+
function rs(e) {
|
2920
2920
|
return {
|
2921
2921
|
days: e / 86400000n,
|
2922
2922
|
hours: e / 3600000n % 24n,
|
@@ -2927,20 +2927,20 @@ function to(e) {
|
|
2927
2927
|
nanoseconds: 0n
|
2928
2928
|
};
|
2929
2929
|
}
|
2930
|
-
function
|
2930
|
+
function ns(e) {
|
2931
2931
|
switch (typeof e) {
|
2932
2932
|
case "number": {
|
2933
2933
|
if (Number.isFinite(e))
|
2934
|
-
return
|
2934
|
+
return ts(e);
|
2935
2935
|
break;
|
2936
2936
|
}
|
2937
2937
|
case "bigint":
|
2938
|
-
return
|
2938
|
+
return rs(e);
|
2939
2939
|
}
|
2940
2940
|
throw new TypeError("Expected a finite number or bigint");
|
2941
2941
|
}
|
2942
|
-
const
|
2943
|
-
function
|
2942
|
+
const as = (e) => e === 0 || e === 0n, os = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ss = 1e-7, is = 24n * 60n * 60n * 1000n;
|
2943
|
+
function cs(e, t) {
|
2944
2944
|
const r = typeof e == "bigint";
|
2945
2945
|
if (!r && !Number.isFinite(e))
|
2946
2946
|
throw new TypeError("Expected a finite number or bigint");
|
@@ -2948,27 +2948,27 @@ function io(e, t) {
|
|
2948
2948
|
const n = e < 0 ? "-" : "";
|
2949
2949
|
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
2950
2950
|
let a = [];
|
2951
|
-
const
|
2952
|
-
const l = Math.floor(f * 10 ** u +
|
2951
|
+
const o = (f, u) => {
|
2952
|
+
const l = Math.floor(f * 10 ** u + ss);
|
2953
2953
|
return (Math.round(l) / 10 ** u).toFixed(u);
|
2954
|
-
},
|
2955
|
-
if (!((a.length === 0 || !t.colonNotation) &&
|
2954
|
+
}, s = (f, u, l, d) => {
|
2955
|
+
if (!((a.length === 0 || !t.colonNotation) && as(f) && !(t.colonNotation && l === "m"))) {
|
2956
2956
|
if (d ?? (d = String(f)), t.colonNotation) {
|
2957
2957
|
const p = d.includes(".") ? d.split(".")[0].length : d.length, y = a.length > 0 ? 2 : 1;
|
2958
2958
|
d = "0".repeat(Math.max(0, y - p)) + d;
|
2959
2959
|
} else
|
2960
|
-
d += t.verbose ? " " +
|
2960
|
+
d += t.verbose ? " " + os(u, f) : l;
|
2961
2961
|
a.push(d);
|
2962
2962
|
}
|
2963
|
-
}, i =
|
2964
|
-
if (t.hideYearAndDays ?
|
2963
|
+
}, i = ns(e), c = BigInt(i.days);
|
2964
|
+
if (t.hideYearAndDays ? s(BigInt(c) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(c, "day", "d") : (s(c / 365n, "year", "y"), s(c % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
2965
2965
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
2966
2966
|
const f = Number(i.seconds), u = Number(i.milliseconds), l = Number(i.microseconds), d = Number(i.nanoseconds);
|
2967
|
-
if (
|
2968
|
-
|
2967
|
+
if (s(f, "second", "s"), t.formatSubMilliseconds)
|
2968
|
+
s(u, "millisecond", "ms"), s(l, "microsecond", "µs"), s(d, "nanosecond", "ns");
|
2969
2969
|
else {
|
2970
2970
|
const p = u + l / 1e3 + d / 1e6, y = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = p >= 1 ? Math.round(p) : Math.ceil(p), g = y ? p.toFixed(y) : w;
|
2971
|
-
|
2971
|
+
s(
|
2972
2972
|
Number.parseFloat(g),
|
2973
2973
|
"millisecond",
|
2974
2974
|
"ms",
|
@@ -2976,15 +2976,15 @@ function io(e, t) {
|
|
2976
2976
|
);
|
2977
2977
|
}
|
2978
2978
|
} else {
|
2979
|
-
const f = (r ? Number(e %
|
2980
|
-
|
2979
|
+
const f = (r ? Number(e % is) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(f, u), d = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
|
2980
|
+
s(Number.parseFloat(d), "second", "s", d);
|
2981
2981
|
}
|
2982
2982
|
if (a.length === 0)
|
2983
2983
|
return n + "0" + (t.verbose ? " milliseconds" : "ms");
|
2984
2984
|
const m = t.colonNotation ? ":" : " ";
|
2985
2985
|
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), n + a.join(m);
|
2986
2986
|
}
|
2987
|
-
const
|
2987
|
+
const ls = process.env.NODE_ENV === "production", Rn = !ls, ds = Rn ? "gizmette.local.com" : "gizmette.com", ic = async () => {
|
2988
2988
|
const e = {
|
2989
2989
|
/**
|
2990
2990
|
* A boolean value that indicates the application would
|
@@ -3033,13 +3033,24 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3033
3033
|
e
|
3034
3034
|
);
|
3035
3035
|
});
|
3036
|
-
}, cc = (e
|
3036
|
+
}, cc = (e) => window.btoa(
|
3037
|
+
encodeURIComponent(e).replace(
|
3038
|
+
/%([0-9A-F]{2})/g,
|
3039
|
+
function(r, n) {
|
3040
|
+
return String.fromCharCode(+`0x${n}`);
|
3041
|
+
}
|
3042
|
+
)
|
3043
|
+
), lc = (e) => decodeURIComponent(
|
3044
|
+
window.atob(e).split("").map(function(t) {
|
3045
|
+
return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
|
3046
|
+
}).join("")
|
3047
|
+
), dc = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ Q("div", { className: "flex items-center justify-between", children: [
|
3037
3048
|
/* @__PURE__ */ h("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
3038
3049
|
/* @__PURE__ */ h("dd", { className: "my-1 inline-block", children: t[r] })
|
3039
|
-
] }) }, `${e}-${r}`)) : null,
|
3050
|
+
] }) }, `${e}-${r}`)) : null, uc = (e) => e > 0 ? cs(e, {
|
3040
3051
|
secondsDecimalDigits: 2,
|
3041
3052
|
unitCount: 2
|
3042
|
-
}) : "N/A",
|
3053
|
+
}) : "N/A", us = ({
|
3043
3054
|
isAuthenticated: e,
|
3044
3055
|
extraClass: t
|
3045
3056
|
}) => E(
|
@@ -3048,27 +3059,27 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3048
3059
|
"flex-1 overflow-y-auto",
|
3049
3060
|
e ? "pt-0" : "pt-10",
|
3050
3061
|
t
|
3051
|
-
),
|
3062
|
+
), fs = ({
|
3052
3063
|
extraClass: e
|
3053
|
-
} = {}) => E("px-2 sm:px-0", e),
|
3064
|
+
} = {}) => E("px-2 sm:px-0", e), fc = (e, t) => t === 1 ? e : `${e}s`, hc = (e, t) => {
|
3054
3065
|
let r;
|
3055
3066
|
return (...n) => {
|
3056
3067
|
window.clearTimeout(r), r = window.setTimeout(() => e(...n), t);
|
3057
3068
|
};
|
3058
|
-
},
|
3059
|
-
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r =
|
3069
|
+
}, hs = () => !!(window != null && window.__VERSINI_CALLISTO_ELECTRON__), ms = () => window.innerWidth < 403, mc = () => {
|
3070
|
+
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = ms(), n = navigator.maxTouchPoints > 1;
|
3060
3071
|
return e && t && r && n;
|
3061
|
-
},
|
3072
|
+
}, pc = (e) => {
|
3062
3073
|
const t = e.replace(/([A-Z])/g, " $1");
|
3063
3074
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
3064
|
-
},
|
3075
|
+
}, gc = ({
|
3065
3076
|
autoClose: e = 3e3,
|
3066
3077
|
containerId: t,
|
3067
3078
|
position: r = "top-center",
|
3068
3079
|
hideProgressBar: n = !1,
|
3069
3080
|
closeOnClick: a = !1,
|
3070
|
-
pauseOnHover:
|
3071
|
-
draggable:
|
3081
|
+
pauseOnHover: o = !0,
|
3082
|
+
draggable: s = !0,
|
3072
3083
|
progress: i = void 0,
|
3073
3084
|
theme: c = "colored",
|
3074
3085
|
transition: m,
|
@@ -3079,26 +3090,26 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3079
3090
|
position: r,
|
3080
3091
|
hideProgressBar: n,
|
3081
3092
|
closeOnClick: a,
|
3082
|
-
pauseOnHover:
|
3083
|
-
draggable:
|
3093
|
+
pauseOnHover: o,
|
3094
|
+
draggable: s,
|
3084
3095
|
progress: i,
|
3085
3096
|
theme: c,
|
3086
3097
|
transition: m,
|
3087
3098
|
icon: f
|
3088
|
-
}), $r = "av-button", gt = "icon", ar = "button", Xt = "link",
|
3099
|
+
}), $r = "av-button", gt = "icon", ar = "button", Xt = "link", ps = ({
|
3089
3100
|
type: e,
|
3090
3101
|
size: t,
|
3091
3102
|
labelRight: r,
|
3092
3103
|
labelLeft: n,
|
3093
3104
|
align: a,
|
3094
|
-
animated:
|
3105
|
+
animated: o
|
3095
3106
|
}) => {
|
3096
|
-
const
|
3107
|
+
const s = "max-h-8 py-0 px-2", i = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
3097
3108
|
switch (e) {
|
3098
3109
|
case ar:
|
3099
3110
|
case Xt:
|
3100
3111
|
return E({
|
3101
|
-
[
|
3112
|
+
[s]: t === "small",
|
3102
3113
|
[i]: t === "medium",
|
3103
3114
|
[c]: t === "large"
|
3104
3115
|
});
|
@@ -3107,44 +3118,44 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3107
3118
|
"justify-center": a === "center",
|
3108
3119
|
"justify-start": a === "left",
|
3109
3120
|
"justify-end": a === "right",
|
3110
|
-
"h-6 w-6 p-0": t === "small" && !
|
3111
|
-
"h-6 px-2": t === "small" && !
|
3112
|
-
"h-8 w-8 p-1": t === "medium" && !
|
3113
|
-
"h-8 px-3": t === "medium" && !
|
3114
|
-
"h-12 w-12 p-2": t === "large" && !
|
3115
|
-
"h-12 px-4": t === "large" && !
|
3116
|
-
"h-6 py-0": t === "small" &&
|
3117
|
-
"h-6": t === "small" &&
|
3118
|
-
"h-8 py-1": t === "medium" &&
|
3119
|
-
"h-8": t === "medium" &&
|
3120
|
-
"h-12 py-2": t === "large" &&
|
3121
|
-
"h-12": t === "large" &&
|
3121
|
+
"h-6 w-6 p-0": t === "small" && !o && !(r || n),
|
3122
|
+
"h-6 px-2": t === "small" && !o && (r || n),
|
3123
|
+
"h-8 w-8 p-1": t === "medium" && !o && !(r || n),
|
3124
|
+
"h-8 px-3": t === "medium" && !o && (r || n),
|
3125
|
+
"h-12 w-12 p-2": t === "large" && !o && !(r || n),
|
3126
|
+
"h-12 px-4": t === "large" && !o && (r || n),
|
3127
|
+
"h-6 py-0": t === "small" && o && !(r || n),
|
3128
|
+
"h-6": t === "small" && o && (r || n),
|
3129
|
+
"h-8 py-1": t === "medium" && o && !(r || n),
|
3130
|
+
"h-8": t === "medium" && o && (r || n),
|
3131
|
+
"h-12 py-2": t === "large" && o && !(r || n),
|
3132
|
+
"h-12": t === "large" && o && (r || n)
|
3122
3133
|
});
|
3123
3134
|
}
|
3124
|
-
},
|
3135
|
+
}, gs = ({
|
3125
3136
|
type: e,
|
3126
3137
|
size: t,
|
3127
3138
|
labelRight: r,
|
3128
3139
|
labelLeft: n
|
3129
3140
|
}) => {
|
3130
|
-
const a = "text-sm font-medium",
|
3141
|
+
const a = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
3131
3142
|
switch (e) {
|
3132
3143
|
case ar:
|
3133
3144
|
case Xt:
|
3134
3145
|
return E({
|
3135
3146
|
"text-center": e === Xt,
|
3136
3147
|
[a]: t === "small",
|
3137
|
-
[
|
3138
|
-
[
|
3148
|
+
[o]: t === "medium",
|
3149
|
+
[s]: t === "large"
|
3139
3150
|
});
|
3140
3151
|
case gt:
|
3141
3152
|
return E({
|
3142
3153
|
[a]: t === "small" && (r || n),
|
3143
|
-
[
|
3144
|
-
[
|
3154
|
+
[o]: t === "medium" && (r || n),
|
3155
|
+
[s]: t === "large" && (r || n)
|
3145
3156
|
});
|
3146
3157
|
}
|
3147
|
-
},
|
3158
|
+
}, ys = ({
|
3148
3159
|
mode: e,
|
3149
3160
|
noBackground: t,
|
3150
3161
|
noTruncate: r,
|
@@ -3180,7 +3191,7 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3180
3191
|
return E("not-prose text-copy-lighter", {
|
3181
3192
|
truncate: !r
|
3182
3193
|
});
|
3183
|
-
},
|
3194
|
+
}, Es = ({
|
3184
3195
|
mode: e,
|
3185
3196
|
noBackground: t,
|
3186
3197
|
variant: r
|
@@ -3210,13 +3221,13 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3210
3221
|
if (r === "selected")
|
3211
3222
|
return "bg-action-selected-dark";
|
3212
3223
|
}
|
3213
|
-
},
|
3224
|
+
}, bs = ({
|
3214
3225
|
radius: e
|
3215
3226
|
}) => E({
|
3216
3227
|
"rounded-full": e === "large",
|
3217
3228
|
"rounded-md": e === "medium",
|
3218
3229
|
"rounded-sm": e === "small"
|
3219
|
-
}),
|
3230
|
+
}), Ss = ({
|
3220
3231
|
mode: e,
|
3221
3232
|
disabled: t,
|
3222
3233
|
variant: r
|
@@ -3246,7 +3257,7 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3246
3257
|
});
|
3247
3258
|
if (r === "selected")
|
3248
3259
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
3249
|
-
},
|
3260
|
+
}, ws = ({
|
3250
3261
|
mode: e,
|
3251
3262
|
disabled: t,
|
3252
3263
|
variant: r
|
@@ -3276,7 +3287,7 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3276
3287
|
});
|
3277
3288
|
if (r === "selected")
|
3278
3289
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
3279
|
-
},
|
3290
|
+
}, Ts = ({
|
3280
3291
|
mode: e,
|
3281
3292
|
noBorder: t,
|
3282
3293
|
variant: r
|
@@ -3306,14 +3317,14 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3306
3317
|
});
|
3307
3318
|
if (r === "selected")
|
3308
3319
|
return "border border-border-selected-dark";
|
3309
|
-
},
|
3320
|
+
}, _s = ({
|
3310
3321
|
focusMode: e
|
3311
3322
|
}) => E("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
3312
3323
|
"focus:outline-focus-dark": e === "dark",
|
3313
3324
|
"focus:outline-focus-light": e === "light",
|
3314
3325
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
3315
3326
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
3316
|
-
}),
|
3327
|
+
}), Is = ({
|
3317
3328
|
mode: e,
|
3318
3329
|
raw: t,
|
3319
3330
|
iconClassName: r
|
@@ -3325,7 +3336,7 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3325
3336
|
"dark:text-copy-accent-dark": e === "system"
|
3326
3337
|
},
|
3327
3338
|
r
|
3328
|
-
),
|
3339
|
+
), As = ({
|
3329
3340
|
animated: e
|
3330
3341
|
}) => E({
|
3331
3342
|
"transition-opacity duration-300 ease-in": e
|
@@ -3335,8 +3346,8 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3335
3346
|
raw: r,
|
3336
3347
|
mode: n,
|
3337
3348
|
focusMode: a,
|
3338
|
-
disabled:
|
3339
|
-
fullWidth:
|
3349
|
+
disabled: o,
|
3350
|
+
fullWidth: s,
|
3340
3351
|
size: i,
|
3341
3352
|
noBorder: c,
|
3342
3353
|
labelRight: m,
|
@@ -3349,15 +3360,15 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3349
3360
|
animated: w
|
3350
3361
|
}) => (l || (l = "primary"), r ? E($r, t) : E(
|
3351
3362
|
$r,
|
3352
|
-
|
3363
|
+
ys({
|
3353
3364
|
mode: n,
|
3354
3365
|
variant: l,
|
3355
3366
|
noBackground: u,
|
3356
3367
|
noTruncate: d
|
3357
3368
|
}),
|
3358
|
-
|
3359
|
-
|
3360
|
-
|
3369
|
+
Es({ mode: n, noBackground: u, variant: l }),
|
3370
|
+
bs({ radius: y }),
|
3371
|
+
ps({
|
3361
3372
|
type: e,
|
3362
3373
|
size: i,
|
3363
3374
|
labelRight: m,
|
@@ -3365,36 +3376,36 @@ const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.
|
|
3365
3376
|
align: p,
|
3366
3377
|
animated: w
|
3367
3378
|
}),
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3379
|
+
gs({ type: e, size: i, labelRight: m, labelLeft: f }),
|
3380
|
+
Ts({ mode: n, variant: l, noBorder: c }),
|
3381
|
+
_s({ focusMode: a }),
|
3382
|
+
Ss({ mode: n, variant: l, disabled: o }),
|
3383
|
+
ws({ mode: n, variant: l, disabled: o }),
|
3373
3384
|
{
|
3374
|
-
"w-full":
|
3375
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
3385
|
+
"w-full": s,
|
3386
|
+
"disabled:cursor-not-allowed disabled:opacity-50": o
|
3376
3387
|
},
|
3377
3388
|
E({
|
3378
3389
|
"transition-[width] duration-300 ease-in-out": e === gt && w
|
3379
3390
|
}),
|
3380
3391
|
t
|
3381
|
-
)),
|
3392
|
+
)), Rs = (e, t, r) => {
|
3382
3393
|
var n;
|
3383
3394
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
3384
|
-
},
|
3395
|
+
}, or = Z.forwardRef((e, t) => {
|
3385
3396
|
const { onClick: r, noInternalClick: n = !1, ...a } = e;
|
3386
3397
|
return /* @__PURE__ */ h(
|
3387
3398
|
"button",
|
3388
3399
|
{
|
3389
3400
|
ref: t,
|
3390
|
-
onClick: (
|
3391
|
-
|
3401
|
+
onClick: (o) => {
|
3402
|
+
Rs(o, n, r);
|
3392
3403
|
},
|
3393
3404
|
...a
|
3394
3405
|
}
|
3395
3406
|
);
|
3396
3407
|
});
|
3397
|
-
|
3408
|
+
or.displayName = "BaseButton";
|
3398
3409
|
const kn = Z.forwardRef(
|
3399
3410
|
({
|
3400
3411
|
children: e,
|
@@ -3402,8 +3413,8 @@ const kn = Z.forwardRef(
|
|
3402
3413
|
mode: r = "system",
|
3403
3414
|
focusMode: n = "system",
|
3404
3415
|
fullWidth: a = !1,
|
3405
|
-
className:
|
3406
|
-
size:
|
3416
|
+
className: o,
|
3417
|
+
size: s = "medium",
|
3407
3418
|
raw: i = !1,
|
3408
3419
|
noBorder: c = !1,
|
3409
3420
|
variant: m = "primary",
|
@@ -3418,15 +3429,15 @@ const kn = Z.forwardRef(
|
|
3418
3429
|
fullWidth: a,
|
3419
3430
|
disabled: t,
|
3420
3431
|
raw: i,
|
3421
|
-
className:
|
3422
|
-
size:
|
3432
|
+
className: o,
|
3433
|
+
size: s,
|
3423
3434
|
noBorder: c,
|
3424
3435
|
variant: m,
|
3425
3436
|
noTruncate: f,
|
3426
3437
|
radius: u
|
3427
3438
|
});
|
3428
3439
|
return /* @__PURE__ */ h(
|
3429
|
-
|
3440
|
+
or,
|
3430
3441
|
{
|
3431
3442
|
ref: d,
|
3432
3443
|
className: p,
|
@@ -3438,13 +3449,13 @@ const kn = Z.forwardRef(
|
|
3438
3449
|
}
|
3439
3450
|
);
|
3440
3451
|
kn.displayName = "Button";
|
3441
|
-
function
|
3452
|
+
function vs() {
|
3442
3453
|
const e = x(!1);
|
3443
|
-
return
|
3454
|
+
return oe(() => (e.current = !0, () => {
|
3444
3455
|
e.current = !1;
|
3445
3456
|
}), []), re(() => e.current, []);
|
3446
3457
|
}
|
3447
|
-
function
|
3458
|
+
function ks(e) {
|
3448
3459
|
return Ke(() => e.every((t) => t == null) ? () => {
|
3449
3460
|
} : (t) => {
|
3450
3461
|
e.forEach((r) => {
|
@@ -3452,7 +3463,7 @@ function ko(e) {
|
|
3452
3463
|
});
|
3453
3464
|
}, e);
|
3454
3465
|
}
|
3455
|
-
const
|
3466
|
+
const Cs = {
|
3456
3467
|
x: 0,
|
3457
3468
|
y: 0,
|
3458
3469
|
width: 0,
|
@@ -3463,39 +3474,39 @@ const Co = {
|
|
3463
3474
|
right: 0
|
3464
3475
|
};
|
3465
3476
|
function Ut(e) {
|
3466
|
-
const t =
|
3477
|
+
const t = vs(), r = x(0), n = x(null), [a, o] = Ee(Cs), s = Ke(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
3467
3478
|
const c = i[0];
|
3468
3479
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
3469
|
-
n.current && t() &&
|
3480
|
+
n.current && t() && o(c.contentRect);
|
3470
3481
|
}));
|
3471
3482
|
}), [t]);
|
3472
|
-
return
|
3473
|
-
|
3474
|
-
}), [
|
3483
|
+
return oe(() => (n.current && (s == null || s.observe(n.current, e)), () => {
|
3484
|
+
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
3485
|
+
}), [s, e]), [n, a];
|
3475
3486
|
}
|
3476
|
-
const
|
3487
|
+
const Ns = {
|
3477
3488
|
small: 24,
|
3478
3489
|
// w-6
|
3479
3490
|
medium: 32,
|
3480
3491
|
// w-8
|
3481
3492
|
large: 48
|
3482
3493
|
// w-12
|
3483
|
-
},
|
3494
|
+
}, Os = {
|
3484
3495
|
small: 8 * 2,
|
3485
3496
|
// px-2 x 2
|
3486
3497
|
medium: 12 * 2,
|
3487
3498
|
// px-3 x 2
|
3488
3499
|
large: 16 * 2
|
3489
3500
|
// px-4 x 2
|
3490
|
-
},
|
3501
|
+
}, xs = 2, ct = Z.forwardRef(
|
3491
3502
|
({
|
3492
3503
|
children: e,
|
3493
3504
|
disabled: t = !1,
|
3494
3505
|
mode: r = "system",
|
3495
3506
|
focusMode: n = "system",
|
3496
3507
|
fullWidth: a = !1,
|
3497
|
-
className:
|
3498
|
-
type:
|
3508
|
+
className: o,
|
3509
|
+
type: s = "button",
|
3499
3510
|
raw: i = !1,
|
3500
3511
|
noBorder: c = !1,
|
3501
3512
|
"aria-label": m,
|
@@ -3518,7 +3529,7 @@ const No = {
|
|
3518
3529
|
fullWidth: a,
|
3519
3530
|
disabled: t,
|
3520
3531
|
raw: i,
|
3521
|
-
className:
|
3532
|
+
className: o,
|
3522
3533
|
noBorder: c,
|
3523
3534
|
size: u,
|
3524
3535
|
labelRight: l,
|
@@ -3528,11 +3539,11 @@ const No = {
|
|
3528
3539
|
radius: w,
|
3529
3540
|
variant: g,
|
3530
3541
|
animated: U
|
3531
|
-
}), M =
|
3542
|
+
}), M = Is({ mode: r, raw: i, iconClassName: $ }), S = As({ animated: U }), [v, P] = Ut(), [A, O] = Ut(), [R, V] = Ut(), ee = x(0), b = x(null), k = ks([I, b]);
|
3532
3543
|
return Ue(() => {
|
3533
|
-
R && R.current && U && (ee.current = V.width +
|
3544
|
+
R && R.current && U && (ee.current = V.width + Os[u] + (c ? 0 : xs));
|
3534
3545
|
}, [V, R, u, c, U]), Ue(() => {
|
3535
|
-
b && b.current && U && (l && v && P.width > 0 ? (v.current && (v.current.style.opacity = "100"), b.current.style.width = `${P.width + ee.current}px`) : d && O.width > 0 ? (A.current && (A.current.style.opacity = "100"), b.current.style.width = `${O.width + ee.current}px`) : (v.current && (v.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), b.current.style.width = `${
|
3546
|
+
b && b.current && U && (l && v && P.width > 0 ? (v.current && (v.current.style.opacity = "100"), b.current.style.width = `${P.width + ee.current}px`) : d && O.width > 0 ? (A.current && (A.current.style.opacity = "100"), b.current.style.width = `${O.width + ee.current}px`) : (v.current && (v.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), b.current.style.width = `${Ns[u]}px`));
|
3536
3547
|
}, [
|
3537
3548
|
P,
|
3538
3549
|
l,
|
@@ -3543,12 +3554,12 @@ const No = {
|
|
3543
3554
|
u,
|
3544
3555
|
U
|
3545
3556
|
]), /* @__PURE__ */ Q(
|
3546
|
-
|
3557
|
+
or,
|
3547
3558
|
{
|
3548
3559
|
ref: k,
|
3549
3560
|
className: D,
|
3550
3561
|
disabled: t,
|
3551
|
-
type:
|
3562
|
+
type: s,
|
3552
3563
|
"aria-label": m || f,
|
3553
3564
|
...K,
|
3554
3565
|
children: [
|
@@ -3595,15 +3606,15 @@ try {
|
|
3595
3606
|
});
|
3596
3607
|
} catch {
|
3597
3608
|
}
|
3598
|
-
const
|
3609
|
+
const Ps = Z.forwardRef(
|
3599
3610
|
({
|
3600
3611
|
children: e,
|
3601
3612
|
mode: t = "system",
|
3602
3613
|
className: r,
|
3603
3614
|
active: n = !1,
|
3604
3615
|
...a
|
3605
|
-
},
|
3606
|
-
const
|
3616
|
+
}, o) => {
|
3617
|
+
const s = n ? E(
|
3607
3618
|
"relative",
|
3608
3619
|
"focus-within:static",
|
3609
3620
|
"focus-within:after:border-transparent",
|
@@ -3620,11 +3631,11 @@ const Po = Z.forwardRef(
|
|
3620
3631
|
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
3621
3632
|
}
|
3622
3633
|
) : "";
|
3623
|
-
return /* @__PURE__ */ h("div", { className:
|
3634
|
+
return /* @__PURE__ */ h("div", { className: s, children: /* @__PURE__ */ h(
|
3624
3635
|
ct,
|
3625
3636
|
{
|
3626
3637
|
className: E("justify-center", r),
|
3627
|
-
ref:
|
3638
|
+
ref: o,
|
3628
3639
|
mode: t,
|
3629
3640
|
radius: "small",
|
3630
3641
|
...a,
|
@@ -3633,7 +3644,7 @@ const Po = Z.forwardRef(
|
|
3633
3644
|
) });
|
3634
3645
|
}
|
3635
3646
|
);
|
3636
|
-
|
3647
|
+
Ps.displayName = "ButtonSort";
|
3637
3648
|
/*!
|
3638
3649
|
@versini/ui-card v3.0.18
|
3639
3650
|
© 2025 gizmette.com
|
@@ -3648,27 +3659,27 @@ try {
|
|
3648
3659
|
} catch {
|
3649
3660
|
}
|
3650
3661
|
const nt = "av-card";
|
3651
|
-
function
|
3662
|
+
function Ds(e) {
|
3652
3663
|
const t = Gr();
|
3653
3664
|
return `${e}${t}`;
|
3654
3665
|
}
|
3655
|
-
const
|
3666
|
+
const Ls = ({
|
3656
3667
|
className: e,
|
3657
3668
|
headerClassName: t,
|
3658
3669
|
bodyClassName: r,
|
3659
3670
|
footerClassName: n,
|
3660
3671
|
mode: a,
|
3661
|
-
compact:
|
3662
|
-
noBorder:
|
3672
|
+
compact: o,
|
3673
|
+
noBorder: s
|
3663
3674
|
}) => {
|
3664
3675
|
const i = E(
|
3665
3676
|
nt,
|
3666
3677
|
"rounded-md",
|
3667
3678
|
{
|
3668
|
-
"border-none":
|
3669
|
-
"border-2": !
|
3670
|
-
"p-4": !
|
3671
|
-
"p-1 sm:p-2":
|
3679
|
+
"border-none": s,
|
3680
|
+
"border-2": !s,
|
3681
|
+
"p-4": !o,
|
3682
|
+
"p-1 sm:p-2": o,
|
3672
3683
|
"border-border-accent bg-surface-darker text-copy-light": a === "darker",
|
3673
3684
|
"border-border-accent bg-surface-dark text-copy-light": a === "dark",
|
3674
3685
|
"border-border-dark bg-surface-lighter text-copy-dark": a === "light",
|
@@ -3682,8 +3693,8 @@ const Lo = ({
|
|
3682
3693
|
"border-border-medium": a === "light",
|
3683
3694
|
"border-border-medium dark:border-border-accent": a === "system",
|
3684
3695
|
"border-border-accent dark:border-border-medium": a === "alt-system",
|
3685
|
-
"mb-4": !
|
3686
|
-
"mb-2":
|
3696
|
+
"mb-4": !o,
|
3697
|
+
"mb-2": o
|
3687
3698
|
}), m = E(r), f = n || E(`${nt}__footer pt-2`);
|
3688
3699
|
return {
|
3689
3700
|
wrapper: i,
|
@@ -3692,7 +3703,7 @@ const Lo = ({
|
|
3692
3703
|
footer: f
|
3693
3704
|
};
|
3694
3705
|
};
|
3695
|
-
function $
|
3706
|
+
function $s({
|
3696
3707
|
id: e,
|
3697
3708
|
content: t,
|
3698
3709
|
userAriaLabelledby: r,
|
@@ -3700,14 +3711,14 @@ function $o({
|
|
3700
3711
|
}) {
|
3701
3712
|
return typeof t == "string" ? /* @__PURE__ */ h("h2", { id: e, className: n, children: t }) : r ? /* @__PURE__ */ h("div", { className: n, children: t }) : t ? /* @__PURE__ */ h("div", { className: n, id: e, children: t }) : null;
|
3702
3713
|
}
|
3703
|
-
const
|
3714
|
+
const Us = ({
|
3704
3715
|
header: e,
|
3705
3716
|
headerClassName: t,
|
3706
3717
|
footer: r,
|
3707
3718
|
footerClassName: n,
|
3708
3719
|
children: a,
|
3709
|
-
className:
|
3710
|
-
bodyClassName:
|
3720
|
+
className: o,
|
3721
|
+
bodyClassName: s,
|
3711
3722
|
"aria-labelledby": i,
|
3712
3723
|
mode: c = "system",
|
3713
3724
|
compact: m = !1,
|
@@ -3715,10 +3726,10 @@ const Uo = ({
|
|
3715
3726
|
...u
|
3716
3727
|
}) => {
|
3717
3728
|
let l = null, d = null;
|
3718
|
-
const p = typeof e == "string", y =
|
3719
|
-
className:
|
3729
|
+
const p = typeof e == "string", y = Ds(nt), w = Ls({
|
3730
|
+
className: o,
|
3720
3731
|
headerClassName: t,
|
3721
|
-
bodyClassName:
|
3732
|
+
bodyClassName: s,
|
3722
3733
|
footerClassName: n,
|
3723
3734
|
mode: c,
|
3724
3735
|
compact: m,
|
@@ -3734,7 +3745,7 @@ const Uo = ({
|
|
3734
3745
|
...u,
|
3735
3746
|
children: [
|
3736
3747
|
/* @__PURE__ */ h(
|
3737
|
-
$
|
3748
|
+
$s,
|
3738
3749
|
{
|
3739
3750
|
...l && { id: l },
|
3740
3751
|
content: e,
|
@@ -3753,12 +3764,12 @@ const Uo = ({
|
|
3753
3764
|
viewBox: r,
|
3754
3765
|
className: n,
|
3755
3766
|
defaultViewBox: a,
|
3756
|
-
size:
|
3757
|
-
title:
|
3767
|
+
size: o,
|
3768
|
+
title: s,
|
3758
3769
|
semantic: i = !1,
|
3759
3770
|
...c
|
3760
3771
|
}) => {
|
3761
|
-
const m = E(
|
3772
|
+
const m = E(o, n);
|
3762
3773
|
return /* @__PURE__ */ h(at, { children: /* @__PURE__ */ Q(
|
3763
3774
|
"svg",
|
3764
3775
|
{
|
@@ -3771,7 +3782,7 @@ const Uo = ({
|
|
3771
3782
|
focusable: !1,
|
3772
3783
|
...c,
|
3773
3784
|
children: [
|
3774
|
-
|
3785
|
+
s && i && /* @__PURE__ */ h("title", { children: s }),
|
3775
3786
|
e
|
3776
3787
|
]
|
3777
3788
|
}
|
@@ -3790,7 +3801,7 @@ try {
|
|
3790
3801
|
});
|
3791
3802
|
} catch {
|
3792
3803
|
}
|
3793
|
-
const
|
3804
|
+
const Ms = ({
|
3794
3805
|
className: e,
|
3795
3806
|
viewBox: t,
|
3796
3807
|
title: r,
|
@@ -3807,7 +3818,7 @@ const Mo = ({
|
|
3807
3818
|
...a,
|
3808
3819
|
children: /* @__PURE__ */ h("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
|
3809
3820
|
}
|
3810
|
-
),
|
3821
|
+
), Hs = ({
|
3811
3822
|
className: e,
|
3812
3823
|
viewBox: t,
|
3813
3824
|
title: r,
|
@@ -3833,14 +3844,14 @@ const Mo = ({
|
|
3833
3844
|
/* @__PURE__ */ h("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
|
3834
3845
|
]
|
3835
3846
|
}
|
3836
|
-
),
|
3847
|
+
), Ks = ({
|
3837
3848
|
className: e,
|
3838
3849
|
viewBox: t,
|
3839
3850
|
title: r,
|
3840
3851
|
monotone: n,
|
3841
3852
|
...a
|
3842
3853
|
}) => {
|
3843
|
-
const
|
3854
|
+
const o = n ? "1" : "0.4";
|
3844
3855
|
return /* @__PURE__ */ Q(
|
3845
3856
|
yt,
|
3846
3857
|
{
|
@@ -3855,21 +3866,21 @@ const Mo = ({
|
|
3855
3866
|
"path",
|
3856
3867
|
{
|
3857
3868
|
d: "M172.32 96.79c0 13.78-8.48 25.5-20.29 29.78l7.14 11.83-10.57 13 10.57 12.71-17.04 22.87-12.01-12.82V125.7c-10.68-4.85-18.15-15.97-18.15-28.91 0-17.4 13.51-31.51 30.18-31.51 16.66 0 30.17 14.11 30.17 31.51m-30.18 4.82c4.02 0 7.28-3.4 7.28-7.6s-3.26-7.61-7.28-7.61-7.28 3.4-7.28 7.61c-.01 4.2 3.26 7.6 7.28 7.6",
|
3858
|
-
opacity:
|
3869
|
+
opacity: o
|
3859
3870
|
}
|
3860
3871
|
),
|
3861
3872
|
/* @__PURE__ */ h(
|
3862
3873
|
"path",
|
3863
3874
|
{
|
3864
3875
|
d: "M172.41 96.88c0 13.62-8.25 25.23-19.83 29.67l6.58 11.84-9.73 13 9.73 12.71-17.03 23.05v-85.54c4.02 0 7.28-3.41 7.28-7.6 0-4.2-3.26-7.61-7.28-7.61V65.28c16.73 0 30.28 14.15 30.28 31.6",
|
3865
|
-
opacity:
|
3876
|
+
opacity: o
|
3866
3877
|
}
|
3867
3878
|
),
|
3868
3879
|
/* @__PURE__ */ h("path", { d: "M120.24 131.43c-9.75-8-16.3-20.3-17.2-34.27H50.8c-10.96 0-19.84 9.01-19.84 20.13v25.17c0 5.56 4.44 10.07 9.92 10.07h69.44c5.48 0 9.92-4.51 9.92-10.07zM73.16 91.13c-2.42-.46-4.82-.89-7.11-1.86-8.65-3.63-13.69-10.32-15.32-19.77-1.12-6.47-.59-12.87 2.03-18.92 3.72-8.6 10.39-13.26 19.15-14.84 5.24-.94 10.46-.73 15.5 1.15 7.59 2.82 12.68 8.26 15.03 16.24 2.38 8.05 2.03 16.1-1.56 23.72-3.72 7.96-10.21 12.23-18.42 13.9-.68.14-1.37.27-2.05.41-2.41-.03-4.83-.03-7.25-.03" })
|
3869
3880
|
]
|
3870
3881
|
}
|
3871
3882
|
);
|
3872
|
-
},
|
3883
|
+
}, Vs = ({
|
3873
3884
|
className: e,
|
3874
3885
|
viewBox: t,
|
3875
3886
|
title: r,
|
@@ -3922,16 +3933,16 @@ try {
|
|
3922
3933
|
});
|
3923
3934
|
} catch {
|
3924
3935
|
}
|
3925
|
-
const
|
3936
|
+
const Ws = "av-main", Gs = ({
|
3926
3937
|
children: e,
|
3927
3938
|
className: t,
|
3928
3939
|
raw: r = !1,
|
3929
3940
|
noMargin: n = !1,
|
3930
3941
|
noPadding: a = !1,
|
3931
|
-
...
|
3942
|
+
...o
|
3932
3943
|
}) => {
|
3933
|
-
const
|
3934
|
-
|
3944
|
+
const s = E(
|
3945
|
+
Ws,
|
3935
3946
|
{
|
3936
3947
|
"mt-2 sm:mt-3": !r && !n,
|
3937
3948
|
"p-2": !r && !a,
|
@@ -3939,28 +3950,28 @@ const Wo = "av-main", Go = ({
|
|
3939
3950
|
},
|
3940
3951
|
t
|
3941
3952
|
);
|
3942
|
-
return /* @__PURE__ */ h("main", { className:
|
3943
|
-
},
|
3953
|
+
return /* @__PURE__ */ h("main", { className: s, ...o, children: e });
|
3954
|
+
}, Bs = "av-flexgrid", tt = "av-flexgrid-item", lt = 0.25, Qt = Z.createContext({
|
3944
3955
|
columnGap: 0,
|
3945
3956
|
rowGap: 0
|
3946
|
-
}),
|
3957
|
+
}), Fs = ({
|
3947
3958
|
children: e,
|
3948
3959
|
className: t,
|
3949
3960
|
columnGap: r = 1,
|
3950
3961
|
rowGap: n = 0,
|
3951
3962
|
height: a = "auto",
|
3952
|
-
width:
|
3953
|
-
direction:
|
3963
|
+
width: o = "auto",
|
3964
|
+
direction: s = "row",
|
3954
3965
|
alignHorizontal: i = "normal",
|
3955
3966
|
alignVertical: c = "normal",
|
3956
3967
|
...m
|
3957
3968
|
}) => {
|
3958
3969
|
const f = {
|
3959
|
-
flexDirection:
|
3970
|
+
flexDirection: s,
|
3960
3971
|
justifyContent: i,
|
3961
3972
|
alignItems: c,
|
3962
3973
|
height: a,
|
3963
|
-
width:
|
3974
|
+
width: o,
|
3964
3975
|
/**
|
3965
3976
|
* Trick to account for the extra space taken
|
3966
3977
|
* by the columnGap and rowGap that will be applied
|
@@ -3969,7 +3980,7 @@ const Wo = "av-main", Go = ({
|
|
3969
3980
|
marginLeft: r * -1 * lt + "rem",
|
3970
3981
|
marginTop: n * -1 * lt + "rem"
|
3971
3982
|
}, u = E(
|
3972
|
-
|
3983
|
+
Bs,
|
3973
3984
|
"box-border flex flex-wrap"
|
3974
3985
|
), l = { columnGap: r, rowGap: n };
|
3975
3986
|
return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: f, ...m, children: /* @__PURE__ */ h(Qt.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: f, ...m, children: /* @__PURE__ */ h(Qt.Provider, { value: l, children: e }) });
|
@@ -4046,7 +4057,7 @@ const Wo = "av-main", Go = ({
|
|
4046
4057
|
"lg:basis-full": e === 12 && t === "lg",
|
4047
4058
|
"xl:basis-full": e === 12 && t === "xl",
|
4048
4059
|
"2xl:basis-full": e === 12 && t === "2xl"
|
4049
|
-
}),
|
4060
|
+
}), Js = ({
|
4050
4061
|
className: e,
|
4051
4062
|
span: t
|
4052
4063
|
}) => {
|
@@ -4075,14 +4086,14 @@ const Wo = "av-main", Go = ({
|
|
4075
4086
|
span: r,
|
4076
4087
|
...n
|
4077
4088
|
}) => {
|
4078
|
-
const { columnGap: a, rowGap:
|
4089
|
+
const { columnGap: a, rowGap: o } = Zt(Qt), s = {
|
4079
4090
|
paddingLeft: a * lt + "rem",
|
4080
|
-
paddingTop:
|
4081
|
-
}, i =
|
4091
|
+
paddingTop: o * lt + "rem"
|
4092
|
+
}, i = Js({
|
4082
4093
|
className: t,
|
4083
4094
|
span: r
|
4084
4095
|
});
|
4085
|
-
return /* @__PURE__ */ h("div", { className: i, style:
|
4096
|
+
return /* @__PURE__ */ h("div", { className: i, style: s, ...n, children: e });
|
4086
4097
|
};
|
4087
4098
|
/*!
|
4088
4099
|
@versini/ui-system v3.0.10
|
@@ -4097,14 +4108,14 @@ try {
|
|
4097
4108
|
});
|
4098
4109
|
} catch {
|
4099
4110
|
}
|
4100
|
-
const Cn = "av-text-input",
|
4101
|
-
function
|
4111
|
+
const Cn = "av-text-input", Ys = "av-text-input-wrapper", Ht = "av-text-input-helper-text";
|
4112
|
+
function js() {
|
4102
4113
|
const e = x(!1);
|
4103
|
-
return
|
4114
|
+
return oe(() => (e.current = !0, () => {
|
4104
4115
|
e.current = !1;
|
4105
4116
|
}), []), re(() => e.current, []);
|
4106
4117
|
}
|
4107
|
-
const
|
4118
|
+
const qs = {
|
4108
4119
|
x: 0,
|
4109
4120
|
y: 0,
|
4110
4121
|
width: 0,
|
@@ -4114,18 +4125,18 @@ const qo = {
|
|
4114
4125
|
bottom: 0,
|
4115
4126
|
right: 0
|
4116
4127
|
};
|
4117
|
-
function
|
4118
|
-
const t =
|
4128
|
+
function zs(e) {
|
4129
|
+
const t = js(), r = x(0), n = x(null), [a, o] = Ee(qs), s = Ke(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
4119
4130
|
const c = i[0];
|
4120
4131
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
4121
|
-
n.current && t() &&
|
4132
|
+
n.current && t() && o(c.contentRect);
|
4122
4133
|
}));
|
4123
4134
|
}), [t]);
|
4124
|
-
return
|
4125
|
-
|
4126
|
-
}), [
|
4135
|
+
return oe(() => (n.current && (s == null || s.observe(n.current, e)), () => {
|
4136
|
+
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
4137
|
+
}), [s, e]), [n, a];
|
4127
4138
|
}
|
4128
|
-
function
|
4139
|
+
function Xs(e) {
|
4129
4140
|
const t = Gr();
|
4130
4141
|
if (!e)
|
4131
4142
|
return t;
|
@@ -4136,7 +4147,7 @@ function Xo(e) {
|
|
4136
4147
|
return typeof r == "number" || typeof r == "string" ? `${n}${r}` : `${n}${t}`;
|
4137
4148
|
}
|
4138
4149
|
}
|
4139
|
-
const Nn = "SET_ANNOUNCEMENT", On = "CLEAR_ANNOUNCEMENT",
|
4150
|
+
const Nn = "SET_ANNOUNCEMENT", On = "CLEAR_ANNOUNCEMENT", Qs = {
|
4140
4151
|
alert: null,
|
4141
4152
|
alertdialog: null,
|
4142
4153
|
log: "polite",
|
@@ -4144,7 +4155,7 @@ const Nn = "SET_ANNOUNCEMENT", On = "CLEAR_ANNOUNCEMENT", Qo = {
|
|
4144
4155
|
progressbar: null,
|
4145
4156
|
status: "polite",
|
4146
4157
|
timer: "assertive"
|
4147
|
-
},
|
4158
|
+
}, Zs = (e, t) => {
|
4148
4159
|
switch (t == null ? void 0 : t.type) {
|
4149
4160
|
case Nn:
|
4150
4161
|
return {
|
@@ -4189,21 +4200,21 @@ const Nn = "SET_ANNOUNCEMENT", On = "CLEAR_ANNOUNCEMENT", Qo = {
|
|
4189
4200
|
announcementDelay: r,
|
4190
4201
|
clearAnnouncementDelay: n,
|
4191
4202
|
clearAnnouncementTimeoutRef: a,
|
4192
|
-
onAnnouncementClear:
|
4193
|
-
dispatch:
|
4203
|
+
onAnnouncementClear: o,
|
4204
|
+
dispatch: s
|
4194
4205
|
}) => {
|
4195
4206
|
clearTimeout(t.current), r ? t.current = setTimeout(Mr, r, {
|
4196
4207
|
children: e,
|
4197
4208
|
clearAnnouncementDelay: n,
|
4198
4209
|
clearAnnouncementTimeoutRef: a,
|
4199
|
-
onAnnouncementClear:
|
4200
|
-
dispatch:
|
4210
|
+
onAnnouncementClear: o,
|
4211
|
+
dispatch: s
|
4201
4212
|
}) : Mr({
|
4202
4213
|
children: e,
|
4203
4214
|
clearAnnouncementDelay: n,
|
4204
4215
|
clearAnnouncementTimeoutRef: a,
|
4205
|
-
onAnnouncementClear:
|
4206
|
-
dispatch:
|
4216
|
+
onAnnouncementClear: o,
|
4217
|
+
dispatch: s
|
4207
4218
|
});
|
4208
4219
|
};
|
4209
4220
|
function xn({
|
@@ -4212,30 +4223,30 @@ function xn({
|
|
4212
4223
|
politeness: r,
|
4213
4224
|
role: n = null,
|
4214
4225
|
announcementDelay: a,
|
4215
|
-
clearAnnouncementDelay:
|
4216
|
-
onAnnouncementClear:
|
4226
|
+
clearAnnouncementDelay: o,
|
4227
|
+
onAnnouncementClear: s,
|
4217
4228
|
visible: i,
|
4218
4229
|
...c
|
4219
4230
|
}) {
|
4220
|
-
const m = x(null), f = x(null), [u, l] = Wr(
|
4231
|
+
const m = x(null), f = x(null), [u, l] = Wr(Zs, {
|
4221
4232
|
announcement: null
|
4222
4233
|
});
|
4223
4234
|
let d = r;
|
4224
|
-
typeof d > "u" && (d = n ?
|
4235
|
+
typeof d > "u" && (d = n ? Qs[n] : "assertive"), oe(() => {
|
4225
4236
|
ti({
|
4226
4237
|
announcementTimeoutRef: m,
|
4227
4238
|
announcementDelay: a,
|
4228
4239
|
children: e,
|
4229
|
-
clearAnnouncementDelay:
|
4240
|
+
clearAnnouncementDelay: o,
|
4230
4241
|
clearAnnouncementTimeoutRef: f,
|
4231
|
-
onAnnouncementClear:
|
4242
|
+
onAnnouncementClear: s,
|
4232
4243
|
dispatch: l
|
4233
4244
|
});
|
4234
4245
|
}, [
|
4235
4246
|
e,
|
4236
4247
|
a,
|
4237
|
-
|
4238
|
-
|
4248
|
+
o,
|
4249
|
+
s
|
4239
4250
|
]);
|
4240
4251
|
const p = E(t, {
|
4241
4252
|
"sr-only": !i
|
@@ -4286,7 +4297,7 @@ const ri = ({
|
|
4286
4297
|
"focus:border-border-dark": !e && t,
|
4287
4298
|
"border-border-error-dark": !e && t,
|
4288
4299
|
"border-transparent": e
|
4289
|
-
}),
|
4300
|
+
}), oi = ({
|
4290
4301
|
disabled: e,
|
4291
4302
|
raw: t,
|
4292
4303
|
error: r,
|
@@ -4310,7 +4321,7 @@ const ri = ({
|
|
4310
4321
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": n === "system",
|
4311
4322
|
"text-copy-lighter dark:text-copy-error-dark": n === "alt-system"
|
4312
4323
|
});
|
4313
|
-
},
|
4324
|
+
}, si = ({
|
4314
4325
|
error: e,
|
4315
4326
|
raw: t,
|
4316
4327
|
mode: r,
|
@@ -4343,15 +4354,15 @@ const ri = ({
|
|
4343
4354
|
raw: r,
|
4344
4355
|
disabled: n,
|
4345
4356
|
noBorder: a,
|
4346
|
-
error:
|
4347
|
-
mode:
|
4357
|
+
error: o,
|
4358
|
+
mode: s,
|
4348
4359
|
focusMode: i,
|
4349
4360
|
size: c,
|
4350
4361
|
rightElementClassName: m
|
4351
4362
|
}) => {
|
4352
4363
|
const f = r ? e : E(
|
4353
4364
|
"relative flex w-full flex-col justify-center",
|
4354
|
-
|
4365
|
+
Ys,
|
4355
4366
|
e
|
4356
4367
|
);
|
4357
4368
|
let u = "";
|
@@ -4376,22 +4387,22 @@ const ri = ({
|
|
4376
4387
|
Cn,
|
4377
4388
|
u,
|
4378
4389
|
"rounded-md text-base px-4",
|
4379
|
-
ri({ mode:
|
4390
|
+
ri({ mode: s }),
|
4380
4391
|
ni({ focusMode: i }),
|
4381
|
-
ai({ noBorder: a, error:
|
4392
|
+
ai({ noBorder: a, error: o }),
|
4382
4393
|
{
|
4383
4394
|
"disabled:cursor-not-allowed disabled:opacity-50": n
|
4384
4395
|
},
|
4385
4396
|
t
|
4386
|
-
), d = r ? void 0 : "sr-only", p =
|
4397
|
+
), d = r ? void 0 : "sr-only", p = oi({
|
4387
4398
|
disabled: n,
|
4388
4399
|
raw: r,
|
4389
|
-
error:
|
4390
|
-
mode:
|
4391
|
-
}), y =
|
4392
|
-
error:
|
4400
|
+
error: o,
|
4401
|
+
mode: s
|
4402
|
+
}), y = si({
|
4403
|
+
error: o,
|
4393
4404
|
raw: r,
|
4394
|
-
mode:
|
4405
|
+
mode: s,
|
4395
4406
|
disabled: n
|
4396
4407
|
}), w = r ? void 0 : E("absolute right-3", m);
|
4397
4408
|
return {
|
@@ -4402,15 +4413,15 @@ const ri = ({
|
|
4402
4413
|
helperText: y,
|
4403
4414
|
rightElement: w
|
4404
4415
|
};
|
4405
|
-
},
|
4416
|
+
}, sr = Z.forwardRef(
|
4406
4417
|
({
|
4407
4418
|
id: e,
|
4408
4419
|
name: t,
|
4409
4420
|
label: r,
|
4410
4421
|
error: n = !1,
|
4411
4422
|
raw: a = !1,
|
4412
|
-
className:
|
4413
|
-
inputClassName:
|
4423
|
+
className: o,
|
4424
|
+
inputClassName: s,
|
4414
4425
|
mode: i = "system",
|
4415
4426
|
focusMode: c = "system",
|
4416
4427
|
disabled: m = !1,
|
@@ -4424,15 +4435,15 @@ const ri = ({
|
|
4424
4435
|
size: g = "md",
|
4425
4436
|
...$
|
4426
4437
|
}, U) => {
|
4427
|
-
const [K, I] =
|
4438
|
+
const [K, I] = zs(), [D, M] = Ee(0), S = Xs({ id: e, prefix: `${Cn}-` }), v = `${t} error, ${p}`, P = x(null), A = x(null), O = {
|
4428
4439
|
xs: { label: "-25px", helperText: "30px" },
|
4429
4440
|
sm: { label: "-29px", helperText: "34px" },
|
4430
4441
|
md: { label: "-33px", helperText: "38px" },
|
4431
4442
|
lg: { label: "-15px", helperText: "22px" },
|
4432
4443
|
xl: { label: "-19px", helperText: "25px" }
|
4433
4444
|
}, R = ii({
|
4434
|
-
className:
|
4435
|
-
inputClassName:
|
4445
|
+
className: o,
|
4446
|
+
inputClassName: s,
|
4436
4447
|
error: n,
|
4437
4448
|
raw: a,
|
4438
4449
|
focusMode: c,
|
@@ -4508,7 +4519,7 @@ const ri = ({
|
|
4508
4519
|
] });
|
4509
4520
|
}
|
4510
4521
|
);
|
4511
|
-
|
4522
|
+
sr.displayName = "TextInput";
|
4512
4523
|
function ci(e) {
|
4513
4524
|
return Ke(() => e.every((t) => t == null) ? () => {
|
4514
4525
|
} : (t) => {
|
@@ -4524,8 +4535,8 @@ const li = 500, di = 5e3, ui = 2e4, Pn = Z.forwardRef(
|
|
4524
4535
|
label: r,
|
4525
4536
|
labelHidden: n,
|
4526
4537
|
onMaskChange: a,
|
4527
|
-
onChange:
|
4528
|
-
onBlur:
|
4538
|
+
onChange: o,
|
4539
|
+
onBlur: s,
|
4529
4540
|
onFocus: i,
|
4530
4541
|
onTextInputMaskBlur: c,
|
4531
4542
|
rightElement: m,
|
@@ -4555,17 +4566,17 @@ const li = 500, di = 5e3, ui = 2e4, Pn = Z.forwardRef(
|
|
4555
4566
|
const { relatedTarget: R } = A, V = (O = $.current) == null ? void 0 : O.parentElement;
|
4556
4567
|
V != null && V.contains(R) || c && c();
|
4557
4568
|
}, S = (A) => {
|
4558
|
-
I(),
|
4569
|
+
I(), s && s(A), M(A);
|
4559
4570
|
}, v = (A) => {
|
4560
4571
|
I(), i && i(A);
|
4561
4572
|
}, P = (A) => {
|
4562
|
-
I(),
|
4573
|
+
I(), o && o(A);
|
4563
4574
|
};
|
4564
|
-
return
|
4575
|
+
return oe(() => () => {
|
4565
4576
|
g.current && clearTimeout(g.current);
|
4566
4577
|
}, []), /* @__PURE__ */ Q(at, { children: [
|
4567
4578
|
/* @__PURE__ */ h(
|
4568
|
-
|
4579
|
+
sr,
|
4569
4580
|
{
|
4570
4581
|
ref: U,
|
4571
4582
|
name: e,
|
@@ -4612,7 +4623,7 @@ try {
|
|
4612
4623
|
});
|
4613
4624
|
} catch {
|
4614
4625
|
}
|
4615
|
-
const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in with a Passkey",
|
4626
|
+
const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in with a Passkey", yc = "Log out", pi = "Password", Ec = "Profile", bc = "Settings", Sc = "Chat history", wc = "About", Tc = "Type your question here", _c = "{{clipboard}}", Ic = `Sometimes, ${Dn} hallucinates. Review important details.`, Ac = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Temporary Chat' checkbox, the corresponding chat will not be saved. If you select the 'Clipboard Access' checkbox, your clipboard content (if any) will be provided to the request.", Rc = "Default provider set to", vc = "Chat successfully deleted!", kc = {
|
4616
4627
|
PREFERENCES: {
|
4617
4628
|
TITLE: "User profile",
|
4618
4629
|
NAME: "Name",
|
@@ -4652,30 +4663,30 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4652
4663
|
INSTRUCTION: "This option adds individual statistics for each messages under their respective bubbles, such as model name, and more."
|
4653
4664
|
}
|
4654
4665
|
}, gi = () => /* @__PURE__ */ Q("div", { className: "flex items-center justify-center text-slate-300", children: [
|
4655
|
-
/* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(
|
4666
|
+
/* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(Ms, {}) }),
|
4656
4667
|
/* @__PURE__ */ Q("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
4657
4668
|
/* @__PURE__ */ h("h1", { children: Dn }),
|
4658
4669
|
/* @__PURE__ */ h("h2", { children: fi })
|
4659
4670
|
] })
|
4660
4671
|
] }), yi = () => {
|
4661
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } = pn(), [n, a] = Ee(""), [
|
4672
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = pn(), [n, a] = Ee(""), [o, s] = Ee(""), [i, c] = Ee(!0), [m, f] = Ee({
|
4662
4673
|
username: "",
|
4663
4674
|
password: ""
|
4664
4675
|
}), u = async (l) => {
|
4665
|
-
l.preventDefault(), await e(m.username, m.password) || (
|
4676
|
+
l.preventDefault(), await e(m.username, m.password) || (s(""), a("Invalid username or password"));
|
4666
4677
|
};
|
4667
|
-
return
|
4678
|
+
return oe(() => {
|
4668
4679
|
var l;
|
4669
4680
|
(l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
|
4670
4681
|
var d;
|
4671
4682
|
(d = document.getElementById("root")) == null || d.classList.replace("app-hidden", "fadeIn");
|
4672
4683
|
}, 500);
|
4673
|
-
}),
|
4674
|
-
t &&
|
4684
|
+
}), oe(() => {
|
4685
|
+
t && s(t);
|
4675
4686
|
}, [t]), /* @__PURE__ */ h(at, { children: /* @__PURE__ */ Q(
|
4676
|
-
|
4687
|
+
Gs,
|
4677
4688
|
{
|
4678
|
-
className:
|
4689
|
+
className: fs({
|
4679
4690
|
extraClass: "mt-5"
|
4680
4691
|
}),
|
4681
4692
|
noMargin: !0,
|
@@ -4684,16 +4695,16 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4684
4695
|
/* @__PURE__ */ h(
|
4685
4696
|
"div",
|
4686
4697
|
{
|
4687
|
-
className:
|
4698
|
+
className: us({
|
4688
4699
|
extraClass: "rounded-md"
|
4689
4700
|
}),
|
4690
4701
|
children: /* @__PURE__ */ h(gi, {})
|
4691
4702
|
}
|
4692
4703
|
),
|
4693
|
-
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(
|
4694
|
-
/* @__PURE__ */ h(_e, { span: 12, className: "mt-7", children:
|
4704
|
+
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(Fs, { alignHorizontal: "center", children: /* @__PURE__ */ h(_e, { span: 6, children: /* @__PURE__ */ Q(Us, { mode: "dark", children: [
|
4705
|
+
/* @__PURE__ */ h(_e, { span: 12, className: "mt-7", children: o && /* @__PURE__ */ h("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
4695
4706
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h(
|
4696
|
-
|
4707
|
+
sr,
|
4697
4708
|
{
|
4698
4709
|
className: "mt-7",
|
4699
4710
|
required: !0,
|
@@ -4731,7 +4742,7 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4731
4742
|
focusMode: "light",
|
4732
4743
|
mode: "dark",
|
4733
4744
|
label: i ? "Show" : "Hide",
|
4734
|
-
children: i ? /* @__PURE__ */ h(
|
4745
|
+
children: i ? /* @__PURE__ */ h(Vs, {}) : /* @__PURE__ */ h(Hs, {})
|
4735
4746
|
}
|
4736
4747
|
),
|
4737
4748
|
onMaskChange: c,
|
@@ -4757,7 +4768,7 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4757
4768
|
children: hi
|
4758
4769
|
}
|
4759
4770
|
) }),
|
4760
|
-
!
|
4771
|
+
!hs() && /* @__PURE__ */ Q(at, { children: [
|
4761
4772
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
4762
4773
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h(
|
4763
4774
|
ct,
|
@@ -4769,7 +4780,7 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4769
4780
|
className: "mb-4",
|
4770
4781
|
labelRight: mi,
|
4771
4782
|
onClick: r,
|
4772
|
-
children: /* @__PURE__ */ h(
|
4783
|
+
children: /* @__PURE__ */ h(Ks, { size: "size-7" })
|
4773
4784
|
}
|
4774
4785
|
) })
|
4775
4786
|
] })
|
@@ -4779,7 +4790,7 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4779
4790
|
) });
|
4780
4791
|
}, Ei = new URL(document.location.href).searchParams, Hr = !!Ei.get("debug") || !1, bi = Kn(() => import(
|
4781
4792
|
/* webpackChunkName: "LazyApp" */
|
4782
|
-
"./App.
|
4793
|
+
"./App.CtGR4dYy.js"
|
4783
4794
|
).then((e) => e.App)), Kr = ({
|
4784
4795
|
isComponent: e,
|
4785
4796
|
headerHeight: t
|
@@ -4789,8 +4800,8 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4789
4800
|
}, Si = ({
|
4790
4801
|
isComponent: e = !1,
|
4791
4802
|
headerHeight: t = 0,
|
4792
|
-
domain: r =
|
4793
|
-
}) => (
|
4803
|
+
domain: r = ds
|
4804
|
+
}) => (es(), Rn ? /* @__PURE__ */ h(
|
4794
4805
|
Ir,
|
4795
4806
|
{
|
4796
4807
|
clientId: Ar,
|
@@ -4799,7 +4810,7 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4799
4810
|
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
4800
4811
|
children: /* @__PURE__ */ h(Kr, { isComponent: e, headerHeight: t })
|
4801
4812
|
}
|
4802
|
-
) : /* @__PURE__ */ h(Ir, { clientId: Ar, domain: r, debug: Hr, children: /* @__PURE__ */ h(Kr, { isComponent: e, headerHeight: t }) })),
|
4813
|
+
) : /* @__PURE__ */ h(Ir, { clientId: Ar, domain: r, debug: Hr, children: /* @__PURE__ */ h(Kr, { isComponent: e, headerHeight: t }) })), Cc = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
|
4803
4814
|
Si,
|
4804
4815
|
{
|
4805
4816
|
isComponent: !0,
|
@@ -4808,75 +4819,77 @@ const fi = "ASK! ME! ANYTHING!", Dn = "Callisto", hi = "Log in", mi = "Sign in w
|
|
4808
4819
|
}
|
4809
4820
|
);
|
4810
4821
|
export {
|
4811
|
-
|
4822
|
+
wc as ABOUT_TITLE,
|
4812
4823
|
Vi as ACTION_RESET_PROMPT,
|
4813
4824
|
Mi as ACTION_SEARCH,
|
4814
4825
|
Hi as ACTION_SORT,
|
4815
4826
|
Ki as ACTION_TOGGLE_PROMPT,
|
4816
4827
|
Dn as APP_NAME,
|
4817
4828
|
kn as C,
|
4818
|
-
|
4819
|
-
|
4829
|
+
kc as CARDS,
|
4830
|
+
_c as CLIPBOARD_PROMPT,
|
4820
4831
|
Li as DEFAULT_AI_PROVIDER,
|
4821
4832
|
Xi as DEFAULT_ICON_ACTION_SIZE,
|
4822
4833
|
Di as ERROR_MESSAGE,
|
4823
|
-
|
4824
|
-
|
4834
|
+
Ic as FOOTER_DISCLAIMER,
|
4835
|
+
Sc as HISTORY_TITLE,
|
4825
4836
|
yt as I,
|
4826
|
-
|
4837
|
+
Gs as I$1,
|
4827
4838
|
ji as INFINITE_SCROLL_LIMIT,
|
4828
4839
|
Yi as INFINITE_SCROLL_THRESHOLD,
|
4829
|
-
|
4830
|
-
|
4840
|
+
Tc as INPUT_PLACEHOLDER_TEXT,
|
4841
|
+
Fs as L,
|
4831
4842
|
Gi as LOCAL_STORAGE_CHAT_DETAILS,
|
4832
4843
|
Wi as LOCAL_STORAGE_PREFIX,
|
4833
4844
|
Ji as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
4834
4845
|
Bi as LOCAL_STORAGE_SEARCH,
|
4835
4846
|
Fi as LOCAL_STORAGE_SORT,
|
4836
|
-
|
4847
|
+
yc as LOG_OUT,
|
4837
4848
|
gi as Logo,
|
4838
4849
|
xe as M,
|
4839
|
-
|
4840
|
-
|
4850
|
+
Ec as PROFILE_TITLE,
|
4851
|
+
Ac as PROMPTS_DESCRIPTION,
|
4841
4852
|
qi as PROMPT_CLASSNAME,
|
4842
4853
|
zi as PROMPT_EDITABLE_AREA_CLASSNAME,
|
4843
4854
|
Ui as PROVIDER_ANTHROPIC,
|
4844
4855
|
$i as PROVIDER_OPENAI,
|
4845
|
-
|
4856
|
+
Us as R,
|
4846
4857
|
xi as ROLE_ASSISTANT,
|
4847
4858
|
Pi as ROLE_INTERNAL,
|
4848
4859
|
Oi as ROLE_USER,
|
4849
4860
|
Be as SERVICE_TYPES,
|
4850
|
-
|
4851
|
-
|
4852
|
-
|
4853
|
-
|
4861
|
+
bc as SETTINGS_TITLE,
|
4862
|
+
Cc as SassySaint,
|
4863
|
+
vc as TOAST_CHAT_DELETED,
|
4864
|
+
Rc as TOAST_PROVIDER_CHANGED,
|
4854
4865
|
Zi as UI_BUTTON_SCROLL_BUFFER,
|
4855
4866
|
ec as UI_DEFAULT_MAIN_HEIGHT,
|
4856
4867
|
Qi as UI_FOOTER_BUFFER,
|
4857
|
-
|
4858
|
-
|
4859
|
-
|
4860
|
-
|
4868
|
+
pc as convertCamelCaseToReadable,
|
4869
|
+
hc as debounce,
|
4870
|
+
uc as durationFormatter,
|
4871
|
+
sr as fe,
|
4861
4872
|
ic as getCurrentGeoLocation,
|
4862
|
-
|
4863
|
-
|
4864
|
-
|
4865
|
-
|
4873
|
+
fs as getMainPaddingClass,
|
4874
|
+
us as getMessageContaintWrapperClass,
|
4875
|
+
hs as isElectron,
|
4876
|
+
mc as isProbablyiPhone,
|
4866
4877
|
_e as j,
|
4867
|
-
|
4868
|
-
|
4878
|
+
Ks as l,
|
4879
|
+
cc as obfuscate,
|
4880
|
+
fc as pluralize,
|
4869
4881
|
ct as re,
|
4870
|
-
|
4871
|
-
|
4882
|
+
dc as renderDataAsList,
|
4883
|
+
Xo as serverUrl,
|
4872
4884
|
zt as serviceCall,
|
4873
4885
|
tc as setNewProvider,
|
4874
|
-
|
4886
|
+
gc as toastOptions,
|
4875
4887
|
pn as un,
|
4888
|
+
lc as unObfuscate,
|
4876
4889
|
ac as useChatsHistory,
|
4877
|
-
|
4878
|
-
|
4879
|
-
|
4890
|
+
oc as usePreloadChatsHistory,
|
4891
|
+
zo as useSWR,
|
4892
|
+
sc as useServerCapabilities,
|
4880
4893
|
nc as useUserChatStats,
|
4881
4894
|
rc as useUserPreferences
|
4882
4895
|
};
|