@versini/sassysaint 4.3.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
1
  import { jsx as c, jsxs as I, Fragment as le } from "react/jsx-runtime";
2
- import V, { createContext as rr, useReducer as ft, useRef as G, useCallback as z, useEffect as j, useContext as yt, useSyncExternalStore as ar, useId as bt, useMemo as Et, useState as J, useLayoutEffect as nr, lazy as wt, Suspense as Tt } from "react";
2
+ import V, { createContext as rr, useReducer as ft, useRef as G, useCallback as j, useEffect as z, useContext as yt, useSyncExternalStore as ar, useId as bt, useMemo as Et, useState as J, useLayoutEffect as nr, lazy as wt, Suspense as Tt } from "react";
3
3
  import f from "clsx";
4
4
  var or = Object.defineProperty, sr = (e, t, r) => t in e ? or(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Le = (e, t, r) => sr(e, typeof t != "symbol" ? t + "" : t, r);
5
5
  /*!
6
- @versini/auth-provider v7.3.0
6
+ @versini/auth-provider v7.3.1
7
7
  © 2024 gizmette.com
8
8
  */
9
9
  try {
10
10
  window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
11
- version: "7.3.0",
12
- buildTime: "09/01/2024 05:46 PM EDT",
11
+ version: "7.3.1",
12
+ buildTime: "09/05/2024 04:25 PM EDT",
13
13
  homepage: "https://github.com/aversini/auth-client",
14
14
  license: "MIT"
15
15
  });
@@ -22,24 +22,24 @@ function L(e) {
22
22
  r += String.fromCharCode(a);
23
23
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
24
24
  }
25
- function Se(e) {
25
+ function ve(e) {
26
26
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, a = t.padEnd(t.length + r, "="), n = atob(a), o = new ArrayBuffer(n.length), s = new Uint8Array(o);
27
27
  for (let i = 0; i < n.length; i++)
28
28
  s[i] = n.charCodeAt(i);
29
29
  return o;
30
30
  }
31
- function ze() {
31
+ function je() {
32
32
  return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
33
33
  }
34
34
  function It(e) {
35
35
  const { id: t } = e;
36
36
  return {
37
37
  ...e,
38
- id: Se(t),
38
+ id: ve(t),
39
39
  transports: e.transports
40
40
  };
41
41
  }
42
- function St(e) {
42
+ function vt(e) {
43
43
  return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
44
44
  }
45
45
  let _ = class extends Error {
@@ -97,7 +97,7 @@ function ir({ error: e, options: t }) {
97
97
  });
98
98
  if (e.name === "SecurityError") {
99
99
  const o = window.location.hostname;
100
- if (St(o)) {
100
+ if (vt(o)) {
101
101
  if (r.rp.id !== o)
102
102
  return new _({
103
103
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
@@ -141,25 +141,25 @@ class cr {
141
141
  }
142
142
  }
143
143
  }
144
- const vt = new cr(), lr = ["cross-platform", "platform"];
144
+ const St = new cr(), lr = ["cross-platform", "platform"];
145
145
  function At(e) {
146
146
  if (e && !(lr.indexOf(e) < 0))
147
147
  return e;
148
148
  }
149
149
  async function dr(e) {
150
150
  var m;
151
- if (!ze())
151
+ if (!je())
152
152
  throw new Error("WebAuthn is not supported in this browser");
153
153
  const t = { publicKey: {
154
154
  ...e,
155
- challenge: Se(e.challenge),
155
+ challenge: ve(e.challenge),
156
156
  user: {
157
157
  ...e.user,
158
- id: Se(e.user.id)
158
+ id: ve(e.user.id)
159
159
  },
160
160
  excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(It)
161
161
  } };
162
- t.signal = vt.createNewAbortSignal();
162
+ t.signal = St.createNewAbortSignal();
163
163
  let r;
164
164
  try {
165
165
  r = await navigator.credentials.create(t);
@@ -214,7 +214,7 @@ function Me(e, t) {
214
214
  `, t);
215
215
  }
216
216
  function ur() {
217
- if (!ze())
217
+ if (!je())
218
218
  return new Promise((t) => t(!1));
219
219
  const e = window.PublicKeyCredential;
220
220
  return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
@@ -239,7 +239,7 @@ function mr({ error: e, options: t }) {
239
239
  });
240
240
  if (e.name === "SecurityError") {
241
241
  const a = window.location.hostname;
242
- if (St(a)) {
242
+ if (vt(a)) {
243
243
  if (r.rpId !== a)
244
244
  return new _({
245
245
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
@@ -262,13 +262,13 @@ function mr({ error: e, options: t }) {
262
262
  }
263
263
  async function hr(e, t = !1) {
264
264
  var m, l;
265
- if (!ze())
265
+ if (!je())
266
266
  throw new Error("WebAuthn is not supported in this browser");
267
267
  let r;
268
268
  ((m = e.allowCredentials) == null ? void 0 : m.length) !== 0 && (r = (l = e.allowCredentials) == null ? void 0 : l.map(It));
269
269
  const a = {
270
270
  ...e,
271
- challenge: Se(e.challenge),
271
+ challenge: ve(e.challenge),
272
272
  allowCredentials: r
273
273
  }, n = {};
274
274
  if (t) {
@@ -278,7 +278,7 @@ async function hr(e, t = !1) {
278
278
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
279
279
  n.mediation = "conditional", a.allowCredentials = [];
280
280
  }
281
- n.publicKey = a, n.signal = vt.createNewAbortSignal();
281
+ n.publicKey = a, n.signal = St.createNewAbortSignal();
282
282
  let o;
283
283
  try {
284
284
  o = await navigator.credentials.get(n);
@@ -304,13 +304,13 @@ async function hr(e, t = !1) {
304
304
  };
305
305
  }
306
306
  /*!
307
- @versini/auth-common v4.1.0
307
+ @versini/auth-common v4.1.1
308
308
  © 2024 gizmette.com
309
309
  */
310
310
  try {
311
311
  window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
312
- version: "4.1.0",
313
- buildTime: "09/01/2024 05:46 PM EDT",
312
+ version: "4.1.1",
313
+ buildTime: "09/05/2024 04:25 PM EDT",
314
314
  homepage: "https://github.com/aversini/auth-client",
315
315
  license: "MIT"
316
316
  });
@@ -532,7 +532,7 @@ const rt = (e, ...t) => Rt("Key must be ", e, ...t);
532
532
  function Nt(e, t, ...r) {
533
533
  return Rt(`Key for the ${e} algorithm must be `, t, ...r);
534
534
  }
535
- const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ve = ["CryptoKey"], Ir = (...e) => {
535
+ const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Se = ["CryptoKey"], Ir = (...e) => {
536
536
  const t = e.filter(Boolean);
537
537
  if (t.length === 0 || t.length === 1)
538
538
  return !0;
@@ -551,11 +551,11 @@ const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
551
551
  }
552
552
  return !0;
553
553
  };
554
- function Sr(e) {
554
+ function vr(e) {
555
555
  return typeof e == "object" && e !== null;
556
556
  }
557
557
  function Ae(e) {
558
- if (!Sr(e) || Object.prototype.toString.call(e) !== "[object Object]")
558
+ if (!vr(e) || Object.prototype.toString.call(e) !== "[object Object]")
559
559
  return !1;
560
560
  if (Object.getPrototypeOf(e) === null)
561
561
  return !0;
@@ -564,7 +564,7 @@ function Ae(e) {
564
564
  t = Object.getPrototypeOf(t);
565
565
  return Object.getPrototypeOf(e) === t;
566
566
  }
567
- const vr = (e, t) => {
567
+ const Sr = (e, t) => {
568
568
  if (e.startsWith("RS") || e.startsWith("PS")) {
569
569
  const { modulusLength: r } = t.algorithm;
570
570
  if (typeof r != "number" || r < 2048)
@@ -754,13 +754,13 @@ async function Or(e, t, r) {
754
754
  const we = (e) => e == null ? void 0 : e[Symbol.toStringTag], Pr = (e, t) => {
755
755
  if (!(t instanceof Uint8Array)) {
756
756
  if (!xt(t))
757
- throw new TypeError(Nt(e, t, ...ve, "Uint8Array"));
757
+ throw new TypeError(Nt(e, t, ...Se, "Uint8Array"));
758
758
  if (t.type !== "secret")
759
759
  throw new TypeError(`${we(t)} instances for symmetric algorithms must be of type "secret"`);
760
760
  }
761
761
  }, Dr = (e, t, r) => {
762
762
  if (!xt(t))
763
- throw new TypeError(Nt(e, t, ...ve));
763
+ throw new TypeError(Nt(e, t, ...Se));
764
764
  if (t.type === "secret")
765
765
  throw new TypeError(`${we(t)} instances for asymmetric algorithms must not be of type "secret"`);
766
766
  if (t.algorithm && r === "verify" && t.type === "private")
@@ -825,14 +825,14 @@ async function Hr(e, t, r) {
825
825
  return Tr(t, e, r), t;
826
826
  if (t instanceof Uint8Array) {
827
827
  if (!e.startsWith("HS"))
828
- throw new TypeError(rt(t, ...ve));
828
+ throw new TypeError(rt(t, ...Se));
829
829
  return Ne.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
830
830
  }
831
- throw new TypeError(rt(t, ...ve, "Uint8Array"));
831
+ throw new TypeError(rt(t, ...Se, "Uint8Array"));
832
832
  }
833
833
  const Kr = async (e, t, r, a) => {
834
834
  const n = await Hr(e, t, "verify");
835
- vr(e, n);
835
+ Sr(e, n);
836
836
  const o = Ur(e, n.algorithm);
837
837
  try {
838
838
  return await Ne.subtle.verify(o, n, r, a);
@@ -912,7 +912,7 @@ async function Wr(e, t, r) {
912
912
  const i = await Br({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
913
913
  return typeof t == "function" ? { ...u, key: i.key } : u;
914
914
  }
915
- const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t * 24, Vr = je * 7, Yr = je * 365.25, Jr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, nt = (e) => {
915
+ const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, ze = $t * 24, Vr = ze * 7, Yr = ze * 365.25, Jr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, nt = (e) => {
916
916
  const t = Jr.exec(e);
917
917
  if (!t || t[4] && t[1])
918
918
  throw new TypeError("Invalid time period format");
@@ -943,7 +943,7 @@ const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
943
943
  case "day":
944
944
  case "days":
945
945
  case "d":
946
- n = Math.round(r * je);
946
+ n = Math.round(r * ze);
947
947
  break;
948
948
  case "week":
949
949
  case "weeks":
@@ -955,7 +955,7 @@ const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
955
955
  break;
956
956
  }
957
957
  return t[1] === "-" || t[4] === "ago" ? -n : n;
958
- }, ot = (e) => e.toLowerCase().replace(/^application\//, ""), Fr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, zr = (e, t, r = {}) => {
958
+ }, ot = (e) => e.toLowerCase().replace(/^application\//, ""), Fr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, jr = (e, t, r = {}) => {
959
959
  let a;
960
960
  try {
961
961
  a = JSON.parse(de.decode(t));
@@ -1015,12 +1015,12 @@ const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
1015
1015
  }
1016
1016
  return a;
1017
1017
  };
1018
- async function jr(e, t, r) {
1018
+ async function zr(e, t, r) {
1019
1019
  var a;
1020
1020
  const n = await Wr(e, t, r);
1021
1021
  if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
1022
1022
  throw new W("JWTs MUST NOT use unencoded payload");
1023
- const o = { payload: zr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1023
+ const o = { payload: jr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1024
1024
  return typeof t == "function" ? { ...o, key: n.key } : o;
1025
1025
  }
1026
1026
  const qr = ie;
@@ -1053,7 +1053,7 @@ function Qr(e) {
1053
1053
  const ce = async (e) => {
1054
1054
  try {
1055
1055
  const t = k.ALG, r = await Or(pr, t);
1056
- return await jr(e, r, {
1056
+ return await zr(e, r, {
1057
1057
  issuer: k.ISSUER
1058
1058
  });
1059
1059
  } catch {
@@ -1066,11 +1066,11 @@ const ce = async (e) => {
1066
1066
  return;
1067
1067
  }
1068
1068
  };
1069
- var S = [];
1069
+ var v = [];
1070
1070
  for (var Be = 0; Be < 256; ++Be)
1071
- S.push((Be + 256).toString(16).slice(1));
1071
+ v.push((Be + 256).toString(16).slice(1));
1072
1072
  function Zr(e, t = 0) {
1073
- return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
1073
+ return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
1074
1074
  }
1075
1075
  var pe, ea = new Uint8Array(16);
1076
1076
  function ta() {
@@ -1122,7 +1122,7 @@ function ge({
1122
1122
  key: e,
1123
1123
  initialValue: t
1124
1124
  }) {
1125
- const r = ar(ca, () => dt(e)), a = z(
1125
+ const r = ar(ca, () => dt(e)), a = j(
1126
1126
  (s) => {
1127
1127
  try {
1128
1128
  const i = typeof s == "function" ? s(JSON.parse(r)) : s;
@@ -1132,12 +1132,12 @@ function ge({
1132
1132
  }
1133
1133
  },
1134
1134
  [e, r]
1135
- ), n = z(() => {
1135
+ ), n = j(() => {
1136
1136
  a(t);
1137
- }, [t, a]), o = z(() => {
1137
+ }, [t, a]), o = j(() => {
1138
1138
  a(null);
1139
1139
  }, [a]);
1140
- return j(() => {
1140
+ return z(() => {
1141
1141
  try {
1142
1142
  dt(e) === null && typeof t < "u" && lt(e, t);
1143
1143
  } catch (s) {
@@ -1145,11 +1145,11 @@ function ge({
1145
1145
  }
1146
1146
  }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
1147
1147
  }
1148
- var v = [];
1148
+ var S = [];
1149
1149
  for (var We = 0; We < 256; ++We)
1150
- v.push((We + 256).toString(16).slice(1));
1150
+ S.push((We + 256).toString(16).slice(1));
1151
1151
  function la(e, t = 0) {
1152
- return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
1152
+ return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
1153
1153
  }
1154
1154
  var fe, da = new Uint8Array(16);
1155
1155
  function ua() {
@@ -1528,7 +1528,7 @@ class Ia {
1528
1528
  };
1529
1529
  }
1530
1530
  }
1531
- const Sa = (e) => z(
1531
+ const va = (e) => j(
1532
1532
  (...t) => {
1533
1533
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
1534
1534
  },
@@ -1546,7 +1546,7 @@ const Sa = (e) => z(
1546
1546
  loginWithPasskey: re,
1547
1547
  logoutReason: "",
1548
1548
  authenticationType: ""
1549
- }), va = V.createContext({
1549
+ }), Sa = V.createContext({
1550
1550
  state: Wt,
1551
1551
  dispatch: () => {
1552
1552
  }
@@ -1577,7 +1577,7 @@ const Sa = (e) => z(
1577
1577
  const [o, s] = ft(Aa, {
1578
1578
  ...Wt,
1579
1579
  debug: n
1580
- }), i = Sa(n), u = G(!1), [h, p, , m] = ge({
1580
+ }), i = va(n), u = G(!1), [h, p, , m] = ge({
1581
1581
  key: `${ye}::${r}::@@user@@`
1582
1582
  }), [l, d, , y] = ge({
1583
1583
  key: `${ye}::${r}::@@access@@`
@@ -1587,7 +1587,7 @@ const Sa = (e) => z(
1587
1587
  }
1588
1588
  ), [U, H, , O] = ge({
1589
1589
  key: `${ye}::${r}::@@nonce@@`
1590
- }), oe = new Ia(l, E), P = z(() => {
1590
+ }), oe = new Ia(l, E), P = j(() => {
1591
1591
  i("removeLocalStorage: removing local storage"), m(), y(), w(), O();
1592
1592
  }, [
1593
1593
  y,
@@ -1595,7 +1595,7 @@ const Sa = (e) => z(
1595
1595
  O,
1596
1596
  w,
1597
1597
  i
1598
- ]), N = z(
1598
+ ]), N = j(
1599
1599
  (g) => {
1600
1600
  i(
1601
1601
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
@@ -1608,7 +1608,7 @@ const Sa = (e) => z(
1608
1608
  }), P(), s({ type: se, payload: { isLoading: !1 } });
1609
1609
  },
1610
1610
  [P, i]
1611
- ), x = z(
1611
+ ), x = j(
1612
1612
  async (g) => {
1613
1613
  i("invalidateAndLogout: invalidating and logging out");
1614
1614
  const { user: T } = o, b = (T == null ? void 0 : T.userId) || ya(h);
@@ -1623,7 +1623,7 @@ const Sa = (e) => z(
1623
1623
  },
1624
1624
  [h, o, r, a, N, i]
1625
1625
  );
1626
- j(() => {
1626
+ z(() => {
1627
1627
  if (!u.current)
1628
1628
  return o.isLoading && h !== null ? (async () => {
1629
1629
  try {
@@ -1812,7 +1812,7 @@ const Sa = (e) => z(
1812
1812
  }
1813
1813
  return !1;
1814
1814
  };
1815
- return /* @__PURE__ */ c(va.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ c(
1815
+ return /* @__PURE__ */ c(Sa.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ c(
1816
1816
  Gt.Provider,
1817
1817
  {
1818
1818
  value: {
@@ -1971,7 +1971,7 @@ function Io({
1971
1971
  );
1972
1972
  return t(a ? a / r.length : 0);
1973
1973
  }
1974
- const So = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, vo = new Intl.NumberFormat("en", {
1974
+ const vo = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, So = new Intl.NumberFormat("en", {
1975
1975
  style: "decimal",
1976
1976
  signDisplay: "never",
1977
1977
  minimumFractionDigits: 0,
@@ -2177,7 +2177,7 @@ const So = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2177
2177
  "w-full": s,
2178
2178
  "disabled:cursor-not-allowed disabled:opacity-50": o
2179
2179
  }
2180
- )), za = (e, t, r) => {
2180
+ )), ja = (e, t, r) => {
2181
2181
  var a;
2182
2182
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
2183
2183
  }, Xe = V.forwardRef(
@@ -2188,7 +2188,7 @@ const So = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2188
2188
  {
2189
2189
  ref: t,
2190
2190
  onClick: (o) => {
2191
- za(o, a, r);
2191
+ ja(o, a, r);
2192
2192
  },
2193
2193
  ...n
2194
2194
  }
@@ -2300,7 +2300,7 @@ const Ft = V.forwardRef(
2300
2300
  }
2301
2301
  );
2302
2302
  Ft.displayName = "Button";
2303
- function ja(e) {
2303
+ function za(e) {
2304
2304
  const t = bt();
2305
2305
  return `${e}${t}`;
2306
2306
  }
@@ -2370,7 +2370,7 @@ const Xa = ({
2370
2370
  ...l
2371
2371
  }) => {
2372
2372
  let d = null, y = null;
2373
- const E = typeof e == "string", R = ja(Ie), w = qa({
2373
+ const E = typeof e == "string", R = za(Ie), w = qa({
2374
2374
  className: o,
2375
2375
  headerClassName: t,
2376
2376
  bodyClassName: s,
@@ -2436,13 +2436,13 @@ const Xa = ({
2436
2436
  return /* @__PURE__ */ c("main", { className: n, children: e });
2437
2437
  };
2438
2438
  /*!
2439
- @versini/ui-components v5.21.2
2439
+ @versini/ui-components v5.21.3
2440
2440
  © 2024 gizmette.com
2441
2441
  */
2442
2442
  try {
2443
2443
  window.__VERSINI_UI_GLOBAL__ || (window.__VERSINI_UI_GLOBAL__ = {
2444
- version: "5.21.2",
2445
- buildTime: "08/25/2024 02:12 PM EDT",
2444
+ version: "5.21.3",
2445
+ buildTime: "09/05/2024 01:34 PM EDT",
2446
2446
  homepage: "https://github.com/aversini/ui-components",
2447
2447
  license: "MIT"
2448
2448
  });
@@ -2456,7 +2456,34 @@ function tn(e) {
2456
2456
  });
2457
2457
  }, e);
2458
2458
  }
2459
- function rn(e) {
2459
+ function rn() {
2460
+ const e = G(!1);
2461
+ return z(() => (e.current = !0, () => {
2462
+ e.current = !1;
2463
+ }), []), j(() => e.current, []);
2464
+ }
2465
+ const an = {
2466
+ x: 0,
2467
+ y: 0,
2468
+ width: 0,
2469
+ height: 0,
2470
+ top: 0,
2471
+ left: 0,
2472
+ bottom: 0,
2473
+ right: 0
2474
+ };
2475
+ function nn(e) {
2476
+ const t = rn(), r = G(0), a = G(null), [n, o] = J(an), s = Et(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
2477
+ const u = i[0];
2478
+ u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2479
+ a.current && t() && o(u.contentRect);
2480
+ }));
2481
+ }), [t]);
2482
+ return z(() => (a.current && (s == null || s.observe(a.current, e)), () => {
2483
+ s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
2484
+ }), [s, e]), [a, n];
2485
+ }
2486
+ function on(e) {
2460
2487
  const t = bt();
2461
2488
  if (!e)
2462
2489
  return t;
@@ -2467,7 +2494,7 @@ function rn(e) {
2467
2494
  return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
2468
2495
  }
2469
2496
  }
2470
- const zt = "SET_ANNOUNCEMENT", jt = "CLEAR_ANNOUNCEMENT", an = {
2497
+ const jt = "SET_ANNOUNCEMENT", zt = "CLEAR_ANNOUNCEMENT", sn = {
2471
2498
  alert: null,
2472
2499
  alertdialog: null,
2473
2500
  log: "polite",
@@ -2475,14 +2502,14 @@ const zt = "SET_ANNOUNCEMENT", jt = "CLEAR_ANNOUNCEMENT", an = {
2475
2502
  progressbar: null,
2476
2503
  status: "polite",
2477
2504
  timer: "assertive"
2478
- }, nn = (e, t) => {
2505
+ }, cn = (e, t) => {
2479
2506
  switch (t == null ? void 0 : t.type) {
2480
- case zt:
2507
+ case jt:
2481
2508
  return {
2482
2509
  ...e,
2483
2510
  announcement: t.payload
2484
2511
  };
2485
- case jt:
2512
+ case zt:
2486
2513
  return {
2487
2514
  ...e,
2488
2515
  announcement: null
@@ -2490,12 +2517,12 @@ const zt = "SET_ANNOUNCEMENT", jt = "CLEAR_ANNOUNCEMENT", an = {
2490
2517
  default:
2491
2518
  return e;
2492
2519
  }
2493
- }, on = ({
2520
+ }, ln = ({
2494
2521
  onAnnouncementClear: e,
2495
2522
  dispatch: t
2496
2523
  }) => {
2497
2524
  t({
2498
- type: jt
2525
+ type: zt
2499
2526
  }), typeof e == "function" && e();
2500
2527
  }, pt = ({
2501
2528
  children: e,
@@ -2505,16 +2532,16 @@ const zt = "SET_ANNOUNCEMENT", jt = "CLEAR_ANNOUNCEMENT", an = {
2505
2532
  dispatch: n
2506
2533
  }) => {
2507
2534
  (r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
2508
- type: zt,
2535
+ type: jt,
2509
2536
  payload: e
2510
2537
  }), t && (r.current = setTimeout(
2511
- () => on({
2538
+ () => ln({
2512
2539
  onAnnouncementClear: a,
2513
2540
  dispatch: n
2514
2541
  }),
2515
2542
  t
2516
2543
  ));
2517
- }, sn = ({
2544
+ }, dn = ({
2518
2545
  children: e,
2519
2546
  announcementTimeoutRef: t,
2520
2547
  announcementDelay: r,
@@ -2548,12 +2575,12 @@ function qt({
2548
2575
  visible: i,
2549
2576
  ...u
2550
2577
  }) {
2551
- const h = G(), p = G(), [m, l] = ft(nn, {
2578
+ const h = G(), p = G(), [m, l] = ft(cn, {
2552
2579
  announcement: null
2553
2580
  });
2554
2581
  let d = r;
2555
- typeof d > "u" && (d = a ? an[a] : "assertive"), j(() => {
2556
- sn({
2582
+ typeof d > "u" && (d = a ? sn[a] : "assertive"), z(() => {
2583
+ dn({
2557
2584
  announcementTimeoutRef: h,
2558
2585
  announcementDelay: n,
2559
2586
  children: e,
@@ -2583,19 +2610,19 @@ function qt({
2583
2610
  );
2584
2611
  }
2585
2612
  /*!
2586
- @versini/ui-private v1.4.7
2613
+ @versini/ui-private v1.4.8
2587
2614
  © 2024 gizmette.com
2588
2615
  */
2589
2616
  try {
2590
2617
  window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
2591
- version: "1.4.7",
2592
- buildTime: "08/07/2024 12:36 PM EDT",
2618
+ version: "1.4.8",
2619
+ buildTime: "09/06/2024 06:38 PM EDT",
2593
2620
  homepage: "https://github.com/aversini/ui-components",
2594
2621
  license: "MIT"
2595
2622
  });
2596
2623
  } catch {
2597
2624
  }
2598
- const cn = (e) => {
2625
+ const un = (e) => {
2599
2626
  let t = "";
2600
2627
  if (typeof e == "number" || typeof e == "string")
2601
2628
  t = "m-" + e;
@@ -2604,38 +2631,7 @@ const cn = (e) => {
2604
2631
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2605
2632
  }
2606
2633
  return t;
2607
- }, Qt = "av-text-input", ln = "av-text-input-wrapper", Ye = "av-text-input-helper-text", Co = "av-text-area", Oo = "av-text-area-wrapper", Po = "av-text-area-helper-text", Do = "av-text-area__control--right", $o = "av-toggle";
2608
- function dn() {
2609
- const e = G(!1);
2610
- return j(() => (e.current = !0, () => {
2611
- e.current = !1;
2612
- }), []), z(() => e.current, []);
2613
- }
2614
- const un = {
2615
- x: 0,
2616
- y: 0,
2617
- width: 0,
2618
- height: 0,
2619
- top: 0,
2620
- left: 0,
2621
- bottom: 0,
2622
- right: 0
2623
- };
2624
- function mn(e) {
2625
- const t = dn(), r = G(0), a = G(null), [n, o] = J(un), s = Et(
2626
- () => typeof window < "u" ? new ResizeObserver((i) => {
2627
- const u = i[0];
2628
- u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2629
- a.current && t() && o(u.contentRect);
2630
- }));
2631
- }) : null,
2632
- [t]
2633
- );
2634
- return j(() => (a.current && (s == null || s.observe(a.current, e)), () => {
2635
- s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
2636
- }), [s, e]), [a, n];
2637
- }
2638
- const hn = ({
2634
+ }, Qt = "av-text-input", mn = "av-text-input-wrapper", Ye = "av-text-input-helper-text", Co = "av-text-area", Oo = "av-text-area-wrapper", Po = "av-text-area-helper-text", Do = "av-text-area__control--right", $o = "av-toggle", hn = ({
2639
2635
  mode: e
2640
2636
  }) => f({
2641
2637
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
@@ -2721,9 +2717,9 @@ const hn = ({
2721
2717
  }) => {
2722
2718
  const h = r ? e : f(
2723
2719
  "relative flex w-full flex-col justify-center",
2724
- ln,
2720
+ mn,
2725
2721
  e,
2726
- cn(s)
2722
+ un(s)
2727
2723
  ), p = r ? f(t) : f(
2728
2724
  Qt,
2729
2725
  t,
@@ -2774,7 +2770,7 @@ const hn = ({
2774
2770
  spacing: R,
2775
2771
  ...w
2776
2772
  }, U) => {
2777
- const [H, O] = mn(), [oe, P] = J(0), N = rn({ id: e, prefix: `${Qt}-` }), x = `${t} error, ${y}`, D = bn({
2773
+ const [H, O] = nn(), [oe, P] = J(0), N = on({ id: e, prefix: `${Qt}-` }), x = `${t} error, ${y}`, D = bn({
2778
2774
  className: o,
2779
2775
  inputClassName: s,
2780
2776
  error: a,
@@ -2888,7 +2884,7 @@ const En = 500, wn = 5e3, Tn = 2e4, Xt = V.forwardRef(
2888
2884
  }, De = (C) => {
2889
2885
  P(), o && o(C);
2890
2886
  };
2891
- return j(() => () => {
2887
+ return z(() => () => {
2892
2888
  clearTimeout(U.current);
2893
2889
  }, []), /* @__PURE__ */ I(le, { children: [
2894
2890
  /* @__PURE__ */ c(
@@ -2928,13 +2924,13 @@ const En = 500, wn = 5e3, Tn = 2e4, Xt = V.forwardRef(
2928
2924
  );
2929
2925
  Xt.displayName = "TextInputMask";
2930
2926
  /*!
2931
- @versini/ui-form v1.3.7
2927
+ @versini/ui-form v1.3.8
2932
2928
  © 2024 gizmette.com
2933
2929
  */
2934
2930
  try {
2935
2931
  window.__VERSINI_UI_FORM__ || (window.__VERSINI_UI_FORM__ = {
2936
- version: "1.3.7",
2937
- buildTime: "08/07/2024 12:37 PM EDT",
2932
+ version: "1.3.8",
2933
+ buildTime: "09/06/2024 06:38 PM EDT",
2938
2934
  homepage: "https://github.com/aversini/ui-components",
2939
2935
  license: "MIT"
2940
2936
  });
@@ -2996,7 +2992,7 @@ try {
2996
2992
  });
2997
2993
  } catch {
2998
2994
  }
2999
- const Sn = ({
2995
+ const vn = ({
3000
2996
  className: e,
3001
2997
  viewBox: t,
3002
2998
  spacing: r,
@@ -3021,7 +3017,7 @@ const Sn = ({
3021
3017
  }
3022
3018
  ) })
3023
3019
  }
3024
- ), vn = ({
3020
+ ), Sn = ({
3025
3021
  className: e,
3026
3022
  viewBox: t,
3027
3023
  spacing: r,
@@ -3341,7 +3337,7 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3341
3337
  row1: /* @__PURE__ */ I("div", { children: [
3342
3338
  er,
3343
3339
  " v",
3344
- "4.3.0",
3340
+ "4.3.1",
3345
3341
  " - ",
3346
3342
  $n,
3347
3343
  Qe && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
@@ -3353,12 +3349,12 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3353
3349
  Cn
3354
3350
  ] })
3355
3351
  }
3356
- ), Mn = wt(() => import("./LazyHeader.rUgvWsxk.js")), Un = () => {
3352
+ ), Mn = wt(() => import("./LazyHeader.BcKwtFsD.js")), Un = () => {
3357
3353
  const { isAuthenticated: e } = qe();
3358
3354
  return /* @__PURE__ */ I(le, { children: [
3359
3355
  e && /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Mn, {}) }),
3360
3356
  /* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
3361
- /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(Sn, {}) }),
3357
+ /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(vn, {}) }),
3362
3358
  /* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3363
3359
  /* @__PURE__ */ c("h1", { children: er }),
3364
3360
  /* @__PURE__ */ c("h2", { children: xn })
@@ -3372,13 +3368,13 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3372
3368
  }), m = async (l) => {
3373
3369
  l.preventDefault(), await e(h.username, h.password) || (s(""), n("Invalid username or password"));
3374
3370
  };
3375
- return j(() => {
3371
+ return z(() => {
3376
3372
  var l;
3377
3373
  (l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
3378
3374
  var d;
3379
3375
  (d = document.getElementById("root")) == null || d.classList.replace("app-hidden", "fadeIn");
3380
3376
  }, 500);
3381
- }), j(() => {
3377
+ }), z(() => {
3382
3378
  t && s(t);
3383
3379
  }, [t]), /* @__PURE__ */ I(le, { children: [
3384
3380
  /* @__PURE__ */ I(en, { children: [
@@ -3417,7 +3413,7 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3417
3413
  focusMode: "light",
3418
3414
  name: "password",
3419
3415
  label: Dn,
3420
- rightElement: /* @__PURE__ */ c(Fe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(kn, {}) : /* @__PURE__ */ c(vn, {}) }),
3416
+ rightElement: /* @__PURE__ */ c(Fe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(kn, {}) : /* @__PURE__ */ c(Sn, {}) }),
3421
3417
  onMaskChange: u,
3422
3418
  onChange: (l) => {
3423
3419
  p({
@@ -3460,7 +3456,7 @@ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "
3460
3456
  ] }),
3461
3457
  /* @__PURE__ */ c(Ln, {})
3462
3458
  ] });
3463
- }, Kn = new URL(document.location.href).searchParams, Bn = !!Kn.get("debug") || !1, Wn = wt(() => import("./App.BjgAzPtR.js").then((e) => e.App)), Gn = ({ isComponent: e }) => {
3459
+ }, Kn = new URL(document.location.href).searchParams, Bn = !!Kn.get("debug") || !1, Wn = wt(() => import("./App.C232zHGs.js").then((e) => e.App)), Gn = ({ isComponent: e }) => {
3464
3460
  const { isAuthenticated: t } = qe();
3465
3461
  return t ? /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Wn, { isComponent: e }) }) : /* @__PURE__ */ c(Hn, {});
3466
3462
  }, Vn = ({
@@ -3482,6 +3478,8 @@ export {
3482
3478
  Jo as CARDS,
3483
3479
  Go as CLEAR,
3484
3480
  ao as ERROR_MESSAGE,
3481
+ qt as F,
3482
+ Ze as G,
3485
3483
  oo as GPT4_MAX_TOKENS,
3486
3484
  Ko as HISTORY_TITLE,
3487
3485
  go as LOCAL_STORAGE_CHAT_DETAILS,
@@ -3489,7 +3487,6 @@ export {
3489
3487
  fo as LOCAL_STORAGE_SEARCH,
3490
3488
  yo as LOCAL_STORAGE_SORT,
3491
3489
  Lo as LOG_OUT,
3492
- rn as M,
3493
3490
  no as MODEL_GPT4,
3494
3491
  Un as MessagesContainerHeader,
3495
3492
  Ro as N,
@@ -3508,9 +3505,8 @@ export {
3508
3505
  bo as STATS_SEPARATOR,
3509
3506
  Fo as SassySaint,
3510
3507
  Wo as TYPE_QUESTION,
3511
- qt as U,
3508
+ nn as V,
3512
3509
  ne as W,
3513
- Ze as Y,
3514
3510
  Po as a,
3515
3511
  gt as b,
3516
3512
  en as c,
@@ -3524,12 +3520,13 @@ export {
3524
3520
  Ua as getMessageContaintWrapperClass,
3525
3521
  Xe as i,
3526
3522
  No as i$1,
3527
- So as isLastMessageFromRole,
3528
- ae as j,
3523
+ vo as isLastMessageFromRole,
3524
+ on as j,
3525
+ ae as j$1,
3529
3526
  Do as l,
3530
3527
  Co as n,
3531
- vo as numberFormatter,
3532
- cn as o,
3528
+ So as numberFormatter,
3529
+ un as o,
3533
3530
  $o as p,
3534
3531
  ko as pluralize,
3535
3532
  qe as qr,