@versini/sassysaint 4.0.5 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.Cd080fXs.js → App.8LsHfy0z.js} +27 -27
- package/dist/chunks/{LazyHeader.CG_x94aM.js → LazyHeader.D_ViNWrh.js} +382 -381
- package/dist/chunks/{LazyMarkdownWithExtra.HwBaWBbT.js → LazyMarkdownWithExtra.B_VU-4Vs.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.CP6NuHPb.js → LazyMessageAssistant.C7EB2M7r.js} +4 -4
- package/dist/chunks/{index.7JJYsiGN.fOXCGsQA.js → index.7JJYsiGN.BMY0Ig6p.js} +1 -1
- package/dist/chunks/{index.KrqE7k6j.js → index.iWfWxGn2.js} +737 -721
- package/dist/chunks/{useLocalStorage.cIA35Dub.js → useLocalStorage.ChFZVshd.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { O as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { O as B, i$1 as ie, N as de, p as De, o as _e, g as I, N$1 as z, CARDS as u, renderDataAsList as U, pluralize as Z, ABOUT_TITLE as Be, MODEL_GPT4 as ze, numberFormatter as Ve, durationFormatter as Ce, NA as Pe, ROLE_ASSISTANT as Fe, extractAverage as Ge, GPT4_MAX_TOKENS as $e, qr as K, STATS as Ne, b as G, j as x, x as ee, LOCAL_STORAGE_PREFIX as te, LOCAL_STORAGE_SORT as Ue, ACTION_RESET as je, ACTION_RESTORE as Ye, truncate as Ke, ACTION_SORT as re, LOCAL_STORAGE_SEARCH as We, Y as Xe, ACTION_SEARCH as qe, HISTORY_TITLE as Je, LOCAL_STORAGE_CHAT_DETAILS as Qe, LOCAL_STORAGE_LOCATION as Ze, W as et, v as tt, ACTION_LOCATION as me, getCurrentGeoLocation as at, convertLatitudeToDMS as nt, convertLongitudeToDMS as st, PROFILE_TITLE as rt, LOG_OUT as ue } from "./index.iWfWxGn2.js";
|
|
3
3
|
import * as ce from "react";
|
|
4
|
-
import
|
|
5
|
-
import { g as
|
|
6
|
-
import
|
|
7
|
-
import { useFloatingTree as
|
|
8
|
-
const
|
|
4
|
+
import ot, { forwardRef as Te, useState as T, useRef as j, useContext as H, useEffect as O, Suspense as ct, lazy as lt, useId as it, useMemo as dt } from "react";
|
|
5
|
+
import { g as mt, AppContext as W, serviceCall as ne, SERVICE_TYPES as se, HistoryContext as Ee, E as ae, k as A, et as ut, at as ht, lt as oe, J as M, ct as pt, st as ft, rt as gt } from "./useLocalStorage.ChFZVshd.js";
|
|
6
|
+
import k from "clsx";
|
|
7
|
+
import { useFloatingTree as Se, useFloatingNodeId as Ct, useListItem as ye, useFloating as Nt, offset as Tt, flip as Et, shift as St, autoUpdate as yt, useClick as bt, useRole as wt, useDismiss as xt, useListNavigation as kt, useTypeahead as vt, useInteractions as At, useMergeRefs as be, FloatingNode as It, FloatingList as Rt, FloatingPortal as Mt, FloatingFocusManager as Ht, FloatingTree as Lt } from "@floating-ui/react";
|
|
8
|
+
const le = ce.createContext({
|
|
9
9
|
getItemProps: () => ({}),
|
|
10
10
|
activeIndex: null,
|
|
11
11
|
/* v8 ignore next 2 */
|
|
@@ -25,7 +25,7 @@ const ie = ce.createContext({
|
|
|
25
25
|
return a.displayName || a.name || "Component";
|
|
26
26
|
}
|
|
27
27
|
return "Element";
|
|
28
|
-
},
|
|
28
|
+
}, we = Te(
|
|
29
29
|
({
|
|
30
30
|
trigger: t,
|
|
31
31
|
children: a,
|
|
@@ -34,84 +34,84 @@ const ie = ce.createContext({
|
|
|
34
34
|
onOpenChange: r,
|
|
35
35
|
spacing: o,
|
|
36
36
|
mode: i = "system",
|
|
37
|
-
focusMode:
|
|
37
|
+
focusMode: h = "system",
|
|
38
38
|
...p
|
|
39
39
|
}, d) => {
|
|
40
|
-
const [
|
|
41
|
-
nodeId:
|
|
42
|
-
open:
|
|
43
|
-
onOpenChange: (
|
|
44
|
-
|
|
40
|
+
const [m, g] = T(!1), [E, S] = T(!1), [f, b] = T(null), v = j([]), c = j([]), C = H(le), N = Se(), y = Ct(), L = ye(), { floatingStyles: V, refs: D, context: R } = Nt({
|
|
41
|
+
nodeId: y,
|
|
42
|
+
open: m,
|
|
43
|
+
onOpenChange: (F) => {
|
|
44
|
+
g(F), r == null || r(F);
|
|
45
45
|
},
|
|
46
46
|
placement: s,
|
|
47
47
|
strategy: "fixed",
|
|
48
|
-
middleware: [
|
|
49
|
-
whileElementsMounted:
|
|
50
|
-
}),
|
|
48
|
+
middleware: [Tt({ mainAxis: 10 }), Et(), St()],
|
|
49
|
+
whileElementsMounted: yt
|
|
50
|
+
}), J = bt(R, {
|
|
51
51
|
event: "mousedown",
|
|
52
52
|
toggle: !0,
|
|
53
53
|
ignoreMouse: !1
|
|
54
|
-
}),
|
|
55
|
-
listRef:
|
|
56
|
-
activeIndex:
|
|
54
|
+
}), P = wt(R, { role: "menu" }), ve = xt(R, { bubbles: !0 }), Ae = kt(R, {
|
|
55
|
+
listRef: v,
|
|
56
|
+
activeIndex: f,
|
|
57
57
|
nested: !1,
|
|
58
|
-
onNavigate:
|
|
58
|
+
onNavigate: b,
|
|
59
59
|
loop: !0
|
|
60
|
-
}),
|
|
61
|
-
listRef:
|
|
62
|
-
onMatch:
|
|
63
|
-
activeIndex:
|
|
64
|
-
}), { getReferenceProps:
|
|
60
|
+
}), Ie = vt(R, {
|
|
61
|
+
listRef: c,
|
|
62
|
+
onMatch: m ? b : void 0,
|
|
63
|
+
activeIndex: f
|
|
64
|
+
}), { getReferenceProps: Re, getFloatingProps: Me, getItemProps: He } = At([J, P, ve, Ae, Ie]), Le = he(t) === "Button" || he(t) === "ButtonIcon", Oe = ot.cloneElement(t, {
|
|
65
65
|
mode: i,
|
|
66
|
-
focusMode:
|
|
66
|
+
focusMode: h,
|
|
67
67
|
spacing: o,
|
|
68
68
|
noInternalClick: Le,
|
|
69
69
|
"aria-label": n,
|
|
70
|
-
"data-open":
|
|
71
|
-
"data-focus-inside":
|
|
72
|
-
ref:
|
|
73
|
-
...
|
|
74
|
-
|
|
70
|
+
"data-open": m ? "" : void 0,
|
|
71
|
+
"data-focus-inside": E ? "" : void 0,
|
|
72
|
+
ref: be([D.setReference, L.ref, d]),
|
|
73
|
+
...Re(
|
|
74
|
+
C.getItemProps({
|
|
75
75
|
...p
|
|
76
76
|
})
|
|
77
77
|
)
|
|
78
78
|
});
|
|
79
|
-
return
|
|
80
|
-
if (!
|
|
79
|
+
return O(() => {
|
|
80
|
+
if (!N)
|
|
81
81
|
return;
|
|
82
|
-
function
|
|
83
|
-
|
|
82
|
+
function F() {
|
|
83
|
+
g(!1), r == null || r(!1);
|
|
84
84
|
}
|
|
85
|
-
return
|
|
86
|
-
|
|
85
|
+
return N.events.on("click", F), () => {
|
|
86
|
+
N.events.off("click", F);
|
|
87
87
|
};
|
|
88
|
-
}, [
|
|
89
|
-
|
|
90
|
-
}, [
|
|
88
|
+
}, [N, r]), O(() => {
|
|
89
|
+
m && N && N.events.emit("menuopen", { nodeId: y });
|
|
90
|
+
}, [N, m, y]), /* @__PURE__ */ l(It, { id: y, children: [
|
|
91
91
|
Oe,
|
|
92
92
|
/* @__PURE__ */ e(
|
|
93
|
-
|
|
93
|
+
le.Provider,
|
|
94
94
|
{
|
|
95
95
|
value: {
|
|
96
|
-
activeIndex:
|
|
97
|
-
setActiveIndex:
|
|
98
|
-
getItemProps:
|
|
99
|
-
setHasFocusInside:
|
|
100
|
-
isOpen:
|
|
96
|
+
activeIndex: f,
|
|
97
|
+
setActiveIndex: b,
|
|
98
|
+
getItemProps: He,
|
|
99
|
+
setHasFocusInside: S,
|
|
100
|
+
isOpen: m
|
|
101
101
|
},
|
|
102
|
-
children: /* @__PURE__ */ e(
|
|
103
|
-
|
|
102
|
+
children: /* @__PURE__ */ e(Rt, { elementsRef: v, labelsRef: c, children: m && /* @__PURE__ */ e(Mt, { children: /* @__PURE__ */ e(
|
|
103
|
+
Ht,
|
|
104
104
|
{
|
|
105
|
-
context:
|
|
105
|
+
context: R,
|
|
106
106
|
modal: !1,
|
|
107
107
|
initialFocus: 0,
|
|
108
108
|
returnFocus: !0,
|
|
109
109
|
children: /* @__PURE__ */ e(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
ref:
|
|
112
|
+
ref: D.setFloating,
|
|
113
113
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
114
|
-
style:
|
|
114
|
+
style: V,
|
|
115
115
|
...Me(),
|
|
116
116
|
children: a
|
|
117
117
|
}
|
|
@@ -122,16 +122,16 @@ const ie = ce.createContext({
|
|
|
122
122
|
)
|
|
123
123
|
] });
|
|
124
124
|
}
|
|
125
|
-
), xe = Te((t, a) => /* @__PURE__ */ e(
|
|
125
|
+
), xe = Te((t, a) => /* @__PURE__ */ e(Lt, { children: /* @__PURE__ */ e(we, { ...t, ref: a }) }));
|
|
126
126
|
xe.displayName = "Menu";
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
const o = ce.useContext(
|
|
130
|
-
return /* @__PURE__ */
|
|
127
|
+
we.displayName = "MenuComponent";
|
|
128
|
+
const _ = ce.forwardRef(({ label: t, disabled: a, icon: n, ...s }, r) => {
|
|
129
|
+
const o = ce.useContext(le), i = ye({ label: a ? null : t }), h = Se();
|
|
130
|
+
return /* @__PURE__ */ l(
|
|
131
131
|
"button",
|
|
132
132
|
{
|
|
133
133
|
...s,
|
|
134
|
-
ref:
|
|
134
|
+
ref: be([i.ref, r]),
|
|
135
135
|
role: "menuitem",
|
|
136
136
|
className: "m-0 flex w-full rounded-md border border-transparent bg-none px-3 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
|
|
137
137
|
tabIndex: 0,
|
|
@@ -139,7 +139,7 @@ const O = ce.forwardRef(({ label: t, disabled: a, icon: n, ...s }, r) => {
|
|
|
139
139
|
...o.getItemProps({
|
|
140
140
|
onClick(p) {
|
|
141
141
|
var d;
|
|
142
|
-
(d = s.onClick) == null || d.call(s, p),
|
|
142
|
+
(d = s.onClick) == null || d.call(s, p), h == null || h.events.emit("click");
|
|
143
143
|
},
|
|
144
144
|
onFocus(p) {
|
|
145
145
|
var d;
|
|
@@ -153,11 +153,11 @@ const O = ce.forwardRef(({ label: t, disabled: a, icon: n, ...s }, r) => {
|
|
|
153
153
|
}
|
|
154
154
|
);
|
|
155
155
|
});
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
const n =
|
|
156
|
+
_.displayName = "MenuItem";
|
|
157
|
+
const Ot = ({ className: t, ...a }) => {
|
|
158
|
+
const n = k(t, "my-1 border-t border-border-medium");
|
|
159
159
|
return /* @__PURE__ */ e("div", { className: n, ...a });
|
|
160
|
-
},
|
|
160
|
+
}, Dt = ({
|
|
161
161
|
className: t,
|
|
162
162
|
viewBox: a,
|
|
163
163
|
spacing: n,
|
|
@@ -165,7 +165,7 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
165
165
|
monotone: r,
|
|
166
166
|
...o
|
|
167
167
|
}) => /* @__PURE__ */ e(
|
|
168
|
-
|
|
168
|
+
mt,
|
|
169
169
|
{
|
|
170
170
|
defaultViewBox: "0 0 384 512",
|
|
171
171
|
defaultClassName: "size-5",
|
|
@@ -176,19 +176,19 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
176
176
|
...o,
|
|
177
177
|
children: /* @__PURE__ */ e("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" })
|
|
178
178
|
}
|
|
179
|
-
),
|
|
179
|
+
), $ = "panel", Q = "messagebox", _t = ({
|
|
180
180
|
className: t,
|
|
181
181
|
kind: a,
|
|
182
182
|
borderMode: n
|
|
183
183
|
}) => ({
|
|
184
|
-
main:
|
|
185
|
-
[`${
|
|
186
|
-
[`${
|
|
184
|
+
main: k("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
185
|
+
[`${ie} h-full min-h-[95%] sm:h-auto sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: a === $,
|
|
186
|
+
[`${ie} w-full sm:w-[95%] md:max-w-2xl`]: a === $ && !t,
|
|
187
187
|
[`${de} rounded-lg border-2`]: a === Q,
|
|
188
188
|
[`${de} w-[95%] sm:w-[50%] md:max-w-2xl`]: a === Q && !t,
|
|
189
189
|
[`${t}`]: !!t,
|
|
190
|
-
"sm:border-border-dark": n === "dark" && a ===
|
|
191
|
-
"sm:border-border-accent": n === "light" && a ===
|
|
190
|
+
"sm:border-border-dark": n === "dark" && a === $,
|
|
191
|
+
"sm:border-border-accent": n === "light" && a === $,
|
|
192
192
|
"border-border-dark": n === "dark" && a === Q,
|
|
193
193
|
"border-border-accent": n === "light" && a === Q
|
|
194
194
|
}),
|
|
@@ -196,49 +196,49 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
196
196
|
footer: "flex flex-grow flex-col p-4",
|
|
197
197
|
header: "p-4 mb-0",
|
|
198
198
|
close: "p-4"
|
|
199
|
-
}),
|
|
200
|
-
() => import("./index.7JJYsiGN.
|
|
199
|
+
}), X = (t) => lt(
|
|
200
|
+
() => import("./index.7JJYsiGN.BMY0Ig6p.js").then((a) => ({
|
|
201
201
|
default: a[t]
|
|
202
202
|
}))
|
|
203
|
-
),
|
|
203
|
+
), Bt = X("Modal"), zt = X("ModalClose"), Vt = X("ModalContent"), Pt = X("ModalDescription"), Ft = X("ModalHeading"), q = ({
|
|
204
204
|
open: t,
|
|
205
205
|
onOpenChange: a,
|
|
206
206
|
title: n,
|
|
207
207
|
children: s,
|
|
208
208
|
footer: r,
|
|
209
209
|
borderMode: o = "light",
|
|
210
|
-
kind: i =
|
|
211
|
-
className:
|
|
210
|
+
kind: i = $,
|
|
211
|
+
className: h
|
|
212
212
|
}) => {
|
|
213
|
-
const p =
|
|
214
|
-
return
|
|
213
|
+
const p = j(""), d = _t({ className: h, kind: i, borderMode: o });
|
|
214
|
+
return O(() => (t && (p.current = document.title, document.title = `${n} | ${p.current}`), () => {
|
|
215
215
|
t && (document.title = p.current);
|
|
216
|
-
}), [n, t]), /* @__PURE__ */ e(
|
|
217
|
-
/* @__PURE__ */
|
|
216
|
+
}), [n, t]), /* @__PURE__ */ e(ct, { fallback: /* @__PURE__ */ e("div", {}), children: t && /* @__PURE__ */ e(Bt, { open: t, onOpenChange: a, children: /* @__PURE__ */ l(Vt, { className: d.main, children: [
|
|
217
|
+
/* @__PURE__ */ l("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
218
218
|
/* @__PURE__ */ e(
|
|
219
219
|
zt,
|
|
220
220
|
{
|
|
221
221
|
className: d.close,
|
|
222
222
|
trigger: /* @__PURE__ */ e(
|
|
223
|
-
|
|
223
|
+
B,
|
|
224
224
|
{
|
|
225
225
|
mode: "dark",
|
|
226
226
|
focusMode: "light",
|
|
227
227
|
noBorder: !0,
|
|
228
228
|
label: "Close",
|
|
229
|
-
children: /* @__PURE__ */ e(
|
|
229
|
+
children: /* @__PURE__ */ e(Dt, {})
|
|
230
230
|
}
|
|
231
231
|
)
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
/* @__PURE__ */ e(
|
|
234
|
+
/* @__PURE__ */ e(Ft, { className: d.header, children: n })
|
|
235
235
|
] }),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
236
|
+
/* @__PURE__ */ e(Pt, { className: d.content, children: s }),
|
|
237
237
|
r && /* @__PURE__ */ e("div", { className: d.footer, children: r })
|
|
238
238
|
] }) }) });
|
|
239
|
-
},
|
|
239
|
+
}, Gt = () => k("peer", "h-6", "w-11", "rounded-full"), $t = ({
|
|
240
240
|
focusMode: t
|
|
241
|
-
}) =>
|
|
241
|
+
}) => k(
|
|
242
242
|
"peer-focus:outline",
|
|
243
243
|
"peer-focus:outline-2",
|
|
244
244
|
"peer-focus:outline-offset-2",
|
|
@@ -248,14 +248,14 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
248
248
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": t === "alt-system",
|
|
249
249
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": t === "system"
|
|
250
250
|
}
|
|
251
|
-
),
|
|
251
|
+
), Ut = () => k(
|
|
252
252
|
"peer-checked:after:translate-x-full",
|
|
253
253
|
// background color when checked
|
|
254
254
|
"peer-checked:bg-violet-500",
|
|
255
255
|
// knob circle and border color when checked
|
|
256
256
|
"peer-checked:after:bg-white",
|
|
257
257
|
"peer-checked:after:border-white"
|
|
258
|
-
),
|
|
258
|
+
), jt = () => k(
|
|
259
259
|
"after:left-[2px]",
|
|
260
260
|
"after:top-[2px]",
|
|
261
261
|
"after:border",
|
|
@@ -267,45 +267,45 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
267
267
|
"after:rounded-full",
|
|
268
268
|
"after:transition-all",
|
|
269
269
|
"after:content-['']"
|
|
270
|
-
),
|
|
270
|
+
), Yt = ({
|
|
271
271
|
mode: t,
|
|
272
272
|
noBorder: a
|
|
273
|
-
}) =>
|
|
273
|
+
}) => k({
|
|
274
274
|
border: !a,
|
|
275
275
|
"border-border-dark bg-surface-medium": t === "light",
|
|
276
276
|
"border-border-light bg-surface-darker": t === "dark",
|
|
277
277
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": t === "alt-system",
|
|
278
278
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": t === "system"
|
|
279
|
-
}),
|
|
279
|
+
}), Kt = ({
|
|
280
280
|
mode: t,
|
|
281
281
|
labelHidden: a
|
|
282
|
-
}) => a ? "sr-only" :
|
|
282
|
+
}) => a ? "sr-only" : k("ml-2 text-sm", {
|
|
283
283
|
"text-copy-dark": t === "light",
|
|
284
284
|
"text-copy-lighter": t === "dark",
|
|
285
285
|
"text-copy-lighter dark:text-copy-dark": t === "alt-system",
|
|
286
286
|
"text-copy-dark dark:text-copy-lighter": t === "system"
|
|
287
|
-
}),
|
|
287
|
+
}), Wt = ({ spacing: t }) => k(
|
|
288
288
|
De,
|
|
289
289
|
"relative flex cursor-pointer items-center",
|
|
290
290
|
_e(t)
|
|
291
|
-
),
|
|
291
|
+
), Xt = ({
|
|
292
292
|
mode: t,
|
|
293
293
|
focusMode: a,
|
|
294
294
|
labelHidden: n,
|
|
295
295
|
spacing: s,
|
|
296
296
|
noBorder: r
|
|
297
297
|
}) => ({
|
|
298
|
-
toggle:
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
298
|
+
toggle: k(
|
|
299
|
+
Gt(),
|
|
300
|
+
Yt({ mode: t, noBorder: r }),
|
|
301
|
+
$t({ focusMode: a }),
|
|
302
|
+
jt(),
|
|
303
|
+
Ut()
|
|
304
304
|
),
|
|
305
|
-
label:
|
|
305
|
+
label: Kt({ mode: t, labelHidden: n }),
|
|
306
306
|
input: "peer sr-only",
|
|
307
|
-
wrapper:
|
|
308
|
-
}),
|
|
307
|
+
wrapper: Wt({ spacing: s })
|
|
308
|
+
}), qt = ({
|
|
309
309
|
checked: t = !1,
|
|
310
310
|
onChange: a,
|
|
311
311
|
label: n,
|
|
@@ -313,19 +313,19 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
313
313
|
name: r,
|
|
314
314
|
mode: o = "system",
|
|
315
315
|
focusMode: i = "system",
|
|
316
|
-
spacing:
|
|
316
|
+
spacing: h,
|
|
317
317
|
noBorder: p = !1
|
|
318
318
|
}) => {
|
|
319
|
-
const d =
|
|
319
|
+
const d = Xt({
|
|
320
320
|
mode: o,
|
|
321
321
|
focusMode: i,
|
|
322
322
|
labelHidden: s,
|
|
323
|
-
spacing:
|
|
323
|
+
spacing: h,
|
|
324
324
|
noBorder: p
|
|
325
|
-
}),
|
|
326
|
-
a == null || a(
|
|
325
|
+
}), m = (g) => {
|
|
326
|
+
a == null || a(g.target.checked);
|
|
327
327
|
};
|
|
328
|
-
return /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */ l("label", { className: d.wrapper, children: [
|
|
329
329
|
/* @__PURE__ */ e(
|
|
330
330
|
"input",
|
|
331
331
|
{
|
|
@@ -333,7 +333,7 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
333
333
|
checked: t,
|
|
334
334
|
type: "checkbox",
|
|
335
335
|
className: d.input,
|
|
336
|
-
onChange:
|
|
336
|
+
onChange: m
|
|
337
337
|
}
|
|
338
338
|
),
|
|
339
339
|
/* @__PURE__ */ e("div", { className: d.toggle }),
|
|
@@ -346,8 +346,8 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
346
346
|
title: s,
|
|
347
347
|
monotone: r,
|
|
348
348
|
...o
|
|
349
|
-
}) => /* @__PURE__ */
|
|
350
|
-
|
|
349
|
+
}) => /* @__PURE__ */ l(
|
|
350
|
+
I,
|
|
351
351
|
{
|
|
352
352
|
defaultViewBox: "0 0 512 512",
|
|
353
353
|
defaultClassName: "size-5",
|
|
@@ -367,15 +367,15 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
367
367
|
/* @__PURE__ */ e("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" })
|
|
368
368
|
]
|
|
369
369
|
}
|
|
370
|
-
),
|
|
370
|
+
), Qt = ({
|
|
371
371
|
className: t,
|
|
372
372
|
viewBox: a,
|
|
373
373
|
spacing: n,
|
|
374
374
|
title: s,
|
|
375
375
|
monotone: r,
|
|
376
376
|
...o
|
|
377
|
-
}) => /* @__PURE__ */
|
|
378
|
-
|
|
377
|
+
}) => /* @__PURE__ */ l(
|
|
378
|
+
I,
|
|
379
379
|
{
|
|
380
380
|
defaultViewBox: "0 0 448 512",
|
|
381
381
|
defaultClassName: "size-5",
|
|
@@ -395,15 +395,15 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
395
395
|
/* @__PURE__ */ e("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" })
|
|
396
396
|
]
|
|
397
397
|
}
|
|
398
|
-
),
|
|
398
|
+
), Zt = ({
|
|
399
399
|
className: t,
|
|
400
400
|
viewBox: a,
|
|
401
401
|
spacing: n,
|
|
402
402
|
title: s,
|
|
403
403
|
monotone: r,
|
|
404
404
|
...o
|
|
405
|
-
}) => /* @__PURE__ */
|
|
406
|
-
|
|
405
|
+
}) => /* @__PURE__ */ l(
|
|
406
|
+
I,
|
|
407
407
|
{
|
|
408
408
|
defaultViewBox: "0 0 448 512",
|
|
409
409
|
defaultClassName: "size-5",
|
|
@@ -423,15 +423,15 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
423
423
|
/* @__PURE__ */ e("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 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" })
|
|
424
424
|
]
|
|
425
425
|
}
|
|
426
|
-
),
|
|
426
|
+
), ea = ({
|
|
427
427
|
className: t,
|
|
428
428
|
viewBox: a,
|
|
429
429
|
spacing: n,
|
|
430
430
|
title: s,
|
|
431
431
|
monotone: r,
|
|
432
432
|
...o
|
|
433
|
-
}) => /* @__PURE__ */
|
|
434
|
-
|
|
433
|
+
}) => /* @__PURE__ */ l(
|
|
434
|
+
I,
|
|
435
435
|
{
|
|
436
436
|
defaultViewBox: "0 0 512 512",
|
|
437
437
|
defaultClassName: "size-5",
|
|
@@ -451,15 +451,15 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
451
451
|
/* @__PURE__ */ e("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" })
|
|
452
452
|
]
|
|
453
453
|
}
|
|
454
|
-
),
|
|
454
|
+
), ta = ({
|
|
455
455
|
className: t,
|
|
456
456
|
viewBox: a,
|
|
457
457
|
spacing: n,
|
|
458
458
|
title: s,
|
|
459
459
|
monotone: r,
|
|
460
460
|
...o
|
|
461
|
-
}) => /* @__PURE__ */
|
|
462
|
-
|
|
461
|
+
}) => /* @__PURE__ */ l(
|
|
462
|
+
I,
|
|
463
463
|
{
|
|
464
464
|
defaultViewBox: "0 0 512 512",
|
|
465
465
|
defaultClassName: "size-5",
|
|
@@ -479,15 +479,15 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
479
479
|
/* @__PURE__ */ e("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" })
|
|
480
480
|
]
|
|
481
481
|
}
|
|
482
|
-
),
|
|
482
|
+
), aa = ({
|
|
483
483
|
className: t,
|
|
484
484
|
viewBox: a,
|
|
485
485
|
spacing: n,
|
|
486
486
|
title: s,
|
|
487
487
|
monotone: r,
|
|
488
488
|
...o
|
|
489
|
-
}) => /* @__PURE__ */
|
|
490
|
-
|
|
489
|
+
}) => /* @__PURE__ */ l(
|
|
490
|
+
I,
|
|
491
491
|
{
|
|
492
492
|
defaultViewBox: "0 0 576 512",
|
|
493
493
|
defaultClassName: "size-5",
|
|
@@ -514,8 +514,8 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
514
514
|
title: s,
|
|
515
515
|
monotone: r,
|
|
516
516
|
...o
|
|
517
|
-
}) => /* @__PURE__ */
|
|
518
|
-
|
|
517
|
+
}) => /* @__PURE__ */ l(
|
|
518
|
+
I,
|
|
519
519
|
{
|
|
520
520
|
defaultViewBox: "0 0 512 512",
|
|
521
521
|
defaultClassName: "size-5",
|
|
@@ -542,15 +542,15 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
542
542
|
)
|
|
543
543
|
]
|
|
544
544
|
}
|
|
545
|
-
),
|
|
545
|
+
), na = ({
|
|
546
546
|
className: t,
|
|
547
547
|
viewBox: a,
|
|
548
548
|
spacing: n,
|
|
549
549
|
title: s,
|
|
550
550
|
monotone: r,
|
|
551
551
|
...o
|
|
552
|
-
}) => /* @__PURE__ */
|
|
553
|
-
|
|
552
|
+
}) => /* @__PURE__ */ l(
|
|
553
|
+
I,
|
|
554
554
|
{
|
|
555
555
|
defaultViewBox: "0 0 512 512",
|
|
556
556
|
defaultClassName: "size-5",
|
|
@@ -570,7 +570,7 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
570
570
|
/* @__PURE__ */ e("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" })
|
|
571
571
|
]
|
|
572
572
|
}
|
|
573
|
-
),
|
|
573
|
+
), sa = ({
|
|
574
574
|
className: t,
|
|
575
575
|
viewBox: a,
|
|
576
576
|
spacing: n,
|
|
@@ -578,7 +578,7 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
578
578
|
monotone: r,
|
|
579
579
|
...o
|
|
580
580
|
}) => /* @__PURE__ */ e(
|
|
581
|
-
|
|
581
|
+
I,
|
|
582
582
|
{
|
|
583
583
|
defaultViewBox: "0 0 448 512",
|
|
584
584
|
defaultClassName: "size-5",
|
|
@@ -590,43 +590,43 @@ const Lt = ({ className: t, ...a }) => {
|
|
|
590
590
|
children: /* @__PURE__ */ e("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" })
|
|
591
591
|
}
|
|
592
592
|
);
|
|
593
|
-
function
|
|
593
|
+
function Y(t) {
|
|
594
594
|
return it();
|
|
595
595
|
}
|
|
596
|
-
const
|
|
597
|
-
const a = (t == null ? void 0 : t.plugins) || [], n = (t == null ? void 0 : t.version) || "", s = (t == null ? void 0 : t.models) || [], r =
|
|
598
|
-
return /* @__PURE__ */
|
|
596
|
+
const ra = ({ stats: t }) => {
|
|
597
|
+
const a = (t == null ? void 0 : t.plugins) || [], n = (t == null ? void 0 : t.version) || "", s = (t == null ? void 0 : t.models) || [], r = Y(), o = Y();
|
|
598
|
+
return /* @__PURE__ */ l(w, { children: [
|
|
599
599
|
/* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e(
|
|
600
|
-
|
|
600
|
+
z,
|
|
601
601
|
{
|
|
602
|
-
header:
|
|
602
|
+
header: u.ABOUT.TITLE_CLIENT,
|
|
603
603
|
className: "prose-dark dark:prose-lighter",
|
|
604
|
-
children:
|
|
605
|
-
[
|
|
606
|
-
[
|
|
604
|
+
children: U(r, {
|
|
605
|
+
[u.ABOUT.VERSION]: "4.1.0",
|
|
606
|
+
[u.ABOUT.BUILD_TIMESTAMP]: "09/01/2024 05:59 PM EDT"
|
|
607
607
|
})
|
|
608
608
|
}
|
|
609
609
|
) }),
|
|
610
610
|
/* @__PURE__ */ e(
|
|
611
|
-
|
|
611
|
+
z,
|
|
612
612
|
{
|
|
613
|
-
header:
|
|
613
|
+
header: u.ABOUT.TITLE_SERVER,
|
|
614
614
|
className: "prose-dark dark:prose-lighter",
|
|
615
|
-
children:
|
|
616
|
-
[
|
|
617
|
-
[Z(
|
|
618
|
-
[Z(
|
|
615
|
+
children: U(o, {
|
|
616
|
+
[u.ABOUT.VERSION]: n,
|
|
617
|
+
[Z(u.ABOUT.ENGINE, s.length)]: /* @__PURE__ */ e(w, { children: s.map((i) => /* @__PURE__ */ e("div", { className: "text-right", children: i }, i)) }),
|
|
618
|
+
[Z(u.ABOUT.PLUGIN, a.length)]: /* @__PURE__ */ e(w, { children: a.map((i) => /* @__PURE__ */ e("div", { className: "text-right", children: i }, i)) })
|
|
619
619
|
})
|
|
620
620
|
}
|
|
621
621
|
)
|
|
622
622
|
] });
|
|
623
|
-
},
|
|
623
|
+
}, oa = ({
|
|
624
624
|
open: t,
|
|
625
625
|
onOpenChange: a
|
|
626
626
|
}) => {
|
|
627
|
-
const { serverStats: n } =
|
|
628
|
-
return /* @__PURE__ */ e(
|
|
629
|
-
},
|
|
627
|
+
const { serverStats: n } = H(W);
|
|
628
|
+
return /* @__PURE__ */ e(q, { open: t, onOpenChange: a, title: Be, children: /* @__PURE__ */ e(ra, { stats: n }) });
|
|
629
|
+
}, ca = (t) => Ce(t), la = (t) => {
|
|
630
630
|
if (!t || t.length === 0)
|
|
631
631
|
return Pe;
|
|
632
632
|
const a = t.filter(
|
|
@@ -637,79 +637,79 @@ const sa = ({ stats: t }) => {
|
|
|
637
637
|
).map((n) => n.message.processingTime);
|
|
638
638
|
return Ge({
|
|
639
639
|
data: a,
|
|
640
|
-
formatter:
|
|
640
|
+
formatter: ca
|
|
641
641
|
});
|
|
642
642
|
}, ia = ({
|
|
643
643
|
isAuthenticated: t,
|
|
644
644
|
stats: a
|
|
645
645
|
}) => {
|
|
646
|
-
const { state: n } =
|
|
647
|
-
return t ? /* @__PURE__ */
|
|
646
|
+
const { state: n } = H(W), s = $e - Number(n == null ? void 0 : n.usage), r = Y(), o = Y();
|
|
647
|
+
return t ? /* @__PURE__ */ l(w, { children: [
|
|
648
648
|
n && n.messages.length > 0 && /* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e(
|
|
649
|
-
|
|
649
|
+
z,
|
|
650
650
|
{
|
|
651
|
-
header:
|
|
651
|
+
header: u.CURRENT_STATISTICS.TITLE,
|
|
652
652
|
className: "prose-dark dark:prose-lighter",
|
|
653
|
-
children:
|
|
654
|
-
[
|
|
655
|
-
[
|
|
656
|
-
[
|
|
657
|
-
[
|
|
653
|
+
children: U(r, {
|
|
654
|
+
[u.CURRENT_STATISTICS.MODEL_NAME]: (n == null ? void 0 : n.model) || ze,
|
|
655
|
+
[u.CURRENT_STATISTICS.TOKENS_USED]: n == null ? void 0 : n.usage,
|
|
656
|
+
[u.CURRENT_STATISTICS.REMAINING_TOKENS]: Ve.format(s),
|
|
657
|
+
[u.CURRENT_STATISTICS.PROCESSING_TIME]: la(n == null ? void 0 : n.messages)
|
|
658
658
|
})
|
|
659
659
|
}
|
|
660
660
|
) }),
|
|
661
661
|
/* @__PURE__ */ e(
|
|
662
|
-
|
|
662
|
+
z,
|
|
663
663
|
{
|
|
664
|
-
header:
|
|
664
|
+
header: u.MAIN_STATISTICS.TITLE,
|
|
665
665
|
className: "prose-dark dark:prose-lighter",
|
|
666
|
-
children:
|
|
667
|
-
[Z(
|
|
668
|
-
[
|
|
666
|
+
children: U(o, {
|
|
667
|
+
[Z(u.MAIN_STATISTICS.TOTAL, a.totalChats)]: a.totalChats,
|
|
668
|
+
[u.MAIN_STATISTICS.PROCESSING_TIME]: Ce(
|
|
669
669
|
a.averageProcessingTimes
|
|
670
670
|
)
|
|
671
671
|
})
|
|
672
672
|
}
|
|
673
673
|
)
|
|
674
674
|
] }) : null;
|
|
675
|
-
},
|
|
675
|
+
}, da = ({
|
|
676
676
|
open: t,
|
|
677
677
|
onOpenChange: a
|
|
678
678
|
}) => {
|
|
679
|
-
const [n, s] =
|
|
679
|
+
const [n, s] = T({
|
|
680
680
|
averageProcessingTimes: 0,
|
|
681
681
|
totalChats: 0
|
|
682
|
-
}), { isAuthenticated: r, getAccessToken: o, user: i } =
|
|
683
|
-
return
|
|
682
|
+
}), { isAuthenticated: r, getAccessToken: o, user: i } = K();
|
|
683
|
+
return O(() => {
|
|
684
684
|
!t || !i || (async () => {
|
|
685
685
|
try {
|
|
686
|
-
const
|
|
686
|
+
const h = await ne({
|
|
687
687
|
accessToken: await o(),
|
|
688
688
|
type: se.GET_CHATS_STATS,
|
|
689
689
|
params: {
|
|
690
690
|
userId: i.username
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
|
-
|
|
693
|
+
h.status === 200 && s(h.data);
|
|
694
694
|
} catch {
|
|
695
695
|
}
|
|
696
696
|
})();
|
|
697
|
-
}, [t, o, i]), /* @__PURE__ */ e(
|
|
698
|
-
},
|
|
697
|
+
}, [t, o, i]), /* @__PURE__ */ e(q, { open: t, onOpenChange: a, title: Ne, children: /* @__PURE__ */ e(ia, { isAuthenticated: r, stats: n }) });
|
|
698
|
+
}, ke = ({
|
|
699
699
|
showConfirmation: t,
|
|
700
700
|
setShowConfirmation: a,
|
|
701
701
|
action: n,
|
|
702
702
|
children: s,
|
|
703
703
|
customStrings: r
|
|
704
704
|
}) => /* @__PURE__ */ e(
|
|
705
|
-
|
|
705
|
+
q,
|
|
706
706
|
{
|
|
707
707
|
kind: "messagebox",
|
|
708
708
|
open: t,
|
|
709
709
|
onOpenChange: a,
|
|
710
710
|
title: r.title,
|
|
711
|
-
footer: /* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */ e(
|
|
711
|
+
footer: /* @__PURE__ */ l(G, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
712
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
|
|
713
713
|
ee,
|
|
714
714
|
{
|
|
715
715
|
mode: "dark",
|
|
@@ -721,7 +721,7 @@ const sa = ({ stats: t }) => {
|
|
|
721
721
|
children: r.cancelAction
|
|
722
722
|
}
|
|
723
723
|
) }),
|
|
724
|
-
/* @__PURE__ */ e(
|
|
724
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
|
|
725
725
|
ee,
|
|
726
726
|
{
|
|
727
727
|
mode: "dark",
|
|
@@ -737,20 +737,20 @@ const sa = ({ stats: t }) => {
|
|
|
737
737
|
children: s
|
|
738
738
|
}
|
|
739
739
|
);
|
|
740
|
-
var
|
|
741
|
-
return
|
|
742
|
-
},
|
|
743
|
-
var n =
|
|
744
|
-
return
|
|
745
|
-
var o = !0, i = window.matchMedia(t),
|
|
740
|
+
var ma = typeof window < "u", ua = function(t, a) {
|
|
741
|
+
return ma ? window.matchMedia(t).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
|
|
742
|
+
}, ha = function(t, a) {
|
|
743
|
+
var n = T(ua(t)), s = n[0], r = n[1];
|
|
744
|
+
return O(function() {
|
|
745
|
+
var o = !0, i = window.matchMedia(t), h = function() {
|
|
746
746
|
o && r(!!i.matches);
|
|
747
747
|
};
|
|
748
|
-
return i.addEventListener("change",
|
|
749
|
-
o = !1, i.removeEventListener("change",
|
|
748
|
+
return i.addEventListener("change", h), r(i.matches), function() {
|
|
749
|
+
o = !1, i.removeEventListener("change", h);
|
|
750
750
|
};
|
|
751
751
|
}, [t]), s;
|
|
752
752
|
};
|
|
753
|
-
const
|
|
753
|
+
const pa = async (t, a, n, s) => {
|
|
754
754
|
try {
|
|
755
755
|
const r = await ne({
|
|
756
756
|
accessToken: s,
|
|
@@ -775,83 +775,83 @@ const ha = async (t, a, n, s) => {
|
|
|
775
775
|
}, fe = (t) => {
|
|
776
776
|
const a = t[0];
|
|
777
777
|
return Ke(a == null ? void 0 : a.content, 100);
|
|
778
|
-
},
|
|
778
|
+
}, fa = ({
|
|
779
779
|
filteredHistory: t,
|
|
780
780
|
setFilteredHistory: a,
|
|
781
781
|
dispatch: n,
|
|
782
782
|
onOpenChange: s
|
|
783
783
|
}) => {
|
|
784
|
-
var
|
|
785
|
-
const { user: r, getAccessToken: o } =
|
|
784
|
+
var v;
|
|
785
|
+
const { user: r, getAccessToken: o } = K(), i = j({
|
|
786
786
|
id: 0,
|
|
787
787
|
timestamp: "",
|
|
788
788
|
message: ""
|
|
789
|
-
}), [
|
|
789
|
+
}), [h, p] = T(!1), d = ha("(min-width: 480px)"), { state: m, dispatch: g } = H(Ee), [, E] = ae({
|
|
790
790
|
key: te + Ue,
|
|
791
|
-
initialValue:
|
|
792
|
-
}),
|
|
793
|
-
(
|
|
794
|
-
switch (
|
|
791
|
+
initialValue: m.sortDirection
|
|
792
|
+
}), S = t.data.sort(
|
|
793
|
+
(c, C) => {
|
|
794
|
+
switch (m.sortedCell) {
|
|
795
795
|
case "timestamp":
|
|
796
|
-
if (
|
|
797
|
-
return new Date(m
|
|
798
|
-
if (
|
|
799
|
-
return new Date(
|
|
796
|
+
if (m.sortDirection === A.ASC)
|
|
797
|
+
return new Date(c[m.sortedCell]).getTime() - new Date(C[m.sortedCell]).getTime();
|
|
798
|
+
if (m.sortDirection === A.DESC)
|
|
799
|
+
return new Date(C[m.sortedCell]).getTime() - new Date(c[m.sortedCell]).getTime();
|
|
800
800
|
break;
|
|
801
801
|
default:
|
|
802
802
|
return 0;
|
|
803
803
|
}
|
|
804
804
|
return 0;
|
|
805
805
|
}
|
|
806
|
-
),
|
|
807
|
-
switch (
|
|
806
|
+
), f = (c) => {
|
|
807
|
+
switch (m.sortDirection) {
|
|
808
808
|
case !1:
|
|
809
|
-
|
|
809
|
+
E(A.ASC), g({
|
|
810
810
|
type: re,
|
|
811
811
|
payload: {
|
|
812
|
-
sortedCell:
|
|
813
|
-
sortDirection:
|
|
812
|
+
sortedCell: c,
|
|
813
|
+
sortDirection: A.ASC
|
|
814
814
|
}
|
|
815
815
|
});
|
|
816
816
|
break;
|
|
817
|
-
case
|
|
818
|
-
|
|
817
|
+
case A.ASC:
|
|
818
|
+
E(A.DESC), g({
|
|
819
819
|
type: re,
|
|
820
820
|
payload: {
|
|
821
|
-
sortedCell:
|
|
822
|
-
sortDirection:
|
|
821
|
+
sortedCell: c,
|
|
822
|
+
sortDirection: A.DESC
|
|
823
823
|
}
|
|
824
824
|
});
|
|
825
825
|
break;
|
|
826
826
|
default:
|
|
827
|
-
|
|
827
|
+
E(A.ASC), g({
|
|
828
828
|
type: re,
|
|
829
829
|
payload: {
|
|
830
|
-
sortedCell:
|
|
831
|
-
sortDirection:
|
|
830
|
+
sortedCell: c,
|
|
831
|
+
sortDirection: A.ASC
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
break;
|
|
835
835
|
}
|
|
836
836
|
};
|
|
837
|
-
return /* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
|
|
837
|
+
return /* @__PURE__ */ l(w, { children: [
|
|
838
|
+
/* @__PURE__ */ l(
|
|
839
|
+
ke,
|
|
840
840
|
{
|
|
841
|
-
showConfirmation:
|
|
841
|
+
showConfirmation: h,
|
|
842
842
|
setShowConfirmation: p,
|
|
843
843
|
action: async () => {
|
|
844
|
-
const
|
|
844
|
+
const c = i.current;
|
|
845
845
|
try {
|
|
846
|
-
const
|
|
846
|
+
const C = await ne({
|
|
847
847
|
accessToken: await o(),
|
|
848
848
|
type: se.DELETE_CHAT,
|
|
849
849
|
params: {
|
|
850
850
|
userId: (r == null ? void 0 : r.username) || "",
|
|
851
|
-
id:
|
|
851
|
+
id: c.id
|
|
852
852
|
}
|
|
853
853
|
});
|
|
854
|
-
|
|
854
|
+
C.status === 200 && a({ data: C.data });
|
|
855
855
|
} catch {
|
|
856
856
|
}
|
|
857
857
|
},
|
|
@@ -862,33 +862,33 @@ const ha = async (t, a, n, s) => {
|
|
|
862
862
|
},
|
|
863
863
|
children: [
|
|
864
864
|
/* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
865
|
-
/* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ l("ul", { className: "m-0", children: [
|
|
866
|
+
/* @__PURE__ */ l("li", { children: [
|
|
867
867
|
"Timestamp:",
|
|
868
868
|
" ",
|
|
869
869
|
/* @__PURE__ */ e("span", { className: "text-lg", children: i.current && i.current.timestamp })
|
|
870
870
|
] }),
|
|
871
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ l("li", { children: [
|
|
872
872
|
"First message:",
|
|
873
873
|
" ",
|
|
874
|
-
/* @__PURE__ */ e("span", { className: "text-lg", children: (
|
|
874
|
+
/* @__PURE__ */ e("span", { className: "text-lg", children: (v = i.current) == null ? void 0 : v.message })
|
|
875
875
|
] })
|
|
876
876
|
] })
|
|
877
877
|
]
|
|
878
878
|
}
|
|
879
879
|
),
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
/* @__PURE__ */ e(
|
|
880
|
+
/* @__PURE__ */ l(ut, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
|
|
881
|
+
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ l(oe, { children: [
|
|
882
882
|
d && /* @__PURE__ */ e(M, { className: "sr-only", children: "Row" }),
|
|
883
883
|
/* @__PURE__ */ e(
|
|
884
|
-
|
|
884
|
+
pt,
|
|
885
885
|
{
|
|
886
886
|
cellId: "timestamp",
|
|
887
887
|
align: "left",
|
|
888
|
-
sortDirection:
|
|
889
|
-
sortedCell:
|
|
888
|
+
sortDirection: m.sortDirection,
|
|
889
|
+
sortedCell: m.sortedCell,
|
|
890
890
|
onClick: () => {
|
|
891
|
-
|
|
891
|
+
f("timestamp");
|
|
892
892
|
},
|
|
893
893
|
children: "Date"
|
|
894
894
|
}
|
|
@@ -896,59 +896,59 @@ const ha = async (t, a, n, s) => {
|
|
|
896
896
|
/* @__PURE__ */ e(M, { children: "First message" }),
|
|
897
897
|
/* @__PURE__ */ e(M, { className: "text-right", children: "Actions" })
|
|
898
898
|
] }) }),
|
|
899
|
-
/* @__PURE__ */ e(
|
|
900
|
-
var
|
|
901
|
-
return ((
|
|
902
|
-
d && /* @__PURE__ */ e(M, { children:
|
|
899
|
+
/* @__PURE__ */ e(ft, { children: S.map((c, C) => {
|
|
900
|
+
var N;
|
|
901
|
+
return ((N = c == null ? void 0 : c.messages) == null ? void 0 : N.length) > 0 ? /* @__PURE__ */ l(oe, { children: [
|
|
902
|
+
d && /* @__PURE__ */ e(M, { children: C + 1 }),
|
|
903
903
|
/* @__PURE__ */ e(
|
|
904
904
|
M,
|
|
905
905
|
{
|
|
906
906
|
component: "th",
|
|
907
907
|
scope: "row",
|
|
908
908
|
className: "font-medium text-gray-400 sm:whitespace-nowrap",
|
|
909
|
-
children:
|
|
909
|
+
children: c.timestamp
|
|
910
910
|
}
|
|
911
911
|
),
|
|
912
|
-
/* @__PURE__ */ e(M, { className: "max-w-[100px] text-white sm:max-w-full", children: fe(
|
|
913
|
-
/* @__PURE__ */ e(M, { children: /* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ e(M, { className: "max-w-[100px] text-white sm:max-w-full", children: fe(c.messages) }),
|
|
913
|
+
/* @__PURE__ */ e(M, { children: /* @__PURE__ */ l("div", { className: "flex justify-end gap-2", children: [
|
|
914
914
|
/* @__PURE__ */ e(
|
|
915
|
-
|
|
915
|
+
B,
|
|
916
916
|
{
|
|
917
917
|
focusMode: "alt-system",
|
|
918
918
|
noBorder: !0,
|
|
919
919
|
label: "Restore chat",
|
|
920
920
|
onClick: async () => {
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
|
|
921
|
+
const y = await o();
|
|
922
|
+
pa(
|
|
923
|
+
c,
|
|
924
924
|
n,
|
|
925
925
|
s,
|
|
926
|
-
|
|
926
|
+
y
|
|
927
927
|
);
|
|
928
928
|
},
|
|
929
|
-
children: /* @__PURE__ */ e(
|
|
929
|
+
children: /* @__PURE__ */ e(na, { className: "h-3 w-3", monotone: !0 })
|
|
930
930
|
}
|
|
931
931
|
),
|
|
932
932
|
/* @__PURE__ */ e(
|
|
933
|
-
|
|
933
|
+
B,
|
|
934
934
|
{
|
|
935
935
|
focusMode: "alt-system",
|
|
936
936
|
noBorder: !0,
|
|
937
937
|
label: "Delete chat",
|
|
938
938
|
onClick: () => {
|
|
939
939
|
i.current = {
|
|
940
|
-
id:
|
|
941
|
-
timestamp:
|
|
942
|
-
message: fe(
|
|
943
|
-
}, p(!
|
|
940
|
+
id: c.id,
|
|
941
|
+
timestamp: c.timestamp,
|
|
942
|
+
message: fe(c.messages)
|
|
943
|
+
}, p(!h);
|
|
944
944
|
},
|
|
945
|
-
children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(
|
|
945
|
+
children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Zt, { className: "h-3 w-3", monotone: !0 }) })
|
|
946
946
|
}
|
|
947
947
|
)
|
|
948
948
|
] }) })
|
|
949
|
-
] }, `${
|
|
949
|
+
] }, `${u.HISTORY.TITLE}-${c.id}-${C}`) : null;
|
|
950
950
|
}) }),
|
|
951
|
-
/* @__PURE__ */ e(
|
|
951
|
+
/* @__PURE__ */ e(gt, { children: /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(M, { colSpan: 4, children: /* @__PURE__ */ e("div", { children: Z(
|
|
952
952
|
`${t.data.length} chat`,
|
|
953
953
|
t.data.length
|
|
954
954
|
) }) }) }) })
|
|
@@ -962,38 +962,38 @@ function ge(t, a) {
|
|
|
962
962
|
)
|
|
963
963
|
) : t;
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const ga = ({
|
|
966
966
|
onOpenChange: t,
|
|
967
967
|
historyData: a
|
|
968
968
|
}) => {
|
|
969
|
-
const { isAuthenticated: n } =
|
|
969
|
+
const { isAuthenticated: n } = K(), s = j(null), { dispatch: r } = H(W), { state: o, dispatch: i } = H(Ee), [, h] = ae({
|
|
970
970
|
key: te + We,
|
|
971
971
|
initialValue: o.searchString
|
|
972
|
-
}), p =
|
|
972
|
+
}), p = dt(() => a, [a]), [d, m] = T({
|
|
973
973
|
data: p
|
|
974
|
-
}),
|
|
975
|
-
const
|
|
976
|
-
|
|
977
|
-
data:
|
|
978
|
-
}),
|
|
979
|
-
type:
|
|
980
|
-
payload: { searchString:
|
|
974
|
+
}), g = (f) => {
|
|
975
|
+
const b = ge(p, f);
|
|
976
|
+
m({
|
|
977
|
+
data: b
|
|
978
|
+
}), h(f), i({
|
|
979
|
+
type: qe,
|
|
980
|
+
payload: { searchString: f }
|
|
981
981
|
});
|
|
982
|
-
},
|
|
983
|
-
|
|
984
|
-
},
|
|
985
|
-
|
|
982
|
+
}, E = (f) => {
|
|
983
|
+
g(f.target.value);
|
|
984
|
+
}, S = async (f) => {
|
|
985
|
+
f.preventDefault();
|
|
986
986
|
};
|
|
987
|
-
return
|
|
988
|
-
const
|
|
987
|
+
return O(() => {
|
|
988
|
+
const f = ge(
|
|
989
989
|
a,
|
|
990
990
|
o.searchString
|
|
991
991
|
);
|
|
992
|
-
|
|
993
|
-
data:
|
|
992
|
+
m({
|
|
993
|
+
data: f
|
|
994
994
|
});
|
|
995
|
-
}, [a, o.searchString]), n ? d && d.data && /* @__PURE__ */
|
|
996
|
-
/* @__PURE__ */ e("form", { autoComplete: "off", onSubmit:
|
|
995
|
+
}, [a, o.searchString]), n ? d && d.data && /* @__PURE__ */ l(w, { children: [
|
|
996
|
+
/* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: S, children: /* @__PURE__ */ e(
|
|
997
997
|
Xe,
|
|
998
998
|
{
|
|
999
999
|
ref: s,
|
|
@@ -1001,7 +1001,7 @@ const fa = ({
|
|
|
1001
1001
|
focusMode: "light",
|
|
1002
1002
|
name: "Search",
|
|
1003
1003
|
label: "Search",
|
|
1004
|
-
onChange:
|
|
1004
|
+
onChange: E,
|
|
1005
1005
|
spacing: { t: 2, b: 2 },
|
|
1006
1006
|
...o.searchString && {
|
|
1007
1007
|
rightElement: /* @__PURE__ */ e(
|
|
@@ -1012,8 +1012,8 @@ const fa = ({
|
|
|
1012
1012
|
noBorder: !0,
|
|
1013
1013
|
size: "small",
|
|
1014
1014
|
onClick: () => {
|
|
1015
|
-
var
|
|
1016
|
-
|
|
1015
|
+
var f;
|
|
1016
|
+
g(""), (f = s.current) != null && f.value && (s.current.value = "", s.current.focus());
|
|
1017
1017
|
},
|
|
1018
1018
|
children: "Reset"
|
|
1019
1019
|
}
|
|
@@ -1022,30 +1022,30 @@ const fa = ({
|
|
|
1022
1022
|
}
|
|
1023
1023
|
) }),
|
|
1024
1024
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ e(
|
|
1025
|
-
|
|
1025
|
+
fa,
|
|
1026
1026
|
{
|
|
1027
1027
|
filteredHistory: d,
|
|
1028
|
-
setFilteredHistory:
|
|
1028
|
+
setFilteredHistory: m,
|
|
1029
1029
|
dispatch: r,
|
|
1030
1030
|
onOpenChange: t
|
|
1031
1031
|
}
|
|
1032
1032
|
) })
|
|
1033
1033
|
] }) : null;
|
|
1034
|
-
},
|
|
1034
|
+
}, Ca = ({
|
|
1035
1035
|
open: t,
|
|
1036
1036
|
onOpenChange: a,
|
|
1037
1037
|
historyData: n
|
|
1038
|
-
}) => /* @__PURE__ */ e(
|
|
1039
|
-
const { isAuthenticated: t, user: a, registeringForPasskey: n } =
|
|
1038
|
+
}) => /* @__PURE__ */ e(q, { open: t, onOpenChange: a, title: Je, children: /* @__PURE__ */ e(ga, { onOpenChange: a, historyData: n }) }), Na = () => {
|
|
1039
|
+
const { isAuthenticated: t, user: a, registeringForPasskey: n, authenticationType: s } = K(), [r, o] = ae({
|
|
1040
1040
|
key: te + Qe,
|
|
1041
1041
|
initialValue: !1
|
|
1042
|
-
}), [,
|
|
1042
|
+
}), [, i, h] = ae({
|
|
1043
1043
|
key: te + Ze,
|
|
1044
1044
|
initialValue: { latitude: 0, longitude: 0, accuracy: 0 }
|
|
1045
|
-
}), [
|
|
1046
|
-
|
|
1047
|
-
},
|
|
1048
|
-
|
|
1045
|
+
}), [p, d] = T(!0), m = Y(), { state: g, dispatch: E } = H(W), S = (a == null ? void 0 : a.username) || "", f = (c) => {
|
|
1046
|
+
o(c);
|
|
1047
|
+
}, b = async () => {
|
|
1048
|
+
d(!1), h(), E({
|
|
1049
1049
|
type: me,
|
|
1050
1050
|
payload: {
|
|
1051
1051
|
location: {
|
|
@@ -1055,148 +1055,149 @@ const fa = ({
|
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1058
|
+
const c = await at();
|
|
1059
|
+
i(c), E({
|
|
1060
1060
|
type: me,
|
|
1061
1061
|
payload: {
|
|
1062
|
-
location:
|
|
1062
|
+
location: c
|
|
1063
1063
|
}
|
|
1064
1064
|
});
|
|
1065
1065
|
};
|
|
1066
|
-
|
|
1067
|
-
let
|
|
1068
|
-
return
|
|
1069
|
-
|
|
1066
|
+
O(() => {
|
|
1067
|
+
let c;
|
|
1068
|
+
return p || (c = window.setTimeout(() => {
|
|
1069
|
+
d(!0);
|
|
1070
1070
|
}, 3e3)), () => {
|
|
1071
|
-
clearTimeout(
|
|
1071
|
+
clearTimeout(c);
|
|
1072
1072
|
};
|
|
1073
|
-
}, [
|
|
1074
|
-
const
|
|
1075
|
-
const { city:
|
|
1076
|
-
if (
|
|
1077
|
-
return /* @__PURE__ */ e(
|
|
1078
|
-
/* @__PURE__ */ e(
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
|
|
1073
|
+
}, [p]);
|
|
1074
|
+
const v = (c) => {
|
|
1075
|
+
const { city: C, state: N, country: y, displayName: L } = c || {};
|
|
1076
|
+
if (C && y && N || L)
|
|
1077
|
+
return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(G, { alignVertical: "center", columnGap: 4, children: [
|
|
1078
|
+
/* @__PURE__ */ e(x, { children: C && N && y ? /* @__PURE__ */ l("div", { className: "mt-2", children: [
|
|
1079
|
+
/* @__PURE__ */ l("div", { className: "text-right", children: [
|
|
1080
|
+
C,
|
|
1081
1081
|
", ",
|
|
1082
1082
|
N
|
|
1083
1083
|
] }),
|
|
1084
|
-
/* @__PURE__ */ e("div", { className: "text-right", children:
|
|
1085
|
-
] }) :
|
|
1086
|
-
/* @__PURE__ */ e(
|
|
1087
|
-
|
|
1084
|
+
/* @__PURE__ */ e("div", { className: "text-right", children: y })
|
|
1085
|
+
] }) : L ? /* @__PURE__ */ e("div", { className: "mt-2 text-right", children: L }) : null }),
|
|
1086
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
|
|
1087
|
+
B,
|
|
1088
1088
|
{
|
|
1089
|
-
disabled: !
|
|
1089
|
+
disabled: !p,
|
|
1090
1090
|
size: "small",
|
|
1091
1091
|
className: "mt-2",
|
|
1092
|
-
onClick:
|
|
1092
|
+
onClick: b,
|
|
1093
1093
|
children: /* @__PURE__ */ e(pe, { className: "size-3", monotone: !0 })
|
|
1094
1094
|
}
|
|
1095
1095
|
) })
|
|
1096
1096
|
] }) });
|
|
1097
|
-
const
|
|
1098
|
-
return /* @__PURE__ */ e(
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */ e("div", { children:
|
|
1101
|
-
/* @__PURE__ */ e("div", { children:
|
|
1097
|
+
const V = nt(c == null ? void 0 : c.latitude), D = st(c == null ? void 0 : c.longitude);
|
|
1098
|
+
return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(G, { alignVertical: "center", columnGap: 4, children: [
|
|
1099
|
+
/* @__PURE__ */ l(x, { children: [
|
|
1100
|
+
/* @__PURE__ */ e("div", { children: V }),
|
|
1101
|
+
/* @__PURE__ */ e("div", { children: D })
|
|
1102
1102
|
] }),
|
|
1103
|
-
/* @__PURE__ */ e(
|
|
1103
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(B, { size: "small", onClick: b, children: /* @__PURE__ */ e(pe, { className: "size-3", monotone: !0 }) }) })
|
|
1104
1104
|
] }) });
|
|
1105
1105
|
};
|
|
1106
|
-
return t &&
|
|
1106
|
+
return t && S ? /* @__PURE__ */ l(w, { children: [
|
|
1107
1107
|
/* @__PURE__ */ e(
|
|
1108
|
-
|
|
1108
|
+
z,
|
|
1109
1109
|
{
|
|
1110
|
-
header:
|
|
1110
|
+
header: u.PREFERENCES.TITLE,
|
|
1111
1111
|
className: "prose-dark dark:prose-lighter",
|
|
1112
|
-
children:
|
|
1113
|
-
[
|
|
1114
|
-
[
|
|
1115
|
-
|
|
1112
|
+
children: U(m, {
|
|
1113
|
+
[u.PREFERENCES.NAME]: S,
|
|
1114
|
+
[u.PREFERENCES.EMAIL]: (a == null ? void 0 : a.email) || "",
|
|
1115
|
+
[u.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ e(
|
|
1116
|
+
qt,
|
|
1116
1117
|
{
|
|
1117
1118
|
noBorder: !0,
|
|
1118
1119
|
labelHidden: !0,
|
|
1119
|
-
label:
|
|
1120
|
-
name:
|
|
1121
|
-
onChange:
|
|
1122
|
-
checked:
|
|
1120
|
+
label: u.PREFERENCES.ENGINE_DETAILS,
|
|
1121
|
+
name: u.PREFERENCES.ENGINE_DETAILS,
|
|
1122
|
+
onChange: f,
|
|
1123
|
+
checked: r
|
|
1123
1124
|
}
|
|
1124
1125
|
),
|
|
1125
|
-
[
|
|
1126
|
+
[u.PREFERENCES.LOCATION]: v(g == null ? void 0 : g.location)
|
|
1126
1127
|
})
|
|
1127
1128
|
}
|
|
1128
1129
|
),
|
|
1129
|
-
/* @__PURE__ */ e(
|
|
1130
|
-
|
|
1130
|
+
s !== et.PASSKEY && /* @__PURE__ */ e(
|
|
1131
|
+
z,
|
|
1131
1132
|
{
|
|
1132
1133
|
spacing: { t: 4 },
|
|
1133
1134
|
className: "prose-dark dark:prose-lighter",
|
|
1134
|
-
header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */
|
|
1135
|
-
/* @__PURE__ */ e(
|
|
1136
|
-
/* @__PURE__ */ e(
|
|
1135
|
+
header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ l(G, { columnGap: 3, alignVertical: "center", children: [
|
|
1136
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(tt, { className: "size-8 text-center" }) }),
|
|
1137
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e("div", { children: u.PREFERENCES.PASSKEY_TITLE }) })
|
|
1137
1138
|
] }) }),
|
|
1138
|
-
children: /* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */ e(
|
|
1140
|
-
/* @__PURE__ */ e(
|
|
1139
|
+
children: /* @__PURE__ */ l(G, { columnGap: 3, alignVertical: "center", children: [
|
|
1140
|
+
/* @__PURE__ */ e(x, { children: u.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
1141
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(ee, { spacing: { t: 2 }, onClick: n, children: u.PREFERENCES.PASSKEY_BUTTON }) })
|
|
1141
1142
|
] })
|
|
1142
1143
|
}
|
|
1143
1144
|
)
|
|
1144
1145
|
] }) : null;
|
|
1145
|
-
},
|
|
1146
|
+
}, Ta = ({
|
|
1146
1147
|
open: t,
|
|
1147
1148
|
onOpenChange: a
|
|
1148
|
-
}) => /* @__PURE__ */ e(
|
|
1149
|
-
const { state: t } =
|
|
1149
|
+
}) => /* @__PURE__ */ e(q, { open: t, onOpenChange: a, title: rt, children: /* @__PURE__ */ e(Na, {}) }), ka = () => {
|
|
1150
|
+
const { state: t } = H(W), [a, n] = T(!1), [s, r] = T(!1), [o, i] = T(!1), [h, p] = T(!1), [d, m] = T([]), [g, E] = T(!1), [S, f] = T({
|
|
1150
1151
|
done: !1,
|
|
1151
1152
|
progress: !1,
|
|
1152
1153
|
timestamp: Date.now()
|
|
1153
|
-
}), { logout:
|
|
1154
|
+
}), { logout: b, getAccessToken: v, user: c } = K(), C = () => {
|
|
1154
1155
|
n(!a);
|
|
1155
|
-
},
|
|
1156
|
+
}, N = () => {
|
|
1156
1157
|
r(!s);
|
|
1157
|
-
},
|
|
1158
|
+
}, y = () => {
|
|
1158
1159
|
i(!o);
|
|
1159
|
-
},
|
|
1160
|
-
p(!
|
|
1161
|
-
},
|
|
1162
|
-
const
|
|
1163
|
-
if (
|
|
1164
|
-
|
|
1160
|
+
}, L = () => {
|
|
1161
|
+
p(!h);
|
|
1162
|
+
}, V = async (R) => {
|
|
1163
|
+
const J = Date.now();
|
|
1164
|
+
if (R && !(!c || !t || S.progress || S.done === !0 && J - S.timestamp < 5e3)) {
|
|
1165
|
+
f({
|
|
1165
1166
|
done: !0,
|
|
1166
1167
|
progress: !0,
|
|
1167
|
-
timestamp:
|
|
1168
|
+
timestamp: J
|
|
1168
1169
|
});
|
|
1169
1170
|
try {
|
|
1170
|
-
const
|
|
1171
|
-
accessToken: await
|
|
1171
|
+
const P = await ne({
|
|
1172
|
+
accessToken: await v(),
|
|
1172
1173
|
type: se.GET_CHATS,
|
|
1173
1174
|
params: {
|
|
1174
|
-
userId:
|
|
1175
|
+
userId: c.username
|
|
1175
1176
|
}
|
|
1176
1177
|
});
|
|
1177
|
-
|
|
1178
|
+
P.status === 200 && (m(P.data), f({
|
|
1178
1179
|
done: !0,
|
|
1179
1180
|
progress: !1,
|
|
1180
1181
|
timestamp: Date.now()
|
|
1181
1182
|
}));
|
|
1182
1183
|
} catch {
|
|
1183
|
-
|
|
1184
|
+
f({
|
|
1184
1185
|
done: !0,
|
|
1185
1186
|
progress: !1,
|
|
1186
1187
|
timestamp: Date.now()
|
|
1187
1188
|
});
|
|
1188
1189
|
}
|
|
1189
1190
|
}
|
|
1190
|
-
},
|
|
1191
|
-
|
|
1191
|
+
}, D = () => {
|
|
1192
|
+
E(!g);
|
|
1192
1193
|
};
|
|
1193
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ l(w, { children: [
|
|
1194
1195
|
/* @__PURE__ */ e(
|
|
1195
|
-
|
|
1196
|
+
ke,
|
|
1196
1197
|
{
|
|
1197
|
-
showConfirmation:
|
|
1198
|
-
setShowConfirmation:
|
|
1199
|
-
action:
|
|
1198
|
+
showConfirmation: g,
|
|
1199
|
+
setShowConfirmation: E,
|
|
1200
|
+
action: b,
|
|
1200
1201
|
customStrings: {
|
|
1201
1202
|
confirmAction: ue,
|
|
1202
1203
|
cancelAction: "Cancel",
|
|
@@ -1205,65 +1206,65 @@ const fa = ({
|
|
|
1205
1206
|
children: /* @__PURE__ */ e("p", { children: "Are you sure you want to log out?" })
|
|
1206
1207
|
}
|
|
1207
1208
|
),
|
|
1208
|
-
/* @__PURE__ */ e(
|
|
1209
|
-
/* @__PURE__ */ e(
|
|
1209
|
+
/* @__PURE__ */ e(Ta, { open: a, onOpenChange: n }),
|
|
1210
|
+
/* @__PURE__ */ e(da, { open: s, onOpenChange: r }),
|
|
1210
1211
|
/* @__PURE__ */ e(
|
|
1211
|
-
|
|
1212
|
+
Ca,
|
|
1212
1213
|
{
|
|
1213
1214
|
open: o,
|
|
1214
1215
|
onOpenChange: i,
|
|
1215
1216
|
historyData: d
|
|
1216
1217
|
}
|
|
1217
1218
|
),
|
|
1218
|
-
/* @__PURE__ */ e(
|
|
1219
|
-
/* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ e(oa, { open: h, onOpenChange: p }),
|
|
1220
|
+
/* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ l(
|
|
1220
1221
|
xe,
|
|
1221
1222
|
{
|
|
1222
1223
|
mode: "dark",
|
|
1223
1224
|
focusMode: "light",
|
|
1224
|
-
trigger: /* @__PURE__ */ e(
|
|
1225
|
+
trigger: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(sa, {}) }),
|
|
1225
1226
|
defaultPlacement: "bottom-end",
|
|
1226
|
-
onOpenChange:
|
|
1227
|
+
onOpenChange: V,
|
|
1227
1228
|
children: [
|
|
1228
1229
|
/* @__PURE__ */ e(
|
|
1229
|
-
|
|
1230
|
+
_,
|
|
1230
1231
|
{
|
|
1231
1232
|
label: "Profile",
|
|
1232
|
-
onClick:
|
|
1233
|
-
icon: /* @__PURE__ */ e(
|
|
1233
|
+
onClick: C,
|
|
1234
|
+
icon: /* @__PURE__ */ e(aa, {})
|
|
1234
1235
|
}
|
|
1235
1236
|
),
|
|
1236
1237
|
/* @__PURE__ */ e(
|
|
1237
|
-
|
|
1238
|
+
_,
|
|
1238
1239
|
{
|
|
1239
1240
|
label: Ne,
|
|
1240
|
-
onClick:
|
|
1241
|
-
icon: /* @__PURE__ */ e(
|
|
1241
|
+
onClick: N,
|
|
1242
|
+
icon: /* @__PURE__ */ e(Qt, {})
|
|
1242
1243
|
}
|
|
1243
1244
|
),
|
|
1244
1245
|
/* @__PURE__ */ e(
|
|
1245
|
-
|
|
1246
|
+
_,
|
|
1246
1247
|
{
|
|
1247
1248
|
label: "History",
|
|
1248
|
-
onClick:
|
|
1249
|
-
icon: /* @__PURE__ */ e(
|
|
1249
|
+
onClick: y,
|
|
1250
|
+
icon: /* @__PURE__ */ e(ea, {})
|
|
1250
1251
|
}
|
|
1251
1252
|
),
|
|
1252
1253
|
/* @__PURE__ */ e(
|
|
1253
|
-
|
|
1254
|
+
_,
|
|
1254
1255
|
{
|
|
1255
1256
|
label: "About",
|
|
1256
|
-
onClick:
|
|
1257
|
-
icon: /* @__PURE__ */ e(
|
|
1257
|
+
onClick: L,
|
|
1258
|
+
icon: /* @__PURE__ */ e(ta, {})
|
|
1258
1259
|
}
|
|
1259
1260
|
),
|
|
1260
|
-
t && t.id && !t.isComponent && /* @__PURE__ */
|
|
1261
|
-
/* @__PURE__ */ e(
|
|
1261
|
+
t && t.id && !t.isComponent && /* @__PURE__ */ l(w, { children: [
|
|
1262
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
1262
1263
|
/* @__PURE__ */ e(
|
|
1263
|
-
|
|
1264
|
+
_,
|
|
1264
1265
|
{
|
|
1265
1266
|
label: "Log out",
|
|
1266
|
-
onClick:
|
|
1267
|
+
onClick: D,
|
|
1267
1268
|
icon: /* @__PURE__ */ e("div", { className: "text-red-700", children: /* @__PURE__ */ e(Jt, { monotone: !0 }) })
|
|
1268
1269
|
}
|
|
1269
1270
|
)
|
|
@@ -1274,5 +1275,5 @@ const fa = ({
|
|
|
1274
1275
|
] });
|
|
1275
1276
|
};
|
|
1276
1277
|
export {
|
|
1277
|
-
|
|
1278
|
+
ka as default
|
|
1278
1279
|
};
|