@versini/sassysaint 8.110.0 → 8.110.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 (87) hide show
  1. package/dist/chunks/{AboutChangelog.BfOWMaYg.js → AboutChangelog.DfItgg_1.js} +2 -2
  2. package/dist/chunks/AboutEntry.DIYTS0Pp.js +77 -0
  3. package/dist/chunks/{App.BD0e8HgV.js → App.7P9lyXTX.js} +2435 -2452
  4. package/dist/chunks/{Bubble.fxUgvZMG.js → Bubble.C3J-YrAQ.js} +1 -1
  5. package/dist/chunks/ButtonIconDelete.CAEfJOI7.js +333 -0
  6. package/dist/chunks/{Chart.C-EqsPgy.js → Chart.Dg1jAFpj.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.hM8owVIk.js → ChatBubbleAssistant.DavDkAFx.js} +4 -4
  8. package/dist/chunks/{ChatBubbleUser.CnsuEhxO.js → ChatBubbleUser.DSMfBmEP.js} +3 -3
  9. package/dist/chunks/{ChatHistoryTable.WRplbgo4.js → ChatHistoryTable.qju2f_Sh.js} +73 -73
  10. package/dist/chunks/{HistoryEntry.BgO_PD7Q.js → HistoryEntry.QxUwQO5B.js} +72 -80
  11. package/dist/chunks/LoginEntry.BbhZpovW.js +118 -0
  12. package/dist/chunks/{LogoEntry.CucXks5G.js → LogoEntry.CTMAkXZN.js} +642 -746
  13. package/dist/chunks/{MemoriesEntry.OQ1K4KNa.js → MemoriesEntry.BYYT1IVl.js} +304 -318
  14. package/dist/chunks/ProfileEntry.vCF-ayWr.js +205 -0
  15. package/dist/chunks/{SettingsEntry.ByPtC4lj.js → SettingsEntry.DEaHLi7A.js} +114 -122
  16. package/dist/chunks/UsageEntry.B3Z4Zr4a.js +230 -0
  17. package/dist/chunks/{_baseUniq.DJhemj5B.js → _baseUniq.CKo3g19j.js} +1 -1
  18. package/dist/chunks/{arc.ClK0mYh2.js → arc.ny1AnYpL.js} +1 -1
  19. package/dist/chunks/{architecture-U656AL7Q.DGORleeb.js → architecture-U656AL7Q.CoJV4P-W.js} +1 -1
  20. package/dist/chunks/{architectureDiagram-VXUJARFQ.HR_eet_T.js → architectureDiagram-VXUJARFQ.C_r6hPXf.js} +4 -4
  21. package/dist/chunks/{blockDiagram-VD42YOAC.CWrnXf_B.js → blockDiagram-VD42YOAC.DeTKi9HH.js} +5 -5
  22. package/dist/chunks/{browser.5ieI9QUP.js → browser.Dd1PVu4Q.js} +1 -1
  23. package/dist/chunks/{c4Diagram-YG6GDRKO.CaA0SaMc.js → c4Diagram-YG6GDRKO.PYJXPQRd.js} +2 -2
  24. package/dist/chunks/{channel.BI8KZVUl.js → channel.CldxJpdX.js} +1 -1
  25. package/dist/chunks/{chunk-4BX2VUAB.CTzK9jPw.js → chunk-4BX2VUAB.D_xGzQXV.js} +1 -1
  26. package/dist/chunks/{chunk-55IACEB6.DMb8Reca.js → chunk-55IACEB6.D91lGO9k.js} +1 -1
  27. package/dist/chunks/{chunk-B4BG7PRW.BHBa3N2V.js → chunk-B4BG7PRW.rABluadn.js} +4 -4
  28. package/dist/chunks/{chunk-DI55MBZ5.Bqwg_jpX.js → chunk-DI55MBZ5.BisMfdbP.js} +3 -3
  29. package/dist/chunks/{chunk-FMBD7UC4.p8OpoFJE.js → chunk-FMBD7UC4.IZluU3TG.js} +1 -1
  30. package/dist/chunks/{chunk-QN33PNHL._xYLGQNv.js → chunk-QN33PNHL.DdhRwJuC.js} +1 -1
  31. package/dist/chunks/{chunk-QZHKN3VN.Bt1FHb64.js → chunk-QZHKN3VN.DxJRkbxl.js} +1 -1
  32. package/dist/chunks/{chunk-TZMSLE5B.hFsU0iJf.js → chunk-TZMSLE5B.yJUdJdZG.js} +1 -1
  33. package/dist/chunks/{classDiagram-2ON5EDUG.DiSJfiEu.js → classDiagram-2ON5EDUG.BJJShSGE.js} +2 -2
  34. package/dist/chunks/{classDiagram-v2-WZHVMYZB.DiSJfiEu.js → classDiagram-v2-WZHVMYZB.BJJShSGE.js} +2 -2
  35. package/dist/chunks/{clone.NcwizCyH.js → clone.CYQWcQos.js} +1 -1
  36. package/dist/chunks/{cose-bilkent-S5V4N54A.DogEbzcD.js → cose-bilkent-S5V4N54A.CFiLRTlV.js} +2 -2
  37. package/dist/chunks/{dagre-6UL2VRFP.Cy_GltZx.js → dagre-6UL2VRFP.BAOLjlsO.js} +5 -5
  38. package/dist/chunks/{diagram-PSM6KHXK.CazeYJ2F.js → diagram-PSM6KHXK.B7fd_KvS.js} +4 -4
  39. package/dist/chunks/{diagram-QEK2KX5R.ByhZHDpm.js → diagram-QEK2KX5R.nRWB6Pdu.js} +3 -3
  40. package/dist/chunks/{diagram-S2PKOQOG.D49-fpQd.js → diagram-S2PKOQOG.C4gQIrc_.js} +3 -3
  41. package/dist/chunks/{erDiagram-Q2GNP2WA.nce3gDBb.js → erDiagram-Q2GNP2WA.U2TDWSHg.js} +4 -4
  42. package/dist/chunks/{flowDiagram-NV44I4VS.DDUGMSKf.js → flowDiagram-NV44I4VS.CmXaVrq9.js} +5 -5
  43. package/dist/chunks/{ganttDiagram-JELNMOA3.NGXzLkaH.js → ganttDiagram-JELNMOA3.DSD39bjf.js} +2 -2
  44. package/dist/chunks/{gitGraph-F6HP7TQM.BzKXexyv.js → gitGraph-F6HP7TQM.C_axBowD.js} +1 -1
  45. package/dist/chunks/{gitGraphDiagram-NY62KEGX.C3cn9f8o.js → gitGraphDiagram-NY62KEGX.Y6LpuRjD.js} +4 -4
  46. package/dist/chunks/{graph.CURTRirk.js → graph.CsEnoNl4.js} +2 -2
  47. package/dist/chunks/{index.BYDZbdMZ.js → index.-DOP9Ckx.js} +1 -1
  48. package/dist/chunks/{index.gy41K1EE.js → index.4552QdXH.js} +3 -3
  49. package/dist/chunks/{index.BinkIORG.js → index.76MlCVOY.js} +1 -1
  50. package/dist/chunks/{index.CkajM1v0.js → index.BYUyJHzk.js} +1 -1
  51. package/dist/chunks/{index.CURM9PiU.js → index.Bi2ow_w5.js} +1 -1
  52. package/dist/chunks/{index.DAuo-OH1.js → index.CK3q1Sfv.js} +1 -1
  53. package/dist/chunks/{index.uUNtrS04.js → index.CR9-xbTg.js} +3 -3
  54. package/dist/chunks/{index.CBEv2y_C.js → index.MD-I3XF8.js} +2 -2
  55. package/dist/chunks/{index.BqIARWUR.js → index.whZY27YH.js} +1 -1
  56. package/dist/chunks/{info-NVLQJR56.CHnZmbT7.js → info-NVLQJR56.BM1oszeu.js} +1 -1
  57. package/dist/chunks/{infoDiagram-WHAUD3N6.DCZfKYU8.js → infoDiagram-WHAUD3N6.BOdkf_MU.js} +2 -2
  58. package/dist/chunks/{journeyDiagram-XKPGCS4Q.B-0JNmK_.js → journeyDiagram-XKPGCS4Q.Dw7-F-3G.js} +4 -4
  59. package/dist/chunks/{kanban-definition-3W4ZIXB7.C7aI8iBJ.js → kanban-definition-3W4ZIXB7.DBHZd8kd.js} +2 -2
  60. package/dist/chunks/{layout.Bmgsrc8X.js → layout.FDyoYwG2.js} +4 -4
  61. package/dist/chunks/{mermaid-parser.core.BZIZyjyF.js → mermaid-parser.core.C4lg1K9H.js} +10 -10
  62. package/dist/chunks/{min.CtR4qhyM.js → min.DBs1Msoe.js} +2 -2
  63. package/dist/chunks/{mindmap-definition-VGOIOE7T.DCsxzuhI.js → mindmap-definition-VGOIOE7T.CU1TS1Wz.js} +3 -3
  64. package/dist/chunks/{packet-BFZMPI3H.CQ2Sbdms.js → packet-BFZMPI3H.BQDJHYjU.js} +1 -1
  65. package/dist/chunks/{pie-7BOR55EZ.BYs1omMd.js → pie-7BOR55EZ.BlU94TQO.js} +1 -1
  66. package/dist/chunks/{pieDiagram-ADFJNKIX.DqkDHdMo.js → pieDiagram-ADFJNKIX.CKbT8AbG.js} +4 -4
  67. package/dist/chunks/{quadrantDiagram-AYHSOK5B.Cx-eq1uu.js → quadrantDiagram-AYHSOK5B.iibdk6QV.js} +1 -1
  68. package/dist/chunks/{radar-NHE76QYJ.CIqwL1Hw.js → radar-NHE76QYJ.CqellN1R.js} +1 -1
  69. package/dist/chunks/{rehype-mermaid.LJaY9ylI.js → rehype-mermaid.D5rxFoLJ.js} +33 -33
  70. package/dist/chunks/{requirementDiagram-UZGBJVZJ.C-YKp79x.js → requirementDiagram-UZGBJVZJ.BeoYCRTt.js} +3 -3
  71. package/dist/chunks/{sankeyDiagram-TZEHDZUN.BbfUzvVS.js → sankeyDiagram-TZEHDZUN.Cl7AJQyH.js} +1 -1
  72. package/dist/chunks/{sequenceDiagram-WL72ISMW.D5wDvZwT.js → sequenceDiagram-WL72ISMW.DJiYzLwe.js} +3 -3
  73. package/dist/chunks/{stateDiagram-FKZM4ZOC.-65PQCxm.js → stateDiagram-FKZM4ZOC.CEH77n-u.js} +4 -4
  74. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.BXy_3BUS.js → stateDiagram-v2-4FDKWEC3.C7e8FoNM.js} +2 -2
  75. package/dist/chunks/{timeline-definition-IT6M3QCI.B2tmtGDZ.js → timeline-definition-IT6M3QCI.DpH45C9N.js} +2 -2
  76. package/dist/chunks/{treemap-KMMF4GRG.Dm_alnmO.js → treemap-KMMF4GRG.CaXoo_S5.js} +1 -1
  77. package/dist/chunks/{useMarkdown.BWJCktGN.js → useMarkdown.C2zWe9xE.js} +8 -8
  78. package/dist/chunks/{xychartDiagram-PRI3JC2R.XQCHu3eO.js → xychartDiagram-PRI3JC2R.l9efaY6c.js} +1 -1
  79. package/dist/components/SassySaint/SassySaint.js +1 -1
  80. package/dist/index.js +3 -3
  81. package/dist/style.css +1 -1
  82. package/package.json +3 -3
  83. package/dist/chunks/AboutEntry.B7fBRGac.js +0 -85
  84. package/dist/chunks/ButtonIconDelete.Bw7zU6Rb.js +0 -456
  85. package/dist/chunks/LoginEntry.DvDNWT7T.js +0 -118
  86. package/dist/chunks/ProfileEntry.CbZLIK8x.js +0 -213
  87. package/dist/chunks/UsageEntry.CSkPteMr.js +0 -238
@@ -0,0 +1,205 @@
1
+ import { jsxs as t, jsx as e, Fragment as L } from "react/jsx-runtime";
2
+ import { preloadToast as M, showSuccessToast as j, showErrorToast as D, LazyToastContainerWrapper as K, ConfirmationPanel as O, Panel as W, ButtonCancel as Y } from "./App.7P9lyXTX.js";
3
+ import { useState as d, useMemo as H, useCallback as b, useRef as $ } from "react";
4
+ import { useUniqueId as q, CARDS as n, Button as G, ButtonIcon as V, IconPasskey as y, PROFILE_TITLE as J } from "./LogoEntry.CTMAkXZN.js";
5
+ import { n as Q, useUserPreferences as X, useServerCapabilities as Z, p as ee, setUserPlan as se, renderDataAsList as ae, st as re, isTauri as ne } from "./index.MD-I3XF8.js";
6
+ import { Card as S } from "./index.-DOP9Ckx.js";
7
+ import te from "clsx";
8
+ const ie = ({
9
+ requestConfirmation: m
10
+ }) => {
11
+ const {
12
+ isAuthenticated: u,
13
+ user: a,
14
+ registeringForPasskey: P,
15
+ authenticationType: h,
16
+ getAccessToken: i
17
+ } = Q(), [f, p] = d(null), [l, T] = d(!1), w = q(), E = a?.username || "", {
18
+ data: o,
19
+ isSuccess: F,
20
+ refetch: A
21
+ } = X({
22
+ user: a?.username,
23
+ getAccessToken: i
24
+ }), { data: C, isSuccess: x } = Z(), R = H(() => !x || !C?.plans ? [] : C.plans.map((s) => ({
25
+ id: s.name,
26
+ label: s.label,
27
+ description: s.description,
28
+ features: s.features,
29
+ models: s.allowedModels.map(
30
+ (r) => ee[r] || r
31
+ )
32
+ })), [x, C?.plans]), g = b(() => {
33
+ l || (M(), T(!0));
34
+ }, [l]), v = b(
35
+ async (s, r) => {
36
+ if (a?.username)
37
+ try {
38
+ p(s), await se({
39
+ plan: s,
40
+ accessToken: await i(),
41
+ username: a.username
42
+ }), await A(), await j(`${n.PLANS.SWITCH_SUCCESS} ${r}`, {
43
+ containerId: "profile-plan-selection"
44
+ });
45
+ } catch {
46
+ await D(n.PLANS.SWITCH_ERROR, {
47
+ containerId: "profile-plan-selection"
48
+ });
49
+ } finally {
50
+ p(null);
51
+ }
52
+ },
53
+ [i, A, a?.username]
54
+ ), U = b(
55
+ (s, r) => {
56
+ !a?.username || s === o?.plan || m(
57
+ () => v(s, r),
58
+ /* @__PURE__ */ t("p", { className: "m-0", children: [
59
+ "Are you sure you want to switch to the following plan:",
60
+ " ",
61
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: r })
62
+ ] })
63
+ );
64
+ },
65
+ [
66
+ v,
67
+ o?.plan,
68
+ m,
69
+ a?.username
70
+ ]
71
+ );
72
+ return u && E ? /* @__PURE__ */ t(L, { children: [
73
+ /* @__PURE__ */ e("div", { className: "av-sassy", children: /* @__PURE__ */ e(K, { containerId: "profile-plan-selection" }) }),
74
+ /* @__PURE__ */ e(
75
+ S,
76
+ {
77
+ header: n.PREFERENCES.TITLE,
78
+ className: "prose-dark dark:prose-lighter",
79
+ noBorder: !0,
80
+ children: ae(w, {
81
+ [n.PREFERENCES.USERNAME]: E,
82
+ [n.PREFERENCES.EMAIL]: a?.email || ""
83
+ })
84
+ }
85
+ ),
86
+ F && x && R.length > 0 && /* @__PURE__ */ t(
87
+ S,
88
+ {
89
+ header: n.PLANS.TITLE,
90
+ className: "prose-dark dark:prose-lighter mt-4",
91
+ noBorder: !0,
92
+ children: [
93
+ /* @__PURE__ */ e("p", { className: "text-sm", children: n.PLANS.DESCRIPTION }),
94
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-3", children: R.map(({ id: s, label: r, description: I, features: B, models: _ }) => {
95
+ const N = o?.plan === s, z = N ? n.PLANS.ACTIVE_BADGE : `Get ${r}`, k = f === s;
96
+ return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(S, { mode: "darker", className: "prose-lighter h-full", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap flex-col", children: [
97
+ /* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: [
98
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ t("div", { children: [
99
+ /* @__PURE__ */ e(
100
+ "h3",
101
+ {
102
+ className: te("m-0", {
103
+ "text-emerald-400": N
104
+ }),
105
+ children: r
106
+ }
107
+ ),
108
+ /* @__PURE__ */ e("p", { className: "mb-0 text-sm opacity-80", children: I })
109
+ ] }) }),
110
+ /* @__PURE__ */ e("h4", { children: "Features" }),
111
+ /* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: B.map((c) => /* @__PURE__ */ e("li", { children: c }, c)) }),
112
+ /* @__PURE__ */ e("h4", { children: "Models" }),
113
+ /* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: _.map((c) => /* @__PURE__ */ e("li", { children: c }, c)) })
114
+ ] }),
115
+ /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
116
+ G,
117
+ {
118
+ mode: "dark",
119
+ size: "small",
120
+ variant: N ? "selected" : "secondary",
121
+ className: "mt-4",
122
+ fullWidth: !0,
123
+ disabled: N || k,
124
+ onClick: () => {
125
+ U(s, r);
126
+ },
127
+ onMouseEnter: g,
128
+ onFocus: g,
129
+ children: k ? "Updating..." : z
130
+ }
131
+ ) })
132
+ ] }) }) }, s);
133
+ }) })
134
+ ]
135
+ }
136
+ ),
137
+ h !== re.PASSKEY && !ne() && /* @__PURE__ */ t(
138
+ S,
139
+ {
140
+ className: "prose-dark dark:prose-lighter mt-4",
141
+ noBorder: !0,
142
+ header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-x-3", children: [
143
+ /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(y, { size: "size-8" }) }),
144
+ /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e("div", { children: n.PREFERENCES.PASSKEY_TITLE }) })
145
+ ] }) }),
146
+ children: [
147
+ /* @__PURE__ */ e("p", { children: n.PREFERENCES.PASSKEY_INSTRUCTIONS }),
148
+ /* @__PURE__ */ e(
149
+ V,
150
+ {
151
+ variant: "selected",
152
+ size: "small",
153
+ className: "mt-2",
154
+ onClick: P,
155
+ labelLeft: n.PREFERENCES.PASSKEY_BUTTON,
156
+ children: /* @__PURE__ */ e(y, { size: "size-5", monotone: !0 })
157
+ }
158
+ )
159
+ ]
160
+ }
161
+ )
162
+ ] }) : null;
163
+ }, fe = ({
164
+ open: m,
165
+ onOpenChange: u
166
+ }) => {
167
+ const a = $(null), [P, h] = d(!1), [i, f] = d(null), [p, l] = d(null);
168
+ return /* @__PURE__ */ t(L, { children: [
169
+ /* @__PURE__ */ e(
170
+ O,
171
+ {
172
+ showConfirmation: P,
173
+ setShowConfirmation: h,
174
+ action: () => {
175
+ i && i(), f(null), l(null);
176
+ },
177
+ customStrings: {
178
+ confirmAction: "Switch Plan",
179
+ cancelAction: "Cancel",
180
+ title: "Switch Plan"
181
+ },
182
+ children: p
183
+ }
184
+ ),
185
+ /* @__PURE__ */ e(
186
+ W,
187
+ {
188
+ open: m,
189
+ onOpenChange: u,
190
+ title: J,
191
+ animation: !0,
192
+ animationType: "fade",
193
+ blurEffect: "large",
194
+ initialFocus: a,
195
+ footer: /* @__PURE__ */ e("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(Y, { onOpenChange: u, ref: a }) }) }),
196
+ children: /* @__PURE__ */ e(ie, { requestConfirmation: (E, o) => {
197
+ f(() => E), l(o), h(!0);
198
+ } })
199
+ }
200
+ )
201
+ ] });
202
+ };
203
+ export {
204
+ fe as Profile
205
+ };
@@ -1,54 +1,54 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { n as Ve, useEntitlements as Fe, useUserPreferences as We, w as ie, LOCAL_STORAGE_OLED_MODE as $e, LOCAL_STORAGE_FULL_SCREEN as ze, e as de, canEvaluateModels as He, W as Ye, getCacheInfo as qe, isServiceWorkerEnabled as Ke, V as Qe, K as ue, applyOledMode as me, getCurrentGeoLocation as Je, graphQLRequest as he, handleServiceWorkerToggle as Xe, SERVICE_TYPES as fe } from "./index.CBEv2y_C.js";
3
- import { AppContext as Ze, SETTINGS_TITLE as et, CARDS as r, Button as Ee, PROMPTS_DESCRIPTION as tt, L as ot, j as pe, APP_SET_OLED_MODE as Se, APP_SET_FULL_SCREEN as ge } from "./LogoEntry.CucXks5G.js";
4
- import { Card as f } from "./index.BYDZbdMZ.js";
5
- import { useCapability as be, useLocalStorage as Te, Panel as st, Toggle as l, ButtonCancel as at } from "./App.BD0e8HgV.js";
6
- import { TextArea as Ne } from "./index.DAuo-OH1.js";
7
- import { useRef as nt, useContext as rt, useState as s, useMemo as lt, useCallback as ct, useEffect as Ce } from "react";
8
- const pt = ({
9
- open: ye,
10
- onOpenChange: A
2
+ import { n as je, useEntitlements as Ve, useUserPreferences as Fe, w as ie, LOCAL_STORAGE_OLED_MODE as We, LOCAL_STORAGE_FULL_SCREEN as $e, e as de, canEvaluateModels as ze, W as He, getCacheInfo as Ye, isServiceWorkerEnabled as qe, V as Ke, K as ue, applyOledMode as me, getCurrentGeoLocation as Qe, graphQLRequest as he, handleServiceWorkerToggle as Je, SERVICE_TYPES as fe } from "./index.MD-I3XF8.js";
3
+ import { AppContext as Xe, SETTINGS_TITLE as Ze, CARDS as r, Button as pe, PROMPTS_DESCRIPTION as et, APP_SET_OLED_MODE as Ee, APP_SET_FULL_SCREEN as Se } from "./LogoEntry.CTMAkXZN.js";
4
+ import { Card as f } from "./index.-DOP9Ckx.js";
5
+ import { useCapability as be, useLocalStorage as ge, Panel as tt, Toggle as l, ButtonCancel as ot } from "./App.7P9lyXTX.js";
6
+ import { TextArea as Ne } from "./index.CK3q1Sfv.js";
7
+ import { useRef as st, useContext as at, useState as s, useMemo as nt, useCallback as rt, useEffect as Te } from "react";
8
+ const ft = ({
9
+ open: Ce,
10
+ onOpenChange: P
11
11
  }) => {
12
- const v = nt(null), { getAccessToken: I, user: R } = Ve(), { allowedModels: w, status: B } = Fe(), { dispatch: g } = rt(Ze), {
12
+ const A = st(null), { getAccessToken: y, user: R } = je(), { allowedModels: I, status: x } = Ve(), { dispatch: b } = at(Xe), {
13
13
  data: o,
14
- isSuccess: Ie,
15
- refetch: x
16
- } = We({
14
+ isSuccess: we,
15
+ refetch: B
16
+ } = Fe({
17
17
  user: R?.username,
18
- getAccessToken: I
19
- }), [G, b] = s({
18
+ getAccessToken: y
19
+ }), [U, g] = s({
20
20
  loadingLocation: !1
21
- }), [L, U] = s({
21
+ }), [L, G] = s({
22
22
  prompts: []
23
- }), [j, V] = s(""), [F, T] = s(""), [W, $] = s(!1), [z, H] = s(!1), [N, Y] = s(!1), [C, q] = s(!1), [K, Q] = s(!1), [D, J] = s(!1), [E, X] = s(null), [Z, ee] = s(!1), [te, oe] = s(!1), se = be(ie.TOOL.MEMORIES), ae = be(ie.ADDON.REASONING), [i, we] = Te({
24
- key: $e,
23
+ }), [j, V] = s(""), [F, N] = s(""), [W, $] = s(!1), [z, H] = s(!1), [T, Y] = s(!1), [C, q] = s(!1), [K, Q] = s(!1), [D, J] = s(!1), [p, X] = s(null), [Z, ee] = s(!1), [te, oe] = s(!1), se = be(ie.TOOL.MEMORIES), ae = be(ie.ADDON.REASONING), [i, ye] = ge({
24
+ key: We,
25
25
  initialValue: !1
26
- }), [u, Le] = Te({
27
- key: ze,
26
+ }), [u, Ie] = ge({
27
+ key: $e,
28
28
  initialValue: !1
29
- }), [m, M] = s(!1), [p, _] = s(!1), [ne, re] = s(de), De = lt(() => He(w, B) ? Ye(w) : !1, [w, B]), Me = (e) => {
29
+ }), [m, M] = s(!1), [E, _] = s(!1), [ne, re] = s(de), Le = nt(() => ze(I, x) ? He(I) : !1, [I, x]), De = (e) => {
30
30
  oe(e);
31
- }, _e = (e) => {
31
+ }, Me = (e) => {
32
32
  $(e);
33
- }, ke = (e) => {
33
+ }, _e = (e) => {
34
34
  se && H(e);
35
- }, Oe = (e) => {
35
+ }, ke = (e) => {
36
36
  q(e);
37
- }, Pe = (e) => {
37
+ }, Oe = (e) => {
38
38
  ae && Q(e);
39
- }, Ae = (e) => {
40
- J(e);
41
39
  }, ve = (e) => {
40
+ J(e);
41
+ }, Pe = (e) => {
42
42
  M(e);
43
- }, Re = (e) => {
43
+ }, Ae = (e) => {
44
44
  _(e);
45
- }, Be = (e) => {
45
+ }, Re = (e) => {
46
46
  re(e ? ue : de);
47
47
  }, xe = async (e) => {
48
48
  e.preventDefault();
49
49
  try {
50
50
  await he({
51
- accessToken: await I(),
51
+ accessToken: await y(),
52
52
  type: fe.SET_USER_PREFERENCES,
53
53
  params: {
54
54
  user: R?.username,
@@ -69,63 +69,63 @@ const pt = ({
69
69
  useNestedModelSelection: D,
70
70
  themeMode: ne
71
71
  }
72
- }), C !== N && (await Xe(C), Y(C)), m !== i && (we(m), me(m), g({
73
- type: Se,
72
+ }), C !== T && (await Je(C), Y(C)), m !== i && (ye(m), me(m), b({
73
+ type: Ee,
74
74
  payload: { oledMode: m }
75
- })), p !== u && (Le(p), g({
76
- type: ge,
77
- payload: { fullScreen: p }
78
- })), x(), b({
75
+ })), E !== u && (Ie(E), b({
76
+ type: Se,
77
+ payload: { fullScreen: E }
78
+ })), B(), g({
79
79
  loadingLocation: !1
80
80
  });
81
81
  } catch {
82
82
  }
83
- }, Ge = async () => {
84
- b({
83
+ }, Be = async () => {
84
+ g({
85
85
  loadingLocation: !0
86
- }), T("...");
86
+ }), N("...");
87
87
  try {
88
- const e = Date.now(), a = await Je(), y = await he({
89
- accessToken: await I(),
88
+ const e = Date.now(), a = await Qe(), w = await he({
89
+ accessToken: await y(),
90
90
  type: fe.GET_LOCATION,
91
91
  params: {
92
92
  latitude: a.latitude,
93
93
  longitude: a.longitude
94
94
  }
95
95
  }), h = Date.now() - e;
96
- h < 2e3 && await new Promise((je) => setTimeout(je, 2e3 - h));
97
- const { city: d, state: c, country: S, displayName: P } = y.data, Ue = d && c && S ? `${d}, ${c}, ${S}` : P;
98
- b({
96
+ h < 2e3 && await new Promise((Ge) => setTimeout(Ge, 2e3 - h));
97
+ const { city: d, state: c, country: S, displayName: v } = w.data, Ue = d && c && S ? `${d}, ${c}, ${S}` : v;
98
+ g({
99
99
  loadingLocation: !1
100
- }), T(Ue);
100
+ }), N(Ue);
101
101
  } catch {
102
- b({
102
+ g({
103
103
  loadingLocation: !1
104
104
  });
105
105
  }
106
106
  }, le = () => {
107
- m !== i && (M(i), me(i), g({
108
- type: Se,
107
+ m !== i && (M(i), me(i), b({
108
+ type: Ee,
109
109
  payload: { oledMode: i }
110
- })), p !== u && (_(u), g({
111
- type: ge,
110
+ })), E !== u && (_(u), b({
111
+ type: Se,
112
112
  payload: { fullScreen: u }
113
- })), x(), A(!1);
113
+ })), B(), P(!1);
114
114
  }, k = ({
115
115
  enabled: e = !1,
116
116
  privateChat: a = !1,
117
- clipboardAccess: y = !1,
117
+ clipboardAccess: w = !1,
118
118
  ...O
119
119
  }) => {
120
- U((h) => {
120
+ G((h) => {
121
121
  const d = h.prompts, c = {
122
122
  ...O,
123
123
  enabled: e,
124
124
  privateChat: a,
125
- clipboardAccess: y
125
+ clipboardAccess: w
126
126
  };
127
- y ? c.content = c.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : c.content = c.content.replace(/{{clipboard}}/g, "");
128
- const S = d.findIndex((P) => P.slot === O.slot);
127
+ w ? c.content = c.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : c.content = c.content.replace(/{{clipboard}}/g, "");
128
+ const S = d.findIndex((v) => v.slot === O.slot);
129
129
  return S === -1 ? {
130
130
  ...h,
131
131
  prompts: [...d, { ...c }]
@@ -134,63 +134,55 @@ const pt = ({
134
134
  prompts: [...d]
135
135
  });
136
136
  });
137
- }, ce = ct(async () => {
137
+ }, ce = rt(async () => {
138
138
  try {
139
139
  ee(!0);
140
- const e = await qe();
140
+ const e = await Ye();
141
141
  X(e);
142
142
  } catch {
143
143
  } finally {
144
144
  ee(!1);
145
145
  }
146
146
  }, []);
147
- return Ce(() => {
147
+ return Te(() => {
148
148
  if (!o)
149
149
  return;
150
- o.instructions && V(o.instructions), o.location && T(o.location), o.tags && U({ prompts: o.tags }), o.sendOnEnter !== void 0 && $(o.sendOnEnter), o.useMemory !== void 0 && H(o.useMemory), o.showDetails !== void 0 && oe(o.showDetails), o.showReasoningButton !== void 0 && Q(o.showReasoningButton), o.useNestedModelSelection !== void 0 && J(o.useNestedModelSelection), o.themeMode !== void 0 && re(o.themeMode);
151
- const e = Ke();
150
+ o.instructions && V(o.instructions), o.location && N(o.location), o.tags && G({ prompts: o.tags }), o.sendOnEnter !== void 0 && $(o.sendOnEnter), o.useMemory !== void 0 && H(o.useMemory), o.showDetails !== void 0 && oe(o.showDetails), o.showReasoningButton !== void 0 && Q(o.showReasoningButton), o.useNestedModelSelection !== void 0 && J(o.useNestedModelSelection), o.themeMode !== void 0 && re(o.themeMode);
151
+ const e = qe();
152
152
  Y(e), q(e), M(i), _(u);
153
- }, [o, i, u]), Ce(() => {
154
- N ? ce() : X(null);
155
- }, [N, ce]), Ie ? /* @__PURE__ */ n(
156
- st,
153
+ }, [o, i, u]), Te(() => {
154
+ T ? ce() : X(null);
155
+ }, [T, ce]), we ? /* @__PURE__ */ n(
156
+ tt,
157
157
  {
158
- open: ye,
158
+ open: Ce,
159
159
  onOpenChange: le,
160
- title: et,
160
+ title: Ze,
161
161
  animation: !0,
162
162
  animationType: "fade",
163
163
  blurEffect: "large",
164
- initialFocus: v,
165
- footer: /* @__PURE__ */ n(
166
- ot,
167
- {
168
- columnGap: 2,
169
- alignHorizontal: "flex-end",
170
- className: "pb-8 sm:pb-0",
171
- children: [
172
- /* @__PURE__ */ t(pe, { children: /* @__PURE__ */ t(
173
- at,
174
- {
175
- onOpenChange: le,
176
- label: "Cancel",
177
- ref: v
178
- }
179
- ) }),
180
- /* @__PURE__ */ t(pe, { children: /* @__PURE__ */ t(
181
- Ee,
182
- {
183
- mode: "light",
184
- focusMode: "light",
185
- onClick: async (e) => {
186
- A(!1), await xe(e);
187
- },
188
- children: "Save"
189
- }
190
- ) })
191
- ]
192
- }
193
- ),
164
+ initialFocus: A,
165
+ footer: /* @__PURE__ */ n("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: [
166
+ /* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ t(
167
+ ot,
168
+ {
169
+ onOpenChange: le,
170
+ label: "Cancel",
171
+ ref: A
172
+ }
173
+ ) }),
174
+ /* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ t(
175
+ pe,
176
+ {
177
+ mode: "light",
178
+ focusMode: "light",
179
+ onClick: async (e) => {
180
+ P(!1), await xe(e);
181
+ },
182
+ children: "Save"
183
+ }
184
+ ) })
185
+ ] }),
194
186
  children: [
195
187
  /* @__PURE__ */ n(
196
188
  f,
@@ -209,7 +201,7 @@ const pt = ({
209
201
  label: "Message Statistics",
210
202
  subLabel: r.SETTINGS_DETAILS.DETAILS,
211
203
  name: "show-message-statistics",
212
- onChange: Me,
204
+ onChange: De,
213
205
  checked: te
214
206
  }
215
207
  ),
@@ -223,7 +215,7 @@ const pt = ({
223
215
  label: "Send Message on Enter",
224
216
  subLabel: r.SETTINGS_DETAILS.SEND_ON_ENTER,
225
217
  name: "send-message-on-enter",
226
- onChange: _e,
218
+ onChange: Me,
227
219
  checked: W
228
220
  }
229
221
  ),
@@ -237,7 +229,7 @@ const pt = ({
237
229
  label: "Use Memory",
238
230
  subLabel: r.SETTINGS_DETAILS.USE_MEMORY,
239
231
  name: "use-memory",
240
- onChange: ke,
232
+ onChange: _e,
241
233
  checked: z
242
234
  }
243
235
  )
@@ -253,7 +245,7 @@ const pt = ({
253
245
  children: [
254
246
  /* @__PURE__ */ n("p", { className: "text-sm", children: [
255
247
  "What would you like ",
256
- /* @__PURE__ */ t("em", { children: Qe }),
248
+ /* @__PURE__ */ t("em", { children: Ke }),
257
249
  " to know about you to provide better responses?"
258
250
  ] }),
259
251
  /* @__PURE__ */ t(
@@ -291,21 +283,21 @@ const pt = ({
291
283
  label: "Location",
292
284
  value: F,
293
285
  onChange: (e) => {
294
- T(e.target.value);
286
+ N(e.target.value);
295
287
  },
296
288
  helperText: "Enter your location or press auto-detect."
297
289
  }
298
290
  ),
299
291
  /* @__PURE__ */ t(
300
- Ee,
292
+ pe,
301
293
  {
302
294
  className: "mt-2",
303
295
  size: "small",
304
296
  noBorder: !0,
305
297
  variant: "secondary",
306
- disabled: G.loadingLocation,
307
- onClick: Ge,
308
- children: G.loadingLocation ? "Detecting..." : "Auto-detect"
298
+ disabled: U.loadingLocation,
299
+ onClick: Be,
300
+ children: U.loadingLocation ? "Detecting..." : "Auto-detect"
309
301
  }
310
302
  )
311
303
  ]
@@ -318,7 +310,7 @@ const pt = ({
318
310
  className: "prose-dark dark:prose-lighter mt-4",
319
311
  noBorder: !0,
320
312
  children: [
321
- /* @__PURE__ */ t("p", { className: "text-sm", children: tt }),
313
+ /* @__PURE__ */ t("p", { className: "text-sm", children: et }),
322
314
  L.prompts && L.prompts.slice(0, 3).map((e) => /* @__PURE__ */ n(
323
315
  f,
324
316
  {
@@ -409,11 +401,11 @@ const pt = ({
409
401
  label: "Reasoning Button",
410
402
  subLabel: r.SETTINGS_ADVANCED.REASONING_BUTTON_DESCRIPTION,
411
403
  name: "show-reasoning-button",
412
- onChange: Pe,
404
+ onChange: Oe,
413
405
  checked: K
414
406
  }
415
407
  ),
416
- De && /* @__PURE__ */ t(
408
+ Le && /* @__PURE__ */ t(
417
409
  l,
418
410
  {
419
411
  noBorder: !0,
@@ -423,7 +415,7 @@ const pt = ({
423
415
  label: "Model Selection",
424
416
  subLabel: r.SETTINGS_ADVANCED.NESTED_MODEL_SELECTION_DESCRIPTION,
425
417
  name: "use-nested-model-selection",
426
- onChange: Ae,
418
+ onChange: ve,
427
419
  checked: D
428
420
  }
429
421
  ),
@@ -437,7 +429,7 @@ const pt = ({
437
429
  label: "OLED Mode",
438
430
  subLabel: r.SETTINGS_ADVANCED.BACKGROUND_THEME_DESCRIPTION,
439
431
  name: "enable-oled-mode",
440
- onChange: ve,
432
+ onChange: Pe,
441
433
  checked: m
442
434
  }
443
435
  ),
@@ -451,7 +443,7 @@ const pt = ({
451
443
  label: "Alternative Theme",
452
444
  subLabel: r.SETTINGS_ADVANCED.THEME_MODE_DESCRIPTION,
453
445
  name: "enable-alternative-theme",
454
- onChange: Be,
446
+ onChange: Re,
455
447
  checked: ne === ue
456
448
  }
457
449
  ),
@@ -465,8 +457,8 @@ const pt = ({
465
457
  label: "Full Screen",
466
458
  subLabel: r.SETTINGS_ADVANCED.FULL_SCREEN_DESCRIPTION,
467
459
  name: "enable-full-screen",
468
- onChange: Re,
469
- checked: p
460
+ onChange: Ae,
461
+ checked: E
470
462
  }
471
463
  ),
472
464
  /* @__PURE__ */ t(
@@ -479,22 +471,22 @@ const pt = ({
479
471
  label: "Assets Caching",
480
472
  subLabel: r.SETTINGS_ADVANCED.CACHE_DESCRIPTION,
481
473
  name: "enable-service-worker",
482
- onChange: Oe,
474
+ onChange: ke,
483
475
  checked: C
484
476
  }
485
477
  ),
486
- N && /* @__PURE__ */ n("div", { className: "mt-4 p-3 border border-dashed border-border-medium dark:border-border-medium rounded @container/optimizations", children: [
478
+ T && /* @__PURE__ */ n("div", { className: "mt-4 p-3 border border-dashed border-border-medium dark:border-border-medium rounded @container/optimizations", children: [
487
479
  /* @__PURE__ */ t("h3", { className: "m-0 mb-2 text-xs uppercase", children: "Cache Info" }),
488
- E ? /* @__PURE__ */ n("div", { className: "text-xs space-y-2", children: [
480
+ p ? /* @__PURE__ */ n("div", { className: "text-xs space-y-2", children: [
489
481
  /* @__PURE__ */ n("p", { className: "m-0", children: [
490
482
  "Version: ",
491
- /* @__PURE__ */ t("strong", { children: E.version })
483
+ /* @__PURE__ */ t("strong", { children: p.version })
492
484
  ] }),
493
485
  /* @__PURE__ */ n("p", { className: "m-0", children: [
494
486
  "Total Items: ",
495
- /* @__PURE__ */ t("strong", { children: E.totalItems })
487
+ /* @__PURE__ */ t("strong", { children: p.totalItems })
496
488
  ] }),
497
- E.caches.map((e) => /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: e.urls.map((a) => /* @__PURE__ */ t(
489
+ p.caches.map((e) => /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: e.urls.map((a) => /* @__PURE__ */ t(
498
490
  "li",
499
491
  {
500
492
  className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
@@ -503,7 +495,7 @@ const pt = ({
503
495
  },
504
496
  a
505
497
  )) }) }, e.name)),
506
- E.totalItems === 0 && !Z && /* @__PURE__ */ t("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
498
+ p.totalItems === 0 && !Z && /* @__PURE__ */ t("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
507
499
  ] }) : /* @__PURE__ */ t("p", { className: "text-xs opacity-70 m-0", children: Z ? "Loading cache info..." : "No cache info available." })
508
500
  ] })
509
501
  ]
@@ -514,5 +506,5 @@ const pt = ({
514
506
  ) : null;
515
507
  };
516
508
  export {
517
- pt as SettingsPanel
509
+ ft as SettingsPanel
518
510
  };