@versini/sassysaint 8.60.0 → 8.61.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.
Files changed (25) hide show
  1. package/dist/chunks/{AboutChangelog.D7rARJQu.js → AboutChangelog.D7I8wIR3.js} +2 -2
  2. package/dist/chunks/{AboutEntry.2nf0TV4n.js → AboutEntry.CgoQFkvL.js} +5 -5
  3. package/dist/chunks/{App.Ch8FU2zW.js → App.ChCi2CJv.js} +23 -22
  4. package/dist/chunks/{Chart.Iz1BoL-_.js → Chart.Da_tRET4.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.M4WRDuaw.js → ChatBubbleAssistant.UxHsZzEZ.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.CJHFRmMF.js → ChatBubbleUser.D59prA_b.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.B2mRc_wV.js → ChatHistoryTable.BmLIy_n6.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.71E6Pz_O.js → HistoryEntry.BBQJlZU0.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.BWsYCeof.js → ProfileEntry.CJfuMvZl.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.Qi5gQD0-.js → SettingsEntry.DTXEVYGc.js} +317 -299
  11. package/dist/chunks/{Table.SHD8KKEE.js → Table.BJuGy_cI.js} +2 -2
  12. package/dist/chunks/{UsageEntry.DPhNHm9B.js → UsageEntry.nh1Wkgex.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.CT_7TJ_Z.js → UserMemoriesPanel.CjK4BTtb.js} +3 -3
  14. package/dist/chunks/{index.CqKtw4TJ.js → index.BVY22Byt.js} +1 -1
  15. package/dist/chunks/{index.BBAApLM_.js → index.C-XRoqj9.js} +1 -1
  16. package/dist/chunks/{index.DG2NgWZ6.js → index.C2Gm2e-k.js} +1 -1
  17. package/dist/chunks/{index.DnHjiSVh.js → index.CClDcTsc.js} +125 -113
  18. package/dist/chunks/{index.BJqzFaBo.js → index.CdI5w59v.js} +2 -2
  19. package/dist/chunks/{index.HkxzuofI.js → index.CrfYzm7K.js} +1 -1
  20. package/dist/chunks/{index.CEgF3L_6.js → index.DAxNz-ru.js} +3 -3
  21. package/dist/chunks/{useMarkdown.BBFa2GkT.js → useMarkdown.BXmbIhuT.js} +6 -6
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/dist/style.css +1 -1
  25. package/package.json +3 -3
@@ -1,10 +1,10 @@
1
- import { jsxs as u, jsx as r, Fragment as de } from "react/jsx-runtime";
2
- import { o as ge, h as ue, i as ye, x as xe, n as be, useUserPreferences as ke, Pe as Ee, getCacheInfo as Te, isServiceWorkerEnabled as Ne, SETTINGS_TITLE as ve, S as G, CARDS as A, C as oe, _e as we, PROMPTS_DESCRIPTION as Se, L as Ce, j as me, getCurrentGeoLocation as Ie, mutateCall as he, handleServiceWorkerToggle as Le, SERVICE_TYPES as pe } from "./index.DnHjiSVh.js";
3
- import { useCapability as _e, oe as Me, O as R } from "./App.Ch8FU2zW.js";
4
- import Oe, { useState as d, useEffect as ce, useRef as H, useLayoutEffect as Y, useCallback as Pe } from "react";
5
- import { UserMemoriesPanel as Ae } from "./UserMemoriesPanel.CT_7TJ_Z.js";
6
- import g from "clsx";
7
- function Re({
1
+ import { jsxs as d, jsx as r, Fragment as de } from "react/jsx-runtime";
2
+ import { o as Ne, h as pe, i as Te, x as we, n as ve, useUserPreferences as Se, Pe as fe, getCacheInfo as Ce, isServiceWorkerEnabled as Ie, SETTINGS_TITLE as _e, S as $, CARDS as L, C as oe, _e as Le, PROMPTS_DESCRIPTION as Me, L as Re, j as ge, getCurrentGeoLocation as Ae, mutateCall as ye, handleServiceWorkerToggle as De, SERVICE_TYPES as xe } from "./index.CClDcTsc.js";
3
+ import { useCapability as be, oe as Oe, O as M } from "./App.ChCi2CJv.js";
4
+ import Be, { useState as c, useEffect as me, useRef as W, useLayoutEffect as J, useCallback as Pe } from "react";
5
+ import { UserMemoriesPanel as Ue } from "./UserMemoriesPanel.CjK4BTtb.js";
6
+ import p from "clsx";
7
+ function Ge({
8
8
  value: a,
9
9
  defaultValue: n,
10
10
  finalValue: o,
@@ -12,59 +12,59 @@ function Re({
12
12
  },
13
13
  initialControlledDelay: e = 0
14
14
  }) {
15
- const [c, h] = d(!1), [y, T] = d(
15
+ const [l, m] = c(!1), [f, E] = c(
16
16
  n !== void 0 ? n : o
17
17
  ), v = (x) => {
18
- T(x), s?.(x);
18
+ E(x), s?.(x);
19
19
  };
20
- return ce(() => {
21
- (async () => a !== void 0 && !c && e > 0 && (await new Promise(
20
+ return me(() => {
21
+ (async () => a !== void 0 && !l && e > 0 && (await new Promise(
22
22
  (x) => setTimeout(x, e)
23
- ), h(!0)))();
24
- }, [a, e, c]), a !== void 0 ? !c && e > 0 ? ["", s, !0] : [a, s, !0] : [y, v, !1];
23
+ ), m(!0)))();
24
+ }, [a, e, l]), a !== void 0 ? !l && e > 0 ? ["", s, !0] : [a, s, !0] : [f, v, !1];
25
25
  }
26
- const fe = "av-text-area", De = "av-text-area-wrapper", ne = "av-text-area-helper-text", Be = "av-text-area__control--right", Ue = "av-text-area__control--left", Ge = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", He = ({ mode: a }) => g({
26
+ const ke = "av-text-area", He = "av-text-area-wrapper", ue = "av-text-area-helper-text", Ve = "av-text-area__control--right", $e = "av-text-area__control--left", We = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", ze = ({ mode: a }) => p({
27
27
  "bg-surface-darker text-copy-lighter caret-copy-light": a === "dark",
28
28
  "bg-surface-lighter text-copy-dark caret-copy-dark": a === "light",
29
29
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": a === "system",
30
30
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": a === "alt-system"
31
- }), $e = ({
31
+ }), Fe = ({
32
32
  focusMode: a
33
- }) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
33
+ }) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
34
34
  "focus:outline-focus-dark": a === "dark",
35
35
  "focus:outline-focus-light": a === "light",
36
36
  "focus:outline-focus-light dark:focus:outline-focus-dark": a === "alt-system",
37
37
  "focus:outline-focus-dark dark:focus:outline-focus-light": a === "system"
38
- }), Ve = ({
38
+ }), je = ({
39
39
  noBorder: a,
40
40
  error: n
41
- }) => g("border-2", {
41
+ }) => p("border-2", {
42
42
  "border-border-dark": !a && !n,
43
43
  "focus:border-border-dark": !a && n,
44
44
  "border-border-error-dark": !a && n,
45
45
  "border-transparent": a
46
- }), We = ({
46
+ }), Xe = ({
47
47
  disabled: a,
48
48
  raw: n,
49
49
  error: o,
50
50
  mode: s,
51
51
  leftElement: e,
52
- rightElement: c
52
+ rightElement: l
53
53
  }) => {
54
54
  if (n)
55
55
  return "";
56
56
  if (a)
57
- return g(
57
+ return p(
58
58
  "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
59
59
  {
60
- "translate-x-[10px]": c === !0 && !e || !c && !e
60
+ "translate-x-[10px]": l === !0 && !e || !l && !e
61
61
  }
62
62
  );
63
63
  if (!o)
64
- return g(
64
+ return p(
65
65
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
66
66
  {
67
- "translate-x-[10px]": c === !0 && !e || !c && !e,
67
+ "translate-x-[10px]": l === !0 && !e || !l && !e,
68
68
  "text-copy-medium": s === "dark",
69
69
  "text-copy-dark": s === "light",
70
70
  "text-copy-dark dark:text-copy-medium": s === "system",
@@ -72,17 +72,17 @@ const fe = "av-text-area", De = "av-text-area-wrapper", ne = "av-text-area-helpe
72
72
  }
73
73
  );
74
74
  if (o)
75
- return g(
75
+ return p(
76
76
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
77
77
  {
78
- "translate-x-[10px]": c === !0 && !e || !c && !e,
78
+ "translate-x-[10px]": l === !0 && !e || !l && !e,
79
79
  "text-copy-medium": s === "dark",
80
80
  "text-copy-error-dark": s === "light",
81
81
  "text-copy-error-dark dark:text-copy-error-light": s === "system",
82
82
  "text-copy-medium dark:text-copy-error-dark": s === "alt-system"
83
83
  }
84
84
  );
85
- }, ze = ({
85
+ }, Ye = ({
86
86
  error: a,
87
87
  raw: n,
88
88
  mode: o,
@@ -91,256 +91,256 @@ const fe = "av-text-area", De = "av-text-area-wrapper", ne = "av-text-area-helpe
91
91
  if (n)
92
92
  return "";
93
93
  if (s)
94
- return g(
95
- ne,
94
+ return p(
95
+ ue,
96
96
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
97
97
  );
98
98
  if (!a)
99
- return g(ne, "absolute px-2 font-medium", {
99
+ return p(ue, "absolute px-2 font-medium", {
100
100
  "text-copy-medium": o === "dark",
101
101
  "text-copy-dark": o === "light",
102
102
  "text-copy-dark dark:text-copy-medium": o === "system",
103
103
  "text-copy-medium dark:text-copy-dark": o === "alt-system"
104
104
  });
105
105
  if (a)
106
- return g(ne, "absolute px-2 font-medium", {
106
+ return p(ue, "absolute px-2 font-medium", {
107
107
  "text-copy-error-light": o === "dark",
108
108
  "text-copy-error-dark": o === "light",
109
109
  "text-copy-error-dark dark:text-copy-error-light": o === "system",
110
110
  "dark:text-copy-error-dark text-copy-error-light": o === "alt-system"
111
111
  });
112
- }, Fe = ({
112
+ }, qe = ({
113
113
  className: a,
114
114
  textAreaClassName: n,
115
115
  raw: o,
116
116
  focusMode: s,
117
117
  disabled: e,
118
- noBorder: c,
119
- error: h,
120
- mode: y,
121
- leftElement: T,
118
+ noBorder: l,
119
+ error: m,
120
+ mode: f,
121
+ leftElement: E,
122
122
  rightElement: v
123
123
  }) => {
124
- const x = o ? a : g(
124
+ const x = o ? a : p(
125
125
  "relative flex w-full flex-col justify-center",
126
- De,
126
+ He,
127
127
  a
128
- ), I = o ? g(n) : g(
129
- fe,
128
+ ), R = o ? p(n) : p(
129
+ ke,
130
130
  n,
131
- Ge(),
132
- He({ mode: y }),
133
- $e({ focusMode: s }),
134
- Ve({
135
- noBorder: c,
136
- error: h
131
+ We(),
132
+ ze({ mode: f }),
133
+ Fe({ focusMode: s }),
134
+ je({
135
+ noBorder: l,
136
+ error: m
137
137
  }),
138
138
  {
139
139
  "disabled:cursor-not-allowed disabled:opacity-50": e
140
140
  }
141
- ), D = o ? void 0 : "sr-only", B = We({
141
+ ), P = o ? void 0 : "sr-only", U = Xe({
142
142
  disabled: e,
143
143
  raw: o,
144
- error: h,
145
- mode: y,
144
+ error: m,
145
+ mode: f,
146
146
  rightElement: v,
147
- leftElement: T
148
- }), p = ze({
149
- error: h,
147
+ leftElement: E
148
+ }), h = Ye({
149
+ error: m,
150
150
  raw: o,
151
- mode: y,
151
+ mode: f,
152
152
  disabled: e
153
- }), S = o ? void 0 : g(Be, "absolute"), b = o ? void 0 : g(Ue, "absolute");
153
+ }), I = o ? void 0 : p(Ve, "absolute"), b = o ? void 0 : p($e, "absolute");
154
154
  return {
155
155
  wrapper: x,
156
- textArea: I,
157
- accessibleLabel: D,
158
- visibleLabel: B,
159
- helperText: p,
160
- rightElement: S,
156
+ textArea: R,
157
+ accessibleLabel: P,
158
+ visibleLabel: U,
159
+ helperText: h,
160
+ rightElement: I,
161
161
  leftElement: b
162
162
  };
163
- }, je = ({
163
+ }, Je = ({
164
164
  scrollHeight: a,
165
165
  currentHeight: n,
166
166
  currentLabelOffset: o = 0,
167
167
  currentHelperTextOffset: s = 0
168
168
  }) => {
169
- let e, c;
169
+ let e, l;
170
170
  if (a > 0 && a !== n) {
171
- const h = a - n, y = Math.abs(h / 24);
172
- e = o + -1 * Math.sign(h) * (12 * y), c = s + Math.sign(h) * (12 * y);
171
+ const m = a - n, f = Math.abs(m / 24);
172
+ e = o + -1 * Math.sign(m) * (12 * f), l = s + Math.sign(m) * (12 * f);
173
173
  }
174
174
  return {
175
175
  labelOffset: e,
176
- helperTextOffset: c,
176
+ helperTextOffset: l,
177
177
  scrollHeight: a
178
178
  };
179
- }, ie = Oe.forwardRef(
179
+ }, he = Be.forwardRef(
180
180
  ({
181
181
  id: a,
182
182
  name: n,
183
183
  label: o,
184
184
  error: s = !1,
185
185
  raw: e = !1,
186
- className: c,
187
- textAreaClassName: h,
188
- mode: y = "system",
189
- focusMode: T = "system",
186
+ className: l,
187
+ textAreaClassName: m,
188
+ mode: f = "system",
189
+ focusMode: E = "system",
190
190
  value: v,
191
191
  defaultValue: x,
192
- disabled: I = !1,
193
- noBorder: D = !1,
194
- labelId: B,
195
- helperText: p = "",
196
- helperTextOnFocus: S = !1,
192
+ disabled: R = !1,
193
+ noBorder: P = !1,
194
+ labelId: U,
195
+ helperText: h = "",
196
+ helperTextOnFocus: I = !1,
197
197
  rightElement: b,
198
198
  leftElement: N,
199
- onChange: $,
200
- onFocus: L,
201
- onBlur: V,
202
- ...U
203
- }, q) => {
204
- const m = H(null), J = ge([q, m]), [K, _] = ue(), [Q, w] = ue(), W = H(80), z = H(-25), M = H(null), Z = H(30), ee = H(null), O = ye({ id: a, prefix: `${fe}-` }), [te, se] = d(0), [re, ae] = d(0), [F, j] = d(
205
- !!(!S && p)
206
- ), t = `${n} error, ${p}`, l = Fe({
207
- className: c,
208
- textAreaClassName: h,
199
+ onChange: z,
200
+ onFocus: A,
201
+ onBlur: F,
202
+ ...G
203
+ }, K) => {
204
+ const g = W(null), Q = Ne([K, g]), [D, O] = pe(), [Z, S] = pe(), H = W(80), j = W(-25), V = W(null), X = W(30), Y = W(null), _ = Te({ id: a, prefix: `${ke}-` }), [ee, se] = c(0), [te, ne] = c(0), [le, re] = c(
205
+ !!(!I && h)
206
+ ), ce = `${n} error, ${h}`, T = qe({
207
+ className: l,
208
+ textAreaClassName: m,
209
209
  error: s,
210
210
  raw: e,
211
- focusMode: T,
212
- disabled: I,
213
- noBorder: D,
214
- mode: y,
211
+ focusMode: E,
212
+ disabled: R,
213
+ noBorder: P,
214
+ mode: f,
215
215
  rightElement: !!b,
216
216
  leftElement: !!N
217
- }), [f, X] = Re({
217
+ }), [y, ae] = Ge({
218
218
  value: v,
219
219
  initialControlledDelay: 20,
220
220
  defaultValue: x,
221
- onChange: (i) => {
222
- $ && $({
221
+ onChange: (u) => {
222
+ z && z({
223
223
  target: {
224
- value: i
224
+ value: u
225
225
  }
226
226
  });
227
227
  }
228
- }), C = (i) => {
229
- X(i.target.value);
230
- }, k = (i) => {
231
- S && p && j(!0), L && L(i);
232
- }, E = (i) => {
233
- S && p && !f && j(!1), V && V(i);
228
+ }), t = (u) => {
229
+ ae(u.target.value);
230
+ }, i = (u) => {
231
+ I && h && re(!0), A && A(u);
232
+ }, B = (u) => {
233
+ I && h && !y && re(!1), F && F(u);
234
234
  };
235
- return Y(() => {
236
- _ && _.width && se(_.width + 18 + 10);
237
- }, [_]), Y(() => {
238
- w && w.width && ae(w.width + 18 + 10);
239
- }, [w]), Y(() => {
240
- e || m && m.current && f !== void 0 && (m.current.style.height = "inherit", m.current.style.height = m.current.scrollHeight + "px");
241
- }, [f, e]), Y(() => {
235
+ return J(() => {
236
+ O && O.width && se(O.width + 18 + 10);
237
+ }, [O]), J(() => {
238
+ S && S.width && ne(S.width + 18 + 10);
239
+ }, [S]), J(() => {
240
+ e || g && g.current && y !== void 0 && (g.current.style.height = "inherit", g.current.style.height = g.current.scrollHeight + "px");
241
+ }, [y, e]), J(() => {
242
242
  e || setTimeout(() => {
243
- M?.current?.style.setProperty(
243
+ V?.current?.style.setProperty(
244
244
  "--av-text-area-wrapper-transition",
245
- f ? "none" : "all 0.2s ease-out"
245
+ y ? "none" : "all 0.2s ease-out"
246
246
  );
247
247
  }, 0);
248
- }, [f, e]), Y(() => {
249
- if (!e && m && m.current && f !== void 0) {
250
- const { labelOffset: i, helperTextOffset: P, scrollHeight: le } = je({
251
- scrollHeight: m.current.scrollHeight,
252
- currentHeight: W.current,
253
- currentLabelOffset: z.current,
254
- currentHelperTextOffset: Z.current
248
+ }, [y, e]), J(() => {
249
+ if (!e && g && g.current && y !== void 0) {
250
+ const { labelOffset: u, helperTextOffset: w, scrollHeight: k } = Je({
251
+ scrollHeight: g.current.scrollHeight,
252
+ currentHeight: H.current,
253
+ currentLabelOffset: j.current,
254
+ currentHelperTextOffset: X.current
255
255
  });
256
- i && (z.current = i, M?.current?.style.setProperty(
256
+ u && (j.current = u, V?.current?.style.setProperty(
257
257
  "--av-text-area-label",
258
- `${i}px`
259
- )), P && (Z.current = P, ee?.current?.style.setProperty(
258
+ `${u}px`
259
+ )), w && (X.current = w, Y?.current?.style.setProperty(
260
260
  "--av-text-area-helper-text",
261
- `${P}px`
262
- )), W.current = le || W.current;
261
+ `${w}px`
262
+ )), H.current = k || H.current;
263
263
  }
264
- }, [f, e]), w.width > 0 && M?.current?.style.setProperty(
264
+ }, [y, e]), S.width > 0 && V?.current?.style.setProperty(
265
265
  "--tw-translate-x",
266
- `${12 + w.width + 5}px`
267
- ), /* @__PURE__ */ u("div", { className: l.wrapper, children: [
266
+ `${12 + S.width + 5}px`
267
+ ), /* @__PURE__ */ d("div", { className: T.wrapper, children: [
268
268
  /* @__PURE__ */ r(
269
269
  "label",
270
270
  {
271
- htmlFor: O,
272
- id: B,
273
- className: l.accessibleLabel,
271
+ htmlFor: _,
272
+ id: U,
273
+ className: T.accessibleLabel,
274
274
  children: o
275
275
  }
276
276
  ),
277
277
  N && /* @__PURE__ */ r(
278
278
  "div",
279
279
  {
280
- ref: Q,
281
- className: l.leftElement,
280
+ ref: Z,
281
+ className: T.leftElement,
282
282
  children: N
283
283
  }
284
284
  ),
285
285
  /* @__PURE__ */ r(
286
286
  "textarea",
287
287
  {
288
- ref: J,
289
- id: O,
288
+ ref: Q,
289
+ id: _,
290
290
  name: n,
291
- disabled: I,
291
+ disabled: R,
292
292
  placeholder: e ? void 0 : " ",
293
- className: l.textArea,
293
+ className: T.textArea,
294
294
  rows: 1,
295
- ...p && { "aria-describedby": `${O}-helper` },
295
+ ...h && { "aria-describedby": `${_}-helper` },
296
296
  ...s && { "aria-invalid": "true" },
297
- ...b && !N && !e && { style: { paddingRight: te } },
298
- ...N && !b && !e && { style: { paddingLeft: re } },
297
+ ...b && !N && !e && { style: { paddingRight: ee } },
298
+ ...N && !b && !e && { style: { paddingLeft: te } },
299
299
  ...b && N && !e && {
300
300
  style: {
301
- paddingRight: te,
302
- paddingLeft: re
301
+ paddingRight: ee,
302
+ paddingLeft: te
303
303
  }
304
304
  },
305
- value: f,
306
- onChange: C,
307
- onFocus: k,
308
- onBlur: E,
309
- ...U
305
+ value: y,
306
+ onChange: t,
307
+ onFocus: i,
308
+ onBlur: B,
309
+ ...G
310
310
  }
311
311
  ),
312
312
  !e && /* @__PURE__ */ r(
313
313
  "label",
314
314
  {
315
- ref: M,
315
+ ref: V,
316
316
  "aria-hidden": !0,
317
- htmlFor: O,
318
- className: `${l.visibleLabel}`,
317
+ htmlFor: _,
318
+ className: `${T.visibleLabel}`,
319
319
  children: o
320
320
  }
321
321
  ),
322
- F && /* @__PURE__ */ r(
322
+ le && /* @__PURE__ */ r(
323
323
  "div",
324
324
  {
325
- ref: ee,
326
- id: `${O}-helper`,
327
- className: l.helperText,
328
- children: p
325
+ ref: Y,
326
+ id: `${_}-helper`,
327
+ className: T.helperText,
328
+ children: h
329
329
  }
330
330
  ),
331
331
  b && /* @__PURE__ */ r(
332
332
  "div",
333
333
  {
334
- ref: K,
335
- className: l.rightElement,
334
+ ref: D,
335
+ className: T.rightElement,
336
336
  children: b
337
337
  }
338
338
  ),
339
- s && p && /* @__PURE__ */ r(xe, { politeness: "polite", clearAnnouncementDelay: 500, children: t })
339
+ s && h && /* @__PURE__ */ r(we, { politeness: "polite", clearAnnouncementDelay: 500, children: ce })
340
340
  ] });
341
341
  }
342
342
  );
343
- ie.displayName = "TextArea";
343
+ he.displayName = "TextArea";
344
344
  /*!
345
345
  @versini/ui-textarea v5.0.2
346
346
  © 2025 gizmette.com
@@ -354,151 +354,154 @@ try {
354
354
  });
355
355
  } catch {
356
356
  }
357
- const Ze = ({
357
+ const at = ({
358
358
  open: a,
359
359
  onOpenChange: n
360
360
  }) => {
361
- const { getAccessToken: o, user: s } = be(), {
361
+ const { getAccessToken: o, user: s } = ve(), {
362
362
  data: e,
363
- isSuccess: c,
364
- refetch: h
365
- } = ke({
363
+ isSuccess: l,
364
+ refetch: m
365
+ } = Se({
366
366
  user: s?.username,
367
367
  getAccessToken: o
368
- }), [y, T] = d({
368
+ }), [f, E] = c({
369
369
  loadingLocation: !1
370
- }), [v, x] = d({
370
+ }), [v, x] = c({
371
371
  prompts: []
372
- }), [I, D] = d(""), [B, p] = d(""), [S, b] = d(!1), [N, $] = d(!1), [L, V] = d(!1), [U, q] = d(!1), [m, J] = d(null), [K, _] = d(!1), [Q, w] = d(!1), [W, z] = d(!1), M = _e(Ee.TOOL.MEMORIES), Z = (t) => {
373
- w(t);
374
- }, ee = (t) => {
372
+ }), [R, P] = c(""), [U, h] = c(""), [I, b] = c(!1), [N, z] = c(!1), [A, F] = c(!1), [G, K] = c(!1), [g, Q] = c(!1), [D, O] = c(null), [Z, S] = c(!1), [H, j] = c(!1), [V, X] = c(!1), Y = be(fe.TOOL.MEMORIES), _ = be(fe.ADDON.REASONING), ee = (t) => {
373
+ j(t);
374
+ }, se = (t) => {
375
375
  b(t);
376
- }, O = (t) => {
377
- M && $(t);
378
376
  }, te = (t) => {
379
- q(t);
380
- }, se = async (t) => {
377
+ Y && z(t);
378
+ }, ne = (t) => {
379
+ K(t);
380
+ }, le = (t) => {
381
+ _ && Q(t);
382
+ }, re = async (t) => {
381
383
  t.preventDefault();
382
384
  try {
383
- await he({
385
+ await ye({
384
386
  accessToken: await o(),
385
- type: pe.SET_USER_PREFERENCES,
387
+ type: xe.SET_USER_PREFERENCES,
386
388
  params: {
387
389
  user: s?.username,
388
- instructions: I,
389
- location: B,
390
+ instructions: R,
391
+ location: U,
390
392
  provider: e?.provider,
391
393
  tags: v.prompts,
392
- sendOnEnter: S,
394
+ sendOnEnter: I,
393
395
  useMemory: N,
394
- showDetails: Q
396
+ showDetails: H,
397
+ showReasoningButton: g
395
398
  }
396
- }), U !== L && (await Le(U), V(U)), h(), T({
399
+ }), G !== A && (await De(G), F(G)), m(), E({
397
400
  loadingLocation: !1
398
401
  });
399
402
  } catch {
400
403
  }
401
- }, re = async () => {
402
- T({
404
+ }, ce = async () => {
405
+ E({
403
406
  loadingLocation: !0
404
- }), p("...");
407
+ }), h("...");
405
408
  try {
406
- const t = Date.now(), l = await Ie(), f = await he({
409
+ const t = Date.now(), i = await Ae(), B = await ye({
407
410
  accessToken: await o(),
408
- type: pe.GET_LOCATION,
411
+ type: xe.GET_LOCATION,
409
412
  params: {
410
- latitude: l.latitude,
411
- longitude: l.longitude
413
+ latitude: i.latitude,
414
+ longitude: i.longitude
412
415
  }
413
- }), C = Date.now() - t;
414
- if (C < 2e3 && await new Promise((k) => setTimeout(k, 2e3 - C)), f.status === 200) {
415
- const { city: k, state: E, country: i, displayName: P } = f.data, le = k && E && i ? `${k}, ${E}, ${i}` : P;
416
- T({
416
+ }), w = Date.now() - t;
417
+ if (w < 2e3 && await new Promise((k) => setTimeout(k, 2e3 - w)), B.status === 200) {
418
+ const { city: k, state: C, country: q, displayName: ie } = B.data, Ee = k && C && q ? `${k}, ${C}, ${q}` : ie;
419
+ E({
417
420
  loadingLocation: !1
418
- }), p(le);
421
+ }), h(Ee);
419
422
  } else
420
- T({
423
+ E({
421
424
  loadingLocation: !1
422
425
  });
423
426
  } catch {
424
427
  }
425
- }, ae = () => {
426
- h(), n(!1);
427
- }, F = ({
428
+ }, T = () => {
429
+ m(), n(!1);
430
+ }, y = ({
428
431
  enabled: t = !1,
429
- privateChat: l = !1,
430
- clipboardAccess: f = !1,
431
- ...X
432
+ privateChat: i = !1,
433
+ clipboardAccess: B = !1,
434
+ ...u
432
435
  }) => {
433
- x((C) => {
434
- const k = C.prompts, E = {
435
- ...X,
436
+ x((w) => {
437
+ const k = w.prompts, C = {
438
+ ...u,
436
439
  enabled: t,
437
- privateChat: l,
438
- clipboardAccess: f
440
+ privateChat: i,
441
+ clipboardAccess: B
439
442
  };
440
- f ? E.content = E.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : E.content = E.content.replace(/{{clipboard}}/g, "");
441
- const i = k.findIndex((P) => P.slot === X.slot);
442
- return i === -1 ? {
443
- ...C,
444
- prompts: [...k, { ...E }]
445
- } : (k[i] = E, {
446
- ...C,
443
+ B ? C.content = C.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : C.content = C.content.replace(/{{clipboard}}/g, "");
444
+ const q = k.findIndex((ie) => ie.slot === u.slot);
445
+ return q === -1 ? {
446
+ ...w,
447
+ prompts: [...k, { ...C }]
448
+ } : (k[q] = C, {
449
+ ...w,
447
450
  prompts: [...k]
448
451
  });
449
452
  });
450
- }, j = Pe(async () => {
453
+ }, ae = Pe(async () => {
451
454
  try {
452
- _(!0);
453
- const t = await Te();
454
- J(t);
455
+ S(!0);
456
+ const t = await Ce();
457
+ O(t);
455
458
  } catch {
456
459
  } finally {
457
- _(!1);
460
+ S(!1);
458
461
  }
459
462
  }, []);
460
- return ce(() => {
463
+ return me(() => {
461
464
  if (!e)
462
465
  return;
463
- e.instructions && D(e.instructions), e.location && p(e.location), e.tags && x({ prompts: e.tags }), e.sendOnEnter !== void 0 && b(e.sendOnEnter), e.useMemory !== void 0 && $(e.useMemory), e.showDetails !== void 0 && w(e.showDetails);
464
- const t = Ne();
465
- V(t), q(t);
466
- }, [e]), ce(() => {
467
- L ? j() : J(null);
468
- }, [L, j]), c ? /* @__PURE__ */ u(de, { children: [
469
- /* @__PURE__ */ u(
470
- Me,
466
+ e.instructions && P(e.instructions), e.location && h(e.location), e.tags && x({ prompts: e.tags }), e.sendOnEnter !== void 0 && b(e.sendOnEnter), e.useMemory !== void 0 && z(e.useMemory), e.showDetails !== void 0 && j(e.showDetails), e.showReasoningButton !== void 0 && Q(e.showReasoningButton);
467
+ const t = Ie();
468
+ F(t), K(t);
469
+ }, [e]), me(() => {
470
+ A ? ae() : O(null);
471
+ }, [A, ae]), l ? /* @__PURE__ */ d(de, { children: [
472
+ /* @__PURE__ */ d(
473
+ Oe,
471
474
  {
472
475
  open: a,
473
- onOpenChange: ae,
474
- title: ve,
476
+ onOpenChange: T,
477
+ title: _e,
475
478
  animation: !0,
476
479
  animationType: "fade",
477
- footer: /* @__PURE__ */ u(
478
- Ce,
480
+ footer: /* @__PURE__ */ d(
481
+ Re,
479
482
  {
480
483
  columnGap: 2,
481
484
  alignHorizontal: "flex-end",
482
485
  className: "pb-8 sm:pb-0",
483
486
  children: [
484
- /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(
487
+ /* @__PURE__ */ r(ge, { children: /* @__PURE__ */ r(
485
488
  oe,
486
489
  {
487
490
  mode: "dark",
488
491
  variant: "secondary",
489
492
  focusMode: "light",
490
493
  noBorder: !0,
491
- onClick: ae,
494
+ onClick: T,
492
495
  children: "Cancel"
493
496
  }
494
497
  ) }),
495
- /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(
498
+ /* @__PURE__ */ r(ge, { children: /* @__PURE__ */ r(
496
499
  oe,
497
500
  {
498
501
  mode: "dark",
499
502
  focusMode: "light",
500
503
  onClick: async (t) => {
501
- n(!1), await se(t);
504
+ n(!1), await re(t);
502
505
  },
503
506
  children: "Save"
504
507
  }
@@ -507,50 +510,50 @@ const Ze = ({
507
510
  }
508
511
  ),
509
512
  children: [
510
- /* @__PURE__ */ u(
511
- G,
513
+ /* @__PURE__ */ d(
514
+ $,
512
515
  {
513
- header: A.SETTINGS_DETAILS.TITLE,
516
+ header: L.SETTINGS_DETAILS.TITLE,
514
517
  className: "prose-dark dark:prose-lighter",
515
518
  noBorder: !0,
516
519
  children: [
517
- /* @__PURE__ */ r("p", { className: "text-sm", children: A.SETTINGS_DETAILS.DETAILS }),
520
+ /* @__PURE__ */ r("p", { className: "text-sm", children: L.SETTINGS_DETAILS.DETAILS }),
518
521
  /* @__PURE__ */ r(
519
- R,
522
+ M,
520
523
  {
521
524
  noBorder: !0,
522
525
  narrow: !0,
523
526
  className: "mt-2",
524
527
  label: "Show Message Statistics",
525
528
  name: "show-message-statistics",
526
- onChange: Z,
527
- checked: Q
529
+ onChange: ee,
530
+ checked: H
528
531
  }
529
532
  ),
530
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: A.SETTINGS_DETAILS.SEND_ON_ENTER }),
533
+ /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: L.SETTINGS_DETAILS.SEND_ON_ENTER }),
531
534
  /* @__PURE__ */ r(
532
- R,
535
+ M,
533
536
  {
534
537
  noBorder: !0,
535
538
  narrow: !0,
536
539
  className: "mt-2",
537
540
  label: "Send Message on Enter",
538
541
  name: "send-message-on-enter",
539
- onChange: ee,
540
- checked: S
542
+ onChange: se,
543
+ checked: I
541
544
  }
542
545
  ),
543
- M && /* @__PURE__ */ u(de, { children: [
544
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: A.SETTINGS_DETAILS.USE_MEMORY }),
546
+ Y && /* @__PURE__ */ d(de, { children: [
547
+ /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: L.SETTINGS_DETAILS.USE_MEMORY }),
545
548
  /* @__PURE__ */ r(
546
- R,
549
+ M,
547
550
  {
548
551
  noBorder: !0,
549
552
  narrow: !0,
550
553
  className: "mt-2",
551
554
  label: "Use Memory",
552
555
  name: "use-memory",
553
- onChange: O,
556
+ onChange: te,
554
557
  checked: N
555
558
  }
556
559
  ),
@@ -561,7 +564,7 @@ const Ze = ({
561
564
  noBorder: !0,
562
565
  size: "small",
563
566
  className: "mt-3",
564
- onClick: () => z(!0),
567
+ onClick: () => X(!0),
565
568
  children: "Manage Memories"
566
569
  }
567
570
  )
@@ -569,20 +572,20 @@ const Ze = ({
569
572
  ]
570
573
  }
571
574
  ),
572
- /* @__PURE__ */ u(
573
- G,
575
+ /* @__PURE__ */ d(
576
+ $,
574
577
  {
575
578
  header: "Custom Instructions",
576
579
  className: "prose-dark dark:prose-lighter mt-4",
577
580
  noBorder: !0,
578
581
  children: [
579
- /* @__PURE__ */ u("p", { className: "text-sm", children: [
582
+ /* @__PURE__ */ d("p", { className: "text-sm", children: [
580
583
  "What would you like ",
581
- /* @__PURE__ */ r("em", { children: we }),
584
+ /* @__PURE__ */ r("em", { children: Le }),
582
585
  " to know about you to provide better responses?"
583
586
  ] }),
584
587
  /* @__PURE__ */ r(
585
- ie,
588
+ he,
586
589
  {
587
590
  mode: "alt-system",
588
591
  autoCapitalize: "off",
@@ -590,9 +593,9 @@ const Ze = ({
590
593
  autoCorrect: "off",
591
594
  name: "customInstructions",
592
595
  label: "Custom Instructions",
593
- value: I,
596
+ value: R,
594
597
  onChange: (t) => {
595
- D(t.target.value);
598
+ P(t.target.value);
596
599
  },
597
600
  helperText: "Press ENTER to add a new line."
598
601
  }
@@ -600,8 +603,8 @@ const Ze = ({
600
603
  ]
601
604
  }
602
605
  ),
603
- /* @__PURE__ */ u(
604
- G,
606
+ /* @__PURE__ */ d(
607
+ $,
605
608
  {
606
609
  header: "Location",
607
610
  className: "prose-dark dark:prose-lighter mt-4",
@@ -609,14 +612,14 @@ const Ze = ({
609
612
  children: [
610
613
  /* @__PURE__ */ r("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
611
614
  /* @__PURE__ */ r(
612
- ie,
615
+ he,
613
616
  {
614
617
  mode: "alt-system",
615
618
  name: "location",
616
619
  label: "Location",
617
- value: B,
620
+ value: U,
618
621
  onChange: (t) => {
619
- p(t.target.value);
622
+ h(t.target.value);
620
623
  },
621
624
  helperText: "Enter your location or press auto-detect."
622
625
  }
@@ -628,24 +631,24 @@ const Ze = ({
628
631
  size: "small",
629
632
  noBorder: !0,
630
633
  variant: "secondary",
631
- disabled: y.loadingLocation,
632
- onClick: re,
633
- children: y.loadingLocation ? "Detecting..." : "Auto-detect"
634
+ disabled: f.loadingLocation,
635
+ onClick: ce,
636
+ children: f.loadingLocation ? "Detecting..." : "Auto-detect"
634
637
  }
635
638
  )
636
639
  ]
637
640
  }
638
641
  ),
639
- /* @__PURE__ */ u(
640
- G,
642
+ /* @__PURE__ */ d(
643
+ $,
641
644
  {
642
- header: A.SETTINGS_PROMPTS.TITLE,
645
+ header: L.SETTINGS_PROMPTS.TITLE,
643
646
  className: "prose-dark dark:prose-lighter mt-4",
644
647
  noBorder: !0,
645
648
  children: [
646
- /* @__PURE__ */ r("p", { className: "text-sm", children: Se }),
647
- v.prompts && v.prompts.slice(0, 3).map((t) => /* @__PURE__ */ u(
648
- G,
649
+ /* @__PURE__ */ r("p", { className: "text-sm", children: Me }),
650
+ v.prompts && v.prompts.slice(0, 3).map((t) => /* @__PURE__ */ d(
651
+ $,
649
652
  {
650
653
  mode: "dark",
651
654
  noBorder: !0,
@@ -654,7 +657,7 @@ const Ze = ({
654
657
  children: [
655
658
  /* @__PURE__ */ r("p", { className: "text-sm", children: t.description }),
656
659
  /* @__PURE__ */ r(
657
- R,
660
+ M,
658
661
  {
659
662
  noBorder: !0,
660
663
  narrow: !0,
@@ -663,17 +666,17 @@ const Ze = ({
663
666
  className: "mt-2",
664
667
  label: "Enabled",
665
668
  name: t.slot.toString(),
666
- onChange: (l) => {
667
- F({
669
+ onChange: (i) => {
670
+ y({
668
671
  ...t,
669
- enabled: l
672
+ enabled: i
670
673
  });
671
674
  },
672
675
  checked: t.enabled
673
676
  }
674
677
  ),
675
678
  /* @__PURE__ */ r(
676
- R,
679
+ M,
677
680
  {
678
681
  noBorder: !0,
679
682
  narrow: !0,
@@ -682,17 +685,17 @@ const Ze = ({
682
685
  className: "mt-2",
683
686
  label: "Private Chat",
684
687
  name: `private-${t.slot.toString()}`,
685
- onChange: (l) => {
686
- F({
688
+ onChange: (i) => {
689
+ y({
687
690
  ...t,
688
- privateChat: l
691
+ privateChat: i
689
692
  });
690
693
  },
691
694
  checked: t.privateChat
692
695
  }
693
696
  ),
694
697
  /* @__PURE__ */ r(
695
- R,
698
+ M,
696
699
  {
697
700
  noBorder: !0,
698
701
  narrow: !0,
@@ -701,10 +704,10 @@ const Ze = ({
701
704
  className: "mt-2",
702
705
  label: "Use Clipboard",
703
706
  name: `clipboard-${t.slot.toString()}`,
704
- onChange: (l) => {
705
- F({
707
+ onChange: (i) => {
708
+ y({
706
709
  ...t,
707
- clipboardAccess: l
710
+ clipboardAccess: i
708
711
  });
709
712
  },
710
713
  checked: t.clipboardAccess
@@ -717,48 +720,63 @@ const Ze = ({
717
720
  ]
718
721
  }
719
722
  ),
720
- /* @__PURE__ */ u(
721
- G,
723
+ /* @__PURE__ */ d(
724
+ $,
722
725
  {
723
- header: A.SETTINGS_CACHING.TITLE,
726
+ header: L.SETTINGS_ADVANCED.TITLE,
724
727
  className: "prose-dark dark:prose-lighter mt-4 ",
725
728
  noBorder: !0,
726
729
  children: [
727
- /* @__PURE__ */ r("p", { className: "text-sm", children: A.SETTINGS_CACHING.DESCRIPTION }),
730
+ _ && /* @__PURE__ */ d(de, { children: [
731
+ /* @__PURE__ */ r("p", { className: "text-sm", children: L.SETTINGS_ADVANCED.REASONING_BUTTON_DESCRIPTION }),
732
+ /* @__PURE__ */ r(
733
+ M,
734
+ {
735
+ noBorder: !0,
736
+ narrow: !0,
737
+ className: "mt-2",
738
+ label: "Show Reasoning Button",
739
+ name: "show-reasoning-button",
740
+ onChange: le,
741
+ checked: g
742
+ }
743
+ )
744
+ ] }),
745
+ /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: L.SETTINGS_ADVANCED.CACHE_DESCRIPTION }),
728
746
  /* @__PURE__ */ r(
729
- R,
747
+ M,
730
748
  {
731
749
  noBorder: !0,
732
750
  narrow: !0,
733
751
  className: "mt-2",
734
752
  label: "Enable Assets Caching",
735
753
  name: "enable-service-worker",
736
- onChange: te,
737
- checked: U
754
+ onChange: ne,
755
+ checked: G
738
756
  }
739
757
  ),
740
- L && /* @__PURE__ */ u("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
758
+ A && /* @__PURE__ */ d("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
741
759
  /* @__PURE__ */ r("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
742
- m ? /* @__PURE__ */ u("div", { className: "text-xs space-y-2", children: [
743
- /* @__PURE__ */ u("p", { className: "m-0", children: [
760
+ D ? /* @__PURE__ */ d("div", { className: "text-xs space-y-2", children: [
761
+ /* @__PURE__ */ d("p", { className: "m-0", children: [
744
762
  "Version: ",
745
- /* @__PURE__ */ r("strong", { children: m.version })
763
+ /* @__PURE__ */ r("strong", { children: D.version })
746
764
  ] }),
747
- /* @__PURE__ */ u("p", { className: "m-0", children: [
765
+ /* @__PURE__ */ d("p", { className: "m-0", children: [
748
766
  "Total Items: ",
749
- /* @__PURE__ */ r("strong", { children: m.totalItems })
767
+ /* @__PURE__ */ r("strong", { children: D.totalItems })
750
768
  ] }),
751
- m.caches.map((t) => /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((l) => /* @__PURE__ */ r(
769
+ D.caches.map((t) => /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((i) => /* @__PURE__ */ r(
752
770
  "li",
753
771
  {
754
772
  className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
755
- title: l,
756
- children: new URL(l).pathname
773
+ title: i,
774
+ children: new URL(i).pathname
757
775
  },
758
- l
776
+ i
759
777
  )) }) }, t.name)),
760
- m.totalItems === 0 && !K && /* @__PURE__ */ r("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
761
- ] }) : /* @__PURE__ */ r("p", { className: "text-xs opacity-70 m-0", children: K ? "Loading cache info..." : "No cache info available." })
778
+ D.totalItems === 0 && !Z && /* @__PURE__ */ r("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
779
+ ] }) : /* @__PURE__ */ r("p", { className: "text-xs opacity-70 m-0", children: Z ? "Loading cache info..." : "No cache info available." })
762
780
  ] })
763
781
  ]
764
782
  }
@@ -767,15 +785,15 @@ const Ze = ({
767
785
  }
768
786
  ),
769
787
  /* @__PURE__ */ r(
770
- Ae,
788
+ Ue,
771
789
  {
772
- open: W,
773
- onOpenChange: z,
790
+ open: V,
791
+ onOpenChange: X,
774
792
  user: s?.username
775
793
  }
776
794
  )
777
795
  ] }) : null;
778
796
  };
779
797
  export {
780
- Ze as SettingsPanel
798
+ at as SettingsPanel
781
799
  };