@versini/sassysaint 5.4.6 → 5.4.8

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,3041 +0,0 @@
1
- import { jsx as n, jsxs as y, Fragment as S } from "react/jsx-runtime";
2
- import { g as L, E as M, CARDS as I, renderDataAsList as ne, pluralize as he, AppContext as se, ABOUT_TITLE as Dt, 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 G, HistoryContext as et, LOCAL_STORAGE_PREFIX as ie, LOCAL_STORAGE_SORT as Kt, O as U, ACTION_RESET as tt, ACTION_RESTORE as Wt, truncate as Yt, ACTION_SORT as we, LOCAL_STORAGE_SEARCH as qt, fe as _e, ACTION_SEARCH as Zt, debounce as Qt, HISTORY_TITLE as Xt, LOCAL_STORAGE_ENGINE_TOGGLE as ot, ENGINE_OPENAI as Ne, ENGINE_ANTHROPIC as me, APP_NAME as Jt, ACTION_ENGINE as nt, getCurrentGeoLocation as eo, TagsContext as to, TAGS_DESCRIPTION as oo, ACTION_SET_TAGS as no, LOCAL_STORAGE_CHAT_DETAILS as ro, M as ao, v as De, PROFILE_TITLE as so, LOG_OUT as Fe } from "./index.sbHwdUKv.js";
3
- import { serviceCall as z, SERVICE_TYPES as D, E as le, y as B, ge as io, he as lo, ue as Ie, pe as co, se as F, me as uo, be as mo, $e as Ge, m as He } from "./index.CTDNajS_.js";
4
- import * as f from "react";
5
- import _, { useId as Me, forwardRef as rt, useState as x, useRef as Z, useContext as P, useEffect as K } 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 lt, useRole as ct, useDismiss as dt, useListNavigation as vo, useTypeahead as yo, useInteractions as ut, useMergeRefs as Pe, 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: r,
13
- monotone: a,
14
- ...s
15
- }) => /* @__PURE__ */ n(
16
- L,
17
- {
18
- defaultViewBox: "0 0 256 176",
19
- defaultClassName: "size-5",
20
- viewBox: t,
21
- className: e,
22
- spacing: o,
23
- title: r || "Anthropic",
24
- ...s,
25
- children: /* @__PURE__ */ n("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: r,
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: r || "Back",
43
- ...s,
44
- children: [
45
- /* @__PURE__ */ n(
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__ */ n("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: r,
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: r || "Chart",
71
- ...s,
72
- children: [
73
- /* @__PURE__ */ n(
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__ */ n("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: r,
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: r || "Delete",
99
- ...s,
100
- children: [
101
- /* @__PURE__ */ n(
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__ */ n("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: r,
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: r || "History",
127
- ...s,
128
- children: [
129
- /* @__PURE__ */ n(
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__ */ n("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: r,
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: r || "Info",
155
- ...s,
156
- children: [
157
- /* @__PURE__ */ n(
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__ */ n("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: r,
172
- monotone: a,
173
- ...s
174
- }) => /* @__PURE__ */ n(
175
- L,
176
- {
177
- defaultViewBox: "0 0 24 24",
178
- defaultClassName: "size-5",
179
- viewBox: t,
180
- className: e,
181
- spacing: o,
182
- title: r || "OpenAI",
183
- ...s,
184
- children: /* @__PURE__ */ n(
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: r,
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: r || "Profile",
208
- ...s,
209
- children: [
210
- /* @__PURE__ */ n(
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__ */ n("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: r,
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: r || "Restore",
236
- ...s,
237
- children: [
238
- /* @__PURE__ */ n(
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__ */ n("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: r,
253
- monotone: a,
254
- ...s
255
- }) => /* @__PURE__ */ n(
256
- L,
257
- {
258
- defaultViewBox: "0 0 448 512",
259
- defaultClassName: "size-5",
260
- viewBox: t,
261
- className: e,
262
- spacing: o,
263
- title: r || "Settings",
264
- ...s,
265
- children: /* @__PURE__ */ n("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 re(e) {
269
- return Me();
270
- }
271
- const Ee = 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 = rt(
292
- ({
293
- trigger: e,
294
- children: t,
295
- label: o = "Open menu",
296
- defaultPlacement: r = "bottom-start",
297
- onOpenChange: a,
298
- spacing: s,
299
- mode: i = "system",
300
- focusMode: l = "system",
301
- ...h
302
- }, d) => {
303
- const [c, p] = x(!1), [v, u] = x(!1), [m, b] = x(null), g = Z([]), k = Z([]), w = P(Ee), T = at(), E = ho(), R = st(), { floatingStyles: $, refs: O, context: N } = it({
304
- nodeId: E,
305
- open: c,
306
- onOpenChange: (J) => {
307
- p(J), a == null || a(J);
308
- },
309
- placement: r,
310
- strategy: "fixed",
311
- middleware: [po({ mainAxis: 10 }), go(), fo()],
312
- whileElementsMounted: bo
313
- }), ce = lt(N, {
314
- event: "mousedown",
315
- toggle: !0,
316
- ignoreMouse: !1
317
- }), de = ct(N, { role: "menu" }), X = dt(N, { bubbles: !0 }), ye = vo(N, {
318
- listRef: g,
319
- activeIndex: m,
320
- nested: !1,
321
- onNavigate: b,
322
- loop: !0
323
- }), ke = yo(N, {
324
- listRef: k,
325
- onMatch: c ? b : void 0,
326
- activeIndex: m
327
- }), { getReferenceProps: Ce, getFloatingProps: V, getItemProps: Vt } = ut([ce, de, X, ye, ke]), ze = Ue(e) === "Button" || Ue(e) === "ButtonIcon", Bt = ze ? {
328
- noInternalClick: ze,
329
- focusMode: l,
330
- mode: i,
331
- spacing: s
332
- } : {}, zt = _.cloneElement(
333
- e,
334
- {
335
- ...Bt,
336
- "aria-label": o,
337
- "data-open": c ? "" : void 0,
338
- "data-focus-inside": v ? "" : void 0,
339
- ref: Pe([O.setReference, R.ref, d]),
340
- ...Ce(
341
- w.getItemProps({
342
- ...h
343
- })
344
- )
345
- }
346
- );
347
- return K(() => {
348
- if (!T)
349
- return;
350
- function J() {
351
- p(!1), a == null || a(!1);
352
- }
353
- return T.events.on("click", J), () => {
354
- T.events.off("click", J);
355
- };
356
- }, [T, a]), K(() => {
357
- c && T && T.events.emit("menuopen", { nodeId: E });
358
- }, [T, c, E]), /* @__PURE__ */ y(ko, { id: E, children: [
359
- zt,
360
- /* @__PURE__ */ n(
361
- Ee.Provider,
362
- {
363
- value: {
364
- activeIndex: m,
365
- setActiveIndex: b,
366
- getItemProps: Vt,
367
- setHasFocusInside: u,
368
- isOpen: c
369
- },
370
- children: /* @__PURE__ */ n(Co, { elementsRef: g, labelsRef: k, children: c && /* @__PURE__ */ n(mt, { children: /* @__PURE__ */ n(
371
- ht,
372
- {
373
- context: N,
374
- modal: !1,
375
- initialFocus: 0,
376
- returnFocus: !0,
377
- children: /* @__PURE__ */ n(
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
- ...V(),
384
- children: t
385
- }
386
- )
387
- }
388
- ) }) })
389
- }
390
- )
391
- ] });
392
- }
393
- ), xe = rt((e, t) => /* @__PURE__ */ n(wo, { children: /* @__PURE__ */ n(ft, { ...e, ref: t }) }));
394
- xe.displayName = "Menu";
395
- ft.displayName = "MenuComponent";
396
- const H = f.forwardRef(
397
- ({
398
- label: e,
399
- disabled: t,
400
- icon: o,
401
- raw: r = !1,
402
- children: a,
403
- ignoreClick: s = !1,
404
- ...i
405
- }, l) => {
406
- let h = "";
407
- const d = f.useContext(Ee), c = st({ label: t ? null : e }), p = at(), v = Pe([c.ref, l]);
408
- return r && a ? /* @__PURE__ */ n(
409
- "div",
410
- {
411
- role: "menuitem",
412
- ...d.getItemProps({
413
- onClick(u) {
414
- var m;
415
- s || ((m = i.onClick) == null || m.call(i, u), p == null || p.events.emit("click"));
416
- }
417
- }),
418
- children: a
419
- }
420
- ) : (o && (h = "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
- ...d.getItemProps({
430
- onClick(u) {
431
- var m;
432
- s || ((m = i.onClick) == null || m.call(i, u), p == null || p.events.emit("click"));
433
- },
434
- onFocus(u) {
435
- var m;
436
- (m = i.onFocus) == null || m.call(i, u), d.setHasFocusInside(!0);
437
- }
438
- }),
439
- children: [
440
- o,
441
- e && /* @__PURE__ */ n("span", { className: h, 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__ */ n("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 Le(e, t = []) {
480
- let o = [];
481
- function r(s, i) {
482
- const l = f.createContext(i), h = o.length;
483
- o = [...o, i];
484
- const d = (p) => {
485
- var v;
486
- const { scope: u, children: m, ...b } = p, g = ((v = u == null ? void 0 : u[e]) == null ? void 0 : v[h]) || l, k = f.useMemo(() => b, Object.values(b));
487
- return /* @__PURE__ */ n(g.Provider, { value: k, children: m });
488
- };
489
- d.displayName = s + "Provider";
490
- function c(p, v) {
491
- var u;
492
- const m = ((u = v == null ? void 0 : v[e]) == null ? void 0 : u[h]) || l, b = f.useContext(m);
493
- if (b) return b;
494
- if (i !== void 0) return i;
495
- throw new Error(`\`${p}\` must be used within \`${s}\``);
496
- }
497
- return [d, c];
498
- }
499
- const a = () => {
500
- const s = o.map((i) => f.createContext(i));
501
- return function(i) {
502
- const l = (i == null ? void 0 : i[e]) || s;
503
- return f.useMemo(
504
- () => ({ [`__scope${e}`]: { ...i, [e]: l } }),
505
- [i, l]
506
- );
507
- };
508
- };
509
- return a.scopeName = e, [r, 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 r = e.map((a) => ({
516
- useScope: a(),
517
- scopeName: a.scopeName
518
- }));
519
- return function(a) {
520
- const s = r.reduce((i, { useScope: l, scopeName: h }) => {
521
- const d = l(a)[`__scope${h}`];
522
- return { ...i, ...d };
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 r = 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 < r.length; a++) {
544
- const s = r[a];
545
- typeof s == "function" ? s() : je(e[a], null);
546
- }
547
- };
548
- };
549
- }
550
- function Se(...e) {
551
- return f.useCallback(bt(...e), e);
552
- }
553
- var pe = f.forwardRef((e, t) => {
554
- const { children: o, ...r } = e, a = f.Children.toArray(o), s = a.find(Bo);
555
- if (s) {
556
- const i = s.props.children, l = a.map((h) => h === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : h);
557
- return /* @__PURE__ */ n(Re, { ...r, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, l) : null });
558
- }
559
- return /* @__PURE__ */ n(Re, { ...r, ref: t, children: o });
560
- });
561
- pe.displayName = "Slot";
562
- var Re = f.forwardRef((e, t) => {
563
- const { children: o, ...r } = e;
564
- if (f.isValidElement(o)) {
565
- const a = Do(o);
566
- return f.cloneElement(o, {
567
- ...zo(r, 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
- Re.displayName = "SlotClone";
575
- var Vo = ({ children: e }) => /* @__PURE__ */ n(S, { children: e });
576
- function Bo(e) {
577
- return f.isValidElement(e) && e.type === Vo;
578
- }
579
- function zo(e, t) {
580
- const o = { ...t };
581
- for (const r in t) {
582
- const a = e[r], s = t[r];
583
- /^on[A-Z]/.test(r) ? a && s ? o[r] = (...i) => {
584
- s(...i), a(...i);
585
- } : a && (o[r] = a) : r === "style" ? o[r] = { ...a, ...s } : r === "className" && (o[r] = [a, s].filter(Boolean).join(" "));
586
- }
587
- return { ...e, ...o };
588
- }
589
- function Do(e) {
590
- var t, o;
591
- let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = r && "isReactWarning" in r && r.isReactWarning;
592
- return a ? e.ref : (r = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, a = r && "isReactWarning" in r && r.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((r, a) => {
613
- const { asChild: s, ...i } = r, l = s ? pe : t;
614
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(l, { ...i, ref: a });
615
- });
616
- return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
617
- }, {});
618
- function j(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
619
- return function(r) {
620
- if (e == null || e(r), o === !1 || !r.defaultPrevented)
621
- return t == null ? void 0 : t(r);
622
- };
623
- }
624
- function Go(e) {
625
- const t = e + "CollectionProvider", [o, r] = Le(t), [a, s] = o(
626
- t,
627
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
628
- ), i = (u) => {
629
- const { scope: m, children: b } = u, g = _.useRef(null), k = _.useRef(/* @__PURE__ */ new Map()).current;
630
- return /* @__PURE__ */ n(a, { scope: m, itemMap: k, collectionRef: g, children: b });
631
- };
632
- i.displayName = t;
633
- const l = e + "CollectionSlot", h = _.forwardRef(
634
- (u, m) => {
635
- const { scope: b, children: g } = u, k = s(l, b), w = Se(m, k.collectionRef);
636
- return /* @__PURE__ */ n(pe, { ref: w, children: g });
637
- }
638
- );
639
- h.displayName = l;
640
- const d = e + "CollectionItemSlot", c = "data-radix-collection-item", p = _.forwardRef(
641
- (u, m) => {
642
- const { scope: b, children: g, ...k } = u, w = _.useRef(null), T = Se(m, w), E = s(d, b);
643
- return _.useEffect(() => (E.itemMap.set(w, { ref: w, ...k }), () => void E.itemMap.delete(w))), /* @__PURE__ */ n(pe, { [c]: "", ref: T, children: g });
644
- }
645
- );
646
- p.displayName = d;
647
- function v(u) {
648
- const m = s(e + "CollectionConsumer", u);
649
- return _.useCallback(() => {
650
- const b = m.collectionRef.current;
651
- if (!b) return [];
652
- const g = Array.from(b.querySelectorAll(`[${c}]`));
653
- return Array.from(m.itemMap.values()).sort(
654
- (k, w) => g.indexOf(k.ref.current) - g.indexOf(w.ref.current)
655
- );
656
- }, [m.collectionRef, m.itemMap]);
657
- }
658
- return [
659
- { Provider: i, Slot: h, ItemSlot: p },
660
- v,
661
- r
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((r) => r ?? String(jo++));
671
- }, [e]), t ? `radix-${t}` : "";
672
- }
673
- function $e(e) {
674
- const t = f.useRef(e);
675
- return f.useEffect(() => {
676
- t.current = e;
677
- }), f.useMemo(() => (...o) => {
678
- var r;
679
- return (r = t.current) == null ? void 0 : r.call(t, ...o);
680
- }, []);
681
- }
682
- function fe({
683
- prop: e,
684
- defaultProp: t,
685
- onChange: o = () => {
686
- }
687
- }) {
688
- const [r, a] = Wo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : r, l = $e(o), h = f.useCallback(
689
- (d) => {
690
- if (s) {
691
- const c = typeof d == "function" ? d(e) : d;
692
- c !== e && l(c);
693
- } else
694
- a(d);
695
- },
696
- [s, e, a, l]
697
- );
698
- return [i, h];
699
- }
700
- function Wo({
701
- defaultProp: e,
702
- onChange: t
703
- }) {
704
- const o = f.useState(e), [r] = o, a = f.useRef(r), s = $e(t);
705
- return f.useEffect(() => {
706
- a.current !== r && (s(r), a.current = r);
707
- }, [r, 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 Te = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, be = "RovingFocusGroup", [Ae, yt, Zo] = Go(be), [Qo, kt] = Le(
715
- be,
716
- [Zo]
717
- ), [Xo, Jo] = Qo(be), Ct = f.forwardRef(
718
- (e, t) => /* @__PURE__ */ n(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ n(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ n(en, { ...e, ref: t }) }) })
719
- );
720
- Ct.displayName = be;
721
- var en = f.forwardRef((e, t) => {
722
- const {
723
- __scopeRovingFocusGroup: o,
724
- orientation: r,
725
- loop: a = !1,
726
- dir: s,
727
- currentTabStopId: i,
728
- defaultCurrentTabStopId: l,
729
- onCurrentTabStopIdChange: h,
730
- onEntryFocus: d,
731
- preventScrollOnEntryFocus: c = !1,
732
- ...p
733
- } = e, v = f.useRef(null), u = Se(t, v), m = vt(s), [b = null, g] = fe({
734
- prop: i,
735
- defaultProp: l,
736
- onChange: h
737
- }), [k, w] = f.useState(!1), T = $e(d), 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(Te, T), () => N.removeEventListener(Te, T);
742
- }, [T]), /* @__PURE__ */ n(
743
- Xo,
744
- {
745
- scope: o,
746
- orientation: r,
747
- dir: m,
748
- loop: a,
749
- currentTabStopId: b,
750
- onItemFocus: f.useCallback(
751
- (N) => g(N),
752
- [g]
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__ */ n(
764
- ae.div,
765
- {
766
- tabIndex: k || $ === 0 ? -1 : 0,
767
- "data-orientation": r,
768
- ...p,
769
- ref: u,
770
- style: { outline: "none", ...e.style },
771
- onMouseDown: j(e.onMouseDown, () => {
772
- R.current = !0;
773
- }),
774
- onFocus: j(e.onFocus, (N) => {
775
- const ce = !R.current;
776
- if (N.target === N.currentTarget && ce && !k) {
777
- const de = new CustomEvent(Te, qo);
778
- if (N.currentTarget.dispatchEvent(de), !de.defaultPrevented) {
779
- const X = E().filter((V) => V.focusable), ye = X.find((V) => V.active), ke = X.find((V) => V.id === b), Ce = [ye, ke, ...X].filter(
780
- Boolean
781
- ).map((V) => V.ref.current);
782
- It(Ce, c);
783
- }
784
- }
785
- R.current = !1;
786
- }),
787
- onBlur: j(e.onBlur, () => w(!1))
788
- }
789
- )
790
- }
791
- );
792
- }), wt = "RovingFocusGroupItem", Nt = f.forwardRef(
793
- (e, t) => {
794
- const {
795
- __scopeRovingFocusGroup: o,
796
- focusable: r = !0,
797
- active: a = !1,
798
- tabStopId: s,
799
- ...i
800
- } = e, l = Ko(), h = s || l, d = Jo(wt, o), c = d.currentTabStopId === h, p = yt(o), { onFocusableItemAdd: v, onFocusableItemRemove: u } = d;
801
- return f.useEffect(() => {
802
- if (r)
803
- return v(), () => u();
804
- }, [r, v, u]), /* @__PURE__ */ n(
805
- Ae.ItemSlot,
806
- {
807
- scope: o,
808
- id: h,
809
- focusable: r,
810
- active: a,
811
- children: /* @__PURE__ */ n(
812
- ae.span,
813
- {
814
- tabIndex: c ? 0 : -1,
815
- "data-orientation": d.orientation,
816
- ...i,
817
- ref: t,
818
- onMouseDown: j(e.onMouseDown, (m) => {
819
- r ? d.onItemFocus(h) : m.preventDefault();
820
- }),
821
- onFocus: j(e.onFocus, () => d.onItemFocus(h)),
822
- onKeyDown: j(e.onKeyDown, (m) => {
823
- if (m.key === "Tab" && m.shiftKey) {
824
- d.onItemShiftTab();
825
- return;
826
- }
827
- if (m.target !== m.currentTarget) return;
828
- const b = nn(m, d.orientation, d.dir);
829
- if (b !== void 0) {
830
- if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
831
- m.preventDefault();
832
- let g = p().filter((k) => k.focusable).map((k) => k.ref.current);
833
- if (b === "last") g.reverse();
834
- else if (b === "prev" || b === "next") {
835
- b === "prev" && g.reverse();
836
- const k = g.indexOf(m.currentTarget);
837
- g = d.loop ? rn(g, k + 1) : g.slice(k + 1);
838
- }
839
- setTimeout(() => It(g));
840
- }
841
- })
842
- }
843
- )
844
- }
845
- );
846
- }
847
- );
848
- Nt.displayName = wt;
849
- var tn = {
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 on(e, t) {
860
- return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
861
- }
862
- function nn(e, t, o) {
863
- const r = on(e.key, o);
864
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
865
- return tn[r];
866
- }
867
- function It(e, t = !1) {
868
- const o = document.activeElement;
869
- for (const r of e)
870
- if (r === o || (r.focus({ preventScroll: t }), document.activeElement !== o)) return;
871
- }
872
- function rn(e, t) {
873
- return e.map((o, r) => e[(t + r) % e.length]);
874
- }
875
- var an = Ct, sn = Nt, ln = "Toggle", Tt = f.forwardRef((e, t) => {
876
- const { pressed: o, defaultPressed: r = !1, onPressedChange: a, ...s } = e, [i = !1, l] = fe({
877
- prop: o,
878
- onChange: a,
879
- defaultProp: r
880
- });
881
- return /* @__PURE__ */ n(
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: j(e.onClick, () => {
891
- e.disabled || l(!i);
892
- })
893
- }
894
- );
895
- });
896
- Tt.displayName = ln;
897
- var Q = "ToggleGroup", [_t, Cr] = Le(Q, [
898
- kt
899
- ]), Et = kt(), Oe = _.forwardRef((e, t) => {
900
- const { type: o, ...r } = e;
901
- if (o === "single")
902
- return /* @__PURE__ */ n(cn, { ...r, ref: t });
903
- if (o === "multiple")
904
- return /* @__PURE__ */ n(dn, { ...r, ref: t });
905
- throw new Error(`Missing prop \`type\` expected on \`${Q}\``);
906
- });
907
- Oe.displayName = Q;
908
- var [xt, St] = _t(Q), cn = _.forwardRef((e, t) => {
909
- const {
910
- value: o,
911
- defaultValue: r,
912
- onValueChange: a = () => {
913
- },
914
- ...s
915
- } = e, [i, l] = fe({
916
- prop: o,
917
- defaultProp: r,
918
- onChange: a
919
- });
920
- return /* @__PURE__ */ n(
921
- xt,
922
- {
923
- scope: e.__scopeToggleGroup,
924
- type: "single",
925
- value: i ? [i] : [],
926
- onItemActivate: l,
927
- onItemDeactivate: _.useCallback(() => l(""), [l]),
928
- children: /* @__PURE__ */ n(Rt, { ...s, ref: t })
929
- }
930
- );
931
- }), dn = _.forwardRef((e, t) => {
932
- const {
933
- value: o,
934
- defaultValue: r,
935
- onValueChange: a = () => {
936
- },
937
- ...s
938
- } = e, [i = [], l] = fe({
939
- prop: o,
940
- defaultProp: r,
941
- onChange: a
942
- }), h = _.useCallback(
943
- (c) => l((p = []) => [...p, c]),
944
- [l]
945
- ), d = _.useCallback(
946
- (c) => l((p = []) => p.filter((v) => v !== c)),
947
- [l]
948
- );
949
- return /* @__PURE__ */ n(
950
- xt,
951
- {
952
- scope: e.__scopeToggleGroup,
953
- type: "multiple",
954
- value: i,
955
- onItemActivate: h,
956
- onItemDeactivate: d,
957
- children: /* @__PURE__ */ n(Rt, { ...s, ref: t })
958
- }
959
- );
960
- });
961
- Oe.displayName = Q;
962
- var [un, mn] = _t(Q), Rt = _.forwardRef(
963
- (e, t) => {
964
- const {
965
- __scopeToggleGroup: o,
966
- disabled: r = !1,
967
- rovingFocus: a = !0,
968
- orientation: s,
969
- dir: i,
970
- loop: l = !0,
971
- ...h
972
- } = e, d = Et(o), c = vt(i), p = { role: "group", dir: c, ...h };
973
- return /* @__PURE__ */ n(un, { scope: o, rovingFocus: a, disabled: r, children: a ? /* @__PURE__ */ n(
974
- an,
975
- {
976
- asChild: !0,
977
- ...d,
978
- orientation: s,
979
- dir: c,
980
- loop: l,
981
- children: /* @__PURE__ */ n(ae.div, { ...p, ref: t })
982
- }
983
- ) : /* @__PURE__ */ n(ae.div, { ...p, ref: t }) });
984
- }
985
- ), ge = "ToggleGroupItem", At = _.forwardRef(
986
- (e, t) => {
987
- const o = St(ge, e.__scopeToggleGroup), r = mn(ge, e.__scopeToggleGroup), a = Et(e.__scopeToggleGroup), s = o.value.includes(e.value), i = r.disabled || e.disabled, l = { ...e, pressed: s, disabled: i }, h = _.useRef(null);
988
- return r.rovingFocus ? /* @__PURE__ */ n(
989
- sn,
990
- {
991
- asChild: !0,
992
- ...a,
993
- focusable: !i,
994
- active: s,
995
- ref: h,
996
- children: /* @__PURE__ */ n(Ke, { ...l, ref: t })
997
- }
998
- ) : /* @__PURE__ */ n(Ke, { ...l, ref: t });
999
- }
1000
- );
1001
- At.displayName = ge;
1002
- var Ke = _.forwardRef(
1003
- (e, t) => {
1004
- const { __scopeToggleGroup: o, value: r, ...a } = e, s = St(ge, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, l = s.type === "single" ? i : void 0;
1005
- return /* @__PURE__ */ n(
1006
- Tt,
1007
- {
1008
- ...l,
1009
- ...a,
1010
- ref: t,
1011
- onPressedChange: (h) => {
1012
- h ? s.onItemActivate(r) : s.onItemDeactivate(r);
1013
- }
1014
- }
1015
- );
1016
- }
1017
- ), hn = Oe, pn = 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 gn = (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
- }, fn = ({ 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
- }), bn = ({ 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
- }), vn = ({ 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
- }), yn = ({ 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
- ), kn = ({
1074
- focusMode: e,
1075
- mode: t,
1076
- size: o
1077
- }) => ({
1078
- wrapperClass: yn({ mode: t }),
1079
- itemClass: C(
1080
- $o,
1081
- "flex items-center justify-center bg-transparent",
1082
- "rounded-sm",
1083
- "transition duration-200 ease",
1084
- vn({ size: o }),
1085
- fn({ focusMode: e }),
1086
- bn({ mode: t })
1087
- )
1088
- }), Cn = ({
1089
- mode: e,
1090
- spacing: t
1091
- }) => C(
1092
- Po,
1093
- gn(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
- ), wn = ({
1103
- children: e,
1104
- value: t,
1105
- onValueChange: o,
1106
- disabled: r,
1107
- mode: a = "system",
1108
- focusMode: s = "system",
1109
- size: i = "medium",
1110
- defaultValue: l,
1111
- spacing: h,
1112
- ...d
1113
- }) => {
1114
- const c = Cn({ mode: a, spacing: h }), p = { size: i, focusMode: s, mode: a };
1115
- return /* @__PURE__ */ n(Mt.Provider, { value: p, children: /* @__PURE__ */ n(
1116
- hn,
1117
- {
1118
- disabled: r,
1119
- className: c,
1120
- value: t,
1121
- defaultValue: l,
1122
- onValueChange: o,
1123
- ...d,
1124
- type: "single",
1125
- children: e
1126
- }
1127
- ) });
1128
- }, Nn = ({ value: e, disabled: t }) => {
1129
- const { size: o, focusMode: r, mode: a } = P(Mt), { itemClass: s, wrapperClass: i } = kn({
1130
- focusMode: r,
1131
- mode: a,
1132
- size: o
1133
- });
1134
- return /* @__PURE__ */ n("div", { className: i, children: /* @__PURE__ */ n(
1135
- pn,
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 In = (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
- }, Ve = "icon", Tn = "button", _n = "link", En = ({
1181
- type: e,
1182
- size: t,
1183
- labelRight: o,
1184
- labelLeft: r,
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", l = "text-lg font-medium max-h-12 py-2";
1188
- switch (e) {
1189
- case Tn:
1190
- return C("px-4", {
1191
- [s]: t === "small",
1192
- [i]: t === "medium",
1193
- [l]: t === "large"
1194
- });
1195
- case _n:
1196
- return C("px-4 text-center", {
1197
- [s]: t === "small",
1198
- [i]: t === "medium",
1199
- [l]: t === "large"
1200
- });
1201
- case Ve:
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 || r),
1207
- "h-6 px-4 text-sm font-medium": t === "small" && (o || r),
1208
- "h-8 w-8 p-1": t === "medium" && !(o || r),
1209
- "h-8 px-4 text-base font-medium": t === "medium" && (o || r),
1210
- "h-12 w-12 p-2": t === "large" && !(o || r),
1211
- "h-12 px-4 text-lg font-medium": t === "large" && (o || r)
1212
- });
1213
- }
1214
- }, xn = ({
1215
- mode: e,
1216
- noBackground: t,
1217
- noTruncate: o,
1218
- variant: r
1219
- }) => {
1220
- if (t)
1221
- return "not-prose rounded-full";
1222
- if (r === "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 (r === "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 (r === "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
- }, Sn = ({
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
- }, Rn = ({
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
- }, An = ({
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
- }, Mn = ({ 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: r,
1340
- focusMode: a,
1341
- disabled: s,
1342
- fullWidth: i,
1343
- size: l,
1344
- noBorder: h,
1345
- labelRight: d,
1346
- labelLeft: c,
1347
- spacing: p,
1348
- noBackground: v,
1349
- variant: u,
1350
- noTruncate: m,
1351
- align: b
1352
- }) => (u || (u = "primary"), o ? C(qe, t) : C(
1353
- qe,
1354
- t,
1355
- In(p),
1356
- xn({ mode: r, variant: u, noBackground: v, noTruncate: m }),
1357
- En({ type: e, size: l, labelRight: d, labelLeft: c, align: b }),
1358
- An({ mode: r, variant: u, noBorder: h }),
1359
- Mn({ focusMode: a }),
1360
- Sn({ mode: r, variant: u, disabled: s }),
1361
- Rn({ mode: r, variant: u, disabled: s }),
1362
- {
1363
- "w-full": i,
1364
- "disabled:cursor-not-allowed disabled:opacity-50": s
1365
- }
1366
- )), Pn = (e, t, o) => {
1367
- var r;
1368
- !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((r = e == null ? void 0 : e.currentTarget) == null ? void 0 : r.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
1369
- }, Be = _.forwardRef((e, t) => {
1370
- const { onClick: o, noInternalClick: r = !1, ...a } = e;
1371
- return /* @__PURE__ */ n(
1372
- "button",
1373
- {
1374
- ref: t,
1375
- onClick: (s) => {
1376
- Pn(s, r, 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: r = "system",
1389
- fullWidth: a = !1,
1390
- className: s,
1391
- type: i = "button",
1392
- raw: l = !1,
1393
- noBorder: h = !1,
1394
- "aria-label": d,
1395
- label: c,
1396
- size: p = "medium",
1397
- labelRight: v,
1398
- labelLeft: u,
1399
- spacing: m,
1400
- noBackground: b = !1,
1401
- align: g = "center",
1402
- ...k
1403
- }, w) => {
1404
- const T = Pt({
1405
- type: Ve,
1406
- mode: o,
1407
- focusMode: r,
1408
- fullWidth: a,
1409
- disabled: t,
1410
- raw: l,
1411
- className: s,
1412
- noBorder: h,
1413
- size: p,
1414
- labelRight: v,
1415
- labelLeft: u,
1416
- spacing: m,
1417
- noBackground: b,
1418
- align: g
1419
- }), E = C({
1420
- "text-copy-accent-dark": o === "light" && !l,
1421
- "text-copy-light": o === "dark" && !l,
1422
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1423
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
1424
- });
1425
- return /* @__PURE__ */ y(
1426
- Be,
1427
- {
1428
- ref: w,
1429
- className: T,
1430
- disabled: t,
1431
- type: i,
1432
- "aria-label": d || c,
1433
- ...k,
1434
- children: [
1435
- u && /* @__PURE__ */ n("span", { className: "pr-2", children: u }),
1436
- /* @__PURE__ */ n("div", { className: E, children: e }),
1437
- v && /* @__PURE__ */ n("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 Ln = _.forwardRef(
1458
- ({
1459
- children: e,
1460
- disabled: t = !1,
1461
- mode: o = "system",
1462
- focusMode: r = "system",
1463
- fullWidth: a = !1,
1464
- className: s,
1465
- type: i = "button",
1466
- raw: l = !1,
1467
- noBorder: h = !1,
1468
- "aria-label": d,
1469
- label: c,
1470
- size: p = "medium",
1471
- labelRight: v,
1472
- labelLeft: u,
1473
- spacing: m,
1474
- noBackground: b = !1,
1475
- align: g = "center",
1476
- active: k = !1,
1477
- ...w
1478
- }, T) => {
1479
- const E = Pt({
1480
- type: Ve,
1481
- mode: o,
1482
- focusMode: r,
1483
- fullWidth: a,
1484
- disabled: t,
1485
- raw: l,
1486
- className: s,
1487
- noBorder: h,
1488
- size: p,
1489
- labelRight: v,
1490
- labelLeft: u,
1491
- spacing: m,
1492
- noBackground: b,
1493
- align: g
1494
- }), R = C({
1495
- "text-copy-accent-dark": o === "light" && !l,
1496
- "text-copy-light": o === "dark" && !l,
1497
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1498
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
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__ */ n("div", { className: $, children: /* @__PURE__ */ y(
1517
- Be,
1518
- {
1519
- ref: T,
1520
- className: E,
1521
- disabled: t,
1522
- type: i,
1523
- "aria-label": d || c,
1524
- ...w,
1525
- children: [
1526
- u && /* @__PURE__ */ n("span", { className: "pr-2", children: u }),
1527
- /* @__PURE__ */ n("div", { className: R, children: e }),
1528
- v && /* @__PURE__ */ n("span", { className: "pl-2", children: v })
1529
- ]
1530
- }
1531
- ) });
1532
- }
1533
- );
1534
- Ln.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 $n = (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
- }, On = ({
1558
- children: e,
1559
- fill: t,
1560
- viewBox: o,
1561
- className: r,
1562
- defaultViewBox: a,
1563
- defaultClassName: s,
1564
- spacing: i,
1565
- title: l,
1566
- semantic: h = !1,
1567
- ...d
1568
- }) => {
1569
- const c = $n(i), p = C(
1570
- c,
1571
- r || s
1572
- );
1573
- return /* @__PURE__ */ y(S, { children: [
1574
- /* @__PURE__ */ n(
1575
- "svg",
1576
- {
1577
- xmlns: "http://www.w3.org/2000/svg",
1578
- className: p,
1579
- viewBox: o || a,
1580
- fill: t || "currentColor",
1581
- role: "img",
1582
- "aria-hidden": !h,
1583
- focusable: !1,
1584
- ...d,
1585
- children: e
1586
- }
1587
- ),
1588
- l && h && /* @__PURE__ */ n("span", { className: "sr-only", children: l })
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 Vn = ({
1605
- className: e,
1606
- viewBox: t,
1607
- spacing: o,
1608
- title: r,
1609
- monotone: a,
1610
- ...s
1611
- }) => /* @__PURE__ */ n(
1612
- On,
1613
- {
1614
- defaultViewBox: "0 0 384 512",
1615
- defaultClassName: "size-5",
1616
- viewBox: t,
1617
- className: e,
1618
- spacing: o,
1619
- title: r || "Close",
1620
- ...s,
1621
- children: /* @__PURE__ */ n("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 Bn({
1639
- initialOpen: e = !1,
1640
- open: t,
1641
- onOpenChange: o
1642
- } = {}) {
1643
- const [r, a] = f.useState(e), [s, i] = f.useState(), [l, h] = f.useState(), d = t ?? r, c = o ?? a, p = it({
1644
- open: d,
1645
- onOpenChange: c
1646
- }), v = p.context, u = lt(v, {
1647
- enabled: t == null
1648
- }), m = dt(v, {
1649
- outsidePress: !1,
1650
- outsidePressEvent: "mousedown"
1651
- }), b = ct(v), g = ut([u, m, b]);
1652
- return f.useMemo(
1653
- () => ({
1654
- open: d,
1655
- setOpen: c,
1656
- ...g,
1657
- ...p,
1658
- labelId: s,
1659
- descriptionId: l,
1660
- setLabelId: i,
1661
- setDescriptionId: h
1662
- }),
1663
- [d, c, g, p, s, l]
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 zn({
1673
- children: e,
1674
- ...t
1675
- }) {
1676
- const o = Bn(t);
1677
- return /* @__PURE__ */ n($t.Provider, { value: o, children: e });
1678
- }
1679
- const Dn = f.forwardRef(function(e, t) {
1680
- const { context: o, ...r } = ve(), a = Pe([r.refs.setFloating, t]);
1681
- if (!o.open)
1682
- return null;
1683
- const { overlayBackground: s, ...i } = e, l = C("grid place-items-center", {
1684
- [`${s}`]: s,
1685
- "bg-black sm:bg-black/[.8]": !s
1686
- });
1687
- return /* @__PURE__ */ n(mt, { children: /* @__PURE__ */ n(No, { className: l, lockScroll: !0, children: /* @__PURE__ */ n(ht, { context: o, children: /* @__PURE__ */ n(
1688
- "div",
1689
- {
1690
- ref: a,
1691
- "aria-labelledby": r.labelId,
1692
- "aria-describedby": r.descriptionId,
1693
- ...r.getFloatingProps(i),
1694
- children: i.children
1695
- }
1696
- ) }) }) });
1697
- }), Fn = f.forwardRef(function({ children: e, ...t }, o) {
1698
- const { setLabelId: r } = ve(), a = Me();
1699
- return f.useLayoutEffect(() => (r(a), () => r(void 0)), [a, r]), /* @__PURE__ */ n("h1", { ...t, ref: o, id: a, children: e });
1700
- }), Gn = f.forwardRef(function({ children: e, ...t }, o) {
1701
- const { setDescriptionId: r } = ve(), a = Me();
1702
- return f.useLayoutEffect(() => (r(a), () => r(void 0)), [a, r]), /* @__PURE__ */ n("div", { ...t, ref: o, id: a, children: e });
1703
- }), Hn = f.forwardRef(function(e, t) {
1704
- const { setOpen: o } = ve(), { trigger: r, className: a, ...s } = e, i = f.useCallback(() => o(!1), [o]);
1705
- return /* @__PURE__ */ n("div", { className: a, children: f.cloneElement(r, {
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", Un = ({
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: r,
1749
- footer: a,
1750
- borderMode: s = "light",
1751
- kind: i = ee,
1752
- className: l
1753
- }) => {
1754
- const h = Z(""), d = Un({ className: l, kind: i, borderMode: s });
1755
- return K(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
1756
- e && (document.title = h.current);
1757
- }), [o, e]), /* @__PURE__ */ n(S, { children: e && /* @__PURE__ */ n(zn, { open: e, onOpenChange: t, children: /* @__PURE__ */ y(Dn, { className: d.main, children: [
1758
- /* @__PURE__ */ y("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1759
- /* @__PURE__ */ n(
1760
- Hn,
1761
- {
1762
- className: d.close,
1763
- trigger: /* @__PURE__ */ n(
1764
- Lt,
1765
- {
1766
- mode: "dark",
1767
- focusMode: "light",
1768
- noBorder: !0,
1769
- label: "Close",
1770
- children: /* @__PURE__ */ n(Vn, {})
1771
- }
1772
- )
1773
- }
1774
- ),
1775
- /* @__PURE__ */ n(Fn, { className: d.header, children: o })
1776
- ] }),
1777
- /* @__PURE__ */ n(Gn, { className: d.content, children: r }),
1778
- a && /* @__PURE__ */ n("div", { className: d.footer, children: a })
1779
- ] }) }) });
1780
- }, jn = ({ stats: e }) => {
1781
- const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", r = (e == null ? void 0 : e.models) || [], a = re(), s = re();
1782
- return /* @__PURE__ */ y(S, { children: [
1783
- /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(
1784
- M,
1785
- {
1786
- header: I.ABOUT.TITLE_CLIENT,
1787
- className: "prose-dark dark:prose-lighter",
1788
- children: ne(a, {
1789
- [I.ABOUT.VERSION]: "5.9.0",
1790
- [I.ABOUT.BUILD_TIMESTAMP]: "12/28/2024 10:44 AM EST"
1791
- })
1792
- }
1793
- ) }),
1794
- /* @__PURE__ */ n(
1795
- M,
1796
- {
1797
- header: I.ABOUT.TITLE_SERVER,
1798
- className: "prose-dark dark:prose-lighter",
1799
- children: ne(s, {
1800
- [I.ABOUT.VERSION]: o,
1801
- [he(I.ABOUT.ENGINE, r.length)]: /* @__PURE__ */ n(S, { children: r.map((i) => /* @__PURE__ */ n("div", { className: "text-right", children: i }, i)) }),
1802
- [he(I.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ n(S, { children: t.map((i) => /* @__PURE__ */ n("div", { className: "text-right", children: i }, i)) })
1803
- })
1804
- }
1805
- )
1806
- ] });
1807
- }, Kn = ({
1808
- open: e,
1809
- onOpenChange: t
1810
- }) => {
1811
- const { serverStats: o } = P(se);
1812
- return /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: Dt, children: /* @__PURE__ */ n(jn, { stats: o }) });
1813
- }, Wn = (e) => Xe(e), Yn = (e) => {
1814
- if (!e || e.length === 0)
1815
- return Gt;
1816
- const t = e.filter(
1817
- (o) => {
1818
- var r, a;
1819
- return ((r = o == null ? void 0 : o.message) == null ? void 0 : r.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: Wn
1825
- });
1826
- }, qn = ({
1827
- isAuthenticated: e,
1828
- stats: t
1829
- }) => {
1830
- const { state: o } = P(se), r = jt - Number(o == null ? void 0 : o.usage), a = re(), s = re();
1831
- return e ? /* @__PURE__ */ y(S, { children: [
1832
- o && o.messages.length > 0 && /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(
1833
- M,
1834
- {
1835
- header: I.CURRENT_STATISTICS.TITLE,
1836
- className: "prose-dark dark:prose-lighter",
1837
- children: ne(a, {
1838
- [I.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || te,
1839
- [I.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1840
- [I.CURRENT_STATISTICS.REMAINING_TOKENS]: Ft.format(r),
1841
- [I.CURRENT_STATISTICS.PROCESSING_TIME]: Yn(o == null ? void 0 : o.messages)
1842
- })
1843
- }
1844
- ) }),
1845
- /* @__PURE__ */ n(
1846
- M,
1847
- {
1848
- header: I.MAIN_STATISTICS.TITLE,
1849
- className: "prose-dark dark:prose-lighter",
1850
- children: ne(s, {
1851
- [he(I.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1852
- [I.MAIN_STATISTICS.PROCESSING_TIME]: Xe(
1853
- t.averageProcessingTimes
1854
- )
1855
- })
1856
- }
1857
- )
1858
- ] }) : null;
1859
- }, Zn = ({
1860
- open: e,
1861
- onOpenChange: t
1862
- }) => {
1863
- const [o, r] = x({
1864
- averageProcessingTimes: 0,
1865
- totalChats: 0
1866
- }), { isAuthenticated: a, getAccessToken: s, user: i } = W();
1867
- return K(() => {
1868
- !e || !i || (async () => {
1869
- try {
1870
- const l = await z({
1871
- accessToken: await s(),
1872
- type: D.GET_CHATS_STATS,
1873
- params: {
1874
- userId: i.username
1875
- }
1876
- });
1877
- l.status === 200 && r(l.data);
1878
- } catch {
1879
- }
1880
- })();
1881
- }, [e, s, i]), /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: Je, children: /* @__PURE__ */ n(qn, { isAuthenticated: a, stats: o }) });
1882
- }, Ot = ({
1883
- showConfirmation: e,
1884
- setShowConfirmation: t,
1885
- action: o,
1886
- children: r,
1887
- customStrings: a
1888
- }) => /* @__PURE__ */ n(
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__ */ n(A, { children: /* @__PURE__ */ n(
1897
- G,
1898
- {
1899
- mode: "dark",
1900
- variant: "secondary",
1901
- focusMode: "light",
1902
- onClick: () => {
1903
- t(!1);
1904
- },
1905
- children: a.cancelAction
1906
- }
1907
- ) }),
1908
- /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
1909
- G,
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: r
1922
- }
1923
- ), Qn = async (e, t, o, r) => {
1924
- try {
1925
- const a = await z({
1926
- accessToken: r,
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
- }, Xn = ({
1949
- filteredHistory: e,
1950
- setFilteredHistory: t,
1951
- dispatch: o,
1952
- onOpenChange: r
1953
- }) => {
1954
- var b;
1955
- const { user: a, getAccessToken: s } = W(), i = Z({
1956
- id: 0,
1957
- timestamp: "",
1958
- message: ""
1959
- }), [l, h] = x(!1), { state: d, dispatch: c } = P(et), [, p] = le({
1960
- key: ie + Kt,
1961
- initialValue: d.sortDirection
1962
- }), v = e.data.sort(
1963
- (g, k) => {
1964
- switch (d.sortedCell) {
1965
- case "timestamp":
1966
- if (d.sortDirection === B.ASC)
1967
- return new Date(g[d.sortedCell]).getTime() - new Date(k[d.sortedCell]).getTime();
1968
- if (d.sortDirection === B.DESC)
1969
- return new Date(k[d.sortedCell]).getTime() - new Date(g[d.sortedCell]).getTime();
1970
- break;
1971
- default:
1972
- return 0;
1973
- }
1974
- return 0;
1975
- }
1976
- ), u = (g) => {
1977
- switch (d.sortDirection) {
1978
- case !1:
1979
- p(B.ASC), c({
1980
- type: we,
1981
- payload: {
1982
- sortedCell: g,
1983
- sortDirection: B.ASC
1984
- }
1985
- });
1986
- break;
1987
- case B.ASC:
1988
- p(B.DESC), c({
1989
- type: we,
1990
- payload: {
1991
- sortedCell: g,
1992
- sortDirection: B.DESC
1993
- }
1994
- });
1995
- break;
1996
- default:
1997
- p(B.ASC), c({
1998
- type: we,
1999
- payload: {
2000
- sortedCell: g,
2001
- sortDirection: B.ASC
2002
- }
2003
- });
2004
- break;
2005
- }
2006
- };
2007
- return /* @__PURE__ */ y(S, { children: [
2008
- /* @__PURE__ */ y(
2009
- Ot,
2010
- {
2011
- showConfirmation: l,
2012
- setShowConfirmation: h,
2013
- action: async () => {
2014
- const g = i.current;
2015
- try {
2016
- const k = await z({
2017
- accessToken: await s(),
2018
- type: D.DELETE_CHAT,
2019
- params: {
2020
- userId: (a == null ? void 0 : a.username) || "",
2021
- id: g.id
2022
- }
2023
- });
2024
- k.status === 200 && t({ data: k.data });
2025
- } catch {
2026
- }
2027
- },
2028
- customStrings: {
2029
- confirmAction: "Delete",
2030
- cancelAction: "Cancel",
2031
- title: "Delete chat"
2032
- },
2033
- children: [
2034
- /* @__PURE__ */ n("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
2035
- /* @__PURE__ */ y("ul", { className: "m-0", children: [
2036
- /* @__PURE__ */ y("li", { children: [
2037
- "Timestamp:",
2038
- " ",
2039
- /* @__PURE__ */ n("span", { className: "text-lg", children: i.current && i.current.timestamp })
2040
- ] }),
2041
- /* @__PURE__ */ y("li", { children: [
2042
- "First message:",
2043
- " ",
2044
- /* @__PURE__ */ n("span", { className: "text-lg", children: (b = i.current) == null ? void 0 : b.message })
2045
- ] })
2046
- ] })
2047
- ]
2048
- }
2049
- ),
2050
- /* @__PURE__ */ y(
2051
- io,
2052
- {
2053
- stickyHeader: !0,
2054
- stickyFooter: !0,
2055
- compact: !0,
2056
- wrapperClassName: "max-h-[60vh] min-h-[60vh]",
2057
- children: [
2058
- /* @__PURE__ */ n(lo, { children: /* @__PURE__ */ y(Ie, { children: [
2059
- /* @__PURE__ */ n(
2060
- co,
2061
- {
2062
- buttonClassName: "text-xs sm:text-sm",
2063
- cellId: "timestamp",
2064
- align: "left",
2065
- sortDirection: d.sortDirection,
2066
- sortedCell: d.sortedCell,
2067
- onClick: () => {
2068
- u("timestamp");
2069
- },
2070
- children: "Date"
2071
- }
2072
- ),
2073
- /* @__PURE__ */ n(F, { className: "text-xs sm:text-sm", children: "First message" }),
2074
- /* @__PURE__ */ n(F, { className: "text-xs sm:text-sm", children: "Model" }),
2075
- /* @__PURE__ */ n(F, { className: "text-xs sm:text-sm text-right", children: "Actions" })
2076
- ] }) }),
2077
- /* @__PURE__ */ n(uo, { children: v.map((g, k) => {
2078
- var w;
2079
- return ((w = g == null ? void 0 : g.messages) == null ? void 0 : w.length) > 0 ? /* @__PURE__ */ y(Ie, { children: [
2080
- /* @__PURE__ */ n(
2081
- F,
2082
- {
2083
- component: "th",
2084
- scope: "row",
2085
- className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
2086
- children: g.timestamp
2087
- }
2088
- ),
2089
- /* @__PURE__ */ n(
2090
- F,
2091
- {
2092
- className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
2093
- style: {
2094
- wordBreak: "break-word"
2095
- },
2096
- children: Ze(g.messages)
2097
- }
2098
- ),
2099
- /* @__PURE__ */ n(F, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ y(q, { alignHorizontal: "center", children: [
2100
- g.model && g.model.startsWith("claude") && /* @__PURE__ */ n(pt, { className: "size-4 sm:size-5" }),
2101
- g.model && g.model.startsWith("gpt") && /* @__PURE__ */ n(gt, { className: "size-4 sm:size-5" })
2102
- ] }) }),
2103
- /* @__PURE__ */ n(F, { className: "px-2", children: /* @__PURE__ */ y("div", { className: "flex justify-end gap-2", children: [
2104
- /* @__PURE__ */ n(
2105
- U,
2106
- {
2107
- focusMode: "alt-system",
2108
- noBorder: !0,
2109
- label: "Restore chat",
2110
- onClick: async () => {
2111
- const T = await s();
2112
- Qn(
2113
- g,
2114
- o,
2115
- r,
2116
- T
2117
- );
2118
- },
2119
- children: /* @__PURE__ */ n(Ro, { className: "h-3 w-3", monotone: !0 })
2120
- }
2121
- ),
2122
- /* @__PURE__ */ n(
2123
- U,
2124
- {
2125
- focusMode: "alt-system",
2126
- noBorder: !0,
2127
- label: "Delete chat",
2128
- onClick: () => {
2129
- i.current = {
2130
- id: g.id,
2131
- timestamp: g.timestamp,
2132
- message: Ze(g.messages)
2133
- }, h(!l);
2134
- },
2135
- children: /* @__PURE__ */ n("div", { className: "text-red-400", children: /* @__PURE__ */ n(_o, { className: "h-3 w-3", monotone: !0 }) })
2136
- }
2137
- )
2138
- ] }) })
2139
- ] }, `${I.HISTORY.TITLE}-${g.id}-${k}`) : null;
2140
- }) }),
2141
- /* @__PURE__ */ n(mo, { children: /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n(F, { colSpan: 4, children: /* @__PURE__ */ n("div", { children: he(
2142
- `${e.data.length} chat`,
2143
- e.data.length
2144
- ) }) }) }) })
2145
- ]
2146
- }
2147
- )
2148
- ] });
2149
- }, Qe = async ({
2150
- searchString: e,
2151
- username: t,
2152
- accessToken: o
2153
- }) => {
2154
- if (!t)
2155
- return [];
2156
- try {
2157
- const r = await z({
2158
- accessToken: o,
2159
- type: D.GET_CHATS,
2160
- params: {
2161
- userId: t,
2162
- searchString: e,
2163
- limit: 1
2164
- }
2165
- });
2166
- if (r.status === 200)
2167
- return r.data;
2168
- } catch {
2169
- return [];
2170
- }
2171
- return [];
2172
- }, Jn = ({ onOpenChange: e }) => {
2173
- const { isAuthenticated: t, getAccessToken: o, user: r } = W(), a = Z(null), s = Z(!1), { dispatch: i } = P(se), { state: l, dispatch: h } = P(et), [, d] = le({
2174
- key: ie + qt,
2175
- initialValue: l.searchString
2176
- }), [c, p] = x({
2177
- data: []
2178
- }), v = async (b) => {
2179
- const g = await o(), k = await Qe({
2180
- searchString: b,
2181
- username: r == null ? void 0 : r.username,
2182
- accessToken: g
2183
- });
2184
- p({
2185
- data: k
2186
- }), d(b), h({
2187
- type: Zt,
2188
- payload: { searchString: b }
2189
- });
2190
- }, u = Qt((b) => {
2191
- v(b.target.value);
2192
- }, 500), m = async (b) => {
2193
- b.preventDefault();
2194
- };
2195
- return K(() => {
2196
- s.current || (async () => {
2197
- s.current = !0;
2198
- const b = await o(), g = await Qe({
2199
- searchString: l.searchString,
2200
- username: r == null ? void 0 : r.username,
2201
- accessToken: b
2202
- });
2203
- p({
2204
- data: g
2205
- });
2206
- })();
2207
- }), t ? c && c.data && /* @__PURE__ */ y(S, { children: [
2208
- /* @__PURE__ */ n("form", { autoComplete: "off", onSubmit: m, children: /* @__PURE__ */ n(
2209
- _e,
2210
- {
2211
- autoComplete: "off",
2212
- autoCorrect: "off",
2213
- ref: a,
2214
- defaultValue: l.searchString,
2215
- focusMode: "light",
2216
- name: "Search",
2217
- label: "Search",
2218
- onChange: u,
2219
- spacing: { t: 2, b: 2 },
2220
- ...l.searchString && {
2221
- rightElement: /* @__PURE__ */ n(
2222
- G,
2223
- {
2224
- disabled: !l.searchString,
2225
- mode: "dark",
2226
- noBorder: !0,
2227
- size: "small",
2228
- onClick: () => {
2229
- var b;
2230
- v(""), (b = a.current) != null && b.value && (a.current.value = "", a.current.focus());
2231
- },
2232
- children: "Reset"
2233
- }
2234
- )
2235
- }
2236
- }
2237
- ) }),
2238
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ n(
2239
- Xn,
2240
- {
2241
- filteredHistory: c,
2242
- setFilteredHistory: p,
2243
- dispatch: i,
2244
- onOpenChange: e
2245
- }
2246
- ) })
2247
- ] }) : null;
2248
- }, er = ({
2249
- open: e,
2250
- onOpenChange: t
2251
- }) => /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: Xt, children: /* @__PURE__ */ n(Jn, { onOpenChange: t }) });
2252
- /*!
2253
- @versini/ui-toggle v1.4.0
2254
- © 2024 gizmette.com
2255
- */
2256
- try {
2257
- window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
2258
- version: "1.4.0",
2259
- buildTime: "12/26/2024 06:05 PM EST",
2260
- homepage: "https://github.com/aversini/ui-components",
2261
- license: "MIT"
2262
- });
2263
- } catch {
2264
- }
2265
- const tr = "av-toggle";
2266
- /*!
2267
- @versini/ui-spacing v1.1.0
2268
- © 2024 gizmette.com
2269
- */
2270
- try {
2271
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
2272
- version: "1.1.0",
2273
- buildTime: "12/26/2024 06:05 PM EST",
2274
- homepage: "https://github.com/aversini/ui-components",
2275
- license: "MIT"
2276
- });
2277
- } catch {
2278
- }
2279
- const or = (e) => {
2280
- let t = "";
2281
- if (typeof e == "number" || typeof e == "string")
2282
- t = "m-" + e;
2283
- else {
2284
- const o = [];
2285
- (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(" ");
2286
- }
2287
- return t;
2288
- }, nr = () => C("peer", "h-6", "w-11", "rounded-full"), rr = ({
2289
- focusMode: e
2290
- }) => C(
2291
- "peer-focus:outline",
2292
- "peer-focus:outline-2",
2293
- "peer-focus:outline-offset-2",
2294
- {
2295
- "peer-focus:outline-focus-dark": e === "dark",
2296
- "peer-focus:outline-focus-light": e === "light",
2297
- "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
2298
- "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
2299
- }
2300
- ), ar = () => C(
2301
- "peer-checked:after:translate-x-full",
2302
- // background color when checked
2303
- "peer-checked:bg-violet-500",
2304
- // knob circle and border color when checked
2305
- "peer-checked:after:bg-white",
2306
- "peer-checked:after:border-white"
2307
- ), sr = () => C(
2308
- "after:left-[2px]",
2309
- "after:top-[2px]",
2310
- "after:border",
2311
- "after:border-surface-light dark:after:border-surface-medium",
2312
- "after:bg-surface-light dark:after:bg-surface-medium",
2313
- "after:absolute",
2314
- "after:h-5",
2315
- "after:w-5",
2316
- "after:rounded-full",
2317
- "after:transition-all",
2318
- "after:content-['']"
2319
- ), ir = ({
2320
- mode: e,
2321
- noBorder: t
2322
- }) => C({
2323
- border: !t,
2324
- "border-border-dark bg-surface-medium": e === "light",
2325
- "border-border-light bg-surface-darker": e === "dark",
2326
- "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
2327
- "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
2328
- }), lr = ({
2329
- mode: e,
2330
- labelHidden: t
2331
- }) => t ? "sr-only" : C("ml-2 text-sm", {
2332
- "text-copy-dark": e === "light",
2333
- "text-copy-lighter": e === "dark",
2334
- "text-copy-lighter dark:text-copy-dark": e === "alt-system",
2335
- "text-copy-dark dark:text-copy-lighter": e === "system"
2336
- }), cr = ({ spacing: e }) => C(
2337
- tr,
2338
- "relative flex cursor-pointer items-center",
2339
- or(e)
2340
- ), dr = ({
2341
- mode: e,
2342
- focusMode: t,
2343
- labelHidden: o,
2344
- spacing: r,
2345
- noBorder: a
2346
- }) => ({
2347
- toggle: C(
2348
- nr(),
2349
- ir({ mode: e, noBorder: a }),
2350
- rr({ focusMode: t }),
2351
- sr(),
2352
- ar()
2353
- ),
2354
- label: lr({ mode: e, labelHidden: o }),
2355
- input: "peer sr-only",
2356
- wrapper: cr({ spacing: r })
2357
- }), oe = ({
2358
- checked: e = !1,
2359
- onChange: t,
2360
- label: o,
2361
- labelHidden: r = !1,
2362
- name: a,
2363
- mode: s = "system",
2364
- focusMode: i = "system",
2365
- spacing: l,
2366
- noBorder: h = !1
2367
- }) => {
2368
- const d = dr({
2369
- mode: s,
2370
- focusMode: i,
2371
- labelHidden: r,
2372
- spacing: l,
2373
- noBorder: h
2374
- }), c = (p) => {
2375
- t == null || t(p.target.checked);
2376
- };
2377
- return /* @__PURE__ */ y("label", { className: d.wrapper, children: [
2378
- /* @__PURE__ */ n(
2379
- "input",
2380
- {
2381
- name: a,
2382
- checked: e,
2383
- type: "checkbox",
2384
- className: d.input,
2385
- onChange: c
2386
- }
2387
- ),
2388
- /* @__PURE__ */ n("div", { className: d.toggle }),
2389
- /* @__PURE__ */ n("span", { className: d.label, children: o })
2390
- ] });
2391
- }, ur = ({
2392
- open: e,
2393
- onOpenChange: t
2394
- }) => {
2395
- const { dispatch: o } = P(se), { getAccessToken: r, user: a } = W(), [s, i] = x({
2396
- loaded: !1,
2397
- instructions: "",
2398
- loadingLocation: !1,
2399
- location: "",
2400
- engine: te
2401
- }), [l, h] = le({
2402
- key: ie + ot,
2403
- initialValue: !1
2404
- }), d = async (u) => {
2405
- u.preventDefault();
2406
- try {
2407
- await z({
2408
- accessToken: await r(),
2409
- type: D.SET_USER_PREFERENCES,
2410
- params: {
2411
- user: a == null ? void 0 : a.username,
2412
- instructions: s.instructions,
2413
- location: s.location,
2414
- engine: s.engine
2415
- }
2416
- }), o({
2417
- type: nt,
2418
- payload: {
2419
- engine: s.engine
2420
- }
2421
- });
2422
- } catch {
2423
- }
2424
- }, c = async () => {
2425
- i((u) => ({
2426
- ...u,
2427
- location: "...",
2428
- loadingLocation: !0
2429
- }));
2430
- try {
2431
- const u = Date.now(), m = await eo(), b = await z({
2432
- accessToken: await r(),
2433
- type: D.GET_LOCATION,
2434
- params: {
2435
- latitude: m.latitude,
2436
- longitude: m.longitude
2437
- }
2438
- }), k = Date.now() - u;
2439
- if (k < 2e3 && await new Promise((w) => setTimeout(w, 2e3 - k)), b.status === 200) {
2440
- const { city: w, state: T, country: E, displayName: R } = b.data, $ = w && T && E ? `${w}, ${T}, ${E}` : R;
2441
- i((O) => ({
2442
- ...O,
2443
- loaded: !0,
2444
- location: $,
2445
- loadingLocation: !1
2446
- }));
2447
- } else
2448
- i((w) => ({
2449
- ...w,
2450
- loaded: !0,
2451
- location: "",
2452
- loadingLocation: !1
2453
- }));
2454
- } catch {
2455
- }
2456
- }, p = (u) => {
2457
- i((m) => ({
2458
- ...m,
2459
- engine: u ? Ne : me
2460
- }));
2461
- }, v = (u) => {
2462
- i((m) => ({
2463
- ...m,
2464
- engine: u ? me : Ne
2465
- }));
2466
- };
2467
- return K(() => {
2468
- if (!e || !a) {
2469
- i({
2470
- loaded: !1,
2471
- loadingLocation: !1,
2472
- instructions: "",
2473
- location: "",
2474
- engine: te
2475
- });
2476
- return;
2477
- }
2478
- (async () => {
2479
- try {
2480
- const u = await z({
2481
- accessToken: await r(),
2482
- type: D.GET_USER_PREFERENCES,
2483
- params: {
2484
- user: a.username
2485
- }
2486
- });
2487
- u.status === 200 && i((m) => ({
2488
- ...m,
2489
- loaded: !0,
2490
- instructions: u.data.instructions || "",
2491
- location: u.data.location || "",
2492
- engine: u.data.engine || te
2493
- }));
2494
- } catch {
2495
- }
2496
- })();
2497
- }, [a, e]), /* @__PURE__ */ n(S, { children: s.loaded && /* @__PURE__ */ n(
2498
- Y,
2499
- {
2500
- open: e,
2501
- onOpenChange: t,
2502
- title: "Engine Fine Tuning",
2503
- footer: /* @__PURE__ */ y(
2504
- q,
2505
- {
2506
- columnGap: 2,
2507
- alignHorizontal: "flex-end",
2508
- className: "pb-8 sm:pb-0",
2509
- children: [
2510
- /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2511
- G,
2512
- {
2513
- mode: "dark",
2514
- variant: "secondary",
2515
- focusMode: "light",
2516
- onClick: () => {
2517
- t(!1);
2518
- },
2519
- children: "Cancel"
2520
- }
2521
- ) }),
2522
- /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2523
- G,
2524
- {
2525
- mode: "dark",
2526
- variant: "danger",
2527
- focusMode: "light",
2528
- onClick: async (u) => {
2529
- t(!1), await d(u);
2530
- },
2531
- children: "Save"
2532
- }
2533
- ) })
2534
- ]
2535
- }
2536
- ),
2537
- children: /* @__PURE__ */ y(S, { children: [
2538
- /* @__PURE__ */ y(
2539
- M,
2540
- {
2541
- header: "AI Engine",
2542
- className: "prose-dark dark:prose-lighter",
2543
- children: [
2544
- /* @__PURE__ */ n("p", { children: "Select the AI engine that will be used to generate responses." }),
2545
- /* @__PURE__ */ n(
2546
- oe,
2547
- {
2548
- noBorder: !0,
2549
- label: "OpenAI",
2550
- name: "OpenAI",
2551
- onChange: p,
2552
- checked: s.engine === Ne
2553
- }
2554
- ),
2555
- /* @__PURE__ */ n(
2556
- oe,
2557
- {
2558
- spacing: { t: 2 },
2559
- noBorder: !0,
2560
- label: "Anthropic",
2561
- name: "Anthropic",
2562
- onChange: v,
2563
- checked: s.engine === me
2564
- }
2565
- ),
2566
- /* @__PURE__ */ n("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI." }),
2567
- /* @__PURE__ */ n(
2568
- oe,
2569
- {
2570
- spacing: { t: 2 },
2571
- noBorder: !0,
2572
- label: "Show Quick Engine Toggle",
2573
- name: "show-toggle-engine-menu",
2574
- onChange: h,
2575
- checked: l
2576
- }
2577
- ),
2578
- /* @__PURE__ */ n("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." })
2579
- ]
2580
- }
2581
- ),
2582
- /* @__PURE__ */ y(
2583
- M,
2584
- {
2585
- spacing: { t: 4 },
2586
- header: "Custom Instructions",
2587
- className: "prose-dark dark:prose-lighter",
2588
- children: [
2589
- /* @__PURE__ */ y("p", { children: [
2590
- "What would you like ",
2591
- /* @__PURE__ */ n("em", { children: Jt }),
2592
- " to know about you to provide better responses?"
2593
- ] }),
2594
- /* @__PURE__ */ n(
2595
- Ge,
2596
- {
2597
- mode: "alt-system",
2598
- autoCapitalize: "off",
2599
- autoComplete: "off",
2600
- autoCorrect: "off",
2601
- name: "customInstructions",
2602
- label: "Custom Instructions",
2603
- value: s.instructions,
2604
- onChange: (u) => {
2605
- i((m) => ({
2606
- ...m,
2607
- loaded: !0,
2608
- instructions: u.target.value
2609
- }));
2610
- },
2611
- helperText: "Press ENTER to add a new line."
2612
- }
2613
- )
2614
- ]
2615
- }
2616
- ),
2617
- /* @__PURE__ */ y(
2618
- M,
2619
- {
2620
- header: "Location",
2621
- className: "prose-dark dark:prose-lighter",
2622
- spacing: { t: 4 },
2623
- children: [
2624
- /* @__PURE__ */ n("p", { children: "You can share your location to receive customized responses based on your area." }),
2625
- /* @__PURE__ */ n(
2626
- Ge,
2627
- {
2628
- mode: "alt-system",
2629
- name: "location",
2630
- label: "Location",
2631
- value: s.location,
2632
- onChange: (u) => {
2633
- i((m) => ({
2634
- ...m,
2635
- loaded: !0,
2636
- location: u.target.value
2637
- }));
2638
- },
2639
- helperText: "Enter your location or press auto-detect."
2640
- }
2641
- ),
2642
- /* @__PURE__ */ n(
2643
- G,
2644
- {
2645
- spacing: { t: 2 },
2646
- size: "small",
2647
- noBorder: !0,
2648
- disabled: s.loadingLocation,
2649
- onClick: c,
2650
- children: s.loadingLocation ? "Detecting..." : "Auto-detect"
2651
- }
2652
- )
2653
- ]
2654
- }
2655
- )
2656
- ] })
2657
- }
2658
- ) });
2659
- }, mr = ({
2660
- open: e,
2661
- onOpenChange: t
2662
- }) => {
2663
- const { state: o, dispatch: r } = P(to), { getAccessToken: a, user: s } = W(), [i, l] = x({
2664
- tags: [...o.tags]
2665
- }), h = ({
2666
- slot: c,
2667
- checked: p,
2668
- label: v,
2669
- content: u
2670
- }) => {
2671
- l((m) => {
2672
- const b = m.tags, g = {
2673
- slot: c,
2674
- label: v,
2675
- content: u,
2676
- enabled: p
2677
- }, k = b.findIndex((w) => w.slot === c);
2678
- return k === -1 ? {
2679
- ...m,
2680
- tags: [...b, { ...g, slot: c }]
2681
- } : (b[k] = g, {
2682
- ...m,
2683
- tags: [...b]
2684
- });
2685
- });
2686
- }, d = async (c) => {
2687
- c.preventDefault();
2688
- try {
2689
- await z({
2690
- accessToken: await a(),
2691
- type: D.SET_USER_PREFERENCES,
2692
- params: {
2693
- user: s == null ? void 0 : s.username,
2694
- tags: i.tags
2695
- }
2696
- }), r({
2697
- type: no,
2698
- payload: {
2699
- tags: i.tags
2700
- }
2701
- });
2702
- } catch {
2703
- }
2704
- };
2705
- return /* @__PURE__ */ y(
2706
- Y,
2707
- {
2708
- open: e,
2709
- onOpenChange: t,
2710
- title: "Tags",
2711
- footer: /* @__PURE__ */ y(
2712
- q,
2713
- {
2714
- columnGap: 2,
2715
- alignHorizontal: "flex-end",
2716
- className: "pb-8 sm:pb-0",
2717
- children: [
2718
- /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2719
- G,
2720
- {
2721
- mode: "dark",
2722
- variant: "secondary",
2723
- focusMode: "light",
2724
- onClick: () => {
2725
- t(!1);
2726
- },
2727
- children: "Cancel"
2728
- }
2729
- ) }),
2730
- /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(
2731
- G,
2732
- {
2733
- mode: "dark",
2734
- variant: "danger",
2735
- focusMode: "light",
2736
- onClick: async (c) => {
2737
- t(!1), await d(c);
2738
- },
2739
- children: "Save"
2740
- }
2741
- ) })
2742
- ]
2743
- }
2744
- ),
2745
- children: [
2746
- /* @__PURE__ */ n("p", { children: oo }),
2747
- i.tags && i.tags.map((c) => /* @__PURE__ */ y(
2748
- M,
2749
- {
2750
- header: `Tag ${c.slot + 1}`,
2751
- className: "prose-dark dark:prose-lighter",
2752
- spacing: { b: 2 },
2753
- children: [
2754
- /* @__PURE__ */ y(q, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
2755
- /* @__PURE__ */ n(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ n(
2756
- _e,
2757
- {
2758
- label: "Label",
2759
- name: `tag${c.slot}-label`,
2760
- value: c.label,
2761
- onChange: (p) => {
2762
- h({
2763
- slot: c.slot,
2764
- checked: c.enabled,
2765
- label: p.target.value,
2766
- content: c.content
2767
- });
2768
- }
2769
- }
2770
- ) }),
2771
- /* @__PURE__ */ n(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ n(
2772
- _e,
2773
- {
2774
- label: "Content",
2775
- name: `tag${c.slot}-content`,
2776
- value: c.content,
2777
- onChange: (p) => {
2778
- h({
2779
- slot: c.slot,
2780
- checked: c.enabled,
2781
- label: c.label,
2782
- content: p.target.value
2783
- });
2784
- }
2785
- }
2786
- ) })
2787
- ] }),
2788
- /* @__PURE__ */ n(
2789
- oe,
2790
- {
2791
- spacing: { t: 2 },
2792
- noBorder: !0,
2793
- label: "Enabled",
2794
- name: c.slot.toString(),
2795
- onChange: (p) => {
2796
- h({
2797
- slot: c.slot,
2798
- checked: p,
2799
- label: c.label,
2800
- content: c.content
2801
- });
2802
- },
2803
- checked: c.enabled
2804
- }
2805
- )
2806
- ]
2807
- },
2808
- `tag-slot-${c.slot}`
2809
- ))
2810
- ]
2811
- }
2812
- );
2813
- }, hr = () => {
2814
- const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: r } = W(), [a, s] = le({
2815
- key: ie + ro,
2816
- initialValue: !1
2817
- }), [i, l] = x(!1), [h, d] = x(!1), c = re(), p = (t == null ? void 0 : t.username) || "", v = (b) => {
2818
- s(b);
2819
- }, u = () => {
2820
- l(!i);
2821
- }, m = () => {
2822
- d(!h);
2823
- };
2824
- return e && p ? /* @__PURE__ */ y(S, { children: [
2825
- i && /* @__PURE__ */ n(
2826
- ur,
2827
- {
2828
- open: i,
2829
- onOpenChange: l
2830
- }
2831
- ),
2832
- h && /* @__PURE__ */ n(mr, { open: h, onOpenChange: d }),
2833
- /* @__PURE__ */ y(
2834
- M,
2835
- {
2836
- header: I.PREFERENCES.TITLE,
2837
- className: "prose-dark dark:prose-lighter",
2838
- children: [
2839
- ne(c, {
2840
- [I.PREFERENCES.NAME]: p,
2841
- [I.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2842
- [I.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ n(
2843
- oe,
2844
- {
2845
- noBorder: !0,
2846
- labelHidden: !0,
2847
- label: I.PREFERENCES.ENGINE_DETAILS,
2848
- name: I.PREFERENCES.ENGINE_DETAILS,
2849
- onChange: v,
2850
- checked: a
2851
- }
2852
- )
2853
- }),
2854
- /* @__PURE__ */ n(
2855
- U,
2856
- {
2857
- spacing: { t: 2 },
2858
- size: "small",
2859
- onClick: u,
2860
- labelLeft: "Engine Fine Tuning",
2861
- children: /* @__PURE__ */ n(He, { className: "size-3", monotone: !0 })
2862
- }
2863
- ),
2864
- /* @__PURE__ */ n(
2865
- U,
2866
- {
2867
- spacing: { t: 2, l: 2 },
2868
- size: "small",
2869
- onClick: m,
2870
- labelLeft: "Tags",
2871
- children: /* @__PURE__ */ n(He, { className: "size-3", monotone: !0 })
2872
- }
2873
- )
2874
- ]
2875
- }
2876
- ),
2877
- r !== ao.PASSKEY && /* @__PURE__ */ y(
2878
- M,
2879
- {
2880
- spacing: { t: 4 },
2881
- className: "prose-dark dark:prose-lighter",
2882
- header: /* @__PURE__ */ n("h2", { className: "m-0", children: /* @__PURE__ */ y(q, { columnGap: 3, alignVertical: "center", children: [
2883
- /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(De, { className: "size-8" }) }),
2884
- /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n("div", { children: I.PREFERENCES.PASSKEY_TITLE }) })
2885
- ] }) }),
2886
- children: [
2887
- /* @__PURE__ */ n("p", { children: I.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2888
- /* @__PURE__ */ n(
2889
- U,
2890
- {
2891
- size: "small",
2892
- spacing: { t: 2 },
2893
- onClick: o,
2894
- labelLeft: I.PREFERENCES.PASSKEY_BUTTON,
2895
- children: /* @__PURE__ */ n(De, { className: "size-5", monotone: !0 })
2896
- }
2897
- )
2898
- ]
2899
- }
2900
- )
2901
- ] }) : null;
2902
- }, pr = ({
2903
- open: e,
2904
- onOpenChange: t
2905
- }) => /* @__PURE__ */ n(Y, { open: e, onOpenChange: t, title: so, children: /* @__PURE__ */ n(hr, {}) }), wr = () => {
2906
- const { state: e, dispatch: t, serverStats: o } = P(se), [r, a] = x((e == null ? void 0 : e.engine) || te), [s, i] = x(!1), [l, h] = x(!1), [d, c] = x(!1), [p, v] = x(!1), [u, m] = x(!1), [b] = le({
2907
- key: ie + ot,
2908
- initialValue: !1
2909
- }), { logout: g, getAccessToken: k, user: w } = W(), T = () => {
2910
- i(!s);
2911
- }, E = () => {
2912
- h(!l);
2913
- }, R = () => {
2914
- c(!d);
2915
- }, $ = () => {
2916
- v(!p);
2917
- }, O = () => {
2918
- m(!u);
2919
- };
2920
- return K(() => {
2921
- e && e.engine && e.engine !== r && a(e.engine);
2922
- }, [e, r]), /* @__PURE__ */ y(S, { children: [
2923
- /* @__PURE__ */ n(
2924
- Ot,
2925
- {
2926
- showConfirmation: u,
2927
- setShowConfirmation: m,
2928
- action: g,
2929
- customStrings: {
2930
- confirmAction: Fe,
2931
- cancelAction: "Cancel",
2932
- title: Fe
2933
- },
2934
- children: /* @__PURE__ */ n("p", { children: "Are you sure you want to log out?" })
2935
- }
2936
- ),
2937
- /* @__PURE__ */ n(pr, { open: s, onOpenChange: i }),
2938
- /* @__PURE__ */ n(Zn, { open: l, onOpenChange: h }),
2939
- /* @__PURE__ */ n(er, { open: d, onOpenChange: c }),
2940
- /* @__PURE__ */ n(Kn, { open: p, onOpenChange: v }),
2941
- /* @__PURE__ */ y("div", { className: "relative", children: [
2942
- b && o && /* @__PURE__ */ n("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ n(
2943
- xe,
2944
- {
2945
- mode: "dark",
2946
- focusMode: "light",
2947
- trigger: /* @__PURE__ */ n(U, { children: e && e.engine === me ? /* @__PURE__ */ n(pt, {}) : /* @__PURE__ */ n(gt, {}) }),
2948
- defaultPlacement: "bottom-start",
2949
- children: /* @__PURE__ */ n(H, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ n(
2950
- wn,
2951
- {
2952
- size: "small",
2953
- mode: "dark",
2954
- focusMode: "light",
2955
- value: r,
2956
- onValueChange: async (N) => {
2957
- if (N)
2958
- try {
2959
- await z({
2960
- accessToken: await k(),
2961
- type: D.SET_USER_PREFERENCES,
2962
- params: {
2963
- user: w == null ? void 0 : w.username,
2964
- engine: N
2965
- }
2966
- }), t({
2967
- type: nt,
2968
- payload: {
2969
- engine: N
2970
- }
2971
- }), t({
2972
- type: tt
2973
- });
2974
- } catch {
2975
- }
2976
- },
2977
- children: o && o.engines.map((N) => /* @__PURE__ */ n(Nn, { value: N }, N))
2978
- }
2979
- ) })
2980
- }
2981
- ) }),
2982
- /* @__PURE__ */ n("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ y(
2983
- xe,
2984
- {
2985
- mode: "dark",
2986
- focusMode: "light",
2987
- trigger: /* @__PURE__ */ n(U, { children: /* @__PURE__ */ n(Ao, {}) }),
2988
- defaultPlacement: "bottom-end",
2989
- children: [
2990
- /* @__PURE__ */ n(
2991
- H,
2992
- {
2993
- label: "Profile",
2994
- onClick: T,
2995
- icon: /* @__PURE__ */ n(So, {})
2996
- }
2997
- ),
2998
- /* @__PURE__ */ n(
2999
- H,
3000
- {
3001
- label: Je,
3002
- onClick: E,
3003
- icon: /* @__PURE__ */ n(To, {})
3004
- }
3005
- ),
3006
- /* @__PURE__ */ n(
3007
- H,
3008
- {
3009
- label: "History",
3010
- onClick: R,
3011
- icon: /* @__PURE__ */ n(Eo, {})
3012
- }
3013
- ),
3014
- /* @__PURE__ */ n(
3015
- H,
3016
- {
3017
- label: "About",
3018
- onClick: $,
3019
- icon: /* @__PURE__ */ n(xo, {})
3020
- }
3021
- ),
3022
- e && e.id && !e.isComponent && /* @__PURE__ */ y(S, { children: [
3023
- /* @__PURE__ */ n(Mo, {}),
3024
- /* @__PURE__ */ n(
3025
- H,
3026
- {
3027
- label: "Log out",
3028
- onClick: O,
3029
- icon: /* @__PURE__ */ n("div", { className: "text-red-700", children: /* @__PURE__ */ n(Io, { monotone: !0 }) })
3030
- }
3031
- )
3032
- ] })
3033
- ]
3034
- }
3035
- ) })
3036
- ] })
3037
- ] });
3038
- };
3039
- export {
3040
- wr as default
3041
- };