@versini/sassysaint 8.75.5 → 8.76.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 (34) hide show
  1. package/dist/chunks/{AboutChangelog.74dx3has.js → AboutChangelog.Bi_-dpeZ.js} +10 -9
  2. package/dist/chunks/{AboutEntry.B9IooHpy.js → AboutEntry.CTwezLPC.js} +11 -11
  3. package/dist/chunks/App.CV0Bjlae.js +9011 -0
  4. package/dist/chunks/{Chart.D1WQEJfe.js → Chart.uzxgAiX2.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.TGE3iwln.js → ChatBubbleAssistant.BVlp2GoO.js} +8 -8
  6. package/dist/chunks/ChatBubbleUser.BrWZttfQ.js +130 -0
  7. package/dist/chunks/ChatHistoryTable.uFTyBF2A.js +236 -0
  8. package/dist/chunks/HistoryEntry.ThaD-b5r.js +307 -0
  9. package/dist/chunks/{ProfileEntry.DiMarPYw.js → ProfileEntry.CyBWFkHS.js} +26 -26
  10. package/dist/chunks/{SettingsEntry.7sE9nOGN.js → SettingsEntry.QaYvHkdk.js} +39 -39
  11. package/dist/chunks/Table.Ckql2SnG.js +359 -0
  12. package/dist/chunks/{UsageEntry.CiY4OQtp.js → UsageEntry.CDzDYeHf.js} +19 -19
  13. package/dist/chunks/{UserMemoriesPanel.UDXZvvrL.js → UserMemoriesPanel.B6egCowo.js} +184 -210
  14. package/dist/chunks/{index.CiIBuo5O.js → index.A4p6x5_T.js} +1 -1
  15. package/dist/chunks/index.BXdpJpQs.js +266 -0
  16. package/dist/chunks/{index.C0asS70q.js → index.BdPmgM6G.js} +1 -1
  17. package/dist/chunks/index.C3aZ0rB_.js +142 -0
  18. package/dist/chunks/{index.D4tD4ovC.js → index.C4Rma01G.js} +3 -3
  19. package/dist/chunks/{index.p-Jh4Heo.js → index.C6T0AZQ_.js} +2 -2
  20. package/dist/chunks/{index.Bl8BpeHP.js → index.CgUGA3LA.js} +1 -1
  21. package/dist/chunks/index.rzw7MU5J.js +7894 -0
  22. package/dist/chunks/{useMarkdown.Cno1hTiv.js → useMarkdown.B4NWSGJz.js} +2004 -2130
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +2 -2
  26. package/package.json +5 -5
  27. package/dist/chunks/App.BmFE7_v_.js +0 -10006
  28. package/dist/chunks/ChatBubbleUser.DjSazwPr.js +0 -128
  29. package/dist/chunks/ChatHistoryTable.DKVkQOL_.js +0 -288
  30. package/dist/chunks/HistoryEntry.D-clB2ui.js +0 -333
  31. package/dist/chunks/Table.--YCSSgh.js +0 -456
  32. package/dist/chunks/index.-hzHawd8.js +0 -7203
  33. package/dist/chunks/index.BHHgvfWz.js +0 -357
  34. package/dist/chunks/index.WAJtnhmS.js +0 -249
@@ -1,100 +1,74 @@
1
- import { jsxs as r, jsx as e, Fragment as R } from "react/jsx-runtime";
2
- import { I as Ne, L, j as y, C$1 as b, n as we, LOCAL_STORAGE_PREFIX as W, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as ve, LOCAL_STORAGE_SORT_MEMORY_COLUMN as ke, useUserMemories as Se, useExpiredMemories as Te, useDeleteMemory as Me, useDeleteAllActiveMemories as De, useDeleteAllExpiredMemories as Ee, useUpdateMemory as be, useRestoreMemory as Re, te as I } from "./index.-hzHawd8.js";
3
- import { oe as le, G as O, E as Z, e as s, ConfirmationPanel as $, st as _ } from "./App.BmFE7_v_.js";
4
- import C from "clsx";
5
- import { useState as N, useEffect as Le, useRef as ee } from "react";
6
- import { Re as ze } from "./index.BHHgvfWz.js";
7
- import { j as te, D as re, G as E, M as a, F as B, H as ie, l as ne, U as oe, n as Ie } from "./Table.--YCSSgh.js";
8
- const Oe = ({
9
- className: A,
10
- viewBox: w,
11
- title: l,
12
- monotone: n,
13
- ...S
14
- }) => /* @__PURE__ */ r(
15
- Ne,
16
- {
17
- defaultViewBox: "0 0 512 512",
18
- size: "size-5",
19
- viewBox: w,
20
- className: A,
21
- title: l || "Edit",
22
- ...S,
23
- children: [
24
- /* @__PURE__ */ e(
25
- "path",
26
- {
27
- d: "M0 160c0-53 43-96 96-96h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32 14.3-32 32v256c0 17.7 14.3 32 32 32h256c17.7 0 32-14.3 32-32v-96c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 53-43 96-96 96H96c-53 0-96-43-96-96z",
28
- opacity: n ? "1" : "0.4"
29
- }
30
- ),
31
- /* @__PURE__ */ e("path", { d: "m392.4 21.7-30.1 30 97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2l-18.7-18.6c-21.9-21.9-57.3-21.9-79.2 0m-52.7 52.6L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5l167.3-167.4z" })
32
- ]
33
- }
34
- ), _e = ({
35
- open: A,
36
- onOpenChange: w,
37
- initialText: l,
1
+ import { jsx as e, jsxs as r, Fragment as b } from "react/jsx-runtime";
2
+ import { L as R, j as A, Button as M, n as Ne, useLocalStorage as K, LOCAL_STORAGE_PREFIX as Q, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as we, LOCAL_STORAGE_SORT_MEMORY_COLUMN as ke, useUserMemories as Se, useExpiredMemories as Te, useDeleteMemory as ve, useDeleteAllActiveMemories as De, useDeleteAllExpiredMemories as Me, useUpdateMemory as Ee, useRestoreMemory as be, ButtonIcon as O, IconEdit as Re, IconDelete as Z, IconRestore as Ie } from "./index.rzw7MU5J.js";
3
+ import { Panel as le, Toggle as _, e as l, ConfirmationPanel as ee, Tooltip as z } from "./App.CV0Bjlae.js";
4
+ import y from "clsx";
5
+ import { useState as C, useEffect as Le, useRef as te } from "react";
6
+ import { TextArea as Oe } from "./index.BXdpJpQs.js";
7
+ import { W as re, j as ie, G as D, M as s, F as B, H as ne, D as oe } from "./Table.Ckql2SnG.js";
8
+ const _e = ({
9
+ open: N,
10
+ onOpenChange: E,
11
+ initialText: a,
38
12
  metadata: n,
39
- onSave: S,
13
+ onSave: I,
40
14
  isSaving: m = !1
41
15
  }) => {
42
- const [p, z] = N(l), [h, v] = N("none");
16
+ const [p, L] = C(a), [h, w] = C("none");
43
17
  Le(() => {
44
- if (A) {
45
- z(l);
18
+ if (N) {
19
+ L(a);
46
20
  const o = n?.expiration || "none";
47
- v(o);
21
+ w(o);
48
22
  }
49
- }, [A, l, n?.expiration]);
50
- const T = () => {
23
+ }, [N, a, n?.expiration]);
24
+ const S = () => {
51
25
  if (p.trim().length >= 3) {
52
26
  const o = h === "none" ? null : h;
53
- S(p.trim(), o);
27
+ I(p.trim(), o);
54
28
  }
55
- }, u = p.trim().length >= 3, M = p.trim() !== l.trim() || h !== (n?.expiration || "none");
29
+ }, u = p.trim().length >= 3, T = p.trim() !== a.trim() || h !== (n?.expiration || "none");
56
30
  return /* @__PURE__ */ e(
57
31
  le,
58
32
  {
59
- open: A,
60
- onOpenChange: w,
33
+ open: N,
34
+ onOpenChange: E,
61
35
  title: "Edit Memory",
62
36
  animation: !0,
63
37
  animationType: "fade",
64
- footer: /* @__PURE__ */ r(L, { columnGap: 2, alignHorizontal: "flex-end", children: [
65
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
66
- b,
38
+ footer: /* @__PURE__ */ r(R, { columnGap: 2, alignHorizontal: "flex-end", children: [
39
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
40
+ M,
67
41
  {
68
42
  mode: "dark",
69
43
  variant: "secondary",
70
44
  noBorder: !0,
71
45
  focusMode: "light",
72
- onClick: () => w(!1),
46
+ onClick: () => E(!1),
73
47
  disabled: m,
74
48
  children: "Cancel"
75
49
  }
76
50
  ) }),
77
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
78
- b,
51
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
52
+ M,
79
53
  {
80
54
  mode: "dark",
81
55
  focusMode: "light",
82
- disabled: m || !u || !M,
83
- onClick: T,
56
+ disabled: m || !u || !T,
57
+ onClick: S,
84
58
  children: m ? "Saving..." : "Save"
85
59
  }
86
60
  ) })
87
61
  ] }),
88
62
  children: /* @__PURE__ */ r("div", { className: "flex flex-col pt-2 gap-4", children: [
89
63
  /* @__PURE__ */ e(
90
- ze,
64
+ Oe,
91
65
  {
92
66
  mode: "dark",
93
67
  focusMode: "light",
94
68
  label: "Memory text",
95
69
  name: "memoryText",
96
70
  value: p,
97
- onChange: (o) => z(o.target.value),
71
+ onChange: (o) => L(o.target.value),
98
72
  autoFocus: !0,
99
73
  helperText: p.trim().length < 3 ? "Memory text must be at least 3 characters" : `${p.length} characters`
100
74
  }
@@ -104,7 +78,7 @@ const Oe = ({
104
78
  /* @__PURE__ */ e("p", { className: "text-xs text-slate-400 m-0", children: "Set when this memory should expire and be automatically removed." }),
105
79
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
106
80
  /* @__PURE__ */ e(
107
- O,
81
+ _,
108
82
  {
109
83
  mode: "dark",
110
84
  focusMode: "light",
@@ -114,12 +88,12 @@ const Oe = ({
114
88
  name: "expiration-none",
115
89
  checked: h === "none",
116
90
  onChange: (o) => {
117
- o && v("none");
91
+ o && w("none");
118
92
  }
119
93
  }
120
94
  ),
121
95
  /* @__PURE__ */ e(
122
- O,
96
+ _,
123
97
  {
124
98
  mode: "dark",
125
99
  focusMode: "light",
@@ -129,12 +103,12 @@ const Oe = ({
129
103
  name: "expiration-short",
130
104
  checked: h === "short",
131
105
  onChange: (o) => {
132
- o && v("short");
106
+ o && w("short");
133
107
  }
134
108
  }
135
109
  ),
136
110
  /* @__PURE__ */ e(
137
- O,
111
+ _,
138
112
  {
139
113
  mode: "dark",
140
114
  focusMode: "light",
@@ -144,12 +118,12 @@ const Oe = ({
144
118
  name: "expiration-medium",
145
119
  checked: h === "medium",
146
120
  onChange: (o) => {
147
- o && v("medium");
121
+ o && w("medium");
148
122
  }
149
123
  }
150
124
  ),
151
125
  /* @__PURE__ */ e(
152
- O,
126
+ _,
153
127
  {
154
128
  mode: "dark",
155
129
  focusMode: "light",
@@ -159,7 +133,7 @@ const Oe = ({
159
133
  name: "expiration-long",
160
134
  checked: h === "long",
161
135
  onChange: (o) => {
162
- o && v("long");
136
+ o && w("long");
163
137
  }
164
138
  }
165
139
  )
@@ -169,13 +143,13 @@ const Oe = ({
169
143
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-slate-300 m-0", children: "Memory Details" }),
170
144
  n.categories && n.categories.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
171
145
  /* @__PURE__ */ e("span", { className: "text-xs text-slate-400 uppercase", children: "Category" }),
172
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: n.categories.map((o, D) => /* @__PURE__ */ e(
146
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: n.categories.map((o, v) => /* @__PURE__ */ e(
173
147
  "span",
174
148
  {
175
149
  className: "text-xs px-2 py-1 bg-slate-700/50 text-slate-200 rounded",
176
150
  children: o
177
151
  },
178
- `${o}-${D}`
152
+ `${o}-${v}`
179
153
  )) })
180
154
  ] }),
181
155
  /* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row gap-4", children: [
@@ -215,75 +189,75 @@ const Oe = ({
215
189
  ] })
216
190
  }
217
191
  );
218
- }, je = ({
219
- open: A,
220
- onOpenChange: w,
221
- user: l
192
+ }, He = ({
193
+ open: N,
194
+ onOpenChange: E,
195
+ user: a
222
196
  }) => {
223
- const { getAccessToken: n } = we(), [S] = N(void 0), [m, p] = N("active"), [z, h] = Z({
224
- key: W + ve,
225
- initialValue: s.DESC
226
- }), [v, T] = Z({
227
- key: W + ke,
197
+ const { getAccessToken: n } = Ne(), [I] = C(void 0), [m, p] = C("active"), [L, h] = K({
198
+ key: Q + we,
199
+ initialValue: l.DESC
200
+ }), [w, S] = K({
201
+ key: Q + ke,
228
202
  initialValue: "createdAt"
229
- }), [u, M] = N(z || s.DESC), [o, D] = N(
230
- v || "createdAt"
231
- ), { data: f, isLoading: F, isError: H } = Se({
232
- user: l,
233
- query: S,
203
+ }), [u, T] = C(L || l.DESC), [o, v] = C(
204
+ w || "createdAt"
205
+ ), { data: g, isLoading: U, isError: q } = Se({
206
+ user: a,
207
+ query: I,
234
208
  getAccessToken: n,
235
- enabled: A && m === "active"
209
+ enabled: N && m === "active"
236
210
  }), {
237
- data: g,
238
- isLoading: q,
211
+ data: f,
212
+ isLoading: H,
239
213
  isError: j
240
214
  } = Te({
241
- user: l,
242
- query: S,
215
+ user: a,
216
+ query: I,
243
217
  getAccessToken: n,
244
- enabled: A && m === "expired"
245
- }), G = Me({ getAccessToken: n }), V = De({ getAccessToken: n }), X = Ee({ getAccessToken: n }), P = be({ getAccessToken: n }), Y = Re({ getAccessToken: n }), [se, J] = N(!1), k = ee(null), [ae, K] = N(!1), [ce, U] = N(!1), x = ee(null), Q = (t, i, c, d) => {
246
- k.current = { id: t, text: i, description: c, createdAt: d }, J(!0);
218
+ enabled: N && m === "expired"
219
+ }), P = ve({ getAccessToken: n }), X = De({ getAccessToken: n }), V = Me({ getAccessToken: n }), F = Ee({ getAccessToken: n }), $ = be({ getAccessToken: n }), [se, Y] = C(!1), k = te(null), [ae, W] = C(!1), [ce, G] = C(!1), x = te(null), J = (t, i, c, d) => {
220
+ k.current = { id: t, text: i, description: c, createdAt: d }, Y(!0);
247
221
  }, de = () => {
248
- k.current && G.mutate({ user: l, memoryId: k.current.id });
249
- }, me = (t, i, c, d, ue, fe, ge, ye, Ae, Ce) => {
222
+ k.current && P.mutate({ user: a, memoryId: k.current.id });
223
+ }, me = (t, i, c, d, ue, ge, fe, Ae, ye, Ce) => {
250
224
  x.current = {
251
225
  id: t,
252
226
  description: i,
253
227
  categories: c,
254
228
  quote: d,
255
229
  canonicalText: ue,
256
- confidence: fe,
257
- status: ge,
258
- sourceType: ye,
259
- expiration: Ae,
230
+ confidence: ge,
231
+ status: fe,
232
+ sourceType: Ae,
233
+ expiration: ye,
260
234
  expiresAt: Ce
261
- }, U(!0);
235
+ }, G(!0);
262
236
  }, xe = (t, i) => {
263
- x.current && l && P.mutate(
237
+ x.current && a && F.mutate(
264
238
  {
265
- user: l,
239
+ user: a,
266
240
  memoryId: x.current.id,
267
241
  description: t,
268
242
  expiration: i || void 0
269
243
  },
270
244
  {
271
245
  onSuccess: () => {
272
- U(!1);
246
+ G(!1);
273
247
  }
274
248
  }
275
249
  );
276
250
  }, he = () => {
277
- l && K(!0);
251
+ a && W(!0);
278
252
  }, pe = () => {
279
- l && (m === "active" ? V.mutate({ user: l }) : X.mutate({ user: l }));
253
+ a && (m === "active" ? X.mutate({ user: a }) : V.mutate({ user: a }));
280
254
  };
281
- return /* @__PURE__ */ r(R, { children: [
255
+ return /* @__PURE__ */ r(b, { children: [
282
256
  /* @__PURE__ */ e(
283
257
  _e,
284
258
  {
285
259
  open: ce,
286
- onOpenChange: U,
260
+ onOpenChange: G,
287
261
  initialText: x.current?.description || "",
288
262
  metadata: x.current ? {
289
263
  categories: x.current.categories,
@@ -296,14 +270,14 @@ const Oe = ({
296
270
  expiresAt: x.current.expiresAt
297
271
  } : void 0,
298
272
  onSave: xe,
299
- isSaving: P.isPending
273
+ isSaving: F.isPending
300
274
  }
301
275
  ),
302
276
  /* @__PURE__ */ r(
303
- $,
277
+ ee,
304
278
  {
305
279
  showConfirmation: se,
306
- setShowConfirmation: J,
280
+ setShowConfirmation: Y,
307
281
  action: de,
308
282
  customStrings: {
309
283
  title: "Delete memory",
@@ -328,10 +302,10 @@ const Oe = ({
328
302
  }
329
303
  ),
330
304
  /* @__PURE__ */ e(
331
- $,
305
+ ee,
332
306
  {
333
307
  showConfirmation: ae,
334
- setShowConfirmation: K,
308
+ setShowConfirmation: W,
335
309
  action: pe,
336
310
  customStrings: {
337
311
  title: m === "active" ? "Delete all active memories" : "Delete all expired memories",
@@ -344,39 +318,39 @@ const Oe = ({
344
318
  /* @__PURE__ */ e(
345
319
  le,
346
320
  {
347
- open: A,
348
- onOpenChange: (t) => w(t),
321
+ open: N,
322
+ onOpenChange: (t) => E(t),
349
323
  title: "User Memories",
350
324
  animation: !0,
351
325
  animationType: "fade",
352
- footer: /* @__PURE__ */ r(L, { columnGap: 2, alignHorizontal: "flex-end", children: [
353
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
354
- b,
326
+ footer: /* @__PURE__ */ r(R, { columnGap: 2, alignHorizontal: "flex-end", children: [
327
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
328
+ M,
355
329
  {
356
330
  mode: "dark",
357
331
  variant: "secondary",
358
332
  noBorder: !0,
359
333
  focusMode: "light",
360
- onClick: () => w(!1),
334
+ onClick: () => E(!1),
361
335
  children: "Close"
362
336
  }
363
337
  ) }),
364
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
365
- b,
338
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
339
+ M,
366
340
  {
367
341
  mode: "dark",
368
342
  focusMode: "light",
369
343
  variant: "danger",
370
- disabled: (m === "active" ? V.isPending : X.isPending) || (m === "active" ? (f?.total ?? 0) === 0 : (g?.total ?? 0) === 0),
344
+ disabled: (m === "active" ? X.isPending : V.isPending) || (m === "active" ? (g?.total ?? 0) === 0 : (f?.total ?? 0) === 0),
371
345
  onClick: he,
372
346
  children: "Delete All"
373
347
  }
374
348
  ) })
375
349
  ] }),
376
350
  children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 @container/editmemoriespanel", children: [
377
- /* @__PURE__ */ r(L, { columnGap: 2, alignHorizontal: "center", children: [
378
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
379
- b,
351
+ /* @__PURE__ */ r(R, { columnGap: 2, alignHorizontal: "center", children: [
352
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
353
+ M,
380
354
  {
381
355
  focusMode: "light",
382
356
  mode: m === "active" ? "dark" : "light",
@@ -386,8 +360,8 @@ const Oe = ({
386
360
  children: "Active Memories"
387
361
  }
388
362
  ) }),
389
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
390
- b,
363
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
364
+ M,
391
365
  {
392
366
  focusMode: "light",
393
367
  mode: m === "expired" ? "dark" : "light",
@@ -401,17 +375,17 @@ const Oe = ({
401
375
  /* @__PURE__ */ e(
402
376
  "div",
403
377
  {
404
- className: C(
378
+ className: y(
405
379
  "flex flex-col sm:flex-row",
406
380
  "sm:max-h-[50vh] sm:min-h-[50vh]"
407
381
  ),
408
- children: m === "active" ? /* @__PURE__ */ r(R, { children: [
409
- F && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading memories..." }),
410
- H && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load memories." }),
411
- !F && !H && (f && f.items.length > 0 ? /* @__PURE__ */ r(te, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
412
- /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r(E, { children: [
413
- /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }),
414
- /* @__PURE__ */ e(a, { children: "Memory" }),
382
+ children: m === "active" ? /* @__PURE__ */ r(b, { children: [
383
+ U && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading memories..." }),
384
+ q && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load memories." }),
385
+ !U && !q && (g && g.items.length > 0 ? /* @__PURE__ */ r(re, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
386
+ /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ r(D, { children: [
387
+ /* @__PURE__ */ e(s, { className: "sr-only", children: "Row" }),
388
+ /* @__PURE__ */ e(s, { children: "Memory" }),
415
389
  /* @__PURE__ */ e(
416
390
  B,
417
391
  {
@@ -422,8 +396,8 @@ const Oe = ({
422
396
  sortDirection: u,
423
397
  sortedCell: o,
424
398
  onClick: () => {
425
- D("createdAt"), T("createdAt"), M((t) => {
426
- const i = t === s.ASC ? s.DESC : s.ASC;
399
+ v("createdAt"), S("createdAt"), T((t) => {
400
+ const i = t === l.ASC ? l.DESC : l.ASC;
427
401
  return h(i), i;
428
402
  });
429
403
  },
@@ -440,32 +414,32 @@ const Oe = ({
440
414
  sortDirection: u,
441
415
  sortedCell: o,
442
416
  onClick: () => {
443
- D("expiresAt"), T("expiresAt"), M((t) => {
444
- const i = t === s.ASC ? s.DESC : s.ASC;
417
+ v("expiresAt"), S("expiresAt"), T((t) => {
418
+ const i = t === l.ASC ? l.DESC : l.ASC;
445
419
  return h(i), i;
446
420
  });
447
421
  },
448
422
  children: "Expires"
449
423
  }
450
424
  ),
451
- /* @__PURE__ */ e(a, { align: "right", children: "Actions" })
425
+ /* @__PURE__ */ e(s, { align: "right", children: "Actions" })
452
426
  ] }) }),
453
- /* @__PURE__ */ e(ie, { children: [...f.items].sort((t, i) => {
427
+ /* @__PURE__ */ e(ne, { children: [...g.items].sort((t, i) => {
454
428
  if (o === "createdAt") {
455
429
  const c = t.createdAt ? new Date(t.createdAt).getTime() : 0, d = i.createdAt ? new Date(i.createdAt).getTime() : 0;
456
- return u === s.ASC ? c - d : d - c;
430
+ return u === l.ASC ? c - d : d - c;
457
431
  }
458
432
  if (o === "expiresAt") {
459
433
  const c = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, d = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
460
- return u === s.ASC ? c - d : d - c;
434
+ return u === l.ASC ? c - d : d - c;
461
435
  }
462
436
  return 0;
463
- }).map((t, i) => /* @__PURE__ */ r(E, { children: [
464
- /* @__PURE__ */ e(a, { className: C("dark:text-gray-400"), children: i + 1 }),
437
+ }).map((t, i) => /* @__PURE__ */ r(D, { children: [
438
+ /* @__PURE__ */ e(s, { className: y("dark:text-gray-400"), children: i + 1 }),
465
439
  /* @__PURE__ */ e(
466
- a,
440
+ s,
467
441
  {
468
- className: C(
442
+ className: y(
469
443
  "dark:text-white",
470
444
  "max-w-[100px] sm:max-w-[400px]",
471
445
  "text-xs sm:text-sm"
@@ -477,11 +451,11 @@ const Oe = ({
477
451
  }
478
452
  ),
479
453
  /* @__PURE__ */ e(
480
- a,
454
+ s,
481
455
  {
482
456
  component: "th",
483
457
  scope: "row",
484
- className: C(
458
+ className: y(
485
459
  "dark:text-gray-400",
486
460
  "sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
487
461
  ),
@@ -489,35 +463,35 @@ const Oe = ({
489
463
  }
490
464
  ),
491
465
  /* @__PURE__ */ e(
492
- a,
466
+ s,
493
467
  {
494
- className: C(
468
+ className: y(
495
469
  "dark:text-gray-400",
496
470
  "sm:whitespace-nowrap text-xs sm:text-sm"
497
471
  ),
498
472
  children: t.expiresAt ? new Date(t.expiresAt).toLocaleDateString() : "Never"
499
473
  }
500
474
  ),
501
- /* @__PURE__ */ e(a, { className: "align-top", align: "right", children: /* @__PURE__ */ r(
502
- L,
475
+ /* @__PURE__ */ e(s, { className: "align-top", align: "right", children: /* @__PURE__ */ r(
476
+ R,
503
477
  {
504
478
  columnGap: 2,
505
479
  alignHorizontal: "flex-end",
506
480
  children: [
507
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
508
- _,
481
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
482
+ z,
509
483
  {
510
484
  label: "Edit memory",
511
485
  mode: "system",
512
486
  placement: "top",
513
487
  trigger: /* @__PURE__ */ e(
514
- I,
488
+ O,
515
489
  {
516
490
  focusMode: "system",
517
491
  noBorder: !0,
518
492
  label: "Edit memory",
519
493
  variant: "primary",
520
- disabled: P.isPending,
494
+ disabled: F.isPending,
521
495
  onClick: () => me(
522
496
  t.memoryId,
523
497
  t.description || t.text,
@@ -530,33 +504,33 @@ const Oe = ({
530
504
  t.expiration,
531
505
  t.expiresAt
532
506
  ),
533
- children: /* @__PURE__ */ e(Oe, { size: "size-3", monotone: !0 })
507
+ children: /* @__PURE__ */ e(Re, { size: "size-3", monotone: !0 })
534
508
  }
535
509
  )
536
510
  }
537
511
  ) }),
538
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
539
- _,
512
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
513
+ z,
540
514
  {
541
515
  label: "Delete memory",
542
516
  mode: "system",
543
517
  placement: "top",
544
518
  trigger: /* @__PURE__ */ e(
545
- I,
519
+ O,
546
520
  {
547
521
  focusMode: "system",
548
522
  noBorder: !0,
549
523
  label: "Delete memory",
550
524
  variant: "primary",
551
525
  iconClassName: "text-red-700 dark:text-red-500",
552
- disabled: G.isPending,
553
- onClick: () => Q(
526
+ disabled: P.isPending,
527
+ onClick: () => J(
554
528
  t.memoryId,
555
529
  t.text,
556
530
  t.description,
557
531
  t.createdAt
558
532
  ),
559
- children: /* @__PURE__ */ e(ne, { size: "size-3", monotone: !0 })
533
+ children: /* @__PURE__ */ e(Z, { size: "size-3", monotone: !0 })
560
534
  }
561
535
  )
562
536
  }
@@ -565,31 +539,31 @@ const Oe = ({
565
539
  }
566
540
  ) })
567
541
  ] }, t.memoryId)) }),
568
- /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(E, { children: /* @__PURE__ */ r(a, { colSpan: 5, children: [
569
- f.total,
542
+ /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ r(s, { colSpan: 5, children: [
543
+ g.total,
570
544
  " memor",
571
- f.total === 1 ? "y" : "ies",
572
- f.totalTokenUsage !== void 0 && f.totalTokenUsage > 0 && /* @__PURE__ */ r(R, { children: [
545
+ g.total === 1 ? "y" : "ies",
546
+ g.totalTokenUsage !== void 0 && g.totalTokenUsage > 0 && /* @__PURE__ */ r(b, { children: [
573
547
  " ",
574
548
  "(approximately",
575
549
  " ",
576
550
  Math.round(
577
- f.totalTokenUsage
551
+ g.totalTokenUsage
578
552
  ).toLocaleString(),
579
553
  " ",
580
554
  "token",
581
- Math.round(f.totalTokenUsage) === 1 ? "" : "s",
555
+ Math.round(g.totalTokenUsage) === 1 ? "" : "s",
582
556
  ")"
583
557
  ] })
584
558
  ] }) }) })
585
559
  ] }) : /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: "No memories stored." }))
586
- ] }) : /* @__PURE__ */ r(R, { children: [
587
- q && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading expired memories..." }),
560
+ ] }) : /* @__PURE__ */ r(b, { children: [
561
+ H && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading expired memories..." }),
588
562
  j && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load expired memories." }),
589
- !q && !j && (g && g.items.length > 0 ? /* @__PURE__ */ r(te, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
590
- /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r(E, { children: [
591
- /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }),
592
- /* @__PURE__ */ e(a, { children: "Memory" }),
563
+ !H && !j && (f && f.items.length > 0 ? /* @__PURE__ */ r(re, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
564
+ /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ r(D, { children: [
565
+ /* @__PURE__ */ e(s, { className: "sr-only", children: "Row" }),
566
+ /* @__PURE__ */ e(s, { children: "Memory" }),
593
567
  /* @__PURE__ */ e(
594
568
  B,
595
569
  {
@@ -600,8 +574,8 @@ const Oe = ({
600
574
  sortDirection: u,
601
575
  sortedCell: o,
602
576
  onClick: () => {
603
- D("createdAt"), T("createdAt"), M((t) => {
604
- const i = t === s.ASC ? s.DESC : s.ASC;
577
+ v("createdAt"), S("createdAt"), T((t) => {
578
+ const i = t === l.ASC ? l.DESC : l.ASC;
605
579
  return h(i), i;
606
580
  });
607
581
  },
@@ -618,32 +592,32 @@ const Oe = ({
618
592
  sortDirection: u,
619
593
  sortedCell: o,
620
594
  onClick: () => {
621
- D("expiresAt"), T("expiresAt"), M((t) => {
622
- const i = t === s.ASC ? s.DESC : s.ASC;
595
+ v("expiresAt"), S("expiresAt"), T((t) => {
596
+ const i = t === l.ASC ? l.DESC : l.ASC;
623
597
  return h(i), i;
624
598
  });
625
599
  },
626
600
  children: "Expired"
627
601
  }
628
602
  ),
629
- /* @__PURE__ */ e(a, { align: "right", children: "Actions" })
603
+ /* @__PURE__ */ e(s, { align: "right", children: "Actions" })
630
604
  ] }) }),
631
- /* @__PURE__ */ e(ie, { children: [...g.items].sort((t, i) => {
605
+ /* @__PURE__ */ e(ne, { children: [...f.items].sort((t, i) => {
632
606
  if (o === "createdAt") {
633
607
  const c = t.createdAt ? new Date(t.createdAt).getTime() : 0, d = i.createdAt ? new Date(i.createdAt).getTime() : 0;
634
- return u === s.ASC ? c - d : d - c;
608
+ return u === l.ASC ? c - d : d - c;
635
609
  }
636
610
  if (o === "expiresAt") {
637
611
  const c = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, d = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
638
- return u === s.ASC ? c - d : d - c;
612
+ return u === l.ASC ? c - d : d - c;
639
613
  }
640
614
  return 0;
641
- }).map((t, i) => /* @__PURE__ */ r(E, { children: [
642
- /* @__PURE__ */ e(a, { className: C("dark:text-gray-400"), children: i + 1 }),
615
+ }).map((t, i) => /* @__PURE__ */ r(D, { children: [
616
+ /* @__PURE__ */ e(s, { className: y("dark:text-gray-400"), children: i + 1 }),
643
617
  /* @__PURE__ */ e(
644
- a,
618
+ s,
645
619
  {
646
- className: C(
620
+ className: y(
647
621
  "dark:text-white",
648
622
  "max-w-[100px] sm:max-w-[400px]",
649
623
  "text-xs sm:text-sm"
@@ -655,11 +629,11 @@ const Oe = ({
655
629
  }
656
630
  ),
657
631
  /* @__PURE__ */ e(
658
- a,
632
+ s,
659
633
  {
660
634
  component: "th",
661
635
  scope: "row",
662
- className: C(
636
+ className: y(
663
637
  "dark:text-gray-400",
664
638
  "sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
665
639
  ),
@@ -667,38 +641,38 @@ const Oe = ({
667
641
  }
668
642
  ),
669
643
  /* @__PURE__ */ e(
670
- a,
644
+ s,
671
645
  {
672
- className: C(
646
+ className: y(
673
647
  "dark:text-gray-400",
674
648
  "sm:whitespace-nowrap text-xs sm:text-sm"
675
649
  ),
676
650
  children: t.expiresAt ? new Date(t.expiresAt).toLocaleDateString() : "-"
677
651
  }
678
652
  ),
679
- /* @__PURE__ */ e(a, { className: "align-top", align: "right", children: /* @__PURE__ */ r(
680
- L,
653
+ /* @__PURE__ */ e(s, { className: "align-top", align: "right", children: /* @__PURE__ */ r(
654
+ R,
681
655
  {
682
656
  columnGap: 2,
683
657
  alignHorizontal: "flex-end",
684
658
  children: [
685
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
686
- _,
659
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
660
+ z,
687
661
  {
688
662
  label: "Restore memory",
689
663
  mode: "system",
690
664
  placement: "top",
691
665
  trigger: /* @__PURE__ */ e(
692
- I,
666
+ O,
693
667
  {
694
668
  focusMode: "system",
695
669
  noBorder: !0,
696
670
  label: "Restore memory",
697
671
  variant: "primary",
698
- disabled: Y.isPending,
672
+ disabled: $.isPending,
699
673
  onClick: () => {
700
- l && Y.mutate({
701
- user: l,
674
+ a && $.mutate({
675
+ user: a,
702
676
  memoryId: t.memoryId
703
677
  });
704
678
  },
@@ -707,28 +681,28 @@ const Oe = ({
707
681
  )
708
682
  }
709
683
  ) }),
710
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
711
- _,
684
+ /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
685
+ z,
712
686
  {
713
687
  label: "Delete memory",
714
688
  mode: "system",
715
689
  placement: "top",
716
690
  trigger: /* @__PURE__ */ e(
717
- I,
691
+ O,
718
692
  {
719
693
  focusMode: "system",
720
694
  noBorder: !0,
721
695
  label: "Delete memory",
722
696
  variant: "primary",
723
697
  iconClassName: "text-red-700 dark:text-red-500",
724
- disabled: G.isPending,
725
- onClick: () => Q(
698
+ disabled: P.isPending,
699
+ onClick: () => J(
726
700
  t.memoryId,
727
701
  t.text,
728
702
  t.description,
729
703
  t.createdAt
730
704
  ),
731
- children: /* @__PURE__ */ e(ne, { size: "size-3", monotone: !0 })
705
+ children: /* @__PURE__ */ e(Z, { size: "size-3", monotone: !0 })
732
706
  }
733
707
  )
734
708
  }
@@ -737,20 +711,20 @@ const Oe = ({
737
711
  }
738
712
  ) })
739
713
  ] }, t.memoryId)) }),
740
- /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(E, { children: /* @__PURE__ */ r(a, { colSpan: 5, children: [
741
- g.total,
714
+ /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ r(s, { colSpan: 5, children: [
715
+ f.total,
742
716
  " expired memor",
743
- g.total === 1 ? "y" : "ies",
744
- g.totalTokenUsage !== void 0 && g.totalTokenUsage > 0 && /* @__PURE__ */ r(R, { children: [
717
+ f.total === 1 ? "y" : "ies",
718
+ f.totalTokenUsage !== void 0 && f.totalTokenUsage > 0 && /* @__PURE__ */ r(b, { children: [
745
719
  " ",
746
720
  "(approximately",
747
721
  " ",
748
722
  Math.round(
749
- g.totalTokenUsage
723
+ f.totalTokenUsage
750
724
  ).toLocaleString(),
751
725
  " ",
752
726
  "token",
753
- Math.round(g.totalTokenUsage) === 1 ? "" : "s",
727
+ Math.round(f.totalTokenUsage) === 1 ? "" : "s",
754
728
  ")"
755
729
  ] })
756
730
  ] }) }) })
@@ -764,6 +738,6 @@ const Oe = ({
764
738
  ] });
765
739
  };
766
740
  export {
767
- je as UserMemoriesPanel,
768
- je as default
741
+ He as UserMemoriesPanel,
742
+ He as default
769
743
  };