@versini/sassysaint 5.3.9 → 5.3.11
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.
- package/dist/chunks/{App.CiWR0jbo.js → App.CGCFh8d3.js} +423 -401
- package/dist/chunks/{LazyHeader.C3UmEKkw.js → LazyHeader.wkfFXKCZ.js} +539 -563
- package/dist/chunks/{LazyMarkdownWithExtra.CA4l-kCG.js → LazyMarkdownWithExtra.CRVtilPm.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.Bq--JTre.js → LazyMessageAssistant.KzZAMNJh.js} +4 -4
- package/dist/chunks/{index.BiQ5lu6V.js → index.BpfSkOWt.js} +70 -63
- package/dist/chunks/{index.DbhB3Iku.js → index.DkEEvxgQ.js} +255 -224
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,215 +1,187 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { g as
|
|
3
|
-
import { serviceCall as
|
|
1
|
+
import { jsx as r, jsxs as v, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { g as O, E as B, CARDS as N, renderDataAsList as se, pluralize as be, AppContext as ue, ABOUT_TITLE as Rt, DEFAULT_AI_ENGINE as ae, numberFormatter as At, durationFormatter as qe, NA as Mt, ROLE_ASSISTANT as Lt, extractAverage as $t, GPT4_MAX_TOKENS as Pt, rn as X, STATS as Xe, b as ie, j as P, R as G, HistoryContext as Ze, LOCAL_STORAGE_PREFIX as me, LOCAL_STORAGE_SORT as Bt, O as Y, ACTION_RESET as Je, ACTION_RESTORE as zt, truncate as Ot, ACTION_SORT as we, LOCAL_STORAGE_SEARCH as Vt, me as xe, ACTION_SEARCH as Dt, HISTORY_TITLE as Ft, LOCAL_STORAGE_ENGINE_TOGGLE as Qe, ENGINE_OPENAI as Te, ENGINE_ANTHROPIC as fe, APP_NAME as Ht, ACTION_ENGINE as et, getCurrentGeoLocation as Gt, TagsContext as Ut, TAGS_DESCRIPTION as jt, ACTION_SET_TAGS as Kt, LOCAL_STORAGE_CHAT_DETAILS as Wt, G as Yt, v as Oe, PROFILE_TITLE as qt, LOG_OUT as Ve } from "./index.BpfSkOWt.js";
|
|
3
|
+
import { serviceCall as F, SERVICE_TYPES as H, E as he, f as D, ge as Xt, he as Zt, ue as Ne, de as $, pe as Jt, me as Qt, be as eo, we as De, n as Fe } from "./index.DkEEvxgQ.js";
|
|
4
4
|
import * as f from "react";
|
|
5
|
-
import x, { useId as
|
|
5
|
+
import x, { useId as to, forwardRef as tt, useState as S, useRef as le, useContext as z, useEffect as U, Suspense as oo, lazy as ro, useMemo as ao } from "react";
|
|
6
6
|
import w from "clsx";
|
|
7
|
-
import { useFloatingTree as ot, useFloatingNodeId as
|
|
7
|
+
import { useFloatingTree as ot, useFloatingNodeId as no, useListItem as rt, useFloating as so, offset as io, flip as lo, shift as co, autoUpdate as uo, useClick as mo, useRole as ho, useDismiss as go, useListNavigation as po, useTypeahead as fo, useInteractions as bo, useMergeRefs as at, FloatingNode as vo, FloatingList as yo, FloatingPortal as ko, FloatingFocusManager as Co, FloatingTree as wo } from "@floating-ui/react";
|
|
8
8
|
const nt = ({
|
|
9
9
|
className: e,
|
|
10
10
|
viewBox: t,
|
|
11
11
|
spacing: o,
|
|
12
|
-
title:
|
|
12
|
+
title: a,
|
|
13
13
|
monotone: n,
|
|
14
14
|
...s
|
|
15
|
-
}) => /* @__PURE__ */
|
|
16
|
-
|
|
15
|
+
}) => /* @__PURE__ */ r(
|
|
16
|
+
O,
|
|
17
17
|
{
|
|
18
18
|
defaultViewBox: "0 0 256 176",
|
|
19
19
|
defaultClassName: "size-5",
|
|
20
20
|
viewBox: t,
|
|
21
21
|
className: e,
|
|
22
22
|
spacing: o,
|
|
23
|
-
title:
|
|
23
|
+
title: a || "Anthropic",
|
|
24
24
|
...s,
|
|
25
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ r("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
|
|
26
26
|
}
|
|
27
|
-
),
|
|
27
|
+
), To = ({
|
|
28
28
|
className: e,
|
|
29
29
|
viewBox: t,
|
|
30
30
|
spacing: o,
|
|
31
|
-
title:
|
|
31
|
+
title: a,
|
|
32
32
|
monotone: n,
|
|
33
33
|
...s
|
|
34
34
|
}) => /* @__PURE__ */ v(
|
|
35
|
-
|
|
35
|
+
O,
|
|
36
36
|
{
|
|
37
37
|
defaultViewBox: "0 0 512 512",
|
|
38
38
|
defaultClassName: "size-5",
|
|
39
39
|
viewBox: t,
|
|
40
40
|
className: e,
|
|
41
41
|
spacing: o,
|
|
42
|
-
title:
|
|
42
|
+
title: a || "Back",
|
|
43
43
|
...s,
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ r(
|
|
46
46
|
"path",
|
|
47
47
|
{
|
|
48
48
|
opacity: n ? "1" : "0.4",
|
|
49
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
50
|
}
|
|
51
51
|
),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ r("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
|
-
),
|
|
55
|
+
), No = ({
|
|
56
56
|
className: e,
|
|
57
57
|
viewBox: t,
|
|
58
58
|
spacing: o,
|
|
59
|
-
title:
|
|
59
|
+
title: a,
|
|
60
60
|
monotone: n,
|
|
61
61
|
...s
|
|
62
62
|
}) => /* @__PURE__ */ v(
|
|
63
|
-
|
|
63
|
+
O,
|
|
64
64
|
{
|
|
65
65
|
defaultViewBox: "0 0 448 512",
|
|
66
66
|
defaultClassName: "size-5",
|
|
67
67
|
viewBox: t,
|
|
68
68
|
className: e,
|
|
69
69
|
spacing: o,
|
|
70
|
-
title:
|
|
70
|
+
title: a || "Chart",
|
|
71
71
|
...s,
|
|
72
72
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ r(
|
|
74
74
|
"path",
|
|
75
75
|
{
|
|
76
76
|
opacity: n ? "1" : "0.4",
|
|
77
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
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ r("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
|
-
),
|
|
83
|
+
), Eo = ({
|
|
84
84
|
className: e,
|
|
85
85
|
viewBox: t,
|
|
86
86
|
spacing: o,
|
|
87
|
-
title:
|
|
87
|
+
title: a,
|
|
88
88
|
monotone: n,
|
|
89
89
|
...s
|
|
90
90
|
}) => /* @__PURE__ */ v(
|
|
91
|
-
|
|
91
|
+
O,
|
|
92
92
|
{
|
|
93
93
|
defaultViewBox: "0 0 448 512",
|
|
94
94
|
defaultClassName: "size-5",
|
|
95
95
|
viewBox: t,
|
|
96
96
|
className: e,
|
|
97
97
|
spacing: o,
|
|
98
|
-
title:
|
|
98
|
+
title: a || "Delete",
|
|
99
99
|
...s,
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ r(
|
|
102
102
|
"path",
|
|
103
103
|
{
|
|
104
104
|
opacity: n ? "1" : "0.4",
|
|
105
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
106
|
}
|
|
107
107
|
),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
), He = ({
|
|
112
|
-
className: e,
|
|
113
|
-
viewBox: t,
|
|
114
|
-
spacing: o,
|
|
115
|
-
title: r,
|
|
116
|
-
monotone: n,
|
|
117
|
-
...s
|
|
118
|
-
}) => /* @__PURE__ */ v(
|
|
119
|
-
B,
|
|
120
|
-
{
|
|
121
|
-
defaultViewBox: "0 0 512 512",
|
|
122
|
-
defaultClassName: "size-5",
|
|
123
|
-
viewBox: t,
|
|
124
|
-
className: e,
|
|
125
|
-
spacing: o,
|
|
126
|
-
title: r || "Edit",
|
|
127
|
-
...s,
|
|
128
|
-
children: [
|
|
129
|
-
/* @__PURE__ */ a(
|
|
130
|
-
"path",
|
|
131
|
-
{
|
|
132
|
-
opacity: n ? "1" : "0.4",
|
|
133
|
-
d: "M0 160c0-53 43-96 96-96h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32 14.3-32 32V416c0 17.7 14.3 32 32 32H352c17.7 0 32-14.3 32-32V320c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 53-43 96-96 96H96c-53 0-96-43-96-96V160z"
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
/* @__PURE__ */ a("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
|
|
108
|
+
/* @__PURE__ */ r("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
|
|
137
109
|
]
|
|
138
110
|
}
|
|
139
|
-
),
|
|
111
|
+
), xo = ({
|
|
140
112
|
className: e,
|
|
141
113
|
viewBox: t,
|
|
142
114
|
spacing: o,
|
|
143
|
-
title:
|
|
115
|
+
title: a,
|
|
144
116
|
monotone: n,
|
|
145
117
|
...s
|
|
146
118
|
}) => /* @__PURE__ */ v(
|
|
147
|
-
|
|
119
|
+
O,
|
|
148
120
|
{
|
|
149
121
|
defaultViewBox: "0 0 512 512",
|
|
150
122
|
defaultClassName: "size-5",
|
|
151
123
|
viewBox: t,
|
|
152
124
|
className: e,
|
|
153
125
|
spacing: o,
|
|
154
|
-
title:
|
|
126
|
+
title: a || "History",
|
|
155
127
|
...s,
|
|
156
128
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ r(
|
|
158
130
|
"path",
|
|
159
131
|
{
|
|
160
132
|
opacity: n ? "1" : "0.4",
|
|
161
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"
|
|
162
134
|
}
|
|
163
135
|
),
|
|
164
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ r("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
|
|
165
137
|
]
|
|
166
138
|
}
|
|
167
|
-
),
|
|
139
|
+
), Io = ({
|
|
168
140
|
className: e,
|
|
169
141
|
viewBox: t,
|
|
170
142
|
spacing: o,
|
|
171
|
-
title:
|
|
143
|
+
title: a,
|
|
172
144
|
monotone: n,
|
|
173
145
|
...s
|
|
174
146
|
}) => /* @__PURE__ */ v(
|
|
175
|
-
|
|
147
|
+
O,
|
|
176
148
|
{
|
|
177
149
|
defaultViewBox: "0 0 512 512",
|
|
178
150
|
defaultClassName: "size-5",
|
|
179
151
|
viewBox: t,
|
|
180
152
|
className: e,
|
|
181
153
|
spacing: o,
|
|
182
|
-
title:
|
|
154
|
+
title: a || "Info",
|
|
183
155
|
...s,
|
|
184
156
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ r(
|
|
186
158
|
"path",
|
|
187
159
|
{
|
|
188
160
|
opacity: "0.4",
|
|
189
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"
|
|
190
162
|
}
|
|
191
163
|
),
|
|
192
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ r("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
|
|
193
165
|
]
|
|
194
166
|
}
|
|
195
167
|
), st = ({
|
|
196
168
|
className: e,
|
|
197
169
|
viewBox: t,
|
|
198
170
|
spacing: o,
|
|
199
|
-
title:
|
|
171
|
+
title: a,
|
|
200
172
|
monotone: n,
|
|
201
173
|
...s
|
|
202
|
-
}) => /* @__PURE__ */
|
|
203
|
-
|
|
174
|
+
}) => /* @__PURE__ */ r(
|
|
175
|
+
O,
|
|
204
176
|
{
|
|
205
177
|
defaultViewBox: "0 0 24 24",
|
|
206
178
|
defaultClassName: "size-5",
|
|
207
179
|
viewBox: t,
|
|
208
180
|
className: e,
|
|
209
181
|
spacing: o,
|
|
210
|
-
title:
|
|
182
|
+
title: a || "OpenAI",
|
|
211
183
|
...s,
|
|
212
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ r(
|
|
213
185
|
"path",
|
|
214
186
|
{
|
|
215
187
|
fill: "currentColor",
|
|
@@ -217,84 +189,84 @@ const nt = ({
|
|
|
217
189
|
}
|
|
218
190
|
)
|
|
219
191
|
}
|
|
220
|
-
),
|
|
192
|
+
), So = ({
|
|
221
193
|
className: e,
|
|
222
194
|
viewBox: t,
|
|
223
195
|
spacing: o,
|
|
224
|
-
title:
|
|
196
|
+
title: a,
|
|
225
197
|
monotone: n,
|
|
226
198
|
...s
|
|
227
199
|
}) => /* @__PURE__ */ v(
|
|
228
|
-
|
|
200
|
+
O,
|
|
229
201
|
{
|
|
230
202
|
defaultViewBox: "0 0 576 512",
|
|
231
203
|
defaultClassName: "size-5",
|
|
232
204
|
viewBox: t,
|
|
233
205
|
className: e,
|
|
234
206
|
spacing: o,
|
|
235
|
-
title:
|
|
207
|
+
title: a || "Profile",
|
|
236
208
|
...s,
|
|
237
209
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ r(
|
|
239
211
|
"path",
|
|
240
212
|
{
|
|
241
213
|
opacity: "0.4",
|
|
242
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"
|
|
243
215
|
}
|
|
244
216
|
),
|
|
245
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ r("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
|
|
246
218
|
]
|
|
247
219
|
}
|
|
248
|
-
),
|
|
220
|
+
), _o = ({
|
|
249
221
|
className: e,
|
|
250
222
|
viewBox: t,
|
|
251
223
|
spacing: o,
|
|
252
|
-
title:
|
|
224
|
+
title: a,
|
|
253
225
|
monotone: n,
|
|
254
226
|
...s
|
|
255
227
|
}) => /* @__PURE__ */ v(
|
|
256
|
-
|
|
228
|
+
O,
|
|
257
229
|
{
|
|
258
230
|
defaultViewBox: "0 0 512 512",
|
|
259
231
|
defaultClassName: "size-5",
|
|
260
232
|
viewBox: t,
|
|
261
233
|
className: e,
|
|
262
234
|
spacing: o,
|
|
263
|
-
title:
|
|
235
|
+
title: a || "Restore",
|
|
264
236
|
...s,
|
|
265
237
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ r(
|
|
267
239
|
"path",
|
|
268
240
|
{
|
|
269
241
|
opacity: n ? "1" : "0.4",
|
|
270
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"
|
|
271
243
|
}
|
|
272
244
|
),
|
|
273
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ r("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
|
|
274
246
|
]
|
|
275
247
|
}
|
|
276
|
-
),
|
|
248
|
+
), Ro = ({
|
|
277
249
|
className: e,
|
|
278
250
|
viewBox: t,
|
|
279
251
|
spacing: o,
|
|
280
|
-
title:
|
|
252
|
+
title: a,
|
|
281
253
|
monotone: n,
|
|
282
254
|
...s
|
|
283
|
-
}) => /* @__PURE__ */
|
|
284
|
-
|
|
255
|
+
}) => /* @__PURE__ */ r(
|
|
256
|
+
O,
|
|
285
257
|
{
|
|
286
258
|
defaultViewBox: "0 0 448 512",
|
|
287
259
|
defaultClassName: "size-5",
|
|
288
260
|
viewBox: t,
|
|
289
261
|
className: e,
|
|
290
262
|
spacing: o,
|
|
291
|
-
title:
|
|
263
|
+
title: a || "Settings",
|
|
292
264
|
...s,
|
|
293
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ r("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
|
|
294
266
|
}
|
|
295
267
|
);
|
|
296
268
|
function ce(e) {
|
|
297
|
-
return
|
|
269
|
+
return to();
|
|
298
270
|
}
|
|
299
271
|
const Ie = f.createContext({
|
|
300
272
|
getItemProps: () => ({}),
|
|
@@ -305,7 +277,7 @@ const Ie = f.createContext({
|
|
|
305
277
|
setHasFocusInside: () => {
|
|
306
278
|
},
|
|
307
279
|
isOpen: !1
|
|
308
|
-
}),
|
|
280
|
+
}), He = (e) => {
|
|
309
281
|
if (typeof e == "string")
|
|
310
282
|
return e;
|
|
311
283
|
if (typeof e == "function")
|
|
@@ -321,39 +293,39 @@ const Ie = f.createContext({
|
|
|
321
293
|
trigger: e,
|
|
322
294
|
children: t,
|
|
323
295
|
label: o = "Open menu",
|
|
324
|
-
defaultPlacement:
|
|
296
|
+
defaultPlacement: a = "bottom-start",
|
|
325
297
|
onOpenChange: n,
|
|
326
298
|
spacing: s,
|
|
327
299
|
mode: i = "system",
|
|
328
300
|
focusMode: c = "system",
|
|
329
301
|
...h
|
|
330
302
|
}, m) => {
|
|
331
|
-
const [l, g] = S(!1), [b, u] = S(!1), [d, y] = S(null), C = le([]), p = le([]), k =
|
|
303
|
+
const [l, g] = S(!1), [b, u] = S(!1), [d, y] = S(null), C = le([]), p = le([]), k = z(Ie), T = ot(), I = no(), M = rt(), { floatingStyles: _, refs: V, context: E } = so({
|
|
332
304
|
nodeId: I,
|
|
333
305
|
open: l,
|
|
334
306
|
onOpenChange: (oe) => {
|
|
335
307
|
g(oe), n == null || n(oe);
|
|
336
308
|
},
|
|
337
|
-
placement:
|
|
309
|
+
placement: a,
|
|
338
310
|
strategy: "fixed",
|
|
339
|
-
middleware: [
|
|
340
|
-
whileElementsMounted:
|
|
341
|
-
}), ee =
|
|
311
|
+
middleware: [io({ mainAxis: 10 }), lo(), co()],
|
|
312
|
+
whileElementsMounted: uo
|
|
313
|
+
}), ee = mo(E, {
|
|
342
314
|
event: "mousedown",
|
|
343
315
|
toggle: !0,
|
|
344
316
|
ignoreMouse: !1
|
|
345
|
-
}), J =
|
|
317
|
+
}), J = ho(E, { role: "menu" }), j = go(E, { bubbles: !0 }), te = po(E, {
|
|
346
318
|
listRef: C,
|
|
347
319
|
activeIndex: d,
|
|
348
320
|
nested: !1,
|
|
349
321
|
onNavigate: y,
|
|
350
322
|
loop: !0
|
|
351
|
-
}), L =
|
|
323
|
+
}), L = fo(E, {
|
|
352
324
|
listRef: p,
|
|
353
325
|
onMatch: l ? y : void 0,
|
|
354
326
|
activeIndex: d
|
|
355
|
-
}), { getReferenceProps: K, getFloatingProps: R, getItemProps: It } =
|
|
356
|
-
noInternalClick:
|
|
327
|
+
}), { getReferenceProps: K, getFloatingProps: R, getItemProps: It } = bo([ee, J, j, te, L]), ze = He(e) === "Button" || He(e) === "ButtonIcon", St = ze ? {
|
|
328
|
+
noInternalClick: ze,
|
|
357
329
|
focusMode: c,
|
|
358
330
|
mode: i,
|
|
359
331
|
spacing: s
|
|
@@ -362,7 +334,7 @@ const Ie = f.createContext({
|
|
|
362
334
|
"aria-label": o,
|
|
363
335
|
"data-open": l ? "" : void 0,
|
|
364
336
|
"data-focus-inside": b ? "" : void 0,
|
|
365
|
-
ref:
|
|
337
|
+
ref: at([V.setReference, M.ref, m]),
|
|
366
338
|
...K(
|
|
367
339
|
k.getItemProps({
|
|
368
340
|
...h
|
|
@@ -380,9 +352,9 @@ const Ie = f.createContext({
|
|
|
380
352
|
};
|
|
381
353
|
}, [T, n]), U(() => {
|
|
382
354
|
l && T && T.events.emit("menuopen", { nodeId: I });
|
|
383
|
-
}, [T, l, I]), /* @__PURE__ */ v(
|
|
355
|
+
}, [T, l, I]), /* @__PURE__ */ v(vo, { id: I, children: [
|
|
384
356
|
_t,
|
|
385
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ r(
|
|
386
358
|
Ie.Provider,
|
|
387
359
|
{
|
|
388
360
|
value: {
|
|
@@ -392,14 +364,14 @@ const Ie = f.createContext({
|
|
|
392
364
|
setHasFocusInside: u,
|
|
393
365
|
isOpen: l
|
|
394
366
|
},
|
|
395
|
-
children: /* @__PURE__ */
|
|
396
|
-
|
|
367
|
+
children: /* @__PURE__ */ r(yo, { elementsRef: C, labelsRef: p, children: l && /* @__PURE__ */ r(ko, { children: /* @__PURE__ */ r(
|
|
368
|
+
Co,
|
|
397
369
|
{
|
|
398
370
|
context: E,
|
|
399
371
|
modal: !1,
|
|
400
372
|
initialFocus: 0,
|
|
401
373
|
returnFocus: !0,
|
|
402
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ r(
|
|
403
375
|
"div",
|
|
404
376
|
{
|
|
405
377
|
ref: V.setFloating,
|
|
@@ -415,7 +387,7 @@ const Ie = f.createContext({
|
|
|
415
387
|
)
|
|
416
388
|
] });
|
|
417
389
|
}
|
|
418
|
-
), Se = tt((e, t) => /* @__PURE__ */
|
|
390
|
+
), Se = tt((e, t) => /* @__PURE__ */ r(wo, { children: /* @__PURE__ */ r(it, { ...e, ref: t }) }));
|
|
419
391
|
Se.displayName = "Menu";
|
|
420
392
|
it.displayName = "MenuComponent";
|
|
421
393
|
const W = f.forwardRef(
|
|
@@ -423,13 +395,13 @@ const W = f.forwardRef(
|
|
|
423
395
|
label: e,
|
|
424
396
|
disabled: t,
|
|
425
397
|
icon: o,
|
|
426
|
-
raw:
|
|
398
|
+
raw: a = !1,
|
|
427
399
|
children: n,
|
|
428
400
|
ignoreClick: s = !1,
|
|
429
401
|
...i
|
|
430
402
|
}, c) => {
|
|
431
|
-
const h = f.useContext(Ie), m =
|
|
432
|
-
return
|
|
403
|
+
const h = f.useContext(Ie), m = rt({ label: t ? null : e }), l = ot(), g = at([m.ref, c]);
|
|
404
|
+
return a && n ? /* @__PURE__ */ r(
|
|
433
405
|
"div",
|
|
434
406
|
{
|
|
435
407
|
role: "menuitem",
|
|
@@ -462,16 +434,16 @@ const W = f.forwardRef(
|
|
|
462
434
|
}),
|
|
463
435
|
children: [
|
|
464
436
|
o,
|
|
465
|
-
e && /* @__PURE__ */
|
|
437
|
+
e && /* @__PURE__ */ r("span", { className: "pl-2", children: e })
|
|
466
438
|
]
|
|
467
439
|
}
|
|
468
440
|
);
|
|
469
441
|
}
|
|
470
442
|
);
|
|
471
443
|
W.displayName = "MenuItem";
|
|
472
|
-
const
|
|
444
|
+
const Ao = ({ className: e, ...t }) => {
|
|
473
445
|
const o = w(e, "my-1 border-t border-border-medium");
|
|
474
|
-
return /* @__PURE__ */
|
|
446
|
+
return /* @__PURE__ */ r("div", { className: o, ...t });
|
|
475
447
|
};
|
|
476
448
|
/*!
|
|
477
449
|
@versini/ui-menu v1.1.1
|
|
@@ -499,15 +471,15 @@ try {
|
|
|
499
471
|
});
|
|
500
472
|
} catch {
|
|
501
473
|
}
|
|
502
|
-
const
|
|
474
|
+
const Mo = "av-togglegroup", Lo = "av-togglegroup-item-wrapper", $o = "av-togglegroup-item";
|
|
503
475
|
function Me(e, t = []) {
|
|
504
476
|
let o = [];
|
|
505
|
-
function
|
|
477
|
+
function a(s, i) {
|
|
506
478
|
const c = f.createContext(i), h = o.length;
|
|
507
479
|
o = [...o, i];
|
|
508
480
|
function m(g) {
|
|
509
481
|
const { scope: b, children: u, ...d } = g, y = (b == null ? void 0 : b[e][h]) || c, C = f.useMemo(() => d, Object.values(d));
|
|
510
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ r(y.Provider, { value: C, children: u });
|
|
511
483
|
}
|
|
512
484
|
function l(g, b) {
|
|
513
485
|
const u = (b == null ? void 0 : b[e][h]) || c, d = f.useContext(u);
|
|
@@ -527,18 +499,18 @@ function Me(e, t = []) {
|
|
|
527
499
|
);
|
|
528
500
|
};
|
|
529
501
|
};
|
|
530
|
-
return n.scopeName = e, [
|
|
502
|
+
return n.scopeName = e, [a, Po(n, ...t)];
|
|
531
503
|
}
|
|
532
|
-
function
|
|
504
|
+
function Po(...e) {
|
|
533
505
|
const t = e[0];
|
|
534
506
|
if (e.length === 1) return t;
|
|
535
507
|
const o = () => {
|
|
536
|
-
const
|
|
508
|
+
const a = e.map((n) => ({
|
|
537
509
|
useScope: n(),
|
|
538
510
|
scopeName: n.scopeName
|
|
539
511
|
}));
|
|
540
512
|
return function(n) {
|
|
541
|
-
const s =
|
|
513
|
+
const s = a.reduce((i, { useScope: c, scopeName: h }) => {
|
|
542
514
|
const m = c(n)[`__scope${h}`];
|
|
543
515
|
return { ...i, ...m };
|
|
544
516
|
}, {});
|
|
@@ -547,30 +519,30 @@ function Bo(...e) {
|
|
|
547
519
|
};
|
|
548
520
|
return o.scopeName = t.scopeName, o;
|
|
549
521
|
}
|
|
550
|
-
function
|
|
522
|
+
function Bo(e, t) {
|
|
551
523
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
552
524
|
}
|
|
553
525
|
function lt(...e) {
|
|
554
|
-
return (t) => e.forEach((o) =>
|
|
526
|
+
return (t) => e.forEach((o) => Bo(o, t));
|
|
555
527
|
}
|
|
556
528
|
function _e(...e) {
|
|
557
529
|
return f.useCallback(lt(...e), e);
|
|
558
530
|
}
|
|
559
531
|
var ve = f.forwardRef((e, t) => {
|
|
560
|
-
const { children: o, ...
|
|
532
|
+
const { children: o, ...a } = e, n = f.Children.toArray(o), s = n.find(Oo);
|
|
561
533
|
if (s) {
|
|
562
534
|
const i = s.props.children, c = n.map((h) => h === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : h);
|
|
563
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ r(Re, { ...a, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, c) : null });
|
|
564
536
|
}
|
|
565
|
-
return /* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ r(Re, { ...a, ref: t, children: o });
|
|
566
538
|
});
|
|
567
539
|
ve.displayName = "Slot";
|
|
568
540
|
var Re = f.forwardRef((e, t) => {
|
|
569
|
-
const { children: o, ...
|
|
541
|
+
const { children: o, ...a } = e;
|
|
570
542
|
if (f.isValidElement(o)) {
|
|
571
|
-
const n =
|
|
543
|
+
const n = Do(o);
|
|
572
544
|
return f.cloneElement(o, {
|
|
573
|
-
...
|
|
545
|
+
...Vo(a, o.props),
|
|
574
546
|
// @ts-ignore
|
|
575
547
|
ref: t ? lt(t, n) : n
|
|
576
548
|
});
|
|
@@ -578,26 +550,26 @@ var Re = f.forwardRef((e, t) => {
|
|
|
578
550
|
return f.Children.count(o) > 1 ? f.Children.only(null) : null;
|
|
579
551
|
});
|
|
580
552
|
Re.displayName = "SlotClone";
|
|
581
|
-
var zo = ({ children: e }) => /* @__PURE__ */
|
|
582
|
-
function
|
|
553
|
+
var zo = ({ children: e }) => /* @__PURE__ */ r(A, { children: e });
|
|
554
|
+
function Oo(e) {
|
|
583
555
|
return f.isValidElement(e) && e.type === zo;
|
|
584
556
|
}
|
|
585
|
-
function
|
|
557
|
+
function Vo(e, t) {
|
|
586
558
|
const o = { ...t };
|
|
587
|
-
for (const
|
|
588
|
-
const n = e[
|
|
589
|
-
/^on[A-Z]/.test(
|
|
559
|
+
for (const a in t) {
|
|
560
|
+
const n = e[a], s = t[a];
|
|
561
|
+
/^on[A-Z]/.test(a) ? n && s ? o[a] = (...i) => {
|
|
590
562
|
s(...i), n(...i);
|
|
591
|
-
} : n && (o[
|
|
563
|
+
} : n && (o[a] = n) : a === "style" ? o[a] = { ...n, ...s } : a === "className" && (o[a] = [n, s].filter(Boolean).join(" "));
|
|
592
564
|
}
|
|
593
565
|
return { ...e, ...o };
|
|
594
566
|
}
|
|
595
|
-
function
|
|
567
|
+
function Do(e) {
|
|
596
568
|
var t, o;
|
|
597
|
-
let
|
|
598
|
-
return n ? e.ref : (
|
|
569
|
+
let a = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = a && "isReactWarning" in a && a.isReactWarning;
|
|
570
|
+
return n ? e.ref : (a = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = a && "isReactWarning" in a && a.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
599
571
|
}
|
|
600
|
-
var
|
|
572
|
+
var Fo = [
|
|
601
573
|
"a",
|
|
602
574
|
"button",
|
|
603
575
|
"div",
|
|
@@ -614,39 +586,39 @@ var Do = [
|
|
|
614
586
|
"span",
|
|
615
587
|
"svg",
|
|
616
588
|
"ul"
|
|
617
|
-
], de =
|
|
618
|
-
const o = f.forwardRef((
|
|
619
|
-
const { asChild: s, ...i } =
|
|
620
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
589
|
+
], de = Fo.reduce((e, t) => {
|
|
590
|
+
const o = f.forwardRef((a, n) => {
|
|
591
|
+
const { asChild: s, ...i } = a, c = s ? ve : t;
|
|
592
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(c, { ...i, ref: n });
|
|
621
593
|
});
|
|
622
594
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
623
595
|
}, {});
|
|
624
596
|
function q(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
625
|
-
return function(
|
|
626
|
-
if (e == null || e(
|
|
627
|
-
return t == null ? void 0 : t(
|
|
597
|
+
return function(a) {
|
|
598
|
+
if (e == null || e(a), o === !1 || !a.defaultPrevented)
|
|
599
|
+
return t == null ? void 0 : t(a);
|
|
628
600
|
};
|
|
629
601
|
}
|
|
630
602
|
function Ho(e) {
|
|
631
|
-
const t = e + "CollectionProvider", [o,
|
|
603
|
+
const t = e + "CollectionProvider", [o, a] = Me(t), [n, s] = o(
|
|
632
604
|
t,
|
|
633
605
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
634
606
|
), i = (u) => {
|
|
635
607
|
const { scope: d, children: y } = u, C = x.useRef(null), p = x.useRef(/* @__PURE__ */ new Map()).current;
|
|
636
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ r(n, { scope: d, itemMap: p, collectionRef: C, children: y });
|
|
637
609
|
};
|
|
638
610
|
i.displayName = t;
|
|
639
611
|
const c = e + "CollectionSlot", h = x.forwardRef(
|
|
640
612
|
(u, d) => {
|
|
641
613
|
const { scope: y, children: C } = u, p = s(c, y), k = _e(d, p.collectionRef);
|
|
642
|
-
return /* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ r(ve, { ref: k, children: C });
|
|
643
615
|
}
|
|
644
616
|
);
|
|
645
617
|
h.displayName = c;
|
|
646
618
|
const m = e + "CollectionItemSlot", l = "data-radix-collection-item", g = x.forwardRef(
|
|
647
619
|
(u, d) => {
|
|
648
620
|
const { scope: y, children: C, ...p } = u, k = x.useRef(null), T = _e(d, k), I = s(m, y);
|
|
649
|
-
return x.useEffect(() => (I.itemMap.set(k, { ref: k, ...p }), () => void I.itemMap.delete(k))), /* @__PURE__ */
|
|
621
|
+
return x.useEffect(() => (I.itemMap.set(k, { ref: k, ...p }), () => void I.itemMap.delete(k))), /* @__PURE__ */ r(ve, { [l]: "", ref: T, children: C });
|
|
650
622
|
}
|
|
651
623
|
);
|
|
652
624
|
g.displayName = m;
|
|
@@ -664,16 +636,16 @@ function Ho(e) {
|
|
|
664
636
|
return [
|
|
665
637
|
{ Provider: i, Slot: h, ItemSlot: g },
|
|
666
638
|
b,
|
|
667
|
-
|
|
639
|
+
a
|
|
668
640
|
];
|
|
669
641
|
}
|
|
670
|
-
var
|
|
671
|
-
},
|
|
672
|
-
}),
|
|
673
|
-
function
|
|
674
|
-
const [t, o] = f.useState(
|
|
675
|
-
return
|
|
676
|
-
o((
|
|
642
|
+
var Go = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
|
|
643
|
+
}, Uo = f.useId || (() => {
|
|
644
|
+
}), jo = 0;
|
|
645
|
+
function Ko(e) {
|
|
646
|
+
const [t, o] = f.useState(Uo());
|
|
647
|
+
return Go(() => {
|
|
648
|
+
o((a) => a ?? String(jo++));
|
|
677
649
|
}, [e]), t ? `radix-${t}` : "";
|
|
678
650
|
}
|
|
679
651
|
function Le(e) {
|
|
@@ -681,8 +653,8 @@ function Le(e) {
|
|
|
681
653
|
return f.useEffect(() => {
|
|
682
654
|
t.current = e;
|
|
683
655
|
}), f.useMemo(() => (...o) => {
|
|
684
|
-
var
|
|
685
|
-
return (
|
|
656
|
+
var a;
|
|
657
|
+
return (a = t.current) == null ? void 0 : a.call(t, ...o);
|
|
686
658
|
}, []);
|
|
687
659
|
}
|
|
688
660
|
function ke({
|
|
@@ -691,7 +663,7 @@ function ke({
|
|
|
691
663
|
onChange: o = () => {
|
|
692
664
|
}
|
|
693
665
|
}) {
|
|
694
|
-
const [
|
|
666
|
+
const [a, n] = Wo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : a, c = Le(o), h = f.useCallback(
|
|
695
667
|
(m) => {
|
|
696
668
|
if (s) {
|
|
697
669
|
const l = typeof m == "function" ? m(e) : m;
|
|
@@ -703,31 +675,31 @@ function ke({
|
|
|
703
675
|
);
|
|
704
676
|
return [i, h];
|
|
705
677
|
}
|
|
706
|
-
function
|
|
678
|
+
function Wo({
|
|
707
679
|
defaultProp: e,
|
|
708
680
|
onChange: t
|
|
709
681
|
}) {
|
|
710
|
-
const o = f.useState(e), [
|
|
682
|
+
const o = f.useState(e), [a] = o, n = f.useRef(a), s = Le(t);
|
|
711
683
|
return f.useEffect(() => {
|
|
712
|
-
n.current !==
|
|
713
|
-
}, [
|
|
684
|
+
n.current !== a && (s(a), n.current = a);
|
|
685
|
+
}, [a, n, s]), o;
|
|
714
686
|
}
|
|
715
|
-
var
|
|
687
|
+
var Yo = f.createContext(void 0);
|
|
716
688
|
function ct(e) {
|
|
717
|
-
const t = f.useContext(
|
|
689
|
+
const t = f.useContext(Yo);
|
|
718
690
|
return e || t || "ltr";
|
|
719
691
|
}
|
|
720
|
-
var Ee = "rovingFocusGroup.onEntryFocus",
|
|
692
|
+
var Ee = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, Ce = "RovingFocusGroup", [Ae, dt, Xo] = Ho(Ce), [Zo, ut] = Me(
|
|
721
693
|
Ce,
|
|
722
|
-
[
|
|
723
|
-
), [
|
|
724
|
-
(e, t) => /* @__PURE__ */
|
|
694
|
+
[Xo]
|
|
695
|
+
), [Jo, Qo] = Zo(Ce), mt = f.forwardRef(
|
|
696
|
+
(e, t) => /* @__PURE__ */ r(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(er, { ...e, ref: t }) }) })
|
|
725
697
|
);
|
|
726
698
|
mt.displayName = Ce;
|
|
727
|
-
var
|
|
699
|
+
var er = f.forwardRef((e, t) => {
|
|
728
700
|
const {
|
|
729
701
|
__scopeRovingFocusGroup: o,
|
|
730
|
-
orientation:
|
|
702
|
+
orientation: a,
|
|
731
703
|
loop: n = !1,
|
|
732
704
|
dir: s,
|
|
733
705
|
currentTabStopId: i,
|
|
@@ -745,11 +717,11 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
745
717
|
const E = b.current;
|
|
746
718
|
if (E)
|
|
747
719
|
return E.addEventListener(Ee, T), () => E.removeEventListener(Ee, T);
|
|
748
|
-
}, [T]), /* @__PURE__ */
|
|
749
|
-
|
|
720
|
+
}, [T]), /* @__PURE__ */ r(
|
|
721
|
+
Jo,
|
|
750
722
|
{
|
|
751
723
|
scope: o,
|
|
752
|
-
orientation:
|
|
724
|
+
orientation: a,
|
|
753
725
|
dir: d,
|
|
754
726
|
loop: n,
|
|
755
727
|
currentTabStopId: y,
|
|
@@ -766,11 +738,11 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
766
738
|
() => V((E) => E - 1),
|
|
767
739
|
[]
|
|
768
740
|
),
|
|
769
|
-
children: /* @__PURE__ */
|
|
741
|
+
children: /* @__PURE__ */ r(
|
|
770
742
|
de.div,
|
|
771
743
|
{
|
|
772
744
|
tabIndex: p || _ === 0 ? -1 : 0,
|
|
773
|
-
"data-orientation":
|
|
745
|
+
"data-orientation": a,
|
|
774
746
|
...g,
|
|
775
747
|
ref: u,
|
|
776
748
|
style: { outline: "none", ...e.style },
|
|
@@ -780,7 +752,7 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
780
752
|
onFocus: q(e.onFocus, (E) => {
|
|
781
753
|
const ee = !M.current;
|
|
782
754
|
if (E.target === E.currentTarget && ee && !p) {
|
|
783
|
-
const J = new CustomEvent(Ee,
|
|
755
|
+
const J = new CustomEvent(Ee, qo);
|
|
784
756
|
if (E.currentTarget.dispatchEvent(J), !J.defaultPrevented) {
|
|
785
757
|
const j = I().filter((R) => R.focusable), te = j.find((R) => R.active), L = j.find((R) => R.id === y), K = [te, L, ...j].filter(
|
|
786
758
|
Boolean
|
|
@@ -799,22 +771,22 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
799
771
|
(e, t) => {
|
|
800
772
|
const {
|
|
801
773
|
__scopeRovingFocusGroup: o,
|
|
802
|
-
focusable:
|
|
774
|
+
focusable: a = !0,
|
|
803
775
|
active: n = !1,
|
|
804
776
|
tabStopId: s,
|
|
805
777
|
...i
|
|
806
|
-
} = e, c =
|
|
778
|
+
} = e, c = Ko(), h = s || c, m = Qo(ht, o), l = m.currentTabStopId === h, g = dt(o), { onFocusableItemAdd: b, onFocusableItemRemove: u } = m;
|
|
807
779
|
return f.useEffect(() => {
|
|
808
|
-
if (
|
|
780
|
+
if (a)
|
|
809
781
|
return b(), () => u();
|
|
810
|
-
}, [
|
|
782
|
+
}, [a, b, u]), /* @__PURE__ */ r(
|
|
811
783
|
Ae.ItemSlot,
|
|
812
784
|
{
|
|
813
785
|
scope: o,
|
|
814
786
|
id: h,
|
|
815
|
-
focusable:
|
|
787
|
+
focusable: a,
|
|
816
788
|
active: n,
|
|
817
|
-
children: /* @__PURE__ */
|
|
789
|
+
children: /* @__PURE__ */ r(
|
|
818
790
|
de.span,
|
|
819
791
|
{
|
|
820
792
|
tabIndex: l ? 0 : -1,
|
|
@@ -822,7 +794,7 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
822
794
|
...i,
|
|
823
795
|
ref: t,
|
|
824
796
|
onMouseDown: q(e.onMouseDown, (d) => {
|
|
825
|
-
|
|
797
|
+
a ? m.onItemFocus(h) : d.preventDefault();
|
|
826
798
|
}),
|
|
827
799
|
onFocus: q(e.onFocus, () => m.onItemFocus(h)),
|
|
828
800
|
onKeyDown: q(e.onKeyDown, (d) => {
|
|
@@ -831,7 +803,7 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
831
803
|
return;
|
|
832
804
|
}
|
|
833
805
|
if (d.target !== d.currentTarget) return;
|
|
834
|
-
const y =
|
|
806
|
+
const y = rr(d, m.orientation, m.dir);
|
|
835
807
|
if (y !== void 0) {
|
|
836
808
|
if (d.metaKey || d.ctrlKey || d.altKey || d.shiftKey) return;
|
|
837
809
|
d.preventDefault();
|
|
@@ -840,7 +812,7 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
840
812
|
else if (y === "prev" || y === "next") {
|
|
841
813
|
y === "prev" && C.reverse();
|
|
842
814
|
const p = C.indexOf(d.currentTarget);
|
|
843
|
-
C = m.loop ?
|
|
815
|
+
C = m.loop ? ar(C, p + 1) : C.slice(p + 1);
|
|
844
816
|
}
|
|
845
817
|
setTimeout(() => pt(C));
|
|
846
818
|
}
|
|
@@ -852,7 +824,7 @@ var Qo = f.forwardRef((e, t) => {
|
|
|
852
824
|
}
|
|
853
825
|
);
|
|
854
826
|
gt.displayName = ht;
|
|
855
|
-
var
|
|
827
|
+
var tr = {
|
|
856
828
|
ArrowLeft: "prev",
|
|
857
829
|
ArrowUp: "prev",
|
|
858
830
|
ArrowRight: "next",
|
|
@@ -862,29 +834,29 @@ var ea = {
|
|
|
862
834
|
PageDown: "last",
|
|
863
835
|
End: "last"
|
|
864
836
|
};
|
|
865
|
-
function
|
|
837
|
+
function or(e, t) {
|
|
866
838
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
867
839
|
}
|
|
868
|
-
function
|
|
869
|
-
const
|
|
870
|
-
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(
|
|
871
|
-
return
|
|
840
|
+
function rr(e, t, o) {
|
|
841
|
+
const a = or(e.key, o);
|
|
842
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
|
|
843
|
+
return tr[a];
|
|
872
844
|
}
|
|
873
845
|
function pt(e, t = !1) {
|
|
874
846
|
const o = document.activeElement;
|
|
875
|
-
for (const
|
|
876
|
-
if (
|
|
847
|
+
for (const a of e)
|
|
848
|
+
if (a === o || (a.focus({ preventScroll: t }), document.activeElement !== o)) return;
|
|
877
849
|
}
|
|
878
|
-
function
|
|
879
|
-
return e.map((o,
|
|
850
|
+
function ar(e, t) {
|
|
851
|
+
return e.map((o, a) => e[(t + a) % e.length]);
|
|
880
852
|
}
|
|
881
|
-
var
|
|
882
|
-
const { pressed: o, defaultPressed:
|
|
853
|
+
var nr = mt, sr = gt, ir = "Toggle", ft = f.forwardRef((e, t) => {
|
|
854
|
+
const { pressed: o, defaultPressed: a = !1, onPressedChange: n, ...s } = e, [i = !1, c] = ke({
|
|
883
855
|
prop: o,
|
|
884
856
|
onChange: n,
|
|
885
|
-
defaultProp:
|
|
857
|
+
defaultProp: a
|
|
886
858
|
});
|
|
887
|
-
return /* @__PURE__ */
|
|
859
|
+
return /* @__PURE__ */ r(
|
|
888
860
|
de.button,
|
|
889
861
|
{
|
|
890
862
|
type: "button",
|
|
@@ -899,31 +871,31 @@ var ra = mt, na = gt, sa = "Toggle", ft = f.forwardRef((e, t) => {
|
|
|
899
871
|
}
|
|
900
872
|
);
|
|
901
873
|
});
|
|
902
|
-
ft.displayName =
|
|
903
|
-
var Q = "ToggleGroup", [bt,
|
|
874
|
+
ft.displayName = ir;
|
|
875
|
+
var Q = "ToggleGroup", [bt, wa] = Me(Q, [
|
|
904
876
|
ut
|
|
905
|
-
]), vt = ut(),
|
|
906
|
-
const { type: o, ...
|
|
877
|
+
]), vt = ut(), $e = x.forwardRef((e, t) => {
|
|
878
|
+
const { type: o, ...a } = e;
|
|
907
879
|
if (o === "single")
|
|
908
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ r(lr, { ...a, ref: t });
|
|
909
881
|
if (o === "multiple")
|
|
910
|
-
return /* @__PURE__ */
|
|
882
|
+
return /* @__PURE__ */ r(cr, { ...a, ref: t });
|
|
911
883
|
throw new Error(`Missing prop \`type\` expected on \`${Q}\``);
|
|
912
884
|
});
|
|
913
|
-
|
|
914
|
-
var [yt, kt] = bt(Q),
|
|
885
|
+
$e.displayName = Q;
|
|
886
|
+
var [yt, kt] = bt(Q), lr = x.forwardRef((e, t) => {
|
|
915
887
|
const {
|
|
916
888
|
value: o,
|
|
917
|
-
defaultValue:
|
|
889
|
+
defaultValue: a,
|
|
918
890
|
onValueChange: n = () => {
|
|
919
891
|
},
|
|
920
892
|
...s
|
|
921
893
|
} = e, [i, c] = ke({
|
|
922
894
|
prop: o,
|
|
923
|
-
defaultProp:
|
|
895
|
+
defaultProp: a,
|
|
924
896
|
onChange: n
|
|
925
897
|
});
|
|
926
|
-
return /* @__PURE__ */
|
|
898
|
+
return /* @__PURE__ */ r(
|
|
927
899
|
yt,
|
|
928
900
|
{
|
|
929
901
|
scope: e.__scopeToggleGroup,
|
|
@@ -931,19 +903,19 @@ var [yt, kt] = bt(Q), ia = x.forwardRef((e, t) => {
|
|
|
931
903
|
value: i ? [i] : [],
|
|
932
904
|
onItemActivate: c,
|
|
933
905
|
onItemDeactivate: x.useCallback(() => c(""), [c]),
|
|
934
|
-
children: /* @__PURE__ */
|
|
906
|
+
children: /* @__PURE__ */ r(Ct, { ...s, ref: t })
|
|
935
907
|
}
|
|
936
908
|
);
|
|
937
|
-
}),
|
|
909
|
+
}), cr = x.forwardRef((e, t) => {
|
|
938
910
|
const {
|
|
939
911
|
value: o,
|
|
940
|
-
defaultValue:
|
|
912
|
+
defaultValue: a,
|
|
941
913
|
onValueChange: n = () => {
|
|
942
914
|
},
|
|
943
915
|
...s
|
|
944
916
|
} = e, [i = [], c] = ke({
|
|
945
917
|
prop: o,
|
|
946
|
-
defaultProp:
|
|
918
|
+
defaultProp: a,
|
|
947
919
|
onChange: n
|
|
948
920
|
}), h = x.useCallback(
|
|
949
921
|
(l) => c((g = []) => [...g, l]),
|
|
@@ -952,7 +924,7 @@ var [yt, kt] = bt(Q), ia = x.forwardRef((e, t) => {
|
|
|
952
924
|
(l) => c((g = []) => g.filter((b) => b !== l)),
|
|
953
925
|
[c]
|
|
954
926
|
);
|
|
955
|
-
return /* @__PURE__ */
|
|
927
|
+
return /* @__PURE__ */ r(
|
|
956
928
|
yt,
|
|
957
929
|
{
|
|
958
930
|
scope: e.__scopeToggleGroup,
|
|
@@ -960,72 +932,72 @@ var [yt, kt] = bt(Q), ia = x.forwardRef((e, t) => {
|
|
|
960
932
|
value: i,
|
|
961
933
|
onItemActivate: h,
|
|
962
934
|
onItemDeactivate: m,
|
|
963
|
-
children: /* @__PURE__ */
|
|
935
|
+
children: /* @__PURE__ */ r(Ct, { ...s, ref: t })
|
|
964
936
|
}
|
|
965
937
|
);
|
|
966
938
|
});
|
|
967
|
-
|
|
968
|
-
var [
|
|
939
|
+
$e.displayName = Q;
|
|
940
|
+
var [dr, ur] = bt(Q), Ct = x.forwardRef(
|
|
969
941
|
(e, t) => {
|
|
970
942
|
const {
|
|
971
943
|
__scopeToggleGroup: o,
|
|
972
|
-
disabled:
|
|
944
|
+
disabled: a = !1,
|
|
973
945
|
rovingFocus: n = !0,
|
|
974
946
|
orientation: s,
|
|
975
947
|
dir: i,
|
|
976
948
|
loop: c = !0,
|
|
977
949
|
...h
|
|
978
950
|
} = e, m = vt(o), l = ct(i), g = { role: "group", dir: l, ...h };
|
|
979
|
-
return /* @__PURE__ */
|
|
980
|
-
|
|
951
|
+
return /* @__PURE__ */ r(dr, { scope: o, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ r(
|
|
952
|
+
nr,
|
|
981
953
|
{
|
|
982
954
|
asChild: !0,
|
|
983
955
|
...m,
|
|
984
956
|
orientation: s,
|
|
985
957
|
dir: l,
|
|
986
958
|
loop: c,
|
|
987
|
-
children: /* @__PURE__ */
|
|
959
|
+
children: /* @__PURE__ */ r(de.div, { ...g, ref: t })
|
|
988
960
|
}
|
|
989
|
-
) : /* @__PURE__ */
|
|
961
|
+
) : /* @__PURE__ */ r(de.div, { ...g, ref: t }) });
|
|
990
962
|
}
|
|
991
963
|
), ye = "ToggleGroupItem", wt = x.forwardRef(
|
|
992
964
|
(e, t) => {
|
|
993
|
-
const o = kt(ye, e.__scopeToggleGroup),
|
|
994
|
-
return
|
|
995
|
-
|
|
965
|
+
const o = kt(ye, e.__scopeToggleGroup), a = ur(ye, e.__scopeToggleGroup), n = vt(e.__scopeToggleGroup), s = o.value.includes(e.value), i = a.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, h = x.useRef(null);
|
|
966
|
+
return a.rovingFocus ? /* @__PURE__ */ r(
|
|
967
|
+
sr,
|
|
996
968
|
{
|
|
997
969
|
asChild: !0,
|
|
998
970
|
...n,
|
|
999
971
|
focusable: !i,
|
|
1000
972
|
active: s,
|
|
1001
973
|
ref: h,
|
|
1002
|
-
children: /* @__PURE__ */
|
|
974
|
+
children: /* @__PURE__ */ r(Ge, { ...c, ref: t })
|
|
1003
975
|
}
|
|
1004
|
-
) : /* @__PURE__ */
|
|
976
|
+
) : /* @__PURE__ */ r(Ge, { ...c, ref: t });
|
|
1005
977
|
}
|
|
1006
978
|
);
|
|
1007
979
|
wt.displayName = ye;
|
|
1008
980
|
var Ge = x.forwardRef(
|
|
1009
981
|
(e, t) => {
|
|
1010
|
-
const { __scopeToggleGroup: o, value:
|
|
1011
|
-
return /* @__PURE__ */
|
|
982
|
+
const { __scopeToggleGroup: o, value: a, ...n } = e, s = kt(ye, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
|
|
983
|
+
return /* @__PURE__ */ r(
|
|
1012
984
|
ft,
|
|
1013
985
|
{
|
|
1014
986
|
...c,
|
|
1015
987
|
...n,
|
|
1016
988
|
ref: t,
|
|
1017
989
|
onPressedChange: (h) => {
|
|
1018
|
-
h ? s.onItemActivate(
|
|
990
|
+
h ? s.onItemActivate(a) : s.onItemDeactivate(a);
|
|
1019
991
|
}
|
|
1020
992
|
}
|
|
1021
993
|
);
|
|
1022
994
|
}
|
|
1023
|
-
),
|
|
995
|
+
), mr = $e, hr = wt;
|
|
1024
996
|
const Tt = x.createContext({
|
|
1025
997
|
size: "medium",
|
|
1026
998
|
focusMode: "system",
|
|
1027
999
|
mode: "system"
|
|
1028
|
-
}),
|
|
1000
|
+
}), gr = (e) => {
|
|
1029
1001
|
let t = "";
|
|
1030
1002
|
if (typeof e == "number" || typeof e == "string")
|
|
1031
1003
|
t = "m-" + e;
|
|
@@ -1034,22 +1006,22 @@ const Tt = x.createContext({
|
|
|
1034
1006
|
(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(" ");
|
|
1035
1007
|
}
|
|
1036
1008
|
return t;
|
|
1037
|
-
},
|
|
1009
|
+
}, pr = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset", {
|
|
1038
1010
|
"focus:outline-focus-light": e === "light",
|
|
1039
1011
|
"focus:outline-focus-dark": e === "dark",
|
|
1040
1012
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1041
1013
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1042
|
-
}),
|
|
1014
|
+
}), fr = ({ mode: e }) => w({
|
|
1043
1015
|
"data-[state=on]:bg-surface-medium": e === "dark",
|
|
1044
1016
|
"data-[state=on]:bg-surface-lightest": e === "light",
|
|
1045
1017
|
"data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
|
|
1046
1018
|
"data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
|
|
1047
|
-
}),
|
|
1019
|
+
}), br = ({ size: e }) => w({
|
|
1048
1020
|
"h-5 px-2": e === "small",
|
|
1049
1021
|
"h-6 px-3": e === "medium",
|
|
1050
1022
|
"h-7 px-4": e === "large"
|
|
1051
|
-
}),
|
|
1052
|
-
|
|
1023
|
+
}), vr = ({ mode: e }) => w(
|
|
1024
|
+
Lo,
|
|
1053
1025
|
"px-1",
|
|
1054
1026
|
"relative",
|
|
1055
1027
|
"border-r",
|
|
@@ -1062,27 +1034,27 @@ const Tt = x.createContext({
|
|
|
1062
1034
|
"border-surface-light dark:border-surface-darker": e === "system",
|
|
1063
1035
|
"border-surface-darker dark:border-surface-light": e === "alt-system"
|
|
1064
1036
|
}
|
|
1065
|
-
),
|
|
1037
|
+
), yr = ({
|
|
1066
1038
|
focusMode: e,
|
|
1067
1039
|
mode: t,
|
|
1068
1040
|
size: o
|
|
1069
1041
|
}) => ({
|
|
1070
|
-
wrapperClass:
|
|
1042
|
+
wrapperClass: vr({ mode: t }),
|
|
1071
1043
|
itemClass: w(
|
|
1072
|
-
|
|
1044
|
+
$o,
|
|
1073
1045
|
"flex items-center justify-center bg-transparent",
|
|
1074
1046
|
"rounded-sm",
|
|
1075
1047
|
"transition duration-200 ease",
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1048
|
+
br({ size: o }),
|
|
1049
|
+
pr({ focusMode: e }),
|
|
1050
|
+
fr({ mode: t })
|
|
1079
1051
|
)
|
|
1080
|
-
}),
|
|
1052
|
+
}), kr = ({
|
|
1081
1053
|
mode: e,
|
|
1082
1054
|
spacing: t
|
|
1083
1055
|
}) => w(
|
|
1084
|
-
|
|
1085
|
-
|
|
1056
|
+
Mo,
|
|
1057
|
+
gr(t),
|
|
1086
1058
|
"inline-flex p-1",
|
|
1087
1059
|
"rounded-sm",
|
|
1088
1060
|
{
|
|
@@ -1091,11 +1063,11 @@ const Tt = x.createContext({
|
|
|
1091
1063
|
"bg-surface-light text-copy-dark dark:bg-surface-darker dark:text-copy-lighter": e === "system",
|
|
1092
1064
|
"bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
|
|
1093
1065
|
}
|
|
1094
|
-
),
|
|
1066
|
+
), Cr = ({
|
|
1095
1067
|
children: e,
|
|
1096
1068
|
value: t,
|
|
1097
1069
|
onValueChange: o,
|
|
1098
|
-
disabled:
|
|
1070
|
+
disabled: a,
|
|
1099
1071
|
mode: n = "system",
|
|
1100
1072
|
focusMode: s = "system",
|
|
1101
1073
|
size: i = "medium",
|
|
@@ -1103,11 +1075,11 @@ const Tt = x.createContext({
|
|
|
1103
1075
|
spacing: h,
|
|
1104
1076
|
...m
|
|
1105
1077
|
}) => {
|
|
1106
|
-
const l =
|
|
1107
|
-
return /* @__PURE__ */
|
|
1108
|
-
|
|
1078
|
+
const l = kr({ mode: n, spacing: h }), g = { size: i, focusMode: s, mode: n };
|
|
1079
|
+
return /* @__PURE__ */ r(Tt.Provider, { value: g, children: /* @__PURE__ */ r(
|
|
1080
|
+
mr,
|
|
1109
1081
|
{
|
|
1110
|
-
disabled:
|
|
1082
|
+
disabled: a,
|
|
1111
1083
|
className: l,
|
|
1112
1084
|
value: t,
|
|
1113
1085
|
defaultValue: c,
|
|
@@ -1117,14 +1089,14 @@ const Tt = x.createContext({
|
|
|
1117
1089
|
children: e
|
|
1118
1090
|
}
|
|
1119
1091
|
) });
|
|
1120
|
-
},
|
|
1121
|
-
const { size: o, focusMode:
|
|
1122
|
-
focusMode:
|
|
1092
|
+
}, wr = ({ value: e, disabled: t }) => {
|
|
1093
|
+
const { size: o, focusMode: a, mode: n } = z(Tt), { itemClass: s, wrapperClass: i } = yr({
|
|
1094
|
+
focusMode: a,
|
|
1123
1095
|
mode: n,
|
|
1124
1096
|
size: o
|
|
1125
1097
|
});
|
|
1126
|
-
return /* @__PURE__ */
|
|
1127
|
-
|
|
1098
|
+
return /* @__PURE__ */ r("div", { className: i, children: /* @__PURE__ */ r(
|
|
1099
|
+
hr,
|
|
1128
1100
|
{
|
|
1129
1101
|
disabled: t,
|
|
1130
1102
|
className: s,
|
|
@@ -1146,7 +1118,7 @@ try {
|
|
|
1146
1118
|
});
|
|
1147
1119
|
} catch {
|
|
1148
1120
|
}
|
|
1149
|
-
const Ue = "av-messagebox", je = "av-panel", Ke = "av-button",
|
|
1121
|
+
const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", Tr = (e) => {
|
|
1150
1122
|
let t = "";
|
|
1151
1123
|
if (typeof e == "number" || typeof e == "string")
|
|
1152
1124
|
t = "m-" + e;
|
|
@@ -1155,49 +1127,49 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1155
1127
|
(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(" ");
|
|
1156
1128
|
}
|
|
1157
1129
|
return t;
|
|
1158
|
-
},
|
|
1130
|
+
}, Pe = "icon", Nr = "button", Er = "link", xr = ({
|
|
1159
1131
|
type: e,
|
|
1160
1132
|
size: t,
|
|
1161
1133
|
labelRight: o,
|
|
1162
|
-
labelLeft:
|
|
1134
|
+
labelLeft: a,
|
|
1163
1135
|
align: n
|
|
1164
1136
|
}) => {
|
|
1165
1137
|
const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", c = "text-lg font-medium max-h-12 py-2";
|
|
1166
1138
|
switch (e) {
|
|
1167
|
-
case
|
|
1139
|
+
case Nr:
|
|
1168
1140
|
return w("px-4", {
|
|
1169
1141
|
[s]: t === "small",
|
|
1170
1142
|
[i]: t === "medium",
|
|
1171
1143
|
[c]: t === "large"
|
|
1172
1144
|
});
|
|
1173
|
-
case
|
|
1145
|
+
case Er:
|
|
1174
1146
|
return w("px-4 text-center", {
|
|
1175
1147
|
[s]: t === "small",
|
|
1176
1148
|
[i]: t === "medium",
|
|
1177
1149
|
[c]: t === "large"
|
|
1178
1150
|
});
|
|
1179
|
-
case
|
|
1151
|
+
case Pe:
|
|
1180
1152
|
return w("inline-flex items-center", {
|
|
1181
1153
|
"justify-center": n === "center",
|
|
1182
1154
|
"justify-start": n === "left",
|
|
1183
1155
|
"justify-end": n === "right",
|
|
1184
|
-
"h-6 w-6 p-0": t === "small" && !(o ||
|
|
1185
|
-
"h-6 px-4 text-sm font-medium": t === "small" && (o ||
|
|
1186
|
-
"h-8 w-8 p-1": t === "medium" && !(o ||
|
|
1187
|
-
"h-8 px-4 text-base font-medium": t === "medium" && (o ||
|
|
1188
|
-
"h-12 w-12 p-2": t === "large" && !(o ||
|
|
1189
|
-
"h-12 px-4 text-lg font-medium": t === "large" && (o ||
|
|
1156
|
+
"h-6 w-6 p-0": t === "small" && !(o || a),
|
|
1157
|
+
"h-6 px-4 text-sm font-medium": t === "small" && (o || a),
|
|
1158
|
+
"h-8 w-8 p-1": t === "medium" && !(o || a),
|
|
1159
|
+
"h-8 px-4 text-base font-medium": t === "medium" && (o || a),
|
|
1160
|
+
"h-12 w-12 p-2": t === "large" && !(o || a),
|
|
1161
|
+
"h-12 px-4 text-lg font-medium": t === "large" && (o || a)
|
|
1190
1162
|
});
|
|
1191
1163
|
}
|
|
1192
|
-
},
|
|
1164
|
+
}, Ir = ({
|
|
1193
1165
|
mode: e,
|
|
1194
1166
|
noBackground: t,
|
|
1195
1167
|
noTruncate: o,
|
|
1196
|
-
variant:
|
|
1168
|
+
variant: a
|
|
1197
1169
|
}) => {
|
|
1198
1170
|
if (t)
|
|
1199
1171
|
return "not-prose rounded-full";
|
|
1200
|
-
if (
|
|
1172
|
+
if (a === "primary")
|
|
1201
1173
|
return w("not-prose rounded-full", {
|
|
1202
1174
|
truncate: !o,
|
|
1203
1175
|
"bg-action-dark text-copy-light": e === "dark",
|
|
@@ -1205,7 +1177,7 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1205
1177
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
|
|
1206
1178
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
1207
1179
|
});
|
|
1208
|
-
if (
|
|
1180
|
+
if (a === "secondary")
|
|
1209
1181
|
return w("not-prose rounded-full", {
|
|
1210
1182
|
truncate: !o,
|
|
1211
1183
|
"bg-action-dark text-copy-light": e === "light",
|
|
@@ -1213,7 +1185,7 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1213
1185
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
|
|
1214
1186
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
1215
1187
|
});
|
|
1216
|
-
if (
|
|
1188
|
+
if (a === "danger")
|
|
1217
1189
|
return w("not-prose rounded-full", {
|
|
1218
1190
|
truncate: !o,
|
|
1219
1191
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
@@ -1221,7 +1193,7 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1221
1193
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
1222
1194
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
1223
1195
|
});
|
|
1224
|
-
},
|
|
1196
|
+
}, Sr = ({
|
|
1225
1197
|
mode: e,
|
|
1226
1198
|
disabled: t,
|
|
1227
1199
|
variant: o
|
|
@@ -1249,7 +1221,7 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1249
1221
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
1250
1222
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
1251
1223
|
});
|
|
1252
|
-
},
|
|
1224
|
+
}, _r = ({
|
|
1253
1225
|
mode: e,
|
|
1254
1226
|
disabled: t,
|
|
1255
1227
|
variant: o
|
|
@@ -1277,7 +1249,7 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1277
1249
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
1278
1250
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
1279
1251
|
});
|
|
1280
|
-
},
|
|
1252
|
+
}, Rr = ({
|
|
1281
1253
|
mode: e,
|
|
1282
1254
|
noBorder: t,
|
|
1283
1255
|
variant: o
|
|
@@ -1305,7 +1277,7 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1305
1277
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
1306
1278
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
1307
1279
|
});
|
|
1308
|
-
},
|
|
1280
|
+
}, Ar = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1309
1281
|
"focus:outline-focus-dark": e === "dark",
|
|
1310
1282
|
"focus:outline-focus-light": e === "light",
|
|
1311
1283
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -1314,7 +1286,7 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1314
1286
|
type: e,
|
|
1315
1287
|
className: t,
|
|
1316
1288
|
raw: o,
|
|
1317
|
-
mode:
|
|
1289
|
+
mode: a,
|
|
1318
1290
|
focusMode: n,
|
|
1319
1291
|
disabled: s,
|
|
1320
1292
|
fullWidth: i,
|
|
@@ -1330,40 +1302,40 @@ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wa = (e) => {
|
|
|
1330
1302
|
}) => (u || (u = "primary"), o ? w(Ke, t) : w(
|
|
1331
1303
|
Ke,
|
|
1332
1304
|
t,
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1305
|
+
Tr(g),
|
|
1306
|
+
Ir({ mode: a, variant: u, noBackground: b, noTruncate: d }),
|
|
1307
|
+
xr({ type: e, size: c, labelRight: m, labelLeft: l, align: y }),
|
|
1308
|
+
Rr({ mode: a, variant: u, noBorder: h }),
|
|
1309
|
+
Ar({ focusMode: n }),
|
|
1310
|
+
Sr({ mode: a, variant: u, disabled: s }),
|
|
1311
|
+
_r({ mode: a, variant: u, disabled: s }),
|
|
1340
1312
|
{
|
|
1341
1313
|
"w-full": i,
|
|
1342
1314
|
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
1343
1315
|
}
|
|
1344
|
-
)),
|
|
1345
|
-
var
|
|
1346
|
-
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((
|
|
1347
|
-
},
|
|
1348
|
-
const { onClick: o, noInternalClick:
|
|
1349
|
-
return /* @__PURE__ */
|
|
1316
|
+
)), Mr = (e, t, o) => {
|
|
1317
|
+
var a;
|
|
1318
|
+
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
|
|
1319
|
+
}, Be = x.forwardRef((e, t) => {
|
|
1320
|
+
const { onClick: o, noInternalClick: a = !1, ...n } = e;
|
|
1321
|
+
return /* @__PURE__ */ r(
|
|
1350
1322
|
"button",
|
|
1351
1323
|
{
|
|
1352
1324
|
ref: t,
|
|
1353
1325
|
onClick: (s) => {
|
|
1354
|
-
|
|
1326
|
+
Mr(s, a, o);
|
|
1355
1327
|
},
|
|
1356
1328
|
...n
|
|
1357
1329
|
}
|
|
1358
1330
|
);
|
|
1359
1331
|
});
|
|
1360
|
-
|
|
1332
|
+
Be.displayName = "BaseButton";
|
|
1361
1333
|
const Et = x.forwardRef(
|
|
1362
1334
|
({
|
|
1363
1335
|
children: e,
|
|
1364
1336
|
disabled: t = !1,
|
|
1365
1337
|
mode: o = "system",
|
|
1366
|
-
focusMode:
|
|
1338
|
+
focusMode: a = "system",
|
|
1367
1339
|
fullWidth: n = !1,
|
|
1368
1340
|
className: s,
|
|
1369
1341
|
type: i = "button",
|
|
@@ -1380,9 +1352,9 @@ const Et = x.forwardRef(
|
|
|
1380
1352
|
...p
|
|
1381
1353
|
}, k) => {
|
|
1382
1354
|
const T = Nt({
|
|
1383
|
-
type:
|
|
1355
|
+
type: Pe,
|
|
1384
1356
|
mode: o,
|
|
1385
|
-
focusMode:
|
|
1357
|
+
focusMode: a,
|
|
1386
1358
|
fullWidth: n,
|
|
1387
1359
|
disabled: t,
|
|
1388
1360
|
raw: c,
|
|
@@ -1401,7 +1373,7 @@ const Et = x.forwardRef(
|
|
|
1401
1373
|
"text-copy-light dark:text-copy-accent-dark": o === "system" && !c
|
|
1402
1374
|
});
|
|
1403
1375
|
return /* @__PURE__ */ v(
|
|
1404
|
-
|
|
1376
|
+
Be,
|
|
1405
1377
|
{
|
|
1406
1378
|
ref: k,
|
|
1407
1379
|
className: T,
|
|
@@ -1410,9 +1382,9 @@ const Et = x.forwardRef(
|
|
|
1410
1382
|
"aria-label": m || l,
|
|
1411
1383
|
...p,
|
|
1412
1384
|
children: [
|
|
1413
|
-
u && /* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
b && /* @__PURE__ */
|
|
1385
|
+
u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
|
|
1386
|
+
/* @__PURE__ */ r("div", { className: I, children: e }),
|
|
1387
|
+
b && /* @__PURE__ */ r("span", { className: "pl-2", children: b })
|
|
1416
1388
|
]
|
|
1417
1389
|
}
|
|
1418
1390
|
);
|
|
@@ -1432,12 +1404,12 @@ try {
|
|
|
1432
1404
|
});
|
|
1433
1405
|
} catch {
|
|
1434
1406
|
}
|
|
1435
|
-
const
|
|
1407
|
+
const Lr = x.forwardRef(
|
|
1436
1408
|
({
|
|
1437
1409
|
children: e,
|
|
1438
1410
|
disabled: t = !1,
|
|
1439
1411
|
mode: o = "system",
|
|
1440
|
-
focusMode:
|
|
1412
|
+
focusMode: a = "system",
|
|
1441
1413
|
fullWidth: n = !1,
|
|
1442
1414
|
className: s,
|
|
1443
1415
|
type: i = "button",
|
|
@@ -1455,9 +1427,9 @@ const Ma = x.forwardRef(
|
|
|
1455
1427
|
...k
|
|
1456
1428
|
}, T) => {
|
|
1457
1429
|
const I = Nt({
|
|
1458
|
-
type:
|
|
1430
|
+
type: Pe,
|
|
1459
1431
|
mode: o,
|
|
1460
|
-
focusMode:
|
|
1432
|
+
focusMode: a,
|
|
1461
1433
|
fullWidth: n,
|
|
1462
1434
|
disabled: t,
|
|
1463
1435
|
raw: c,
|
|
@@ -1491,8 +1463,8 @@ const Ma = x.forwardRef(
|
|
|
1491
1463
|
"after:border-table-light dark:after:border-table-dark": o === "alt-system"
|
|
1492
1464
|
}
|
|
1493
1465
|
) : "";
|
|
1494
|
-
return /* @__PURE__ */
|
|
1495
|
-
|
|
1466
|
+
return /* @__PURE__ */ r("div", { className: _, children: /* @__PURE__ */ v(
|
|
1467
|
+
Be,
|
|
1496
1468
|
{
|
|
1497
1469
|
ref: T,
|
|
1498
1470
|
className: I,
|
|
@@ -1501,16 +1473,16 @@ const Ma = x.forwardRef(
|
|
|
1501
1473
|
"aria-label": m || l,
|
|
1502
1474
|
...k,
|
|
1503
1475
|
children: [
|
|
1504
|
-
u && /* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
b && /* @__PURE__ */
|
|
1476
|
+
u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
|
|
1477
|
+
/* @__PURE__ */ r("div", { className: M, children: e }),
|
|
1478
|
+
b && /* @__PURE__ */ r("span", { className: "pl-2", children: b })
|
|
1507
1479
|
]
|
|
1508
1480
|
}
|
|
1509
1481
|
) });
|
|
1510
1482
|
}
|
|
1511
1483
|
);
|
|
1512
|
-
|
|
1513
|
-
const
|
|
1484
|
+
Lr.displayName = "ButtonSort";
|
|
1485
|
+
const $r = (e) => {
|
|
1514
1486
|
let t = "";
|
|
1515
1487
|
if (typeof e == "number" || typeof e == "string")
|
|
1516
1488
|
t = "m-" + e;
|
|
@@ -1519,11 +1491,11 @@ const La = (e) => {
|
|
|
1519
1491
|
(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(" ");
|
|
1520
1492
|
}
|
|
1521
1493
|
return t;
|
|
1522
|
-
},
|
|
1494
|
+
}, Pr = ({
|
|
1523
1495
|
children: e,
|
|
1524
1496
|
fill: t,
|
|
1525
1497
|
viewBox: o,
|
|
1526
|
-
className:
|
|
1498
|
+
className: a,
|
|
1527
1499
|
defaultViewBox: n,
|
|
1528
1500
|
defaultClassName: s,
|
|
1529
1501
|
spacing: i,
|
|
@@ -1531,12 +1503,12 @@ const La = (e) => {
|
|
|
1531
1503
|
semantic: h = !1,
|
|
1532
1504
|
...m
|
|
1533
1505
|
}) => {
|
|
1534
|
-
const l =
|
|
1506
|
+
const l = $r(i), g = w(
|
|
1535
1507
|
l,
|
|
1536
|
-
|
|
1508
|
+
a || s
|
|
1537
1509
|
);
|
|
1538
1510
|
return /* @__PURE__ */ v(A, { children: [
|
|
1539
|
-
/* @__PURE__ */
|
|
1511
|
+
/* @__PURE__ */ r(
|
|
1540
1512
|
"svg",
|
|
1541
1513
|
{
|
|
1542
1514
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1550,7 +1522,7 @@ const La = (e) => {
|
|
|
1550
1522
|
children: e
|
|
1551
1523
|
}
|
|
1552
1524
|
),
|
|
1553
|
-
c && h && /* @__PURE__ */
|
|
1525
|
+
c && h && /* @__PURE__ */ r("span", { className: "sr-only", children: c })
|
|
1554
1526
|
] });
|
|
1555
1527
|
};
|
|
1556
1528
|
/*!
|
|
@@ -1566,24 +1538,24 @@ try {
|
|
|
1566
1538
|
});
|
|
1567
1539
|
} catch {
|
|
1568
1540
|
}
|
|
1569
|
-
const
|
|
1541
|
+
const Br = ({
|
|
1570
1542
|
className: e,
|
|
1571
1543
|
viewBox: t,
|
|
1572
1544
|
spacing: o,
|
|
1573
|
-
title:
|
|
1545
|
+
title: a,
|
|
1574
1546
|
monotone: n,
|
|
1575
1547
|
...s
|
|
1576
|
-
}) => /* @__PURE__ */
|
|
1577
|
-
|
|
1548
|
+
}) => /* @__PURE__ */ r(
|
|
1549
|
+
Pr,
|
|
1578
1550
|
{
|
|
1579
1551
|
defaultViewBox: "0 0 384 512",
|
|
1580
1552
|
defaultClassName: "size-5",
|
|
1581
1553
|
viewBox: t,
|
|
1582
1554
|
className: e,
|
|
1583
1555
|
spacing: o,
|
|
1584
|
-
title:
|
|
1556
|
+
title: a || "Close",
|
|
1585
1557
|
...s,
|
|
1586
|
-
children: /* @__PURE__ */
|
|
1558
|
+
children: /* @__PURE__ */ r("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
|
|
1587
1559
|
}
|
|
1588
1560
|
);
|
|
1589
1561
|
/*!
|
|
@@ -1599,19 +1571,19 @@ try {
|
|
|
1599
1571
|
});
|
|
1600
1572
|
} catch {
|
|
1601
1573
|
}
|
|
1602
|
-
const
|
|
1574
|
+
const re = "panel", pe = "messagebox", zr = ({
|
|
1603
1575
|
className: e,
|
|
1604
1576
|
kind: t,
|
|
1605
1577
|
borderMode: o
|
|
1606
1578
|
}) => ({
|
|
1607
1579
|
main: w("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
1608
|
-
[`${je} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t ===
|
|
1609
|
-
[`${je} w-full sm:w-[95%] md:max-w-2xl`]: t ===
|
|
1580
|
+
[`${je} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === re,
|
|
1581
|
+
[`${je} w-full sm:w-[95%] md:max-w-2xl`]: t === re && !e,
|
|
1610
1582
|
[`${Ue} rounded-lg border-2`]: t === pe,
|
|
1611
1583
|
[`${Ue} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === pe && !e,
|
|
1612
1584
|
[`${e}`]: !!e,
|
|
1613
|
-
"sm:border-border-dark": o === "dark" && t ===
|
|
1614
|
-
"sm:border-border-accent": o === "light" && t ===
|
|
1585
|
+
"sm:border-border-dark": o === "dark" && t === re,
|
|
1586
|
+
"sm:border-border-accent": o === "light" && t === re,
|
|
1615
1587
|
"border-border-dark": o === "dark" && t === pe,
|
|
1616
1588
|
"border-border-accent": o === "light" && t === pe
|
|
1617
1589
|
}),
|
|
@@ -1619,113 +1591,113 @@ const ae = "panel", pe = "messagebox", za = ({
|
|
|
1619
1591
|
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
1620
1592
|
header: "sm:p-4 mb-0 p-2",
|
|
1621
1593
|
close: "sm:p-4 p-2"
|
|
1622
|
-
}), ge = (e) =>
|
|
1594
|
+
}), ge = (e) => ro(
|
|
1623
1595
|
() => import("./index.AUArUGH7.FZU7Bha5.js").then((t) => ({
|
|
1624
1596
|
default: t[e]
|
|
1625
1597
|
}))
|
|
1626
|
-
),
|
|
1598
|
+
), Or = ge("Modal"), Vr = ge("ModalClose"), Dr = ge("ModalContent"), Fr = ge("ModalDescription"), Hr = ge("ModalHeading"), Z = ({
|
|
1627
1599
|
open: e,
|
|
1628
1600
|
onOpenChange: t,
|
|
1629
1601
|
title: o,
|
|
1630
|
-
children:
|
|
1602
|
+
children: a,
|
|
1631
1603
|
footer: n,
|
|
1632
1604
|
borderMode: s = "light",
|
|
1633
|
-
kind: i =
|
|
1605
|
+
kind: i = re,
|
|
1634
1606
|
className: c
|
|
1635
1607
|
}) => {
|
|
1636
|
-
const h = le(""), m =
|
|
1608
|
+
const h = le(""), m = zr({ className: c, kind: i, borderMode: s });
|
|
1637
1609
|
return U(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
|
|
1638
1610
|
e && (document.title = h.current);
|
|
1639
|
-
}), [o, e]), /* @__PURE__ */
|
|
1611
|
+
}), [o, e]), /* @__PURE__ */ r(oo, { fallback: /* @__PURE__ */ r("div", {}), children: e && /* @__PURE__ */ r(Or, { open: e, onOpenChange: t, children: /* @__PURE__ */ v(Dr, { className: m.main, children: [
|
|
1640
1612
|
/* @__PURE__ */ v("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
1641
|
-
/* @__PURE__ */
|
|
1642
|
-
|
|
1613
|
+
/* @__PURE__ */ r(
|
|
1614
|
+
Vr,
|
|
1643
1615
|
{
|
|
1644
1616
|
className: m.close,
|
|
1645
|
-
trigger: /* @__PURE__ */
|
|
1617
|
+
trigger: /* @__PURE__ */ r(
|
|
1646
1618
|
Et,
|
|
1647
1619
|
{
|
|
1648
1620
|
mode: "dark",
|
|
1649
1621
|
focusMode: "light",
|
|
1650
1622
|
noBorder: !0,
|
|
1651
1623
|
label: "Close",
|
|
1652
|
-
children: /* @__PURE__ */
|
|
1624
|
+
children: /* @__PURE__ */ r(Br, {})
|
|
1653
1625
|
}
|
|
1654
1626
|
)
|
|
1655
1627
|
}
|
|
1656
1628
|
),
|
|
1657
|
-
/* @__PURE__ */
|
|
1629
|
+
/* @__PURE__ */ r(Hr, { className: m.header, children: o })
|
|
1658
1630
|
] }),
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
n && /* @__PURE__ */
|
|
1631
|
+
/* @__PURE__ */ r(Fr, { className: m.content, children: a }),
|
|
1632
|
+
n && /* @__PURE__ */ r("div", { className: m.footer, children: n })
|
|
1661
1633
|
] }) }) });
|
|
1662
|
-
},
|
|
1663
|
-
const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "",
|
|
1634
|
+
}, Gr = ({ stats: e }) => {
|
|
1635
|
+
const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = ce(), s = ce();
|
|
1664
1636
|
return /* @__PURE__ */ v(A, { children: [
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
|
|
1637
|
+
/* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
|
|
1638
|
+
B,
|
|
1667
1639
|
{
|
|
1668
1640
|
header: N.ABOUT.TITLE_CLIENT,
|
|
1669
1641
|
className: "prose-dark dark:prose-lighter",
|
|
1670
1642
|
children: se(n, {
|
|
1671
|
-
[N.ABOUT.VERSION]: "5.
|
|
1672
|
-
[N.ABOUT.BUILD_TIMESTAMP]: "11/
|
|
1643
|
+
[N.ABOUT.VERSION]: "5.6.0",
|
|
1644
|
+
[N.ABOUT.BUILD_TIMESTAMP]: "11/30/2024 05:50 PM EST"
|
|
1673
1645
|
})
|
|
1674
1646
|
}
|
|
1675
1647
|
) }),
|
|
1676
|
-
/* @__PURE__ */
|
|
1677
|
-
|
|
1648
|
+
/* @__PURE__ */ r(
|
|
1649
|
+
B,
|
|
1678
1650
|
{
|
|
1679
1651
|
header: N.ABOUT.TITLE_SERVER,
|
|
1680
1652
|
className: "prose-dark dark:prose-lighter",
|
|
1681
1653
|
children: se(s, {
|
|
1682
1654
|
[N.ABOUT.VERSION]: o,
|
|
1683
|
-
[be(N.ABOUT.ENGINE,
|
|
1684
|
-
[be(N.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */
|
|
1655
|
+
[be(N.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ r(A, { children: a.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
|
|
1656
|
+
[be(N.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(A, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
|
|
1685
1657
|
})
|
|
1686
1658
|
}
|
|
1687
1659
|
)
|
|
1688
1660
|
] });
|
|
1689
|
-
},
|
|
1661
|
+
}, Ur = ({
|
|
1690
1662
|
open: e,
|
|
1691
1663
|
onOpenChange: t
|
|
1692
1664
|
}) => {
|
|
1693
|
-
const { serverStats: o } =
|
|
1694
|
-
return /* @__PURE__ */
|
|
1695
|
-
},
|
|
1665
|
+
const { serverStats: o } = z(ue);
|
|
1666
|
+
return /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Rt, children: /* @__PURE__ */ r(Gr, { stats: o }) });
|
|
1667
|
+
}, jr = (e) => qe(e), Kr = (e) => {
|
|
1696
1668
|
if (!e || e.length === 0)
|
|
1697
1669
|
return Mt;
|
|
1698
1670
|
const t = e.filter(
|
|
1699
1671
|
(o) => {
|
|
1700
|
-
var
|
|
1701
|
-
return ((
|
|
1672
|
+
var a, n;
|
|
1673
|
+
return ((a = o == null ? void 0 : o.message) == null ? void 0 : a.role) === Lt && typeof ((n = o == null ? void 0 : o.message) == null ? void 0 : n.processingTime) == "number";
|
|
1702
1674
|
}
|
|
1703
1675
|
).map((o) => o.message.processingTime);
|
|
1704
|
-
return
|
|
1676
|
+
return $t({
|
|
1705
1677
|
data: t,
|
|
1706
|
-
formatter:
|
|
1678
|
+
formatter: jr
|
|
1707
1679
|
});
|
|
1708
|
-
},
|
|
1680
|
+
}, Wr = ({
|
|
1709
1681
|
isAuthenticated: e,
|
|
1710
1682
|
stats: t
|
|
1711
1683
|
}) => {
|
|
1712
|
-
const { state: o } =
|
|
1684
|
+
const { state: o } = z(ue), a = Pt - Number(o == null ? void 0 : o.usage), n = ce(), s = ce();
|
|
1713
1685
|
return e ? /* @__PURE__ */ v(A, { children: [
|
|
1714
|
-
o && o.messages.length > 0 && /* @__PURE__ */
|
|
1715
|
-
|
|
1686
|
+
o && o.messages.length > 0 && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
|
|
1687
|
+
B,
|
|
1716
1688
|
{
|
|
1717
1689
|
header: N.CURRENT_STATISTICS.TITLE,
|
|
1718
1690
|
className: "prose-dark dark:prose-lighter",
|
|
1719
1691
|
children: se(n, {
|
|
1720
|
-
[N.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) ||
|
|
1692
|
+
[N.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || ae,
|
|
1721
1693
|
[N.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
|
|
1722
|
-
[N.CURRENT_STATISTICS.REMAINING_TOKENS]: At.format(
|
|
1723
|
-
[N.CURRENT_STATISTICS.PROCESSING_TIME]:
|
|
1694
|
+
[N.CURRENT_STATISTICS.REMAINING_TOKENS]: At.format(a),
|
|
1695
|
+
[N.CURRENT_STATISTICS.PROCESSING_TIME]: Kr(o == null ? void 0 : o.messages)
|
|
1724
1696
|
})
|
|
1725
1697
|
}
|
|
1726
1698
|
) }),
|
|
1727
|
-
/* @__PURE__ */
|
|
1728
|
-
|
|
1699
|
+
/* @__PURE__ */ r(
|
|
1700
|
+
B,
|
|
1729
1701
|
{
|
|
1730
1702
|
header: N.MAIN_STATISTICS.TITLE,
|
|
1731
1703
|
className: "prose-dark dark:prose-lighter",
|
|
@@ -1738,36 +1710,36 @@ const ae = "panel", pe = "messagebox", za = ({
|
|
|
1738
1710
|
}
|
|
1739
1711
|
)
|
|
1740
1712
|
] }) : null;
|
|
1741
|
-
},
|
|
1713
|
+
}, Yr = ({
|
|
1742
1714
|
open: e,
|
|
1743
1715
|
onOpenChange: t
|
|
1744
1716
|
}) => {
|
|
1745
|
-
const [o,
|
|
1717
|
+
const [o, a] = S({
|
|
1746
1718
|
averageProcessingTimes: 0,
|
|
1747
1719
|
totalChats: 0
|
|
1748
1720
|
}), { isAuthenticated: n, getAccessToken: s, user: i } = X();
|
|
1749
1721
|
return U(() => {
|
|
1750
1722
|
!e || !i || (async () => {
|
|
1751
1723
|
try {
|
|
1752
|
-
const c = await
|
|
1724
|
+
const c = await F({
|
|
1753
1725
|
accessToken: await s(),
|
|
1754
|
-
type:
|
|
1726
|
+
type: H.GET_CHATS_STATS,
|
|
1755
1727
|
params: {
|
|
1756
1728
|
userId: i.username
|
|
1757
1729
|
}
|
|
1758
1730
|
});
|
|
1759
|
-
c.status === 200 &&
|
|
1731
|
+
c.status === 200 && a(c.data);
|
|
1760
1732
|
} catch {
|
|
1761
1733
|
}
|
|
1762
1734
|
})();
|
|
1763
|
-
}, [e, s, i]), /* @__PURE__ */
|
|
1735
|
+
}, [e, s, i]), /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Xe, children: /* @__PURE__ */ r(Wr, { isAuthenticated: n, stats: o }) });
|
|
1764
1736
|
}, xt = ({
|
|
1765
1737
|
showConfirmation: e,
|
|
1766
1738
|
setShowConfirmation: t,
|
|
1767
1739
|
action: o,
|
|
1768
|
-
children:
|
|
1740
|
+
children: a,
|
|
1769
1741
|
customStrings: n
|
|
1770
|
-
}) => /* @__PURE__ */
|
|
1742
|
+
}) => /* @__PURE__ */ r(
|
|
1771
1743
|
Z,
|
|
1772
1744
|
{
|
|
1773
1745
|
kind: "messagebox",
|
|
@@ -1775,7 +1747,7 @@ const ae = "panel", pe = "messagebox", za = ({
|
|
|
1775
1747
|
onOpenChange: t,
|
|
1776
1748
|
title: n.title,
|
|
1777
1749
|
footer: /* @__PURE__ */ v(ie, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1778
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(
|
|
1779
1751
|
G,
|
|
1780
1752
|
{
|
|
1781
1753
|
mode: "dark",
|
|
@@ -1787,7 +1759,7 @@ const ae = "panel", pe = "messagebox", za = ({
|
|
|
1787
1759
|
children: n.cancelAction
|
|
1788
1760
|
}
|
|
1789
1761
|
) }),
|
|
1790
|
-
/* @__PURE__ */
|
|
1762
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(
|
|
1791
1763
|
G,
|
|
1792
1764
|
{
|
|
1793
1765
|
mode: "dark",
|
|
@@ -1800,13 +1772,13 @@ const ae = "panel", pe = "messagebox", za = ({
|
|
|
1800
1772
|
}
|
|
1801
1773
|
) })
|
|
1802
1774
|
] }),
|
|
1803
|
-
children:
|
|
1775
|
+
children: a
|
|
1804
1776
|
}
|
|
1805
1777
|
);
|
|
1806
|
-
var
|
|
1807
|
-
return
|
|
1808
|
-
},
|
|
1809
|
-
var o = S(
|
|
1778
|
+
var qr = typeof window < "u", Xr = function(e, t) {
|
|
1779
|
+
return qr ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
|
|
1780
|
+
}, Zr = function(e, t) {
|
|
1781
|
+
var o = S(Xr(e)), a = o[0], n = o[1];
|
|
1810
1782
|
return U(function() {
|
|
1811
1783
|
var s = !0, i = window.matchMedia(e), c = function() {
|
|
1812
1784
|
s && n(!!i.matches);
|
|
@@ -1814,13 +1786,13 @@ var Ya = typeof window < "u", qa = function(e, t) {
|
|
|
1814
1786
|
return i.addEventListener("change", c), n(i.matches), function() {
|
|
1815
1787
|
s = !1, i.removeEventListener("change", c);
|
|
1816
1788
|
};
|
|
1817
|
-
}, [e]),
|
|
1789
|
+
}, [e]), a;
|
|
1818
1790
|
};
|
|
1819
|
-
const
|
|
1791
|
+
const Jr = async (e, t, o, a) => {
|
|
1820
1792
|
try {
|
|
1821
|
-
const n = await
|
|
1822
|
-
accessToken:
|
|
1823
|
-
type:
|
|
1793
|
+
const n = await F({
|
|
1794
|
+
accessToken: a,
|
|
1795
|
+
type: H.GET_CHAT,
|
|
1824
1796
|
params: {
|
|
1825
1797
|
id: e.id
|
|
1826
1798
|
}
|
|
@@ -1828,7 +1800,7 @@ const Za = async (e, t, o, r) => {
|
|
|
1828
1800
|
n.status === 200 && (t({
|
|
1829
1801
|
type: Je
|
|
1830
1802
|
}), t({
|
|
1831
|
-
type:
|
|
1803
|
+
type: zt,
|
|
1832
1804
|
payload: {
|
|
1833
1805
|
id: e.id,
|
|
1834
1806
|
model: n.data.model,
|
|
@@ -1841,19 +1813,19 @@ const Za = async (e, t, o, r) => {
|
|
|
1841
1813
|
}, We = (e) => {
|
|
1842
1814
|
const t = e[0];
|
|
1843
1815
|
return Ot(t == null ? void 0 : t.content, 100);
|
|
1844
|
-
},
|
|
1816
|
+
}, Qr = ({
|
|
1845
1817
|
filteredHistory: e,
|
|
1846
1818
|
setFilteredHistory: t,
|
|
1847
1819
|
dispatch: o,
|
|
1848
|
-
onOpenChange:
|
|
1820
|
+
onOpenChange: a
|
|
1849
1821
|
}) => {
|
|
1850
1822
|
var C;
|
|
1851
1823
|
const { user: n, getAccessToken: s } = X(), i = le({
|
|
1852
1824
|
id: 0,
|
|
1853
1825
|
timestamp: "",
|
|
1854
1826
|
message: ""
|
|
1855
|
-
}), [c, h] = S(!1), m =
|
|
1856
|
-
key: me +
|
|
1827
|
+
}), [c, h] = S(!1), m = Zr("(min-width: 480px)"), { state: l, dispatch: g } = z(Ze), [, b] = he({
|
|
1828
|
+
key: me + Bt,
|
|
1857
1829
|
initialValue: l.sortDirection
|
|
1858
1830
|
}), u = e.data.sort(
|
|
1859
1831
|
(p, k) => {
|
|
@@ -1909,9 +1881,9 @@ const Za = async (e, t, o, r) => {
|
|
|
1909
1881
|
action: async () => {
|
|
1910
1882
|
const p = i.current;
|
|
1911
1883
|
try {
|
|
1912
|
-
const k = await
|
|
1884
|
+
const k = await F({
|
|
1913
1885
|
accessToken: await s(),
|
|
1914
|
-
type:
|
|
1886
|
+
type: H.DELETE_CHAT,
|
|
1915
1887
|
params: {
|
|
1916
1888
|
userId: (n == null ? void 0 : n.username) || "",
|
|
1917
1889
|
id: p.id
|
|
@@ -1927,27 +1899,27 @@ const Za = async (e, t, o, r) => {
|
|
|
1927
1899
|
title: "Delete chat"
|
|
1928
1900
|
},
|
|
1929
1901
|
children: [
|
|
1930
|
-
/* @__PURE__ */
|
|
1902
|
+
/* @__PURE__ */ r("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
1931
1903
|
/* @__PURE__ */ v("ul", { className: "m-0", children: [
|
|
1932
1904
|
/* @__PURE__ */ v("li", { children: [
|
|
1933
1905
|
"Timestamp:",
|
|
1934
1906
|
" ",
|
|
1935
|
-
/* @__PURE__ */
|
|
1907
|
+
/* @__PURE__ */ r("span", { className: "text-lg", children: i.current && i.current.timestamp })
|
|
1936
1908
|
] }),
|
|
1937
1909
|
/* @__PURE__ */ v("li", { children: [
|
|
1938
1910
|
"First message:",
|
|
1939
1911
|
" ",
|
|
1940
|
-
/* @__PURE__ */
|
|
1912
|
+
/* @__PURE__ */ r("span", { className: "text-lg", children: (C = i.current) == null ? void 0 : C.message })
|
|
1941
1913
|
] })
|
|
1942
1914
|
] })
|
|
1943
1915
|
]
|
|
1944
1916
|
}
|
|
1945
1917
|
),
|
|
1946
|
-
/* @__PURE__ */ v(
|
|
1947
|
-
/* @__PURE__ */
|
|
1948
|
-
m && /* @__PURE__ */
|
|
1949
|
-
/* @__PURE__ */
|
|
1950
|
-
|
|
1918
|
+
/* @__PURE__ */ v(Xt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
|
|
1919
|
+
/* @__PURE__ */ r(Zt, { children: /* @__PURE__ */ v(Ne, { children: [
|
|
1920
|
+
m && /* @__PURE__ */ r($, { className: "sr-only", children: "Row" }),
|
|
1921
|
+
/* @__PURE__ */ r(
|
|
1922
|
+
Jt,
|
|
1951
1923
|
{
|
|
1952
1924
|
buttonClassName: "text-xs sm:text-sm",
|
|
1953
1925
|
cellId: "timestamp",
|
|
@@ -1960,15 +1932,15 @@ const Za = async (e, t, o, r) => {
|
|
|
1960
1932
|
children: "Date"
|
|
1961
1933
|
}
|
|
1962
1934
|
),
|
|
1963
|
-
/* @__PURE__ */
|
|
1964
|
-
/* @__PURE__ */
|
|
1965
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ r($, { className: "text-xs sm:text-sm", children: "First message" }),
|
|
1936
|
+
/* @__PURE__ */ r($, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
1937
|
+
/* @__PURE__ */ r($, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
1966
1938
|
] }) }),
|
|
1967
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ r(Qt, { children: u.map((p, k) => {
|
|
1968
1940
|
var T;
|
|
1969
1941
|
return ((T = p == null ? void 0 : p.messages) == null ? void 0 : T.length) > 0 ? /* @__PURE__ */ v(Ne, { children: [
|
|
1970
|
-
m && /* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1942
|
+
m && /* @__PURE__ */ r($, { children: k + 1 }),
|
|
1943
|
+
/* @__PURE__ */ r(
|
|
1972
1944
|
$,
|
|
1973
1945
|
{
|
|
1974
1946
|
component: "th",
|
|
@@ -1977,13 +1949,13 @@ const Za = async (e, t, o, r) => {
|
|
|
1977
1949
|
children: p.timestamp
|
|
1978
1950
|
}
|
|
1979
1951
|
),
|
|
1980
|
-
/* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ r($, { className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm", children: We(p.messages) }),
|
|
1981
1953
|
/* @__PURE__ */ v($, { component: "th", scope: "row", className: "text-gray-400", children: [
|
|
1982
|
-
p.model && p.model.startsWith("claude") && /* @__PURE__ */
|
|
1983
|
-
p.model && p.model.startsWith("gpt") && /* @__PURE__ */
|
|
1954
|
+
p.model && p.model.startsWith("claude") && /* @__PURE__ */ r(nt, { className: "size-4 sm:size-5" }),
|
|
1955
|
+
p.model && p.model.startsWith("gpt") && /* @__PURE__ */ r(st, { className: "size-4 sm:size-5" })
|
|
1984
1956
|
] }),
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ r($, { className: "px-2", children: /* @__PURE__ */ v("div", { className: "flex justify-end gap-2", children: [
|
|
1958
|
+
/* @__PURE__ */ r(
|
|
1987
1959
|
Y,
|
|
1988
1960
|
{
|
|
1989
1961
|
focusMode: "alt-system",
|
|
@@ -1991,17 +1963,17 @@ const Za = async (e, t, o, r) => {
|
|
|
1991
1963
|
label: "Restore chat",
|
|
1992
1964
|
onClick: async () => {
|
|
1993
1965
|
const I = await s();
|
|
1994
|
-
|
|
1966
|
+
Jr(
|
|
1995
1967
|
p,
|
|
1996
1968
|
o,
|
|
1997
|
-
|
|
1969
|
+
a,
|
|
1998
1970
|
I
|
|
1999
1971
|
);
|
|
2000
1972
|
},
|
|
2001
|
-
children: /* @__PURE__ */
|
|
1973
|
+
children: /* @__PURE__ */ r(_o, { className: "h-3 w-3", monotone: !0 })
|
|
2002
1974
|
}
|
|
2003
1975
|
),
|
|
2004
|
-
/* @__PURE__ */
|
|
1976
|
+
/* @__PURE__ */ r(
|
|
2005
1977
|
Y,
|
|
2006
1978
|
{
|
|
2007
1979
|
focusMode: "alt-system",
|
|
@@ -2014,13 +1986,13 @@ const Za = async (e, t, o, r) => {
|
|
|
2014
1986
|
message: We(p.messages)
|
|
2015
1987
|
}, h(!c);
|
|
2016
1988
|
},
|
|
2017
|
-
children: /* @__PURE__ */
|
|
1989
|
+
children: /* @__PURE__ */ r("div", { className: "text-red-400", children: /* @__PURE__ */ r(Eo, { className: "h-3 w-3", monotone: !0 }) })
|
|
2018
1990
|
}
|
|
2019
1991
|
)
|
|
2020
1992
|
] }) })
|
|
2021
1993
|
] }, `${N.HISTORY.TITLE}-${p.id}-${k}`) : null;
|
|
2022
1994
|
}) }),
|
|
2023
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ r(eo, { children: /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r($, { colSpan: 5, children: /* @__PURE__ */ r("div", { children: be(
|
|
2024
1996
|
`${e.data.length} chat`,
|
|
2025
1997
|
e.data.length
|
|
2026
1998
|
) }) }) }) })
|
|
@@ -2030,15 +2002,15 @@ const Za = async (e, t, o, r) => {
|
|
|
2030
2002
|
function Ye(e, t) {
|
|
2031
2003
|
return t ? e.filter(
|
|
2032
2004
|
(o) => o.messages.some(
|
|
2033
|
-
(
|
|
2005
|
+
(a) => a.content !== null && a.content.toLowerCase().includes(t.toLowerCase())
|
|
2034
2006
|
)
|
|
2035
2007
|
) : e;
|
|
2036
2008
|
}
|
|
2037
|
-
const
|
|
2009
|
+
const ea = ({
|
|
2038
2010
|
onOpenChange: e,
|
|
2039
2011
|
historyData: t
|
|
2040
2012
|
}) => {
|
|
2041
|
-
const { isAuthenticated: o } = X(),
|
|
2013
|
+
const { isAuthenticated: o } = X(), a = le(null), { dispatch: n } = z(ue), { state: s, dispatch: i } = z(Ze), [, c] = he({
|
|
2042
2014
|
key: me + Vt,
|
|
2043
2015
|
initialValue: s.searchString
|
|
2044
2016
|
}), h = ao(() => t, [t]), [m, l] = S({
|
|
@@ -2065,12 +2037,12 @@ const Qa = ({
|
|
|
2065
2037
|
data: d
|
|
2066
2038
|
});
|
|
2067
2039
|
}, [t, s.searchString]), o ? m && m.data && /* @__PURE__ */ v(A, { children: [
|
|
2068
|
-
/* @__PURE__ */
|
|
2040
|
+
/* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: u, children: /* @__PURE__ */ r(
|
|
2069
2041
|
xe,
|
|
2070
2042
|
{
|
|
2071
2043
|
autoComplete: "off",
|
|
2072
2044
|
autoCorrect: "off",
|
|
2073
|
-
ref:
|
|
2045
|
+
ref: a,
|
|
2074
2046
|
defaultValue: s.searchString,
|
|
2075
2047
|
focusMode: "light",
|
|
2076
2048
|
name: "Search",
|
|
@@ -2078,7 +2050,7 @@ const Qa = ({
|
|
|
2078
2050
|
onChange: b,
|
|
2079
2051
|
spacing: { t: 2, b: 2 },
|
|
2080
2052
|
...s.searchString && {
|
|
2081
|
-
rightElement: /* @__PURE__ */
|
|
2053
|
+
rightElement: /* @__PURE__ */ r(
|
|
2082
2054
|
G,
|
|
2083
2055
|
{
|
|
2084
2056
|
disabled: !s.searchString,
|
|
@@ -2087,7 +2059,7 @@ const Qa = ({
|
|
|
2087
2059
|
size: "small",
|
|
2088
2060
|
onClick: () => {
|
|
2089
2061
|
var d;
|
|
2090
|
-
g(""), (d =
|
|
2062
|
+
g(""), (d = a.current) != null && d.value && (a.current.value = "", a.current.focus());
|
|
2091
2063
|
},
|
|
2092
2064
|
children: "Reset"
|
|
2093
2065
|
}
|
|
@@ -2095,8 +2067,8 @@ const Qa = ({
|
|
|
2095
2067
|
}
|
|
2096
2068
|
}
|
|
2097
2069
|
) }),
|
|
2098
|
-
/* @__PURE__ */
|
|
2099
|
-
|
|
2070
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ r(
|
|
2071
|
+
Qr,
|
|
2100
2072
|
{
|
|
2101
2073
|
filteredHistory: m,
|
|
2102
2074
|
setFilteredHistory: l,
|
|
@@ -2105,11 +2077,11 @@ const Qa = ({
|
|
|
2105
2077
|
}
|
|
2106
2078
|
) })
|
|
2107
2079
|
] }) : null;
|
|
2108
|
-
},
|
|
2080
|
+
}, ta = ({
|
|
2109
2081
|
open: e,
|
|
2110
2082
|
onOpenChange: t,
|
|
2111
2083
|
historyData: o
|
|
2112
|
-
}) => /* @__PURE__ */
|
|
2084
|
+
}) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ft, children: /* @__PURE__ */ r(ea, { onOpenChange: t, historyData: o }) });
|
|
2113
2085
|
/*!
|
|
2114
2086
|
@versini/ui-toggle v1.0.8
|
|
2115
2087
|
© 2024 gizmette.com
|
|
@@ -2123,7 +2095,7 @@ try {
|
|
|
2123
2095
|
});
|
|
2124
2096
|
} catch {
|
|
2125
2097
|
}
|
|
2126
|
-
const
|
|
2098
|
+
const oa = "av-toggle", ra = (e) => {
|
|
2127
2099
|
let t = "";
|
|
2128
2100
|
if (typeof e == "number" || typeof e == "string")
|
|
2129
2101
|
t = "m-" + e;
|
|
@@ -2132,7 +2104,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2132
2104
|
(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(" ");
|
|
2133
2105
|
}
|
|
2134
2106
|
return t;
|
|
2135
|
-
},
|
|
2107
|
+
}, aa = () => w("peer", "h-6", "w-11", "rounded-full"), na = ({
|
|
2136
2108
|
focusMode: e
|
|
2137
2109
|
}) => w(
|
|
2138
2110
|
"peer-focus:outline",
|
|
@@ -2144,14 +2116,14 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2144
2116
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
2145
2117
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
2146
2118
|
}
|
|
2147
|
-
),
|
|
2119
|
+
), sa = () => w(
|
|
2148
2120
|
"peer-checked:after:translate-x-full",
|
|
2149
2121
|
// background color when checked
|
|
2150
2122
|
"peer-checked:bg-violet-500",
|
|
2151
2123
|
// knob circle and border color when checked
|
|
2152
2124
|
"peer-checked:after:bg-white",
|
|
2153
2125
|
"peer-checked:after:border-white"
|
|
2154
|
-
),
|
|
2126
|
+
), ia = () => w(
|
|
2155
2127
|
"after:left-[2px]",
|
|
2156
2128
|
"after:top-[2px]",
|
|
2157
2129
|
"after:border",
|
|
@@ -2163,7 +2135,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2163
2135
|
"after:rounded-full",
|
|
2164
2136
|
"after:transition-all",
|
|
2165
2137
|
"after:content-['']"
|
|
2166
|
-
),
|
|
2138
|
+
), la = ({
|
|
2167
2139
|
mode: e,
|
|
2168
2140
|
noBorder: t
|
|
2169
2141
|
}) => w({
|
|
@@ -2172,7 +2144,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2172
2144
|
"border-border-light bg-surface-darker": e === "dark",
|
|
2173
2145
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
2174
2146
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
2175
|
-
}),
|
|
2147
|
+
}), ca = ({
|
|
2176
2148
|
mode: e,
|
|
2177
2149
|
labelHidden: t
|
|
2178
2150
|
}) => t ? "sr-only" : w("ml-2 text-sm", {
|
|
@@ -2180,49 +2152,49 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2180
2152
|
"text-copy-lighter": e === "dark",
|
|
2181
2153
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
2182
2154
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
2183
|
-
}),
|
|
2184
|
-
|
|
2155
|
+
}), da = ({ spacing: e }) => w(
|
|
2156
|
+
oa,
|
|
2185
2157
|
"relative flex cursor-pointer items-center",
|
|
2186
|
-
|
|
2187
|
-
),
|
|
2158
|
+
ra(e)
|
|
2159
|
+
), ua = ({
|
|
2188
2160
|
mode: e,
|
|
2189
2161
|
focusMode: t,
|
|
2190
2162
|
labelHidden: o,
|
|
2191
|
-
spacing:
|
|
2163
|
+
spacing: a,
|
|
2192
2164
|
noBorder: n
|
|
2193
2165
|
}) => ({
|
|
2194
2166
|
toggle: w(
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2167
|
+
aa(),
|
|
2168
|
+
la({ mode: e, noBorder: n }),
|
|
2169
|
+
na({ focusMode: t }),
|
|
2170
|
+
ia(),
|
|
2171
|
+
sa()
|
|
2200
2172
|
),
|
|
2201
|
-
label:
|
|
2173
|
+
label: ca({ mode: e, labelHidden: o }),
|
|
2202
2174
|
input: "peer sr-only",
|
|
2203
|
-
wrapper:
|
|
2175
|
+
wrapper: da({ spacing: a })
|
|
2204
2176
|
}), ne = ({
|
|
2205
2177
|
checked: e = !1,
|
|
2206
2178
|
onChange: t,
|
|
2207
2179
|
label: o,
|
|
2208
|
-
labelHidden:
|
|
2180
|
+
labelHidden: a = !1,
|
|
2209
2181
|
name: n,
|
|
2210
2182
|
mode: s = "system",
|
|
2211
2183
|
focusMode: i = "system",
|
|
2212
2184
|
spacing: c,
|
|
2213
2185
|
noBorder: h = !1
|
|
2214
2186
|
}) => {
|
|
2215
|
-
const m =
|
|
2187
|
+
const m = ua({
|
|
2216
2188
|
mode: s,
|
|
2217
2189
|
focusMode: i,
|
|
2218
|
-
labelHidden:
|
|
2190
|
+
labelHidden: a,
|
|
2219
2191
|
spacing: c,
|
|
2220
2192
|
noBorder: h
|
|
2221
2193
|
}), l = (g) => {
|
|
2222
2194
|
t == null || t(g.target.checked);
|
|
2223
2195
|
};
|
|
2224
2196
|
return /* @__PURE__ */ v("label", { className: m.wrapper, children: [
|
|
2225
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ r(
|
|
2226
2198
|
"input",
|
|
2227
2199
|
{
|
|
2228
2200
|
name: n,
|
|
@@ -2232,28 +2204,28 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2232
2204
|
onChange: l
|
|
2233
2205
|
}
|
|
2234
2206
|
),
|
|
2235
|
-
/* @__PURE__ */
|
|
2236
|
-
/* @__PURE__ */
|
|
2207
|
+
/* @__PURE__ */ r("div", { className: m.toggle }),
|
|
2208
|
+
/* @__PURE__ */ r("span", { className: m.label, children: o })
|
|
2237
2209
|
] });
|
|
2238
|
-
},
|
|
2210
|
+
}, ma = ({
|
|
2239
2211
|
open: e,
|
|
2240
2212
|
onOpenChange: t
|
|
2241
2213
|
}) => {
|
|
2242
|
-
const { dispatch: o } =
|
|
2214
|
+
const { dispatch: o } = z(ue), { getAccessToken: a, user: n } = X(), [s, i] = S({
|
|
2243
2215
|
loaded: !1,
|
|
2244
2216
|
instructions: "",
|
|
2245
2217
|
loadingLocation: !1,
|
|
2246
2218
|
location: "",
|
|
2247
|
-
engine:
|
|
2219
|
+
engine: ae
|
|
2248
2220
|
}), [c, h] = he({
|
|
2249
2221
|
key: me + Qe,
|
|
2250
2222
|
initialValue: !1
|
|
2251
2223
|
}), m = async (u) => {
|
|
2252
2224
|
u.preventDefault();
|
|
2253
2225
|
try {
|
|
2254
|
-
await
|
|
2255
|
-
accessToken: await
|
|
2256
|
-
type:
|
|
2226
|
+
await F({
|
|
2227
|
+
accessToken: await a(),
|
|
2228
|
+
type: H.SET_USER_PREFERENCES,
|
|
2257
2229
|
params: {
|
|
2258
2230
|
user: n == null ? void 0 : n.username,
|
|
2259
2231
|
instructions: s.instructions,
|
|
@@ -2275,9 +2247,9 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2275
2247
|
loadingLocation: !0
|
|
2276
2248
|
}));
|
|
2277
2249
|
try {
|
|
2278
|
-
const u = Date.now(), d = await
|
|
2279
|
-
accessToken: await
|
|
2280
|
-
type:
|
|
2250
|
+
const u = Date.now(), d = await Gt(), y = await F({
|
|
2251
|
+
accessToken: await a(),
|
|
2252
|
+
type: H.GET_LOCATION,
|
|
2281
2253
|
params: {
|
|
2282
2254
|
latitude: d.latitude,
|
|
2283
2255
|
longitude: d.longitude
|
|
@@ -2318,15 +2290,15 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2318
2290
|
loadingLocation: !1,
|
|
2319
2291
|
instructions: "",
|
|
2320
2292
|
location: "",
|
|
2321
|
-
engine:
|
|
2293
|
+
engine: ae
|
|
2322
2294
|
});
|
|
2323
2295
|
return;
|
|
2324
2296
|
}
|
|
2325
2297
|
(async () => {
|
|
2326
2298
|
try {
|
|
2327
|
-
const u = await
|
|
2328
|
-
accessToken: await
|
|
2329
|
-
type:
|
|
2299
|
+
const u = await F({
|
|
2300
|
+
accessToken: await a(),
|
|
2301
|
+
type: H.GET_USER_PREFERENCES,
|
|
2330
2302
|
params: {
|
|
2331
2303
|
user: n.username
|
|
2332
2304
|
}
|
|
@@ -2336,12 +2308,12 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2336
2308
|
loaded: !0,
|
|
2337
2309
|
instructions: u.data.instructions || "",
|
|
2338
2310
|
location: u.data.location || "",
|
|
2339
|
-
engine: u.data.engine ||
|
|
2311
|
+
engine: u.data.engine || ae
|
|
2340
2312
|
}));
|
|
2341
2313
|
} catch {
|
|
2342
2314
|
}
|
|
2343
2315
|
})();
|
|
2344
|
-
}, [n, e]), /* @__PURE__ */
|
|
2316
|
+
}, [n, e]), /* @__PURE__ */ r(A, { children: s.loaded && /* @__PURE__ */ r(
|
|
2345
2317
|
Z,
|
|
2346
2318
|
{
|
|
2347
2319
|
open: e,
|
|
@@ -2354,7 +2326,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2354
2326
|
alignHorizontal: "flex-end",
|
|
2355
2327
|
className: "pb-8 sm:pb-0",
|
|
2356
2328
|
children: [
|
|
2357
|
-
/* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(
|
|
2358
2330
|
G,
|
|
2359
2331
|
{
|
|
2360
2332
|
mode: "dark",
|
|
@@ -2366,7 +2338,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2366
2338
|
children: "Cancel"
|
|
2367
2339
|
}
|
|
2368
2340
|
) }),
|
|
2369
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(
|
|
2370
2342
|
G,
|
|
2371
2343
|
{
|
|
2372
2344
|
mode: "dark",
|
|
@@ -2383,13 +2355,13 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2383
2355
|
),
|
|
2384
2356
|
children: /* @__PURE__ */ v(A, { children: [
|
|
2385
2357
|
/* @__PURE__ */ v(
|
|
2386
|
-
|
|
2358
|
+
B,
|
|
2387
2359
|
{
|
|
2388
2360
|
header: "AI Engine",
|
|
2389
2361
|
className: "prose-dark dark:prose-lighter",
|
|
2390
2362
|
children: [
|
|
2391
|
-
/* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2363
|
+
/* @__PURE__ */ r("p", { children: "Select the AI engine that will be used to generate responses." }),
|
|
2364
|
+
/* @__PURE__ */ r(
|
|
2393
2365
|
ne,
|
|
2394
2366
|
{
|
|
2395
2367
|
noBorder: !0,
|
|
@@ -2399,7 +2371,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2399
2371
|
checked: s.engine === Te
|
|
2400
2372
|
}
|
|
2401
2373
|
),
|
|
2402
|
-
/* @__PURE__ */
|
|
2374
|
+
/* @__PURE__ */ r(
|
|
2403
2375
|
ne,
|
|
2404
2376
|
{
|
|
2405
2377
|
spacing: { t: 2 },
|
|
@@ -2410,8 +2382,8 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2410
2382
|
checked: s.engine === fe
|
|
2411
2383
|
}
|
|
2412
2384
|
),
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
/* @__PURE__ */
|
|
2385
|
+
/* @__PURE__ */ r("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI." }),
|
|
2386
|
+
/* @__PURE__ */ r(
|
|
2415
2387
|
ne,
|
|
2416
2388
|
{
|
|
2417
2389
|
spacing: { t: 2 },
|
|
@@ -2422,19 +2394,23 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2422
2394
|
checked: c
|
|
2423
2395
|
}
|
|
2424
2396
|
),
|
|
2425
|
-
/* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ r("p", { className: "text-xs", children: "This option introduces a new menu on the left side of the screen, enabling you to quickly switch between engines." })
|
|
2426
2398
|
]
|
|
2427
2399
|
}
|
|
2428
2400
|
),
|
|
2429
2401
|
/* @__PURE__ */ v(
|
|
2430
|
-
|
|
2402
|
+
B,
|
|
2431
2403
|
{
|
|
2432
2404
|
spacing: { t: 4 },
|
|
2433
2405
|
header: "Custom Instructions",
|
|
2434
2406
|
className: "prose-dark dark:prose-lighter",
|
|
2435
2407
|
children: [
|
|
2436
|
-
/* @__PURE__ */
|
|
2437
|
-
|
|
2408
|
+
/* @__PURE__ */ v("p", { children: [
|
|
2409
|
+
"What would you like ",
|
|
2410
|
+
/* @__PURE__ */ r("em", { children: Ht }),
|
|
2411
|
+
" to know about you to provide better responses?"
|
|
2412
|
+
] }),
|
|
2413
|
+
/* @__PURE__ */ r(
|
|
2438
2414
|
De,
|
|
2439
2415
|
{
|
|
2440
2416
|
mode: "alt-system",
|
|
@@ -2458,14 +2434,14 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2458
2434
|
}
|
|
2459
2435
|
),
|
|
2460
2436
|
/* @__PURE__ */ v(
|
|
2461
|
-
|
|
2437
|
+
B,
|
|
2462
2438
|
{
|
|
2463
2439
|
header: "Location",
|
|
2464
2440
|
className: "prose-dark dark:prose-lighter",
|
|
2465
2441
|
spacing: { t: 4 },
|
|
2466
2442
|
children: [
|
|
2467
|
-
/* @__PURE__ */
|
|
2468
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ r("p", { children: "You can share your location to receive customized responses based on your area." }),
|
|
2444
|
+
/* @__PURE__ */ r(
|
|
2469
2445
|
De,
|
|
2470
2446
|
{
|
|
2471
2447
|
mode: "alt-system",
|
|
@@ -2482,7 +2458,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2482
2458
|
helperText: "Enter your location or press auto-detect."
|
|
2483
2459
|
}
|
|
2484
2460
|
),
|
|
2485
|
-
/* @__PURE__ */
|
|
2461
|
+
/* @__PURE__ */ r(
|
|
2486
2462
|
G,
|
|
2487
2463
|
{
|
|
2488
2464
|
spacing: { t: 2 },
|
|
@@ -2499,11 +2475,11 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2499
2475
|
] })
|
|
2500
2476
|
}
|
|
2501
2477
|
) });
|
|
2502
|
-
},
|
|
2478
|
+
}, ha = ({
|
|
2503
2479
|
open: e,
|
|
2504
2480
|
onOpenChange: t
|
|
2505
2481
|
}) => {
|
|
2506
|
-
const { state: o, dispatch:
|
|
2482
|
+
const { state: o, dispatch: a } = z(Ut), { getAccessToken: n, user: s } = X(), [i, c] = S({
|
|
2507
2483
|
tags: [...o.tags]
|
|
2508
2484
|
}), h = ({
|
|
2509
2485
|
slot: l,
|
|
@@ -2529,15 +2505,15 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2529
2505
|
}, m = async (l) => {
|
|
2530
2506
|
l.preventDefault();
|
|
2531
2507
|
try {
|
|
2532
|
-
await
|
|
2508
|
+
await F({
|
|
2533
2509
|
accessToken: await n(),
|
|
2534
|
-
type:
|
|
2510
|
+
type: H.SET_USER_PREFERENCES,
|
|
2535
2511
|
params: {
|
|
2536
2512
|
user: s == null ? void 0 : s.username,
|
|
2537
2513
|
tags: i.tags
|
|
2538
2514
|
}
|
|
2539
|
-
}),
|
|
2540
|
-
type:
|
|
2515
|
+
}), a({
|
|
2516
|
+
type: Kt,
|
|
2541
2517
|
payload: {
|
|
2542
2518
|
tags: i.tags
|
|
2543
2519
|
}
|
|
@@ -2552,7 +2528,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2552
2528
|
onOpenChange: t,
|
|
2553
2529
|
title: "Tags",
|
|
2554
2530
|
footer: /* @__PURE__ */ v(ie, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
2555
|
-
/* @__PURE__ */
|
|
2531
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(
|
|
2556
2532
|
G,
|
|
2557
2533
|
{
|
|
2558
2534
|
mode: "dark",
|
|
@@ -2564,7 +2540,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2564
2540
|
children: "Cancel"
|
|
2565
2541
|
}
|
|
2566
2542
|
) }),
|
|
2567
|
-
/* @__PURE__ */
|
|
2543
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(
|
|
2568
2544
|
G,
|
|
2569
2545
|
{
|
|
2570
2546
|
mode: "dark",
|
|
@@ -2578,16 +2554,16 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2578
2554
|
) })
|
|
2579
2555
|
] }),
|
|
2580
2556
|
children: [
|
|
2581
|
-
/* @__PURE__ */
|
|
2557
|
+
/* @__PURE__ */ r("p", { children: jt }),
|
|
2582
2558
|
i.tags && i.tags.map((l) => /* @__PURE__ */ v(
|
|
2583
|
-
|
|
2559
|
+
B,
|
|
2584
2560
|
{
|
|
2585
2561
|
header: l.label !== "" ? `Tag ${l.slot} - ${l.label}` : `Tag ${l.slot}`,
|
|
2586
2562
|
className: "prose-dark dark:prose-lighter",
|
|
2587
2563
|
spacing: { b: 2 },
|
|
2588
2564
|
children: [
|
|
2589
2565
|
/* @__PURE__ */ v(ie, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
|
|
2590
|
-
/* @__PURE__ */
|
|
2566
|
+
/* @__PURE__ */ r(P, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
|
|
2591
2567
|
xe,
|
|
2592
2568
|
{
|
|
2593
2569
|
label: "Label",
|
|
@@ -2603,7 +2579,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2603
2579
|
}
|
|
2604
2580
|
}
|
|
2605
2581
|
) }),
|
|
2606
|
-
/* @__PURE__ */
|
|
2582
|
+
/* @__PURE__ */ r(P, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
|
|
2607
2583
|
xe,
|
|
2608
2584
|
{
|
|
2609
2585
|
label: "Content",
|
|
@@ -2620,7 +2596,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2620
2596
|
}
|
|
2621
2597
|
) })
|
|
2622
2598
|
] }),
|
|
2623
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ r(
|
|
2624
2600
|
ne,
|
|
2625
2601
|
{
|
|
2626
2602
|
spacing: { t: 2 },
|
|
@@ -2645,9 +2621,9 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2645
2621
|
]
|
|
2646
2622
|
}
|
|
2647
2623
|
);
|
|
2648
|
-
},
|
|
2649
|
-
const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType:
|
|
2650
|
-
key: me +
|
|
2624
|
+
}, ga = () => {
|
|
2625
|
+
const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: a } = X(), [n, s] = he({
|
|
2626
|
+
key: me + Wt,
|
|
2651
2627
|
initialValue: !1
|
|
2652
2628
|
}), [i, c] = S(!1), [h, m] = S(!1), l = ce(), g = (t == null ? void 0 : t.username) || "", b = (y) => {
|
|
2653
2629
|
s(y);
|
|
@@ -2657,16 +2633,16 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2657
2633
|
m(!h);
|
|
2658
2634
|
};
|
|
2659
2635
|
return e && g ? /* @__PURE__ */ v(A, { children: [
|
|
2660
|
-
i && /* @__PURE__ */
|
|
2661
|
-
|
|
2636
|
+
i && /* @__PURE__ */ r(
|
|
2637
|
+
ma,
|
|
2662
2638
|
{
|
|
2663
2639
|
open: i,
|
|
2664
2640
|
onOpenChange: c
|
|
2665
2641
|
}
|
|
2666
2642
|
),
|
|
2667
|
-
h && /* @__PURE__ */
|
|
2643
|
+
h && /* @__PURE__ */ r(ha, { open: h, onOpenChange: m }),
|
|
2668
2644
|
/* @__PURE__ */ v(
|
|
2669
|
-
|
|
2645
|
+
B,
|
|
2670
2646
|
{
|
|
2671
2647
|
header: N.PREFERENCES.TITLE,
|
|
2672
2648
|
className: "prose-dark dark:prose-lighter",
|
|
@@ -2674,7 +2650,7 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2674
2650
|
se(l, {
|
|
2675
2651
|
[N.PREFERENCES.NAME]: g,
|
|
2676
2652
|
[N.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
|
|
2677
|
-
[N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */
|
|
2653
|
+
[N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
|
|
2678
2654
|
ne,
|
|
2679
2655
|
{
|
|
2680
2656
|
noBorder: !0,
|
|
@@ -2686,59 +2662,59 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2686
2662
|
}
|
|
2687
2663
|
)
|
|
2688
2664
|
}),
|
|
2689
|
-
/* @__PURE__ */
|
|
2665
|
+
/* @__PURE__ */ r(
|
|
2690
2666
|
Y,
|
|
2691
2667
|
{
|
|
2692
2668
|
spacing: { t: 2 },
|
|
2693
2669
|
size: "small",
|
|
2694
2670
|
onClick: u,
|
|
2695
2671
|
labelLeft: "Engine Fine Tuning",
|
|
2696
|
-
children: /* @__PURE__ */
|
|
2672
|
+
children: /* @__PURE__ */ r(Fe, { className: "size-3", monotone: !0 })
|
|
2697
2673
|
}
|
|
2698
2674
|
),
|
|
2699
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ r(
|
|
2700
2676
|
Y,
|
|
2701
2677
|
{
|
|
2702
2678
|
spacing: { t: 2, l: 2 },
|
|
2703
2679
|
size: "small",
|
|
2704
2680
|
onClick: d,
|
|
2705
2681
|
labelLeft: "Tags",
|
|
2706
|
-
children: /* @__PURE__ */
|
|
2682
|
+
children: /* @__PURE__ */ r(Fe, { className: "size-3", monotone: !0 })
|
|
2707
2683
|
}
|
|
2708
2684
|
)
|
|
2709
2685
|
]
|
|
2710
2686
|
}
|
|
2711
2687
|
),
|
|
2712
|
-
|
|
2713
|
-
|
|
2688
|
+
a !== Yt.PASSKEY && /* @__PURE__ */ v(
|
|
2689
|
+
B,
|
|
2714
2690
|
{
|
|
2715
2691
|
spacing: { t: 4 },
|
|
2716
2692
|
className: "prose-dark dark:prose-lighter",
|
|
2717
|
-
header: /* @__PURE__ */
|
|
2718
|
-
/* @__PURE__ */
|
|
2719
|
-
/* @__PURE__ */
|
|
2693
|
+
header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ v(ie, { columnGap: 3, alignVertical: "center", children: [
|
|
2694
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r(Oe, { className: "size-8" }) }),
|
|
2695
|
+
/* @__PURE__ */ r(P, { children: /* @__PURE__ */ r("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
|
|
2720
2696
|
] }) }),
|
|
2721
2697
|
children: [
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
/* @__PURE__ */
|
|
2698
|
+
/* @__PURE__ */ r("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2699
|
+
/* @__PURE__ */ r(
|
|
2724
2700
|
Y,
|
|
2725
2701
|
{
|
|
2726
2702
|
size: "small",
|
|
2727
2703
|
spacing: { t: 2 },
|
|
2728
2704
|
onClick: o,
|
|
2729
2705
|
labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
|
|
2730
|
-
children: /* @__PURE__ */
|
|
2706
|
+
children: /* @__PURE__ */ r(Oe, { className: "size-5", monotone: !0 })
|
|
2731
2707
|
}
|
|
2732
2708
|
)
|
|
2733
2709
|
]
|
|
2734
2710
|
}
|
|
2735
2711
|
)
|
|
2736
2712
|
] }) : null;
|
|
2737
|
-
},
|
|
2713
|
+
}, pa = ({
|
|
2738
2714
|
open: e,
|
|
2739
2715
|
onOpenChange: t
|
|
2740
|
-
}) => /* @__PURE__ */
|
|
2741
|
-
const { state: e, dispatch: t, serverStats: o } =
|
|
2716
|
+
}) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: qt, children: /* @__PURE__ */ r(ga, {}) }), Ta = () => {
|
|
2717
|
+
const { state: e, dispatch: t, serverStats: o } = z(ue), [a, n] = S((e == null ? void 0 : e.engine) || ae), [s, i] = S(!1), [c, h] = S(!1), [m, l] = S(!1), [g, b] = S(!1), [u, d] = S([]), [y, C] = S(!1), [p, k] = S({
|
|
2742
2718
|
done: !1,
|
|
2743
2719
|
progress: !1,
|
|
2744
2720
|
timestamp: Date.now()
|
|
@@ -2762,9 +2738,9 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2762
2738
|
timestamp: K
|
|
2763
2739
|
});
|
|
2764
2740
|
try {
|
|
2765
|
-
const R = await
|
|
2741
|
+
const R = await F({
|
|
2766
2742
|
accessToken: await M(),
|
|
2767
|
-
type:
|
|
2743
|
+
type: H.GET_CHATS,
|
|
2768
2744
|
params: {
|
|
2769
2745
|
userId: _.username
|
|
2770
2746
|
}
|
|
@@ -2786,9 +2762,9 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2786
2762
|
C(!y);
|
|
2787
2763
|
};
|
|
2788
2764
|
return U(() => {
|
|
2789
|
-
e && e.engine && e.engine !==
|
|
2790
|
-
}, [e,
|
|
2791
|
-
/* @__PURE__ */
|
|
2765
|
+
e && e.engine && e.engine !== a && n(e.engine);
|
|
2766
|
+
}, [e, a]), /* @__PURE__ */ v(A, { children: [
|
|
2767
|
+
/* @__PURE__ */ r(
|
|
2792
2768
|
xt,
|
|
2793
2769
|
{
|
|
2794
2770
|
showConfirmation: y,
|
|
@@ -2799,41 +2775,41 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2799
2775
|
cancelAction: "Cancel",
|
|
2800
2776
|
title: Ve
|
|
2801
2777
|
},
|
|
2802
|
-
children: /* @__PURE__ */
|
|
2778
|
+
children: /* @__PURE__ */ r("p", { children: "Are you sure you want to log out?" })
|
|
2803
2779
|
}
|
|
2804
2780
|
),
|
|
2805
|
-
/* @__PURE__ */
|
|
2806
|
-
/* @__PURE__ */
|
|
2807
|
-
/* @__PURE__ */
|
|
2808
|
-
|
|
2781
|
+
/* @__PURE__ */ r(pa, { open: s, onOpenChange: i }),
|
|
2782
|
+
/* @__PURE__ */ r(Yr, { open: c, onOpenChange: h }),
|
|
2783
|
+
/* @__PURE__ */ r(
|
|
2784
|
+
ta,
|
|
2809
2785
|
{
|
|
2810
2786
|
open: m,
|
|
2811
2787
|
onOpenChange: l,
|
|
2812
2788
|
historyData: u
|
|
2813
2789
|
}
|
|
2814
2790
|
),
|
|
2815
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ r(Ur, { open: g, onOpenChange: b }),
|
|
2816
2792
|
/* @__PURE__ */ v("div", { className: "relative", children: [
|
|
2817
|
-
T && o && /* @__PURE__ */
|
|
2793
|
+
T && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
|
|
2818
2794
|
Se,
|
|
2819
2795
|
{
|
|
2820
2796
|
mode: "dark",
|
|
2821
2797
|
focusMode: "light",
|
|
2822
|
-
trigger: /* @__PURE__ */
|
|
2798
|
+
trigger: /* @__PURE__ */ r(Y, { children: e && e.engine === fe ? /* @__PURE__ */ r(nt, {}) : /* @__PURE__ */ r(st, {}) }),
|
|
2823
2799
|
defaultPlacement: "bottom-start",
|
|
2824
|
-
children: /* @__PURE__ */
|
|
2825
|
-
|
|
2800
|
+
children: /* @__PURE__ */ r(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ r(
|
|
2801
|
+
Cr,
|
|
2826
2802
|
{
|
|
2827
2803
|
size: "small",
|
|
2828
2804
|
mode: "dark",
|
|
2829
2805
|
focusMode: "light",
|
|
2830
|
-
value:
|
|
2806
|
+
value: a,
|
|
2831
2807
|
onValueChange: async (L) => {
|
|
2832
2808
|
if (L)
|
|
2833
2809
|
try {
|
|
2834
|
-
await
|
|
2810
|
+
await F({
|
|
2835
2811
|
accessToken: await M(),
|
|
2836
|
-
type:
|
|
2812
|
+
type: H.SET_USER_PREFERENCES,
|
|
2837
2813
|
params: {
|
|
2838
2814
|
user: _ == null ? void 0 : _.username,
|
|
2839
2815
|
engine: L
|
|
@@ -2849,60 +2825,60 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2849
2825
|
} catch {
|
|
2850
2826
|
}
|
|
2851
2827
|
},
|
|
2852
|
-
children: o && o.engines.map((L) => /* @__PURE__ */
|
|
2828
|
+
children: o && o.engines.map((L) => /* @__PURE__ */ r(wr, { value: L }, L))
|
|
2853
2829
|
}
|
|
2854
2830
|
) })
|
|
2855
2831
|
}
|
|
2856
2832
|
) }),
|
|
2857
|
-
/* @__PURE__ */
|
|
2833
|
+
/* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ v(
|
|
2858
2834
|
Se,
|
|
2859
2835
|
{
|
|
2860
2836
|
mode: "dark",
|
|
2861
2837
|
focusMode: "light",
|
|
2862
|
-
trigger: /* @__PURE__ */
|
|
2838
|
+
trigger: /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(Ro, {}) }),
|
|
2863
2839
|
defaultPlacement: "bottom-end",
|
|
2864
2840
|
onOpenChange: j,
|
|
2865
2841
|
children: [
|
|
2866
|
-
/* @__PURE__ */
|
|
2842
|
+
/* @__PURE__ */ r(
|
|
2867
2843
|
W,
|
|
2868
2844
|
{
|
|
2869
2845
|
label: "Profile",
|
|
2870
2846
|
onClick: V,
|
|
2871
|
-
icon: /* @__PURE__ */
|
|
2847
|
+
icon: /* @__PURE__ */ r(So, {})
|
|
2872
2848
|
}
|
|
2873
2849
|
),
|
|
2874
|
-
/* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ r(
|
|
2875
2851
|
W,
|
|
2876
2852
|
{
|
|
2877
2853
|
label: Xe,
|
|
2878
2854
|
onClick: E,
|
|
2879
|
-
icon: /* @__PURE__ */
|
|
2855
|
+
icon: /* @__PURE__ */ r(No, {})
|
|
2880
2856
|
}
|
|
2881
2857
|
),
|
|
2882
|
-
/* @__PURE__ */
|
|
2858
|
+
/* @__PURE__ */ r(
|
|
2883
2859
|
W,
|
|
2884
2860
|
{
|
|
2885
2861
|
label: "History",
|
|
2886
2862
|
onClick: ee,
|
|
2887
|
-
icon: /* @__PURE__ */
|
|
2863
|
+
icon: /* @__PURE__ */ r(xo, {})
|
|
2888
2864
|
}
|
|
2889
2865
|
),
|
|
2890
|
-
/* @__PURE__ */
|
|
2866
|
+
/* @__PURE__ */ r(
|
|
2891
2867
|
W,
|
|
2892
2868
|
{
|
|
2893
2869
|
label: "About",
|
|
2894
2870
|
onClick: J,
|
|
2895
|
-
icon: /* @__PURE__ */
|
|
2871
|
+
icon: /* @__PURE__ */ r(Io, {})
|
|
2896
2872
|
}
|
|
2897
2873
|
),
|
|
2898
2874
|
e && e.id && !e.isComponent && /* @__PURE__ */ v(A, { children: [
|
|
2899
|
-
/* @__PURE__ */
|
|
2900
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ r(Ao, {}),
|
|
2876
|
+
/* @__PURE__ */ r(
|
|
2901
2877
|
W,
|
|
2902
2878
|
{
|
|
2903
2879
|
label: "Log out",
|
|
2904
2880
|
onClick: te,
|
|
2905
|
-
icon: /* @__PURE__ */
|
|
2881
|
+
icon: /* @__PURE__ */ r("div", { className: "text-red-700", children: /* @__PURE__ */ r(To, { monotone: !0 }) })
|
|
2906
2882
|
}
|
|
2907
2883
|
)
|
|
2908
2884
|
] })
|
|
@@ -2913,5 +2889,5 @@ const tr = "av-toggle", or = (e) => {
|
|
|
2913
2889
|
] });
|
|
2914
2890
|
};
|
|
2915
2891
|
export {
|
|
2916
|
-
|
|
2892
|
+
Ta as default
|
|
2917
2893
|
};
|