@opencx/widget-react 4.0.46 → 4.0.48
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/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1005 -850
- package/dist/index.js.map +1 -1
- package/dist/src/WidgetPopoverTrigger.d.ts +1 -1
- package/dist/src/WidgetPopoverTrigger.d.ts.map +1 -1
- package/dist/src/components/AttachmentPreview.d.ts.map +1 -1
- package/dist/src/components/Dialoger.d.ts.map +1 -1
- package/dist/src/components/RichText.d.ts.map +1 -1
- package/dist/src/components/ZoomableImage.d.ts +6 -0
- package/dist/src/components/ZoomableImage.d.ts.map +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { jsx as r, jsxs as d, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { useWidget as
|
|
6
|
-
import { clsx as
|
|
7
|
-
import { twMerge as
|
|
8
|
-
import { motion as
|
|
9
|
-
import { Slot as
|
|
10
|
-
import { cva as
|
|
11
|
-
import { X as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { isExhaustive as
|
|
16
|
-
import * as
|
|
17
|
-
import
|
|
18
|
-
import * as
|
|
19
|
-
import
|
|
20
|
-
import { useDropzone as
|
|
21
|
-
import
|
|
22
|
-
import { z as
|
|
1
|
+
import { jsx as r, jsxs as d, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import * as he from "@radix-ui/react-popover";
|
|
3
|
+
import * as J from "react";
|
|
4
|
+
import W, { memo as Gt, forwardRef as ft, useState as D, cloneElement as xt, createContext as Zt, useEffect as se, useContext as Kt, useRef as $, useCallback as q, useMemo as vt, createElement as lt } from "react";
|
|
5
|
+
import { useWidget as P, useConfig as N, useSessions as Y, useMessages as O, useWidgetRouter as H, useDocumentDir as ye, useWidgetTrigger as V, useModes as bt, useCsat as yt, useUploadFiles as Qt, useIsAwaitingBotReply as kt, useContact as Ct, WidgetProvider as Jt, WidgetTriggerProvider as er } from "@opencx/widget-react-headless";
|
|
6
|
+
import { clsx as tr } from "clsx";
|
|
7
|
+
import { twMerge as rr } from "tailwind-merge";
|
|
8
|
+
import { motion as re, AnimatePresence as T } from "framer-motion";
|
|
9
|
+
import { Slot as or } from "@radix-ui/react-slot";
|
|
10
|
+
import { cva as nr } from "class-variance-authority";
|
|
11
|
+
import { X as sr, ZoomOut as ar, ZoomIn as ir, RotateCcw as lr, CircleDashedIcon as cr, XIcon as ke, SquareXIcon as dr, SquareCheckBigIcon as pr, SquareCheckIcon as hr, ShrinkIcon as mr, Minimize2Icon as ur, MinimizeIcon as gr, Maximize2Icon as wr, MaximizeIcon as fr, ExpandIcon as xr, CircleXIcon as vr, CircleCheckBigIcon as br, CircleCheckIcon as zt, CheckCheckIcon as yr, CheckIcon as kr, ChevronLeftIcon as Cr, LoaderIcon as zr, ArrowUpIcon as Nt, PaperclipIcon as Nr, ImageIcon as Sr, CircleDashed as _r, AlertCircle as Ir, Loader2 as Tr, FileAudio2Icon as Mr, FileVideo2Icon as Dr, FileIcon as Rr, UserRoundIcon as jr, ChevronRightIcon as Er, SendHorizontal as Pr, ChevronDownIcon as Or } from "lucide-react";
|
|
12
|
+
import St from "remark-gfm";
|
|
13
|
+
import Ar from "react-markdown";
|
|
14
|
+
import _t from "rehype-raw";
|
|
15
|
+
import { isExhaustive as A, isSupportedLanguage as Hr, getTranslation as Fr } from "@opencx/widget-core";
|
|
16
|
+
import * as ee from "@radix-ui/react-avatar";
|
|
17
|
+
import It from "@uiw/react-iframe";
|
|
18
|
+
import * as ae from "@radix-ui/react-tooltip";
|
|
19
|
+
import ct from "tinycolor2";
|
|
20
|
+
import { useDropzone as Wr } from "react-dropzone";
|
|
21
|
+
import Lr from "react-use/lib/useAsyncFn";
|
|
22
|
+
import { z as ge } from "zod";
|
|
23
23
|
function g(e) {
|
|
24
24
|
return { "data-component": e };
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function h(...e) {
|
|
27
|
+
return rr(tr(e));
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const K = {
|
|
30
30
|
x: 2,
|
|
31
31
|
y: 2
|
|
32
|
-
},
|
|
33
|
-
|
|
32
|
+
}, X = Gt(
|
|
33
|
+
ft(
|
|
34
34
|
({ children: e, className: o, scale: t = 1.02, off: n = !1 }, s) => {
|
|
35
|
-
const [
|
|
35
|
+
const [a, i] = D(!1), [l, c] = D({ x: 0, y: 0 });
|
|
36
36
|
if (n || /translate/.test(
|
|
37
37
|
e.props.className || ""
|
|
38
38
|
)) return e;
|
|
39
|
-
const
|
|
40
|
-
var
|
|
41
|
-
const { clientX:
|
|
39
|
+
const b = (f) => {
|
|
40
|
+
var y, I;
|
|
41
|
+
const { clientX: z, clientY: M } = f, v = f.currentTarget.getBoundingClientRect(), R = z - (v.left + v.width / 2), E = M - (v.top + v.height / 2), j = Math.max(
|
|
42
42
|
-1,
|
|
43
|
-
Math.min(1, R / (
|
|
44
|
-
),
|
|
43
|
+
Math.min(1, R / (v.width / 2))
|
|
44
|
+
), u = Math.max(
|
|
45
45
|
-1,
|
|
46
|
-
Math.min(1,
|
|
47
|
-
),
|
|
48
|
-
c({ x:
|
|
46
|
+
Math.min(1, E / (v.height / 2))
|
|
47
|
+
), _ = j * K.x, w = u * K.y;
|
|
48
|
+
c({ x: _, y: w }), (I = (y = e.props).onMouseMove) == null || I.call(y, f);
|
|
49
49
|
}, x = () => {
|
|
50
|
-
var
|
|
51
|
-
|
|
50
|
+
var f, z;
|
|
51
|
+
i(!0), (z = (f = e.props).onMouseEnter) == null || z.call(f);
|
|
52
52
|
}, m = () => {
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
"--wobble-x":
|
|
57
|
-
"--wobble-y":
|
|
53
|
+
var f, z;
|
|
54
|
+
i(!1), c({ x: 0, y: 0 }), (z = (f = e.props).onMouseLeave) == null || z.call(f);
|
|
55
|
+
}, C = {
|
|
56
|
+
"--wobble-x": a ? `${l.x}px` : "0px",
|
|
57
|
+
"--wobble-y": a ? `${l.y}px` : "0px",
|
|
58
58
|
"--scale": 1 - (t - 1)
|
|
59
59
|
};
|
|
60
|
-
return
|
|
60
|
+
return xt(e, {
|
|
61
61
|
ref: s,
|
|
62
|
-
onMouseMove:
|
|
62
|
+
onMouseMove: b,
|
|
63
63
|
onMouseEnter: x,
|
|
64
64
|
onMouseLeave: m,
|
|
65
65
|
style: {
|
|
66
|
-
...
|
|
66
|
+
...C,
|
|
67
67
|
...e.props.style
|
|
68
68
|
},
|
|
69
|
-
className:
|
|
69
|
+
className: h(
|
|
70
70
|
"translate-x-[var(--wobble-x)]",
|
|
71
71
|
"translate-y-[var(--wobble-y)]",
|
|
72
72
|
"hover:scale-[var(--scale)] active:hover:scale-[calc(var(--scale)-0.02)]",
|
|
@@ -78,45 +78,45 @@ const G = {
|
|
|
78
78
|
}
|
|
79
79
|
)
|
|
80
80
|
);
|
|
81
|
-
|
|
82
|
-
const
|
|
81
|
+
X.displayName = "Wobble";
|
|
82
|
+
const $r = 10, Yr = (e, o, t) => ({
|
|
83
83
|
initial: { opacity: 0, x: -e, ...o.initial },
|
|
84
84
|
animate: { opacity: 1, x: 0, ...o.animate, transition: { delay: t } },
|
|
85
85
|
exit: { opacity: 0, x: e, ...o.exit }
|
|
86
|
-
}),
|
|
86
|
+
}), Br = (e, o, t) => ({
|
|
87
87
|
initial: { opacity: 0, x: e, ...o.initial },
|
|
88
88
|
animate: { opacity: 1, x: 0, ...o.animate, transition: { delay: t } },
|
|
89
89
|
exit: { opacity: 0, x: -e, ...o.exit }
|
|
90
|
-
}),
|
|
90
|
+
}), Ur = (e, o, t) => ({
|
|
91
91
|
initial: { opacity: 0, y: e, ...o.initial },
|
|
92
92
|
animate: { opacity: 1, y: 0, ...o.animate, transition: { delay: t } },
|
|
93
93
|
exit: { opacity: 0, y: -e, ...o.exit }
|
|
94
|
-
}),
|
|
94
|
+
}), Xr = (e, o, t) => ({
|
|
95
95
|
initial: { opacity: 0, y: -e, ...o.initial },
|
|
96
96
|
animate: { opacity: 1, y: 0, ...o.animate, transition: { delay: t } },
|
|
97
97
|
exit: { opacity: 0, y: e, ...o.exit }
|
|
98
|
-
}),
|
|
99
|
-
right:
|
|
100
|
-
left:
|
|
101
|
-
up:
|
|
102
|
-
down:
|
|
103
|
-
},
|
|
98
|
+
}), qr = {
|
|
99
|
+
right: Yr,
|
|
100
|
+
left: Br,
|
|
101
|
+
up: Ur,
|
|
102
|
+
down: Xr
|
|
103
|
+
}, k = ft(
|
|
104
104
|
({
|
|
105
105
|
fadeIn: e = "down",
|
|
106
|
-
distance: o =
|
|
106
|
+
distance: o = $r,
|
|
107
107
|
children: t,
|
|
108
108
|
snapExit: n = !1,
|
|
109
109
|
overrides: s = {},
|
|
110
|
-
delay:
|
|
111
|
-
...
|
|
110
|
+
delay: a = 0,
|
|
111
|
+
...i
|
|
112
112
|
}, l) => {
|
|
113
|
-
const c = e ?
|
|
114
|
-
return n && c.exit && typeof c.exit == "object" && !Array.isArray(c.exit) && (c.exit.transition = { duration: 0 }), /* @__PURE__ */ r(
|
|
113
|
+
const c = e ? qr[e](o, s, a) : {};
|
|
114
|
+
return n && c.exit && typeof c.exit == "object" && !Array.isArray(c.exit) && (c.exit.transition = { duration: 0 }), /* @__PURE__ */ r(re.div, { ref: l, ...i, ...c, children: t });
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
117
|
+
k.displayName = "MotionDiv";
|
|
118
|
+
const Vr = nr(
|
|
119
|
+
h(
|
|
120
120
|
"inline-flex shrink-0 items-center justify-center gap-2",
|
|
121
121
|
"text-sm font-medium whitespace-nowrap",
|
|
122
122
|
"ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
@@ -154,40 +154,40 @@ const Hr = Zt(
|
|
|
154
154
|
size: "default"
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
),
|
|
158
|
-
({ className: e, variant: o = "default", size: t, asChild: n = !1, ...s },
|
|
159
|
-
n ?
|
|
157
|
+
), S = J.forwardRef(
|
|
158
|
+
({ className: e, variant: o = "default", size: t, asChild: n = !1, ...s }, a) => /* @__PURE__ */ r(X, { ref: a, children: /* @__PURE__ */ r(
|
|
159
|
+
n ? or : "button",
|
|
160
160
|
{
|
|
161
161
|
...g("ui_lib/btn"),
|
|
162
162
|
"data-variant": o,
|
|
163
|
-
className:
|
|
163
|
+
className: h(Vr({ variant: o, size: t, className: e })),
|
|
164
164
|
...s
|
|
165
165
|
}
|
|
166
166
|
) })
|
|
167
167
|
);
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
function
|
|
171
|
-
const [o, t] =
|
|
168
|
+
S.displayName = "Button";
|
|
169
|
+
const Tt = Zt(null);
|
|
170
|
+
function Gr({ children: e }) {
|
|
171
|
+
const [o, t] = D(!1), [n, s] = D(null), a = (l) => {
|
|
172
172
|
s(l), t(!0);
|
|
173
|
-
},
|
|
173
|
+
}, i = () => {
|
|
174
174
|
t(!1), setTimeout(() => {
|
|
175
175
|
s(null);
|
|
176
176
|
}, 200);
|
|
177
177
|
};
|
|
178
178
|
return /* @__PURE__ */ d(
|
|
179
|
-
|
|
179
|
+
Tt.Provider,
|
|
180
180
|
{
|
|
181
|
-
value: { open:
|
|
181
|
+
value: { open: a, close: i, isOpen: o, content: n },
|
|
182
182
|
children: [
|
|
183
|
-
/* @__PURE__ */ r(
|
|
183
|
+
/* @__PURE__ */ r(Zr, {}),
|
|
184
184
|
e
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
const e =
|
|
189
|
+
function me() {
|
|
190
|
+
const e = Kt(Tt);
|
|
191
191
|
return e || (console.error("useDialoger must be used within a DialogerProvider"), {
|
|
192
192
|
open: () => {
|
|
193
193
|
},
|
|
@@ -197,14 +197,14 @@ function pe() {
|
|
|
197
197
|
content: null
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
const { contentIframeRef: e } =
|
|
202
|
-
return
|
|
203
|
-
var
|
|
200
|
+
function Zr() {
|
|
201
|
+
const { contentIframeRef: e } = P(), { isOpen: o, content: t, close: n } = me();
|
|
202
|
+
return se(() => {
|
|
203
|
+
var a, i;
|
|
204
204
|
const s = (l) => {
|
|
205
205
|
l.key === "Escape" && n();
|
|
206
206
|
};
|
|
207
|
-
return (
|
|
207
|
+
return (i = (a = e == null ? void 0 : e.current) == null ? void 0 : a.contentWindow) == null || i.document.addEventListener(
|
|
208
208
|
"keydown",
|
|
209
209
|
s
|
|
210
210
|
), () => {
|
|
@@ -214,8 +214,8 @@ function Lr() {
|
|
|
214
214
|
s
|
|
215
215
|
);
|
|
216
216
|
};
|
|
217
|
-
}, []), /* @__PURE__ */ r(
|
|
218
|
-
|
|
217
|
+
}, []), /* @__PURE__ */ r(T, { mode: "wait", children: o && t && /* @__PURE__ */ r(
|
|
218
|
+
k,
|
|
219
219
|
{
|
|
220
220
|
overrides: {
|
|
221
221
|
initial: { y: 0 },
|
|
@@ -229,16 +229,16 @@ function Lr() {
|
|
|
229
229
|
"dialog-content"
|
|
230
230
|
) });
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Ce({
|
|
233
233
|
children: e,
|
|
234
234
|
className: o,
|
|
235
235
|
withClose: t = !1
|
|
236
236
|
}) {
|
|
237
|
-
const { close: n } =
|
|
237
|
+
const { close: n } = me();
|
|
238
238
|
return /* @__PURE__ */ d(
|
|
239
239
|
"div",
|
|
240
240
|
{
|
|
241
|
-
className:
|
|
241
|
+
className: h(
|
|
242
242
|
"fixed left-[50%] top-[50%] z-50 flex flex-col gap-4 w-full max-w-[61.8%] translate-x-[-50%] translate-y-[-50%] border bg-background p-4 rounded-3xl",
|
|
243
243
|
o
|
|
244
244
|
),
|
|
@@ -246,14 +246,13 @@ function Ct({
|
|
|
246
246
|
children: [
|
|
247
247
|
e,
|
|
248
248
|
t && /* @__PURE__ */ d(
|
|
249
|
-
|
|
249
|
+
S,
|
|
250
250
|
{
|
|
251
251
|
size: "fit",
|
|
252
|
-
className: "rounded-full absolute top-4 right-4",
|
|
253
|
-
variant: "secondary",
|
|
252
|
+
className: "rounded-full absolute top-4 right-4 opacity-50 hover:opacity-100",
|
|
254
253
|
onClick: n,
|
|
255
254
|
children: [
|
|
256
|
-
/* @__PURE__ */ r(
|
|
255
|
+
/* @__PURE__ */ r(sr, { className: "h-4 w-4" }),
|
|
257
256
|
/* @__PURE__ */ r("span", { className: "sr-only", children: "Close" })
|
|
258
257
|
]
|
|
259
258
|
}
|
|
@@ -262,79 +261,222 @@ function Ct({
|
|
|
262
261
|
}
|
|
263
262
|
);
|
|
264
263
|
}
|
|
265
|
-
const
|
|
264
|
+
const Mt = ({
|
|
266
265
|
className: e,
|
|
267
266
|
...o
|
|
268
267
|
}) => /* @__PURE__ */ r(
|
|
269
268
|
"div",
|
|
270
269
|
{
|
|
271
|
-
className:
|
|
270
|
+
className: h("flex flex-col gap-2 text-center pt-2", e),
|
|
272
271
|
...o
|
|
273
272
|
}
|
|
274
273
|
);
|
|
275
|
-
|
|
276
|
-
const
|
|
274
|
+
Mt.displayName = "DialogerHeader";
|
|
275
|
+
const Dt = ({
|
|
277
276
|
className: e,
|
|
278
277
|
...o
|
|
279
278
|
}) => /* @__PURE__ */ r(
|
|
280
279
|
"div",
|
|
281
280
|
{
|
|
282
|
-
className:
|
|
281
|
+
className: h("flex flex-col gap-2 text-center", e),
|
|
283
282
|
...o
|
|
284
283
|
}
|
|
285
284
|
);
|
|
286
|
-
|
|
287
|
-
const
|
|
285
|
+
Dt.displayName = "DialogerBody";
|
|
286
|
+
const Rt = ({
|
|
288
287
|
className: e,
|
|
289
288
|
...o
|
|
290
|
-
}) => /* @__PURE__ */ r("div", { className:
|
|
291
|
-
|
|
292
|
-
const
|
|
289
|
+
}) => /* @__PURE__ */ r("div", { className: h("flex flex-col gap-2", e), ...o });
|
|
290
|
+
Rt.displayName = "DialogerFooter";
|
|
291
|
+
const jt = W.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ r(
|
|
293
292
|
"p",
|
|
294
293
|
{
|
|
295
294
|
ref: t,
|
|
296
|
-
className:
|
|
295
|
+
className: h(
|
|
297
296
|
"text-lg font-semibold leading-none tracking-tight",
|
|
298
297
|
e
|
|
299
298
|
),
|
|
300
299
|
...o
|
|
301
300
|
}
|
|
302
301
|
));
|
|
303
|
-
|
|
304
|
-
const
|
|
302
|
+
jt.displayName = "DialogerTitle";
|
|
303
|
+
const Et = W.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ r(
|
|
305
304
|
"p",
|
|
306
305
|
{
|
|
307
306
|
ref: t,
|
|
308
|
-
className:
|
|
307
|
+
className: h("text-sm text-muted-foreground", e),
|
|
309
308
|
...o
|
|
310
309
|
}
|
|
311
310
|
));
|
|
312
|
-
|
|
313
|
-
function
|
|
311
|
+
Et.displayName = "DialogerDescription";
|
|
312
|
+
function ze({
|
|
314
313
|
children: e,
|
|
315
314
|
trigger: o
|
|
316
315
|
}) {
|
|
317
|
-
const { open: t } =
|
|
318
|
-
return
|
|
316
|
+
const { open: t } = me();
|
|
317
|
+
return xt(o, {
|
|
319
318
|
onClick: () => t(e)
|
|
320
319
|
});
|
|
321
320
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
const dt = 1, pt = 5, le = 0.5, Kr = 2.5;
|
|
322
|
+
function Qr(e, o, t, n) {
|
|
323
|
+
if (!t || !n || o <= 1) return { x: 0, y: 0 };
|
|
324
|
+
const s = t.getBoundingClientRect(), a = n.offsetWidth, i = n.offsetHeight, l = Math.max(0, (a * o - s.width) / (2 * o)), c = Math.max(
|
|
325
|
+
0,
|
|
326
|
+
(i * o - s.height) / (2 * o)
|
|
327
|
+
);
|
|
328
|
+
return {
|
|
329
|
+
x: Math.min(l, Math.max(-l, e.x)),
|
|
330
|
+
y: Math.min(c, Math.max(-c, e.y))
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
function Pt({
|
|
334
|
+
src: e,
|
|
335
|
+
alt: o
|
|
336
|
+
}) {
|
|
337
|
+
const [t, n] = D(1), [s, a] = D({ x: 0, y: 0 }), [i, l] = D(!1), c = $({ x: 0, y: 0 }), p = $({ x: 0, y: 0 }), b = $(null), x = $(null), m = $(!1), C = (u) => Math.min(pt, Math.max(dt, u)), f = q(() => {
|
|
338
|
+
n(1), a({ x: 0, y: 0 });
|
|
339
|
+
}, []), z = q(() => {
|
|
340
|
+
n((u) => C(u + le));
|
|
341
|
+
}, []), M = q(() => {
|
|
342
|
+
n((u) => {
|
|
343
|
+
const _ = C(u - le);
|
|
344
|
+
return _ <= 1 && a({ x: 0, y: 0 }), _;
|
|
345
|
+
});
|
|
346
|
+
}, []);
|
|
347
|
+
q((u) => {
|
|
348
|
+
u.preventDefault(), u.stopPropagation();
|
|
349
|
+
const _ = u.deltaY > 0 ? -le : le;
|
|
350
|
+
n((w) => {
|
|
351
|
+
const y = C(w + _);
|
|
352
|
+
return y <= 1 && a({ x: 0, y: 0 }), y;
|
|
353
|
+
});
|
|
354
|
+
}, []);
|
|
355
|
+
const v = q(
|
|
356
|
+
(u) => {
|
|
357
|
+
u.preventDefault(), m.current = !1, l(!0), c.current = { x: u.clientX, y: u.clientY }, p.current = { ...s }, u.target.setPointerCapture(u.pointerId);
|
|
358
|
+
},
|
|
359
|
+
[s]
|
|
360
|
+
), R = q(
|
|
361
|
+
(u) => {
|
|
362
|
+
if (!i) return;
|
|
363
|
+
const _ = u.clientX - c.current.x, w = u.clientY - c.current.y;
|
|
364
|
+
if ((Math.abs(_) > 3 || Math.abs(w) > 3) && (m.current = !0), t <= 1) return;
|
|
365
|
+
const y = {
|
|
366
|
+
x: p.current.x + _ / t,
|
|
367
|
+
y: p.current.y + w / t
|
|
368
|
+
};
|
|
369
|
+
a(
|
|
370
|
+
Qr(y, t, b.current, x.current)
|
|
371
|
+
);
|
|
372
|
+
},
|
|
373
|
+
[i, t]
|
|
374
|
+
), E = q(() => {
|
|
375
|
+
const u = m.current;
|
|
376
|
+
l(!1), !u && n((_) => _ > 1 ? (a({ x: 0, y: 0 }), 1) : Kr);
|
|
377
|
+
}, []), j = t > 1;
|
|
378
|
+
return /* @__PURE__ */ d(
|
|
379
|
+
"div",
|
|
380
|
+
{
|
|
381
|
+
className: "relative size-full flex items-center justify-center select-none",
|
|
382
|
+
onClick: (u) => u.stopPropagation(),
|
|
383
|
+
children: [
|
|
384
|
+
/* @__PURE__ */ r(
|
|
385
|
+
"div",
|
|
386
|
+
{
|
|
387
|
+
ref: b,
|
|
388
|
+
className: h(
|
|
389
|
+
"overflow-hidden max-h-full max-w-full rounded-2xl flex items-center justify-center",
|
|
390
|
+
j && "size-full"
|
|
391
|
+
),
|
|
392
|
+
onPointerDown: v,
|
|
393
|
+
onPointerMove: R,
|
|
394
|
+
onPointerUp: E,
|
|
395
|
+
onPointerCancel: E,
|
|
396
|
+
style: {
|
|
397
|
+
cursor: i ? "grabbing" : j ? "grab" : "zoom-in",
|
|
398
|
+
touchAction: "none"
|
|
399
|
+
},
|
|
400
|
+
children: /* @__PURE__ */ r(
|
|
401
|
+
"img",
|
|
402
|
+
{
|
|
403
|
+
ref: x,
|
|
404
|
+
src: e,
|
|
405
|
+
alt: o,
|
|
406
|
+
className: "block max-w-full object-contain pointer-events-none",
|
|
407
|
+
draggable: !1,
|
|
408
|
+
style: {
|
|
409
|
+
maxHeight: "100vh",
|
|
410
|
+
transform: `scale(${t}) translate(${s.x}px, ${s.y}px)`,
|
|
411
|
+
transformOrigin: "center center"
|
|
412
|
+
// transition: isDragging ? 'none' : 'all 0.2s ease-out',
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
}
|
|
417
|
+
),
|
|
418
|
+
/* @__PURE__ */ d("div", { className: "absolute bottom-3 left-1/2 -translate-x-1/2 flex items-center gap-1 bg-black/60 backdrop-blur-sm rounded-full px-1.5 py-1 transition opacity-50 hover:opacity-100", children: [
|
|
419
|
+
/* @__PURE__ */ r(we, { onClick: M, label: "Zoom out", disabled: t <= dt, children: /* @__PURE__ */ r(ar, { className: "size-3.5" }) }),
|
|
420
|
+
/* @__PURE__ */ d("span", { className: "text-white text-xs font-medium min-w-[3ch] text-center tabular-nums", children: [
|
|
421
|
+
Math.round(t * 100),
|
|
422
|
+
"%"
|
|
423
|
+
] }),
|
|
424
|
+
/* @__PURE__ */ r(we, { onClick: z, label: "Zoom in", disabled: t >= pt, children: /* @__PURE__ */ r(ir, { className: "size-3.5" }) }),
|
|
425
|
+
j && /* @__PURE__ */ d(Q, { children: [
|
|
426
|
+
/* @__PURE__ */ r("div", { className: "w-px h-4 bg-white/30 mx-0.5" }),
|
|
427
|
+
/* @__PURE__ */ r(we, { onClick: f, label: "Reset zoom", children: /* @__PURE__ */ r(lr, { className: "size-3.5" }) })
|
|
428
|
+
] })
|
|
429
|
+
] })
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
function we({
|
|
435
|
+
onClick: e,
|
|
436
|
+
label: o,
|
|
437
|
+
children: t,
|
|
438
|
+
disabled: n
|
|
439
|
+
}) {
|
|
440
|
+
return /* @__PURE__ */ r(
|
|
441
|
+
"button",
|
|
442
|
+
{
|
|
443
|
+
onClick: e,
|
|
444
|
+
"aria-label": o,
|
|
445
|
+
disabled: n,
|
|
446
|
+
className: "text-white/80 hover:text-white disabled:text-white/30 disabled:hover:bg-transparent p-1.5 rounded-full hover:bg-white/15 transition-colors",
|
|
447
|
+
children: t
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
function Ot({ attachment: e }) {
|
|
452
|
+
const { name: o, size: t, type: n, url: s } = e, a = n.startsWith("image/"), i = n.startsWith("video/");
|
|
453
|
+
return n.startsWith("audio/") ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r("div", { className: "w-full shrink-0 overflow-hidden", children: /* @__PURE__ */ d("audio", { controls: !0, className: "w-full", children: [
|
|
325
454
|
/* @__PURE__ */ r("source", { src: s, type: n }),
|
|
326
455
|
"Your browser does not support the audio tag."
|
|
327
|
-
] }) }) }) :
|
|
456
|
+
] }) }) }) : i ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r("div", { className: "w-full border shrink-0 rounded-2xl overflow-hidden", children: /* @__PURE__ */ d("video", { controls: !0, children: [
|
|
328
457
|
/* @__PURE__ */ r("source", { src: s, type: n }),
|
|
329
458
|
"Your browser does not support the video tag."
|
|
330
|
-
] }) }) }) :
|
|
459
|
+
] }) }) }) : a ? /* @__PURE__ */ r(
|
|
460
|
+
ze,
|
|
461
|
+
{
|
|
462
|
+
trigger: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r("div", { className: "size-fit border shrink-0 rounded-2xl overflow-hidden", children: /* @__PURE__ */ r("img", { src: s, className: "object-cover size-16", alt: o }) }) }) }),
|
|
463
|
+
children: /* @__PURE__ */ r(
|
|
464
|
+
Ce,
|
|
465
|
+
{
|
|
466
|
+
className: "size-full max-w-full rounded-3xl flex items-center justify-center bg-transparent border-none gap-0",
|
|
467
|
+
withClose: !0,
|
|
468
|
+
children: /* @__PURE__ */ r(Pt, { src: s, alt: o })
|
|
469
|
+
}
|
|
470
|
+
)
|
|
471
|
+
}
|
|
472
|
+
) : /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r("div", { className: "size-fit border shrink-0 rounded-2xl overflow-hidden", children: /* @__PURE__ */ d("div", { className: "flex items-end gap-2 p-2", children: [
|
|
331
473
|
/* @__PURE__ */ r(
|
|
332
474
|
"a",
|
|
333
475
|
{
|
|
334
476
|
href: s,
|
|
335
477
|
target: "_blank",
|
|
336
478
|
rel: "noopener noreferrer",
|
|
337
|
-
className:
|
|
479
|
+
className: h(
|
|
338
480
|
"text-xs text-blue-500 line-clamp-2 underline hover:text-blue-600",
|
|
339
481
|
"break-words [word-break:break-word]"
|
|
340
482
|
// `[word-break:break-word]` is deprecated but works in the browser, while `break-words` which is `[overflow-wrap: break-word]` does not work
|
|
@@ -346,57 +488,66 @@ function Mt({ attachment: e }) {
|
|
|
346
488
|
(t / 1024).toFixed(2),
|
|
347
489
|
" KB"
|
|
348
490
|
] })
|
|
349
|
-
] }) }) })
|
|
350
|
-
Tt,
|
|
351
|
-
{
|
|
352
|
-
trigger: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r("div", { className: "size-fit border shrink-0 rounded-2xl overflow-hidden", children: i && /* @__PURE__ */ r("img", { src: s, className: "object-cover size-16", alt: o }) }) }) }),
|
|
353
|
-
children: /* @__PURE__ */ r(
|
|
354
|
-
Ct,
|
|
355
|
-
{
|
|
356
|
-
className: "size-full max-w-full rounded-3xl flex items-center justify-center bg-transparent border-none gap-0",
|
|
357
|
-
withClose: !0,
|
|
358
|
-
children: i && /* @__PURE__ */ r("div", { className: "size-fit shrink-0 rounded-2xl overflow-hidden max-h-full", children: /* @__PURE__ */ r("img", { src: s, className: "object-cover size-auto", alt: o }) })
|
|
359
|
-
}
|
|
360
|
-
)
|
|
361
|
-
}
|
|
362
|
-
);
|
|
491
|
+
] }) }) });
|
|
363
492
|
}
|
|
364
|
-
const
|
|
365
|
-
|
|
493
|
+
const At = W.memo(
|
|
494
|
+
Ar,
|
|
366
495
|
(e, o) => e.children === o.children && e.className === o.className
|
|
367
496
|
);
|
|
368
|
-
function
|
|
497
|
+
function Ne({
|
|
369
498
|
children: e,
|
|
370
499
|
messageType: o,
|
|
371
500
|
messageId: t
|
|
372
501
|
}) {
|
|
373
|
-
const { anchorTarget: n } =
|
|
502
|
+
const { anchorTarget: n } = N();
|
|
374
503
|
return /* @__PURE__ */ r(
|
|
375
|
-
|
|
504
|
+
At,
|
|
376
505
|
{
|
|
377
506
|
"data-type": o,
|
|
378
507
|
"data-id": t,
|
|
379
|
-
remarkPlugins: [
|
|
380
|
-
rehypePlugins: [
|
|
508
|
+
remarkPlugins: [St],
|
|
509
|
+
rehypePlugins: [_t],
|
|
381
510
|
components: {
|
|
382
|
-
a: ({ children: s, ...
|
|
511
|
+
a: ({ children: s, ...a }) => /* @__PURE__ */ r("a", { target: a.target || n || "_top", ...a, children: s }),
|
|
512
|
+
img: ({ src: s, alt: a, ...i }) => s ? /* @__PURE__ */ r(
|
|
513
|
+
ze,
|
|
514
|
+
{
|
|
515
|
+
trigger: /* @__PURE__ */ r(
|
|
516
|
+
"img",
|
|
517
|
+
{
|
|
518
|
+
src: s,
|
|
519
|
+
alt: a,
|
|
520
|
+
...i,
|
|
521
|
+
className: "cursor-pointer rounded-xl"
|
|
522
|
+
}
|
|
523
|
+
),
|
|
524
|
+
children: /* @__PURE__ */ r(
|
|
525
|
+
Ce,
|
|
526
|
+
{
|
|
527
|
+
className: "size-full max-w-full rounded-3xl flex items-center justify-center bg-transparent border-none gap-0",
|
|
528
|
+
withClose: !0,
|
|
529
|
+
children: /* @__PURE__ */ r(Pt, { src: s, alt: a })
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
}
|
|
533
|
+
) : /* @__PURE__ */ r("img", { src: s, alt: a, ...i })
|
|
383
534
|
},
|
|
384
535
|
children: e
|
|
385
536
|
}
|
|
386
537
|
);
|
|
387
538
|
}
|
|
388
|
-
function
|
|
539
|
+
function te() {
|
|
389
540
|
const {
|
|
390
541
|
widgetCtx: { org: e }
|
|
391
|
-
} =
|
|
542
|
+
} = P(), {
|
|
392
543
|
sessionState: { session: o }
|
|
393
|
-
} =
|
|
544
|
+
} = Y(), t = N(), {
|
|
394
545
|
messagesState: { messages: n }
|
|
395
|
-
} =
|
|
546
|
+
} = O(), {
|
|
396
547
|
routerState: { screen: s }
|
|
397
|
-
} =
|
|
548
|
+
} = H();
|
|
398
549
|
return {
|
|
399
|
-
react:
|
|
550
|
+
react: W,
|
|
400
551
|
org: e,
|
|
401
552
|
session: o,
|
|
402
553
|
config: t,
|
|
@@ -404,47 +555,47 @@ function Z() {
|
|
|
404
555
|
currentScreen: s
|
|
405
556
|
};
|
|
406
557
|
}
|
|
407
|
-
function
|
|
558
|
+
function Jr({
|
|
408
559
|
currentMessage: e
|
|
409
560
|
}) {
|
|
410
561
|
var n;
|
|
411
|
-
const o =
|
|
562
|
+
const o = te(), t = (n = o.config.customComponents) == null ? void 0 : n["message::after"];
|
|
412
563
|
return t ? /* @__PURE__ */ r(t, { ...o, currentMessage: e }) : null;
|
|
413
564
|
}
|
|
414
|
-
function
|
|
565
|
+
function fe(e) {
|
|
415
566
|
const {
|
|
416
567
|
data: o,
|
|
417
568
|
id: t,
|
|
418
569
|
type: n,
|
|
419
570
|
attachments: s,
|
|
420
|
-
isFirstInGroup:
|
|
421
|
-
isLastInGroup:
|
|
571
|
+
isFirstInGroup: a,
|
|
572
|
+
isLastInGroup: i,
|
|
422
573
|
isAloneInGroup: l,
|
|
423
574
|
dataComponentNames: c,
|
|
424
|
-
classNames:
|
|
575
|
+
classNames: p
|
|
425
576
|
} = e;
|
|
426
577
|
if (n !== "AI" && n !== "AGENT") return null;
|
|
427
|
-
const { message:
|
|
578
|
+
const { message: b, variant: x = "default" } = o;
|
|
428
579
|
return /* @__PURE__ */ d(
|
|
429
580
|
"div",
|
|
430
581
|
{
|
|
431
582
|
...g((c == null ? void 0 : c.messageContainer) ?? "chat/agent_msg/root"),
|
|
432
|
-
className:
|
|
583
|
+
className: h(
|
|
433
584
|
"w-5/6 flex flex-col items-start gap-1",
|
|
434
|
-
|
|
585
|
+
p == null ? void 0 : p.messageContainer
|
|
435
586
|
),
|
|
436
587
|
children: [
|
|
437
|
-
s && s.length > 0 && /* @__PURE__ */ r("div", { className: "w-full gap-1 flex flex-row flex-wrap items-center justify-start", children: s == null ? void 0 : s.map((m) => /* @__PURE__ */ r(
|
|
438
|
-
|
|
588
|
+
s && s.length > 0 && /* @__PURE__ */ r("div", { className: "w-full gap-1 flex flex-row flex-wrap items-center justify-start", children: s == null ? void 0 : s.map((m) => /* @__PURE__ */ r(Ot, { attachment: m }, m.id)) }),
|
|
589
|
+
b.length > 0 && /* @__PURE__ */ d("div", { className: "flex flex-row gap-2", children: [
|
|
439
590
|
/* @__PURE__ */ r(
|
|
440
591
|
"div",
|
|
441
592
|
{
|
|
442
593
|
...g((c == null ? void 0 : c.message) ?? "chat/agent_msg/msg"),
|
|
443
|
-
"data-first":
|
|
444
|
-
"data-last":
|
|
594
|
+
"data-first": a,
|
|
595
|
+
"data-last": i,
|
|
445
596
|
"data-alone": l,
|
|
446
597
|
"data-variant": x,
|
|
447
|
-
className:
|
|
598
|
+
className: h(
|
|
448
599
|
"transition-all",
|
|
449
600
|
"w-fit py-3 px-4 rounded-3xl bg-secondary text-secondary-foreground",
|
|
450
601
|
"leading-snug text-sm prose prose-sm prose-a:decoration-primary prose-a:underline",
|
|
@@ -454,28 +605,28 @@ function ge(e) {
|
|
|
454
605
|
// Adding "whitespace-pre-wrap" will result in unnecessarily huge line breaks
|
|
455
606
|
x === "error" && "bg-destructive/15 text-destructive",
|
|
456
607
|
// We're using the booleans directly here, not the data attributes, to make any external styling more specific than this
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
!
|
|
460
|
-
|
|
608
|
+
a && !l && "rounded-bl-md",
|
|
609
|
+
i && !l && "rounded-tl-md",
|
|
610
|
+
!a && !i && !l && "rounded-l-md",
|
|
611
|
+
p == null ? void 0 : p.message
|
|
461
612
|
),
|
|
462
|
-
children: /* @__PURE__ */ r(
|
|
613
|
+
children: /* @__PURE__ */ r(Ne, { messageType: n, messageId: t, children: b })
|
|
463
614
|
}
|
|
464
615
|
),
|
|
465
|
-
/* @__PURE__ */ r(
|
|
616
|
+
/* @__PURE__ */ r(Jr, { currentMessage: e })
|
|
466
617
|
] })
|
|
467
618
|
]
|
|
468
619
|
}
|
|
469
620
|
);
|
|
470
621
|
}
|
|
471
|
-
function
|
|
622
|
+
function eo(e) {
|
|
472
623
|
return /* @__PURE__ */ r("div", { className: "w-full max-w-full overflow-auto shrink-0", children: /* @__PURE__ */ r("pre", { className: "text-xs leading-tight whitespace-pre-wrap break-word", children: JSON.stringify(e, null, 1) }) });
|
|
473
624
|
}
|
|
474
|
-
const
|
|
475
|
-
|
|
625
|
+
const Se = J.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ r(
|
|
626
|
+
ee.Root,
|
|
476
627
|
{
|
|
477
628
|
ref: t,
|
|
478
|
-
className:
|
|
629
|
+
className: h(
|
|
479
630
|
"relative flex size-6 aspect-square shrink-0 overflow-hidden rounded-full bg-secondary",
|
|
480
631
|
// 'border',
|
|
481
632
|
e
|
|
@@ -483,58 +634,58 @@ const ye = K.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ r(
|
|
|
483
634
|
...o
|
|
484
635
|
}
|
|
485
636
|
));
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
|
|
637
|
+
Se.displayName = ee.Root.displayName;
|
|
638
|
+
const _e = J.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ r(
|
|
639
|
+
ee.Image,
|
|
489
640
|
{
|
|
490
641
|
ref: t,
|
|
491
|
-
className:
|
|
642
|
+
className: h("aspect-square h-full w-full", e),
|
|
492
643
|
...o
|
|
493
644
|
}
|
|
494
645
|
));
|
|
495
|
-
|
|
496
|
-
const
|
|
497
|
-
|
|
646
|
+
_e.displayName = ee.Image.displayName;
|
|
647
|
+
const Ie = J.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ r(
|
|
648
|
+
ee.Fallback,
|
|
498
649
|
{
|
|
499
650
|
ref: t,
|
|
500
|
-
className:
|
|
651
|
+
className: h(
|
|
501
652
|
"flex size-full text-xs items-center justify-center rounded-lg",
|
|
502
653
|
e
|
|
503
654
|
),
|
|
504
655
|
...o
|
|
505
656
|
}
|
|
506
657
|
));
|
|
507
|
-
|
|
508
|
-
function
|
|
658
|
+
Ie.displayName = ee.Fallback.displayName;
|
|
659
|
+
function xe({
|
|
509
660
|
agent: e,
|
|
510
661
|
...o
|
|
511
662
|
}) {
|
|
512
663
|
var t, n;
|
|
513
|
-
return /* @__PURE__ */ d(
|
|
514
|
-
/* @__PURE__ */ r(
|
|
515
|
-
(e == null ? void 0 : e.name) && /* @__PURE__ */ r(
|
|
664
|
+
return /* @__PURE__ */ d(Se, { ...o, children: [
|
|
665
|
+
/* @__PURE__ */ r(_e, { src: (e == null ? void 0 : e.avatarUrl) || (e == null ? void 0 : e.avatar) || "", alt: "Agent Icon" }),
|
|
666
|
+
(e == null ? void 0 : e.name) && /* @__PURE__ */ r(Ie, { children: (n = (t = e == null ? void 0 : e.name) == null ? void 0 : t.slice(0, 1)) == null ? void 0 : n.toUpperCase() })
|
|
516
667
|
] });
|
|
517
668
|
}
|
|
518
|
-
function
|
|
519
|
-
return /* @__PURE__ */ r(
|
|
520
|
-
|
|
669
|
+
function to({ agent: e }) {
|
|
670
|
+
return /* @__PURE__ */ r(T, { children: /* @__PURE__ */ d(
|
|
671
|
+
k,
|
|
521
672
|
{
|
|
522
673
|
...g("chat/bot_loading/root"),
|
|
523
674
|
className: "flex flex-row items-end w-full gap-2 animate-pulse",
|
|
524
675
|
children: [
|
|
525
|
-
/* @__PURE__ */ r(
|
|
676
|
+
/* @__PURE__ */ r(xe, { agent: e }),
|
|
526
677
|
/* @__PURE__ */ d(
|
|
527
678
|
"div",
|
|
528
679
|
{
|
|
529
680
|
...g("chat/bot_loading/bouncing_dots_container"),
|
|
530
|
-
className:
|
|
681
|
+
className: h(
|
|
531
682
|
"flex items-center [&_span]:bg-secondary-foreground [&_span]:size-1 gap-1 p-2 rounded-xl bg-secondary"
|
|
532
683
|
// 'border',
|
|
533
684
|
),
|
|
534
685
|
children: [
|
|
535
|
-
/* @__PURE__ */ r(
|
|
536
|
-
/* @__PURE__ */ r(
|
|
537
|
-
/* @__PURE__ */ r(
|
|
686
|
+
/* @__PURE__ */ r(re.span, { className: "rounded-full animate-bounce [animation-delay:-0.3s]" }),
|
|
687
|
+
/* @__PURE__ */ r(re.span, { className: "rounded-full animate-bounce [animation-delay:-0.15s]" }),
|
|
688
|
+
/* @__PURE__ */ r(re.span, { className: "rounded-full animate-bounce" })
|
|
538
689
|
]
|
|
539
690
|
}
|
|
540
691
|
)
|
|
@@ -542,30 +693,30 @@ function Yr({ agent: e }) {
|
|
|
542
693
|
}
|
|
543
694
|
) });
|
|
544
695
|
}
|
|
545
|
-
const Rt = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{-ms-overflow-style:none;scrollbar-width:none}*::-webkit-scrollbar{display:none}*{border-color:hsl(var(--opencx-border))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.end-6{inset-inline-end:1.5rem}.left-2{left:.5rem}.left-\\[50\\%\\]{left:50%}.right-4{right:1rem}.top-4{top:1rem}.top-6{top:1.5rem}.top-\\[50\\%\\]{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.z-50{z-index:50}.m-2{margin:.5rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ms-auto{margin-inline-start:auto}.mt-0\\.5{margin-top:.125rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-0{width:0px;height:0px}.size-10{width:2.5rem;height:2.5rem}.size-12{width:3rem;height:3rem}.size-16{width:4rem;height:4rem}.size-3{width:.75rem;height:.75rem}.size-4{width:1rem;height:1rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-auto{width:auto;height:auto}.size-fit{width:fit-content;height:fit-content}.size-full{width:100%;height:100%}.h-0{height:0px}.h-10{height:2.5rem}.h-2{height:.5rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-16{max-height:4rem}.max-h-40{max-height:10rem}.max-h-full{max-height:100%}.min-h-12{min-height:3rem}.w-0{width:0px}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-2{width:.5rem}.w-2\\/5{width:40%}.w-3\\.5{width:.875rem}.w-3\\/5{width:60%}.w-4{width:1rem}.w-5\\/6{width:83.333333%}.w-60{width:15rem}.w-9{width:2.25rem}.w-auto{width:auto}.w-dvw{width:100dvw}.w-fit{width:fit-content}.w-full{width:100%}.min-w-80{min-width:20rem}.min-w-\\[8rem\\]{min-width:8rem}.max-w-96{max-width:24rem}.max-w-\\[61\\.8\\%\\]{max-width:61.8%}.max-w-full{max-width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.shrink-0{flex-shrink:0}.translate-x-\\[-50\\%\\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[var\\(--wobble-x\\)\\]{--tw-translate-x: var(--wobble-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[-50\\%\\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[var\\(--wobble-y\\)\\]{--tw-translate-y: var(--wobble-y);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-\\[1px\\]{gap:1px}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.scroll-smooth{scroll-behavior:smooth}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\\[20px\\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr-md{border-top-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-none{border-style:none}.border-transparent{border-color:transparent}.bg-\\[white\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--opencx-background))}.bg-black\\/50{background-color:#00000080}.bg-black\\/60{background-color:#0009}.bg-destructive{background-color:hsl(var(--opencx-destructive))}.bg-destructive\\/15{background-color:hsl(var(--opencx-destructive) / .15)}.bg-muted{background-color:hsl(var(--opencx-muted))}.bg-primary{background-color:hsl(var(--opencx-primary))}.bg-secondary{background-color:hsl(var(--opencx-secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-\\[radial-gradient\\(ellipse_at_top_left\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\,radial-gradient\\(ellipse_at_top_right\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\]{background-image:radial-gradient(ellipse at top left,hsl(var(--opencx-primary)),transparent),radial-gradient(ellipse at top right,hsl(var(--opencx-primary)),transparent)}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pe-2{padding-inline-end:.5rem}.pe-4{padding-inline-end:1rem}.ps-2{padding-inline-start:.5rem}.ps-4{padding-inline-start:1rem}.ps-8{padding-inline-start:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[1\\.75rem\\]{font-size:1.75rem}.text-\\[10px\\]{font-size:10px}.text-\\[16px\\]{font-size:16px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--opencx-destructive))}.text-destructive-foreground{color:hsl(var(--opencx-destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--opencx-foreground))}.text-muted-foreground{color:hsl(var(--opencx-muted-foreground))}.text-muted-foreground\\/70{color:hsl(var(--opencx-muted-foreground) / .7)}.text-muted-foreground\\/75{color:hsl(var(--opencx-muted-foreground) / .75)}.text-primary{color:hsl(var(--opencx-primary))}.text-primary-foreground{color:hsl(var(--opencx-primary-foreground))}.text-secondary-foreground{color:hsl(var(--opencx-secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-95{opacity:.95}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-8{outline-width:8px}.outline-background{outline-color:hsl(var(--opencx-background))}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--opencx-background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[height\\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[field-sizing\\:content\\;\\],.\\[field-sizing\\:content\\]{field-sizing:content}.\\[word-break\\:break-word\\]{word-break:break-word}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-primary-foreground::file-selector-button{color:hsl(var(--opencx-primary-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--opencx-muted-foreground))}.placeholder\\:text-muted-foreground\\/75::placeholder{color:hsl(var(--opencx-muted-foreground) / .75)}.focus-within\\:border-primary:focus-within{border-color:hsl(var(--opencx-primary))}.hover\\:scale-\\[var\\(--scale\\)\\]:hover{--tw-scale-x: var(--scale);--tw-scale-y: var(--scale);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:border-primary:hover{border-color:hsl(var(--opencx-primary))}.hover\\:bg-secondary:hover{background-color:hsl(var(--opencx-secondary))}.hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\\:text-primary:hover{color:hsl(var(--opencx-primary))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.focus\\:bg-accent:focus{background-color:hsl(var(--opencx-accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--opencx-accent-foreground))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--opencx-ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--opencx-background))}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:hover\\:scale-\\[calc\\(var\\(--scale\\)-0\\.02\\)\\]:hover:active{--tw-scale-x: calc(var(--scale) - .02);--tw-scale-y: calc(var(--scale) - .02);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:active\\:scale-95:active:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}.group:hover .group-hover\\:active\\:scale-90:active,.group:active .group-active\\:scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--opencx-primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--opencx-accent))}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--opencx-input))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.prose-a\\:underline :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-line:underline}.prose-a\\:decoration-primary :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-color:hsl(var(--opencx-primary))}.rtl\\:-scale-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;--tw-scale-y: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&_span\\]\\:size-1 span{width:.25rem;height:.25rem}.\\[\\&_span\\]\\:bg-secondary-foreground span{background-color:hsl(var(--opencx-secondary-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\]\\:text-muted-foreground\\/70 svg{color:hsl(var(--opencx-muted-foreground) / .7)}.\\[\\&_svg\\]\\:hover\\:text-primary:hover svg{color:hsl(var(--opencx-primary))}', Ur = ne.Provider, qr = ne.Root, Xr = ne.Trigger, jt = K.forwardRef(({ className: e, sideOffset: o = 4, ...t }, n) => /* @__PURE__ */ r(
|
|
546
|
-
|
|
696
|
+
const Ht = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{-ms-overflow-style:none;scrollbar-width:none}*::-webkit-scrollbar{display:none}*{border-color:hsl(var(--opencx-border))}.\\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-3{bottom:.75rem}.end-6{inset-inline-end:1.5rem}.left-1\\/2{left:50%}.left-2{left:.5rem}.left-\\[50\\%\\]{left:50%}.right-4{right:1rem}.top-4{top:1rem}.top-6{top:1.5rem}.top-\\[50\\%\\]{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.z-50{z-index:50}.m-2{margin:.5rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ms-auto{margin-inline-start:auto}.mt-0\\.5{margin-top:.125rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-0{width:0px;height:0px}.size-10{width:2.5rem;height:2.5rem}.size-12{width:3rem;height:3rem}.size-16{width:4rem;height:4rem}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-fit{width:fit-content;height:fit-content}.size-full{width:100%;height:100%}.h-0{height:0px}.h-10{height:2.5rem}.h-2{height:.5rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-16{max-height:4rem}.max-h-40{max-height:10rem}.max-h-full{max-height:100%}.min-h-12{min-height:3rem}.w-0{width:0px}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-2{width:.5rem}.w-2\\/5{width:40%}.w-3\\.5{width:.875rem}.w-3\\/5{width:60%}.w-4{width:1rem}.w-5\\/6{width:83.333333%}.w-60{width:15rem}.w-9{width:2.25rem}.w-auto{width:auto}.w-dvw{width:100dvw}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-80{min-width:20rem}.min-w-\\[3ch\\]{min-width:3ch}.min-w-\\[8rem\\]{min-width:8rem}.max-w-96{max-width:24rem}.max-w-\\[61\\.8\\%\\]{max-width:61.8%}.max-w-full{max-width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.shrink-0{flex-shrink:0}.-translate-x-1\\/2,.translate-x-\\[-50\\%\\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[var\\(--wobble-x\\)\\]{--tw-translate-x: var(--wobble-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[-50\\%\\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[var\\(--wobble-y\\)\\]{--tw-translate-y: var(--wobble-y);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-\\[1px\\]{gap:1px}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.scroll-smooth{scroll-behavior:smooth}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\\[20px\\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr-md{border-top-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-none{border-style:none}.border-transparent{border-color:transparent}.bg-\\[white\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--opencx-background))}.bg-black\\/50{background-color:#00000080}.bg-black\\/60{background-color:#0009}.bg-destructive{background-color:hsl(var(--opencx-destructive))}.bg-destructive\\/15{background-color:hsl(var(--opencx-destructive) / .15)}.bg-muted{background-color:hsl(var(--opencx-muted))}.bg-primary{background-color:hsl(var(--opencx-primary))}.bg-secondary{background-color:hsl(var(--opencx-secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/30{background-color:#ffffff4d}.bg-\\[radial-gradient\\(ellipse_at_top_left\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\,radial-gradient\\(ellipse_at_top_right\\,hsl\\(var\\(--opencx-primary\\)\\)\\,transparent\\)\\]{background-image:radial-gradient(ellipse at top left,hsl(var(--opencx-primary)),transparent),radial-gradient(ellipse at top right,hsl(var(--opencx-primary)),transparent)}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pe-2{padding-inline-end:.5rem}.pe-4{padding-inline-end:1rem}.ps-2{padding-inline-start:.5rem}.ps-4{padding-inline-start:1rem}.ps-8{padding-inline-start:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[1\\.75rem\\]{font-size:1.75rem}.text-\\[10px\\]{font-size:10px}.text-\\[16px\\]{font-size:16px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--opencx-destructive))}.text-destructive-foreground{color:hsl(var(--opencx-destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--opencx-foreground))}.text-muted-foreground{color:hsl(var(--opencx-muted-foreground))}.text-muted-foreground\\/70{color:hsl(var(--opencx-muted-foreground) / .7)}.text-muted-foreground\\/75{color:hsl(var(--opencx-muted-foreground) / .75)}.text-primary{color:hsl(var(--opencx-primary))}.text-primary-foreground{color:hsl(var(--opencx-primary-foreground))}.text-secondary-foreground{color:hsl(var(--opencx-secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/80{color:#fffc}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-95{opacity:.95}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-8{outline-width:8px}.outline-background{outline-color:hsl(var(--opencx-background))}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--opencx-background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[height\\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in{--tw-enter-scale: 0}.zoom-in-95{--tw-enter-scale: .95}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[field-sizing\\:content\\;\\],.\\[field-sizing\\:content\\]{field-sizing:content}.\\[word-break\\:break-word\\]{word-break:break-word}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-primary-foreground::file-selector-button{color:hsl(var(--opencx-primary-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--opencx-muted-foreground))}.placeholder\\:text-muted-foreground\\/75::placeholder{color:hsl(var(--opencx-muted-foreground) / .75)}.focus-within\\:border-primary:focus-within{border-color:hsl(var(--opencx-primary))}.hover\\:scale-\\[var\\(--scale\\)\\]:hover{--tw-scale-x: var(--scale);--tw-scale-y: var(--scale);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:border-primary:hover{border-color:hsl(var(--opencx-primary))}.hover\\:bg-secondary:hover{background-color:hsl(var(--opencx-secondary))}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}.hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\\:text-primary:hover{color:hsl(var(--opencx-primary))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.focus\\:bg-accent:focus{background-color:hsl(var(--opencx-accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--opencx-accent-foreground))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--opencx-ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--opencx-background))}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:hover\\:scale-\\[calc\\(var\\(--scale\\)-0\\.02\\)\\]:hover:active{--tw-scale-x: calc(var(--scale) - .02);--tw-scale-y: calc(var(--scale) - .02);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:active\\:scale-95:active:hover{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:text-white\\/30:disabled{color:#ffffff4d}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:hover\\:bg-transparent:hover:disabled{background-color:transparent}.group:hover .group-hover\\:opacity-100{opacity:1}.group:hover .group-hover\\:active\\:scale-90:active,.group:active .group-active\\:scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--opencx-primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--opencx-accent))}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--opencx-input))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.prose-a\\:underline :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-line:underline}.prose-a\\:decoration-primary :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-color:hsl(var(--opencx-primary))}.rtl\\:-scale-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;--tw-scale-y: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&_span\\]\\:size-1 span{width:.25rem;height:.25rem}.\\[\\&_span\\]\\:bg-secondary-foreground span{background-color:hsl(var(--opencx-secondary-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\]\\:text-muted-foreground\\/70 svg{color:hsl(var(--opencx-muted-foreground) / .7)}.\\[\\&_svg\\]\\:hover\\:text-primary:hover svg{color:hsl(var(--opencx-primary))}', ro = ae.Provider, oo = ae.Root, no = ae.Trigger, Ft = J.forwardRef(({ className: e, sideOffset: o = 4, ...t }, n) => /* @__PURE__ */ r(
|
|
697
|
+
ae.Content,
|
|
547
698
|
{
|
|
548
699
|
ref: n,
|
|
549
700
|
sideOffset: o,
|
|
550
|
-
className:
|
|
701
|
+
className: h(
|
|
551
702
|
"z-50 overflow-hidden max-w-xs rounded-xl bg-primary border text-primary-foreground p-2 text-center align-middle text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
552
703
|
e
|
|
553
704
|
),
|
|
554
705
|
...t
|
|
555
706
|
}
|
|
556
707
|
));
|
|
557
|
-
|
|
558
|
-
function
|
|
708
|
+
Ft.displayName = ae.Content.displayName;
|
|
709
|
+
function oe({
|
|
559
710
|
children: e,
|
|
560
711
|
content: o,
|
|
561
712
|
side: t,
|
|
562
713
|
align: n
|
|
563
714
|
}) {
|
|
564
|
-
const { disableTooltips: s } =
|
|
565
|
-
return !o || s ? e : /* @__PURE__ */ d(
|
|
566
|
-
/* @__PURE__ */ r(
|
|
715
|
+
const { disableTooltips: s } = N();
|
|
716
|
+
return !o || s ? e : /* @__PURE__ */ d(oo, { children: [
|
|
717
|
+
/* @__PURE__ */ r(no, { asChild: !0, children: e }),
|
|
567
718
|
/* @__PURE__ */ r(
|
|
568
|
-
|
|
719
|
+
Ft,
|
|
569
720
|
{
|
|
570
721
|
side: t,
|
|
571
722
|
align: n,
|
|
@@ -576,139 +727,139 @@ function ee({
|
|
|
576
727
|
)
|
|
577
728
|
] });
|
|
578
729
|
}
|
|
579
|
-
const
|
|
580
|
-
function
|
|
581
|
-
const [e, o] =
|
|
582
|
-
return
|
|
730
|
+
const ht = 450;
|
|
731
|
+
function L() {
|
|
732
|
+
const [e, o] = W.useState(() => (window.top || window).innerWidth < ht);
|
|
733
|
+
return W.useEffect(() => {
|
|
583
734
|
const t = window.top || window, n = () => {
|
|
584
|
-
o(t.innerWidth <
|
|
735
|
+
o(t.innerWidth < ht);
|
|
585
736
|
};
|
|
586
737
|
return n(), t.addEventListener("resize", n), () => {
|
|
587
738
|
t.removeEventListener("resize", n);
|
|
588
739
|
};
|
|
589
740
|
}, []), { isSmallScreen: e };
|
|
590
741
|
}
|
|
591
|
-
const
|
|
742
|
+
const ce = {
|
|
592
743
|
transitionTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
593
744
|
transitionDuration: "1000ms"
|
|
594
745
|
};
|
|
595
|
-
function
|
|
596
|
-
var x, m,
|
|
597
|
-
const { dir: e } =
|
|
746
|
+
function G() {
|
|
747
|
+
var x, m, C, f, z, M, v, R, E, j, u, _, w, y, I, B, ie, Re, je, Ee, Pe, Oe, Ae, He, Fe, We, Le, $e, Ye, Be, Ue, Xe, qe, Ve, Ge, Ze, Ke, Qe, Je, et, tt, rt, ot, nt, st, at, it;
|
|
748
|
+
const { dir: e } = ye(), { isSmallScreen: o } = L(), { theme: t, inline: n } = N(), s = (U) => n ? "100%" : U, a = (U, ue) => o ? `100dv${U}` : ue, i = (U, ue) => s(a(U, ue)), l = {
|
|
598
749
|
zIndex: ((x = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : x.zIndex) ?? 1e7,
|
|
599
750
|
offset: {
|
|
600
|
-
bottom: ((
|
|
601
|
-
right: ((
|
|
602
|
-
left: ((
|
|
751
|
+
bottom: ((C = (m = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : m.offset) == null ? void 0 : C.bottom) ?? 20,
|
|
752
|
+
right: ((z = (f = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : f.offset) == null ? void 0 : z.right) ?? (e === "ltr" ? 20 : "initial"),
|
|
753
|
+
left: ((v = (M = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : M.offset) == null ? void 0 : v.left) ?? (e === "rtl" ? 20 : "initial")
|
|
603
754
|
},
|
|
604
755
|
size: {
|
|
605
|
-
button: ((
|
|
606
|
-
icon: ((
|
|
756
|
+
button: ((E = (R = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : R.size) == null ? void 0 : E.button) ?? 48,
|
|
757
|
+
icon: ((u = (j = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : j.size) == null ? void 0 : u.icon) ?? 24
|
|
607
758
|
}
|
|
608
759
|
}, c = (() => {
|
|
609
|
-
const
|
|
610
|
-
return typeof
|
|
611
|
-
})(),
|
|
760
|
+
const U = e === "ltr" ? l.offset.right : l.offset.left;
|
|
761
|
+
return typeof U != "number" ? 0 : U;
|
|
762
|
+
})(), p = {
|
|
612
763
|
palette: (t == null ? void 0 : t.palette) ?? "neutral",
|
|
613
764
|
primaryColor: (t == null ? void 0 : t.primaryColor) ?? "hsl(0 0% 9%)",
|
|
614
765
|
widgetTrigger: l,
|
|
615
766
|
widgetContentContainer: {
|
|
616
|
-
borderRadius: o ? "0px" : ((
|
|
617
|
-
zIndex: ((
|
|
618
|
-
outline: ((
|
|
767
|
+
borderRadius: o ? "0px" : ((_ = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : _.borderRadius) ?? "32px",
|
|
768
|
+
zIndex: ((w = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : w.zIndex) ?? l.zIndex + 1,
|
|
769
|
+
outline: ((y = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : y.outline) ?? "none",
|
|
619
770
|
// was: '1px solid'
|
|
620
|
-
outlineColor: ((
|
|
771
|
+
outlineColor: ((I = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : I.outlineColor) ?? "hsl(0 0% 50% / .5)",
|
|
621
772
|
boxShadow: ((B = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : B.boxShadow) ?? "0 0px 100px 0px rgb(0 0 0 / 0.25)",
|
|
622
|
-
transitionProperty: ((
|
|
623
|
-
transitionTimingFunction: ((
|
|
624
|
-
transitionDuration: ((
|
|
773
|
+
transitionProperty: ((ie = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : ie.transitionProperty) ?? "all",
|
|
774
|
+
transitionTimingFunction: ((Re = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : Re.transitionTimingFunction) ?? ce.transitionTimingFunction,
|
|
775
|
+
transitionDuration: ((je = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : je.transitionDuration) ?? ce.transitionDuration,
|
|
625
776
|
offset: {
|
|
626
|
-
side: o ? 0 : l.offset.bottom + l.size.button +
|
|
627
|
-
align: o ? 0 : c + (((
|
|
777
|
+
side: o ? 0 : l.offset.bottom + l.size.button + K.y * 2 + (((Pe = (Ee = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : Ee.offset) == null ? void 0 : Pe.side) ?? 10),
|
|
778
|
+
align: o ? 0 : c + (((Ae = (Oe = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : Oe.offset) == null ? void 0 : Ae.align) ?? 0)
|
|
628
779
|
}
|
|
629
780
|
},
|
|
630
781
|
screens: {
|
|
631
782
|
welcome: {
|
|
632
|
-
width:
|
|
783
|
+
width: i("w", ((Fe = (He = t == null ? void 0 : t.screens) == null ? void 0 : He.welcome) == null ? void 0 : Fe.width) ?? "400px"),
|
|
633
784
|
// By setting minHeight to 1px, a nice animation will play from 1px to the dynamic height of the content of the screen
|
|
634
|
-
minHeight:
|
|
785
|
+
minHeight: i(
|
|
635
786
|
"h",
|
|
636
|
-
((
|
|
787
|
+
((Le = (We = t == null ? void 0 : t.screens) == null ? void 0 : We.welcome) == null ? void 0 : Le.minHeight) ?? "1px"
|
|
637
788
|
)
|
|
638
789
|
},
|
|
639
790
|
sessions: {
|
|
640
|
-
width:
|
|
641
|
-
height:
|
|
791
|
+
width: i("w", ((Ye = ($e = t == null ? void 0 : t.screens) == null ? void 0 : $e.sessions) == null ? void 0 : Ye.width) ?? "450px"),
|
|
792
|
+
height: i("h", ((Ue = (Be = t == null ? void 0 : t.screens) == null ? void 0 : Be.sessions) == null ? void 0 : Ue.height) ?? "600px")
|
|
642
793
|
},
|
|
643
794
|
chat: {
|
|
644
|
-
width:
|
|
645
|
-
height:
|
|
795
|
+
width: i("w", ((qe = (Xe = t == null ? void 0 : t.screens) == null ? void 0 : Xe.chat) == null ? void 0 : qe.width) ?? "525px"),
|
|
796
|
+
height: i("h", ((Ge = (Ve = t == null ? void 0 : t.screens) == null ? void 0 : Ve.chat) == null ? void 0 : Ge.height) ?? "700px"),
|
|
646
797
|
withCanvas: {
|
|
647
|
-
width:
|
|
798
|
+
width: i(
|
|
648
799
|
"w",
|
|
649
|
-
((
|
|
800
|
+
((Qe = (Ke = (Ze = t == null ? void 0 : t.screens) == null ? void 0 : Ze.chat) == null ? void 0 : Ke.withCanvas) == null ? void 0 : Qe.width) ?? "min(1050px, 100vw)"
|
|
650
801
|
),
|
|
651
|
-
height:
|
|
802
|
+
height: i(
|
|
652
803
|
"h",
|
|
653
|
-
((
|
|
804
|
+
((tt = (et = (Je = t == null ? void 0 : t.screens) == null ? void 0 : Je.chat) == null ? void 0 : et.withCanvas) == null ? void 0 : tt.height) ?? "min(800px, 100vh)"
|
|
654
805
|
),
|
|
655
|
-
transitionTimingFunction: ((
|
|
656
|
-
transitionDuration: ((
|
|
806
|
+
transitionTimingFunction: ((nt = (ot = (rt = t == null ? void 0 : t.screens) == null ? void 0 : rt.chat) == null ? void 0 : ot.withCanvas) == null ? void 0 : nt.transitionTimingFunction) ?? ce.transitionTimingFunction,
|
|
807
|
+
transitionDuration: ((it = (at = (st = t == null ? void 0 : t.screens) == null ? void 0 : st.chat) == null ? void 0 : at.withCanvas) == null ? void 0 : it.transitionDuration) ?? ce.transitionDuration
|
|
657
808
|
}
|
|
658
809
|
}
|
|
659
810
|
}
|
|
660
|
-
},
|
|
811
|
+
}, b = {
|
|
661
812
|
// Subtract the offset.bottom twice so that it adds a bit of padding to the top
|
|
662
813
|
// Subtract the distance between the trigger and the widget content container
|
|
663
814
|
// Subtract the invisible padding of the trigger (for the wobble effect)
|
|
664
|
-
maxHeight:
|
|
815
|
+
maxHeight: i(
|
|
665
816
|
"h",
|
|
666
817
|
`calc(
|
|
667
818
|
100vh
|
|
668
|
-
- ${
|
|
669
|
-
- ${
|
|
670
|
-
- ${
|
|
819
|
+
- ${p.widgetTrigger.offset.bottom}px
|
|
820
|
+
- ${p.widgetContentContainer.offset.side}px
|
|
821
|
+
- ${K.y * 2}px
|
|
671
822
|
)`
|
|
672
823
|
),
|
|
673
824
|
// Subtract the offset.right twice so that it adds a bit of padding to the left
|
|
674
|
-
maxWidth:
|
|
825
|
+
maxWidth: i(
|
|
675
826
|
"w",
|
|
676
827
|
`calc(
|
|
677
828
|
100vw
|
|
678
829
|
- ${c * 2}px
|
|
679
830
|
)`
|
|
680
831
|
),
|
|
681
|
-
minHeight:
|
|
832
|
+
minHeight: i(
|
|
682
833
|
"h",
|
|
683
834
|
`min(
|
|
684
|
-
${
|
|
685
|
-
${
|
|
686
|
-
${
|
|
835
|
+
${p.screens.welcome.minHeight},
|
|
836
|
+
${p.screens.sessions.height},
|
|
837
|
+
${p.screens.chat.height}
|
|
687
838
|
)`
|
|
688
839
|
),
|
|
689
|
-
minWidth:
|
|
840
|
+
minWidth: i(
|
|
690
841
|
"w",
|
|
691
842
|
`min(
|
|
692
|
-
${
|
|
693
|
-
${
|
|
694
|
-
${
|
|
843
|
+
${p.screens.welcome.width},
|
|
844
|
+
${p.screens.sessions.width},
|
|
845
|
+
${p.screens.chat.width}
|
|
695
846
|
)`
|
|
696
847
|
)
|
|
697
848
|
};
|
|
698
849
|
return {
|
|
699
|
-
theme:
|
|
700
|
-
computed:
|
|
701
|
-
cssVars:
|
|
702
|
-
palette:
|
|
703
|
-
primary:
|
|
850
|
+
theme: p,
|
|
851
|
+
computed: b,
|
|
852
|
+
cssVars: so({
|
|
853
|
+
palette: p.palette,
|
|
854
|
+
primary: p.primaryColor
|
|
704
855
|
})
|
|
705
856
|
};
|
|
706
857
|
}
|
|
707
|
-
function
|
|
858
|
+
function so({
|
|
708
859
|
palette: e,
|
|
709
860
|
primary: o
|
|
710
861
|
}) {
|
|
711
|
-
const t =
|
|
862
|
+
const t = Wt(e), n = ct(o).toHsl(), s = ct(o).isLight() ? t[950] : t[50];
|
|
712
863
|
return {
|
|
713
864
|
"--opencx-primary": `${n.h} ${n.s * 100}% ${n.l * 100}%`,
|
|
714
865
|
"--opencx-primary-foreground": s,
|
|
@@ -727,7 +878,7 @@ function Vr({
|
|
|
727
878
|
"--opencx-ring": "var(--opencx-foreground)"
|
|
728
879
|
};
|
|
729
880
|
}
|
|
730
|
-
function
|
|
881
|
+
function Wt(e) {
|
|
731
882
|
const o = {
|
|
732
883
|
50: "0 0% 98%",
|
|
733
884
|
100: "0 0% 96.1%",
|
|
@@ -787,11 +938,11 @@ function Et(e) {
|
|
|
787
938
|
case "slate":
|
|
788
939
|
return s;
|
|
789
940
|
default:
|
|
790
|
-
return
|
|
941
|
+
return A(e, Wt.name), o;
|
|
791
942
|
}
|
|
792
943
|
}
|
|
793
|
-
function
|
|
794
|
-
const { contentIframeRef: e } =
|
|
944
|
+
function Lt() {
|
|
945
|
+
const { contentIframeRef: e } = P(), { inline: o } = N();
|
|
795
946
|
return {
|
|
796
947
|
setWidth: (t) => {
|
|
797
948
|
var n;
|
|
@@ -809,92 +960,92 @@ function Ot() {
|
|
|
809
960
|
}
|
|
810
961
|
};
|
|
811
962
|
}
|
|
812
|
-
function
|
|
963
|
+
function Te({
|
|
813
964
|
width: e,
|
|
814
965
|
height: o
|
|
815
966
|
}) {
|
|
816
|
-
const { isSmallScreen: t } =
|
|
817
|
-
|
|
967
|
+
const { isSmallScreen: t } = L(), { setWidth: n, setHeight: s } = Lt();
|
|
968
|
+
se(() => {
|
|
818
969
|
e && n(e), o && s(o);
|
|
819
970
|
}, [t, o, e, n, s]);
|
|
820
971
|
}
|
|
821
|
-
const
|
|
822
|
-
function
|
|
972
|
+
const mt = cr;
|
|
973
|
+
function ne({
|
|
823
974
|
name: e,
|
|
824
975
|
className: o
|
|
825
976
|
}) {
|
|
826
977
|
const t = (() => {
|
|
827
978
|
switch (e) {
|
|
828
979
|
case "Check":
|
|
829
|
-
return
|
|
980
|
+
return kr;
|
|
830
981
|
case "CheckCheck":
|
|
831
|
-
return
|
|
982
|
+
return yr;
|
|
832
983
|
case "CircleCheck":
|
|
833
|
-
return
|
|
984
|
+
return zt;
|
|
834
985
|
case "CircleCheckBig":
|
|
835
|
-
return
|
|
986
|
+
return br;
|
|
836
987
|
case "CircleX":
|
|
837
|
-
return
|
|
988
|
+
return vr;
|
|
838
989
|
case "Expand":
|
|
839
|
-
return
|
|
990
|
+
return xr;
|
|
840
991
|
case "Maximize":
|
|
841
|
-
return
|
|
992
|
+
return fr;
|
|
842
993
|
case "Maximize2":
|
|
843
|
-
return
|
|
994
|
+
return wr;
|
|
844
995
|
case "Minimize":
|
|
845
|
-
return
|
|
996
|
+
return gr;
|
|
846
997
|
case "Minimize2":
|
|
847
|
-
return
|
|
998
|
+
return ur;
|
|
848
999
|
case "Shrink":
|
|
849
|
-
return
|
|
1000
|
+
return mr;
|
|
850
1001
|
case "SquareCheck":
|
|
851
|
-
return
|
|
1002
|
+
return hr;
|
|
852
1003
|
case "SquareCheckBig":
|
|
853
|
-
return
|
|
1004
|
+
return pr;
|
|
854
1005
|
case "SquareX":
|
|
855
|
-
return
|
|
1006
|
+
return dr;
|
|
856
1007
|
case "X":
|
|
857
|
-
return
|
|
1008
|
+
return ke;
|
|
858
1009
|
case void 0:
|
|
859
|
-
return
|
|
1010
|
+
return mt;
|
|
860
1011
|
default:
|
|
861
|
-
return
|
|
1012
|
+
return A(e, ne.name), mt;
|
|
862
1013
|
}
|
|
863
1014
|
})();
|
|
864
|
-
return /* @__PURE__ */ r(t, { className:
|
|
1015
|
+
return /* @__PURE__ */ r(t, { className: h("size-4", o) });
|
|
865
1016
|
}
|
|
866
|
-
function
|
|
1017
|
+
function ao() {
|
|
867
1018
|
var t;
|
|
868
|
-
const e =
|
|
1019
|
+
const e = te(), o = (t = e.config.customComponents) == null ? void 0 : t.headerBottom;
|
|
869
1020
|
return o ? /* @__PURE__ */ r(o, { ...e }) : null;
|
|
870
1021
|
}
|
|
871
|
-
function
|
|
1022
|
+
function io({ fallback: e }) {
|
|
872
1023
|
var n;
|
|
873
|
-
const o =
|
|
1024
|
+
const o = te(), t = (n = o.config.customComponents) == null ? void 0 : n.headerTitle;
|
|
874
1025
|
return t ? /* @__PURE__ */ r(t, { ...o }) : e;
|
|
875
1026
|
}
|
|
876
|
-
function
|
|
1027
|
+
function Me() {
|
|
877
1028
|
const {
|
|
878
1029
|
widgetCtx: { org: e }
|
|
879
|
-
} =
|
|
1030
|
+
} = P(), {
|
|
880
1031
|
routerState: { screen: o }
|
|
881
|
-
} =
|
|
1032
|
+
} = H(), { textContent: t } = N();
|
|
882
1033
|
return (() => {
|
|
883
|
-
var s,
|
|
1034
|
+
var s, a;
|
|
884
1035
|
switch (o) {
|
|
885
1036
|
case "chat":
|
|
886
1037
|
return (s = t == null ? void 0 : t.chatScreen) == null ? void 0 : s.headerTitle;
|
|
887
1038
|
case "sessions":
|
|
888
|
-
return (
|
|
1039
|
+
return (a = t == null ? void 0 : t.sessionsScreen) == null ? void 0 : a.headerTitle;
|
|
889
1040
|
case "welcome":
|
|
890
1041
|
return;
|
|
891
1042
|
default:
|
|
892
|
-
|
|
1043
|
+
A(o, Me.name);
|
|
893
1044
|
return;
|
|
894
1045
|
}
|
|
895
1046
|
})() ?? e.name ?? "Chat";
|
|
896
1047
|
}
|
|
897
|
-
function
|
|
1048
|
+
function lo(e) {
|
|
898
1049
|
switch (e) {
|
|
899
1050
|
case "chat":
|
|
900
1051
|
return g("chat/header");
|
|
@@ -903,32 +1054,32 @@ function Qr(e) {
|
|
|
903
1054
|
case "welcome":
|
|
904
1055
|
return;
|
|
905
1056
|
default:
|
|
906
|
-
|
|
1057
|
+
A(e, Me.name);
|
|
907
1058
|
return;
|
|
908
1059
|
}
|
|
909
1060
|
}
|
|
910
|
-
function
|
|
911
|
-
const { router: e } =
|
|
1061
|
+
function co() {
|
|
1062
|
+
const { router: e } = N(), {
|
|
912
1063
|
routerState: { screen: o },
|
|
913
1064
|
toSessionsScreen: t
|
|
914
|
-
} =
|
|
1065
|
+
} = H();
|
|
915
1066
|
return o !== "chat" || e != null && e.chatScreenOnly ? null : /* @__PURE__ */ r(
|
|
916
|
-
|
|
1067
|
+
S,
|
|
917
1068
|
{
|
|
918
1069
|
variant: "ghost",
|
|
919
1070
|
size: "fit",
|
|
920
1071
|
className: "rounded-full",
|
|
921
1072
|
onClick: t,
|
|
922
|
-
children: /* @__PURE__ */ r(
|
|
1073
|
+
children: /* @__PURE__ */ r(Cr, { className: "size-4 rtl:-scale-100" })
|
|
923
1074
|
}
|
|
924
1075
|
);
|
|
925
1076
|
}
|
|
926
|
-
function
|
|
1077
|
+
function po({
|
|
927
1078
|
button: e
|
|
928
1079
|
}) {
|
|
929
|
-
const { setIsOpen: o } =
|
|
1080
|
+
const { setIsOpen: o } = V(), { isSmallScreen: t } = L();
|
|
930
1081
|
return t && e.hideOnSmallScreen || !t && e.hideOnLargeScreen ? null : /* @__PURE__ */ r(
|
|
931
|
-
|
|
1082
|
+
S,
|
|
932
1083
|
{
|
|
933
1084
|
variant: "ghost",
|
|
934
1085
|
size: "fit",
|
|
@@ -937,50 +1088,50 @@ function Jr({
|
|
|
937
1088
|
if (e.handleClick) return e.handleClick();
|
|
938
1089
|
o(!1);
|
|
939
1090
|
},
|
|
940
|
-
children: /* @__PURE__ */ r(
|
|
1091
|
+
children: /* @__PURE__ */ r(ne, { name: e.icon })
|
|
941
1092
|
}
|
|
942
1093
|
);
|
|
943
1094
|
}
|
|
944
|
-
function
|
|
1095
|
+
function ve({
|
|
945
1096
|
button: e
|
|
946
1097
|
}) {
|
|
947
|
-
const [o, t] =
|
|
1098
|
+
const [o, t] = D(!1), {
|
|
948
1099
|
routerState: { screen: n }
|
|
949
|
-
} =
|
|
1100
|
+
} = H(), { isSmallScreen: s } = L(), { theme: a } = G(), { setWidth: i, setHeight: l } = Lt();
|
|
950
1101
|
if (n !== "chat" && n !== "sessions") return null;
|
|
951
1102
|
const c = (() => {
|
|
952
1103
|
switch (n) {
|
|
953
1104
|
case "chat":
|
|
954
|
-
return
|
|
1105
|
+
return a.screens.chat.height;
|
|
955
1106
|
case "sessions":
|
|
956
|
-
return
|
|
1107
|
+
return a.screens.sessions.height;
|
|
957
1108
|
default:
|
|
958
|
-
return
|
|
1109
|
+
return A(n, ve.name), a.screens.chat.height;
|
|
959
1110
|
}
|
|
960
|
-
})(),
|
|
1111
|
+
})(), p = (() => {
|
|
961
1112
|
switch (n) {
|
|
962
1113
|
case "chat":
|
|
963
|
-
return
|
|
1114
|
+
return a.screens.chat.width;
|
|
964
1115
|
case "sessions":
|
|
965
|
-
return
|
|
1116
|
+
return a.screens.sessions.width;
|
|
966
1117
|
default:
|
|
967
|
-
return
|
|
1118
|
+
return A(n, ve.name), a.screens.chat.width;
|
|
968
1119
|
}
|
|
969
|
-
})(),
|
|
1120
|
+
})(), b = () => {
|
|
970
1121
|
t((x) => {
|
|
971
1122
|
const m = !x;
|
|
972
|
-
return l(m ? "100vh" : c),
|
|
1123
|
+
return l(m ? "100vh" : c), i(m ? `max(40vw, ${p})` : p), m;
|
|
973
1124
|
});
|
|
974
1125
|
};
|
|
975
1126
|
return s && e.hideOnSmallScreen || !s && e.hideOnLargeScreen ? null : /* @__PURE__ */ r(
|
|
976
|
-
|
|
1127
|
+
S,
|
|
977
1128
|
{
|
|
978
1129
|
variant: "ghost",
|
|
979
1130
|
size: "fit",
|
|
980
1131
|
className: "rounded-full",
|
|
981
|
-
onClick:
|
|
1132
|
+
onClick: b,
|
|
982
1133
|
children: /* @__PURE__ */ r(
|
|
983
|
-
|
|
1134
|
+
ne,
|
|
984
1135
|
{
|
|
985
1136
|
name: e.icon || (o ? e.shrinkIcon : e.expandIcon)
|
|
986
1137
|
}
|
|
@@ -988,14 +1139,14 @@ function we({
|
|
|
988
1139
|
}
|
|
989
1140
|
);
|
|
990
1141
|
}
|
|
991
|
-
function
|
|
1142
|
+
function $t({
|
|
992
1143
|
button: e
|
|
993
1144
|
}) {
|
|
994
|
-
var
|
|
995
|
-
const { close: o } =
|
|
996
|
-
const { success:
|
|
997
|
-
if (o(), !
|
|
998
|
-
switch (
|
|
1145
|
+
var z, M;
|
|
1146
|
+
const { close: o } = me(), { widgetCtx: t } = P(), { setIsOpen: n } = V(), { resolveSession: s, sessionState: a } = Y(), { isSmallScreen: i } = L(), l = !a.session, c = ((z = a.session) == null ? void 0 : z.isOpened) === !1, p = e.onResolved || "stay-in-chat", b = e.behaviorBeforeSessionCreation || "disabled", x = e.behaviorIfSessionIsResolved || "disabled", m = !!(a.isResolvingSession || l && b === "disabled" || c && x === "disabled"), C = async () => {
|
|
1147
|
+
const { success: v, error: R } = await s();
|
|
1148
|
+
if (o(), !v) return console.error(R);
|
|
1149
|
+
switch (p) {
|
|
999
1150
|
case "stay-in-chat":
|
|
1000
1151
|
return;
|
|
1001
1152
|
case "close-widget":
|
|
@@ -1008,21 +1159,21 @@ function Pt({
|
|
|
1008
1159
|
n(!1), t.resetChat();
|
|
1009
1160
|
break;
|
|
1010
1161
|
default:
|
|
1011
|
-
|
|
1162
|
+
A(p, $t.name);
|
|
1012
1163
|
break;
|
|
1013
1164
|
}
|
|
1014
|
-
},
|
|
1165
|
+
}, f = () => {
|
|
1015
1166
|
if (l)
|
|
1016
|
-
switch (
|
|
1167
|
+
switch (b) {
|
|
1017
1168
|
case "disabled":
|
|
1018
1169
|
return;
|
|
1019
1170
|
case "close-widget":
|
|
1020
1171
|
n(!1);
|
|
1021
1172
|
break;
|
|
1022
1173
|
default:
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1174
|
+
A(
|
|
1175
|
+
b,
|
|
1176
|
+
f.name
|
|
1026
1177
|
);
|
|
1027
1178
|
}
|
|
1028
1179
|
if (c)
|
|
@@ -1041,44 +1192,44 @@ function Pt({
|
|
|
1041
1192
|
}, 200);
|
|
1042
1193
|
break;
|
|
1043
1194
|
default:
|
|
1044
|
-
|
|
1195
|
+
A(
|
|
1045
1196
|
x,
|
|
1046
|
-
|
|
1197
|
+
f.name
|
|
1047
1198
|
);
|
|
1048
1199
|
}
|
|
1049
1200
|
};
|
|
1050
|
-
return
|
|
1051
|
-
|
|
1201
|
+
return i && e.hideOnSmallScreen || !i && e.hideOnLargeScreen ? null : ((M = e.confirmation) == null ? void 0 : M.type) === "modal" && !c && !l ? /* @__PURE__ */ r(
|
|
1202
|
+
ze,
|
|
1052
1203
|
{
|
|
1053
1204
|
trigger: /* @__PURE__ */ r(
|
|
1054
|
-
|
|
1205
|
+
S,
|
|
1055
1206
|
{
|
|
1056
1207
|
variant: "ghost",
|
|
1057
1208
|
size: "fit",
|
|
1058
1209
|
className: "rounded-full",
|
|
1059
1210
|
disabled: m,
|
|
1060
|
-
children: /* @__PURE__ */ r(
|
|
1211
|
+
children: /* @__PURE__ */ r(ne, { name: e.icon })
|
|
1061
1212
|
}
|
|
1062
1213
|
),
|
|
1063
|
-
children: /* @__PURE__ */ d(
|
|
1064
|
-
/* @__PURE__ */ r(
|
|
1065
|
-
/* @__PURE__ */ r(
|
|
1066
|
-
/* @__PURE__ */ d(
|
|
1214
|
+
children: /* @__PURE__ */ d(Ce, { children: [
|
|
1215
|
+
/* @__PURE__ */ r(Mt, { children: /* @__PURE__ */ r(jt, { children: e.confirmation.title || "Close conversation" }) }),
|
|
1216
|
+
/* @__PURE__ */ r(Dt, { children: /* @__PURE__ */ r(Et, { children: e.confirmation.description || "Are you sure you want to close this conversation?" }) }),
|
|
1217
|
+
/* @__PURE__ */ d(Rt, { children: [
|
|
1067
1218
|
/* @__PURE__ */ r(
|
|
1068
|
-
|
|
1219
|
+
S,
|
|
1069
1220
|
{
|
|
1070
1221
|
variant: "secondary",
|
|
1071
1222
|
onClick: o,
|
|
1072
|
-
disabled:
|
|
1223
|
+
disabled: a.isResolvingSession,
|
|
1073
1224
|
children: e.confirmation.cancelButtonText || "No"
|
|
1074
1225
|
}
|
|
1075
1226
|
),
|
|
1076
1227
|
/* @__PURE__ */ r(
|
|
1077
|
-
|
|
1228
|
+
S,
|
|
1078
1229
|
{
|
|
1079
1230
|
variant: "destructive",
|
|
1080
|
-
onClick:
|
|
1081
|
-
disabled:
|
|
1231
|
+
onClick: C,
|
|
1232
|
+
disabled: a.isResolvingSession,
|
|
1082
1233
|
children: e.confirmation.confirmButtonText || "Yes"
|
|
1083
1234
|
}
|
|
1084
1235
|
)
|
|
@@ -1086,92 +1237,92 @@ function Pt({
|
|
|
1086
1237
|
] })
|
|
1087
1238
|
}
|
|
1088
1239
|
) : /* @__PURE__ */ r(
|
|
1089
|
-
|
|
1240
|
+
S,
|
|
1090
1241
|
{
|
|
1091
1242
|
variant: "ghost",
|
|
1092
1243
|
size: "fit",
|
|
1093
1244
|
className: "rounded-full",
|
|
1094
|
-
onClick: c || l ?
|
|
1245
|
+
onClick: c || l ? f : C,
|
|
1095
1246
|
disabled: m,
|
|
1096
|
-
children: /* @__PURE__ */ r(
|
|
1247
|
+
children: /* @__PURE__ */ r(ne, { name: e.icon })
|
|
1097
1248
|
}
|
|
1098
1249
|
);
|
|
1099
1250
|
}
|
|
1100
|
-
function
|
|
1251
|
+
function be({ button: e }) {
|
|
1101
1252
|
switch (e.functionality) {
|
|
1102
1253
|
case "close-widget":
|
|
1103
|
-
return /* @__PURE__ */ r(
|
|
1254
|
+
return /* @__PURE__ */ r(po, { button: e });
|
|
1104
1255
|
case "expand-shrink":
|
|
1105
|
-
return /* @__PURE__ */ r(
|
|
1256
|
+
return /* @__PURE__ */ r(ve, { button: e });
|
|
1106
1257
|
case "resolve-session":
|
|
1107
|
-
return /* @__PURE__ */ r(
|
|
1258
|
+
return /* @__PURE__ */ r($t, { button: e });
|
|
1108
1259
|
default:
|
|
1109
|
-
return
|
|
1260
|
+
return A(e, be.name), null;
|
|
1110
1261
|
}
|
|
1111
1262
|
}
|
|
1112
|
-
const
|
|
1263
|
+
const ho = {
|
|
1113
1264
|
functionality: "close-widget",
|
|
1114
1265
|
hideOnLargeScreen: !0,
|
|
1115
1266
|
icon: "X"
|
|
1116
1267
|
};
|
|
1117
|
-
function
|
|
1268
|
+
function mo() {
|
|
1118
1269
|
const {
|
|
1119
1270
|
routerState: { screen: e }
|
|
1120
|
-
} =
|
|
1121
|
-
return !t || t.length === 0 ? /* @__PURE__ */ r(
|
|
1122
|
-
|
|
1271
|
+
} = H(), { headerButtons: o } = N(), t = e === "chat" ? o == null ? void 0 : o.chatScreen : e === "sessions" ? o == null ? void 0 : o.sessionsScreen : [];
|
|
1272
|
+
return !t || t.length === 0 ? /* @__PURE__ */ r(be, { button: ho }) : /* @__PURE__ */ r(Q, { children: t.map((n) => /* @__PURE__ */ r(
|
|
1273
|
+
be,
|
|
1123
1274
|
{
|
|
1124
1275
|
button: n
|
|
1125
1276
|
},
|
|
1126
1277
|
`${n.functionality}-${n.icon}`
|
|
1127
1278
|
)) });
|
|
1128
1279
|
}
|
|
1129
|
-
function
|
|
1280
|
+
function Yt() {
|
|
1130
1281
|
const {
|
|
1131
1282
|
routerState: { screen: e }
|
|
1132
|
-
} =
|
|
1283
|
+
} = H(), o = lo(e), t = Me();
|
|
1133
1284
|
return /* @__PURE__ */ d("header", { ...o, className: "py-2 px-4 shrink-0", children: [
|
|
1134
1285
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
1135
|
-
/* @__PURE__ */ r(
|
|
1286
|
+
/* @__PURE__ */ r(co, {}),
|
|
1136
1287
|
/* @__PURE__ */ r(
|
|
1137
1288
|
"div",
|
|
1138
1289
|
{
|
|
1139
|
-
className:
|
|
1290
|
+
className: h(
|
|
1140
1291
|
"flex-1 h-8 flex items-center",
|
|
1141
1292
|
e === "sessions" && "ps-2"
|
|
1142
1293
|
),
|
|
1143
1294
|
children: /* @__PURE__ */ r(
|
|
1144
|
-
|
|
1295
|
+
io,
|
|
1145
1296
|
{
|
|
1146
1297
|
fallback: /* @__PURE__ */ r("h2", { className: "font-semibold", children: t })
|
|
1147
1298
|
}
|
|
1148
1299
|
)
|
|
1149
1300
|
}
|
|
1150
1301
|
),
|
|
1151
|
-
/* @__PURE__ */ r(
|
|
1302
|
+
/* @__PURE__ */ r(mo, {})
|
|
1152
1303
|
] }),
|
|
1153
|
-
/* @__PURE__ */ r(
|
|
1304
|
+
/* @__PURE__ */ r(ao, {})
|
|
1154
1305
|
] });
|
|
1155
1306
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return /* @__PURE__ */ r(
|
|
1307
|
+
function Bt({ className: e }) {
|
|
1308
|
+
return /* @__PURE__ */ r(zr, { className: h("size-4 animate-spin", e) });
|
|
1158
1309
|
}
|
|
1159
|
-
function
|
|
1310
|
+
function uo() {
|
|
1160
1311
|
const {
|
|
1161
1312
|
messagesState: { isInitialFetchLoading: e }
|
|
1162
|
-
} =
|
|
1313
|
+
} = O(), { isSmallScreen: o } = L(), { activeMode: t, Component: n } = bt();
|
|
1163
1314
|
return {
|
|
1164
1315
|
isCanvasOpen: !e && !o && !!t && !!n
|
|
1165
1316
|
};
|
|
1166
1317
|
}
|
|
1167
|
-
function
|
|
1168
|
-
const e =
|
|
1318
|
+
function go() {
|
|
1319
|
+
const e = te(), { activeMode: o, Component: t } = bt(), { sendMessage: n } = O(), { createStateCheckpoint: s } = Y(), [a, i] = D(!1), l = async (c) => {
|
|
1169
1320
|
try {
|
|
1170
|
-
|
|
1171
|
-
} catch (
|
|
1172
|
-
console.error(
|
|
1321
|
+
i(!0), await n(c);
|
|
1322
|
+
} catch (p) {
|
|
1323
|
+
console.error(p);
|
|
1173
1324
|
} finally {
|
|
1174
|
-
|
|
1325
|
+
i(!1);
|
|
1175
1326
|
}
|
|
1176
1327
|
};
|
|
1177
1328
|
return !o || !t ? null : /* @__PURE__ */ r(
|
|
@@ -1181,19 +1332,19 @@ function oo() {
|
|
|
1181
1332
|
mode: o,
|
|
1182
1333
|
createStateCheckpoint: s,
|
|
1183
1334
|
sendMessage: l,
|
|
1184
|
-
isSendingMessage:
|
|
1335
|
+
isSendingMessage: a
|
|
1185
1336
|
}
|
|
1186
1337
|
);
|
|
1187
1338
|
}
|
|
1188
|
-
const
|
|
1339
|
+
const F = W.forwardRef(
|
|
1189
1340
|
(e, o) => {
|
|
1190
1341
|
var t, n, s;
|
|
1191
1342
|
return /* @__PURE__ */ r(
|
|
1192
|
-
|
|
1343
|
+
k,
|
|
1193
1344
|
{
|
|
1194
1345
|
...e,
|
|
1195
1346
|
ref: o,
|
|
1196
|
-
className:
|
|
1347
|
+
className: h("overflow-hidden", e.className),
|
|
1197
1348
|
overrides: {
|
|
1198
1349
|
initial: { height: 0, opacity: 0, ...(t = e.overrides) == null ? void 0 : t.initial },
|
|
1199
1350
|
animate: { height: "auto", opacity: 1, ...(n = e.overrides) == null ? void 0 : n.animate },
|
|
@@ -1203,8 +1354,8 @@ const P = L.forwardRef(
|
|
|
1203
1354
|
);
|
|
1204
1355
|
}
|
|
1205
1356
|
);
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1357
|
+
F.displayName = "MotionDiv__VerticalReveal";
|
|
1358
|
+
const wo = [
|
|
1208
1359
|
{
|
|
1209
1360
|
label: "Terrible",
|
|
1210
1361
|
value: 1,
|
|
@@ -1231,59 +1382,59 @@ const no = [
|
|
|
1231
1382
|
emoji: "😍"
|
|
1232
1383
|
}
|
|
1233
1384
|
];
|
|
1234
|
-
function
|
|
1235
|
-
const { isSmallScreen: e } =
|
|
1385
|
+
function fo() {
|
|
1386
|
+
const { isSmallScreen: e } = L(), {
|
|
1236
1387
|
submitCsat: o,
|
|
1237
1388
|
isCsatRequested: t,
|
|
1238
1389
|
isCsatSubmitted: n,
|
|
1239
1390
|
submittedScore: s,
|
|
1240
|
-
submittedFeedback:
|
|
1241
|
-
} =
|
|
1242
|
-
l((
|
|
1391
|
+
submittedFeedback: a
|
|
1392
|
+
} = yt(), [i, l] = D(null), [c, p] = D(null), b = (m) => {
|
|
1393
|
+
l((C) => C === m ? null : m);
|
|
1243
1394
|
}, x = () => {
|
|
1244
|
-
|
|
1245
|
-
score:
|
|
1395
|
+
i && o({
|
|
1396
|
+
score: i,
|
|
1246
1397
|
feedback: c || void 0
|
|
1247
1398
|
});
|
|
1248
1399
|
};
|
|
1249
1400
|
return !t && !n ? null : /* @__PURE__ */ d("div", { className: "w-1/2 min-w-80 max-w-96 mx-auto overflow-hidden", children: [
|
|
1250
|
-
/* @__PURE__ */ r(
|
|
1401
|
+
/* @__PURE__ */ r(T, { mode: "wait", children: t && !i ? /* @__PURE__ */ r(F, { children: /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground text-center pt-2", children: "How was your conversation?" }) }, "csat-requested-title") : n ? /* @__PURE__ */ r(F, { children: /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground text-center pt-2", children: "You rated the conversation as" }) }, "csat-submitted-title") : null }),
|
|
1251
1402
|
/* @__PURE__ */ r(
|
|
1252
1403
|
"div",
|
|
1253
1404
|
{
|
|
1254
|
-
className:
|
|
1405
|
+
className: h(
|
|
1255
1406
|
"flex gap-4 justify-between pt-2 px-2 pb-2",
|
|
1256
1407
|
"transition-all",
|
|
1257
1408
|
n && "gap-0 justify-center"
|
|
1258
1409
|
),
|
|
1259
|
-
children:
|
|
1260
|
-
|
|
1410
|
+
children: wo.map((m) => /* @__PURE__ */ r(
|
|
1411
|
+
S,
|
|
1261
1412
|
{
|
|
1262
|
-
variant: m.value ===
|
|
1413
|
+
variant: m.value === i ? "secondary" : "ghost",
|
|
1263
1414
|
size: "selfless",
|
|
1264
|
-
className:
|
|
1415
|
+
className: h(
|
|
1265
1416
|
"transition-all overflow-hidden",
|
|
1266
1417
|
"text-2xl size-8 rounded-full",
|
|
1267
1418
|
"opacity-35",
|
|
1268
1419
|
"hover:opacity-100",
|
|
1269
|
-
!
|
|
1270
|
-
m.value ===
|
|
1420
|
+
!i && "opacity-100",
|
|
1421
|
+
m.value === i && "opacity-100",
|
|
1271
1422
|
n && m.value !== s && "opacity-0 size-0",
|
|
1272
1423
|
n && m.value === s && "opacity-100 size-fit text-4xl"
|
|
1273
1424
|
),
|
|
1274
|
-
onClick: t ? () =>
|
|
1425
|
+
onClick: t ? () => b(m.value) : void 0,
|
|
1275
1426
|
children: m.emoji
|
|
1276
1427
|
},
|
|
1277
1428
|
m.value
|
|
1278
1429
|
))
|
|
1279
1430
|
}
|
|
1280
1431
|
),
|
|
1281
|
-
/* @__PURE__ */ r(
|
|
1432
|
+
/* @__PURE__ */ r(T, { mode: "wait", children: (i || s) && /* @__PURE__ */ r(F, { children: /* @__PURE__ */ d("div", { className: "pb-2 px-2 flex items-end", children: [
|
|
1282
1433
|
/* @__PURE__ */ r(
|
|
1283
1434
|
"textarea",
|
|
1284
1435
|
{
|
|
1285
1436
|
rows: 3,
|
|
1286
|
-
className:
|
|
1437
|
+
className: h(
|
|
1287
1438
|
"transition-all",
|
|
1288
1439
|
"max-h-40 [field-sizing:content]",
|
|
1289
1440
|
"w-full resize-none",
|
|
@@ -1293,72 +1444,72 @@ function so() {
|
|
|
1293
1444
|
e ? "text-[16px]" : "text-sm",
|
|
1294
1445
|
n && "text-center"
|
|
1295
1446
|
),
|
|
1296
|
-
value: n ?
|
|
1297
|
-
onChange: t ? (m) =>
|
|
1447
|
+
value: n ? a || "" : c || "",
|
|
1448
|
+
onChange: t ? (m) => p(m.target.value) : void 0,
|
|
1298
1449
|
readOnly: n,
|
|
1299
1450
|
placeholder: t ? "Tell us more... (optional)" : void 0
|
|
1300
1451
|
}
|
|
1301
1452
|
),
|
|
1302
1453
|
/* @__PURE__ */ r(
|
|
1303
|
-
|
|
1454
|
+
S,
|
|
1304
1455
|
{
|
|
1305
1456
|
size: "fit",
|
|
1306
1457
|
onClick: x,
|
|
1307
|
-
disabled: !
|
|
1308
|
-
className:
|
|
1458
|
+
disabled: !i,
|
|
1459
|
+
className: h(
|
|
1309
1460
|
"transition-all overflow-hidden",
|
|
1310
1461
|
"rounded-full size-8 flex items-center justify-center p-0",
|
|
1311
1462
|
n && "opacity-0 size-0"
|
|
1312
1463
|
),
|
|
1313
|
-
children: /* @__PURE__ */ r(
|
|
1464
|
+
children: /* @__PURE__ */ r(Nt, { className: "size-4" })
|
|
1314
1465
|
}
|
|
1315
1466
|
)
|
|
1316
1467
|
] }) }, "feedback-box") }),
|
|
1317
|
-
/* @__PURE__ */ r("div", { className:
|
|
1468
|
+
/* @__PURE__ */ r("div", { className: h("h-0 transition-[height]", n && "h-4") })
|
|
1318
1469
|
] });
|
|
1319
1470
|
}
|
|
1320
|
-
function
|
|
1321
|
-
const { dir: e } =
|
|
1322
|
-
return
|
|
1323
|
-
const t =
|
|
1471
|
+
function Z() {
|
|
1472
|
+
const { dir: e } = ye(), o = N();
|
|
1473
|
+
return vt(() => {
|
|
1474
|
+
const t = Hr(o.language) ? o.language : "en";
|
|
1324
1475
|
return {
|
|
1325
|
-
t: (n) =>
|
|
1476
|
+
t: (n) => Fr(n, t, o.translationOverrides),
|
|
1326
1477
|
language: t,
|
|
1327
1478
|
dir: t === "ar" ? "rtl" : "ltr",
|
|
1328
1479
|
hostDocumentDir: e
|
|
1329
1480
|
};
|
|
1330
1481
|
}, [o.language, e]);
|
|
1331
1482
|
}
|
|
1332
|
-
function
|
|
1483
|
+
function De({
|
|
1333
1484
|
suggestion: e,
|
|
1334
1485
|
className: o,
|
|
1335
1486
|
...t
|
|
1336
1487
|
}) {
|
|
1337
|
-
const { sendMessage: n } =
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1488
|
+
const { sendMessage: n } = O(), s = () => {
|
|
1489
|
+
const a = e.trim();
|
|
1490
|
+
a && n({ content: a });
|
|
1340
1491
|
};
|
|
1341
1492
|
return /* @__PURE__ */ r(
|
|
1342
|
-
|
|
1493
|
+
S,
|
|
1343
1494
|
{
|
|
1344
1495
|
...g("chat/suggested_reply_btn"),
|
|
1345
1496
|
size: "sm",
|
|
1346
|
-
className:
|
|
1497
|
+
className: h("rounded-xl w-fit", o),
|
|
1347
1498
|
...t,
|
|
1348
1499
|
onClick: s,
|
|
1349
1500
|
children: e
|
|
1350
1501
|
}
|
|
1351
1502
|
);
|
|
1352
1503
|
}
|
|
1353
|
-
function
|
|
1354
|
-
const { t: e } =
|
|
1504
|
+
function xo() {
|
|
1505
|
+
const { t: e } = Z(), o = [e("i_need_more_help"), e("this_was_helpful")];
|
|
1355
1506
|
return /* @__PURE__ */ r(
|
|
1356
1507
|
"div",
|
|
1357
1508
|
{
|
|
1358
1509
|
...g("chat/might_solve_user_issue_suggested_replies_container"),
|
|
1359
1510
|
className: "flex items-center gap-2 p-2 pb-0 flex-wrap",
|
|
1360
1511
|
children: o.map((t) => /* @__PURE__ */ r(
|
|
1361
|
-
|
|
1512
|
+
De,
|
|
1362
1513
|
{
|
|
1363
1514
|
suggestion: t,
|
|
1364
1515
|
className: "flex-1"
|
|
@@ -1368,28 +1519,28 @@ function ao() {
|
|
|
1368
1519
|
}
|
|
1369
1520
|
);
|
|
1370
1521
|
}
|
|
1371
|
-
function
|
|
1372
|
-
const { sessionState: e } =
|
|
1373
|
-
return /* @__PURE__ */ r(
|
|
1522
|
+
function ut() {
|
|
1523
|
+
const { sessionState: e } = Y(), { chatFooterItems: o } = N(), t = !!e.session && !e.session.isOpened, n = !t;
|
|
1524
|
+
return /* @__PURE__ */ r(T, { mode: "wait", children: o == null ? void 0 : o.map((s, a) => s.showWhenSessionIsOpen === !1 && n || s.showWhenSessionIsResolved === !1 && t ? null : /* @__PURE__ */ r(F, { children: /* @__PURE__ */ r("div", { className: "pb-2 text-center text-xs", children: /* @__PURE__ */ r(Ne, { children: s.message }) }) }, `${s.message}-${a}`)) });
|
|
1374
1525
|
}
|
|
1375
|
-
function
|
|
1526
|
+
function vo({
|
|
1376
1527
|
file: { status: e, file: o, error: t },
|
|
1377
1528
|
onCancel: n
|
|
1378
1529
|
}) {
|
|
1379
|
-
const [s,
|
|
1530
|
+
const [s, a] = D(
|
|
1380
1531
|
null
|
|
1381
1532
|
);
|
|
1382
|
-
|
|
1533
|
+
se(() => {
|
|
1383
1534
|
if (!o.type.startsWith("image/")) return;
|
|
1384
1535
|
const c = new FileReader();
|
|
1385
|
-
return c.onload = () =>
|
|
1536
|
+
return c.onload = () => a(c.result), c.onerror = () => console.error("Error reading file"), c.readAsDataURL(o), () => c.abort();
|
|
1386
1537
|
}, [o]);
|
|
1387
|
-
const
|
|
1538
|
+
const i = () => {
|
|
1388
1539
|
switch (e) {
|
|
1389
1540
|
case "uploading":
|
|
1390
|
-
return /* @__PURE__ */ r(
|
|
1541
|
+
return /* @__PURE__ */ r(Tr, { className: "size-4 animate-spin" });
|
|
1391
1542
|
case "error":
|
|
1392
|
-
return /* @__PURE__ */ r(
|
|
1543
|
+
return /* @__PURE__ */ r(Ir, { className: "size-4 text-destructive" });
|
|
1393
1544
|
default:
|
|
1394
1545
|
return null;
|
|
1395
1546
|
}
|
|
@@ -1402,10 +1553,10 @@ function io({
|
|
|
1402
1553
|
className: "object-cover bg-secondary size-full",
|
|
1403
1554
|
alt: o.name
|
|
1404
1555
|
}
|
|
1405
|
-
) : c === "audio" ? /* @__PURE__ */ r(
|
|
1556
|
+
) : c === "audio" ? /* @__PURE__ */ r(Mr, {}) : c === "video" ? /* @__PURE__ */ r(Dr, {}) : /* @__PURE__ */ r(Rr, {});
|
|
1406
1557
|
};
|
|
1407
1558
|
return /* @__PURE__ */ r(
|
|
1408
|
-
|
|
1559
|
+
oe,
|
|
1409
1560
|
{
|
|
1410
1561
|
side: "bottom",
|
|
1411
1562
|
content: e === "error" ? /* @__PURE__ */ d("span", { className: "text-destructive", children: [
|
|
@@ -1415,25 +1566,25 @@ function io({
|
|
|
1415
1566
|
children: /* @__PURE__ */ d(
|
|
1416
1567
|
"div",
|
|
1417
1568
|
{
|
|
1418
|
-
className:
|
|
1569
|
+
className: h(
|
|
1419
1570
|
e === "uploading" && "opacity-50",
|
|
1420
1571
|
"group",
|
|
1421
1572
|
"size-12 border rounded-2xl overflow-hidden relative",
|
|
1422
1573
|
"flex items-center justify-center shrink-0"
|
|
1423
1574
|
),
|
|
1424
1575
|
children: [
|
|
1425
|
-
/* @__PURE__ */ r("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
1576
|
+
/* @__PURE__ */ r("div", { className: "absolute inset-0 flex items-center justify-center", children: i() }),
|
|
1426
1577
|
/* @__PURE__ */ r(
|
|
1427
1578
|
"button",
|
|
1428
1579
|
{
|
|
1429
1580
|
type: "button",
|
|
1430
|
-
className:
|
|
1581
|
+
className: h(
|
|
1431
1582
|
"absolute bg-black/50 inset-0 size-full z-10 opacity-0",
|
|
1432
1583
|
"flex items-center justify-center",
|
|
1433
1584
|
"opacity-0 group-hover:opacity-100 transition"
|
|
1434
1585
|
),
|
|
1435
1586
|
onClick: n,
|
|
1436
|
-
children: /* @__PURE__ */ r(
|
|
1587
|
+
children: /* @__PURE__ */ r(ke, { className: "size-4 text-primary-foreground" })
|
|
1437
1588
|
}
|
|
1438
1589
|
),
|
|
1439
1590
|
/* @__PURE__ */ r(l, {})
|
|
@@ -1443,47 +1594,47 @@ function io({
|
|
|
1443
1594
|
}
|
|
1444
1595
|
);
|
|
1445
1596
|
}
|
|
1446
|
-
function
|
|
1447
|
-
var
|
|
1448
|
-
const { isSmallScreen: e } =
|
|
1597
|
+
function bo() {
|
|
1598
|
+
var _;
|
|
1599
|
+
const { isSmallScreen: e } = L(), o = $(null), { sendMessage: t } = O(), { sessionState: n } = Y(), { t: s } = Z(), [a, i] = D(""), {
|
|
1449
1600
|
allFiles: l,
|
|
1450
1601
|
emptyTheFiles: c,
|
|
1451
|
-
handleCancelUpload:
|
|
1452
|
-
appendFiles:
|
|
1602
|
+
handleCancelUpload: p,
|
|
1603
|
+
appendFiles: b,
|
|
1453
1604
|
isUploading: x,
|
|
1454
1605
|
successFiles: m
|
|
1455
|
-
} =
|
|
1456
|
-
|
|
1457
|
-
},
|
|
1458
|
-
if (
|
|
1606
|
+
} = Qt(), C = !!((_ = n.session) != null && _.isHandedOff), { isAwaitingBotReply: f } = kt(), z = (w) => {
|
|
1607
|
+
b(w);
|
|
1608
|
+
}, M = !a.trim() && m.length === 0, v = async () => {
|
|
1609
|
+
if (f || M) return;
|
|
1459
1610
|
x && console.info("please wait for the file(s) to upload");
|
|
1460
|
-
const
|
|
1611
|
+
const w = a.trim();
|
|
1461
1612
|
t({
|
|
1462
|
-
content:
|
|
1613
|
+
content: w,
|
|
1463
1614
|
attachments: m.flatMap(
|
|
1464
|
-
(
|
|
1615
|
+
(y) => y.fileUrl ? [
|
|
1465
1616
|
{
|
|
1466
|
-
url:
|
|
1467
|
-
type:
|
|
1468
|
-
name:
|
|
1469
|
-
id:
|
|
1470
|
-
size:
|
|
1617
|
+
url: y.fileUrl,
|
|
1618
|
+
type: y.file.type,
|
|
1619
|
+
name: y.file.name,
|
|
1620
|
+
id: y.id,
|
|
1621
|
+
size: y.file.size
|
|
1471
1622
|
}
|
|
1472
1623
|
] : []
|
|
1473
1624
|
)
|
|
1474
|
-
}),
|
|
1625
|
+
}), i(""), c();
|
|
1475
1626
|
}, {
|
|
1476
1627
|
getRootProps: R,
|
|
1477
|
-
getInputProps:
|
|
1478
|
-
open:
|
|
1479
|
-
} =
|
|
1480
|
-
onDrop:
|
|
1628
|
+
getInputProps: E,
|
|
1629
|
+
open: j
|
|
1630
|
+
} = Wr({
|
|
1631
|
+
onDrop: z,
|
|
1481
1632
|
noClick: !0,
|
|
1482
1633
|
onDropRejected() {
|
|
1483
1634
|
console.error("unsupported file type, or the file is too large");
|
|
1484
1635
|
},
|
|
1485
1636
|
maxSize: 5 * 1024 * 1024,
|
|
1486
|
-
accept:
|
|
1637
|
+
accept: C ? {
|
|
1487
1638
|
"text/*": [".txt"],
|
|
1488
1639
|
"image/*": [".png", ".jpg", ".jpeg", ".gif"],
|
|
1489
1640
|
"application/pdf": [".pdf"]
|
|
@@ -1493,9 +1644,9 @@ function lo() {
|
|
|
1493
1644
|
"image/gif": [".gif"],
|
|
1494
1645
|
"image/webp": [".webp"]
|
|
1495
1646
|
}
|
|
1496
|
-
}),
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1647
|
+
}), u = (w) => {
|
|
1648
|
+
const y = w.clipboardData;
|
|
1649
|
+
y && y.files.length > 0 && z(Array.from(y.files));
|
|
1499
1650
|
};
|
|
1500
1651
|
return /* @__PURE__ */ d(
|
|
1501
1652
|
"div",
|
|
@@ -1504,12 +1655,12 @@ function lo() {
|
|
|
1504
1655
|
className: "p-2 relative space-y-1",
|
|
1505
1656
|
...R(),
|
|
1506
1657
|
children: [
|
|
1507
|
-
/* @__PURE__ */ r("input", { ...
|
|
1658
|
+
/* @__PURE__ */ r("input", { ...E() }),
|
|
1508
1659
|
/* @__PURE__ */ d(
|
|
1509
1660
|
"div",
|
|
1510
1661
|
{
|
|
1511
1662
|
...g("chat/input_box/inner_root"),
|
|
1512
|
-
className:
|
|
1663
|
+
className: h(
|
|
1513
1664
|
"transition-all",
|
|
1514
1665
|
"bg-white",
|
|
1515
1666
|
// 'border',
|
|
@@ -1528,25 +1679,25 @@ function lo() {
|
|
|
1528
1679
|
{
|
|
1529
1680
|
...g("chat/input_box/attachments_container"),
|
|
1530
1681
|
className: "flex items-center gap-1",
|
|
1531
|
-
children: /* @__PURE__ */ r(
|
|
1532
|
-
|
|
1682
|
+
children: /* @__PURE__ */ r(T, { mode: "popLayout", children: l.map((w) => /* @__PURE__ */ r(k, { snapExit: !0, children: /* @__PURE__ */ r(
|
|
1683
|
+
vo,
|
|
1533
1684
|
{
|
|
1534
|
-
onCancel: () =>
|
|
1535
|
-
file:
|
|
1685
|
+
onCancel: () => p(w.id),
|
|
1686
|
+
file: w
|
|
1536
1687
|
}
|
|
1537
|
-
) },
|
|
1688
|
+
) }, w.id)) })
|
|
1538
1689
|
}
|
|
1539
1690
|
),
|
|
1540
1691
|
/* @__PURE__ */ r(
|
|
1541
1692
|
"textarea",
|
|
1542
1693
|
{
|
|
1543
1694
|
...g("chat/input_box/textarea"),
|
|
1544
|
-
onPaste:
|
|
1695
|
+
onPaste: u,
|
|
1545
1696
|
ref: o,
|
|
1546
1697
|
id: "chat-input",
|
|
1547
|
-
value:
|
|
1698
|
+
value: a,
|
|
1548
1699
|
rows: 3,
|
|
1549
|
-
className:
|
|
1700
|
+
className: h(
|
|
1550
1701
|
/** Match the border radius of the container */
|
|
1551
1702
|
// INPUT_CONTAINER_B_RADIUS,
|
|
1552
1703
|
"max-h-16 [field-sizing:content]",
|
|
@@ -1557,9 +1708,9 @@ function lo() {
|
|
|
1557
1708
|
// 16px on mobiles prevents auto-zoom on the input when focused
|
|
1558
1709
|
e ? "text-[16px]" : "text-sm"
|
|
1559
1710
|
),
|
|
1560
|
-
onChange: (
|
|
1561
|
-
onKeyDown: async (
|
|
1562
|
-
|
|
1711
|
+
onChange: (w) => i(w.target.value),
|
|
1712
|
+
onKeyDown: async (w) => {
|
|
1713
|
+
w.key === "Enter" && !w.shiftKey && (w.preventDefault(), v());
|
|
1563
1714
|
},
|
|
1564
1715
|
placeholder: s("write_a_message_placeholder")
|
|
1565
1716
|
}
|
|
@@ -1569,33 +1720,33 @@ function lo() {
|
|
|
1569
1720
|
),
|
|
1570
1721
|
/* @__PURE__ */ d("div", { className: "gap-2 flex justify-between", children: [
|
|
1571
1722
|
/* @__PURE__ */ r(
|
|
1572
|
-
|
|
1723
|
+
oe,
|
|
1573
1724
|
{
|
|
1574
1725
|
side: "top",
|
|
1575
1726
|
align: "start",
|
|
1576
1727
|
content: "attach files, (maximum size 5mb)",
|
|
1577
1728
|
children: /* @__PURE__ */ r(
|
|
1578
|
-
|
|
1729
|
+
S,
|
|
1579
1730
|
{
|
|
1580
|
-
onClick:
|
|
1731
|
+
onClick: j,
|
|
1581
1732
|
size: "fit",
|
|
1582
1733
|
variant: "ghost",
|
|
1583
|
-
className:
|
|
1734
|
+
className: h(
|
|
1584
1735
|
"rounded-full size-8 flex items-center justify-center p-0 overflow-hidden"
|
|
1585
1736
|
),
|
|
1586
|
-
children: /* @__PURE__ */ r(
|
|
1737
|
+
children: /* @__PURE__ */ r(T, { mode: "wait", children: C && !f ? /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(Nr, { className: "size-4" }) }, "paper-clip") : /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(Sr, { className: "size-4" }) }, "image-icon") })
|
|
1587
1738
|
}
|
|
1588
1739
|
)
|
|
1589
1740
|
}
|
|
1590
1741
|
),
|
|
1591
|
-
/* @__PURE__ */ r(
|
|
1592
|
-
|
|
1742
|
+
/* @__PURE__ */ r(oe, { content: "send message", side: "top", align: "end", children: /* @__PURE__ */ r(
|
|
1743
|
+
S,
|
|
1593
1744
|
{
|
|
1594
1745
|
size: "fit",
|
|
1595
|
-
onClick:
|
|
1596
|
-
disabled:
|
|
1746
|
+
onClick: v,
|
|
1747
|
+
disabled: f || x || M,
|
|
1597
1748
|
className: "rounded-full size-8 flex items-center justify-center p-0",
|
|
1598
|
-
children: /* @__PURE__ */ r(
|
|
1749
|
+
children: /* @__PURE__ */ r(T, { mode: "wait", children: f || x ? /* @__PURE__ */ r(k, { snapExit: !0, children: /* @__PURE__ */ r(_r, { className: "size-4 animate-spin animate-iteration-infinite" }) }, "loading") : /* @__PURE__ */ r(k, { snapExit: !0, children: /* @__PURE__ */ r(Nt, { className: "size-4" }) }, "send") })
|
|
1599
1750
|
}
|
|
1600
1751
|
) })
|
|
1601
1752
|
] })
|
|
@@ -1606,55 +1757,55 @@ function lo() {
|
|
|
1606
1757
|
}
|
|
1607
1758
|
);
|
|
1608
1759
|
}
|
|
1609
|
-
function
|
|
1610
|
-
const { widgetCtx: e } =
|
|
1611
|
-
return /* @__PURE__ */ r(
|
|
1760
|
+
function gt() {
|
|
1761
|
+
const { widgetCtx: e } = P(), { router: o } = N(), { canCreateNewSession: t } = Y(), { toSessionsScreen: n } = H(), { t: s } = Z();
|
|
1762
|
+
return /* @__PURE__ */ r(Q, { children: t || o != null && o.chatScreenOnly ? /* @__PURE__ */ r(S, { onClick: e.resetChat, className: "rounded-2xl w-full", children: s("new_conversation") }) : /* @__PURE__ */ r(S, { onClick: n, className: "rounded-2xl w-full", children: s("back_to_conversations") }) });
|
|
1612
1763
|
}
|
|
1613
|
-
function
|
|
1614
|
-
const { t: e } =
|
|
1615
|
-
return /* @__PURE__ */ r("div", { className: "p-2", children: /* @__PURE__ */ r("div", { className: "p-2 bg-muted rounded-3xl", children: /* @__PURE__ */ r(
|
|
1616
|
-
/* @__PURE__ */ r(
|
|
1617
|
-
/* @__PURE__ */ r(
|
|
1618
|
-
] }, "csat") : /* @__PURE__ */ d(
|
|
1764
|
+
function yo() {
|
|
1765
|
+
const { t: e } = Z(), { isCsatRequested: o, isCsatSubmitted: t } = yt();
|
|
1766
|
+
return /* @__PURE__ */ r("div", { className: "p-2", children: /* @__PURE__ */ r("div", { className: "p-2 bg-muted rounded-3xl", children: /* @__PURE__ */ r(T, { mode: "wait", children: o || t ? /* @__PURE__ */ d(F, { children: [
|
|
1767
|
+
/* @__PURE__ */ r(fo, {}),
|
|
1768
|
+
/* @__PURE__ */ r(T, { mode: "wait", children: t && /* @__PURE__ */ r(F, { children: /* @__PURE__ */ r(gt, {}) }, "new-conv-or-back-to-convs-button") })
|
|
1769
|
+
] }, "csat") : /* @__PURE__ */ d(F, { children: [
|
|
1619
1770
|
/* @__PURE__ */ d("div", { className: "ps-2 flex items-center gap-1 pb-2", children: [
|
|
1620
|
-
/* @__PURE__ */ r(
|
|
1771
|
+
/* @__PURE__ */ r(zt, { className: "size-4 text-emerald-600" }),
|
|
1621
1772
|
/* @__PURE__ */ r("h2", { className: "text-sm font-medium", children: e("your_issue_has_been_resolved") })
|
|
1622
1773
|
] }),
|
|
1623
|
-
/* @__PURE__ */ r(
|
|
1774
|
+
/* @__PURE__ */ r(gt, {})
|
|
1624
1775
|
] }, "session-closed") }) }) });
|
|
1625
1776
|
}
|
|
1626
|
-
function
|
|
1627
|
-
var
|
|
1628
|
-
const { initialQuestions: e, initialQuestionsPosition: o, thisWasHelpfulOrNot: t } =
|
|
1629
|
-
return /* @__PURE__ */ r("footer", { children: /* @__PURE__ */ r(
|
|
1630
|
-
/* @__PURE__ */ r(
|
|
1631
|
-
/* @__PURE__ */ r(
|
|
1632
|
-
] }, "session-closed") : /* @__PURE__ */ d(
|
|
1633
|
-
s.lastAIResMightSolveUserIssue && (t == null ? void 0 : t.enabled) !== !1 && /* @__PURE__ */ r(
|
|
1634
|
-
|
|
1635
|
-
|
|
1777
|
+
function ko() {
|
|
1778
|
+
var i;
|
|
1779
|
+
const { initialQuestions: e, initialQuestionsPosition: o, thisWasHelpfulOrNot: t } = N(), { sessionState: n } = Y(), { messagesState: s } = O(), a = s.messages.length === 0;
|
|
1780
|
+
return /* @__PURE__ */ r("footer", { children: /* @__PURE__ */ r(T, { mode: "wait", children: n.session && !((i = n.session) != null && i.isOpened) ? /* @__PURE__ */ d(F, { children: [
|
|
1781
|
+
/* @__PURE__ */ r(yo, {}),
|
|
1782
|
+
/* @__PURE__ */ r(ut, {})
|
|
1783
|
+
] }, "session-closed") : /* @__PURE__ */ d(F, { children: [
|
|
1784
|
+
s.lastAIResMightSolveUserIssue && (t == null ? void 0 : t.enabled) !== !1 && /* @__PURE__ */ r(xo, {}),
|
|
1785
|
+
a && e && o !== "below-initial-messages" && /* @__PURE__ */ r("div", { className: "flex items-center flex-row justify-end gap-2 flex-wrap px-2", children: e == null ? void 0 : e.map((l, c) => /* @__PURE__ */ r(
|
|
1786
|
+
De,
|
|
1636
1787
|
{
|
|
1637
1788
|
suggestion: l
|
|
1638
1789
|
},
|
|
1639
1790
|
`${l}-${c}`
|
|
1640
1791
|
)) }),
|
|
1641
|
-
/* @__PURE__ */ r(
|
|
1642
|
-
/* @__PURE__ */ r(
|
|
1792
|
+
/* @__PURE__ */ r(bo, {}),
|
|
1793
|
+
/* @__PURE__ */ r(ut, {})
|
|
1643
1794
|
] }, "chat-input") }) });
|
|
1644
1795
|
}
|
|
1645
|
-
function
|
|
1796
|
+
function Co({
|
|
1646
1797
|
isFirstInGroup: e,
|
|
1647
1798
|
isLastInGroup: o,
|
|
1648
1799
|
isAloneInGroup: t,
|
|
1649
1800
|
...n
|
|
1650
1801
|
}) {
|
|
1651
|
-
const { componentStore: s } =
|
|
1802
|
+
const { componentStore: s } = P();
|
|
1652
1803
|
if (n.type !== "AGENT" && n.type !== "AI") return null;
|
|
1653
1804
|
if (n.data.action) {
|
|
1654
|
-
const
|
|
1655
|
-
if (
|
|
1805
|
+
const i = s.getComponent(n.data.action.name);
|
|
1806
|
+
if (i)
|
|
1656
1807
|
return /* @__PURE__ */ r(
|
|
1657
|
-
|
|
1808
|
+
i,
|
|
1658
1809
|
{
|
|
1659
1810
|
...n,
|
|
1660
1811
|
id: n.id,
|
|
@@ -1664,9 +1815,9 @@ function ho({
|
|
|
1664
1815
|
}
|
|
1665
1816
|
);
|
|
1666
1817
|
}
|
|
1667
|
-
const
|
|
1668
|
-
return
|
|
1669
|
-
|
|
1818
|
+
const a = s.getComponent(n.component);
|
|
1819
|
+
return a ? /* @__PURE__ */ r(
|
|
1820
|
+
a,
|
|
1670
1821
|
{
|
|
1671
1822
|
...n,
|
|
1672
1823
|
id: n.id,
|
|
@@ -1675,7 +1826,7 @@ function ho({
|
|
|
1675
1826
|
isAloneInGroup: t
|
|
1676
1827
|
}
|
|
1677
1828
|
) : /* @__PURE__ */ r(
|
|
1678
|
-
|
|
1829
|
+
fe,
|
|
1679
1830
|
{
|
|
1680
1831
|
...n,
|
|
1681
1832
|
isFirstInGroup: e,
|
|
@@ -1684,18 +1835,18 @@ function ho({
|
|
|
1684
1835
|
}
|
|
1685
1836
|
);
|
|
1686
1837
|
}
|
|
1687
|
-
function
|
|
1838
|
+
function Ut({
|
|
1688
1839
|
messages: e,
|
|
1689
1840
|
className: o,
|
|
1690
1841
|
containerClassName: t
|
|
1691
1842
|
}) {
|
|
1692
|
-
var
|
|
1693
|
-
const { timestamps: n } =
|
|
1694
|
-
if (!((
|
|
1843
|
+
var i, l;
|
|
1844
|
+
const { timestamps: n } = N();
|
|
1845
|
+
if (!((i = n == null ? void 0 : n.perMessageGroup) != null && i.enabled))
|
|
1695
1846
|
return null;
|
|
1696
1847
|
const s = (l = e[e.length - 1]) == null ? void 0 : l.timestamp;
|
|
1697
1848
|
if (!s) return null;
|
|
1698
|
-
const
|
|
1849
|
+
const a = (() => {
|
|
1699
1850
|
try {
|
|
1700
1851
|
return new Date(s).toLocaleTimeString([], {
|
|
1701
1852
|
hour: "2-digit",
|
|
@@ -1706,9 +1857,9 @@ function Ht({
|
|
|
1706
1857
|
return console.error(c), null;
|
|
1707
1858
|
}
|
|
1708
1859
|
})();
|
|
1709
|
-
return
|
|
1860
|
+
return a ? /* @__PURE__ */ r("div", { className: t, children: /* @__PURE__ */ r("span", { className: h("text-xs text-muted-foreground", o), children: a }) }) : null;
|
|
1710
1861
|
}
|
|
1711
|
-
function
|
|
1862
|
+
function pe({
|
|
1712
1863
|
messages: e,
|
|
1713
1864
|
agent: o,
|
|
1714
1865
|
suggestedReplies: t
|
|
@@ -1717,25 +1868,25 @@ function le({
|
|
|
1717
1868
|
"div",
|
|
1718
1869
|
{
|
|
1719
1870
|
...g("chat/agent_msg_group/root"),
|
|
1720
|
-
className:
|
|
1871
|
+
className: h("flex items-end gap-2"),
|
|
1721
1872
|
children: [
|
|
1722
|
-
/* @__PURE__ */ r(
|
|
1723
|
-
|
|
1873
|
+
/* @__PURE__ */ r(oe, { content: o == null ? void 0 : o.name, side: "right", align: "end", children: /* @__PURE__ */ r(
|
|
1874
|
+
xe,
|
|
1724
1875
|
{
|
|
1725
1876
|
...g("chat/agent_msg_group/root/avatar"),
|
|
1726
1877
|
agent: o,
|
|
1727
1878
|
className: "hidden"
|
|
1728
1879
|
}
|
|
1729
1880
|
) }),
|
|
1730
|
-
/* @__PURE__ */ d("div", { className:
|
|
1881
|
+
/* @__PURE__ */ d("div", { className: h("flex-1 flex flex-col gap-1"), children: [
|
|
1731
1882
|
/* @__PURE__ */ d(
|
|
1732
1883
|
"div",
|
|
1733
1884
|
{
|
|
1734
1885
|
...g("chat/agent_msg_group/avatar_and_msgs/root"),
|
|
1735
|
-
className:
|
|
1886
|
+
className: h("flex items-end gap-2"),
|
|
1736
1887
|
children: [
|
|
1737
|
-
/* @__PURE__ */ r(
|
|
1738
|
-
|
|
1888
|
+
/* @__PURE__ */ r(oe, { content: o == null ? void 0 : o.name, side: "right", align: "end", children: /* @__PURE__ */ r(
|
|
1889
|
+
xe,
|
|
1739
1890
|
{
|
|
1740
1891
|
...g("chat/agent_msg_group/avatar_and_msgs/avatar"),
|
|
1741
1892
|
agent: o
|
|
@@ -1745,19 +1896,19 @@ function le({
|
|
|
1745
1896
|
"div",
|
|
1746
1897
|
{
|
|
1747
1898
|
...g("chat/agent_msg_group/avatar_and_msgs/msgs"),
|
|
1748
|
-
className:
|
|
1899
|
+
className: h("flex-1 flex flex-col gap-1"),
|
|
1749
1900
|
children: [
|
|
1750
|
-
e.map((n, s,
|
|
1751
|
-
|
|
1901
|
+
e.map((n, s, a) => /* @__PURE__ */ r(
|
|
1902
|
+
Co,
|
|
1752
1903
|
{
|
|
1753
1904
|
isFirstInGroup: s === 0,
|
|
1754
|
-
isLastInGroup: s ===
|
|
1755
|
-
isAloneInGroup:
|
|
1905
|
+
isLastInGroup: s === a.length - 1,
|
|
1906
|
+
isAloneInGroup: a.length === 1,
|
|
1756
1907
|
...n
|
|
1757
1908
|
},
|
|
1758
1909
|
n.id
|
|
1759
1910
|
)),
|
|
1760
|
-
/* @__PURE__ */ r(
|
|
1911
|
+
/* @__PURE__ */ r(Ut, { messages: e })
|
|
1761
1912
|
]
|
|
1762
1913
|
}
|
|
1763
1914
|
)
|
|
@@ -1768,9 +1919,9 @@ function le({
|
|
|
1768
1919
|
"div",
|
|
1769
1920
|
{
|
|
1770
1921
|
...g("chat/agent_msg_group/suggestions"),
|
|
1771
|
-
className:
|
|
1922
|
+
className: h("flex flex-col gap-1 ps-8"),
|
|
1772
1923
|
children: t == null ? void 0 : t.map((n, s) => /* @__PURE__ */ r(
|
|
1773
|
-
|
|
1924
|
+
De,
|
|
1774
1925
|
{
|
|
1775
1926
|
suggestion: n
|
|
1776
1927
|
},
|
|
@@ -1783,14 +1934,14 @@ function le({
|
|
|
1783
1934
|
}
|
|
1784
1935
|
);
|
|
1785
1936
|
}
|
|
1786
|
-
function
|
|
1937
|
+
function zo() {
|
|
1787
1938
|
var t, n;
|
|
1788
|
-
const e =
|
|
1939
|
+
const e = te();
|
|
1789
1940
|
if ((t = e.session) != null && t.isOpened || !e.session) return null;
|
|
1790
1941
|
const o = (n = e.config.customComponents) == null ? void 0 : n.onSessionResolved;
|
|
1791
1942
|
return o ? /* @__PURE__ */ r(o, { ...e }) : null;
|
|
1792
1943
|
}
|
|
1793
|
-
function
|
|
1944
|
+
function No({
|
|
1794
1945
|
message: e,
|
|
1795
1946
|
isFirstInGroup: o,
|
|
1796
1947
|
isLastInGroup: t,
|
|
@@ -1803,7 +1954,7 @@ function go({
|
|
|
1803
1954
|
...g("chat/user_msg/root"),
|
|
1804
1955
|
className: "w-5/6 flex flex-col items-end gap-1",
|
|
1805
1956
|
children: [
|
|
1806
|
-
e.attachments && e.attachments.length > 0 && /* @__PURE__ */ r("div", { className: "w-full flex gap-1 flex-wrap justify-end", children: (s = e.attachments) == null ? void 0 : s.map((
|
|
1957
|
+
e.attachments && e.attachments.length > 0 && /* @__PURE__ */ r("div", { className: "w-full flex gap-1 flex-wrap justify-end", children: (s = e.attachments) == null ? void 0 : s.map((a) => /* @__PURE__ */ r(Ot, { attachment: a }, a.id)) }),
|
|
1807
1958
|
e.content.length > 0 && /* @__PURE__ */ r(
|
|
1808
1959
|
"div",
|
|
1809
1960
|
{
|
|
@@ -1811,7 +1962,7 @@ function go({
|
|
|
1811
1962
|
"data-first": o,
|
|
1812
1963
|
"data-last": t,
|
|
1813
1964
|
"data-alone": n,
|
|
1814
|
-
className:
|
|
1965
|
+
className: h(
|
|
1815
1966
|
"transition-all",
|
|
1816
1967
|
"w-fit py-3 px-4 rounded-3xl text-sm",
|
|
1817
1968
|
"bg-primary text-primary-foreground",
|
|
@@ -1830,17 +1981,17 @@ function go({
|
|
|
1830
1981
|
}
|
|
1831
1982
|
);
|
|
1832
1983
|
}
|
|
1833
|
-
function
|
|
1984
|
+
function So({
|
|
1834
1985
|
messages: e
|
|
1835
1986
|
}) {
|
|
1836
1987
|
return /* @__PURE__ */ d(
|
|
1837
1988
|
"div",
|
|
1838
1989
|
{
|
|
1839
1990
|
...g("chat/user_msg_group/root"),
|
|
1840
|
-
className:
|
|
1991
|
+
className: h("group", "flex flex-col gap-1 justify-end items-end"),
|
|
1841
1992
|
children: [
|
|
1842
1993
|
e.map((o, t, n) => /* @__PURE__ */ r(
|
|
1843
|
-
|
|
1994
|
+
No,
|
|
1844
1995
|
{
|
|
1845
1996
|
message: o,
|
|
1846
1997
|
isFirstInGroup: t === 0,
|
|
@@ -1849,50 +2000,50 @@ function uo({
|
|
|
1849
2000
|
},
|
|
1850
2001
|
o.id
|
|
1851
2002
|
)),
|
|
1852
|
-
/* @__PURE__ */ r(
|
|
2003
|
+
/* @__PURE__ */ r(Ut, { messages: e, containerClassName: "ms-auto" })
|
|
1853
2004
|
]
|
|
1854
2005
|
}
|
|
1855
2006
|
);
|
|
1856
2007
|
}
|
|
1857
|
-
function
|
|
2008
|
+
function _o(e) {
|
|
1858
2009
|
const o = [];
|
|
1859
2010
|
let t = null;
|
|
1860
2011
|
return e.forEach((n) => {
|
|
1861
|
-
var s,
|
|
2012
|
+
var s, a, i, l, c, p;
|
|
1862
2013
|
// Start a new group if the type changes
|
|
1863
2014
|
(((s = t == null ? void 0 : t[0]) == null ? void 0 : s.type) !== n.type || // Start a new group if the agent changes
|
|
1864
|
-
((
|
|
2015
|
+
((a = t[0]) == null ? void 0 : a.type) === "AGENT" && n.type === "AGENT" && (((i = n.agent) == null ? void 0 : i.id) !== ((l = t[0].agent) == null ? void 0 : l.id) || ((c = n.agent) == null ? void 0 : c.name) !== ((p = t[0].agent) == null ? void 0 : p.name))) && (t = [], o.push(t)), t.push(n);
|
|
1865
2016
|
}), o;
|
|
1866
2017
|
}
|
|
1867
|
-
function
|
|
2018
|
+
function Io(e) {
|
|
1868
2019
|
var o;
|
|
1869
2020
|
return ((o = e == null ? void 0 : e[0]) == null ? void 0 : o.type) === "USER";
|
|
1870
2021
|
}
|
|
1871
|
-
function
|
|
2022
|
+
function To(e) {
|
|
1872
2023
|
var o;
|
|
1873
2024
|
return ((o = e == null ? void 0 : e[0]) == null ? void 0 : o.type) === "AI";
|
|
1874
2025
|
}
|
|
1875
|
-
function
|
|
2026
|
+
function Mo(e) {
|
|
1876
2027
|
var o;
|
|
1877
2028
|
return ((o = e == null ? void 0 : e[0]) == null ? void 0 : o.type) === "AGENT";
|
|
1878
2029
|
}
|
|
1879
|
-
function
|
|
2030
|
+
function Do() {
|
|
1880
2031
|
const {
|
|
1881
2032
|
messagesState: { messages: e }
|
|
1882
|
-
} =
|
|
2033
|
+
} = O(), {
|
|
1883
2034
|
advancedInitialMessages: o = [],
|
|
1884
2035
|
initialQuestionsPosition: t,
|
|
1885
2036
|
initialQuestions: n,
|
|
1886
2037
|
bot: s
|
|
1887
|
-
} =
|
|
1888
|
-
return /* @__PURE__ */ r(
|
|
1889
|
-
|
|
2038
|
+
} = N();
|
|
2039
|
+
return /* @__PURE__ */ r(Q, { children: e.length === 0 && o.length > 0 && /* @__PURE__ */ r(
|
|
2040
|
+
pe,
|
|
1890
2041
|
{
|
|
1891
2042
|
messages: o.map(
|
|
1892
|
-
({ message:
|
|
2043
|
+
({ message: a }, i) => ({
|
|
1893
2044
|
component: "bot_message",
|
|
1894
|
-
data: { message:
|
|
1895
|
-
id: `${
|
|
2045
|
+
data: { message: a },
|
|
2046
|
+
id: `${i}-${a}`,
|
|
1896
2047
|
type: "AI",
|
|
1897
2048
|
timestamp: null
|
|
1898
2049
|
})
|
|
@@ -1902,33 +2053,33 @@ function bo() {
|
|
|
1902
2053
|
}
|
|
1903
2054
|
) });
|
|
1904
2055
|
}
|
|
1905
|
-
function
|
|
2056
|
+
function Ro() {
|
|
1906
2057
|
const {
|
|
1907
2058
|
messagesState: { messages: e }
|
|
1908
|
-
} =
|
|
2059
|
+
} = O(), { chatBannerItems: o } = N();
|
|
1909
2060
|
return !(o != null && o.length) || e.length > 0 && o.every((t) => !t.persistent) ? null : /* @__PURE__ */ r("div", { className: "w-full text-center text-xs", children: o.map(
|
|
1910
|
-
({ message: t, persistent: n }, s) => e.length > 0 && !n ? null : /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
2061
|
+
({ message: t, persistent: n }, s) => e.length > 0 && !n ? null : /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Ne, { children: t }) }, `${t}-${s}`)
|
|
1911
2062
|
) });
|
|
1912
2063
|
}
|
|
1913
|
-
function
|
|
2064
|
+
function jo() {
|
|
1914
2065
|
const {
|
|
1915
2066
|
messagesState: { messages: e }
|
|
1916
|
-
} =
|
|
2067
|
+
} = O(), o = N(), {
|
|
1917
2068
|
advancedInitialMessages: t = [],
|
|
1918
2069
|
initialQuestions: n,
|
|
1919
2070
|
initialQuestionsPosition: s
|
|
1920
|
-
} = o,
|
|
1921
|
-
var
|
|
1922
|
-
return t.length ? [] : e.length ? [] : (
|
|
2071
|
+
} = o, a = (() => {
|
|
2072
|
+
var i;
|
|
2073
|
+
return t.length ? [] : e.length ? [] : (i = o.initialMessages) != null && i.length ? o.initialMessages : ["Hello, how can I help you?"];
|
|
1923
2074
|
})();
|
|
1924
|
-
return /* @__PURE__ */ r(
|
|
1925
|
-
|
|
2075
|
+
return /* @__PURE__ */ r(Q, { children: e.length === 0 && a.length > 0 && /* @__PURE__ */ r(
|
|
2076
|
+
pe,
|
|
1926
2077
|
{
|
|
1927
|
-
messages:
|
|
1928
|
-
(
|
|
2078
|
+
messages: a.map(
|
|
2079
|
+
(i, l) => ({
|
|
1929
2080
|
component: "bot_message",
|
|
1930
|
-
data: { message:
|
|
1931
|
-
id: `${l}-${
|
|
2081
|
+
data: { message: i },
|
|
2082
|
+
id: `${l}-${i}`,
|
|
1932
2083
|
type: "AI",
|
|
1933
2084
|
timestamp: null
|
|
1934
2085
|
})
|
|
@@ -1938,27 +2089,27 @@ function ko() {
|
|
|
1938
2089
|
}
|
|
1939
2090
|
) });
|
|
1940
2091
|
}
|
|
1941
|
-
function
|
|
2092
|
+
function Eo() {
|
|
1942
2093
|
var t;
|
|
1943
|
-
const e =
|
|
2094
|
+
const e = te(), o = (t = e.config.customComponents) == null ? void 0 : t.chatBottomComponents;
|
|
1944
2095
|
return o ? /* @__PURE__ */ r("div", { children: o.map(({ key: n, component: s }) => /* @__PURE__ */ r(s, { ...e }, n)) }) : null;
|
|
1945
2096
|
}
|
|
1946
|
-
function
|
|
2097
|
+
function Po() {
|
|
1947
2098
|
const {
|
|
1948
2099
|
messagesState: { messages: e }
|
|
1949
|
-
} =
|
|
1950
|
-
() =>
|
|
2100
|
+
} = O(), { isAwaitingBotReply: o } = kt(), { componentStore: t } = P(), { bot: n, humanAgent: s } = N(), a = vt(
|
|
2101
|
+
() => _o(e),
|
|
1951
2102
|
[e]
|
|
1952
|
-
),
|
|
2103
|
+
), i = t.getComponent(
|
|
1953
2104
|
"loading"
|
|
1954
|
-
), l =
|
|
2105
|
+
), l = $(null);
|
|
1955
2106
|
function c() {
|
|
1956
2107
|
setTimeout(() => {
|
|
1957
|
-
const
|
|
1958
|
-
|
|
2108
|
+
const p = l.current;
|
|
2109
|
+
p && (p.scrollTop = p.scrollHeight);
|
|
1959
2110
|
}, 0);
|
|
1960
2111
|
}
|
|
1961
|
-
return
|
|
2112
|
+
return se(() => {
|
|
1962
2113
|
c();
|
|
1963
2114
|
}, [e]), /* @__PURE__ */ d(
|
|
1964
2115
|
"div",
|
|
@@ -1967,36 +2118,36 @@ function zo() {
|
|
|
1967
2118
|
ref: l,
|
|
1968
2119
|
className: "max-h-full scroll-smooth relative flex-1 py-2 px-4 flex flex-col gap-2 overflow-auto",
|
|
1969
2120
|
children: [
|
|
1970
|
-
/* @__PURE__ */ r(
|
|
1971
|
-
/* @__PURE__ */ r(
|
|
1972
|
-
/* @__PURE__ */ r(
|
|
1973
|
-
|
|
1974
|
-
var
|
|
1975
|
-
const x = (
|
|
2121
|
+
/* @__PURE__ */ r(Ro, {}),
|
|
2122
|
+
/* @__PURE__ */ r(Do, {}),
|
|
2123
|
+
/* @__PURE__ */ r(jo, {}),
|
|
2124
|
+
a.map((p, b) => {
|
|
2125
|
+
var C, f, z, M;
|
|
2126
|
+
const x = (C = p == null ? void 0 : p[0]) == null ? void 0 : C.type, m = (f = p[0]) == null ? void 0 : f.id;
|
|
1976
2127
|
if (!x || !m) return null;
|
|
1977
|
-
if (
|
|
1978
|
-
return /* @__PURE__ */ r(
|
|
1979
|
-
if (
|
|
1980
|
-
const
|
|
1981
|
-
return o &&
|
|
1982
|
-
|
|
2128
|
+
if (Io(p))
|
|
2129
|
+
return /* @__PURE__ */ r(So, { messages: p }, m);
|
|
2130
|
+
if (To(p)) {
|
|
2131
|
+
const v = b === a.length - 1;
|
|
2132
|
+
return o && v ? null : ((z = p[0]) == null || z.agent, /* @__PURE__ */ r(
|
|
2133
|
+
pe,
|
|
1983
2134
|
{
|
|
1984
|
-
messages:
|
|
2135
|
+
messages: p,
|
|
1985
2136
|
agent: n ? { ...n, isAi: !0, id: null } : void 0
|
|
1986
2137
|
},
|
|
1987
2138
|
m
|
|
1988
2139
|
));
|
|
1989
2140
|
}
|
|
1990
|
-
if (
|
|
1991
|
-
const
|
|
2141
|
+
if (Mo(p)) {
|
|
2142
|
+
const v = (M = p[0]) == null ? void 0 : M.agent;
|
|
1992
2143
|
return /* @__PURE__ */ r(
|
|
1993
|
-
|
|
2144
|
+
pe,
|
|
1994
2145
|
{
|
|
1995
|
-
messages:
|
|
1996
|
-
agent:
|
|
1997
|
-
...
|
|
1998
|
-
name: (s == null ? void 0 : s.name) ||
|
|
1999
|
-
avatarUrl: (s == null ? void 0 : s.avatarUrl) ||
|
|
2146
|
+
messages: p,
|
|
2147
|
+
agent: v ? {
|
|
2148
|
+
...v,
|
|
2149
|
+
name: (s == null ? void 0 : s.name) || v.name || "",
|
|
2150
|
+
avatarUrl: (s == null ? void 0 : s.avatarUrl) || v.avatarUrl || null
|
|
2000
2151
|
} : s ? {
|
|
2001
2152
|
isAi: !1,
|
|
2002
2153
|
id: null,
|
|
@@ -2009,29 +2160,29 @@ function zo() {
|
|
|
2009
2160
|
}
|
|
2010
2161
|
return null;
|
|
2011
2162
|
}),
|
|
2012
|
-
o &&
|
|
2013
|
-
/* @__PURE__ */ r(
|
|
2014
|
-
/* @__PURE__ */ r(
|
|
2163
|
+
o && i && /* @__PURE__ */ r(i, { agent: n }),
|
|
2164
|
+
/* @__PURE__ */ r(Eo, {}),
|
|
2165
|
+
/* @__PURE__ */ r(zo, {})
|
|
2015
2166
|
]
|
|
2016
2167
|
}
|
|
2017
2168
|
);
|
|
2018
2169
|
}
|
|
2019
|
-
function
|
|
2170
|
+
function Oo() {
|
|
2020
2171
|
const {
|
|
2021
2172
|
messagesState: { isInitialFetchLoading: e }
|
|
2022
|
-
} =
|
|
2173
|
+
} = O(), {
|
|
2023
2174
|
sessionState: { session: o }
|
|
2024
|
-
} =
|
|
2025
|
-
|
|
2175
|
+
} = Y(), { isCanvasOpen: t } = uo(), { theme: n } = G();
|
|
2176
|
+
Te({
|
|
2026
2177
|
width: t ? n.screens.chat.withCanvas.width : n.screens.chat.width,
|
|
2027
2178
|
height: t ? n.screens.chat.withCanvas.height : n.screens.chat.height
|
|
2028
2179
|
});
|
|
2029
|
-
const s =
|
|
2180
|
+
const s = $((o == null ? void 0 : o.id) || "chat").current;
|
|
2030
2181
|
return /* @__PURE__ */ r(
|
|
2031
2182
|
"div",
|
|
2032
2183
|
{
|
|
2033
2184
|
...g("chat/root"),
|
|
2034
|
-
className:
|
|
2185
|
+
className: h("flex flex-col overflow-hidden"),
|
|
2035
2186
|
style: {
|
|
2036
2187
|
width: "100vw",
|
|
2037
2188
|
// Relative to the iframe
|
|
@@ -2043,16 +2194,16 @@ function No() {
|
|
|
2043
2194
|
// Relative to the iframe
|
|
2044
2195
|
},
|
|
2045
2196
|
children: /* @__PURE__ */ d("div", { className: "size-full justify-between flex flex-col", children: [
|
|
2046
|
-
/* @__PURE__ */ r(
|
|
2047
|
-
/* @__PURE__ */ r(
|
|
2048
|
-
|
|
2197
|
+
/* @__PURE__ */ r(Yt, {}),
|
|
2198
|
+
/* @__PURE__ */ r(T, { mode: "wait", children: e ? /* @__PURE__ */ r(
|
|
2199
|
+
k,
|
|
2049
2200
|
{
|
|
2050
2201
|
className: "flex flex-col items-center justify-center w-full flex-1",
|
|
2051
|
-
children: /* @__PURE__ */ r(
|
|
2202
|
+
children: /* @__PURE__ */ r(Bt, {})
|
|
2052
2203
|
},
|
|
2053
2204
|
"loading"
|
|
2054
2205
|
) : /* @__PURE__ */ d(
|
|
2055
|
-
|
|
2206
|
+
k,
|
|
2056
2207
|
{
|
|
2057
2208
|
className: "flex items-start h-full flex-1 overflow-auto",
|
|
2058
2209
|
snapExit: !0,
|
|
@@ -2061,7 +2212,7 @@ function No() {
|
|
|
2061
2212
|
"div",
|
|
2062
2213
|
{
|
|
2063
2214
|
...g("chat/main/root"),
|
|
2064
|
-
className:
|
|
2215
|
+
className: h(
|
|
2065
2216
|
"flex flex-col h-full overflow-auto transition-all",
|
|
2066
2217
|
t ? "w-2/5" : "w-full"
|
|
2067
2218
|
),
|
|
@@ -2070,8 +2221,8 @@ function No() {
|
|
|
2070
2221
|
transitionDuration: n.screens.chat.withCanvas.transitionDuration
|
|
2071
2222
|
},
|
|
2072
2223
|
children: [
|
|
2073
|
-
/* @__PURE__ */ r(
|
|
2074
|
-
/* @__PURE__ */ r(
|
|
2224
|
+
/* @__PURE__ */ r(Po, {}),
|
|
2225
|
+
/* @__PURE__ */ r(ko, {})
|
|
2075
2226
|
]
|
|
2076
2227
|
}
|
|
2077
2228
|
),
|
|
@@ -2079,7 +2230,7 @@ function No() {
|
|
|
2079
2230
|
"div",
|
|
2080
2231
|
{
|
|
2081
2232
|
...g("chat/canvas/root"),
|
|
2082
|
-
className:
|
|
2233
|
+
className: h(
|
|
2083
2234
|
"h-full overflow-auto transition-all",
|
|
2084
2235
|
t ? "w-3/5" : "w-0"
|
|
2085
2236
|
),
|
|
@@ -2087,7 +2238,7 @@ function No() {
|
|
|
2087
2238
|
transitionTimingFunction: n.screens.chat.withCanvas.transitionTimingFunction,
|
|
2088
2239
|
transitionDuration: n.screens.chat.withCanvas.transitionDuration
|
|
2089
2240
|
},
|
|
2090
|
-
children: /* @__PURE__ */ r(
|
|
2241
|
+
children: /* @__PURE__ */ r(go, {})
|
|
2091
2242
|
}
|
|
2092
2243
|
)
|
|
2093
2244
|
]
|
|
@@ -2098,19 +2249,19 @@ function No() {
|
|
|
2098
2249
|
}
|
|
2099
2250
|
);
|
|
2100
2251
|
}
|
|
2101
|
-
function
|
|
2252
|
+
function Ao({
|
|
2102
2253
|
className: e,
|
|
2103
2254
|
...o
|
|
2104
2255
|
}) {
|
|
2105
2256
|
return /* @__PURE__ */ r(
|
|
2106
2257
|
"div",
|
|
2107
2258
|
{
|
|
2108
|
-
className:
|
|
2259
|
+
className: h("animate-pulse rounded-md bg-secondary", e),
|
|
2109
2260
|
...o
|
|
2110
2261
|
}
|
|
2111
2262
|
);
|
|
2112
2263
|
}
|
|
2113
|
-
function
|
|
2264
|
+
function Ho({ className: e }) {
|
|
2114
2265
|
return /* @__PURE__ */ r(
|
|
2115
2266
|
"svg",
|
|
2116
2267
|
{
|
|
@@ -2119,7 +2270,7 @@ function _o({ className: e }) {
|
|
|
2119
2270
|
viewBox: "0 0 26 32",
|
|
2120
2271
|
fill: "none",
|
|
2121
2272
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2122
|
-
className:
|
|
2273
|
+
className: h("text-primary-foreground", e),
|
|
2123
2274
|
children: /* @__PURE__ */ r(
|
|
2124
2275
|
"path",
|
|
2125
2276
|
{
|
|
@@ -2130,22 +2281,22 @@ function _o({ className: e }) {
|
|
|
2130
2281
|
}
|
|
2131
2282
|
);
|
|
2132
2283
|
}
|
|
2133
|
-
function
|
|
2134
|
-
const { token: o } =
|
|
2284
|
+
function Xt({ className: e }) {
|
|
2285
|
+
const { token: o } = N();
|
|
2135
2286
|
return /* @__PURE__ */ r(
|
|
2136
2287
|
"div",
|
|
2137
2288
|
{
|
|
2138
|
-
className:
|
|
2289
|
+
className: h(
|
|
2139
2290
|
"flex items-center justify-center gap-2 p-2 pt-0",
|
|
2140
2291
|
e
|
|
2141
2292
|
),
|
|
2142
|
-
children: /* @__PURE__ */ r(
|
|
2293
|
+
children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ d(
|
|
2143
2294
|
"a",
|
|
2144
2295
|
{
|
|
2145
2296
|
href: `https://open.cx/?ref=${o}`,
|
|
2146
2297
|
target: "_blank",
|
|
2147
2298
|
rel: "noreferrer",
|
|
2148
|
-
className:
|
|
2299
|
+
className: h(
|
|
2149
2300
|
"text-[10px] flex items-center",
|
|
2150
2301
|
"text-muted-foreground/70 [&_svg]:text-muted-foreground/70",
|
|
2151
2302
|
"hover:text-primary [&_svg]:hover:text-primary"
|
|
@@ -2154,7 +2305,7 @@ function Wt({ className: e }) {
|
|
|
2154
2305
|
/* @__PURE__ */ r("span", { children: "Powered by" }),
|
|
2155
2306
|
/* @__PURE__ */ r("span", { children: " " }),
|
|
2156
2307
|
/* @__PURE__ */ d("span", { className: "flex items-center gap-[1px]", children: [
|
|
2157
|
-
/* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(
|
|
2308
|
+
/* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(Ho, { className: "size-3 inline-block" }) }),
|
|
2158
2309
|
/* @__PURE__ */ r("span", { className: "font-semibold", children: "open" })
|
|
2159
2310
|
] })
|
|
2160
2311
|
]
|
|
@@ -2163,89 +2314,89 @@ function Wt({ className: e }) {
|
|
|
2163
2314
|
}
|
|
2164
2315
|
);
|
|
2165
2316
|
}
|
|
2166
|
-
function
|
|
2317
|
+
function Fo({ children: e }) {
|
|
2167
2318
|
return /* @__PURE__ */ r("p", { className: "ps-4 text-xs text-muted-foreground/75 uppercase font-semibold tracking-tight", children: e });
|
|
2168
2319
|
}
|
|
2169
|
-
function
|
|
2320
|
+
function wt({
|
|
2170
2321
|
session: e,
|
|
2171
2322
|
className: o
|
|
2172
2323
|
}) {
|
|
2173
|
-
const { bot: t, humanAgent: n } =
|
|
2324
|
+
const { bot: t, humanAgent: n } = N(), { toChatScreen: s } = H(), a = e.assignee.kind === "human" ? (n == null ? void 0 : n.name) || e.assignee.name || "Support Agent" : (t == null ? void 0 : t.name) || "AI Support Agent", i = e.assignee.kind === "human" ? (n == null ? void 0 : n.avatarUrl) || e.assignee.avatarUrl || "" : (t == null ? void 0 : t.avatarUrl) || (t == null ? void 0 : t.avatar) || "";
|
|
2174
2325
|
return /* @__PURE__ */ d(
|
|
2175
|
-
|
|
2326
|
+
S,
|
|
2176
2327
|
{
|
|
2177
2328
|
variant: "ghost",
|
|
2178
2329
|
size: "lg",
|
|
2179
|
-
className:
|
|
2330
|
+
className: h(
|
|
2180
2331
|
"rounded-full p-2 pe-4 flex text-start justify-between w-full whitespace-normal",
|
|
2181
2332
|
o
|
|
2182
2333
|
),
|
|
2183
2334
|
onClick: () => s(e.id),
|
|
2184
2335
|
children: [
|
|
2185
2336
|
/* @__PURE__ */ d("div", { className: "flex-1 flex gap-2 items-center", children: [
|
|
2186
|
-
/* @__PURE__ */ r(
|
|
2187
|
-
/* @__PURE__ */ r(
|
|
2188
|
-
/* @__PURE__ */ r(
|
|
2337
|
+
/* @__PURE__ */ r(T, { mode: "wait", children: /* @__PURE__ */ r(k, { snapExit: !0, children: /* @__PURE__ */ d(Se, { className: "size-10", children: [
|
|
2338
|
+
/* @__PURE__ */ r(_e, { src: i, alt: "Agent Icon" }),
|
|
2339
|
+
/* @__PURE__ */ r(Ie, { children: /* @__PURE__ */ r(jr, { className: "size-4" }) })
|
|
2189
2340
|
] }) }) }),
|
|
2190
2341
|
/* @__PURE__ */ d("div", { className: "flex-1", children: [
|
|
2191
|
-
/* @__PURE__ */ r(
|
|
2192
|
-
/* @__PURE__ */ r(
|
|
2193
|
-
|
|
2342
|
+
/* @__PURE__ */ r(T, { mode: "wait", children: /* @__PURE__ */ r(k, { snapExit: !0, children: a }, a) }),
|
|
2343
|
+
/* @__PURE__ */ r(T, { mode: "wait", children: e.lastMessage ? /* @__PURE__ */ r(k, { snapExit: !0, children: /* @__PURE__ */ r(
|
|
2344
|
+
At,
|
|
2194
2345
|
{
|
|
2195
|
-
remarkPlugins: [
|
|
2196
|
-
rehypePlugins: [
|
|
2346
|
+
remarkPlugins: [St],
|
|
2347
|
+
rehypePlugins: [_t],
|
|
2197
2348
|
className: "line-clamp-1 overflow-hidden text-ellipsis text-xs text-muted-foreground",
|
|
2198
2349
|
children: e.lastMessage
|
|
2199
2350
|
}
|
|
2200
|
-
) }, e.lastMessage || "content") : /* @__PURE__ */ r(
|
|
2351
|
+
) }, e.lastMessage || "content") : /* @__PURE__ */ r(k, { className: "w-1/2", snapExit: !0, children: /* @__PURE__ */ r(Ao, { className: "h-4 w-full" }) }, "skeleton") })
|
|
2201
2352
|
] })
|
|
2202
2353
|
] }),
|
|
2203
|
-
/* @__PURE__ */ r(
|
|
2354
|
+
/* @__PURE__ */ r(Er, { className: "size-4 text-muted-foreground shrink-0 rtl:-scale-100" })
|
|
2204
2355
|
]
|
|
2205
2356
|
}
|
|
2206
2357
|
);
|
|
2207
2358
|
}
|
|
2208
|
-
function
|
|
2209
|
-
const { t: e } =
|
|
2359
|
+
function Wo() {
|
|
2360
|
+
const { t: e } = Z(), { toChatScreen: o } = H(), {
|
|
2210
2361
|
sessionsState: { data: t, isInitialFetchLoading: n },
|
|
2211
2362
|
openSessions: s,
|
|
2212
|
-
closedSessions:
|
|
2213
|
-
canCreateNewSession:
|
|
2214
|
-
} =
|
|
2215
|
-
return /* @__PURE__ */ r("div", { className: "flex-1 flex flex-col overflow-scroll py-2 px-2", children: /* @__PURE__ */ r(
|
|
2216
|
-
|
|
2363
|
+
closedSessions: a,
|
|
2364
|
+
canCreateNewSession: i
|
|
2365
|
+
} = Y();
|
|
2366
|
+
return /* @__PURE__ */ r("div", { className: "flex-1 flex flex-col overflow-scroll py-2 px-2", children: /* @__PURE__ */ r(T, { mode: "wait", children: n ? /* @__PURE__ */ r(
|
|
2367
|
+
k,
|
|
2217
2368
|
{
|
|
2218
2369
|
className: "flex-1 flex items-center justify-center",
|
|
2219
|
-
children: /* @__PURE__ */ r(
|
|
2370
|
+
children: /* @__PURE__ */ r(Bt, {})
|
|
2220
2371
|
},
|
|
2221
2372
|
"loading"
|
|
2222
2373
|
) : /* @__PURE__ */ r(
|
|
2223
|
-
|
|
2374
|
+
k,
|
|
2224
2375
|
{
|
|
2225
2376
|
className: "flex-1 flex flex-col gap-2 relative",
|
|
2226
|
-
children: t.length ? /* @__PURE__ */ d(
|
|
2227
|
-
/* @__PURE__ */ d(
|
|
2377
|
+
children: t.length ? /* @__PURE__ */ d(Q, { children: [
|
|
2378
|
+
/* @__PURE__ */ d(T, { children: [
|
|
2228
2379
|
s.length > 0 && /* @__PURE__ */ r(
|
|
2229
|
-
|
|
2380
|
+
k,
|
|
2230
2381
|
{
|
|
2231
2382
|
fadeIn: "up",
|
|
2232
2383
|
delay: 0.2,
|
|
2233
2384
|
className: "space-y-2",
|
|
2234
2385
|
snapExit: !0,
|
|
2235
|
-
children: s.map((l) => /* @__PURE__ */ r(
|
|
2386
|
+
children: s.map((l) => /* @__PURE__ */ r(wt, { session: l }, l.id))
|
|
2236
2387
|
},
|
|
2237
2388
|
"open-sessions"
|
|
2238
2389
|
),
|
|
2239
|
-
|
|
2240
|
-
|
|
2390
|
+
a.length > 0 && /* @__PURE__ */ d(
|
|
2391
|
+
k,
|
|
2241
2392
|
{
|
|
2242
2393
|
className: "space-y-2",
|
|
2243
2394
|
delay: 0.2,
|
|
2244
2395
|
snapExit: !0,
|
|
2245
2396
|
children: [
|
|
2246
|
-
/* @__PURE__ */ r(
|
|
2247
|
-
|
|
2248
|
-
|
|
2397
|
+
/* @__PURE__ */ r(Fo, { children: e("closed_conversations") }),
|
|
2398
|
+
a.map((l) => /* @__PURE__ */ r(
|
|
2399
|
+
wt,
|
|
2249
2400
|
{
|
|
2250
2401
|
session: l,
|
|
2251
2402
|
className: "opacity-50 hover:opacity-100"
|
|
@@ -2257,8 +2408,8 @@ function To() {
|
|
|
2257
2408
|
"closed-sessions"
|
|
2258
2409
|
)
|
|
2259
2410
|
] }),
|
|
2260
|
-
|
|
2261
|
-
|
|
2411
|
+
i && /* @__PURE__ */ r("div", { className: "mt-auto w-full rounded-3xl sticky bottom-0 outline outline-8 outline-background bg-background", children: /* @__PURE__ */ lt(
|
|
2412
|
+
S,
|
|
2262
2413
|
{
|
|
2263
2414
|
...g("sessions/new_conversation_btn"),
|
|
2264
2415
|
size: "lg",
|
|
@@ -2270,8 +2421,8 @@ function To() {
|
|
|
2270
2421
|
) })
|
|
2271
2422
|
] }) : /* @__PURE__ */ d("div", { className: "flex-1 flex flex-col gap-2 items-center", children: [
|
|
2272
2423
|
/* @__PURE__ */ r("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ r("p", { className: "text-muted-foreground", children: e("no_conversations_yet") }) }),
|
|
2273
|
-
/* @__PURE__ */
|
|
2274
|
-
|
|
2424
|
+
/* @__PURE__ */ lt(
|
|
2425
|
+
S,
|
|
2275
2426
|
{
|
|
2276
2427
|
...g("sessions/new_conversation_btn"),
|
|
2277
2428
|
size: "lg",
|
|
@@ -2286,16 +2437,16 @@ function To() {
|
|
|
2286
2437
|
"sessions"
|
|
2287
2438
|
) }) });
|
|
2288
2439
|
}
|
|
2289
|
-
function
|
|
2290
|
-
const { theme: e } =
|
|
2291
|
-
return
|
|
2440
|
+
function Lo() {
|
|
2441
|
+
const { theme: e } = G();
|
|
2442
|
+
return Te({
|
|
2292
2443
|
width: e.screens.sessions.width,
|
|
2293
2444
|
height: e.screens.sessions.height
|
|
2294
2445
|
}), /* @__PURE__ */ r(
|
|
2295
2446
|
"div",
|
|
2296
2447
|
{
|
|
2297
2448
|
...g("sessions/root"),
|
|
2298
|
-
className:
|
|
2449
|
+
className: h("flex flex-col overflow-hidden bg-background"),
|
|
2299
2450
|
style: {
|
|
2300
2451
|
width: "100vw",
|
|
2301
2452
|
// Relative to the iframe
|
|
@@ -2307,22 +2458,22 @@ function Mo() {
|
|
|
2307
2458
|
// Relative to the iframe
|
|
2308
2459
|
},
|
|
2309
2460
|
children: /* @__PURE__ */ d("div", { className: "size-full flex flex-col", children: [
|
|
2310
|
-
/* @__PURE__ */ r(
|
|
2311
|
-
/* @__PURE__ */ r(
|
|
2312
|
-
/* @__PURE__ */ r(
|
|
2461
|
+
/* @__PURE__ */ r(Yt, {}),
|
|
2462
|
+
/* @__PURE__ */ r(Wo, {}),
|
|
2463
|
+
/* @__PURE__ */ r(Xt, {})
|
|
2313
2464
|
] })
|
|
2314
2465
|
}
|
|
2315
2466
|
);
|
|
2316
2467
|
}
|
|
2317
|
-
const
|
|
2468
|
+
const de = J.forwardRef(
|
|
2318
2469
|
({ className: e, type: o, ...t }, n) => {
|
|
2319
|
-
const { isSmallScreen: s } =
|
|
2470
|
+
const { isSmallScreen: s } = L();
|
|
2320
2471
|
return /* @__PURE__ */ r(
|
|
2321
2472
|
"input",
|
|
2322
2473
|
{
|
|
2323
2474
|
ref: n,
|
|
2324
2475
|
type: o,
|
|
2325
|
-
className:
|
|
2476
|
+
className: h(
|
|
2326
2477
|
// 16px on mobiles prevents auto-zoom on the input when focused
|
|
2327
2478
|
s ? "text-[16px]" : "text-sm",
|
|
2328
2479
|
"flex w-full rounded-xl p-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-primary-foreground placeholder:text-muted-foreground/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition",
|
|
@@ -2335,16 +2486,16 @@ const ie = K.forwardRef(
|
|
|
2335
2486
|
);
|
|
2336
2487
|
}
|
|
2337
2488
|
);
|
|
2338
|
-
|
|
2339
|
-
function
|
|
2340
|
-
const { contentIframeRef: e } =
|
|
2341
|
-
return
|
|
2489
|
+
de.displayName = "Input";
|
|
2490
|
+
function $o() {
|
|
2491
|
+
const { contentIframeRef: e } = P(), { inline: o } = N(), t = $(null);
|
|
2492
|
+
return se(() => {
|
|
2342
2493
|
const n = e == null ? void 0 : e.current;
|
|
2343
2494
|
if (n && t.current) {
|
|
2344
2495
|
const s = t.current;
|
|
2345
|
-
let
|
|
2346
|
-
const
|
|
2347
|
-
|
|
2496
|
+
let a;
|
|
2497
|
+
const i = new ResizeObserver(() => {
|
|
2498
|
+
a = requestAnimationFrame(() => {
|
|
2348
2499
|
const l = s.offsetHeight;
|
|
2349
2500
|
n.style.setProperty(
|
|
2350
2501
|
"--opencx-widget-height",
|
|
@@ -2352,41 +2503,41 @@ function Do() {
|
|
|
2352
2503
|
);
|
|
2353
2504
|
});
|
|
2354
2505
|
});
|
|
2355
|
-
return
|
|
2356
|
-
cancelAnimationFrame(
|
|
2506
|
+
return i.observe(s), () => {
|
|
2507
|
+
cancelAnimationFrame(a), i.unobserve(s);
|
|
2357
2508
|
};
|
|
2358
2509
|
}
|
|
2359
2510
|
}, [e, o]), { observedElementRef: t };
|
|
2360
2511
|
}
|
|
2361
|
-
const
|
|
2362
|
-
name:
|
|
2363
|
-
email:
|
|
2512
|
+
const Yo = ge.object({
|
|
2513
|
+
name: ge.string().min(2),
|
|
2514
|
+
email: ge.string().email()
|
|
2364
2515
|
});
|
|
2365
|
-
function
|
|
2366
|
-
var
|
|
2516
|
+
function Bo() {
|
|
2517
|
+
var v, R, E, j, u, _, w, y;
|
|
2367
2518
|
const {
|
|
2368
2519
|
widgetCtx: { org: e }
|
|
2369
|
-
} =
|
|
2370
|
-
|
|
2520
|
+
} = P(), { setIsOpen: o } = V(), { createUnverifiedContact: t } = Ct(), { isSmallScreen: n } = L(), s = N(), { theme: a } = G(), { t: i } = Z(), { observedElementRef: l } = $o();
|
|
2521
|
+
Te({
|
|
2371
2522
|
height: void 0,
|
|
2372
|
-
width:
|
|
2523
|
+
width: a.screens.welcome.width
|
|
2373
2524
|
});
|
|
2374
|
-
const [c,
|
|
2375
|
-
(
|
|
2376
|
-
), [
|
|
2377
|
-
async (
|
|
2378
|
-
|
|
2379
|
-
const B =
|
|
2525
|
+
const [c, p] = D(((v = s.prefillUserData) == null ? void 0 : v.name) || ""), [b, x] = D(((R = s.prefillUserData) == null ? void 0 : R.email) || ""), m = (s.extraDataCollectionFields || []).filter(
|
|
2526
|
+
(I) => I !== "name" && I !== "email" && !!I
|
|
2527
|
+
), [C, f] = D({}), [z, M] = Lr(
|
|
2528
|
+
async (I) => {
|
|
2529
|
+
I.preventDefault();
|
|
2530
|
+
const B = Yo.safeParse({ name: c, email: b });
|
|
2380
2531
|
B.success && await t(
|
|
2381
2532
|
{
|
|
2382
2533
|
email: B.data.email,
|
|
2383
2534
|
non_verified_name: B.data.name
|
|
2384
2535
|
},
|
|
2385
2536
|
// Only pass extra data if there is any
|
|
2386
|
-
Object.values(
|
|
2537
|
+
Object.values(C).filter(Boolean).length ? C : void 0
|
|
2387
2538
|
);
|
|
2388
2539
|
},
|
|
2389
|
-
[c,
|
|
2540
|
+
[c, b, C]
|
|
2390
2541
|
);
|
|
2391
2542
|
return /* @__PURE__ */ r(
|
|
2392
2543
|
"div",
|
|
@@ -2396,7 +2547,7 @@ function jo() {
|
|
|
2396
2547
|
// Relative to the iframe
|
|
2397
2548
|
maxWidth: "100vw",
|
|
2398
2549
|
// Relative to the iframe
|
|
2399
|
-
minHeight:
|
|
2550
|
+
minHeight: a.screens.welcome.minHeight,
|
|
2400
2551
|
height: "100vh",
|
|
2401
2552
|
// Relative to the iframe
|
|
2402
2553
|
maxHeight: "100vh",
|
|
@@ -2407,7 +2558,7 @@ function jo() {
|
|
|
2407
2558
|
"div",
|
|
2408
2559
|
{
|
|
2409
2560
|
ref: l,
|
|
2410
|
-
className:
|
|
2561
|
+
className: h(
|
|
2411
2562
|
"flex flex-col",
|
|
2412
2563
|
n && "h-full",
|
|
2413
2564
|
"bg-[radial-gradient(ellipse_at_top_left,hsl(var(--opencx-primary)),transparent),radial-gradient(ellipse_at_top_right,hsl(var(--opencx-primary)),transparent)]"
|
|
@@ -2416,23 +2567,23 @@ function jo() {
|
|
|
2416
2567
|
/* @__PURE__ */ d(
|
|
2417
2568
|
"div",
|
|
2418
2569
|
{
|
|
2419
|
-
className:
|
|
2570
|
+
className: h(
|
|
2420
2571
|
"flex-1 flex flex-col px-4 py-12 text-start space-y-4 relative z-10",
|
|
2421
2572
|
"text-primary-foreground"
|
|
2422
2573
|
),
|
|
2423
2574
|
children: [
|
|
2424
|
-
n && /* @__PURE__ */ r(
|
|
2425
|
-
/* @__PURE__ */ r("div", { className: "flex items-center justify-between w-full mb-2", children: (
|
|
2575
|
+
n && /* @__PURE__ */ r(k, { className: "absolute top-6 end-6", children: /* @__PURE__ */ r(S, { size: "selfless", onClick: () => o(!1), children: /* @__PURE__ */ r(ke, { className: "size-4" }) }) }),
|
|
2576
|
+
/* @__PURE__ */ r("div", { className: "flex items-center justify-between w-full mb-2", children: (E = s.assets) != null && E.organizationLogo ? /* @__PURE__ */ r(
|
|
2426
2577
|
"img",
|
|
2427
2578
|
{
|
|
2428
|
-
src: (
|
|
2579
|
+
src: (j = s.assets) == null ? void 0 : j.organizationLogo,
|
|
2429
2580
|
alt: "Company Logo",
|
|
2430
2581
|
className: "h-8 w-auto object-contain"
|
|
2431
2582
|
}
|
|
2432
2583
|
) : /* @__PURE__ */ r("h2", { className: "font-bold text-sm", children: e.name }) }),
|
|
2433
2584
|
/* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
2434
|
-
/* @__PURE__ */ r("h1", { className: "text-[1.75rem] font-semibold tracking-tight leading-none", children: ((
|
|
2435
|
-
/* @__PURE__ */ r("p", { className: "text-sm", children: ((
|
|
2585
|
+
/* @__PURE__ */ r("h1", { className: "text-[1.75rem] font-semibold tracking-tight leading-none", children: ((_ = (u = s.textContent) == null ? void 0 : u.welcomeScreen) == null ? void 0 : _.title) || i("welcome_screen_title") }),
|
|
2586
|
+
/* @__PURE__ */ r("p", { className: "text-sm", children: ((y = (w = s.textContent) == null ? void 0 : w.welcomeScreen) == null ? void 0 : y.description) || i("welcome_screen_description") })
|
|
2436
2587
|
] })
|
|
2437
2588
|
]
|
|
2438
2589
|
}
|
|
@@ -2440,61 +2591,61 @@ function jo() {
|
|
|
2440
2591
|
/* @__PURE__ */ d(
|
|
2441
2592
|
"div",
|
|
2442
2593
|
{
|
|
2443
|
-
className:
|
|
2594
|
+
className: h(
|
|
2444
2595
|
"z-10 m-2 px-2 pt-2 bp-0 space-y-2",
|
|
2445
2596
|
"bg-[white]",
|
|
2446
2597
|
"border shadow",
|
|
2447
2598
|
"rounded-3xl"
|
|
2448
2599
|
),
|
|
2449
2600
|
children: [
|
|
2450
|
-
/* @__PURE__ */ d("form", { onSubmit:
|
|
2601
|
+
/* @__PURE__ */ d("form", { onSubmit: M, className: "space-y-2", children: [
|
|
2451
2602
|
/* @__PURE__ */ r(
|
|
2452
|
-
|
|
2603
|
+
de,
|
|
2453
2604
|
{
|
|
2454
2605
|
value: c,
|
|
2455
|
-
onChange: (
|
|
2606
|
+
onChange: (I) => p(I.target.value),
|
|
2456
2607
|
required: !0,
|
|
2457
|
-
placeholder:
|
|
2608
|
+
placeholder: i("your_name_placeholder"),
|
|
2458
2609
|
name: "name"
|
|
2459
2610
|
}
|
|
2460
2611
|
),
|
|
2461
2612
|
/* @__PURE__ */ r(
|
|
2462
|
-
|
|
2613
|
+
de,
|
|
2463
2614
|
{
|
|
2464
2615
|
required: !0,
|
|
2465
|
-
value:
|
|
2466
|
-
onChange: (
|
|
2616
|
+
value: b,
|
|
2617
|
+
onChange: (I) => x(I.target.value),
|
|
2467
2618
|
type: "email",
|
|
2468
|
-
placeholder:
|
|
2619
|
+
placeholder: i("your_email_placeholder"),
|
|
2469
2620
|
name: "email"
|
|
2470
2621
|
}
|
|
2471
2622
|
),
|
|
2472
|
-
m.map((
|
|
2473
|
-
|
|
2623
|
+
m.map((I) => /* @__PURE__ */ r(
|
|
2624
|
+
de,
|
|
2474
2625
|
{
|
|
2475
|
-
value:
|
|
2476
|
-
onChange: (B) =>
|
|
2477
|
-
...
|
|
2478
|
-
[
|
|
2626
|
+
value: C[I],
|
|
2627
|
+
onChange: (B) => f((ie) => ({
|
|
2628
|
+
...ie,
|
|
2629
|
+
[I]: B.target.value
|
|
2479
2630
|
})),
|
|
2480
|
-
placeholder: `${
|
|
2631
|
+
placeholder: `${I} (${i("optional")})`
|
|
2481
2632
|
},
|
|
2482
|
-
|
|
2633
|
+
I
|
|
2483
2634
|
)),
|
|
2484
2635
|
/* @__PURE__ */ d(
|
|
2485
|
-
|
|
2636
|
+
S,
|
|
2486
2637
|
{
|
|
2487
|
-
disabled:
|
|
2638
|
+
disabled: z.loading,
|
|
2488
2639
|
className: "w-full",
|
|
2489
2640
|
size: "lg",
|
|
2490
2641
|
children: [
|
|
2491
|
-
|
|
2492
|
-
/* @__PURE__ */ r(
|
|
2642
|
+
z.loading ? i("start_chat_button_loading") : i("start_chat_button"),
|
|
2643
|
+
/* @__PURE__ */ r(Pr, { className: "size-4 rtl:-scale-100" })
|
|
2493
2644
|
]
|
|
2494
2645
|
}
|
|
2495
2646
|
)
|
|
2496
2647
|
] }),
|
|
2497
|
-
/* @__PURE__ */ r(
|
|
2648
|
+
/* @__PURE__ */ r(Xt, {})
|
|
2498
2649
|
]
|
|
2499
2650
|
}
|
|
2500
2651
|
)
|
|
@@ -2504,55 +2655,55 @@ function jo() {
|
|
|
2504
2655
|
}
|
|
2505
2656
|
);
|
|
2506
2657
|
}
|
|
2507
|
-
function
|
|
2658
|
+
function qt() {
|
|
2508
2659
|
const {
|
|
2509
2660
|
routerState: { screen: e }
|
|
2510
|
-
} =
|
|
2511
|
-
return /* @__PURE__ */ r("div", { className: "relative bg-background size-full", children: /* @__PURE__ */ r(
|
|
2661
|
+
} = H();
|
|
2662
|
+
return /* @__PURE__ */ r("div", { className: "relative bg-background size-full", children: /* @__PURE__ */ r(T, { mode: "wait", children: (() => {
|
|
2512
2663
|
switch (e) {
|
|
2513
2664
|
case "welcome":
|
|
2514
2665
|
return /* @__PURE__ */ r(
|
|
2515
|
-
|
|
2666
|
+
k,
|
|
2516
2667
|
{
|
|
2517
2668
|
fadeIn: "right",
|
|
2518
2669
|
className: "size-full",
|
|
2519
2670
|
snapExit: !0,
|
|
2520
|
-
children: /* @__PURE__ */ r(
|
|
2671
|
+
children: /* @__PURE__ */ r(Bo, {})
|
|
2521
2672
|
},
|
|
2522
2673
|
e
|
|
2523
2674
|
);
|
|
2524
2675
|
case "sessions":
|
|
2525
2676
|
return /* @__PURE__ */ r(
|
|
2526
|
-
|
|
2677
|
+
k,
|
|
2527
2678
|
{
|
|
2528
2679
|
fadeIn: "right",
|
|
2529
2680
|
className: "size-full",
|
|
2530
2681
|
snapExit: !0,
|
|
2531
|
-
children: /* @__PURE__ */ r(
|
|
2682
|
+
children: /* @__PURE__ */ r(Lo, {})
|
|
2532
2683
|
},
|
|
2533
2684
|
e
|
|
2534
2685
|
);
|
|
2535
2686
|
case "chat":
|
|
2536
2687
|
return /* @__PURE__ */ r(
|
|
2537
|
-
|
|
2688
|
+
k,
|
|
2538
2689
|
{
|
|
2539
2690
|
fadeIn: "right",
|
|
2540
2691
|
className: "size-full",
|
|
2541
2692
|
snapExit: !0,
|
|
2542
|
-
children: /* @__PURE__ */ r(
|
|
2693
|
+
children: /* @__PURE__ */ r(Oo, {})
|
|
2543
2694
|
},
|
|
2544
2695
|
e
|
|
2545
2696
|
);
|
|
2546
2697
|
default:
|
|
2547
|
-
return
|
|
2698
|
+
return A(e, qt.name), null;
|
|
2548
2699
|
}
|
|
2549
2700
|
})() }) });
|
|
2550
2701
|
}
|
|
2551
|
-
const
|
|
2702
|
+
const Uo = "4.0.48", Xo = `<!DOCTYPE html>
|
|
2552
2703
|
<html>
|
|
2553
2704
|
<head>
|
|
2554
2705
|
<style>
|
|
2555
|
-
${
|
|
2706
|
+
${Ht}
|
|
2556
2707
|
html, body {
|
|
2557
2708
|
height: 100%;
|
|
2558
2709
|
width: 100%;
|
|
@@ -2566,10 +2717,10 @@ html, body {
|
|
|
2566
2717
|
<body>
|
|
2567
2718
|
</body>
|
|
2568
2719
|
</html>`;
|
|
2569
|
-
function
|
|
2570
|
-
const { isOpen: e } =
|
|
2720
|
+
function Vt() {
|
|
2721
|
+
const { isOpen: e } = V(), { contentIframeRef: o } = P(), { cssOverrides: t, inline: n } = N(), { theme: s, cssVars: a, computed: i } = G(), { dir: l } = Z();
|
|
2571
2722
|
return /* @__PURE__ */ r(
|
|
2572
|
-
|
|
2723
|
+
re.div,
|
|
2573
2724
|
{
|
|
2574
2725
|
animate: e ? "visible" : "hidden",
|
|
2575
2726
|
initial: "hidden",
|
|
@@ -2588,23 +2739,23 @@ function $t() {
|
|
|
2588
2739
|
}
|
|
2589
2740
|
},
|
|
2590
2741
|
children: /* @__PURE__ */ d(
|
|
2591
|
-
|
|
2742
|
+
It,
|
|
2592
2743
|
{
|
|
2593
2744
|
ref: o,
|
|
2594
|
-
initialContent:
|
|
2745
|
+
initialContent: Xo,
|
|
2595
2746
|
allowFullScreen: !0,
|
|
2596
2747
|
title: "OpenCX Live Chat",
|
|
2597
2748
|
style: {
|
|
2598
2749
|
// @ts-expect-error this is a valid css variable
|
|
2599
|
-
"--opencx-widget-width":
|
|
2600
|
-
"--opencx-widget-height":
|
|
2601
|
-
minWidth:
|
|
2750
|
+
"--opencx-widget-width": i.minWidth,
|
|
2751
|
+
"--opencx-widget-height": i.minHeight,
|
|
2752
|
+
minWidth: i.minWidth,
|
|
2602
2753
|
width: "var(--opencx-widget-width)",
|
|
2603
|
-
maxWidth:
|
|
2754
|
+
maxWidth: i.maxWidth,
|
|
2604
2755
|
// Relative to the viewport
|
|
2605
|
-
minHeight:
|
|
2756
|
+
minHeight: i.minHeight,
|
|
2606
2757
|
height: "var(--opencx-widget-height)",
|
|
2607
|
-
maxHeight:
|
|
2758
|
+
maxHeight: i.maxHeight,
|
|
2608
2759
|
// Relative to the viewport
|
|
2609
2760
|
overflow: "hidden",
|
|
2610
2761
|
/** outline is better than border because of box sizing; the outline wouldn't affect the content inside... the border will mess up how the children's border radius sits with the parent */
|
|
@@ -2625,20 +2776,20 @@ function $t() {
|
|
|
2625
2776
|
"div",
|
|
2626
2777
|
{
|
|
2627
2778
|
style: {
|
|
2628
|
-
...
|
|
2779
|
+
...a,
|
|
2629
2780
|
zIndex: s.widgetContentContainer.zIndex
|
|
2630
2781
|
},
|
|
2631
|
-
"data-version":
|
|
2632
|
-
className:
|
|
2782
|
+
"data-version": Uo,
|
|
2783
|
+
className: h(
|
|
2633
2784
|
"antialiased font-sans size-full overflow-hidden relative text-secondary-foreground isolate"
|
|
2634
2785
|
),
|
|
2635
2786
|
dir: l,
|
|
2636
2787
|
children: /* @__PURE__ */ r(
|
|
2637
|
-
|
|
2788
|
+
ro,
|
|
2638
2789
|
{
|
|
2639
2790
|
delayDuration: 200,
|
|
2640
2791
|
disableHoverableContent: !0,
|
|
2641
|
-
children: /* @__PURE__ */ r(
|
|
2792
|
+
children: /* @__PURE__ */ r(Gr, { children: /* @__PURE__ */ r(qt, {}) })
|
|
2642
2793
|
}
|
|
2643
2794
|
)
|
|
2644
2795
|
}
|
|
@@ -2649,10 +2800,10 @@ function $t() {
|
|
|
2649
2800
|
}
|
|
2650
2801
|
);
|
|
2651
2802
|
}
|
|
2652
|
-
function
|
|
2653
|
-
const { theme: e } =
|
|
2803
|
+
function qo() {
|
|
2804
|
+
const { theme: e } = G();
|
|
2654
2805
|
return /* @__PURE__ */ r(
|
|
2655
|
-
|
|
2806
|
+
he.Content,
|
|
2656
2807
|
{
|
|
2657
2808
|
onInteractOutside: (o) => o.preventDefault(),
|
|
2658
2809
|
forceMount: !0,
|
|
@@ -2667,11 +2818,11 @@ function Po() {
|
|
|
2667
2818
|
sideOffset: e.widgetContentContainer.offset.side,
|
|
2668
2819
|
alignOffset: e.widgetContentContainer.offset.align,
|
|
2669
2820
|
avoidCollisions: !1,
|
|
2670
|
-
children: /* @__PURE__ */ r(
|
|
2821
|
+
children: /* @__PURE__ */ r(Vt, {})
|
|
2671
2822
|
}
|
|
2672
2823
|
);
|
|
2673
2824
|
}
|
|
2674
|
-
function
|
|
2825
|
+
function Vo({
|
|
2675
2826
|
className: e,
|
|
2676
2827
|
style: o
|
|
2677
2828
|
}) {
|
|
@@ -2683,7 +2834,7 @@ function Ao({
|
|
|
2683
2834
|
viewBox: "0 0 32 30",
|
|
2684
2835
|
fill: "none",
|
|
2685
2836
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2686
|
-
className:
|
|
2837
|
+
className: h("text-primary-foreground", e),
|
|
2687
2838
|
style: o,
|
|
2688
2839
|
children: [
|
|
2689
2840
|
/* @__PURE__ */ r(
|
|
@@ -2706,11 +2857,11 @@ function Ao({
|
|
|
2706
2857
|
}
|
|
2707
2858
|
);
|
|
2708
2859
|
}
|
|
2709
|
-
const
|
|
2860
|
+
const Go = `<!DOCTYPE html>
|
|
2710
2861
|
<html>
|
|
2711
2862
|
<head>
|
|
2712
2863
|
<style>
|
|
2713
|
-
${
|
|
2864
|
+
${Ht}
|
|
2714
2865
|
html, body {
|
|
2715
2866
|
height: 100%;
|
|
2716
2867
|
width: 100%;
|
|
@@ -2723,23 +2874,27 @@ html, body {
|
|
|
2723
2874
|
<body>
|
|
2724
2875
|
</body>
|
|
2725
2876
|
</html>`;
|
|
2726
|
-
function
|
|
2727
|
-
var
|
|
2728
|
-
const { isOpen: e } =
|
|
2729
|
-
return
|
|
2730
|
-
|
|
2877
|
+
function Zo() {
|
|
2878
|
+
var l, c;
|
|
2879
|
+
const { isOpen: e, setIsOpen: o } = V(), { cssOverrides: t, assets: n, customComponents: s } = N(), { theme: a, cssVars: i } = G();
|
|
2880
|
+
return s != null && s.widgetTrigger ? s.widgetTrigger({
|
|
2881
|
+
react: W,
|
|
2882
|
+
isOpen: e,
|
|
2883
|
+
setIsOpen: (p) => o(p)
|
|
2884
|
+
}) : /* @__PURE__ */ d(
|
|
2885
|
+
It,
|
|
2731
2886
|
{
|
|
2732
|
-
initialContent:
|
|
2887
|
+
initialContent: Go,
|
|
2733
2888
|
title: "OpenCX Live Chat Trigger",
|
|
2734
2889
|
style: {
|
|
2735
|
-
height: `calc(${
|
|
2736
|
-
width: `calc(${
|
|
2890
|
+
height: `calc(${a.widgetTrigger.size.button}px + ${K.x * 2}px)`,
|
|
2891
|
+
width: `calc(${a.widgetTrigger.size.button}px + ${K.y * 2}px)`,
|
|
2737
2892
|
fontSize: "16px",
|
|
2738
2893
|
position: "fixed",
|
|
2739
|
-
zIndex:
|
|
2740
|
-
right:
|
|
2741
|
-
bottom:
|
|
2742
|
-
left:
|
|
2894
|
+
zIndex: a.widgetTrigger.zIndex,
|
|
2895
|
+
right: a.widgetTrigger.offset.right,
|
|
2896
|
+
bottom: a.widgetTrigger.offset.bottom,
|
|
2897
|
+
left: a.widgetTrigger.offset.left,
|
|
2743
2898
|
// reset iframe defaults
|
|
2744
2899
|
boxSizing: "border-box",
|
|
2745
2900
|
borderWidth: "0px",
|
|
@@ -2747,12 +2902,12 @@ function Ho() {
|
|
|
2747
2902
|
borderRadius: "100%"
|
|
2748
2903
|
},
|
|
2749
2904
|
children: [
|
|
2750
|
-
|
|
2905
|
+
t && /* @__PURE__ */ r("style", { children: t }),
|
|
2751
2906
|
/* @__PURE__ */ r(
|
|
2752
2907
|
"div",
|
|
2753
2908
|
{
|
|
2754
2909
|
style: {
|
|
2755
|
-
...
|
|
2910
|
+
...i,
|
|
2756
2911
|
width: "100%",
|
|
2757
2912
|
height: "100%",
|
|
2758
2913
|
display: "flex",
|
|
@@ -2760,20 +2915,20 @@ function Ho() {
|
|
|
2760
2915
|
justifyContent: "center"
|
|
2761
2916
|
},
|
|
2762
2917
|
children: /* @__PURE__ */ r(
|
|
2763
|
-
|
|
2918
|
+
he.PopoverTrigger,
|
|
2764
2919
|
{
|
|
2765
|
-
className:
|
|
2920
|
+
className: h(
|
|
2766
2921
|
"font-sans flex items-center justify-center rounded-full"
|
|
2767
2922
|
),
|
|
2768
2923
|
style: {
|
|
2769
|
-
height:
|
|
2770
|
-
width:
|
|
2924
|
+
height: a.widgetTrigger.size.button,
|
|
2925
|
+
width: a.widgetTrigger.size.button
|
|
2771
2926
|
},
|
|
2772
|
-
children: /* @__PURE__ */ r(
|
|
2927
|
+
children: /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(
|
|
2773
2928
|
"div",
|
|
2774
2929
|
{
|
|
2775
2930
|
...g("trigger/btn"),
|
|
2776
|
-
className:
|
|
2931
|
+
className: h(
|
|
2777
2932
|
"relative size-full rounded-full",
|
|
2778
2933
|
"flex items-center justify-center",
|
|
2779
2934
|
"overflow-hidden",
|
|
@@ -2781,8 +2936,8 @@ function Ho() {
|
|
|
2781
2936
|
"bg-primary",
|
|
2782
2937
|
"text-primary-foreground"
|
|
2783
2938
|
),
|
|
2784
|
-
children: /* @__PURE__ */ r(
|
|
2785
|
-
|
|
2939
|
+
children: /* @__PURE__ */ r(T, { mode: "wait", children: e ? /* @__PURE__ */ r(
|
|
2940
|
+
k,
|
|
2786
2941
|
{
|
|
2787
2942
|
snapExit: !0,
|
|
2788
2943
|
fadeIn: "up",
|
|
@@ -2790,51 +2945,51 @@ function Ho() {
|
|
|
2790
2945
|
initial: { rotate: 45 },
|
|
2791
2946
|
animate: { rotate: 0 }
|
|
2792
2947
|
},
|
|
2793
|
-
children: (
|
|
2948
|
+
children: (l = n == null ? void 0 : n.widgetTrigger) != null && l.closeIcon ? /* @__PURE__ */ r(
|
|
2794
2949
|
"img",
|
|
2795
2950
|
{
|
|
2796
|
-
src:
|
|
2951
|
+
src: n.widgetTrigger.closeIcon,
|
|
2797
2952
|
alt: "Widget trigger close icon",
|
|
2798
2953
|
style: {
|
|
2799
|
-
width:
|
|
2800
|
-
height:
|
|
2954
|
+
width: a.widgetTrigger.size.icon,
|
|
2955
|
+
height: a.widgetTrigger.size.icon
|
|
2801
2956
|
}
|
|
2802
2957
|
}
|
|
2803
2958
|
) : /* @__PURE__ */ r(
|
|
2804
|
-
|
|
2959
|
+
Or,
|
|
2805
2960
|
{
|
|
2806
2961
|
style: {
|
|
2807
|
-
width:
|
|
2808
|
-
height:
|
|
2962
|
+
width: a.widgetTrigger.size.icon,
|
|
2963
|
+
height: a.widgetTrigger.size.icon
|
|
2809
2964
|
}
|
|
2810
2965
|
}
|
|
2811
2966
|
)
|
|
2812
2967
|
},
|
|
2813
2968
|
"x-icon"
|
|
2814
2969
|
) : /* @__PURE__ */ r(
|
|
2815
|
-
|
|
2970
|
+
k,
|
|
2816
2971
|
{
|
|
2817
2972
|
snapExit: !0,
|
|
2818
2973
|
overrides: {
|
|
2819
2974
|
initial: { rotate: 45 },
|
|
2820
2975
|
animate: { rotate: 0 }
|
|
2821
2976
|
},
|
|
2822
|
-
children: (
|
|
2977
|
+
children: (c = n == null ? void 0 : n.widgetTrigger) != null && c.openIcon ? /* @__PURE__ */ r(
|
|
2823
2978
|
"img",
|
|
2824
2979
|
{
|
|
2825
|
-
src:
|
|
2980
|
+
src: n.widgetTrigger.openIcon,
|
|
2826
2981
|
alt: "Widget trigger open icon",
|
|
2827
2982
|
style: {
|
|
2828
|
-
width:
|
|
2829
|
-
height:
|
|
2983
|
+
width: a.widgetTrigger.size.icon,
|
|
2984
|
+
height: a.widgetTrigger.size.icon
|
|
2830
2985
|
}
|
|
2831
2986
|
}
|
|
2832
2987
|
) : /* @__PURE__ */ r(
|
|
2833
|
-
|
|
2988
|
+
Vo,
|
|
2834
2989
|
{
|
|
2835
2990
|
style: {
|
|
2836
|
-
width:
|
|
2837
|
-
height:
|
|
2991
|
+
width: a.widgetTrigger.size.icon,
|
|
2992
|
+
height: a.widgetTrigger.size.icon
|
|
2838
2993
|
},
|
|
2839
2994
|
className: "mt-0.5 opacity-95"
|
|
2840
2995
|
}
|
|
@@ -2852,10 +3007,10 @@ function Ho() {
|
|
|
2852
3007
|
}
|
|
2853
3008
|
);
|
|
2854
3009
|
}
|
|
2855
|
-
function
|
|
2856
|
-
const { dir: e } =
|
|
3010
|
+
function Ko() {
|
|
3011
|
+
const { dir: e } = ye();
|
|
2857
3012
|
return /* @__PURE__ */ r(
|
|
2858
|
-
|
|
3013
|
+
he.Anchor,
|
|
2859
3014
|
{
|
|
2860
3015
|
style: {
|
|
2861
3016
|
position: "fixed",
|
|
@@ -2866,23 +3021,23 @@ function Wo() {
|
|
|
2866
3021
|
}
|
|
2867
3022
|
);
|
|
2868
3023
|
}
|
|
2869
|
-
function
|
|
3024
|
+
function Qo({
|
|
2870
3025
|
widgetRef: e
|
|
2871
3026
|
}) {
|
|
2872
|
-
const { widgetCtx: o } =
|
|
2873
|
-
toChatScreen:
|
|
2874
|
-
routerState: { screen:
|
|
2875
|
-
} =
|
|
2876
|
-
return
|
|
3027
|
+
const { widgetCtx: o } = P(), { contactState: t } = Ct(), { setIsOpen: n, isOpen: s } = V(), {
|
|
3028
|
+
toChatScreen: a,
|
|
3029
|
+
routerState: { screen: i }
|
|
3030
|
+
} = H(), { sendMessage: l } = O();
|
|
3031
|
+
return W.useImperativeHandle(
|
|
2877
3032
|
e,
|
|
2878
3033
|
() => ({
|
|
2879
3034
|
newChat: async (c) => {
|
|
2880
|
-
var
|
|
2881
|
-
if (!((
|
|
3035
|
+
var p;
|
|
3036
|
+
if (!((p = t.contact) != null && p.token)) {
|
|
2882
3037
|
console.warn("Cannot start a new chat: contact not yet initialized.");
|
|
2883
3038
|
return;
|
|
2884
3039
|
}
|
|
2885
|
-
console.log({ isOpen: s }), s || n(!0),
|
|
3040
|
+
console.log({ isOpen: s }), s || n(!0), i === "chat" && o.resetChat(), a(), c != null && c.message && l({ content: c.message });
|
|
2886
3041
|
}
|
|
2887
3042
|
}),
|
|
2888
3043
|
[
|
|
@@ -2890,38 +3045,38 @@ function Lo({
|
|
|
2890
3045
|
t,
|
|
2891
3046
|
n,
|
|
2892
3047
|
s,
|
|
2893
|
-
a,
|
|
2894
3048
|
i,
|
|
3049
|
+
a,
|
|
2895
3050
|
l
|
|
2896
3051
|
]
|
|
2897
3052
|
), null;
|
|
2898
3053
|
}
|
|
2899
|
-
function
|
|
2900
|
-
const { isOpen: e, setIsOpen: o } =
|
|
2901
|
-
return /* @__PURE__ */ d(
|
|
2902
|
-
/* @__PURE__ */ r(
|
|
2903
|
-
/* @__PURE__ */ r(
|
|
2904
|
-
/* @__PURE__ */ r(
|
|
3054
|
+
function Jo() {
|
|
3055
|
+
const { isOpen: e, setIsOpen: o } = V();
|
|
3056
|
+
return /* @__PURE__ */ d(he.Root, { open: e, onOpenChange: o, children: [
|
|
3057
|
+
/* @__PURE__ */ r(Ko, {}),
|
|
3058
|
+
/* @__PURE__ */ r(Zo, {}),
|
|
3059
|
+
/* @__PURE__ */ r(qo, {})
|
|
2905
3060
|
] });
|
|
2906
3061
|
}
|
|
2907
|
-
const
|
|
3062
|
+
const en = [
|
|
2908
3063
|
{
|
|
2909
3064
|
key: "loading",
|
|
2910
|
-
component:
|
|
3065
|
+
component: to
|
|
2911
3066
|
},
|
|
2912
3067
|
{
|
|
2913
3068
|
key: "fallback",
|
|
2914
|
-
component:
|
|
3069
|
+
component: eo
|
|
2915
3070
|
},
|
|
2916
3071
|
{
|
|
2917
3072
|
key: "bot_message",
|
|
2918
|
-
component:
|
|
3073
|
+
component: fe
|
|
2919
3074
|
},
|
|
2920
3075
|
{
|
|
2921
3076
|
key: "agent_message",
|
|
2922
|
-
component:
|
|
3077
|
+
component: fe
|
|
2923
3078
|
}
|
|
2924
|
-
],
|
|
3079
|
+
], tn = {
|
|
2925
3080
|
get: async (e) => localStorage.getItem(e),
|
|
2926
3081
|
set: async (e, o) => {
|
|
2927
3082
|
localStorage.setItem(e, o);
|
|
@@ -2929,23 +3084,23 @@ const Bo = [
|
|
|
2929
3084
|
remove: async (e) => {
|
|
2930
3085
|
localStorage.removeItem(e);
|
|
2931
3086
|
}
|
|
2932
|
-
},
|
|
3087
|
+
}, rn = W.forwardRef(function({ options: o, components: t = [], loadingComponent: n }, s) {
|
|
2933
3088
|
return /* @__PURE__ */ r(
|
|
2934
|
-
|
|
3089
|
+
Jt,
|
|
2935
3090
|
{
|
|
2936
|
-
components: [...
|
|
3091
|
+
components: [...en, ...t],
|
|
2937
3092
|
options: o,
|
|
2938
|
-
storage:
|
|
3093
|
+
storage: tn,
|
|
2939
3094
|
loadingComponent: n,
|
|
2940
|
-
children: /* @__PURE__ */ d(
|
|
2941
|
-
/* @__PURE__ */ r(
|
|
2942
|
-
o.inline ? /* @__PURE__ */ r(
|
|
3095
|
+
children: /* @__PURE__ */ d(er, { children: [
|
|
3096
|
+
/* @__PURE__ */ r(Qo, { widgetRef: s }),
|
|
3097
|
+
o.inline ? /* @__PURE__ */ r(Vt, {}) : /* @__PURE__ */ r(Jo, {})
|
|
2943
3098
|
] })
|
|
2944
3099
|
}
|
|
2945
3100
|
);
|
|
2946
3101
|
});
|
|
2947
|
-
|
|
3102
|
+
rn.displayName = "Widget";
|
|
2948
3103
|
export {
|
|
2949
|
-
|
|
3104
|
+
rn as Widget
|
|
2950
3105
|
};
|
|
2951
3106
|
//# sourceMappingURL=index.js.map
|