@versini/sassysaint 8.36.0 → 8.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- import { jsxs as h, jsx as e, Fragment as Z } from "react/jsx-runtime";
2
- import { I, INFINITE_SCROLL_THRESHOLD as B, CARDS as ee, pluralize as te, ue as O, numberFormatter as se, isProbablyMobile as re, n as $, INFINITE_SCROLL_LIMIT as b, LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_SORT as ae, APP_CLASSNAME as ne, ACTION_SORT as z, TOAST_CHAT_DELETED as oe, TOAST_PROVIDER_CHANGED as ce, LOCAL_STORAGE_SEARCH as ie, HISTORY_TITLE as le, pe as de, debounce as me, ACTION_SEARCH as he } from "./index.z_UzkUf2.js";
3
- import { De as ue, He as pe, qe as w, Ge as Ce, Fe as Se, Pe as p, Ye as H, st as L, k as ge, a as Te, p as xe, p$1 as fe, O as ye, n as Ee, t as Ae, HistoryContext as G, ChatContext as Y, useAiChat as Ne, E as W, useUserPreferences as Re, ConfirmationPanel as De, LazyToastContainerWrapper as ve, mutateCall as P, SERVICE_TYPES as U, showErrorToast as we, setNewProvider as Oe, CHAT_SET_PROVIDER as ke, showSuccessToast as Me, CHAT_SET_STATUS as Ie, E$1 as A, useChatsHistory as _e, tt as be, a$1 as ze } from "./App.BokGeOus.js";
4
- import { Fragment as He, useRef as k, useState as R, useContext as D, useCallback as Le, useEffect as M } from "react";
1
+ import { jsxs as h, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
+ import { I, INFINITE_SCROLL_THRESHOLD as B, CARDS as te, pluralize as se, isProbablyMobile as $, ue as w, numberFormatter as re, n as F, INFINITE_SCROLL_LIMIT as b, LOCAL_STORAGE_PREFIX as G, LOCAL_STORAGE_SORT as ae, APP_CLASSNAME as ne, ACTION_SORT as z, TOAST_CHAT_DELETED as oe, TOAST_PROVIDER_CHANGED as ce, LOCAL_STORAGE_SEARCH as ie, HISTORY_TITLE as le, pe as me, debounce as de, ACTION_SEARCH as he } from "./index.hnWr_yax.js";
3
+ import { De as ue, He as pe, qe as v, Ge as Ce, Fe as Se, Pe as p, Ye as H, st as L, k as ge, a as Te, p as fe, p$1 as xe, O as ye, n as Ee, t as Ae, HistoryContext as Y, ChatContext as W, useAiChat as Re, E as K, useUserPreferences as Ne, ConfirmationPanel as De, LazyToastContainerWrapper as Oe, mutateCall as P, SERVICE_TYPES as U, showErrorToast as ve, setNewProvider as we, CHAT_SET_PROVIDER as Me, showSuccessToast as ke, CHAT_SET_STATUS as Ie, E$1 as A, useChatsHistory as _e, tt as be, a$1 as ze } from "./App.B3HHM3MY.js";
4
+ import { Fragment as He, useRef as M, useState as N, useContext as D, useCallback as Le, useEffect as k } from "react";
5
5
  const Pe = ({
6
6
  className: c,
7
7
  viewBox: a,
8
- title: d,
9
- monotone: m,
8
+ title: m,
9
+ monotone: d,
10
10
  ...i
11
11
  }) => /* @__PURE__ */ h(
12
12
  I,
@@ -15,14 +15,14 @@ const Pe = ({
15
15
  size: "size-5",
16
16
  viewBox: a,
17
17
  className: c,
18
- title: d || "Delete",
18
+ title: m || "Delete",
19
19
  ...i,
20
20
  children: [
21
21
  /* @__PURE__ */ e(
22
22
  "path",
23
23
  {
24
24
  d: "M32 96v352c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V96zm80 80c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16z",
25
- opacity: m ? "1" : "0.4"
25
+ opacity: d ? "1" : "0.4"
26
26
  }
27
27
  ),
28
28
  /* @__PURE__ */ e("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
@@ -31,8 +31,8 @@ const Pe = ({
31
31
  ), Ue = ({
32
32
  className: c,
33
33
  viewBox: a,
34
- title: d,
35
- monotone: m,
34
+ title: m,
35
+ monotone: d,
36
36
  ...i
37
37
  }) => /* @__PURE__ */ h(
38
38
  I,
@@ -41,14 +41,14 @@ const Pe = ({
41
41
  size: "size-5",
42
42
  viewBox: a,
43
43
  className: c,
44
- title: d || "Restore",
44
+ title: m || "Restore",
45
45
  ...i,
46
46
  children: [
47
47
  /* @__PURE__ */ e(
48
48
  "path",
49
49
  {
50
50
  d: "M128 80v16h64V80c0-8.8 7.2-16 16-16h224c8.8 0 16 7.2 16 16v224c0 8.8-7.2 16-16 16h-16v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80",
51
- opacity: m ? "1" : "0.4"
51
+ opacity: d ? "1" : "0.4"
52
52
  }
53
53
  ),
54
54
  /* @__PURE__ */ e("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
@@ -57,8 +57,8 @@ const Pe = ({
57
57
  ), Ve = ({
58
58
  className: c,
59
59
  viewBox: a,
60
- title: d,
61
- monotone: m,
60
+ title: m,
61
+ monotone: d,
62
62
  ...i
63
63
  }) => /* @__PURE__ */ h(
64
64
  I,
@@ -67,51 +67,57 @@ const Pe = ({
67
67
  size: "size-5",
68
68
  viewBox: a,
69
69
  className: c,
70
- title: d || "Search",
70
+ title: m || "Search",
71
71
  ...i,
72
72
  children: [
73
73
  /* @__PURE__ */ e(
74
74
  "path",
75
75
  {
76
76
  d: "M0 208a208 208 0 1 0 416 0 208 208 0 1 0-416 0m352 0a144 144 0 1 1-288 0 144 144 0 1 1 288 0",
77
- opacity: m ? "1" : "0.4"
77
+ opacity: d ? "1" : "0.4"
78
78
  }
79
79
  ),
80
80
  /* @__PURE__ */ e("path", { d: "m330.7 376 126.7 126.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L376 330.7c-12.7 17.3-28 32.6-45.3 45.3" })
81
81
  ]
82
82
  }
83
83
  ), Be = {
84
- [Ae]: fe,
85
- [Ee]: xe,
84
+ [Ae]: xe,
85
+ [Ee]: fe,
86
86
  [ye]: Te
87
- }, r = {
87
+ }, s = {
88
88
  ROW: "row",
89
89
  TIMESTAMP: "timestamp",
90
90
  SUMMARY: "summary",
91
91
  PROVIDER: "provider",
92
92
  TOKEN_USAGE: "tokenUsage",
93
93
  ACTIONS: "actions"
94
- }, V = [
95
- r.ROW,
96
- r.SUMMARY,
97
- r.TIMESTAMP,
98
- r.TOKEN_USAGE,
99
- r.PROVIDER,
100
- r.ACTIONS
94
+ }, V = $() ? [
95
+ s.ROW,
96
+ s.TIMESTAMP,
97
+ s.SUMMARY,
98
+ s.PROVIDER,
99
+ s.ACTIONS
100
+ ] : [
101
+ s.ROW,
102
+ s.SUMMARY,
103
+ s.TIMESTAMP,
104
+ s.TOKEN_USAGE,
105
+ s.PROVIDER,
106
+ s.ACTIONS
101
107
  ], $e = ({
102
108
  filteredHistory: c,
103
109
  historyState: a,
104
- lastEntryToLoad: d,
105
- onClickSort: m,
110
+ lastEntryToLoad: m,
111
+ onClickSort: d,
106
112
  onClickRestore: i,
107
113
  onClickDelete: T,
108
- infinityScrollMarkerRef: x
114
+ infinityScrollMarkerRef: f
109
115
  }) => {
110
- const l = re(), o = (t) => {
116
+ const l = $(), o = (t) => {
111
117
  switch (t) {
112
- case r.ROW:
118
+ case s.ROW:
113
119
  return /* @__PURE__ */ e(p, { className: "sr-only", children: "Row" }, t);
114
- case r.TIMESTAMP:
120
+ case s.TIMESTAMP:
115
121
  return /* @__PURE__ */ e(
116
122
  H,
117
123
  {
@@ -121,17 +127,17 @@ const Pe = ({
121
127
  sortDirection: a.sortDirection,
122
128
  sortedCell: a.sortedCell,
123
129
  onClick: () => {
124
- m("timestamp");
130
+ d("timestamp");
125
131
  },
126
132
  children: "Date"
127
133
  },
128
134
  t
129
135
  );
130
- case r.SUMMARY:
136
+ case s.SUMMARY:
131
137
  return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm", children: "Summary" }, t);
132
- case r.PROVIDER:
138
+ case s.PROVIDER:
133
139
  return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm", children: "Provider" }, t);
134
- case r.TOKEN_USAGE:
140
+ case s.TOKEN_USAGE:
135
141
  return l ? null : /* @__PURE__ */ e(
136
142
  H,
137
143
  {
@@ -141,34 +147,34 @@ const Pe = ({
141
147
  sortDirection: a.sortDirection,
142
148
  sortedCell: a.sortedCell,
143
149
  onClick: () => {
144
- m("tokenUsage");
150
+ d("tokenUsage");
145
151
  },
146
152
  children: "Tokens"
147
153
  },
148
154
  t
149
155
  );
150
- case r.ACTIONS:
156
+ case s.ACTIONS:
151
157
  return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm text-right", children: "Actions" }, t);
152
158
  default:
153
159
  return null;
154
160
  }
155
- }, y = (t, s, u) => {
161
+ }, y = (t, r, u) => {
156
162
  switch (t) {
157
- case r.ROW:
163
+ case s.ROW:
158
164
  return /* @__PURE__ */ e(p, { children: u + 1 }, t);
159
- case r.TIMESTAMP:
165
+ case s.TIMESTAMP:
160
166
  return /* @__PURE__ */ e(
161
167
  p,
162
168
  {
163
169
  component: "th",
164
170
  scope: "row",
165
171
  className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
166
- children: s.timestamp.split(",")[0]
172
+ children: r.timestamp.split(",")[0]
167
173
  },
168
174
  t
169
175
  );
170
- case r.SUMMARY: {
171
- const C = s.summary || (s.messages.length > 0 ? s.messages[0]?.content : "");
176
+ case s.SUMMARY: {
177
+ const C = r.summary || (r.messages.length > 0 ? r.messages[0]?.content : "");
172
178
  return /* @__PURE__ */ e(
173
179
  p,
174
180
  {
@@ -181,8 +187,8 @@ const Pe = ({
181
187
  t
182
188
  );
183
189
  }
184
- case r.PROVIDER: {
185
- const C = s.model ? ge(s.model) : null, E = C ? Be[C] : null;
190
+ case s.PROVIDER: {
191
+ const C = r.model ? ge(r.model) : null, E = C ? Be[C] : null;
186
192
  return /* @__PURE__ */ e(
187
193
  p,
188
194
  {
@@ -195,24 +201,24 @@ const Pe = ({
195
201
  {
196
202
  size: "size-4 sm:size-5",
197
203
  semantic: !0,
198
- title: s.model || C
204
+ title: r.model || C
199
205
  }
200
206
  ) : null
201
207
  },
202
208
  t
203
209
  );
204
210
  }
205
- case r.TOKEN_USAGE:
211
+ case s.TOKEN_USAGE:
206
212
  return l ? null : /* @__PURE__ */ e(
207
213
  p,
208
214
  {
209
215
  className: "text-gray-400 text-xs sm:text-sm",
210
216
  align: "right",
211
- children: s.tokenUsage ? se.format(s.tokenUsage) : "0"
217
+ children: r.tokenUsage ? re.format(r.tokenUsage) : "0"
212
218
  },
213
219
  t
214
220
  );
215
- case r.ACTIONS:
221
+ case s.ACTIONS:
216
222
  return /* @__PURE__ */ h(p, { align: "right", children: [
217
223
  /* @__PURE__ */ e(
218
224
  L,
@@ -221,7 +227,7 @@ const Pe = ({
221
227
  mode: "alt-system",
222
228
  placement: "top",
223
229
  trigger: /* @__PURE__ */ e(
224
- O,
230
+ w,
225
231
  {
226
232
  className: "mr-2",
227
233
  focusMode: "alt-system",
@@ -230,7 +236,7 @@ const Pe = ({
230
236
  variant: "primary",
231
237
  iconClassName: "text-green-800 dark:text-green-500",
232
238
  onClick: async () => {
233
- await i(s);
239
+ await i(r);
234
240
  },
235
241
  children: /* @__PURE__ */ e(Ue, { size: "size-3", monotone: !0 })
236
242
  }
@@ -244,7 +250,7 @@ const Pe = ({
244
250
  mode: "alt-system",
245
251
  placement: "top",
246
252
  trigger: /* @__PURE__ */ e(
247
- O,
253
+ w,
248
254
  {
249
255
  focusMode: "alt-system",
250
256
  noBorder: !0,
@@ -252,7 +258,7 @@ const Pe = ({
252
258
  variant: "primary",
253
259
  iconClassName: "text-red-700 dark:text-red-500",
254
260
  onClick: () => {
255
- T(s);
261
+ T(r);
256
262
  },
257
263
  children: /* @__PURE__ */ e(Pe, { size: "size-3", monotone: !0 })
258
264
  }
@@ -265,14 +271,14 @@ const Pe = ({
265
271
  }
266
272
  };
267
273
  return /* @__PURE__ */ h(ue, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
268
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(w, { children: V.map((t) => o(t)) }) }),
269
- /* @__PURE__ */ e(Ce, { children: c.slice(0, d).map((t, s) => t?.messages?.length > 0 ? /* @__PURE__ */ h(He, { children: [
270
- s === d - B && /* @__PURE__ */ e("tr", { ref: x }),
271
- /* @__PURE__ */ e(w, { children: V.map(
272
- (u) => y(u, t, s)
274
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(v, { children: V.map((t) => o(t)) }) }),
275
+ /* @__PURE__ */ e(Ce, { children: c.slice(0, m).map((t, r) => t?.messages?.length > 0 ? /* @__PURE__ */ h(He, { children: [
276
+ r === m - B && /* @__PURE__ */ e("tr", { ref: f }),
277
+ /* @__PURE__ */ e(v, { children: V.map(
278
+ (u) => y(u, t, r)
273
279
  ) })
274
- ] }, `${ee.HISTORY.TITLE}-${t.id}-${s}`) : null) }),
275
- /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(p, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: te(
280
+ ] }, `${te.HISTORY.TITLE}-${t.id}-${r}`) : null) }),
281
+ /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(p, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: se(
276
282
  `${c.length} chat`,
277
283
  c.length
278
284
  ) }) }) }) })
@@ -280,26 +286,26 @@ const Pe = ({
280
286
  }, Fe = ({
281
287
  filteredHistory: c,
282
288
  dispatch: a,
283
- onOpenChange: d,
284
- mutate: m
289
+ onOpenChange: m,
290
+ mutate: d
285
291
  }) => {
286
- const { user: i, getAccessToken: T } = $(), x = k(null), l = k({
292
+ const { user: i, getAccessToken: T } = F(), f = M(null), l = M({
287
293
  id: "",
288
294
  timestamp: "",
289
295
  message: ""
290
- }), [o, y] = R(!1), [t, s] = R(
296
+ }), [o, y] = N(!1), [t, r] = N(
291
297
  b + B
292
- ), { state: u, dispatch: C } = D(G), {
298
+ ), { state: u, dispatch: C } = D(Y), {
293
299
  state: { provider: E },
294
- setChatId: N,
295
- setInitialMessages: v
296
- } = D(Y), { setInput: _ } = Ne(), [, g] = W({
297
- key: F + ae,
300
+ setChatId: R,
301
+ setInitialMessages: O
302
+ } = D(W), { setInput: _ } = Re(), [, g] = K({
303
+ key: G + ae,
298
304
  initialValue: u.sortDirection
299
- }), { refetch: K } = Re({
305
+ }), { refetch: j } = Ne({
300
306
  user: i?.username,
301
307
  getAccessToken: T
302
- }), j = (n) => {
308
+ }), q = (n) => {
303
309
  switch (u.sortDirection) {
304
310
  case A.ASC:
305
311
  g(A.DESC), C({
@@ -320,7 +326,7 @@ const Pe = ({
320
326
  });
321
327
  break;
322
328
  }
323
- }, q = async () => {
329
+ }, X = async () => {
324
330
  const n = l.current;
325
331
  try {
326
332
  await P({
@@ -330,31 +336,31 @@ const Pe = ({
330
336
  userId: i?.username || "",
331
337
  id: n.id
332
338
  }
333
- }), m(""), await we(oe, {
339
+ }), d(""), await ve(oe, {
334
340
  autoClose: 2e3,
335
341
  containerId: "history-table"
336
342
  });
337
343
  } catch {
338
344
  }
339
- }, X = async (n) => {
345
+ }, J = async (n) => {
340
346
  try {
341
- const f = await T(), S = await P({
342
- accessToken: f,
347
+ const x = await T(), S = await P({
348
+ accessToken: x,
343
349
  type: U.GET_CHAT,
344
350
  params: {
345
351
  id: n.id
346
352
  }
347
353
  });
348
- S.status === 200 && (S.data.provider !== E && (await Oe({
354
+ S.status === 200 && (S.data.provider !== E && (await we({
349
355
  provider: S.data.provider,
350
- accessToken: f,
356
+ accessToken: x,
351
357
  username: i?.username || ""
352
358
  }), a({
353
- type: ke,
359
+ type: Me,
354
360
  payload: {
355
361
  provider: S.data.provider
356
362
  }
357
- }), K(), await Me(
363
+ }), j(), await ke(
358
364
  `${ce} ${S.data.provider}`,
359
365
  {
360
366
  containerId: "toggle-provider"
@@ -366,31 +372,31 @@ const Pe = ({
366
372
  restoredModel: S.data?.model || "",
367
373
  restoredUsage: S.data?.tokenUsage || 0
368
374
  }
369
- }), _(""), N(n.id), v(S.data.messages), d(!1));
375
+ }), _(""), R(n.id), O(S.data.messages), m(!1));
370
376
  } catch {
371
377
  }
372
- }, J = (n) => {
378
+ }, Q = (n) => {
373
379
  l.current = {
374
380
  id: n.id,
375
381
  timestamp: n.timestamp,
376
382
  message: n.messages.length > 0 ? n.messages[0]?.content : ""
377
383
  }, y(!o);
378
- }, Q = Le((n) => {
379
- n[0].isIntersecting && s((S) => S + b);
384
+ }, Z = Le((n) => {
385
+ n[0].isIntersecting && r((S) => S + b);
380
386
  }, []);
381
- return M(() => {
387
+ return k(() => {
382
388
  const n = {
383
389
  // root: null,
384
390
  rootMargin: "20px"
385
- }, f = new IntersectionObserver(Q, n);
386
- x.current && f.observe(x.current);
387
- }), /* @__PURE__ */ h(Z, { children: [
391
+ }, x = new IntersectionObserver(Z, n);
392
+ f.current && x.observe(f.current);
393
+ }), /* @__PURE__ */ h(ee, { children: [
388
394
  /* @__PURE__ */ h(
389
395
  De,
390
396
  {
391
397
  showConfirmation: o,
392
398
  setShowConfirmation: y,
393
- action: q,
399
+ action: X,
394
400
  customStrings: {
395
401
  confirmAction: "Delete",
396
402
  cancelAction: "Cancel",
@@ -413,17 +419,17 @@ const Pe = ({
413
419
  ]
414
420
  }
415
421
  ),
416
- /* @__PURE__ */ e("div", { className: ne, children: /* @__PURE__ */ e(ve, { containerId: "history-table" }) }),
422
+ /* @__PURE__ */ e("div", { className: ne, children: /* @__PURE__ */ e(Oe, { containerId: "history-table" }) }),
417
423
  /* @__PURE__ */ e(
418
424
  $e,
419
425
  {
420
426
  filteredHistory: c,
421
427
  historyState: u,
422
428
  lastEntryToLoad: t,
423
- onClickSort: j,
424
- onClickRestore: X,
425
- onClickDelete: J,
426
- infinityScrollMarkerRef: x
429
+ onClickSort: q,
430
+ onClickRestore: J,
431
+ onClickDelete: Q,
432
+ infinityScrollMarkerRef: f
427
433
  }
428
434
  )
429
435
  ] });
@@ -431,78 +437,88 @@ const Pe = ({
431
437
  open: c,
432
438
  onOpenChange: a
433
439
  }) => {
434
- const { getAccessToken: d, user: m } = $(), { dispatch: i } = D(Y), [T, x] = R([]), l = k(null), { state: o, dispatch: y } = D(G), [t, s] = R(
440
+ const { getAccessToken: m, user: d } = F(), { dispatch: i } = D(W), [T, f] = N([]), l = M(null), { state: o, dispatch: y } = D(Y), [t, r] = N(
435
441
  o.sortDirection
436
442
  ), { data: u, refetch: C } = _e({
437
443
  enabled: c,
438
- user: m?.username || "",
444
+ user: d?.username || "",
439
445
  searchString: o.searchString,
440
446
  sortDirection: t,
441
447
  sortedCell: o.sortedCell,
442
- getAccessToken: d
443
- }), [, E] = W({
444
- key: F + ie,
448
+ getAccessToken: m
449
+ }), [, E] = K({
450
+ key: G + ie,
445
451
  initialValue: o.searchString
446
452
  });
447
- M(() => {
448
- o.sortDirection !== t && s(o.sortDirection);
449
- }, [o, t]), M(() => {
450
- u && x(u);
453
+ k(() => {
454
+ o.sortDirection !== t && r(o.sortDirection);
455
+ }, [o, t]), k(() => {
456
+ u && f(u);
451
457
  }, [u]);
452
- const N = async (g) => {
458
+ const R = async (g) => {
453
459
  E(g), y({
454
460
  type: he,
455
461
  payload: { searchString: g }
456
462
  });
457
- }, v = me((g) => {
458
- N(g.target.value.trim());
463
+ }, O = de((g) => {
464
+ R(g.target.value.trim());
459
465
  }, 500);
460
- return /* @__PURE__ */ h(be, { open: c, onOpenChange: a, title: le, children: [
461
- /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
462
- g.preventDefault();
463
- }, children: /* @__PURE__ */ e(
464
- de,
465
- {
466
- placeholder: "Search",
467
- labelHidden: !0,
468
- noBorder: !0,
469
- autoCapitalize: "off",
470
- autoComplete: "off",
471
- autoCorrect: "off",
472
- ref: l,
473
- defaultValue: o.searchString,
474
- focusMode: "light",
475
- mode: "light",
476
- name: "Search",
477
- label: "Search",
478
- onChange: v,
479
- className: "my-2",
480
- rightElement: /* @__PURE__ */ e("div", { className: "text-copy-dark", children: /* @__PURE__ */ e(
481
- O,
466
+ return /* @__PURE__ */ h(
467
+ be,
468
+ {
469
+ open: c,
470
+ onOpenChange: a,
471
+ title: le,
472
+ animation: !0,
473
+ animationType: "fade",
474
+ children: [
475
+ /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
476
+ g.preventDefault();
477
+ }, children: /* @__PURE__ */ e(
478
+ me,
482
479
  {
483
- mode: "dark",
484
- focusMode: "dark",
480
+ placeholder: "Search",
481
+ labelHidden: !0,
482
+ noBorder: !0,
483
+ autoCapitalize: "off",
484
+ autoComplete: "off",
485
+ autoCorrect: "off",
486
+ ref: l,
487
+ defaultValue: o.searchString,
488
+ focusMode: "light",
489
+ mode: "light",
490
+ name: "Search",
485
491
  label: "Search",
486
- size: "small",
487
- onClick: () => {
488
- N(""), l.current?.value && (l.current.value = "", l.current.focus());
489
- },
490
- disabled: o.searchString === "",
491
- children: o.searchString !== "" ? /* @__PURE__ */ e(ze, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ e(Ve, { monotone: !0, size: "size-3" })
492
+ onChange: O,
493
+ className: "my-2",
494
+ rightElement: /* @__PURE__ */ e("div", { className: "text-copy-dark", children: /* @__PURE__ */ e(
495
+ w,
496
+ {
497
+ mode: "dark",
498
+ focusMode: "dark",
499
+ label: "Search",
500
+ size: "small",
501
+ onClick: () => {
502
+ R(""), l.current?.value && (l.current.value = "", l.current.focus());
503
+ },
504
+ disabled: o.searchString === "",
505
+ children: o.searchString !== "" ? /* @__PURE__ */ e(ze, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ e(Ve, { monotone: !0, size: "size-3" })
506
+ }
507
+ ) })
508
+ }
509
+ ) }),
510
+ /* @__PURE__ */ e("div", { className: "flex flex-col sm:flex-row max-h-[75vh] min-h-[60vh]", children: /* @__PURE__ */ e(
511
+ Fe,
512
+ {
513
+ mutate: C,
514
+ filteredHistory: T,
515
+ dispatch: i,
516
+ onOpenChange: a
492
517
  }
493
518
  ) })
494
- }
495
- ) }),
496
- /* @__PURE__ */ e("div", { className: "flex flex-col sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ e(
497
- Fe,
498
- {
499
- mutate: C,
500
- filteredHistory: T,
501
- dispatch: i,
502
- onOpenChange: a
503
- }
504
- ) })
505
- ] });
519
+ ]
520
+ }
521
+ );
506
522
  };
507
523
  export {
508
524
  je as HistoryPanel
@@ -1,4 +1,4 @@
1
- import { createContext as xe, createSignal as z, onMount as Dt, createEffect as B, createMemo as q, createComponent as m, Portal as qo, memo as me, Show as R, template as _, insert as k, createRenderEffect as N, className as A, clearDelegatedEvents as bs, delegateEvents as ir, useContext as we, onCleanup as U, sortFns as Hn, mutationSortFns as Vn, on as ct, setAttribute as D, getSidedProp as xs, use as Dn, batch as ws, getQueryStatusLabel as Ot, getMutationStatusColor as Rt, getQueryStatusColor as $s, getQueryStatusColorByLabel as Cs, displayValue as xn, For as Ss, convertRemToPixels as Kr, untrack as Kt, useTransition as ks, spread as Es, mergeProps as j, createRoot as Br, serialize as Ms, Index as Ds, updateNestedDataByPath as sr, addEventListener as As, stringify as Ts, Match as zn, Switch as Fs, deleteNestedDataByPath as Is, createUniqueId as Be, splitProps as X, Dynamic as Ps, createComputed as Ls, getPreferredColorScheme as Os } from "./index.z_UzkUf2.js";
1
+ import { createContext as xe, createSignal as z, onMount as Dt, createEffect as B, createMemo as q, createComponent as m, Portal as qo, memo as me, Show as R, template as _, insert as k, createRenderEffect as N, className as A, clearDelegatedEvents as bs, delegateEvents as ir, useContext as we, onCleanup as U, sortFns as Hn, mutationSortFns as Vn, on as ct, setAttribute as D, getSidedProp as xs, use as Dn, batch as ws, getQueryStatusLabel as Ot, getMutationStatusColor as Rt, getQueryStatusColor as $s, getQueryStatusColorByLabel as Cs, displayValue as xn, For as Ss, convertRemToPixels as Kr, untrack as Kt, useTransition as ks, spread as Es, mergeProps as j, createRoot as Br, serialize as Ms, Index as Ds, updateNestedDataByPath as sr, addEventListener as As, stringify as Ts, Match as zn, Switch as Fs, deleteNestedDataByPath as Is, createUniqueId as Be, splitProps as X, Dynamic as Ps, createComputed as Ls, getPreferredColorScheme as Os } from "./index.hnWr_yax.js";
2
2
  var qs = (e) => e != null, _s = (e) => e.filter(qs);
3
3
  function Rs(e) {
4
4
  return (...t) => {
@@ -0,0 +1,60 @@
1
+ import { jsxs as t, Fragment as m, jsx as e } from "react/jsx-runtime";
2
+ import { i as h, nt as S, tt as R } from "./App.B3HHM3MY.js";
3
+ import { n as u, S as a, renderDataAsList as N, CARDS as r, isTauri as P, ue as T, l as E, L as p, j as l, PROFILE_TITLE as C } from "./index.hnWr_yax.js";
4
+ const A = () => {
5
+ const { isAuthenticated: n, user: i, registeringForPasskey: o, authenticationType: c } = u(), d = h(), s = i?.username || "";
6
+ return n && s ? /* @__PURE__ */ t(m, { children: [
7
+ /* @__PURE__ */ e(
8
+ a,
9
+ {
10
+ header: r.PREFERENCES.TITLE,
11
+ className: "prose-dark dark:prose-lighter",
12
+ noBorder: !0,
13
+ children: N(d, {
14
+ [r.PREFERENCES.NAME]: s,
15
+ [r.PREFERENCES.EMAIL]: i?.email || ""
16
+ })
17
+ }
18
+ ),
19
+ c !== S.PASSKEY && !P() && /* @__PURE__ */ t(
20
+ a,
21
+ {
22
+ className: "prose-dark dark:prose-lighter mt-4",
23
+ noBorder: !0,
24
+ header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ t(p, { columnGap: 3, alignVertical: "center", children: [
25
+ /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(E, { size: "size-8" }) }),
26
+ /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { children: r.PREFERENCES.PASSKEY_TITLE }) })
27
+ ] }) }),
28
+ children: [
29
+ /* @__PURE__ */ e("p", { children: r.PREFERENCES.PASSKEY_INSTRUCTIONS }),
30
+ /* @__PURE__ */ e(
31
+ T,
32
+ {
33
+ size: "small",
34
+ className: "mt-2",
35
+ onClick: o,
36
+ labelLeft: r.PREFERENCES.PASSKEY_BUTTON,
37
+ children: /* @__PURE__ */ e(E, { size: "size-5", monotone: !0 })
38
+ }
39
+ )
40
+ ]
41
+ }
42
+ )
43
+ ] }) : null;
44
+ }, f = ({
45
+ open: n,
46
+ onOpenChange: i
47
+ }) => /* @__PURE__ */ e(
48
+ R,
49
+ {
50
+ open: n,
51
+ onOpenChange: i,
52
+ title: C,
53
+ animation: !0,
54
+ animationType: "fade",
55
+ children: /* @__PURE__ */ e(A, {})
56
+ }
57
+ );
58
+ export {
59
+ f as Profile
60
+ };