@versini/sassysaint 8.43.0 → 8.44.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,11 +1,11 @@
1
- import { jsxs as v, jsx as s } from "react/jsx-runtime";
2
- import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as Ne, S as $, CARDS as P, Oe as ve, C as re, PROMPTS_DESCRIPTION as we, L as _e, j as ne, getCurrentGeoLocation as Ce, handleServiceWorkerToggle as Se } from "./index.C5JI91s5.js";
3
- import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.lIa74yNL.js";
4
- import Re, { useRef as w, useState as g, useLayoutEffect as j, useMemo as de, useEffect as X, useId as Oe, useReducer as Me, useCallback as De } from "react";
1
+ import { jsxs as N, jsx as l } from "react/jsx-runtime";
2
+ import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as we, S as $, CARDS as P, Oe as Ne, C as re, PROMPTS_DESCRIPTION as ve, L as _e, j as ne, getCurrentGeoLocation as Ce, handleServiceWorkerToggle as Se } from "./index.B2mnuHfs.js";
3
+ import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.B_z-iC81.js";
4
+ import Re, { useRef as v, useState as h, useLayoutEffect as j, useMemo as de, useEffect as X, useId as Me, useReducer as Oe, useCallback as De } from "react";
5
5
  import i from "clsx";
6
6
  const ue = "av-text-area", Pe = "av-text-area-wrapper", ae = "av-text-area-helper-text", Be = "av-text-area__control--right", Ge = "av-text-area__control--left";
7
7
  function He() {
8
- const e = w(!1);
8
+ const e = v(!1);
9
9
  return X(() => (e.current = !0, () => {
10
10
  e.current = !1;
11
11
  }), []), De(() => e.current, []);
@@ -29,10 +29,10 @@ const $e = {
29
29
  right: 0
30
30
  };
31
31
  function ce(e) {
32
- const a = He(), r = w(0), o = w(null), [t, l] = g($e), c = de(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
33
- const u = d[0];
34
- u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
35
- o.current && a() && l(u.contentRect);
32
+ const a = He(), r = v(0), o = v(null), [t, s] = h($e), c = de(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
33
+ const m = d[0];
34
+ m && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
35
+ o.current && a() && s(m.contentRect);
36
36
  }));
37
37
  }), [a]);
38
38
  return X(() => (o.current && c?.observe(o.current, e), () => {
@@ -47,19 +47,19 @@ function Ve({
47
47
  },
48
48
  initialControlledDelay: t = 0
49
49
  }) {
50
- const [l, c] = g(!1), [d, u] = g(
50
+ const [s, c] = h(!1), [d, m] = h(
51
51
  a !== void 0 ? a : r
52
- ), m = (p) => {
53
- u(p), o?.(p);
52
+ ), g = (u) => {
53
+ m(u), o?.(u);
54
54
  };
55
55
  return X(() => {
56
- (async () => e !== void 0 && !l && t > 0 && (await new Promise(
57
- (p) => setTimeout(p, t)
56
+ (async () => e !== void 0 && !s && t > 0 && (await new Promise(
57
+ (u) => setTimeout(u, t)
58
58
  ), c(!0)))();
59
- }, [e, t, l]), e !== void 0 ? !l && t > 0 ? ["", o, !0] : [e, o, !0] : [d, m, !1];
59
+ }, [e, t, s]), e !== void 0 ? !s && t > 0 ? ["", o, !0] : [e, o, !0] : [d, g, !1];
60
60
  }
61
61
  function Fe(e) {
62
- const a = Oe();
62
+ const a = Me();
63
63
  if (!e)
64
64
  return a;
65
65
  if (typeof e == "number" || typeof e == "string")
@@ -122,20 +122,20 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
122
122
  announcementDelay: r,
123
123
  clearAnnouncementDelay: o,
124
124
  clearAnnouncementTimeoutRef: t,
125
- onAnnouncementClear: l,
125
+ onAnnouncementClear: s,
126
126
  dispatch: c
127
127
  }) => {
128
128
  clearTimeout(a.current), r ? a.current = setTimeout(ie, r, {
129
129
  children: e,
130
130
  clearAnnouncementDelay: o,
131
131
  clearAnnouncementTimeoutRef: t,
132
- onAnnouncementClear: l,
132
+ onAnnouncementClear: s,
133
133
  dispatch: c
134
134
  }) : ie({
135
135
  children: e,
136
136
  clearAnnouncementDelay: o,
137
137
  clearAnnouncementTimeoutRef: t,
138
- onAnnouncementClear: l,
138
+ onAnnouncementClear: s,
139
139
  dispatch: c
140
140
  });
141
141
  };
@@ -145,41 +145,41 @@ function Ye({
145
145
  politeness: r,
146
146
  role: o = null,
147
147
  announcementDelay: t,
148
- clearAnnouncementDelay: l,
148
+ clearAnnouncementDelay: s,
149
149
  onAnnouncementClear: c,
150
150
  visible: d,
151
- ...u
151
+ ...m
152
152
  }) {
153
- const m = w(null), p = w(null), [b, S] = Me(ze, {
153
+ const g = v(null), u = v(null), [b, _] = Oe(ze, {
154
154
  announcement: null
155
155
  });
156
- let _ = r;
157
- typeof _ > "u" && (_ = o ? We[o] : "assertive"), X(() => {
156
+ let C = r;
157
+ typeof C > "u" && (C = o ? We[o] : "assertive"), X(() => {
158
158
  Xe({
159
- announcementTimeoutRef: m,
159
+ announcementTimeoutRef: g,
160
160
  announcementDelay: t,
161
161
  children: e,
162
- clearAnnouncementDelay: l,
163
- clearAnnouncementTimeoutRef: p,
162
+ clearAnnouncementDelay: s,
163
+ clearAnnouncementTimeoutRef: u,
164
164
  onAnnouncementClear: c,
165
- dispatch: S
165
+ dispatch: _
166
166
  });
167
167
  }, [
168
168
  e,
169
169
  t,
170
- l,
170
+ s,
171
171
  c
172
172
  ]);
173
173
  const f = i(a, {
174
174
  "sr-only": !d
175
175
  });
176
- return /* @__PURE__ */ s(
176
+ return /* @__PURE__ */ l(
177
177
  "div",
178
178
  {
179
- "aria-live": _,
179
+ "aria-live": C,
180
180
  ...o && { role: o },
181
181
  className: f,
182
- ...u,
182
+ ...m,
183
183
  children: b.announcement
184
184
  }
185
185
  );
@@ -197,12 +197,12 @@ try {
197
197
  });
198
198
  } catch {
199
199
  }
200
- const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Ke = ({ mode: e }) => i({
200
+ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Je = ({ mode: e }) => i({
201
201
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
202
202
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
203
203
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
204
204
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
205
- }), Je = ({
205
+ }), Ke = ({
206
206
  focusMode: e
207
207
  }) => i("focus:outline focus:outline-2 focus:outline-offset-2", {
208
208
  "focus:outline-focus-dark": e === "dark",
@@ -223,7 +223,7 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
223
223
  error: r,
224
224
  mode: o,
225
225
  leftElement: t,
226
- rightElement: l
226
+ rightElement: s
227
227
  }) => {
228
228
  if (a)
229
229
  return "";
@@ -231,14 +231,14 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
231
231
  return i(
232
232
  "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
233
233
  {
234
- "translate-x-[12px]": l === !0 && !t || !l && !t
234
+ "translate-x-[12px]": s === !0 && !t || !s && !t
235
235
  }
236
236
  );
237
237
  if (!r)
238
238
  return i(
239
239
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
240
240
  {
241
- "translate-x-[12px]": l === !0 && !t || !l && !t,
241
+ "translate-x-[12px]": s === !0 && !t || !s && !t,
242
242
  "text-copy-medium": o === "dark",
243
243
  "text-copy-dark": o === "light",
244
244
  "text-copy-dark dark:text-copy-medium": o === "system",
@@ -249,7 +249,7 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
249
249
  return i(
250
250
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
251
251
  {
252
- "translate-x-[12px]": l === !0 && !t || !l && !t,
252
+ "translate-x-[12px]": s === !0 && !t || !s && !t,
253
253
  "text-copy-medium": o === "dark",
254
254
  "text-copy-error-dark": o === "light",
255
255
  "text-copy-error-dark dark:text-copy-error-light": o === "system",
@@ -289,13 +289,13 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
289
289
  raw: r,
290
290
  focusMode: o,
291
291
  disabled: t,
292
- noBorder: l,
292
+ noBorder: s,
293
293
  error: c,
294
294
  mode: d,
295
- leftElement: u,
296
- rightElement: m
295
+ leftElement: m,
296
+ rightElement: g
297
297
  }) => {
298
- const p = r ? e : i(
298
+ const u = r ? e : i(
299
299
  "relative flex w-full flex-col justify-center",
300
300
  Pe,
301
301
  e
@@ -303,22 +303,22 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
303
303
  ue,
304
304
  a,
305
305
  qe(),
306
- Ke({ mode: d }),
307
- Je({ focusMode: o }),
306
+ Je({ mode: d }),
307
+ Ke({ focusMode: o }),
308
308
  Ze({
309
- noBorder: l,
309
+ noBorder: s,
310
310
  error: c
311
311
  }),
312
312
  {
313
313
  "disabled:cursor-not-allowed disabled:opacity-50": t
314
314
  }
315
- ), S = r ? void 0 : "sr-only", _ = Qe({
315
+ ), _ = r ? void 0 : "sr-only", C = Qe({
316
316
  disabled: t,
317
317
  raw: r,
318
318
  error: c,
319
319
  mode: d,
320
- rightElement: m,
321
- leftElement: u
320
+ rightElement: g,
321
+ leftElement: m
322
322
  }), f = et({
323
323
  error: c,
324
324
  raw: r,
@@ -326,10 +326,10 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
326
326
  disabled: t
327
327
  }), I = r ? void 0 : i(Be, "absolute"), k = r ? void 0 : i(Ge, "absolute");
328
328
  return {
329
- wrapper: p,
329
+ wrapper: u,
330
330
  textArea: b,
331
- accessibleLabel: S,
332
- visibleLabel: _,
331
+ accessibleLabel: _,
332
+ visibleLabel: C,
333
333
  helperText: f,
334
334
  rightElement: I,
335
335
  leftElement: k
@@ -340,14 +340,14 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
340
340
  currentLabelOffset: r = 0,
341
341
  currentHelperTextOffset: o = 0
342
342
  }) => {
343
- let t, l;
343
+ let t, s;
344
344
  if (e > 0 && e !== a) {
345
345
  const c = e - a, d = Math.abs(c / 24);
346
- t = r + -1 * Math.sign(c) * (12 * d), l = o + Math.sign(c) * (12 * d);
346
+ t = r + -1 * Math.sign(c) * (12 * d), s = o + Math.sign(c) * (12 * d);
347
347
  }
348
348
  return {
349
349
  labelOffset: t,
350
- helperTextOffset: l,
350
+ helperTextOffset: s,
351
351
  scrollHeight: e
352
352
  };
353
353
  }, oe = Re.forwardRef(
@@ -357,109 +357,109 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
357
357
  label: r,
358
358
  error: o = !1,
359
359
  raw: t = !1,
360
- className: l,
360
+ className: s,
361
361
  textAreaClassName: c,
362
362
  mode: d = "system",
363
- focusMode: u = "system",
364
- value: m,
365
- defaultValue: p,
363
+ focusMode: m = "system",
364
+ value: g,
365
+ defaultValue: u,
366
366
  disabled: b = !1,
367
- noBorder: S = !1,
368
- labelId: _,
367
+ noBorder: _ = !1,
368
+ labelId: C,
369
369
  helperText: f = "",
370
370
  helperTextOnFocus: I = !1,
371
371
  rightElement: k,
372
- leftElement: C,
372
+ leftElement: S,
373
373
  onChange: V,
374
374
  onFocus: Y,
375
375
  onBlur: F,
376
376
  ...q
377
- }, K) => {
378
- const x = w(null), J = Ue([K, x]), [Z, G] = ce(), [Q, A] = ce(), W = w(80), z = w(-25), L = w(null), n = w(30), h = w(null), E = Fe({ id: e, prefix: `${ue}-` }), [H, R] = g(0), [y, T] = g(0), [M, U] = g(
377
+ }, J) => {
378
+ const x = v(null), K = Ue([J, x]), [Z, G] = ce(), [Q, A] = ce(), W = v(80), z = v(-25), L = v(null), n = v(30), p = v(null), E = Fe({ id: e, prefix: `${ue}-` }), [H, R] = h(0), [y, T] = h(0), [O, U] = h(
379
379
  !!(!I && f)
380
380
  ), ee = `${a} error, ${f}`, D = tt({
381
- className: l,
381
+ className: s,
382
382
  textAreaClassName: c,
383
383
  error: o,
384
384
  raw: t,
385
- focusMode: u,
385
+ focusMode: m,
386
386
  disabled: b,
387
- noBorder: S,
387
+ noBorder: _,
388
388
  mode: d,
389
389
  rightElement: !!k,
390
- leftElement: !!C
391
- }), [O, pe] = Ve({
392
- value: m,
390
+ leftElement: !!S
391
+ }), [M, pe] = Ve({
392
+ value: g,
393
393
  initialControlledDelay: 20,
394
- defaultValue: p,
395
- onChange: (N) => {
394
+ defaultValue: u,
395
+ onChange: (w) => {
396
396
  V && V({
397
397
  target: {
398
- value: N
398
+ value: w
399
399
  }
400
400
  });
401
401
  }
402
- }), he = (N) => {
403
- pe(N.target.value);
404
- }, ge = (N) => {
405
- I && f && U(!0), Y && Y(N);
406
- }, ye = (N) => {
407
- I && f && !O && U(!1), F && F(N);
402
+ }), he = (w) => {
403
+ pe(w.target.value);
404
+ }, ge = (w) => {
405
+ I && f && U(!0), Y && Y(w);
406
+ }, ye = (w) => {
407
+ I && f && !M && U(!1), F && F(w);
408
408
  };
409
409
  return j(() => {
410
410
  G && G.width && R(G.width + 18 + 10);
411
411
  }, [G]), j(() => {
412
412
  A && A.width && T(A.width + 18 + 10);
413
413
  }, [A]), j(() => {
414
- t || x && x.current && O !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
415
- }, [O, t]), j(() => {
414
+ t || x && x.current && M !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
415
+ }, [M, t]), j(() => {
416
416
  t || setTimeout(() => {
417
417
  L?.current?.style.setProperty(
418
418
  "--av-text-area-wrapper-transition",
419
- O ? "none" : "all 0.2s ease-out"
419
+ M ? "none" : "all 0.2s ease-out"
420
420
  );
421
421
  }, 0);
422
- }, [O, t]), j(() => {
423
- if (!t && x && x.current && O !== void 0) {
424
- const { labelOffset: N, helperTextOffset: te, scrollHeight: be } = rt({
422
+ }, [M, t]), j(() => {
423
+ if (!t && x && x.current && M !== void 0) {
424
+ const { labelOffset: w, helperTextOffset: te, scrollHeight: be } = rt({
425
425
  scrollHeight: x.current.scrollHeight,
426
426
  currentHeight: W.current,
427
427
  currentLabelOffset: z.current,
428
428
  currentHelperTextOffset: n.current
429
429
  });
430
- N && (z.current = N, L?.current?.style.setProperty(
430
+ w && (z.current = w, L?.current?.style.setProperty(
431
431
  "--av-text-area-label",
432
- `${N}px`
433
- )), te && (n.current = te, h?.current?.style.setProperty(
432
+ `${w}px`
433
+ )), te && (n.current = te, p?.current?.style.setProperty(
434
434
  "--av-text-area-helper-text",
435
435
  `${te}px`
436
436
  )), W.current = be || W.current;
437
437
  }
438
- }, [O, t]), A.width > 0 && L?.current?.style.setProperty(
438
+ }, [M, t]), A.width > 0 && L?.current?.style.setProperty(
439
439
  "--tw-translate-x",
440
440
  `${12 + A.width + 5}px`
441
- ), /* @__PURE__ */ v("div", { className: D.wrapper, children: [
442
- /* @__PURE__ */ s(
441
+ ), /* @__PURE__ */ N("div", { className: D.wrapper, children: [
442
+ /* @__PURE__ */ l(
443
443
  "label",
444
444
  {
445
445
  htmlFor: E,
446
- id: _,
446
+ id: C,
447
447
  className: D.accessibleLabel,
448
448
  children: r
449
449
  }
450
450
  ),
451
- C && /* @__PURE__ */ s(
451
+ S && /* @__PURE__ */ l(
452
452
  "div",
453
453
  {
454
454
  ref: Q,
455
455
  className: D.leftElement,
456
- children: C
456
+ children: S
457
457
  }
458
458
  ),
459
- /* @__PURE__ */ s(
459
+ /* @__PURE__ */ l(
460
460
  "textarea",
461
461
  {
462
- ref: J,
462
+ ref: K,
463
463
  id: E,
464
464
  name: a,
465
465
  disabled: b,
@@ -468,22 +468,22 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
468
468
  rows: 1,
469
469
  ...f && { "aria-describedby": `${E}-helper` },
470
470
  ...o && { "aria-invalid": "true" },
471
- ...k && !C && !t && { style: { paddingRight: H } },
472
- ...C && !k && !t && { style: { paddingLeft: y } },
473
- ...k && C && !t && {
471
+ ...k && !S && !t && { style: { paddingRight: H } },
472
+ ...S && !k && !t && { style: { paddingLeft: y } },
473
+ ...k && S && !t && {
474
474
  style: {
475
475
  paddingRight: H,
476
476
  paddingLeft: y
477
477
  }
478
478
  },
479
- value: O,
479
+ value: M,
480
480
  onChange: he,
481
481
  onFocus: ge,
482
482
  onBlur: ye,
483
483
  ...q
484
484
  }
485
485
  ),
486
- !t && /* @__PURE__ */ s(
486
+ !t && /* @__PURE__ */ l(
487
487
  "label",
488
488
  {
489
489
  ref: L,
@@ -493,16 +493,16 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
493
493
  children: r
494
494
  }
495
495
  ),
496
- M && /* @__PURE__ */ s(
496
+ O && /* @__PURE__ */ l(
497
497
  "div",
498
498
  {
499
- ref: h,
499
+ ref: p,
500
500
  id: `${E}-helper`,
501
501
  className: D.helperText,
502
502
  children: f
503
503
  }
504
504
  ),
505
- k && /* @__PURE__ */ s(
505
+ k && /* @__PURE__ */ l(
506
506
  "div",
507
507
  {
508
508
  ref: Z,
@@ -510,7 +510,7 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
510
510
  children: k
511
511
  }
512
512
  ),
513
- o && f && /* @__PURE__ */ s(Ye, { politeness: "polite", clearAnnouncementDelay: 500, children: ee })
513
+ o && f && /* @__PURE__ */ l(Ye, { politeness: "polite", clearAnnouncementDelay: 500, children: ee })
514
514
  ] });
515
515
  }
516
516
  );
@@ -528,7 +528,16 @@ try {
528
528
  });
529
529
  } catch {
530
530
  }
531
- const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt = ({
531
+ const at = "av-toggle", ot = ({ narrow: e }) => i(
532
+ "peer",
533
+ "rounded-full",
534
+ {
535
+ "h-6 w-11": !e,
536
+ "h-5 w-12": e
537
+ },
538
+ // Smooth background/border transition when toggling
539
+ "transition-colors duration-300 ease-in-out motion-reduce:transition-none"
540
+ ), nt = ({
532
541
  focusMode: e
533
542
  }) => i(
534
543
  "peer-focus:outline",
@@ -540,25 +549,32 @@ const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt
540
549
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
541
550
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
542
551
  }
543
- ), st = () => i(
544
- "peer-checked:after:translate-x-full",
552
+ ), st = ({ narrow: e }) => i(
553
+ {
554
+ "peer-checked:after:translate-x-full": !e,
555
+ "peer-checked:after:translate-x-4": e
556
+ },
545
557
  // background color when checked
546
558
  "peer-checked:bg-action-light",
547
559
  // knob circle and border color when checked
548
560
  "peer-checked:after:bg-white",
549
561
  "peer-checked:after:border-white"
550
- ), lt = () => i(
562
+ ), lt = ({ narrow: e }) => i(
551
563
  "after:left-[2px]",
552
564
  "after:top-[2px]",
553
565
  "after:border",
554
566
  "after:border-surface-light dark:after:border-surface-medium",
555
567
  "after:bg-surface-light dark:after:bg-surface-medium",
556
568
  "after:absolute",
557
- "after:h-5",
558
- "after:w-5",
569
+ "after:transition-all after:duration-300 after:ease-in-out after:motion-reduce:transition-none after:will-change-transform",
570
+ "after:content-['']",
559
571
  "after:rounded-full",
560
- "after:transition-all",
561
- "after:content-['']"
572
+ {
573
+ // Normal toggle knob (circle)
574
+ "after:h-5 after:w-5": !e,
575
+ // Narrow toggle knob (oval)
576
+ " after:h-4 after:w-7": e
577
+ }
562
578
  ), ct = ({
563
579
  mode: e,
564
580
  noBorder: a
@@ -585,14 +601,15 @@ const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt
585
601
  focusMode: a,
586
602
  labelHidden: r,
587
603
  className: o,
588
- noBorder: t
604
+ noBorder: t,
605
+ narrow: s
589
606
  }) => ({
590
607
  toggle: i(
591
- ot(),
608
+ ot({ narrow: s }),
592
609
  ct({ mode: e, noBorder: t }),
593
610
  nt({ focusMode: a }),
594
- lt(),
595
- st()
611
+ lt({ narrow: s }),
612
+ st({ narrow: s })
596
613
  ),
597
614
  label: it({ mode: e, labelHidden: r }),
598
615
  input: "peer sr-only",
@@ -603,43 +620,45 @@ const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt
603
620
  label: r,
604
621
  labelHidden: o = !1,
605
622
  name: t,
606
- mode: l = "system",
623
+ mode: s = "system",
607
624
  focusMode: c = "system",
608
625
  className: d,
609
- noBorder: u = !1
626
+ noBorder: m = !1,
627
+ narrow: g = !1
610
628
  }) => {
611
- const m = ut({
612
- mode: l,
629
+ const u = ut({
630
+ mode: s,
613
631
  focusMode: c,
614
632
  labelHidden: o,
615
633
  className: d,
616
- noBorder: u
617
- }), p = (b) => {
618
- a?.(b.target.checked);
634
+ noBorder: m,
635
+ narrow: g
636
+ }), b = (_) => {
637
+ a?.(_.target.checked);
619
638
  };
620
- return /* @__PURE__ */ v("label", { className: m.wrapper, children: [
621
- /* @__PURE__ */ s(
639
+ return /* @__PURE__ */ N("label", { className: u.wrapper, children: [
640
+ /* @__PURE__ */ l(
622
641
  "input",
623
642
  {
624
643
  name: t,
625
644
  checked: e,
626
645
  type: "checkbox",
627
- className: m.input,
628
- onChange: p
646
+ className: u.input,
647
+ onChange: b
629
648
  }
630
649
  ),
631
- /* @__PURE__ */ s("div", { className: m.toggle }),
632
- /* @__PURE__ */ s("span", { className: m.label, children: r })
650
+ /* @__PURE__ */ l("div", { className: u.toggle }),
651
+ /* @__PURE__ */ l("span", { className: u.label, children: r })
633
652
  ] });
634
653
  };
635
654
  /*!
636
- @versini/ui-toggle v4.0.11
655
+ @versini/ui-toggle v4.1.0
637
656
  © 2025 gizmette.com
638
657
  */
639
658
  try {
640
659
  window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
641
- version: "4.0.11",
642
- buildTime: "08/23/2025 12:22 PM EDT",
660
+ version: "4.1.0",
661
+ buildTime: "08/28/2025 02:32 PM EDT",
643
662
  homepage: "https://github.com/aversini/ui-components",
644
663
  license: "MIT"
645
664
  });
@@ -651,20 +670,20 @@ const yt = ({
651
670
  }) => {
652
671
  const { getAccessToken: r, user: o } = ke(), {
653
672
  data: t,
654
- isSuccess: l,
673
+ isSuccess: s,
655
674
  refetch: c
656
675
  } = Ie({
657
676
  user: o?.username,
658
677
  getAccessToken: r
659
- }), [d, u] = g({
678
+ }), [d, m] = h({
660
679
  loadingLocation: !1
661
- }), [m, p] = g({
680
+ }), [g, u] = h({
662
681
  prompts: []
663
- }), [b, S] = g(""), [_, f] = g(""), [I, k] = g(!1), [C, V] = g(!1), [Y, F] = g(!1), [q, K] = g(!1), [, x] = Ae({
682
+ }), [b, _] = h(""), [C, f] = h(""), [I, k] = h(!1), [S, V] = h(!1), [Y, F] = h(!1), [q, J] = h(!1), [, x] = Ae({
664
683
  key: xe + Ee,
665
684
  initialValue: !1
666
- }), J = (n) => {
667
- K(n);
685
+ }), K = (n) => {
686
+ J(n);
668
687
  }, Z = (n) => {
669
688
  k(n);
670
689
  }, G = (n) => {
@@ -680,38 +699,38 @@ const yt = ({
680
699
  params: {
681
700
  user: o?.username,
682
701
  instructions: b,
683
- location: _,
702
+ location: C,
684
703
  provider: t?.provider,
685
- tags: m.prompts,
704
+ tags: g.prompts,
686
705
  sendOnEnter: I,
687
- useMemory: C,
706
+ useMemory: S,
688
707
  showDetails: q
689
708
  }
690
- }), c(), u({
709
+ }), c(), m({
691
710
  loadingLocation: !1
692
711
  });
693
712
  } catch {
694
713
  }
695
714
  }, W = async () => {
696
- u({
715
+ m({
697
716
  loadingLocation: !0
698
717
  }), f("...");
699
718
  try {
700
- const n = Date.now(), h = await Ce(), E = await se({
719
+ const n = Date.now(), p = await Ce(), E = await se({
701
720
  accessToken: await r(),
702
721
  type: le.GET_LOCATION,
703
722
  params: {
704
- latitude: h.latitude,
705
- longitude: h.longitude
723
+ latitude: p.latitude,
724
+ longitude: p.longitude
706
725
  }
707
726
  }), R = Date.now() - n;
708
727
  if (R < 2e3 && await new Promise((y) => setTimeout(y, 2e3 - R)), E.status === 200) {
709
- const { city: y, state: T, country: M, displayName: U } = E.data, ee = y && T && M ? `${y}, ${T}, ${M}` : U;
710
- u({
728
+ const { city: y, state: T, country: O, displayName: U } = E.data, ee = y && T && O ? `${y}, ${T}, ${O}` : U;
729
+ m({
711
730
  loadingLocation: !1
712
731
  }), f(ee);
713
732
  } else
714
- u({
733
+ m({
715
734
  loadingLocation: !1
716
735
  });
717
736
  } catch {
@@ -720,46 +739,46 @@ const yt = ({
720
739
  c(), a(!1);
721
740
  }, L = ({
722
741
  enabled: n = !1,
723
- privateChat: h = !1,
742
+ privateChat: p = !1,
724
743
  clipboardAccess: E = !1,
725
744
  ...H
726
745
  }) => {
727
- p((R) => {
746
+ u((R) => {
728
747
  const y = R.prompts, T = {
729
748
  ...H,
730
749
  enabled: n,
731
- privateChat: h,
750
+ privateChat: p,
732
751
  clipboardAccess: E
733
752
  };
734
753
  E ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
735
- const M = y.findIndex((U) => U.slot === H.slot);
736
- return M === -1 ? {
754
+ const O = y.findIndex((U) => U.slot === H.slot);
755
+ return O === -1 ? {
737
756
  ...R,
738
757
  prompts: [...y, { ...T }]
739
- } : (y[M] = T, {
758
+ } : (y[O] = T, {
740
759
  ...R,
741
760
  prompts: [...y]
742
761
  });
743
762
  });
744
763
  };
745
764
  return X(() => {
746
- t?.instructions && S(t.instructions), t?.location && f(t.location), t?.tags && p({ prompts: t.tags }), t?.sendOnEnter !== void 0 && k(t.sendOnEnter), t?.useMemory !== void 0 && V(t.useMemory), t?.showDetails !== void 0 && K(t.showDetails), F(Te());
747
- }, [t]), l ? /* @__PURE__ */ v(
765
+ t?.instructions && _(t.instructions), t?.location && f(t.location), t?.tags && u({ prompts: t.tags }), t?.sendOnEnter !== void 0 && k(t.sendOnEnter), t?.useMemory !== void 0 && V(t.useMemory), t?.showDetails !== void 0 && J(t.showDetails), F(Te());
766
+ }, [t]), s ? /* @__PURE__ */ N(
748
767
  Le,
749
768
  {
750
769
  open: e,
751
770
  onOpenChange: z,
752
- title: Ne,
771
+ title: we,
753
772
  animation: !0,
754
773
  animationType: "fade",
755
- footer: /* @__PURE__ */ v(
774
+ footer: /* @__PURE__ */ N(
756
775
  _e,
757
776
  {
758
777
  columnGap: 2,
759
778
  alignHorizontal: "flex-end",
760
779
  className: "pb-8 sm:pb-0",
761
780
  children: [
762
- /* @__PURE__ */ s(ne, { children: /* @__PURE__ */ s(
781
+ /* @__PURE__ */ l(ne, { children: /* @__PURE__ */ l(
763
782
  re,
764
783
  {
765
784
  mode: "dark",
@@ -770,7 +789,7 @@ const yt = ({
770
789
  children: "Cancel"
771
790
  }
772
791
  ) }),
773
- /* @__PURE__ */ s(ne, { children: /* @__PURE__ */ s(
792
+ /* @__PURE__ */ l(ne, { children: /* @__PURE__ */ l(
774
793
  re,
775
794
  {
776
795
  mode: "dark",
@@ -785,28 +804,30 @@ const yt = ({
785
804
  }
786
805
  ),
787
806
  children: [
788
- /* @__PURE__ */ v(
807
+ /* @__PURE__ */ N(
789
808
  $,
790
809
  {
791
810
  header: P.SETTINGS_DETAILS.TITLE,
792
811
  className: "prose-dark dark:prose-lighter",
793
812
  noBorder: !0,
794
813
  children: [
795
- /* @__PURE__ */ s("p", { className: "text-sm", children: P.SETTINGS_DETAILS.DETAILS }),
796
- /* @__PURE__ */ s(
814
+ /* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_DETAILS.DETAILS }),
815
+ /* @__PURE__ */ l(
797
816
  B,
798
817
  {
818
+ narrow: !0,
799
819
  className: "mt-2",
800
820
  label: "Show Message Statistics",
801
821
  name: "show-message-statistics",
802
- onChange: J,
822
+ onChange: K,
803
823
  checked: q
804
824
  }
805
825
  ),
806
- /* @__PURE__ */ s("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.SEND_ON_ENTER }),
807
- /* @__PURE__ */ s(
826
+ /* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.SEND_ON_ENTER }),
827
+ /* @__PURE__ */ l(
808
828
  B,
809
829
  {
830
+ narrow: !0,
810
831
  className: "mt-2",
811
832
  label: "Send Message on Enter",
812
833
  name: "send-message-on-enter",
@@ -814,33 +835,34 @@ const yt = ({
814
835
  checked: I
815
836
  }
816
837
  ),
817
- /* @__PURE__ */ s("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.USE_MEMORY }),
818
- /* @__PURE__ */ s(
838
+ /* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.USE_MEMORY }),
839
+ /* @__PURE__ */ l(
819
840
  B,
820
841
  {
842
+ narrow: !0,
821
843
  className: "mt-2",
822
844
  label: "Use Memory",
823
845
  name: "use-memory",
824
846
  onChange: G,
825
- checked: C
847
+ checked: S
826
848
  }
827
849
  )
828
850
  ]
829
851
  }
830
852
  ),
831
- /* @__PURE__ */ v(
853
+ /* @__PURE__ */ N(
832
854
  $,
833
855
  {
834
856
  header: "Custom Instructions",
835
857
  className: "prose-dark dark:prose-lighter mt-4",
836
858
  noBorder: !0,
837
859
  children: [
838
- /* @__PURE__ */ v("p", { className: "text-sm", children: [
860
+ /* @__PURE__ */ N("p", { className: "text-sm", children: [
839
861
  "What would you like ",
840
- /* @__PURE__ */ s("em", { children: ve }),
862
+ /* @__PURE__ */ l("em", { children: Ne }),
841
863
  " to know about you to provide better responses?"
842
864
  ] }),
843
- /* @__PURE__ */ s(
865
+ /* @__PURE__ */ l(
844
866
  oe,
845
867
  {
846
868
  mode: "alt-system",
@@ -851,7 +873,7 @@ const yt = ({
851
873
  label: "Custom Instructions",
852
874
  value: b,
853
875
  onChange: (n) => {
854
- S(n.target.value);
876
+ _(n.target.value);
855
877
  },
856
878
  helperText: "Press ENTER to add a new line."
857
879
  }
@@ -859,28 +881,28 @@ const yt = ({
859
881
  ]
860
882
  }
861
883
  ),
862
- /* @__PURE__ */ v(
884
+ /* @__PURE__ */ N(
863
885
  $,
864
886
  {
865
887
  header: "Location",
866
888
  className: "prose-dark dark:prose-lighter mt-4",
867
889
  noBorder: !0,
868
890
  children: [
869
- /* @__PURE__ */ s("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
870
- /* @__PURE__ */ s(
891
+ /* @__PURE__ */ l("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
892
+ /* @__PURE__ */ l(
871
893
  oe,
872
894
  {
873
895
  mode: "alt-system",
874
896
  name: "location",
875
897
  label: "Location",
876
- value: _,
898
+ value: C,
877
899
  onChange: (n) => {
878
900
  f(n.target.value);
879
901
  },
880
902
  helperText: "Enter your location or press auto-detect."
881
903
  }
882
904
  ),
883
- /* @__PURE__ */ s(
905
+ /* @__PURE__ */ l(
884
906
  re,
885
907
  {
886
908
  className: "mt-2",
@@ -895,17 +917,18 @@ const yt = ({
895
917
  ]
896
918
  }
897
919
  ),
898
- /* @__PURE__ */ v(
920
+ /* @__PURE__ */ N(
899
921
  $,
900
922
  {
901
923
  header: P.SETTINGS_CACHING.TITLE,
902
924
  className: "prose-dark dark:prose-lighter mt-4",
903
925
  noBorder: !0,
904
926
  children: [
905
- /* @__PURE__ */ s("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
906
- /* @__PURE__ */ s(
927
+ /* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
928
+ /* @__PURE__ */ l(
907
929
  B,
908
930
  {
931
+ narrow: !0,
909
932
  className: "mt-2",
910
933
  label: "Enable Assets Caching",
911
934
  name: "enable-service-worker",
@@ -916,15 +939,15 @@ const yt = ({
916
939
  ]
917
940
  }
918
941
  ),
919
- /* @__PURE__ */ v(
942
+ /* @__PURE__ */ N(
920
943
  $,
921
944
  {
922
945
  header: P.SETTINGS_PROMPTS.TITLE,
923
946
  className: "prose-dark dark:prose-lighter mt-4",
924
947
  noBorder: !0,
925
948
  children: [
926
- /* @__PURE__ */ s("p", { className: "text-sm", children: we }),
927
- m.prompts && m.prompts.slice(0, 3).map((n) => /* @__PURE__ */ v(
949
+ /* @__PURE__ */ l("p", { className: "text-sm", children: ve }),
950
+ g.prompts && g.prompts.slice(0, 3).map((n) => /* @__PURE__ */ N(
928
951
  $,
929
952
  {
930
953
  mode: "dark",
@@ -932,53 +955,59 @@ const yt = ({
932
955
  header: n.label.replace("...", ""),
933
956
  className: "prose-light mb-2",
934
957
  children: [
935
- /* @__PURE__ */ s("p", { className: "text-sm", children: n.description }),
936
- /* @__PURE__ */ s(
958
+ /* @__PURE__ */ l("p", { className: "text-sm", children: n.description }),
959
+ /* @__PURE__ */ l(
937
960
  B,
938
961
  {
962
+ narrow: !0,
939
963
  mode: "dark",
964
+ focusMode: "light",
940
965
  className: "mt-2",
941
966
  noBorder: !0,
942
967
  label: "Enabled",
943
968
  name: n.slot.toString(),
944
- onChange: (h) => {
969
+ onChange: (p) => {
945
970
  L({
946
971
  ...n,
947
- enabled: h
972
+ enabled: p
948
973
  });
949
974
  },
950
975
  checked: n.enabled
951
976
  }
952
977
  ),
953
- /* @__PURE__ */ s(
978
+ /* @__PURE__ */ l(
954
979
  B,
955
980
  {
981
+ narrow: !0,
956
982
  mode: "dark",
983
+ focusMode: "light",
957
984
  className: "mt-2",
958
985
  noBorder: !0,
959
986
  label: "Private Chat",
960
987
  name: `private-${n.slot.toString()}`,
961
- onChange: (h) => {
988
+ onChange: (p) => {
962
989
  L({
963
990
  ...n,
964
- privateChat: h
991
+ privateChat: p
965
992
  });
966
993
  },
967
994
  checked: n.privateChat
968
995
  }
969
996
  ),
970
- /* @__PURE__ */ s(
997
+ /* @__PURE__ */ l(
971
998
  B,
972
999
  {
1000
+ narrow: !0,
973
1001
  mode: "dark",
1002
+ focusMode: "light",
974
1003
  className: "mt-2",
975
1004
  noBorder: !0,
976
1005
  label: "Use Clipboard",
977
1006
  name: `clipboard-${n.slot.toString()}`,
978
- onChange: (h) => {
1007
+ onChange: (p) => {
979
1008
  L({
980
1009
  ...n,
981
- clipboardAccess: h
1010
+ clipboardAccess: p
982
1011
  });
983
1012
  },
984
1013
  checked: n.clipboardAccess