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