@versini/sassysaint 5.4.7 → 5.4.9

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,3039 +0,0 @@
1
- import { jsx as r, jsxs as y, Fragment as S } from "react/jsx-runtime";
2
- import { g as L, E as M, CARDS as T, renderDataAsList as re, pluralize as he, AppContext as se, ABOUT_TITLE as zt, DEFAULT_AI_ENGINE as te, numberFormatter as Ft, durationFormatter as Xe, NA as Gt, ROLE_ASSISTANT as Ht, extractAverage as Ut, GPT4_MAX_TOKENS as jt, un as W, STATS as Je, b as q, j as A, R as F, HistoryContext as et, LOCAL_STORAGE_PREFIX as ie, LOCAL_STORAGE_SORT as Kt, O as j, ACTION_RESET as tt, ACTION_RESTORE as Wt, truncate as Yt, ACTION_SORT as De, LOCAL_STORAGE_SEARCH as qt, fe as Te, ACTION_SEARCH as Zt, debounce as Qt, HISTORY_TITLE as Xt, LOCAL_STORAGE_ENGINE_TOGGLE as ot, ENGINE_OPENAI as we, ENGINE_ANTHROPIC as me, APP_NAME as Jt, ACTION_ENGINE as rt, getCurrentGeoLocation as eo, TagsContext as to, TAGS_DESCRIPTION as oo, ACTION_SET_TAGS as ro, LOCAL_STORAGE_CHAT_DETAILS as no, M as ao, v as ze, PROFILE_TITLE as so, LOG_OUT as Fe } from "./index.VTwhsE7D.js";
3
- import { serviceCall as V, SERVICE_TYPES as D, E as ce, ge as io, he as co, ue as Ne, pe as lo, se as z, me as uo, be as mo, y as U, $e as Ge, m as He } from "./index.B5TWwDVi.js";
4
- import * as f from "react";
5
- import _, { useId as Ae, forwardRef as nt, useState as x, useRef as Z, useContext as P, useEffect as G } from "react";
6
- import C from "clsx";
7
- import { useFloatingTree as at, useFloatingNodeId as ho, useListItem as st, useFloating as it, offset as po, flip as go, shift as fo, autoUpdate as bo, useClick as ct, useRole as lt, useDismiss as dt, useListNavigation as vo, useTypeahead as yo, useInteractions as ut, useMergeRefs as Me, FloatingNode as ko, FloatingList as Co, FloatingPortal as mt, FloatingFocusManager as ht, FloatingTree as wo, FloatingOverlay as No } from "@floating-ui/react";
8
- const pt = ({
9
- className: e,
10
- viewBox: t,
11
- spacing: o,
12
- title: n,
13
- monotone: a,
14
- ...s
15
- }) => /* @__PURE__ */ r(
16
- L,
17
- {
18
- defaultViewBox: "0 0 256 176",
19
- defaultClassName: "size-5",
20
- viewBox: t,
21
- className: e,
22
- spacing: o,
23
- title: n || "Anthropic",
24
- ...s,
25
- children: /* @__PURE__ */ r("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
26
- }
27
- ), Io = ({
28
- className: e,
29
- viewBox: t,
30
- spacing: o,
31
- title: n,
32
- monotone: a,
33
- ...s
34
- }) => /* @__PURE__ */ y(
35
- L,
36
- {
37
- defaultViewBox: "0 0 512 512",
38
- defaultClassName: "size-5",
39
- viewBox: t,
40
- className: e,
41
- spacing: o,
42
- title: n || "Back",
43
- ...s,
44
- children: [
45
- /* @__PURE__ */ r(
46
- "path",
47
- {
48
- opacity: a ? "1" : "0.4",
49
- d: "M288.4 93.4c2.9-17.4 19.4-29.2 36.9-26.3C431.3 84.9 512 177 512 288c0 123.7-100.3 224-224 224C177 512 84.9 431.3 67.1 325.3c-2.9-17.4 8.8-33.9 26.3-36.9s33.9 8.8 36.9 26.3C142.9 390.4 208.8 448 288 448c88.4 0 160-71.6 160-160c0-79.2-57.6-145.1-133.3-157.8c-17.4-2.9-29.2-19.4-26.3-36.9z"
50
- }
51
- ),
52
- /* @__PURE__ */ r("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
53
- ]
54
- }
55
- ), To = ({
56
- className: e,
57
- viewBox: t,
58
- spacing: o,
59
- title: n,
60
- monotone: a,
61
- ...s
62
- }) => /* @__PURE__ */ y(
63
- L,
64
- {
65
- defaultViewBox: "0 0 448 512",
66
- defaultClassName: "size-5",
67
- viewBox: t,
68
- className: e,
69
- spacing: o,
70
- title: n || "Chart",
71
- ...s,
72
- children: [
73
- /* @__PURE__ */ r(
74
- "path",
75
- {
76
- opacity: a ? "1" : "0.4",
77
- d: "M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80z"
78
- }
79
- ),
80
- /* @__PURE__ */ r("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
81
- ]
82
- }
83
- ), _o = ({
84
- className: e,
85
- viewBox: t,
86
- spacing: o,
87
- title: n,
88
- monotone: a,
89
- ...s
90
- }) => /* @__PURE__ */ y(
91
- L,
92
- {
93
- defaultViewBox: "0 0 448 512",
94
- defaultClassName: "size-5",
95
- viewBox: t,
96
- className: e,
97
- spacing: o,
98
- title: n || "Delete",
99
- ...s,
100
- children: [
101
- /* @__PURE__ */ r(
102
- "path",
103
- {
104
- opacity: a ? "1" : "0.4",
105
- d: "M416 96H32V448c0 35.3 28.7 64 64 64H352c35.3 0 64-28.7 64-64V96zM144 176V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16z"
106
- }
107
- ),
108
- /* @__PURE__ */ r("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 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
109
- ]
110
- }
111
- ), Eo = ({
112
- className: e,
113
- viewBox: t,
114
- spacing: o,
115
- title: n,
116
- monotone: a,
117
- ...s
118
- }) => /* @__PURE__ */ y(
119
- L,
120
- {
121
- defaultViewBox: "0 0 512 512",
122
- defaultClassName: "size-5",
123
- viewBox: t,
124
- className: e,
125
- spacing: o,
126
- title: n || "History",
127
- ...s,
128
- children: [
129
- /* @__PURE__ */ r(
130
- "path",
131
- {
132
- opacity: a ? "1" : "0.4",
133
- d: "M120.2 120.2C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8z"
134
- }
135
- ),
136
- /* @__PURE__ */ r("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
137
- ]
138
- }
139
- ), xo = ({
140
- className: e,
141
- viewBox: t,
142
- spacing: o,
143
- title: n,
144
- monotone: a,
145
- ...s
146
- }) => /* @__PURE__ */ y(
147
- L,
148
- {
149
- defaultViewBox: "0 0 512 512",
150
- defaultClassName: "size-5",
151
- viewBox: t,
152
- className: e,
153
- spacing: o,
154
- title: n || "Info",
155
- ...s,
156
- children: [
157
- /* @__PURE__ */ r(
158
- "path",
159
- {
160
- opacity: "0.4",
161
- d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"
162
- }
163
- ),
164
- /* @__PURE__ */ r("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
165
- ]
166
- }
167
- ), gt = ({
168
- className: e,
169
- viewBox: t,
170
- spacing: o,
171
- title: n,
172
- monotone: a,
173
- ...s
174
- }) => /* @__PURE__ */ r(
175
- L,
176
- {
177
- defaultViewBox: "0 0 24 24",
178
- defaultClassName: "size-5",
179
- viewBox: t,
180
- className: e,
181
- spacing: o,
182
- title: n || "OpenAI",
183
- ...s,
184
- children: /* @__PURE__ */ r(
185
- "path",
186
- {
187
- fill: "currentColor",
188
- d: "M22.282 9.821a6 6 0 0 0-.516-4.91a6.05 6.05 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a6 6 0 0 0-3.998 2.9a6.05 6.05 0 0 0 .743 7.097a5.98 5.98 0 0 0 .51 4.911a6.05 6.05 0 0 0 6.515 2.9A6 6 0 0 0 13.26 24a6.06 6.06 0 0 0 5.772-4.206a6 6 0 0 0 3.997-2.9a6.06 6.06 0 0 0-.747-7.073M13.26 22.43a4.48 4.48 0 0 1-2.876-1.04l.141-.081l4.779-2.758a.8.8 0 0 0 .392-.681v-6.737l2.02 1.168a.07.07 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494M3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085l4.783 2.759a.77.77 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646M2.34 7.896a4.5 4.5 0 0 1 2.366-1.973V11.6a.77.77 0 0 0 .388.677l5.815 3.354l-2.02 1.168a.08.08 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.08.08 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667m2.01-3.023l-.141-.085l-4.774-2.782a.78.78 0 0 0-.785 0L9.409 9.23V6.897a.07.07 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.8.8 0 0 0-.393.681zm1.097-2.365l2.602-1.5l2.607 1.5v2.999l-2.597 1.5l-2.607-1.5Z"
189
- }
190
- )
191
- }
192
- ), So = ({
193
- className: e,
194
- viewBox: t,
195
- spacing: o,
196
- title: n,
197
- monotone: a,
198
- ...s
199
- }) => /* @__PURE__ */ y(
200
- L,
201
- {
202
- defaultViewBox: "0 0 576 512",
203
- defaultClassName: "size-5",
204
- viewBox: t,
205
- className: e,
206
- spacing: o,
207
- title: n || "Profile",
208
- ...s,
209
- children: [
210
- /* @__PURE__ */ r(
211
- "path",
212
- {
213
- opacity: "0.4",
214
- d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 256h64c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zm256-32H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16z"
215
- }
216
- ),
217
- /* @__PURE__ */ r("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
218
- ]
219
- }
220
- ), Ro = ({
221
- className: e,
222
- viewBox: t,
223
- spacing: o,
224
- title: n,
225
- monotone: a,
226
- ...s
227
- }) => /* @__PURE__ */ y(
228
- L,
229
- {
230
- defaultViewBox: "0 0 512 512",
231
- defaultClassName: "size-5",
232
- viewBox: t,
233
- className: e,
234
- spacing: o,
235
- title: n || "Restore",
236
- ...s,
237
- children: [
238
- /* @__PURE__ */ r(
239
- "path",
240
- {
241
- opacity: a ? "1" : "0.4",
242
- d: "M208 64H432c8.8 0 16 7.2 16 16V304c0 8.8-7.2 16-16 16H416v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80V96h64V80c0-8.8 7.2-16 16-16z"
243
- }
244
- ),
245
- /* @__PURE__ */ r("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
246
- ]
247
- }
248
- ), Ao = ({
249
- className: e,
250
- viewBox: t,
251
- spacing: o,
252
- title: n,
253
- monotone: a,
254
- ...s
255
- }) => /* @__PURE__ */ r(
256
- L,
257
- {
258
- defaultViewBox: "0 0 448 512",
259
- defaultClassName: "size-5",
260
- viewBox: t,
261
- className: e,
262
- spacing: o,
263
- title: n || "Settings",
264
- ...s,
265
- children: /* @__PURE__ */ r("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
266
- }
267
- );
268
- function ne(e) {
269
- return Ae();
270
- }
271
- const _e = f.createContext({
272
- getItemProps: () => ({}),
273
- activeIndex: null,
274
- /* v8 ignore next 2 */
275
- setActiveIndex: () => {
276
- },
277
- setHasFocusInside: () => {
278
- },
279
- isOpen: !1
280
- }), Ue = (e) => {
281
- if (typeof e == "string")
282
- return e;
283
- if (typeof e == "function")
284
- return e.displayName || e.name || "Component";
285
- if (typeof e == "object" && e !== null && "type" in e) {
286
- const t = e.type;
287
- if (typeof t == "function" || typeof t == "object")
288
- return t.displayName || t.name || "Component";
289
- }
290
- return "Element";
291
- }, ft = nt(
292
- ({
293
- trigger: e,
294
- children: t,
295
- label: o = "Open menu",
296
- defaultPlacement: n = "bottom-start",
297
- onOpenChange: a,
298
- spacing: s,
299
- mode: i = "system",
300
- focusMode: c = "system",
301
- ...p
302
- }, m) => {
303
- const [l, g] = x(!1), [v, h] = x(!1), [u, d] = x(null), b = Z([]), k = Z([]), w = P(_e), I = at(), E = ho(), R = st(), { floatingStyles: $, refs: O, context: N } = it({
304
- nodeId: E,
305
- open: l,
306
- onOpenChange: (J) => {
307
- g(J), a == null || a(J);
308
- },
309
- placement: n,
310
- strategy: "fixed",
311
- middleware: [po({ mainAxis: 10 }), go(), fo()],
312
- whileElementsMounted: bo
313
- }), le = ct(N, {
314
- event: "mousedown",
315
- toggle: !0,
316
- ignoreMouse: !1
317
- }), de = lt(N, { role: "menu" }), X = dt(N, { bubbles: !0 }), ye = vo(N, {
318
- listRef: b,
319
- activeIndex: u,
320
- nested: !1,
321
- onNavigate: d,
322
- loop: !0
323
- }), ke = yo(N, {
324
- listRef: k,
325
- onMatch: l ? d : void 0,
326
- activeIndex: u
327
- }), { getReferenceProps: Ce, getFloatingProps: B, getItemProps: Bt } = ut([le, de, X, ye, ke]), Ve = Ue(e) === "Button" || Ue(e) === "ButtonIcon", Vt = Ve ? {
328
- noInternalClick: Ve,
329
- focusMode: c,
330
- mode: i,
331
- spacing: s
332
- } : {}, Dt = _.cloneElement(
333
- e,
334
- {
335
- ...Vt,
336
- "aria-label": o,
337
- "data-open": l ? "" : void 0,
338
- "data-focus-inside": v ? "" : void 0,
339
- ref: Me([O.setReference, R.ref, m]),
340
- ...Ce(
341
- w.getItemProps({
342
- ...p
343
- })
344
- )
345
- }
346
- );
347
- return G(() => {
348
- if (!I)
349
- return;
350
- function J() {
351
- g(!1), a == null || a(!1);
352
- }
353
- return I.events.on("click", J), () => {
354
- I.events.off("click", J);
355
- };
356
- }, [I, a]), G(() => {
357
- l && I && I.events.emit("menuopen", { nodeId: E });
358
- }, [I, l, E]), /* @__PURE__ */ y(ko, { id: E, children: [
359
- Dt,
360
- /* @__PURE__ */ r(
361
- _e.Provider,
362
- {
363
- value: {
364
- activeIndex: u,
365
- setActiveIndex: d,
366
- getItemProps: Bt,
367
- setHasFocusInside: h,
368
- isOpen: l
369
- },
370
- children: /* @__PURE__ */ r(Co, { elementsRef: b, labelsRef: k, children: l && /* @__PURE__ */ r(mt, { children: /* @__PURE__ */ r(
371
- ht,
372
- {
373
- context: N,
374
- modal: !1,
375
- initialFocus: 0,
376
- returnFocus: !0,
377
- children: /* @__PURE__ */ r(
378
- "div",
379
- {
380
- ref: O.setFloating,
381
- className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
382
- style: $,
383
- ...B(),
384
- children: t
385
- }
386
- )
387
- }
388
- ) }) })
389
- }
390
- )
391
- ] });
392
- }
393
- ), Ee = nt((e, t) => /* @__PURE__ */ r(wo, { children: /* @__PURE__ */ r(ft, { ...e, ref: t }) }));
394
- Ee.displayName = "Menu";
395
- ft.displayName = "MenuComponent";
396
- const H = f.forwardRef(
397
- ({
398
- label: e,
399
- disabled: t,
400
- icon: o,
401
- raw: n = !1,
402
- children: a,
403
- ignoreClick: s = !1,
404
- ...i
405
- }, c) => {
406
- let p = "";
407
- const m = f.useContext(_e), l = st({ label: t ? null : e }), g = at(), v = Me([l.ref, c]);
408
- return n && a ? /* @__PURE__ */ r(
409
- "div",
410
- {
411
- role: "menuitem",
412
- ...m.getItemProps({
413
- onClick(h) {
414
- var u;
415
- s || ((u = i.onClick) == null || u.call(i, h), g == null || g.events.emit("click"));
416
- }
417
- }),
418
- children: a
419
- }
420
- ) : (o && (p = "pl-2"), /* @__PURE__ */ y(
421
- "button",
422
- {
423
- ...i,
424
- ref: v,
425
- role: "menuitem",
426
- className: "m-0 flex w-full rounded-md border border-transparent bg-none px-2 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
427
- tabIndex: 0,
428
- disabled: t,
429
- ...m.getItemProps({
430
- onClick(h) {
431
- var u;
432
- s || ((u = i.onClick) == null || u.call(i, h), g == null || g.events.emit("click"));
433
- },
434
- onFocus(h) {
435
- var u;
436
- (u = i.onFocus) == null || u.call(i, h), m.setHasFocusInside(!0);
437
- }
438
- }),
439
- children: [
440
- o,
441
- e && /* @__PURE__ */ r("span", { className: p, children: e })
442
- ]
443
- }
444
- ));
445
- }
446
- );
447
- H.displayName = "MenuItem";
448
- const Mo = ({ className: e, ...t }) => {
449
- const o = C(e, "my-1 border-t border-border-medium");
450
- return /* @__PURE__ */ r("div", { className: o, ...t });
451
- };
452
- /*!
453
- @versini/ui-menu v1.4.1
454
- © 2024 gizmette.com
455
- */
456
- try {
457
- window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
458
- version: "1.4.1",
459
- buildTime: "12/27/2024 07:18 PM EST",
460
- homepage: "https://github.com/aversini/ui-components",
461
- license: "MIT"
462
- });
463
- } catch {
464
- }
465
- /*!
466
- @versini/ui-togglegroup v1.5.0
467
- © 2024 gizmette.com
468
- */
469
- try {
470
- window.__VERSINI_UI_TOGGLEGROUP__ || (window.__VERSINI_UI_TOGGLEGROUP__ = {
471
- version: "1.5.0",
472
- buildTime: "12/26/2024 06:05 PM EST",
473
- homepage: "https://github.com/aversini/ui-components",
474
- license: "MIT"
475
- });
476
- } catch {
477
- }
478
- const Po = "av-togglegroup", Lo = "av-togglegroup-item-wrapper", $o = "av-togglegroup-item";
479
- function Pe(e, t = []) {
480
- let o = [];
481
- function n(s, i) {
482
- const c = f.createContext(i), p = o.length;
483
- o = [...o, i];
484
- const m = (g) => {
485
- var v;
486
- const { scope: h, children: u, ...d } = g, b = ((v = h == null ? void 0 : h[e]) == null ? void 0 : v[p]) || c, k = f.useMemo(() => d, Object.values(d));
487
- return /* @__PURE__ */ r(b.Provider, { value: k, children: u });
488
- };
489
- m.displayName = s + "Provider";
490
- function l(g, v) {
491
- var h;
492
- const u = ((h = v == null ? void 0 : v[e]) == null ? void 0 : h[p]) || c, d = f.useContext(u);
493
- if (d) return d;
494
- if (i !== void 0) return i;
495
- throw new Error(`\`${g}\` must be used within \`${s}\``);
496
- }
497
- return [m, l];
498
- }
499
- const a = () => {
500
- const s = o.map((i) => f.createContext(i));
501
- return function(i) {
502
- const c = (i == null ? void 0 : i[e]) || s;
503
- return f.useMemo(
504
- () => ({ [`__scope${e}`]: { ...i, [e]: c } }),
505
- [i, c]
506
- );
507
- };
508
- };
509
- return a.scopeName = e, [n, Oo(a, ...t)];
510
- }
511
- function Oo(...e) {
512
- const t = e[0];
513
- if (e.length === 1) return t;
514
- const o = () => {
515
- const n = e.map((a) => ({
516
- useScope: a(),
517
- scopeName: a.scopeName
518
- }));
519
- return function(a) {
520
- const s = n.reduce((i, { useScope: c, scopeName: p }) => {
521
- const m = c(a)[`__scope${p}`];
522
- return { ...i, ...m };
523
- }, {});
524
- return f.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
525
- };
526
- };
527
- return o.scopeName = t.scopeName, o;
528
- }
529
- function je(e, t) {
530
- if (typeof e == "function")
531
- return e(t);
532
- e != null && (e.current = t);
533
- }
534
- function bt(...e) {
535
- return (t) => {
536
- let o = !1;
537
- const n = e.map((a) => {
538
- const s = je(a, t);
539
- return !o && typeof s == "function" && (o = !0), s;
540
- });
541
- if (o)
542
- return () => {
543
- for (let a = 0; a < n.length; a++) {
544
- const s = n[a];
545
- typeof s == "function" ? s() : je(e[a], null);
546
- }
547
- };
548
- };
549
- }
550
- function xe(...e) {
551
- return f.useCallback(bt(...e), e);
552
- }
553
- var pe = f.forwardRef((e, t) => {
554
- const { children: o, ...n } = e, a = f.Children.toArray(o), s = a.find(Vo);
555
- if (s) {
556
- const i = s.props.children, c = a.map((p) => p === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : p);
557
- return /* @__PURE__ */ r(Se, { ...n, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, c) : null });
558
- }
559
- return /* @__PURE__ */ r(Se, { ...n, ref: t, children: o });
560
- });
561
- pe.displayName = "Slot";
562
- var Se = f.forwardRef((e, t) => {
563
- const { children: o, ...n } = e;
564
- if (f.isValidElement(o)) {
565
- const a = zo(o);
566
- return f.cloneElement(o, {
567
- ...Do(n, o.props),
568
- // @ts-ignore
569
- ref: t ? bt(t, a) : a
570
- });
571
- }
572
- return f.Children.count(o) > 1 ? f.Children.only(null) : null;
573
- });
574
- Se.displayName = "SlotClone";
575
- var Bo = ({ children: e }) => /* @__PURE__ */ r(S, { children: e });
576
- function Vo(e) {
577
- return f.isValidElement(e) && e.type === Bo;
578
- }
579
- function Do(e, t) {
580
- const o = { ...t };
581
- for (const n in t) {
582
- const a = e[n], s = t[n];
583
- /^on[A-Z]/.test(n) ? a && s ? o[n] = (...i) => {
584
- s(...i), a(...i);
585
- } : a && (o[n] = a) : n === "style" ? o[n] = { ...a, ...s } : n === "className" && (o[n] = [a, s].filter(Boolean).join(" "));
586
- }
587
- return { ...e, ...o };
588
- }
589
- function zo(e) {
590
- var t, o;
591
- let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = n && "isReactWarning" in n && n.isReactWarning;
592
- return a ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, a = n && "isReactWarning" in n && n.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
593
- }
594
- var Fo = [
595
- "a",
596
- "button",
597
- "div",
598
- "form",
599
- "h2",
600
- "h3",
601
- "img",
602
- "input",
603
- "label",
604
- "li",
605
- "nav",
606
- "ol",
607
- "p",
608
- "span",
609
- "svg",
610
- "ul"
611
- ], ae = Fo.reduce((e, t) => {
612
- const o = f.forwardRef((n, a) => {
613
- const { asChild: s, ...i } = n, c = s ? pe : t;
614
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(c, { ...i, ref: a });
615
- });
616
- return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
617
- }, {});
618
- function K(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
619
- return function(n) {
620
- if (e == null || e(n), o === !1 || !n.defaultPrevented)
621
- return t == null ? void 0 : t(n);
622
- };
623
- }
624
- function Go(e) {
625
- const t = e + "CollectionProvider", [o, n] = Pe(t), [a, s] = o(
626
- t,
627
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
628
- ), i = (h) => {
629
- const { scope: u, children: d } = h, b = _.useRef(null), k = _.useRef(/* @__PURE__ */ new Map()).current;
630
- return /* @__PURE__ */ r(a, { scope: u, itemMap: k, collectionRef: b, children: d });
631
- };
632
- i.displayName = t;
633
- const c = e + "CollectionSlot", p = _.forwardRef(
634
- (h, u) => {
635
- const { scope: d, children: b } = h, k = s(c, d), w = xe(u, k.collectionRef);
636
- return /* @__PURE__ */ r(pe, { ref: w, children: b });
637
- }
638
- );
639
- p.displayName = c;
640
- const m = e + "CollectionItemSlot", l = "data-radix-collection-item", g = _.forwardRef(
641
- (h, u) => {
642
- const { scope: d, children: b, ...k } = h, w = _.useRef(null), I = xe(u, w), E = s(m, d);
643
- return _.useEffect(() => (E.itemMap.set(w, { ref: w, ...k }), () => void E.itemMap.delete(w))), /* @__PURE__ */ r(pe, { [l]: "", ref: I, children: b });
644
- }
645
- );
646
- g.displayName = m;
647
- function v(h) {
648
- const u = s(e + "CollectionConsumer", h);
649
- return _.useCallback(() => {
650
- const d = u.collectionRef.current;
651
- if (!d) return [];
652
- const b = Array.from(d.querySelectorAll(`[${l}]`));
653
- return Array.from(u.itemMap.values()).sort(
654
- (k, w) => b.indexOf(k.ref.current) - b.indexOf(w.ref.current)
655
- );
656
- }, [u.collectionRef, u.itemMap]);
657
- }
658
- return [
659
- { Provider: i, Slot: p, ItemSlot: g },
660
- v,
661
- n
662
- ];
663
- }
664
- var Ho = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
665
- }, Uo = f.useId || (() => {
666
- }), jo = 0;
667
- function Ko(e) {
668
- const [t, o] = f.useState(Uo());
669
- return Ho(() => {
670
- o((n) => n ?? String(jo++));
671
- }, [e]), t ? `radix-${t}` : "";
672
- }
673
- function Le(e) {
674
- const t = f.useRef(e);
675
- return f.useEffect(() => {
676
- t.current = e;
677
- }), f.useMemo(() => (...o) => {
678
- var n;
679
- return (n = t.current) == null ? void 0 : n.call(t, ...o);
680
- }, []);
681
- }
682
- function fe({
683
- prop: e,
684
- defaultProp: t,
685
- onChange: o = () => {
686
- }
687
- }) {
688
- const [n, a] = Wo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : n, c = Le(o), p = f.useCallback(
689
- (m) => {
690
- if (s) {
691
- const l = typeof m == "function" ? m(e) : m;
692
- l !== e && c(l);
693
- } else
694
- a(m);
695
- },
696
- [s, e, a, c]
697
- );
698
- return [i, p];
699
- }
700
- function Wo({
701
- defaultProp: e,
702
- onChange: t
703
- }) {
704
- const o = f.useState(e), [n] = o, a = f.useRef(n), s = Le(t);
705
- return f.useEffect(() => {
706
- a.current !== n && (s(n), a.current = n);
707
- }, [n, a, s]), o;
708
- }
709
- var Yo = f.createContext(void 0);
710
- function vt(e) {
711
- const t = f.useContext(Yo);
712
- return e || t || "ltr";
713
- }
714
- var Ie = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, be = "RovingFocusGroup", [Re, yt, Zo] = Go(be), [Qo, kt] = Pe(
715
- be,
716
- [Zo]
717
- ), [Xo, Jo] = Qo(be), Ct = f.forwardRef(
718
- (e, t) => /* @__PURE__ */ r(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Re.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(er, { ...e, ref: t }) }) })
719
- );
720
- Ct.displayName = be;
721
- var er = f.forwardRef((e, t) => {
722
- const {
723
- __scopeRovingFocusGroup: o,
724
- orientation: n,
725
- loop: a = !1,
726
- dir: s,
727
- currentTabStopId: i,
728
- defaultCurrentTabStopId: c,
729
- onCurrentTabStopIdChange: p,
730
- onEntryFocus: m,
731
- preventScrollOnEntryFocus: l = !1,
732
- ...g
733
- } = e, v = f.useRef(null), h = xe(t, v), u = vt(s), [d = null, b] = fe({
734
- prop: i,
735
- defaultProp: c,
736
- onChange: p
737
- }), [k, w] = f.useState(!1), I = Le(m), E = yt(o), R = f.useRef(!1), [$, O] = f.useState(0);
738
- return f.useEffect(() => {
739
- const N = v.current;
740
- if (N)
741
- return N.addEventListener(Ie, I), () => N.removeEventListener(Ie, I);
742
- }, [I]), /* @__PURE__ */ r(
743
- Xo,
744
- {
745
- scope: o,
746
- orientation: n,
747
- dir: u,
748
- loop: a,
749
- currentTabStopId: d,
750
- onItemFocus: f.useCallback(
751
- (N) => b(N),
752
- [b]
753
- ),
754
- onItemShiftTab: f.useCallback(() => w(!0), []),
755
- onFocusableItemAdd: f.useCallback(
756
- () => O((N) => N + 1),
757
- []
758
- ),
759
- onFocusableItemRemove: f.useCallback(
760
- () => O((N) => N - 1),
761
- []
762
- ),
763
- children: /* @__PURE__ */ r(
764
- ae.div,
765
- {
766
- tabIndex: k || $ === 0 ? -1 : 0,
767
- "data-orientation": n,
768
- ...g,
769
- ref: h,
770
- style: { outline: "none", ...e.style },
771
- onMouseDown: K(e.onMouseDown, () => {
772
- R.current = !0;
773
- }),
774
- onFocus: K(e.onFocus, (N) => {
775
- const le = !R.current;
776
- if (N.target === N.currentTarget && le && !k) {
777
- const de = new CustomEvent(Ie, qo);
778
- if (N.currentTarget.dispatchEvent(de), !de.defaultPrevented) {
779
- const X = E().filter((B) => B.focusable), ye = X.find((B) => B.active), ke = X.find((B) => B.id === d), Ce = [ye, ke, ...X].filter(
780
- Boolean
781
- ).map((B) => B.ref.current);
782
- It(Ce, l);
783
- }
784
- }
785
- R.current = !1;
786
- }),
787
- onBlur: K(e.onBlur, () => w(!1))
788
- }
789
- )
790
- }
791
- );
792
- }), wt = "RovingFocusGroupItem", Nt = f.forwardRef(
793
- (e, t) => {
794
- const {
795
- __scopeRovingFocusGroup: o,
796
- focusable: n = !0,
797
- active: a = !1,
798
- tabStopId: s,
799
- ...i
800
- } = e, c = Ko(), p = s || c, m = Jo(wt, o), l = m.currentTabStopId === p, g = yt(o), { onFocusableItemAdd: v, onFocusableItemRemove: h } = m;
801
- return f.useEffect(() => {
802
- if (n)
803
- return v(), () => h();
804
- }, [n, v, h]), /* @__PURE__ */ r(
805
- Re.ItemSlot,
806
- {
807
- scope: o,
808
- id: p,
809
- focusable: n,
810
- active: a,
811
- children: /* @__PURE__ */ r(
812
- ae.span,
813
- {
814
- tabIndex: l ? 0 : -1,
815
- "data-orientation": m.orientation,
816
- ...i,
817
- ref: t,
818
- onMouseDown: K(e.onMouseDown, (u) => {
819
- n ? m.onItemFocus(p) : u.preventDefault();
820
- }),
821
- onFocus: K(e.onFocus, () => m.onItemFocus(p)),
822
- onKeyDown: K(e.onKeyDown, (u) => {
823
- if (u.key === "Tab" && u.shiftKey) {
824
- m.onItemShiftTab();
825
- return;
826
- }
827
- if (u.target !== u.currentTarget) return;
828
- const d = rr(u, m.orientation, m.dir);
829
- if (d !== void 0) {
830
- if (u.metaKey || u.ctrlKey || u.altKey || u.shiftKey) return;
831
- u.preventDefault();
832
- let b = g().filter((k) => k.focusable).map((k) => k.ref.current);
833
- if (d === "last") b.reverse();
834
- else if (d === "prev" || d === "next") {
835
- d === "prev" && b.reverse();
836
- const k = b.indexOf(u.currentTarget);
837
- b = m.loop ? nr(b, k + 1) : b.slice(k + 1);
838
- }
839
- setTimeout(() => It(b));
840
- }
841
- })
842
- }
843
- )
844
- }
845
- );
846
- }
847
- );
848
- Nt.displayName = wt;
849
- var tr = {
850
- ArrowLeft: "prev",
851
- ArrowUp: "prev",
852
- ArrowRight: "next",
853
- ArrowDown: "next",
854
- PageUp: "first",
855
- Home: "first",
856
- PageDown: "last",
857
- End: "last"
858
- };
859
- function or(e, t) {
860
- return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
861
- }
862
- function rr(e, t, o) {
863
- const n = or(e.key, o);
864
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
865
- return tr[n];
866
- }
867
- function It(e, t = !1) {
868
- const o = document.activeElement;
869
- for (const n of e)
870
- if (n === o || (n.focus({ preventScroll: t }), document.activeElement !== o)) return;
871
- }
872
- function nr(e, t) {
873
- return e.map((o, n) => e[(t + n) % e.length]);
874
- }
875
- var ar = Ct, sr = Nt, ir = "Toggle", Tt = f.forwardRef((e, t) => {
876
- const { pressed: o, defaultPressed: n = !1, onPressedChange: a, ...s } = e, [i = !1, c] = fe({
877
- prop: o,
878
- onChange: a,
879
- defaultProp: n
880
- });
881
- return /* @__PURE__ */ r(
882
- ae.button,
883
- {
884
- type: "button",
885
- "aria-pressed": i,
886
- "data-state": i ? "on" : "off",
887
- "data-disabled": e.disabled ? "" : void 0,
888
- ...s,
889
- ref: t,
890
- onClick: K(e.onClick, () => {
891
- e.disabled || c(!i);
892
- })
893
- }
894
- );
895
- });
896
- Tt.displayName = ir;
897
- var Q = "ToggleGroup", [_t, Cn] = Pe(Q, [
898
- kt
899
- ]), Et = kt(), $e = _.forwardRef((e, t) => {
900
- const { type: o, ...n } = e;
901
- if (o === "single")
902
- return /* @__PURE__ */ r(cr, { ...n, ref: t });
903
- if (o === "multiple")
904
- return /* @__PURE__ */ r(lr, { ...n, ref: t });
905
- throw new Error(`Missing prop \`type\` expected on \`${Q}\``);
906
- });
907
- $e.displayName = Q;
908
- var [xt, St] = _t(Q), cr = _.forwardRef((e, t) => {
909
- const {
910
- value: o,
911
- defaultValue: n,
912
- onValueChange: a = () => {
913
- },
914
- ...s
915
- } = e, [i, c] = fe({
916
- prop: o,
917
- defaultProp: n,
918
- onChange: a
919
- });
920
- return /* @__PURE__ */ r(
921
- xt,
922
- {
923
- scope: e.__scopeToggleGroup,
924
- type: "single",
925
- value: i ? [i] : [],
926
- onItemActivate: c,
927
- onItemDeactivate: _.useCallback(() => c(""), [c]),
928
- children: /* @__PURE__ */ r(Rt, { ...s, ref: t })
929
- }
930
- );
931
- }), lr = _.forwardRef((e, t) => {
932
- const {
933
- value: o,
934
- defaultValue: n,
935
- onValueChange: a = () => {
936
- },
937
- ...s
938
- } = e, [i = [], c] = fe({
939
- prop: o,
940
- defaultProp: n,
941
- onChange: a
942
- }), p = _.useCallback(
943
- (l) => c((g = []) => [...g, l]),
944
- [c]
945
- ), m = _.useCallback(
946
- (l) => c((g = []) => g.filter((v) => v !== l)),
947
- [c]
948
- );
949
- return /* @__PURE__ */ r(
950
- xt,
951
- {
952
- scope: e.__scopeToggleGroup,
953
- type: "multiple",
954
- value: i,
955
- onItemActivate: p,
956
- onItemDeactivate: m,
957
- children: /* @__PURE__ */ r(Rt, { ...s, ref: t })
958
- }
959
- );
960
- });
961
- $e.displayName = Q;
962
- var [dr, ur] = _t(Q), Rt = _.forwardRef(
963
- (e, t) => {
964
- const {
965
- __scopeToggleGroup: o,
966
- disabled: n = !1,
967
- rovingFocus: a = !0,
968
- orientation: s,
969
- dir: i,
970
- loop: c = !0,
971
- ...p
972
- } = e, m = Et(o), l = vt(i), g = { role: "group", dir: l, ...p };
973
- return /* @__PURE__ */ r(dr, { scope: o, rovingFocus: a, disabled: n, children: a ? /* @__PURE__ */ r(
974
- ar,
975
- {
976
- asChild: !0,
977
- ...m,
978
- orientation: s,
979
- dir: l,
980
- loop: c,
981
- children: /* @__PURE__ */ r(ae.div, { ...g, ref: t })
982
- }
983
- ) : /* @__PURE__ */ r(ae.div, { ...g, ref: t }) });
984
- }
985
- ), ge = "ToggleGroupItem", At = _.forwardRef(
986
- (e, t) => {
987
- const o = St(ge, e.__scopeToggleGroup), n = ur(ge, e.__scopeToggleGroup), a = Et(e.__scopeToggleGroup), s = o.value.includes(e.value), i = n.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, p = _.useRef(null);
988
- return n.rovingFocus ? /* @__PURE__ */ r(
989
- sr,
990
- {
991
- asChild: !0,
992
- ...a,
993
- focusable: !i,
994
- active: s,
995
- ref: p,
996
- children: /* @__PURE__ */ r(Ke, { ...c, ref: t })
997
- }
998
- ) : /* @__PURE__ */ r(Ke, { ...c, ref: t });
999
- }
1000
- );
1001
- At.displayName = ge;
1002
- var Ke = _.forwardRef(
1003
- (e, t) => {
1004
- const { __scopeToggleGroup: o, value: n, ...a } = e, s = St(ge, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
1005
- return /* @__PURE__ */ r(
1006
- Tt,
1007
- {
1008
- ...c,
1009
- ...a,
1010
- ref: t,
1011
- onPressedChange: (p) => {
1012
- p ? s.onItemActivate(n) : s.onItemDeactivate(n);
1013
- }
1014
- }
1015
- );
1016
- }
1017
- ), mr = $e, hr = At;
1018
- const Mt = _.createContext({
1019
- size: "medium",
1020
- focusMode: "system",
1021
- mode: "system"
1022
- });
1023
- /*!
1024
- @versini/ui-spacing v1.1.0
1025
- © 2024 gizmette.com
1026
- */
1027
- try {
1028
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
1029
- version: "1.1.0",
1030
- buildTime: "12/26/2024 06:05 PM EST",
1031
- homepage: "https://github.com/aversini/ui-components",
1032
- license: "MIT"
1033
- });
1034
- } catch {
1035
- }
1036
- const pr = (e) => {
1037
- let t = "";
1038
- if (typeof e == "number" || typeof e == "string")
1039
- t = "m-" + e;
1040
- else {
1041
- const o = [];
1042
- (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1043
- }
1044
- return t;
1045
- }, gr = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset", {
1046
- "focus:outline-focus-light": e === "light",
1047
- "focus:outline-focus-dark": e === "dark",
1048
- "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1049
- "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1050
- }), fr = ({ mode: e }) => C({
1051
- "data-[state=on]:bg-surface-medium": e === "dark",
1052
- "data-[state=on]:bg-surface-lightest": e === "light",
1053
- "data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
1054
- "data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
1055
- }), br = ({ size: e }) => C({
1056
- "h-5 px-2": e === "small",
1057
- "h-6 px-3": e === "medium",
1058
- "h-7 px-4": e === "large"
1059
- }), vr = ({ mode: e }) => C(
1060
- Lo,
1061
- "px-1",
1062
- "relative",
1063
- "border-r",
1064
- "last:border-transparent",
1065
- "has-[button[aria-checked='true']]:border-transparent",
1066
- "has-[+_*_button[aria-checked='false']]:border-border-medium",
1067
- {
1068
- "border-surface-light": e === "light",
1069
- "border-surface-darker": e === "dark",
1070
- "border-surface-light dark:border-surface-darker": e === "system",
1071
- "border-surface-darker dark:border-surface-light": e === "alt-system"
1072
- }
1073
- ), yr = ({
1074
- focusMode: e,
1075
- mode: t,
1076
- size: o
1077
- }) => ({
1078
- wrapperClass: vr({ mode: t }),
1079
- itemClass: C(
1080
- $o,
1081
- "flex items-center justify-center bg-transparent",
1082
- "rounded-sm",
1083
- "transition duration-200 ease",
1084
- br({ size: o }),
1085
- gr({ focusMode: e }),
1086
- fr({ mode: t })
1087
- )
1088
- }), kr = ({
1089
- mode: e,
1090
- spacing: t
1091
- }) => C(
1092
- Po,
1093
- pr(t),
1094
- "inline-flex p-1",
1095
- "rounded-sm",
1096
- {
1097
- "bg-surface-light text-copy-dark": e === "light",
1098
- "bg-surface-darker text-copy-lighter": e === "dark",
1099
- "bg-surface-light text-copy-dark dark:bg-surface-darker dark:text-copy-lighter": e === "system",
1100
- "bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
1101
- }
1102
- ), Cr = ({
1103
- children: e,
1104
- value: t,
1105
- onValueChange: o,
1106
- disabled: n,
1107
- mode: a = "system",
1108
- focusMode: s = "system",
1109
- size: i = "medium",
1110
- defaultValue: c,
1111
- spacing: p,
1112
- ...m
1113
- }) => {
1114
- const l = kr({ mode: a, spacing: p }), g = { size: i, focusMode: s, mode: a };
1115
- return /* @__PURE__ */ r(Mt.Provider, { value: g, children: /* @__PURE__ */ r(
1116
- mr,
1117
- {
1118
- disabled: n,
1119
- className: l,
1120
- value: t,
1121
- defaultValue: c,
1122
- onValueChange: o,
1123
- ...m,
1124
- type: "single",
1125
- children: e
1126
- }
1127
- ) });
1128
- }, wr = ({ value: e, disabled: t }) => {
1129
- const { size: o, focusMode: n, mode: a } = P(Mt), { itemClass: s, wrapperClass: i } = yr({
1130
- focusMode: n,
1131
- mode: a,
1132
- size: o
1133
- });
1134
- return /* @__PURE__ */ r("div", { className: i, children: /* @__PURE__ */ r(
1135
- hr,
1136
- {
1137
- disabled: t,
1138
- className: s,
1139
- value: e,
1140
- children: e
1141
- }
1142
- ) });
1143
- };
1144
- /*!
1145
- @versini/ui-panel v1.2.3
1146
- © 2024 gizmette.com
1147
- */
1148
- try {
1149
- window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
1150
- version: "1.2.3",
1151
- buildTime: "12/27/2024 07:18 PM EST",
1152
- homepage: "https://github.com/aversini/ui-components",
1153
- license: "MIT"
1154
- });
1155
- } catch {
1156
- }
1157
- const We = "av-messagebox", Ye = "av-panel", qe = "av-button";
1158
- /*!
1159
- @versini/ui-spacing v1.1.0
1160
- © 2024 gizmette.com
1161
- */
1162
- try {
1163
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
1164
- version: "1.1.0",
1165
- buildTime: "12/27/2024 07:18 PM EST",
1166
- homepage: "https://github.com/aversini/ui-components",
1167
- license: "MIT"
1168
- });
1169
- } catch {
1170
- }
1171
- const Nr = (e) => {
1172
- let t = "";
1173
- if (typeof e == "number" || typeof e == "string")
1174
- t = "m-" + e;
1175
- else {
1176
- const o = [];
1177
- (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1178
- }
1179
- return t;
1180
- }, Oe = "icon", Ir = "button", Tr = "link", _r = ({
1181
- type: e,
1182
- size: t,
1183
- labelRight: o,
1184
- labelLeft: n,
1185
- align: a
1186
- }) => {
1187
- const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", c = "text-lg font-medium max-h-12 py-2";
1188
- switch (e) {
1189
- case Ir:
1190
- return C("px-4", {
1191
- [s]: t === "small",
1192
- [i]: t === "medium",
1193
- [c]: t === "large"
1194
- });
1195
- case Tr:
1196
- return C("px-4 text-center", {
1197
- [s]: t === "small",
1198
- [i]: t === "medium",
1199
- [c]: t === "large"
1200
- });
1201
- case Oe:
1202
- return C("inline-flex items-center", {
1203
- "justify-center": a === "center",
1204
- "justify-start": a === "left",
1205
- "justify-end": a === "right",
1206
- "h-6 w-6 p-0": t === "small" && !(o || n),
1207
- "h-6 px-4 text-sm font-medium": t === "small" && (o || n),
1208
- "h-8 w-8 p-1": t === "medium" && !(o || n),
1209
- "h-8 px-4 text-base font-medium": t === "medium" && (o || n),
1210
- "h-12 w-12 p-2": t === "large" && !(o || n),
1211
- "h-12 px-4 text-lg font-medium": t === "large" && (o || n)
1212
- });
1213
- }
1214
- }, Er = ({
1215
- mode: e,
1216
- noBackground: t,
1217
- noTruncate: o,
1218
- variant: n
1219
- }) => {
1220
- if (t)
1221
- return "not-prose rounded-full";
1222
- if (n === "primary")
1223
- return C("not-prose rounded-full", {
1224
- truncate: !o,
1225
- "bg-action-dark text-copy-light": e === "dark",
1226
- "bg-action-light text-copy-lighter": e === "light",
1227
- "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
1228
- "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
1229
- });
1230
- if (n === "secondary")
1231
- return C("not-prose rounded-full", {
1232
- truncate: !o,
1233
- "bg-action-dark text-copy-light": e === "light",
1234
- "bg-action-light text-copy-lighter": e === "dark",
1235
- "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
1236
- "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
1237
- });
1238
- if (n === "danger")
1239
- return C("not-prose rounded-full", {
1240
- truncate: !o,
1241
- "bg-action-danger-dark text-copy-light": e === "dark",
1242
- "bg-action-danger-light text-copy-lighter": e === "light",
1243
- "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
1244
- "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
1245
- });
1246
- }, xr = ({
1247
- mode: e,
1248
- disabled: t,
1249
- variant: o
1250
- }) => {
1251
- if (t)
1252
- return "";
1253
- if (o === "primary")
1254
- return C("hover:text-copy-light-hover", {
1255
- "hover:bg-action-dark-hover": e === "dark",
1256
- "hover:bg-action-light-hover": e === "light",
1257
- "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
1258
- "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
1259
- });
1260
- if (o === "secondary")
1261
- return C("hover:text-copy-light-hover", {
1262
- "hover:bg-action-dark-hover": e === "light",
1263
- "hover:bg-action-light-hover": e === "dark",
1264
- "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
1265
- "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
1266
- });
1267
- if (o === "danger")
1268
- return C("hover:text-copy-light-hover", {
1269
- "hover:bg-action-danger-dark-hover": e === "dark",
1270
- "hover:bg-action-danger-light-hover": e === "light",
1271
- "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
1272
- "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
1273
- });
1274
- }, Sr = ({
1275
- mode: e,
1276
- disabled: t,
1277
- variant: o
1278
- }) => {
1279
- if (t)
1280
- return "";
1281
- if (o === "primary")
1282
- return C("active:text-copy-light-active", {
1283
- "active:bg-action-dark-active": e === "dark",
1284
- "active:bg-action-light-active": e === "light",
1285
- "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
1286
- "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
1287
- });
1288
- if (o === "secondary")
1289
- return C("active:text-copy-light-active", {
1290
- "active:bg-action-dark-active": e === "light",
1291
- "active:bg-action-light-active": e === "dark",
1292
- "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
1293
- "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
1294
- });
1295
- if (o === "danger")
1296
- return C("active:text-copy-lighter-active", {
1297
- "active:bg-action-danger-dark-active": e === "dark",
1298
- "active:bg-action-danger-light-active": e === "light",
1299
- "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
1300
- "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
1301
- });
1302
- }, Rr = ({
1303
- mode: e,
1304
- noBorder: t,
1305
- variant: o
1306
- }) => {
1307
- if (t)
1308
- return "border border-transparent";
1309
- if (o === "primary")
1310
- return C("border", {
1311
- "border-border-dark": e === "dark",
1312
- "border-border-accent": e === "light",
1313
- "border-border-dark dark:border-border-accent": e === "system",
1314
- "border-border-accent dark:border-border-dark": e === "alt-system"
1315
- });
1316
- if (o === "secondary")
1317
- return C("border", {
1318
- "border-border-dark": e === "light",
1319
- "border-border-accent": e === "dark",
1320
- "border-border-dark dark:border-border-accent": e === "alt-system",
1321
- "border-border-accent dark:border-border-dark": e === "system"
1322
- });
1323
- if (o === "danger")
1324
- return C("border", {
1325
- "border-border-danger-dark": e === "dark",
1326
- "border-border-danger-medium": e === "light",
1327
- "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1328
- "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1329
- });
1330
- }, Ar = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1331
- "focus:outline-focus-dark": e === "dark",
1332
- "focus:outline-focus-light": e === "light",
1333
- "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1334
- "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1335
- }), Pt = ({
1336
- type: e,
1337
- className: t,
1338
- raw: o,
1339
- mode: n,
1340
- focusMode: a,
1341
- disabled: s,
1342
- fullWidth: i,
1343
- size: c,
1344
- noBorder: p,
1345
- labelRight: m,
1346
- labelLeft: l,
1347
- spacing: g,
1348
- noBackground: v,
1349
- variant: h,
1350
- noTruncate: u,
1351
- align: d
1352
- }) => (h || (h = "primary"), o ? C(qe, t) : C(
1353
- qe,
1354
- t,
1355
- Nr(g),
1356
- Er({ mode: n, variant: h, noBackground: v, noTruncate: u }),
1357
- _r({ type: e, size: c, labelRight: m, labelLeft: l, align: d }),
1358
- Rr({ mode: n, variant: h, noBorder: p }),
1359
- Ar({ focusMode: a }),
1360
- xr({ mode: n, variant: h, disabled: s }),
1361
- Sr({ mode: n, variant: h, disabled: s }),
1362
- {
1363
- "w-full": i,
1364
- "disabled:cursor-not-allowed disabled:opacity-50": s
1365
- }
1366
- )), Mr = (e, t, o) => {
1367
- var n;
1368
- !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
1369
- }, Be = _.forwardRef((e, t) => {
1370
- const { onClick: o, noInternalClick: n = !1, ...a } = e;
1371
- return /* @__PURE__ */ r(
1372
- "button",
1373
- {
1374
- ref: t,
1375
- onClick: (s) => {
1376
- Mr(s, n, o);
1377
- },
1378
- ...a
1379
- }
1380
- );
1381
- });
1382
- Be.displayName = "BaseButton";
1383
- const Lt = _.forwardRef(
1384
- ({
1385
- children: e,
1386
- disabled: t = !1,
1387
- mode: o = "system",
1388
- focusMode: n = "system",
1389
- fullWidth: a = !1,
1390
- className: s,
1391
- type: i = "button",
1392
- raw: c = !1,
1393
- noBorder: p = !1,
1394
- "aria-label": m,
1395
- label: l,
1396
- size: g = "medium",
1397
- labelRight: v,
1398
- labelLeft: h,
1399
- spacing: u,
1400
- noBackground: d = !1,
1401
- align: b = "center",
1402
- ...k
1403
- }, w) => {
1404
- const I = Pt({
1405
- type: Oe,
1406
- mode: o,
1407
- focusMode: n,
1408
- fullWidth: a,
1409
- disabled: t,
1410
- raw: c,
1411
- className: s,
1412
- noBorder: p,
1413
- size: g,
1414
- labelRight: v,
1415
- labelLeft: h,
1416
- spacing: u,
1417
- noBackground: d,
1418
- align: b
1419
- }), E = C({
1420
- "text-copy-accent-dark": o === "light" && !c,
1421
- "text-copy-light": o === "dark" && !c,
1422
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !c,
1423
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !c
1424
- });
1425
- return /* @__PURE__ */ y(
1426
- Be,
1427
- {
1428
- ref: w,
1429
- className: I,
1430
- disabled: t,
1431
- type: i,
1432
- "aria-label": m || l,
1433
- ...k,
1434
- children: [
1435
- h && /* @__PURE__ */ r("span", { className: "pr-2", children: h }),
1436
- /* @__PURE__ */ r("div", { className: E, children: e }),
1437
- v && /* @__PURE__ */ r("span", { className: "pl-2", children: v })
1438
- ]
1439
- }
1440
- );
1441
- }
1442
- );
1443
- Lt.displayName = "ButtonIcon";
1444
- /*!
1445
- @versini/ui-button v1.6.0
1446
- © 2024 gizmette.com
1447
- */
1448
- try {
1449
- window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
1450
- version: "1.6.0",
1451
- buildTime: "12/27/2024 07:18 PM EST",
1452
- homepage: "https://github.com/aversini/ui-components",
1453
- license: "MIT"
1454
- });
1455
- } catch {
1456
- }
1457
- const Pr = _.forwardRef(
1458
- ({
1459
- children: e,
1460
- disabled: t = !1,
1461
- mode: o = "system",
1462
- focusMode: n = "system",
1463
- fullWidth: a = !1,
1464
- className: s,
1465
- type: i = "button",
1466
- raw: c = !1,
1467
- noBorder: p = !1,
1468
- "aria-label": m,
1469
- label: l,
1470
- size: g = "medium",
1471
- labelRight: v,
1472
- labelLeft: h,
1473
- spacing: u,
1474
- noBackground: d = !1,
1475
- align: b = "center",
1476
- active: k = !1,
1477
- ...w
1478
- }, I) => {
1479
- const E = Pt({
1480
- type: Oe,
1481
- mode: o,
1482
- focusMode: n,
1483
- fullWidth: a,
1484
- disabled: t,
1485
- raw: c,
1486
- className: s,
1487
- noBorder: p,
1488
- size: g,
1489
- labelRight: v,
1490
- labelLeft: h,
1491
- spacing: u,
1492
- noBackground: d,
1493
- align: b
1494
- }), R = C({
1495
- "text-copy-accent-dark": o === "light" && !c,
1496
- "text-copy-light": o === "dark" && !c,
1497
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !c,
1498
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !c
1499
- }), $ = k ? C(
1500
- "relative",
1501
- "focus-within:static",
1502
- "focus-within:after:border-transparent",
1503
- "after:absolute",
1504
- "after:content-['']",
1505
- "after:border-b-2",
1506
- "after:bottom-[-4px]",
1507
- "after:left-0",
1508
- "after:right-0",
1509
- {
1510
- "after:border-table-dark": o === "dark",
1511
- "after:border-table-light": o === "light",
1512
- "after:border-table-dark dark:after:border-table-light": o === "system",
1513
- "after:border-table-light dark:after:border-table-dark": o === "alt-system"
1514
- }
1515
- ) : "";
1516
- return /* @__PURE__ */ r("div", { className: $, children: /* @__PURE__ */ y(
1517
- Be,
1518
- {
1519
- ref: I,
1520
- className: E,
1521
- disabled: t,
1522
- type: i,
1523
- "aria-label": m || l,
1524
- ...w,
1525
- children: [
1526
- h && /* @__PURE__ */ r("span", { className: "pr-2", children: h }),
1527
- /* @__PURE__ */ r("div", { className: R, children: e }),
1528
- v && /* @__PURE__ */ r("span", { className: "pl-2", children: v })
1529
- ]
1530
- }
1531
- ) });
1532
- }
1533
- );
1534
- Pr.displayName = "ButtonSort";
1535
- /*!
1536
- @versini/ui-spacing v1.1.0
1537
- © 2024 gizmette.com
1538
- */
1539
- try {
1540
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
1541
- version: "1.1.0",
1542
- buildTime: "12/27/2024 07:18 PM EST",
1543
- homepage: "https://github.com/aversini/ui-components",
1544
- license: "MIT"
1545
- });
1546
- } catch {
1547
- }
1548
- const Lr = (e) => {
1549
- let t = "";
1550
- if (typeof e == "number" || typeof e == "string")
1551
- t = "m-" + e;
1552
- else {
1553
- const o = [];
1554
- (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1555
- }
1556
- return t;
1557
- }, $r = ({
1558
- children: e,
1559
- fill: t,
1560
- viewBox: o,
1561
- className: n,
1562
- defaultViewBox: a,
1563
- defaultClassName: s,
1564
- spacing: i,
1565
- title: c,
1566
- semantic: p = !1,
1567
- ...m
1568
- }) => {
1569
- const l = Lr(i), g = C(
1570
- l,
1571
- n || s
1572
- );
1573
- return /* @__PURE__ */ y(S, { children: [
1574
- /* @__PURE__ */ r(
1575
- "svg",
1576
- {
1577
- xmlns: "http://www.w3.org/2000/svg",
1578
- className: g,
1579
- viewBox: o || a,
1580
- fill: t || "currentColor",
1581
- role: "img",
1582
- "aria-hidden": !p,
1583
- focusable: !1,
1584
- ...m,
1585
- children: e
1586
- }
1587
- ),
1588
- c && p && /* @__PURE__ */ r("span", { className: "sr-only", children: c })
1589
- ] });
1590
- };
1591
- /*!
1592
- @versini/ui-svgicon v1.1.0
1593
- © 2024 gizmette.com
1594
- */
1595
- try {
1596
- window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
1597
- version: "1.1.0",
1598
- buildTime: "12/27/2024 07:18 PM EST",
1599
- homepage: "https://github.com/aversini/ui-components",
1600
- license: "MIT"
1601
- });
1602
- } catch {
1603
- }
1604
- const Or = ({
1605
- className: e,
1606
- viewBox: t,
1607
- spacing: o,
1608
- title: n,
1609
- monotone: a,
1610
- ...s
1611
- }) => /* @__PURE__ */ r(
1612
- $r,
1613
- {
1614
- defaultViewBox: "0 0 384 512",
1615
- defaultClassName: "size-5",
1616
- viewBox: t,
1617
- className: e,
1618
- spacing: o,
1619
- title: n || "Close",
1620
- ...s,
1621
- children: /* @__PURE__ */ r("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
1622
- }
1623
- );
1624
- /*!
1625
- @versini/ui-icons v1.19.0
1626
- © 2024 gizmette.com
1627
- */
1628
- try {
1629
- window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
1630
- version: "1.19.0",
1631
- buildTime: "12/27/2024 07:18 PM EST",
1632
- homepage: "https://github.com/aversini/ui-components",
1633
- license: "MIT"
1634
- });
1635
- } catch {
1636
- }
1637
- const $t = f.createContext(null);
1638
- function Br({
1639
- initialOpen: e = !1,
1640
- open: t,
1641
- onOpenChange: o
1642
- } = {}) {
1643
- const [n, a] = f.useState(e), [s, i] = f.useState(), [c, p] = f.useState(), m = t ?? n, l = o ?? a, g = it({
1644
- open: m,
1645
- onOpenChange: l
1646
- }), v = g.context, h = ct(v, {
1647
- enabled: t == null
1648
- }), u = dt(v, {
1649
- outsidePress: !1,
1650
- outsidePressEvent: "mousedown"
1651
- }), d = lt(v), b = ut([h, u, d]);
1652
- return f.useMemo(
1653
- () => ({
1654
- open: m,
1655
- setOpen: l,
1656
- ...b,
1657
- ...g,
1658
- labelId: s,
1659
- descriptionId: c,
1660
- setLabelId: i,
1661
- setDescriptionId: p
1662
- }),
1663
- [m, l, b, g, s, c]
1664
- );
1665
- }
1666
- const ve = () => {
1667
- const e = f.useContext($t);
1668
- if (e == null)
1669
- throw new Error("Modal components must be wrapped in <Modal />");
1670
- return e;
1671
- };
1672
- function Vr({
1673
- children: e,
1674
- ...t
1675
- }) {
1676
- const o = Br(t);
1677
- return /* @__PURE__ */ r($t.Provider, { value: o, children: e });
1678
- }
1679
- const Dr = f.forwardRef(function(e, t) {
1680
- const { context: o, ...n } = ve(), a = Me([n.refs.setFloating, t]);
1681
- if (!o.open)
1682
- return null;
1683
- const { overlayBackground: s, ...i } = e, c = C("grid place-items-center", {
1684
- [`${s}`]: s,
1685
- "bg-black sm:bg-black/[.8]": !s
1686
- });
1687
- return /* @__PURE__ */ r(mt, { children: /* @__PURE__ */ r(No, { className: c, lockScroll: !0, children: /* @__PURE__ */ r(ht, { context: o, children: /* @__PURE__ */ r(
1688
- "div",
1689
- {
1690
- ref: a,
1691
- "aria-labelledby": n.labelId,
1692
- "aria-describedby": n.descriptionId,
1693
- ...n.getFloatingProps(i),
1694
- children: i.children
1695
- }
1696
- ) }) }) });
1697
- }), zr = f.forwardRef(function({ children: e, ...t }, o) {
1698
- const { setLabelId: n } = ve(), a = Ae();
1699
- return f.useLayoutEffect(() => (n(a), () => n(void 0)), [a, n]), /* @__PURE__ */ r("h1", { ...t, ref: o, id: a, children: e });
1700
- }), Fr = f.forwardRef(function({ children: e, ...t }, o) {
1701
- const { setDescriptionId: n } = ve(), a = Ae();
1702
- return f.useLayoutEffect(() => (n(a), () => n(void 0)), [a, n]), /* @__PURE__ */ r("div", { ...t, ref: o, id: a, children: e });
1703
- }), Gr = f.forwardRef(function(e, t) {
1704
- const { setOpen: o } = ve(), { trigger: n, className: a, ...s } = e, i = f.useCallback(() => o(!1), [o]);
1705
- return /* @__PURE__ */ r("div", { className: a, children: f.cloneElement(n, {
1706
- ref: t,
1707
- onClick: i,
1708
- ...s
1709
- }) });
1710
- });
1711
- /*!
1712
- @versini/ui-modal v1.1.0
1713
- © 2024 gizmette.com
1714
- */
1715
- try {
1716
- window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
1717
- version: "1.1.0",
1718
- buildTime: "12/27/2024 07:18 PM EST",
1719
- homepage: "https://github.com/aversini/ui-components",
1720
- license: "MIT"
1721
- });
1722
- } catch {
1723
- }
1724
- const ee = "panel", ue = "messagebox", Hr = ({
1725
- className: e,
1726
- kind: t,
1727
- borderMode: o
1728
- }) => ({
1729
- main: C("prose prose-lighter flex flex-col bg-surface-medium", {
1730
- [`${Ye} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === ee,
1731
- [`${Ye} w-full sm:w-[95%] md:max-w-2xl`]: t === ee && !e,
1732
- [`${We} rounded-lg border-2`]: t === ue,
1733
- [`${We} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === ue && !e,
1734
- [`${e}`]: !!e,
1735
- "sm:border-border-dark": o === "dark" && t === ee,
1736
- "sm:border-border-accent": o === "light" && t === ee,
1737
- "border-border-dark": o === "dark" && t === ue,
1738
- "border-border-accent": o === "light" && t === ue
1739
- }),
1740
- content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
1741
- footer: "flex flex-grow flex-col sm:p-4 p-2",
1742
- header: "sm:p-4 mb-0 p-2",
1743
- close: "sm:p-4 p-2"
1744
- }), Y = ({
1745
- open: e,
1746
- onOpenChange: t,
1747
- title: o,
1748
- children: n,
1749
- footer: a,
1750
- borderMode: s = "light",
1751
- kind: i = ee,
1752
- className: c
1753
- }) => {
1754
- const p = Z(""), m = Hr({ className: c, kind: i, borderMode: s });
1755
- return G(() => (e && (p.current = document.title, document.title = `${o} | ${p.current}`), () => {
1756
- e && (document.title = p.current);
1757
- }), [o, e]), /* @__PURE__ */ r(S, { children: e && /* @__PURE__ */ r(Vr, { open: e, onOpenChange: t, children: /* @__PURE__ */ y(Dr, { className: m.main, children: [
1758
- /* @__PURE__ */ y("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1759
- /* @__PURE__ */ r(
1760
- Gr,
1761
- {
1762
- className: m.close,
1763
- trigger: /* @__PURE__ */ r(
1764
- Lt,
1765
- {
1766
- mode: "dark",
1767
- focusMode: "light",
1768
- noBorder: !0,
1769
- label: "Close",
1770
- children: /* @__PURE__ */ r(Or, {})
1771
- }
1772
- )
1773
- }
1774
- ),
1775
- /* @__PURE__ */ r(zr, { className: m.header, children: o })
1776
- ] }),
1777
- /* @__PURE__ */ r(Fr, { className: m.content, children: n }),
1778
- a && /* @__PURE__ */ r("div", { className: m.footer, children: a })
1779
- ] }) }) });
1780
- }, Ur = ({ stats: e }) => {
1781
- const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], a = ne(), s = ne();
1782
- return /* @__PURE__ */ y(S, { children: [
1783
- /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1784
- M,
1785
- {
1786
- header: T.ABOUT.TITLE_CLIENT,
1787
- className: "prose-dark dark:prose-lighter",
1788
- children: re(a, {
1789
- [T.ABOUT.VERSION]: "5.10.0",
1790
- [T.ABOUT.BUILD_TIMESTAMP]: "12/28/2024 05:55 PM EST"
1791
- })
1792
- }
1793
- ) }),
1794
- /* @__PURE__ */ r(
1795
- M,
1796
- {
1797
- header: T.ABOUT.TITLE_SERVER,
1798
- className: "prose-dark dark:prose-lighter",
1799
- children: re(s, {
1800
- [T.ABOUT.VERSION]: o,
1801
- [he(T.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ r(S, { children: n.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
1802
- [he(T.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(S, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
1803
- })
1804
- }
1805
- )
1806
- ] });
1807
- }, jr = ({
1808
- open: e,
1809
- onOpenChange: t
1810
- }) => {
1811
- const { serverStats: o } = P(se);
1812
- return /* @__PURE__ */ r(Y, { open: e, onOpenChange: t, title: zt, children: /* @__PURE__ */ r(Ur, { stats: o }) });
1813
- }, Kr = (e) => Xe(e), Wr = (e) => {
1814
- if (!e || e.length === 0)
1815
- return Gt;
1816
- const t = e.filter(
1817
- (o) => {
1818
- var n, a;
1819
- return ((n = o == null ? void 0 : o.message) == null ? void 0 : n.role) === Ht && typeof ((a = o == null ? void 0 : o.message) == null ? void 0 : a.processingTime) == "number";
1820
- }
1821
- ).map((o) => o.message.processingTime);
1822
- return Ut({
1823
- data: t,
1824
- formatter: Kr
1825
- });
1826
- }, Yr = ({
1827
- isAuthenticated: e,
1828
- stats: t
1829
- }) => {
1830
- const { state: o } = P(se), n = jt - Number(o == null ? void 0 : o.usage), a = ne(), s = ne();
1831
- return e ? /* @__PURE__ */ y(S, { children: [
1832
- o && o.messages.length > 0 && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1833
- M,
1834
- {
1835
- header: T.CURRENT_STATISTICS.TITLE,
1836
- className: "prose-dark dark:prose-lighter",
1837
- children: re(a, {
1838
- [T.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || te,
1839
- [T.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1840
- [T.CURRENT_STATISTICS.REMAINING_TOKENS]: Ft.format(n),
1841
- [T.CURRENT_STATISTICS.PROCESSING_TIME]: Wr(o == null ? void 0 : o.messages)
1842
- })
1843
- }
1844
- ) }),
1845
- /* @__PURE__ */ r(
1846
- M,
1847
- {
1848
- header: T.MAIN_STATISTICS.TITLE,
1849
- className: "prose-dark dark:prose-lighter",
1850
- children: re(s, {
1851
- [he(T.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1852
- [T.MAIN_STATISTICS.PROCESSING_TIME]: Xe(
1853
- t.averageProcessingTimes
1854
- )
1855
- })
1856
- }
1857
- )
1858
- ] }) : null;
1859
- }, qr = ({
1860
- open: e,
1861
- onOpenChange: t
1862
- }) => {
1863
- const [o, n] = x({
1864
- averageProcessingTimes: 0,
1865
- totalChats: 0
1866
- }), { isAuthenticated: a, getAccessToken: s, user: i } = W();
1867
- return G(() => {
1868
- !e || !i || (async () => {
1869
- try {
1870
- const c = await V({
1871
- accessToken: await s(),
1872
- type: D.GET_CHATS_STATS,
1873
- params: {
1874
- userId: i.username
1875
- }
1876
- });
1877
- c.status === 200 && n(c.data);
1878
- } catch {
1879
- }
1880
- })();
1881
- }, [e, s, i]), /* @__PURE__ */ r(Y, { open: e, onOpenChange: t, title: Je, children: /* @__PURE__ */ r(Yr, { isAuthenticated: a, stats: o }) });
1882
- }, Ot = ({
1883
- showConfirmation: e,
1884
- setShowConfirmation: t,
1885
- action: o,
1886
- children: n,
1887
- customStrings: a
1888
- }) => /* @__PURE__ */ r(
1889
- Y,
1890
- {
1891
- kind: "messagebox",
1892
- open: e,
1893
- onOpenChange: t,
1894
- title: a.title,
1895
- footer: /* @__PURE__ */ y(q, { columnGap: 2, alignHorizontal: "flex-end", children: [
1896
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(
1897
- F,
1898
- {
1899
- mode: "dark",
1900
- variant: "secondary",
1901
- focusMode: "light",
1902
- onClick: () => {
1903
- t(!1);
1904
- },
1905
- children: a.cancelAction
1906
- }
1907
- ) }),
1908
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(
1909
- F,
1910
- {
1911
- mode: "dark",
1912
- variant: "danger",
1913
- focusMode: "light",
1914
- onClick: () => {
1915
- t(!1), o();
1916
- },
1917
- children: a.confirmAction
1918
- }
1919
- ) })
1920
- ] }),
1921
- children: n
1922
- }
1923
- ), Zr = async (e, t, o, n) => {
1924
- try {
1925
- const a = await V({
1926
- accessToken: n,
1927
- type: D.GET_CHAT,
1928
- params: {
1929
- id: e.id
1930
- }
1931
- });
1932
- a.status === 200 && (t({
1933
- type: tt
1934
- }), t({
1935
- type: Wt,
1936
- payload: {
1937
- id: e.id,
1938
- model: a.data.model,
1939
- usage: a.data.usage,
1940
- messages: a.data.messages
1941
- }
1942
- }), o(!1));
1943
- } catch {
1944
- }
1945
- }, Ze = (e) => {
1946
- const t = e[0];
1947
- return Yt(t == null ? void 0 : t.content, 100);
1948
- }, Qr = ({
1949
- filteredHistory: e,
1950
- setFilteredHistory: t,
1951
- dispatch: o,
1952
- onOpenChange: n
1953
- }) => {
1954
- var u;
1955
- const { user: a, getAccessToken: s } = W(), i = Z({
1956
- id: 0,
1957
- timestamp: "",
1958
- message: ""
1959
- }), [c, p] = x(!1), { state: m, dispatch: l } = P(et), [, g] = ce({
1960
- key: ie + Kt,
1961
- initialValue: m.sortDirection
1962
- }), v = (d) => {
1963
- switch (m.sortDirection) {
1964
- case U.ASC:
1965
- g(U.DESC), l({
1966
- type: De,
1967
- payload: {
1968
- sortedCell: d,
1969
- sortDirection: U.DESC
1970
- }
1971
- });
1972
- break;
1973
- default:
1974
- g(U.ASC), l({
1975
- type: De,
1976
- payload: {
1977
- sortedCell: d,
1978
- sortDirection: U.ASC
1979
- }
1980
- });
1981
- break;
1982
- }
1983
- };
1984
- return /* @__PURE__ */ y(S, { children: [
1985
- /* @__PURE__ */ y(
1986
- Ot,
1987
- {
1988
- showConfirmation: c,
1989
- setShowConfirmation: p,
1990
- action: async () => {
1991
- const d = i.current;
1992
- try {
1993
- const b = await V({
1994
- accessToken: await s(),
1995
- type: D.DELETE_CHAT,
1996
- params: {
1997
- userId: (a == null ? void 0 : a.username) || "",
1998
- id: d.id
1999
- }
2000
- });
2001
- b.status === 200 && t({ data: b.data });
2002
- } catch {
2003
- }
2004
- },
2005
- customStrings: {
2006
- confirmAction: "Delete",
2007
- cancelAction: "Cancel",
2008
- title: "Delete chat"
2009
- },
2010
- children: [
2011
- /* @__PURE__ */ r("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
2012
- /* @__PURE__ */ y("ul", { className: "m-0", children: [
2013
- /* @__PURE__ */ y("li", { children: [
2014
- "Timestamp:",
2015
- " ",
2016
- /* @__PURE__ */ r("span", { className: "text-lg", children: i.current && i.current.timestamp })
2017
- ] }),
2018
- /* @__PURE__ */ y("li", { children: [
2019
- "First message:",
2020
- " ",
2021
- /* @__PURE__ */ r("span", { className: "text-lg", children: (u = i.current) == null ? void 0 : u.message })
2022
- ] })
2023
- ] })
2024
- ]
2025
- }
2026
- ),
2027
- /* @__PURE__ */ y(
2028
- io,
2029
- {
2030
- stickyHeader: !0,
2031
- stickyFooter: !0,
2032
- compact: !0,
2033
- wrapperClassName: "max-h-[60vh] min-h-[60vh]",
2034
- children: [
2035
- /* @__PURE__ */ r(co, { children: /* @__PURE__ */ y(Ne, { children: [
2036
- /* @__PURE__ */ r(
2037
- lo,
2038
- {
2039
- buttonClassName: "text-xs sm:text-sm",
2040
- cellId: "timestamp",
2041
- align: "left",
2042
- sortDirection: m.sortDirection,
2043
- sortedCell: m.sortedCell,
2044
- onClick: () => {
2045
- v("timestamp");
2046
- },
2047
- children: "Date"
2048
- }
2049
- ),
2050
- /* @__PURE__ */ r(z, { className: "text-xs sm:text-sm", children: "First message" }),
2051
- /* @__PURE__ */ r(z, { className: "text-xs sm:text-sm", children: "Model" }),
2052
- /* @__PURE__ */ r(z, { className: "text-xs sm:text-sm text-right", children: "Actions" })
2053
- ] }) }),
2054
- /* @__PURE__ */ r(uo, { children: e.data.map((d, b) => {
2055
- var k;
2056
- return ((k = d == null ? void 0 : d.messages) == null ? void 0 : k.length) > 0 ? /* @__PURE__ */ y(Ne, { children: [
2057
- /* @__PURE__ */ r(
2058
- z,
2059
- {
2060
- component: "th",
2061
- scope: "row",
2062
- className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
2063
- children: d.timestamp
2064
- }
2065
- ),
2066
- /* @__PURE__ */ r(
2067
- z,
2068
- {
2069
- className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
2070
- style: {
2071
- wordBreak: "break-word"
2072
- },
2073
- children: Ze(d.messages)
2074
- }
2075
- ),
2076
- /* @__PURE__ */ r(z, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ y(q, { alignHorizontal: "center", children: [
2077
- d.model && d.model.startsWith("claude") && /* @__PURE__ */ r(pt, { className: "size-4 sm:size-5" }),
2078
- d.model && d.model.startsWith("gpt") && /* @__PURE__ */ r(gt, { className: "size-4 sm:size-5" })
2079
- ] }) }),
2080
- /* @__PURE__ */ r(z, { className: "px-2", children: /* @__PURE__ */ y("div", { className: "flex justify-end gap-2", children: [
2081
- /* @__PURE__ */ r(
2082
- j,
2083
- {
2084
- focusMode: "alt-system",
2085
- noBorder: !0,
2086
- label: "Restore chat",
2087
- onClick: async () => {
2088
- const w = await s();
2089
- Zr(
2090
- d,
2091
- o,
2092
- n,
2093
- w
2094
- );
2095
- },
2096
- children: /* @__PURE__ */ r(Ro, { className: "h-3 w-3", monotone: !0 })
2097
- }
2098
- ),
2099
- /* @__PURE__ */ r(
2100
- j,
2101
- {
2102
- focusMode: "alt-system",
2103
- noBorder: !0,
2104
- label: "Delete chat",
2105
- onClick: () => {
2106
- i.current = {
2107
- id: d.id,
2108
- timestamp: d.timestamp,
2109
- message: Ze(d.messages)
2110
- }, p(!c);
2111
- },
2112
- children: /* @__PURE__ */ r("div", { className: "text-red-400", children: /* @__PURE__ */ r(_o, { className: "h-3 w-3", monotone: !0 }) })
2113
- }
2114
- )
2115
- ] }) })
2116
- ] }, `${T.HISTORY.TITLE}-${d.id}-${b}`) : null;
2117
- }) }),
2118
- /* @__PURE__ */ r(mo, { children: /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r(z, { colSpan: 4, children: /* @__PURE__ */ r("div", { children: he(
2119
- `${e.data.length} chat`,
2120
- e.data.length
2121
- ) }) }) }) })
2122
- ]
2123
- }
2124
- )
2125
- ] });
2126
- }, Qe = async ({
2127
- searchString: e,
2128
- username: t,
2129
- accessToken: o,
2130
- direction: n = U.ASC
2131
- }) => {
2132
- if (!t)
2133
- return [];
2134
- try {
2135
- const a = await V({
2136
- accessToken: o,
2137
- type: D.GET_CHATS,
2138
- params: {
2139
- userId: t,
2140
- searchString: e,
2141
- limit: 1,
2142
- direction: n
2143
- }
2144
- });
2145
- if (a.status === 200)
2146
- return a.data;
2147
- } catch {
2148
- return [];
2149
- }
2150
- return [];
2151
- }, Xr = ({ onOpenChange: e }) => {
2152
- const { isAuthenticated: t, getAccessToken: o, user: n } = W(), a = Z(null), s = Z(!1), { dispatch: i } = P(se), { state: c, dispatch: p } = P(et), [, m] = ce({
2153
- key: ie + qt,
2154
- initialValue: c.searchString
2155
- }), [l, g] = x({
2156
- data: [],
2157
- sortedDirection: c.sortDirection
2158
- }), v = async (d) => {
2159
- const b = await o(), k = await Qe({
2160
- searchString: d,
2161
- username: n == null ? void 0 : n.username,
2162
- accessToken: b,
2163
- direction: c.sortDirection
2164
- });
2165
- g({
2166
- data: k,
2167
- sortedDirection: c.sortDirection
2168
- }), m(d), p({
2169
- type: Zt,
2170
- payload: { searchString: d }
2171
- });
2172
- }, h = Qt((d) => {
2173
- v(d.target.value);
2174
- }, 500), u = async (d) => {
2175
- d.preventDefault();
2176
- };
2177
- return G(() => {
2178
- s.current || (async () => {
2179
- s.current = !0;
2180
- const d = await o(), b = await Qe({
2181
- searchString: c.searchString,
2182
- username: n == null ? void 0 : n.username,
2183
- accessToken: d,
2184
- direction: c.sortDirection
2185
- });
2186
- g({
2187
- data: b,
2188
- sortedDirection: c.sortDirection
2189
- });
2190
- })();
2191
- }), G(() => {
2192
- if (c.sortDirection !== l.sortedDirection) {
2193
- const d = [...l.data].sort((b, k) => {
2194
- if (c.sortedCell === "timestamp") {
2195
- const w = new Date(b[c.sortedCell]).getTime(), I = new Date(k[c.sortedCell]).getTime();
2196
- return c.sortDirection === U.ASC ? w - I : I - w;
2197
- }
2198
- return 0;
2199
- });
2200
- g({
2201
- data: d,
2202
- sortedDirection: c.sortDirection
2203
- });
2204
- }
2205
- }, [l, c]), t ? l && l.data && /* @__PURE__ */ y(S, { children: [
2206
- /* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: u, children: /* @__PURE__ */ r(
2207
- Te,
2208
- {
2209
- autoComplete: "off",
2210
- autoCorrect: "off",
2211
- ref: a,
2212
- defaultValue: c.searchString,
2213
- focusMode: "light",
2214
- name: "Search",
2215
- label: "Search",
2216
- onChange: h,
2217
- spacing: { t: 2, b: 2 },
2218
- ...c.searchString && {
2219
- rightElement: /* @__PURE__ */ r(
2220
- F,
2221
- {
2222
- disabled: !c.searchString,
2223
- mode: "dark",
2224
- noBorder: !0,
2225
- size: "small",
2226
- onClick: () => {
2227
- var d;
2228
- v(""), (d = a.current) != null && d.value && (a.current.value = "", a.current.focus());
2229
- },
2230
- children: "Reset"
2231
- }
2232
- )
2233
- }
2234
- }
2235
- ) }),
2236
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ r(
2237
- Qr,
2238
- {
2239
- filteredHistory: l,
2240
- setFilteredHistory: g,
2241
- dispatch: i,
2242
- onOpenChange: e
2243
- }
2244
- ) })
2245
- ] }) : null;
2246
- }, Jr = ({
2247
- open: e,
2248
- onOpenChange: t
2249
- }) => /* @__PURE__ */ r(Y, { open: e, onOpenChange: t, title: Xt, children: /* @__PURE__ */ r(Xr, { onOpenChange: t }) });
2250
- /*!
2251
- @versini/ui-toggle v1.4.0
2252
- © 2024 gizmette.com
2253
- */
2254
- try {
2255
- window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
2256
- version: "1.4.0",
2257
- buildTime: "12/26/2024 06:05 PM EST",
2258
- homepage: "https://github.com/aversini/ui-components",
2259
- license: "MIT"
2260
- });
2261
- } catch {
2262
- }
2263
- const en = "av-toggle";
2264
- /*!
2265
- @versini/ui-spacing v1.1.0
2266
- © 2024 gizmette.com
2267
- */
2268
- try {
2269
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
2270
- version: "1.1.0",
2271
- buildTime: "12/26/2024 06:05 PM EST",
2272
- homepage: "https://github.com/aversini/ui-components",
2273
- license: "MIT"
2274
- });
2275
- } catch {
2276
- }
2277
- const tn = (e) => {
2278
- let t = "";
2279
- if (typeof e == "number" || typeof e == "string")
2280
- t = "m-" + e;
2281
- else {
2282
- const o = [];
2283
- (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
2284
- }
2285
- return t;
2286
- }, on = () => C("peer", "h-6", "w-11", "rounded-full"), rn = ({
2287
- focusMode: e
2288
- }) => C(
2289
- "peer-focus:outline",
2290
- "peer-focus:outline-2",
2291
- "peer-focus:outline-offset-2",
2292
- {
2293
- "peer-focus:outline-focus-dark": e === "dark",
2294
- "peer-focus:outline-focus-light": e === "light",
2295
- "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
2296
- "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
2297
- }
2298
- ), nn = () => C(
2299
- "peer-checked:after:translate-x-full",
2300
- // background color when checked
2301
- "peer-checked:bg-violet-500",
2302
- // knob circle and border color when checked
2303
- "peer-checked:after:bg-white",
2304
- "peer-checked:after:border-white"
2305
- ), an = () => C(
2306
- "after:left-[2px]",
2307
- "after:top-[2px]",
2308
- "after:border",
2309
- "after:border-surface-light dark:after:border-surface-medium",
2310
- "after:bg-surface-light dark:after:bg-surface-medium",
2311
- "after:absolute",
2312
- "after:h-5",
2313
- "after:w-5",
2314
- "after:rounded-full",
2315
- "after:transition-all",
2316
- "after:content-['']"
2317
- ), sn = ({
2318
- mode: e,
2319
- noBorder: t
2320
- }) => C({
2321
- border: !t,
2322
- "border-border-dark bg-surface-medium": e === "light",
2323
- "border-border-light bg-surface-darker": e === "dark",
2324
- "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
2325
- "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
2326
- }), cn = ({
2327
- mode: e,
2328
- labelHidden: t
2329
- }) => t ? "sr-only" : C("ml-2 text-sm", {
2330
- "text-copy-dark": e === "light",
2331
- "text-copy-lighter": e === "dark",
2332
- "text-copy-lighter dark:text-copy-dark": e === "alt-system",
2333
- "text-copy-dark dark:text-copy-lighter": e === "system"
2334
- }), ln = ({ spacing: e }) => C(
2335
- en,
2336
- "relative flex cursor-pointer items-center",
2337
- tn(e)
2338
- ), dn = ({
2339
- mode: e,
2340
- focusMode: t,
2341
- labelHidden: o,
2342
- spacing: n,
2343
- noBorder: a
2344
- }) => ({
2345
- toggle: C(
2346
- on(),
2347
- sn({ mode: e, noBorder: a }),
2348
- rn({ focusMode: t }),
2349
- an(),
2350
- nn()
2351
- ),
2352
- label: cn({ mode: e, labelHidden: o }),
2353
- input: "peer sr-only",
2354
- wrapper: ln({ spacing: n })
2355
- }), oe = ({
2356
- checked: e = !1,
2357
- onChange: t,
2358
- label: o,
2359
- labelHidden: n = !1,
2360
- name: a,
2361
- mode: s = "system",
2362
- focusMode: i = "system",
2363
- spacing: c,
2364
- noBorder: p = !1
2365
- }) => {
2366
- const m = dn({
2367
- mode: s,
2368
- focusMode: i,
2369
- labelHidden: n,
2370
- spacing: c,
2371
- noBorder: p
2372
- }), l = (g) => {
2373
- t == null || t(g.target.checked);
2374
- };
2375
- return /* @__PURE__ */ y("label", { className: m.wrapper, children: [
2376
- /* @__PURE__ */ r(
2377
- "input",
2378
- {
2379
- name: a,
2380
- checked: e,
2381
- type: "checkbox",
2382
- className: m.input,
2383
- onChange: l
2384
- }
2385
- ),
2386
- /* @__PURE__ */ r("div", { className: m.toggle }),
2387
- /* @__PURE__ */ r("span", { className: m.label, children: o })
2388
- ] });
2389
- }, un = ({
2390
- open: e,
2391
- onOpenChange: t
2392
- }) => {
2393
- const { dispatch: o } = P(se), { getAccessToken: n, user: a } = W(), [s, i] = x({
2394
- loaded: !1,
2395
- instructions: "",
2396
- loadingLocation: !1,
2397
- location: "",
2398
- engine: te
2399
- }), [c, p] = ce({
2400
- key: ie + ot,
2401
- initialValue: !1
2402
- }), m = async (h) => {
2403
- h.preventDefault();
2404
- try {
2405
- await V({
2406
- accessToken: await n(),
2407
- type: D.SET_USER_PREFERENCES,
2408
- params: {
2409
- user: a == null ? void 0 : a.username,
2410
- instructions: s.instructions,
2411
- location: s.location,
2412
- engine: s.engine
2413
- }
2414
- }), o({
2415
- type: rt,
2416
- payload: {
2417
- engine: s.engine
2418
- }
2419
- });
2420
- } catch {
2421
- }
2422
- }, l = async () => {
2423
- i((h) => ({
2424
- ...h,
2425
- location: "...",
2426
- loadingLocation: !0
2427
- }));
2428
- try {
2429
- const h = Date.now(), u = await eo(), d = await V({
2430
- accessToken: await n(),
2431
- type: D.GET_LOCATION,
2432
- params: {
2433
- latitude: u.latitude,
2434
- longitude: u.longitude
2435
- }
2436
- }), k = Date.now() - h;
2437
- if (k < 2e3 && await new Promise((w) => setTimeout(w, 2e3 - k)), d.status === 200) {
2438
- const { city: w, state: I, country: E, displayName: R } = d.data, $ = w && I && E ? `${w}, ${I}, ${E}` : R;
2439
- i((O) => ({
2440
- ...O,
2441
- loaded: !0,
2442
- location: $,
2443
- loadingLocation: !1
2444
- }));
2445
- } else
2446
- i((w) => ({
2447
- ...w,
2448
- loaded: !0,
2449
- location: "",
2450
- loadingLocation: !1
2451
- }));
2452
- } catch {
2453
- }
2454
- }, g = (h) => {
2455
- i((u) => ({
2456
- ...u,
2457
- engine: h ? we : me
2458
- }));
2459
- }, v = (h) => {
2460
- i((u) => ({
2461
- ...u,
2462
- engine: h ? me : we
2463
- }));
2464
- };
2465
- return G(() => {
2466
- if (!e || !a) {
2467
- i({
2468
- loaded: !1,
2469
- loadingLocation: !1,
2470
- instructions: "",
2471
- location: "",
2472
- engine: te
2473
- });
2474
- return;
2475
- }
2476
- (async () => {
2477
- try {
2478
- const h = await V({
2479
- accessToken: await n(),
2480
- type: D.GET_USER_PREFERENCES,
2481
- params: {
2482
- user: a.username
2483
- }
2484
- });
2485
- h.status === 200 && i((u) => ({
2486
- ...u,
2487
- loaded: !0,
2488
- instructions: h.data.instructions || "",
2489
- location: h.data.location || "",
2490
- engine: h.data.engine || te
2491
- }));
2492
- } catch {
2493
- }
2494
- })();
2495
- }, [a, e]), /* @__PURE__ */ r(S, { children: s.loaded && /* @__PURE__ */ r(
2496
- Y,
2497
- {
2498
- open: e,
2499
- onOpenChange: t,
2500
- title: "Engine Fine Tuning",
2501
- footer: /* @__PURE__ */ y(
2502
- q,
2503
- {
2504
- columnGap: 2,
2505
- alignHorizontal: "flex-end",
2506
- className: "pb-8 sm:pb-0",
2507
- children: [
2508
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(
2509
- F,
2510
- {
2511
- mode: "dark",
2512
- variant: "secondary",
2513
- focusMode: "light",
2514
- onClick: () => {
2515
- t(!1);
2516
- },
2517
- children: "Cancel"
2518
- }
2519
- ) }),
2520
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(
2521
- F,
2522
- {
2523
- mode: "dark",
2524
- variant: "danger",
2525
- focusMode: "light",
2526
- onClick: async (h) => {
2527
- t(!1), await m(h);
2528
- },
2529
- children: "Save"
2530
- }
2531
- ) })
2532
- ]
2533
- }
2534
- ),
2535
- children: /* @__PURE__ */ y(S, { children: [
2536
- /* @__PURE__ */ y(
2537
- M,
2538
- {
2539
- header: "AI Engine",
2540
- className: "prose-dark dark:prose-lighter",
2541
- children: [
2542
- /* @__PURE__ */ r("p", { children: "Select the AI engine that will be used to generate responses." }),
2543
- /* @__PURE__ */ r(
2544
- oe,
2545
- {
2546
- noBorder: !0,
2547
- label: "OpenAI",
2548
- name: "OpenAI",
2549
- onChange: g,
2550
- checked: s.engine === we
2551
- }
2552
- ),
2553
- /* @__PURE__ */ r(
2554
- oe,
2555
- {
2556
- spacing: { t: 2 },
2557
- noBorder: !0,
2558
- label: "Anthropic",
2559
- name: "Anthropic",
2560
- onChange: v,
2561
- checked: s.engine === me
2562
- }
2563
- ),
2564
- /* @__PURE__ */ r("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI." }),
2565
- /* @__PURE__ */ r(
2566
- oe,
2567
- {
2568
- spacing: { t: 2 },
2569
- noBorder: !0,
2570
- label: "Show Quick Engine Toggle",
2571
- name: "show-toggle-engine-menu",
2572
- onChange: p,
2573
- checked: c
2574
- }
2575
- ),
2576
- /* @__PURE__ */ r("p", { className: "text-xs", children: "This option introduces a new menu on the left side of the screen, enabling you to quickly switch between engines." })
2577
- ]
2578
- }
2579
- ),
2580
- /* @__PURE__ */ y(
2581
- M,
2582
- {
2583
- spacing: { t: 4 },
2584
- header: "Custom Instructions",
2585
- className: "prose-dark dark:prose-lighter",
2586
- children: [
2587
- /* @__PURE__ */ y("p", { children: [
2588
- "What would you like ",
2589
- /* @__PURE__ */ r("em", { children: Jt }),
2590
- " to know about you to provide better responses?"
2591
- ] }),
2592
- /* @__PURE__ */ r(
2593
- Ge,
2594
- {
2595
- mode: "alt-system",
2596
- autoCapitalize: "off",
2597
- autoComplete: "off",
2598
- autoCorrect: "off",
2599
- name: "customInstructions",
2600
- label: "Custom Instructions",
2601
- value: s.instructions,
2602
- onChange: (h) => {
2603
- i((u) => ({
2604
- ...u,
2605
- loaded: !0,
2606
- instructions: h.target.value
2607
- }));
2608
- },
2609
- helperText: "Press ENTER to add a new line."
2610
- }
2611
- )
2612
- ]
2613
- }
2614
- ),
2615
- /* @__PURE__ */ y(
2616
- M,
2617
- {
2618
- header: "Location",
2619
- className: "prose-dark dark:prose-lighter",
2620
- spacing: { t: 4 },
2621
- children: [
2622
- /* @__PURE__ */ r("p", { children: "You can share your location to receive customized responses based on your area." }),
2623
- /* @__PURE__ */ r(
2624
- Ge,
2625
- {
2626
- mode: "alt-system",
2627
- name: "location",
2628
- label: "Location",
2629
- value: s.location,
2630
- onChange: (h) => {
2631
- i((u) => ({
2632
- ...u,
2633
- loaded: !0,
2634
- location: h.target.value
2635
- }));
2636
- },
2637
- helperText: "Enter your location or press auto-detect."
2638
- }
2639
- ),
2640
- /* @__PURE__ */ r(
2641
- F,
2642
- {
2643
- spacing: { t: 2 },
2644
- size: "small",
2645
- noBorder: !0,
2646
- disabled: s.loadingLocation,
2647
- onClick: l,
2648
- children: s.loadingLocation ? "Detecting..." : "Auto-detect"
2649
- }
2650
- )
2651
- ]
2652
- }
2653
- )
2654
- ] })
2655
- }
2656
- ) });
2657
- }, mn = ({
2658
- open: e,
2659
- onOpenChange: t
2660
- }) => {
2661
- const { state: o, dispatch: n } = P(to), { getAccessToken: a, user: s } = W(), [i, c] = x({
2662
- tags: [...o.tags]
2663
- }), p = ({
2664
- slot: l,
2665
- checked: g,
2666
- label: v,
2667
- content: h
2668
- }) => {
2669
- c((u) => {
2670
- const d = u.tags, b = {
2671
- slot: l,
2672
- label: v,
2673
- content: h,
2674
- enabled: g
2675
- }, k = d.findIndex((w) => w.slot === l);
2676
- return k === -1 ? {
2677
- ...u,
2678
- tags: [...d, { ...b, slot: l }]
2679
- } : (d[k] = b, {
2680
- ...u,
2681
- tags: [...d]
2682
- });
2683
- });
2684
- }, m = async (l) => {
2685
- l.preventDefault();
2686
- try {
2687
- await V({
2688
- accessToken: await a(),
2689
- type: D.SET_USER_PREFERENCES,
2690
- params: {
2691
- user: s == null ? void 0 : s.username,
2692
- tags: i.tags
2693
- }
2694
- }), n({
2695
- type: ro,
2696
- payload: {
2697
- tags: i.tags
2698
- }
2699
- });
2700
- } catch {
2701
- }
2702
- };
2703
- return /* @__PURE__ */ y(
2704
- Y,
2705
- {
2706
- open: e,
2707
- onOpenChange: t,
2708
- title: "Tags",
2709
- footer: /* @__PURE__ */ y(
2710
- q,
2711
- {
2712
- columnGap: 2,
2713
- alignHorizontal: "flex-end",
2714
- className: "pb-8 sm:pb-0",
2715
- children: [
2716
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(
2717
- F,
2718
- {
2719
- mode: "dark",
2720
- variant: "secondary",
2721
- focusMode: "light",
2722
- onClick: () => {
2723
- t(!1);
2724
- },
2725
- children: "Cancel"
2726
- }
2727
- ) }),
2728
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(
2729
- F,
2730
- {
2731
- mode: "dark",
2732
- variant: "danger",
2733
- focusMode: "light",
2734
- onClick: async (l) => {
2735
- t(!1), await m(l);
2736
- },
2737
- children: "Save"
2738
- }
2739
- ) })
2740
- ]
2741
- }
2742
- ),
2743
- children: [
2744
- /* @__PURE__ */ r("p", { children: oo }),
2745
- i.tags && i.tags.map((l) => /* @__PURE__ */ y(
2746
- M,
2747
- {
2748
- header: `Tag ${l.slot + 1}`,
2749
- className: "prose-dark dark:prose-lighter",
2750
- spacing: { b: 2 },
2751
- children: [
2752
- /* @__PURE__ */ y(q, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
2753
- /* @__PURE__ */ r(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2754
- Te,
2755
- {
2756
- label: "Label",
2757
- name: `tag${l.slot}-label`,
2758
- value: l.label,
2759
- onChange: (g) => {
2760
- p({
2761
- slot: l.slot,
2762
- checked: l.enabled,
2763
- label: g.target.value,
2764
- content: l.content
2765
- });
2766
- }
2767
- }
2768
- ) }),
2769
- /* @__PURE__ */ r(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2770
- Te,
2771
- {
2772
- label: "Content",
2773
- name: `tag${l.slot}-content`,
2774
- value: l.content,
2775
- onChange: (g) => {
2776
- p({
2777
- slot: l.slot,
2778
- checked: l.enabled,
2779
- label: l.label,
2780
- content: g.target.value
2781
- });
2782
- }
2783
- }
2784
- ) })
2785
- ] }),
2786
- /* @__PURE__ */ r(
2787
- oe,
2788
- {
2789
- spacing: { t: 2 },
2790
- noBorder: !0,
2791
- label: "Enabled",
2792
- name: l.slot.toString(),
2793
- onChange: (g) => {
2794
- p({
2795
- slot: l.slot,
2796
- checked: g,
2797
- label: l.label,
2798
- content: l.content
2799
- });
2800
- },
2801
- checked: l.enabled
2802
- }
2803
- )
2804
- ]
2805
- },
2806
- `tag-slot-${l.slot}`
2807
- ))
2808
- ]
2809
- }
2810
- );
2811
- }, hn = () => {
2812
- const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: n } = W(), [a, s] = ce({
2813
- key: ie + no,
2814
- initialValue: !1
2815
- }), [i, c] = x(!1), [p, m] = x(!1), l = ne(), g = (t == null ? void 0 : t.username) || "", v = (d) => {
2816
- s(d);
2817
- }, h = () => {
2818
- c(!i);
2819
- }, u = () => {
2820
- m(!p);
2821
- };
2822
- return e && g ? /* @__PURE__ */ y(S, { children: [
2823
- i && /* @__PURE__ */ r(
2824
- un,
2825
- {
2826
- open: i,
2827
- onOpenChange: c
2828
- }
2829
- ),
2830
- p && /* @__PURE__ */ r(mn, { open: p, onOpenChange: m }),
2831
- /* @__PURE__ */ y(
2832
- M,
2833
- {
2834
- header: T.PREFERENCES.TITLE,
2835
- className: "prose-dark dark:prose-lighter",
2836
- children: [
2837
- re(l, {
2838
- [T.PREFERENCES.NAME]: g,
2839
- [T.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2840
- [T.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
2841
- oe,
2842
- {
2843
- noBorder: !0,
2844
- labelHidden: !0,
2845
- label: T.PREFERENCES.ENGINE_DETAILS,
2846
- name: T.PREFERENCES.ENGINE_DETAILS,
2847
- onChange: v,
2848
- checked: a
2849
- }
2850
- )
2851
- }),
2852
- /* @__PURE__ */ r(
2853
- j,
2854
- {
2855
- spacing: { t: 2 },
2856
- size: "small",
2857
- onClick: h,
2858
- labelLeft: "Engine Fine Tuning",
2859
- children: /* @__PURE__ */ r(He, { className: "size-3", monotone: !0 })
2860
- }
2861
- ),
2862
- /* @__PURE__ */ r(
2863
- j,
2864
- {
2865
- spacing: { t: 2, l: 2 },
2866
- size: "small",
2867
- onClick: u,
2868
- labelLeft: "Tags",
2869
- children: /* @__PURE__ */ r(He, { className: "size-3", monotone: !0 })
2870
- }
2871
- )
2872
- ]
2873
- }
2874
- ),
2875
- n !== ao.PASSKEY && /* @__PURE__ */ y(
2876
- M,
2877
- {
2878
- spacing: { t: 4 },
2879
- className: "prose-dark dark:prose-lighter",
2880
- header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ y(q, { columnGap: 3, alignVertical: "center", children: [
2881
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(ze, { className: "size-8" }) }),
2882
- /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r("div", { children: T.PREFERENCES.PASSKEY_TITLE }) })
2883
- ] }) }),
2884
- children: [
2885
- /* @__PURE__ */ r("p", { children: T.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2886
- /* @__PURE__ */ r(
2887
- j,
2888
- {
2889
- size: "small",
2890
- spacing: { t: 2 },
2891
- onClick: o,
2892
- labelLeft: T.PREFERENCES.PASSKEY_BUTTON,
2893
- children: /* @__PURE__ */ r(ze, { className: "size-5", monotone: !0 })
2894
- }
2895
- )
2896
- ]
2897
- }
2898
- )
2899
- ] }) : null;
2900
- }, pn = ({
2901
- open: e,
2902
- onOpenChange: t
2903
- }) => /* @__PURE__ */ r(Y, { open: e, onOpenChange: t, title: so, children: /* @__PURE__ */ r(hn, {}) }), wn = () => {
2904
- const { state: e, dispatch: t, serverStats: o } = P(se), [n, a] = x((e == null ? void 0 : e.engine) || te), [s, i] = x(!1), [c, p] = x(!1), [m, l] = x(!1), [g, v] = x(!1), [h, u] = x(!1), [d] = ce({
2905
- key: ie + ot,
2906
- initialValue: !1
2907
- }), { logout: b, getAccessToken: k, user: w } = W(), I = () => {
2908
- i(!s);
2909
- }, E = () => {
2910
- p(!c);
2911
- }, R = () => {
2912
- l(!m);
2913
- }, $ = () => {
2914
- v(!g);
2915
- }, O = () => {
2916
- u(!h);
2917
- };
2918
- return G(() => {
2919
- e && e.engine && e.engine !== n && a(e.engine);
2920
- }, [e, n]), /* @__PURE__ */ y(S, { children: [
2921
- /* @__PURE__ */ r(
2922
- Ot,
2923
- {
2924
- showConfirmation: h,
2925
- setShowConfirmation: u,
2926
- action: b,
2927
- customStrings: {
2928
- confirmAction: Fe,
2929
- cancelAction: "Cancel",
2930
- title: Fe
2931
- },
2932
- children: /* @__PURE__ */ r("p", { children: "Are you sure you want to log out?" })
2933
- }
2934
- ),
2935
- /* @__PURE__ */ r(pn, { open: s, onOpenChange: i }),
2936
- /* @__PURE__ */ r(qr, { open: c, onOpenChange: p }),
2937
- /* @__PURE__ */ r(Jr, { open: m, onOpenChange: l }),
2938
- /* @__PURE__ */ r(jr, { open: g, onOpenChange: v }),
2939
- /* @__PURE__ */ y("div", { className: "relative", children: [
2940
- d && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
2941
- Ee,
2942
- {
2943
- mode: "dark",
2944
- focusMode: "light",
2945
- trigger: /* @__PURE__ */ r(j, { children: e && e.engine === me ? /* @__PURE__ */ r(pt, {}) : /* @__PURE__ */ r(gt, {}) }),
2946
- defaultPlacement: "bottom-start",
2947
- children: /* @__PURE__ */ r(H, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ r(
2948
- Cr,
2949
- {
2950
- size: "small",
2951
- mode: "dark",
2952
- focusMode: "light",
2953
- value: n,
2954
- onValueChange: async (N) => {
2955
- if (N)
2956
- try {
2957
- await V({
2958
- accessToken: await k(),
2959
- type: D.SET_USER_PREFERENCES,
2960
- params: {
2961
- user: w == null ? void 0 : w.username,
2962
- engine: N
2963
- }
2964
- }), t({
2965
- type: rt,
2966
- payload: {
2967
- engine: N
2968
- }
2969
- }), t({
2970
- type: tt
2971
- });
2972
- } catch {
2973
- }
2974
- },
2975
- children: o && o.engines.map((N) => /* @__PURE__ */ r(wr, { value: N }, N))
2976
- }
2977
- ) })
2978
- }
2979
- ) }),
2980
- /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ y(
2981
- Ee,
2982
- {
2983
- mode: "dark",
2984
- focusMode: "light",
2985
- trigger: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(Ao, {}) }),
2986
- defaultPlacement: "bottom-end",
2987
- children: [
2988
- /* @__PURE__ */ r(
2989
- H,
2990
- {
2991
- label: "Profile",
2992
- onClick: I,
2993
- icon: /* @__PURE__ */ r(So, {})
2994
- }
2995
- ),
2996
- /* @__PURE__ */ r(
2997
- H,
2998
- {
2999
- label: Je,
3000
- onClick: E,
3001
- icon: /* @__PURE__ */ r(To, {})
3002
- }
3003
- ),
3004
- /* @__PURE__ */ r(
3005
- H,
3006
- {
3007
- label: "History",
3008
- onClick: R,
3009
- icon: /* @__PURE__ */ r(Eo, {})
3010
- }
3011
- ),
3012
- /* @__PURE__ */ r(
3013
- H,
3014
- {
3015
- label: "About",
3016
- onClick: $,
3017
- icon: /* @__PURE__ */ r(xo, {})
3018
- }
3019
- ),
3020
- e && e.id && !e.isComponent && /* @__PURE__ */ y(S, { children: [
3021
- /* @__PURE__ */ r(Mo, {}),
3022
- /* @__PURE__ */ r(
3023
- H,
3024
- {
3025
- label: "Log out",
3026
- onClick: O,
3027
- icon: /* @__PURE__ */ r("div", { className: "text-red-700", children: /* @__PURE__ */ r(Io, { monotone: !0 }) })
3028
- }
3029
- )
3030
- ] })
3031
- ]
3032
- }
3033
- ) })
3034
- ] })
3035
- ] });
3036
- };
3037
- export {
3038
- wn as default
3039
- };