@linktr.ee/messaging-react 3.15.3 → 3.16.0-rc-1785214411
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/{Card-BGmgW1l2.cjs → Card-5EWmE6sS.cjs} +2 -2
- package/dist/{Card-BGmgW1l2.cjs.map → Card-5EWmE6sS.cjs.map} +1 -1
- package/dist/{Card-CdouSSmP.js → Card-C9Zg6RqU.js} +2 -2
- package/dist/{Card-CdouSSmP.js.map → Card-C9Zg6RqU.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index-2STuN782.cjs +2 -0
- package/dist/index-2STuN782.cjs.map +1 -0
- package/dist/{index-B5xEngCd.js → index-vYOR0x6o.js} +558 -540
- package/dist/index-vYOR0x6o.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +54 -4
- package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +61 -24
- package/src/styles.css +5 -2
- package/dist/index-B5xEngCd.js.map +0 -1
- package/dist/index-BfEoDUXO.cjs +0 -2
- package/dist/index-BfEoDUXO.cjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as s, jsxs as h, Fragment as
|
|
2
|
-
import j, { createContext as st, useContext as ye, useCallback as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as qs, useChannelStateContext as ue, useChatContext as ke, DateSeparator as
|
|
1
|
+
import { jsx as s, jsxs as h, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import j, { createContext as st, useContext as ye, useCallback as q, useState as F, useRef as G, useEffect as Y, useId as Gs, useMemo as se, Suspense as Hs } from "react";
|
|
3
|
+
import { StreamChatService as Ys } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as Ws, LinkPreviewsManager as Ot } from "stream-chat";
|
|
5
|
+
import { Chat as qs, useChannelStateContext as ue, useChatContext as ke, DateSeparator as Xs, useMessageContext as me, MessageStatus as Ks, MessageErrorIcon as Ze, MessageText as Le, areMessageUIPropsEqual as Zs, useMessageReminder as Js, useComponentContext as es, Attachment as Qs, EditMessageModal as en, MessageBlocked as tn, MessageBouncePrompt as sn, MessageDeleted as nn, MessageIsThreadReplyInChannelButtonIndicator as an, MessageRepliesCountButton as rn, ReminderNotification as on, StreamedMessageText as ln, messageHasAttachments as cn, messageHasReactions as dn, isDateSeparatorMessage as un, isMessageBlocked as mn, isMessageBounced as hn, MessageBounceModal as fn, Poll as gn, useMessageComposer as pn, useStateStore as bn, MessageInput as Ft, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ve, AIStates as Ge, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as Bt, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
|
|
6
6
|
import N from "classnames";
|
|
7
|
-
import { StarIcon as Je, DotsThreeIcon as
|
|
8
|
-
import { MessageActions as
|
|
7
|
+
import { StarIcon as Je, DotsThreeIcon as Mn, SpinnerGapIcon as Ae, SignOutIcon as An, ProhibitInsetIcon as $t, FlagIcon as ts, CurrencyDollarIcon as Rn, CaretRightIcon as ss, ArrowLeftIcon as Ln, FileIcon as ns, ImageIcon as Dn, SpeakerHighIcon as Pn, VideoCameraIcon as as, FileMdIcon as zn, FileTextIcon as On, FileZipIcon as Fn, FilePptIcon as Bn, FileCsvIcon as $n, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as pe, PlayIcon as Qe, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Ne, XIcon as Be, CaretLeftIcon as Yn, GiftIcon as Wn, ThumbsUpIcon as qn, ThumbsDownIcon as Xn, WarningCircleIcon as Kn, ChecksIcon as Zn, PencilSimpleIcon as Jn, TrashSimpleIcon as Qn, ArrowUpIcon as ea, SparkleIcon as ta, ProhibitIcon as sa } from "@phosphor-icons/react";
|
|
8
|
+
import { MessageActions as na, DefaultDropdownActionButton as rs } from "stream-chat-react/experimental";
|
|
9
9
|
const is = st({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
@@ -16,7 +16,7 @@ const is = st({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), nt = () => ye(is),
|
|
19
|
+
}), nt = () => ye(is), po = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -26,7 +26,7 @@ const is = st({
|
|
|
26
26
|
client: l
|
|
27
27
|
}) => {
|
|
28
28
|
var S, I;
|
|
29
|
-
const o =
|
|
29
|
+
const o = q(
|
|
30
30
|
(y, ...D) => {
|
|
31
31
|
i && console.log(`🔥 [MessagingProvider] ${y}`, ...D);
|
|
32
32
|
},
|
|
@@ -64,7 +64,7 @@ const is = st({
|
|
|
64
64
|
capabilities: r
|
|
65
65
|
};
|
|
66
66
|
const B = G(null);
|
|
67
|
-
!l && a && ((S = B.current) == null ? void 0 : S.apiKey) !== a && (B.current = { apiKey: a, client: new
|
|
67
|
+
!l && a && ((S = B.current) == null ? void 0 : S.apiKey) !== a && (B.current = { apiKey: a, client: new Ws(a) });
|
|
68
68
|
const O = l || (a ? ((I = B.current) == null ? void 0 : I.client) ?? null : null);
|
|
69
69
|
Y(() => {
|
|
70
70
|
const y = z.current, D = k.current;
|
|
@@ -83,7 +83,7 @@ const is = st({
|
|
|
83
83
|
renderCount: y,
|
|
84
84
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
85
85
|
});
|
|
86
|
-
const H = new
|
|
86
|
+
const H = new Ys({
|
|
87
87
|
...D,
|
|
88
88
|
apiKey: a,
|
|
89
89
|
debug: R.current,
|
|
@@ -125,16 +125,16 @@ const is = st({
|
|
|
125
125
|
o("🚀 STARTING USER CONNECTION", { userId: t.id }), w.current = !0, x(!0), b(null);
|
|
126
126
|
try {
|
|
127
127
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
128
|
-
const
|
|
129
|
-
m(
|
|
128
|
+
const W = await d.connectUser(t);
|
|
129
|
+
m(W), c(!0), L.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
130
130
|
userId: t.id,
|
|
131
|
-
clientId:
|
|
131
|
+
clientId: W.userID
|
|
132
132
|
});
|
|
133
|
-
} catch (
|
|
134
|
-
const
|
|
135
|
-
b(
|
|
133
|
+
} catch (W) {
|
|
134
|
+
const Z = W instanceof Error ? W.message : "Connection failed";
|
|
135
|
+
b(Z), o("❌ USER CONNECTION ERROR", {
|
|
136
136
|
userId: t.id,
|
|
137
|
-
error:
|
|
137
|
+
error: Z
|
|
138
138
|
});
|
|
139
139
|
} finally {
|
|
140
140
|
x(!1), w.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
@@ -150,7 +150,7 @@ const is = st({
|
|
|
150
150
|
y && (L.current = null, (D = E.current) == null || D.disconnectUser().catch(console.error));
|
|
151
151
|
};
|
|
152
152
|
}, [O]);
|
|
153
|
-
const C =
|
|
153
|
+
const C = q(async () => {
|
|
154
154
|
if (o("🔄 REFRESH CONNECTION CALLED", {
|
|
155
155
|
hasService: !!d,
|
|
156
156
|
hasUser: !!t
|
|
@@ -224,7 +224,7 @@ const is = st({
|
|
|
224
224
|
children: e
|
|
225
225
|
}
|
|
226
226
|
) : e });
|
|
227
|
-
},
|
|
227
|
+
}, aa = () => nt(), os = (e) => {
|
|
228
228
|
var a, r;
|
|
229
229
|
const [t, n] = F(
|
|
230
230
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -246,14 +246,14 @@ const is = st({
|
|
|
246
246
|
e.off("member.updated", i);
|
|
247
247
|
};
|
|
248
248
|
}, [e]), t;
|
|
249
|
-
},
|
|
249
|
+
}, ra = "linktree-official", ia = "linktree-official-sender";
|
|
250
250
|
function ls(e, t, n) {
|
|
251
251
|
const a = Object.values(e || {});
|
|
252
|
-
if (n ===
|
|
252
|
+
if (n === ra) {
|
|
253
253
|
const r = a.find(
|
|
254
254
|
(i) => {
|
|
255
255
|
var l;
|
|
256
|
-
return ((l = i.user) == null ? void 0 : l.id) ===
|
|
256
|
+
return ((l = i.user) == null ? void 0 : l.id) === ia;
|
|
257
257
|
}
|
|
258
258
|
);
|
|
259
259
|
if (r) return r;
|
|
@@ -265,13 +265,13 @@ function ls(e, t, n) {
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
const
|
|
269
|
-
function
|
|
270
|
-
return
|
|
268
|
+
const oa = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
269
|
+
function la(e) {
|
|
270
|
+
return oa.test(e.trim());
|
|
271
271
|
}
|
|
272
272
|
function Ut(e, t) {
|
|
273
273
|
const n = e == null ? void 0 : e.trim();
|
|
274
|
-
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !
|
|
274
|
+
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !la(n);
|
|
275
275
|
}
|
|
276
276
|
function cs(e) {
|
|
277
277
|
return Ut(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ut(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
@@ -304,7 +304,7 @@ const jt = [
|
|
|
304
304
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
305
305
|
// Melon
|
|
306
306
|
];
|
|
307
|
-
function
|
|
307
|
+
function ca(e) {
|
|
308
308
|
let t = 0;
|
|
309
309
|
for (let n = 0; n < e.length; n++) {
|
|
310
310
|
const a = e.charCodeAt(n);
|
|
@@ -313,15 +313,15 @@ function oa(e) {
|
|
|
313
313
|
return Math.abs(t);
|
|
314
314
|
}
|
|
315
315
|
function ds(e) {
|
|
316
|
-
return jt[
|
|
316
|
+
return jt[ca(e) % jt.length];
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function da(e) {
|
|
319
319
|
return ds(e).emoji;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function ua(e) {
|
|
322
322
|
return ds(e).bgColor;
|
|
323
323
|
}
|
|
324
|
-
const
|
|
324
|
+
const ve = ({
|
|
325
325
|
id: e,
|
|
326
326
|
image: t,
|
|
327
327
|
size: n = 40,
|
|
@@ -330,7 +330,7 @@ const be = ({
|
|
|
330
330
|
shape: i = "squircle",
|
|
331
331
|
dmAgentEnabled: l = !1
|
|
332
332
|
}) => {
|
|
333
|
-
const o =
|
|
333
|
+
const o = da(e), d = ua(e), u = 0.45, m = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
334
334
|
"img",
|
|
335
335
|
{
|
|
336
336
|
src: t,
|
|
@@ -394,7 +394,7 @@ const be = ({
|
|
|
394
394
|
]
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
|
-
},
|
|
397
|
+
}, ma = "https://linktr.ee/s/about/trust-center/report", ha = ({
|
|
398
398
|
channel: e,
|
|
399
399
|
participant: t,
|
|
400
400
|
showBlockParticipant: n = !0,
|
|
@@ -478,10 +478,10 @@ const be = ({
|
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
handleReportUser: () => {
|
|
481
|
-
d == null || d(), u == null || u(), window.open(
|
|
481
|
+
d == null || d(), u == null || u(), window.open(ma, "_blank", "noopener,noreferrer");
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
|
-
},
|
|
484
|
+
}, xe = ({
|
|
485
485
|
variant: e = "default",
|
|
486
486
|
className: t,
|
|
487
487
|
children: n,
|
|
@@ -498,7 +498,7 @@ const be = ({
|
|
|
498
498
|
...a,
|
|
499
499
|
children: n
|
|
500
500
|
}
|
|
501
|
-
),
|
|
501
|
+
), fa = ({
|
|
502
502
|
channel: e,
|
|
503
503
|
participant: t,
|
|
504
504
|
showDeleteConversation: n = !0,
|
|
@@ -512,7 +512,7 @@ const be = ({
|
|
|
512
512
|
customChannelActions: g,
|
|
513
513
|
triggerClassName: m
|
|
514
514
|
}) => {
|
|
515
|
-
const [f, c] = F(!1), v = G(null), x =
|
|
515
|
+
const [f, c] = F(!1), v = G(null), x = Gs(), p = q(() => c(!1), []), {
|
|
516
516
|
isParticipantBlocked: b,
|
|
517
517
|
isCheckingBlockedStatus: w,
|
|
518
518
|
isLeaving: E,
|
|
@@ -521,7 +521,7 @@ const be = ({
|
|
|
521
521
|
handleBlockUser: A,
|
|
522
522
|
handleUnblockUser: z,
|
|
523
523
|
handleReportUser: B
|
|
524
|
-
} =
|
|
524
|
+
} = ha({
|
|
525
525
|
channel: e,
|
|
526
526
|
participant: t,
|
|
527
527
|
showBlockParticipant: a,
|
|
@@ -555,7 +555,7 @@ const be = ({
|
|
|
555
555
|
"aria-controls": f ? x : void 0,
|
|
556
556
|
onClick: () => c((L) => !L),
|
|
557
557
|
children: [
|
|
558
|
-
/* @__PURE__ */ s(
|
|
558
|
+
/* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
|
|
559
559
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
560
560
|
]
|
|
561
561
|
}
|
|
@@ -571,13 +571,13 @@ const be = ({
|
|
|
571
571
|
),
|
|
572
572
|
children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
|
|
573
573
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(
|
|
574
|
-
|
|
574
|
+
xe,
|
|
575
575
|
{
|
|
576
576
|
onClick: R,
|
|
577
577
|
disabled: E,
|
|
578
578
|
"aria-busy": E,
|
|
579
579
|
children: [
|
|
580
|
-
E ? /* @__PURE__ */ s(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(
|
|
580
|
+
E ? /* @__PURE__ */ s(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(An, { className: "h-5 w-5" }),
|
|
581
581
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
582
582
|
]
|
|
583
583
|
}
|
|
@@ -585,12 +585,12 @@ const be = ({
|
|
|
585
585
|
a && /* @__PURE__ */ s("li", { children: w ? (
|
|
586
586
|
// Block status not yet resolved — show a disabled placeholder
|
|
587
587
|
// so a premature click can't act on a stale block state.
|
|
588
|
-
/* @__PURE__ */ h(
|
|
588
|
+
/* @__PURE__ */ h(xe, { disabled: !0, "aria-busy": !0, children: [
|
|
589
589
|
/* @__PURE__ */ s(Ae, { className: "h-5 w-5 animate-spin" }),
|
|
590
590
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
591
591
|
] })
|
|
592
592
|
) : b ? /* @__PURE__ */ h(
|
|
593
|
-
|
|
593
|
+
xe,
|
|
594
594
|
{
|
|
595
595
|
onClick: z,
|
|
596
596
|
disabled: k,
|
|
@@ -601,7 +601,7 @@ const be = ({
|
|
|
601
601
|
]
|
|
602
602
|
}
|
|
603
603
|
) : /* @__PURE__ */ h(
|
|
604
|
-
|
|
604
|
+
xe,
|
|
605
605
|
{
|
|
606
606
|
onClick: A,
|
|
607
607
|
disabled: k,
|
|
@@ -612,7 +612,7 @@ const be = ({
|
|
|
612
612
|
]
|
|
613
613
|
}
|
|
614
614
|
) }),
|
|
615
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(
|
|
615
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(xe, { variant: "danger", onClick: B, children: [
|
|
616
616
|
/* @__PURE__ */ s(ts, { className: "h-5 w-5" }),
|
|
617
617
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
618
618
|
] }) }),
|
|
@@ -621,7 +621,7 @@ const be = ({
|
|
|
621
621
|
}
|
|
622
622
|
)
|
|
623
623
|
] });
|
|
624
|
-
}, He = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring",
|
|
624
|
+
}, He = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ga = "CUSTOMER_PAID", pa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ga, ba = ({
|
|
625
625
|
className: e,
|
|
626
626
|
onBack: t,
|
|
627
627
|
showBackButton: n,
|
|
@@ -650,7 +650,7 @@ const be = ({
|
|
|
650
650
|
);
|
|
651
651
|
},
|
|
652
652
|
[(C = p.state) == null ? void 0 : C.members, b == null ? void 0 : b.userID, p.type]
|
|
653
|
-
), E = cs(w == null ? void 0 : w.user), k = (T = w == null ? void 0 : w.user) == null ? void 0 : T.image, R = os(p), A =
|
|
653
|
+
), E = cs(w == null ? void 0 : w.user), k = (T = w == null ? void 0 : w.user) == null ? void 0 : T.image, R = os(p), A = pa((S = p.data) == null ? void 0 : S.customer_tag) && (w == null ? void 0 : w.is_follower) === !0, z = a && R, B = A || z || !!x, O = async () => {
|
|
654
654
|
try {
|
|
655
655
|
R ? await p.unpin() : await p.pin();
|
|
656
656
|
} catch (y) {
|
|
@@ -659,9 +659,9 @@ const be = ({
|
|
|
659
659
|
y
|
|
660
660
|
);
|
|
661
661
|
}
|
|
662
|
-
}, L = /* @__PURE__ */ h(
|
|
662
|
+
}, L = /* @__PURE__ */ h(K, { children: [
|
|
663
663
|
/* @__PURE__ */ s(
|
|
664
|
-
|
|
664
|
+
ve,
|
|
665
665
|
{
|
|
666
666
|
id: ((I = w == null ? void 0 : w.user) == null ? void 0 : I.id) || p.id || "unknown",
|
|
667
667
|
name: E,
|
|
@@ -686,7 +686,7 @@ const be = ({
|
|
|
686
686
|
{
|
|
687
687
|
"aria-label": "Paid customer",
|
|
688
688
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
689
|
-
children: /* @__PURE__ */ s(
|
|
689
|
+
children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
|
|
690
690
|
}
|
|
691
691
|
),
|
|
692
692
|
z && /* @__PURE__ */ s(
|
|
@@ -729,7 +729,7 @@ const be = ({
|
|
|
729
729
|
}),
|
|
730
730
|
type: "button",
|
|
731
731
|
"aria-label": "Back to conversations",
|
|
732
|
-
children: /* @__PURE__ */ s(
|
|
732
|
+
children: /* @__PURE__ */ s(Ln, { className: "size-5 text-black/90" })
|
|
733
733
|
}
|
|
734
734
|
) }),
|
|
735
735
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: x ? /* @__PURE__ */ s(
|
|
@@ -764,7 +764,7 @@ const be = ({
|
|
|
764
764
|
}
|
|
765
765
|
),
|
|
766
766
|
v && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
767
|
-
|
|
767
|
+
fa,
|
|
768
768
|
{
|
|
769
769
|
channel: p,
|
|
770
770
|
participant: w,
|
|
@@ -784,15 +784,15 @@ const be = ({
|
|
|
784
784
|
] })
|
|
785
785
|
}
|
|
786
786
|
);
|
|
787
|
-
},
|
|
788
|
-
function
|
|
787
|
+
}, va = (e) => /* @__PURE__ */ s(Xs, { ...e, position: "center" }), et = "vote_up", tt = "vote_down";
|
|
788
|
+
function xa(e) {
|
|
789
789
|
return e != null && e.length ? e.some((t) => t.type === tt) ? "down" : e.some((t) => t.type === et) ? "up" : null : null;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function wa(e) {
|
|
792
792
|
const { channel: t } = ue(), { client: n } = ke("useMessageVote"), a = se(
|
|
793
|
-
() =>
|
|
793
|
+
() => xa(e.own_reactions),
|
|
794
794
|
[e.own_reactions]
|
|
795
|
-
), r =
|
|
795
|
+
), r = q(async () => {
|
|
796
796
|
if (n != null && n.userID)
|
|
797
797
|
try {
|
|
798
798
|
a === "up" ? await t.deleteReaction(e.id, et) : await t.sendReaction(
|
|
@@ -802,7 +802,7 @@ function va(e) {
|
|
|
802
802
|
);
|
|
803
803
|
} catch {
|
|
804
804
|
}
|
|
805
|
-
}, [t, n == null ? void 0 : n.userID, e.id, a]), i =
|
|
805
|
+
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = q(async () => {
|
|
806
806
|
if (n != null && n.userID)
|
|
807
807
|
try {
|
|
808
808
|
a === "down" ? await t.deleteReaction(e.id, tt) : await t.sendReaction(
|
|
@@ -815,7 +815,7 @@ function va(e) {
|
|
|
815
815
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
816
816
|
return { selected: a, voteUp: r, voteDown: i };
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function _a(e) {
|
|
819
819
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
820
820
|
}
|
|
821
821
|
function us({
|
|
@@ -823,31 +823,31 @@ function us({
|
|
|
823
823
|
viewerLanguage: t
|
|
824
824
|
}) {
|
|
825
825
|
var r;
|
|
826
|
-
const n = e == null ? void 0 : e.text, a =
|
|
826
|
+
const n = e == null ? void 0 : e.text, a = _a(t);
|
|
827
827
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
828
828
|
}
|
|
829
|
-
const
|
|
830
|
-
function
|
|
829
|
+
const Na = ["linktr.ee"], Vt = "messaging-attachment-v1_0";
|
|
830
|
+
function ya(e) {
|
|
831
831
|
try {
|
|
832
832
|
return new URL(e).hostname.toLowerCase();
|
|
833
833
|
} catch {
|
|
834
834
|
return null;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
return
|
|
837
|
+
function ka(e) {
|
|
838
|
+
return Na.some(
|
|
839
839
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
840
840
|
);
|
|
841
841
|
}
|
|
842
842
|
function de(e) {
|
|
843
843
|
const t = e == null ? void 0 : e.trim();
|
|
844
844
|
if (!t) return;
|
|
845
|
-
const n =
|
|
846
|
-
if (!n || !
|
|
845
|
+
const n = ya(t);
|
|
846
|
+
if (!n || !ka(n)) return t;
|
|
847
847
|
const a = new URL(t);
|
|
848
848
|
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Vt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Vt), a.toString());
|
|
849
849
|
}
|
|
850
|
-
const
|
|
850
|
+
const Ca = [
|
|
851
851
|
[/pdf/, "pdf"],
|
|
852
852
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
853
853
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -861,38 +861,38 @@ function oe(e) {
|
|
|
861
861
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
862
862
|
}
|
|
863
863
|
function ms(e) {
|
|
864
|
-
const t =
|
|
864
|
+
const t = Ca.find(
|
|
865
865
|
([n]) => n.test(e)
|
|
866
866
|
);
|
|
867
867
|
return t ? t[1] : "generic";
|
|
868
868
|
}
|
|
869
|
-
const
|
|
869
|
+
const Sa = {
|
|
870
870
|
video: as,
|
|
871
|
-
audio:
|
|
872
|
-
image:
|
|
871
|
+
audio: Pn,
|
|
872
|
+
image: Dn,
|
|
873
873
|
document: ns
|
|
874
|
-
},
|
|
875
|
-
pdf:
|
|
876
|
-
doc:
|
|
877
|
-
xls:
|
|
878
|
-
csv:
|
|
879
|
-
ppt:
|
|
880
|
-
zip:
|
|
881
|
-
text:
|
|
882
|
-
markdown:
|
|
874
|
+
}, Ea = {
|
|
875
|
+
pdf: Vn,
|
|
876
|
+
doc: jn,
|
|
877
|
+
xls: Un,
|
|
878
|
+
csv: $n,
|
|
879
|
+
ppt: Bn,
|
|
880
|
+
zip: Fn,
|
|
881
|
+
text: On,
|
|
882
|
+
markdown: zn,
|
|
883
883
|
generic: ns
|
|
884
884
|
};
|
|
885
|
-
function
|
|
885
|
+
function Ia(e) {
|
|
886
886
|
const t = oe(e);
|
|
887
|
-
return t !== "document" ?
|
|
887
|
+
return t !== "document" ? Sa[t] : Ea[ms(e)];
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
return j.createElement(
|
|
889
|
+
function be(e, t) {
|
|
890
|
+
return j.createElement(Ia(e), t);
|
|
891
891
|
}
|
|
892
|
-
const
|
|
892
|
+
const Ta = (e) => {
|
|
893
893
|
var t, n;
|
|
894
894
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
|
|
895
|
-
},
|
|
895
|
+
}, Ma = ({
|
|
896
896
|
source: e,
|
|
897
897
|
mimeType: t,
|
|
898
898
|
poster: n,
|
|
@@ -904,20 +904,20 @@ const Ea = (e) => {
|
|
|
904
904
|
muted: d = !1,
|
|
905
905
|
onContainerClick: u
|
|
906
906
|
}) => {
|
|
907
|
-
const g = oe(t), m = G(null), f = G(null), c = G(null), v = G(r), [x, p] = F(a), [b, w] = F(0), [E, k] = F(!1), [R, A] = F(!1), [z, B] = F(!1), [O, L] = F(!1), [C, T] = F(!0), [S, I] = F(null), y =
|
|
907
|
+
const g = oe(t), m = G(null), f = G(null), c = G(null), v = G(r), [x, p] = F(a), [b, w] = F(0), [E, k] = F(!1), [R, A] = F(!1), [z, B] = F(!1), [O, L] = F(!1), [C, T] = F(!0), [S, I] = F(null), y = q(() => {
|
|
908
908
|
B(!1), p(!0);
|
|
909
|
-
}, []), D =
|
|
909
|
+
}, []), D = q((_) => {
|
|
910
910
|
const M = f.current;
|
|
911
911
|
if (!M) return 0;
|
|
912
912
|
const $ = M.getBoundingClientRect();
|
|
913
913
|
return Math.max(
|
|
914
914
|
0,
|
|
915
|
-
Math.min(1, (
|
|
915
|
+
Math.min(1, (Ta(_) - $.left) / $.width)
|
|
916
916
|
);
|
|
917
|
-
}, []), H =
|
|
917
|
+
}, []), H = q((_) => {
|
|
918
918
|
const M = m.current;
|
|
919
919
|
M && M.duration && (M.currentTime = _ * M.duration);
|
|
920
|
-
}, []),
|
|
920
|
+
}, []), W = (_) => {
|
|
921
921
|
_.stopPropagation(), k(!0);
|
|
922
922
|
const M = D(_);
|
|
923
923
|
w(M), H(M);
|
|
@@ -950,14 +950,14 @@ const Ea = (e) => {
|
|
|
950
950
|
window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", M);
|
|
951
951
|
};
|
|
952
952
|
}, [E, D, H]);
|
|
953
|
-
const
|
|
953
|
+
const Z = S ? { aspectRatio: String(S) } : void 0, J = S ? "" : " aspect-video", V = Math.round(b * 100);
|
|
954
954
|
return /* @__PURE__ */ h(
|
|
955
955
|
"div",
|
|
956
956
|
{
|
|
957
957
|
role: "button",
|
|
958
958
|
tabIndex: 0,
|
|
959
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
960
|
-
style:
|
|
959
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${J}`,
|
|
960
|
+
style: Z,
|
|
961
961
|
onClick: (_) => {
|
|
962
962
|
if (u) {
|
|
963
963
|
u(_);
|
|
@@ -983,7 +983,7 @@ const Ea = (e) => {
|
|
|
983
983
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
984
984
|
}
|
|
985
985
|
),
|
|
986
|
-
!n && (g === "audio" || C) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
986
|
+
!n && (g === "audio" || C) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: be(t, {
|
|
987
987
|
className: "size-12 text-black/20",
|
|
988
988
|
weight: "regular"
|
|
989
989
|
}) }),
|
|
@@ -1032,7 +1032,7 @@ const Ea = (e) => {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
) }),
|
|
1034
1034
|
O && !z && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
1035
|
-
|
|
1035
|
+
pe,
|
|
1036
1036
|
{
|
|
1037
1037
|
className: "size-8 animate-spin text-white/80",
|
|
1038
1038
|
weight: "bold"
|
|
@@ -1065,8 +1065,8 @@ const Ea = (e) => {
|
|
|
1065
1065
|
tabIndex: 0,
|
|
1066
1066
|
ref: f,
|
|
1067
1067
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1068
|
-
onMouseDown:
|
|
1069
|
-
onTouchStart:
|
|
1068
|
+
onMouseDown: W,
|
|
1069
|
+
onTouchStart: W,
|
|
1070
1070
|
onClick: (_) => _.stopPropagation(),
|
|
1071
1071
|
onKeyDown: (_) => {
|
|
1072
1072
|
_.key === "ArrowRight" && H(Math.min(1, b + 0.05)), _.key === "ArrowLeft" && H(Math.max(0, b - 0.05));
|
|
@@ -1090,7 +1090,7 @@ const Ea = (e) => {
|
|
|
1090
1090
|
},
|
|
1091
1091
|
className: "shrink-0 text-white",
|
|
1092
1092
|
"aria-label": x ? "Pause" : "Play",
|
|
1093
|
-
children: x ? /* @__PURE__ */ s(
|
|
1093
|
+
children: x ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(Qe, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1094
1094
|
}
|
|
1095
1095
|
),
|
|
1096
1096
|
/* @__PURE__ */ h(
|
|
@@ -1104,8 +1104,8 @@ const Ea = (e) => {
|
|
|
1104
1104
|
tabIndex: 0,
|
|
1105
1105
|
ref: f,
|
|
1106
1106
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1107
|
-
onMouseDown:
|
|
1108
|
-
onTouchStart:
|
|
1107
|
+
onMouseDown: W,
|
|
1108
|
+
onTouchStart: W,
|
|
1109
1109
|
onClick: (_) => _.stopPropagation(),
|
|
1110
1110
|
onMouseEnter: () => A(!0),
|
|
1111
1111
|
onMouseLeave: () => A(!1),
|
|
@@ -1140,7 +1140,7 @@ const Ea = (e) => {
|
|
|
1140
1140
|
]
|
|
1141
1141
|
}
|
|
1142
1142
|
);
|
|
1143
|
-
}, Gt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
1143
|
+
}, Gt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Aa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", hs = ({
|
|
1144
1144
|
mimeType: e,
|
|
1145
1145
|
sourceUrl: t,
|
|
1146
1146
|
thumbnailUrl: n,
|
|
@@ -1151,7 +1151,7 @@ const Ea = (e) => {
|
|
|
1151
1151
|
}) => {
|
|
1152
1152
|
const o = oe(e), [d, u] = F(!1), g = de(t), m = de(n);
|
|
1153
1153
|
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
|
|
1154
|
-
|
|
1154
|
+
Ma,
|
|
1155
1155
|
{
|
|
1156
1156
|
source: t,
|
|
1157
1157
|
mimeType: e,
|
|
@@ -1197,12 +1197,12 @@ const Ea = (e) => {
|
|
|
1197
1197
|
"div",
|
|
1198
1198
|
{
|
|
1199
1199
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1200
|
-
children:
|
|
1200
|
+
children: be(e, {
|
|
1201
1201
|
className: Gt(r),
|
|
1202
1202
|
weight: "regular"
|
|
1203
1203
|
})
|
|
1204
1204
|
}
|
|
1205
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1205
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Aa(r)}`, children: /* @__PURE__ */ s(
|
|
1206
1206
|
"img",
|
|
1207
1207
|
{
|
|
1208
1208
|
src: m ?? n,
|
|
@@ -1214,7 +1214,7 @@ const Ea = (e) => {
|
|
|
1214
1214
|
"div",
|
|
1215
1215
|
{
|
|
1216
1216
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1217
|
-
children:
|
|
1217
|
+
children: be(e, {
|
|
1218
1218
|
className: Gt(r),
|
|
1219
1219
|
weight: "regular"
|
|
1220
1220
|
})
|
|
@@ -1261,7 +1261,7 @@ const Ea = (e) => {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
),
|
|
1263
1263
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1264
|
-
|
|
1264
|
+
be(r, {
|
|
1265
1265
|
className: N(
|
|
1266
1266
|
"size-5 shrink-0",
|
|
1267
1267
|
f ? "text-white/55" : "text-black/55"
|
|
@@ -1292,19 +1292,19 @@ function gs(e) {
|
|
|
1292
1292
|
function at(e) {
|
|
1293
1293
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Ra(e) {
|
|
1296
1296
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function La(e) {
|
|
1299
1299
|
return e ? "text-white" : "text-black";
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function Da(e) {
|
|
1302
1302
|
return e ? "text-white/55" : "text-black/55";
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function Pa(e) {
|
|
1305
1305
|
return e ? "text-white/40" : "text-black/40";
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function za(e) {
|
|
1308
1308
|
return e ? "text-white/20" : "text-black/20";
|
|
1309
1309
|
}
|
|
1310
1310
|
const rt = ({ attachment: e, isMyMessage: t }) => {
|
|
@@ -1319,14 +1319,14 @@ const rt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1319
1319
|
) : /* @__PURE__ */ s(
|
|
1320
1320
|
"div",
|
|
1321
1321
|
{
|
|
1322
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1323
|
-
children: /* @__PURE__ */ s(
|
|
1322
|
+
className: `aspect-video w-full rounded-[20px] ${Ra(t)} flex items-center justify-center`,
|
|
1323
|
+
children: /* @__PURE__ */ s(Hn, { className: `size-12 ${za(t)}` })
|
|
1324
1324
|
}
|
|
1325
1325
|
) }),
|
|
1326
1326
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1327
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1328
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1329
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1327
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${La(t)}`, children: n }),
|
|
1328
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Da(t)}`, children: a }),
|
|
1329
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Pa(t)}`, children: d })
|
|
1330
1330
|
] })
|
|
1331
1331
|
] });
|
|
1332
1332
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
|
|
@@ -1338,7 +1338,7 @@ function it(e) {
|
|
|
1338
1338
|
var t;
|
|
1339
1339
|
return (t = e.attachments) == null ? void 0 : t.find(ps);
|
|
1340
1340
|
}
|
|
1341
|
-
async function
|
|
1341
|
+
async function Oa(e, t) {
|
|
1342
1342
|
let n;
|
|
1343
1343
|
try {
|
|
1344
1344
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1350,7 +1350,7 @@ async function Pa(e, t) {
|
|
|
1350
1350
|
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1351
1351
|
l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1352
1352
|
}
|
|
1353
|
-
const
|
|
1353
|
+
const Fa = ({
|
|
1354
1354
|
url: e,
|
|
1355
1355
|
filename: t
|
|
1356
1356
|
}) => {
|
|
@@ -1362,7 +1362,7 @@ const za = ({
|
|
|
1362
1362
|
onClick: (i) => {
|
|
1363
1363
|
i.stopPropagation();
|
|
1364
1364
|
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1365
|
-
a(!0),
|
|
1365
|
+
a(!0), Oa(e, t).then(() => {
|
|
1366
1366
|
l == null || l.close();
|
|
1367
1367
|
}).catch(() => {
|
|
1368
1368
|
l && (l.location.href = e);
|
|
@@ -1370,7 +1370,7 @@ const za = ({
|
|
|
1370
1370
|
},
|
|
1371
1371
|
disabled: n,
|
|
1372
1372
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1373
|
-
children: n ? /* @__PURE__ */ s(
|
|
1373
|
+
children: n ? /* @__PURE__ */ s(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
|
|
1374
1374
|
/* @__PURE__ */ s(Ne, { className: "size-4 text-white", weight: "bold" }),
|
|
1375
1375
|
"Download"
|
|
1376
1376
|
] })
|
|
@@ -1452,17 +1452,17 @@ const bs = ({
|
|
|
1452
1452
|
containedImage: i === "image" || i === "document"
|
|
1453
1453
|
}
|
|
1454
1454
|
),
|
|
1455
|
-
action: /* @__PURE__ */ s(
|
|
1455
|
+
action: /* @__PURE__ */ s(Fa, { url: e, filename: n })
|
|
1456
1456
|
}
|
|
1457
1457
|
);
|
|
1458
|
-
},
|
|
1458
|
+
}, Ba = ({
|
|
1459
1459
|
message: e,
|
|
1460
1460
|
isMyMessage: t = !1
|
|
1461
1461
|
}) => {
|
|
1462
1462
|
const n = it(e), a = ot(e);
|
|
1463
1463
|
return !n && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1464
1464
|
!t && e.user && /* @__PURE__ */ s(
|
|
1465
|
-
|
|
1465
|
+
ve,
|
|
1466
1466
|
{
|
|
1467
1467
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1468
1468
|
id: e.user.id,
|
|
@@ -1487,7 +1487,7 @@ const bs = ({
|
|
|
1487
1487
|
}
|
|
1488
1488
|
)
|
|
1489
1489
|
] });
|
|
1490
|
-
},
|
|
1490
|
+
}, $a = ({
|
|
1491
1491
|
message: e
|
|
1492
1492
|
}) => {
|
|
1493
1493
|
const t = it(e);
|
|
@@ -1495,7 +1495,7 @@ const bs = ({
|
|
|
1495
1495
|
return /* @__PURE__ */ s("div", { className: at(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(rt, { attachment: t, isMyMessage: !0 }) });
|
|
1496
1496
|
const n = ot(e);
|
|
1497
1497
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(bs, { ...n }) }) : null;
|
|
1498
|
-
},
|
|
1498
|
+
}, Ua = ({
|
|
1499
1499
|
message: e
|
|
1500
1500
|
}) => {
|
|
1501
1501
|
const t = it(e);
|
|
@@ -1503,19 +1503,19 @@ const bs = ({
|
|
|
1503
1503
|
return /* @__PURE__ */ s("div", { className: at(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(rt, { attachment: t, isMyMessage: !1 }) });
|
|
1504
1504
|
const n = ot(e);
|
|
1505
1505
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(vs, { ...n }) }) : null;
|
|
1506
|
-
},
|
|
1507
|
-
Creator:
|
|
1508
|
-
Visitor:
|
|
1509
|
-
}),
|
|
1506
|
+
}, bo = Object.assign(Ba, {
|
|
1507
|
+
Creator: $a,
|
|
1508
|
+
Visitor: Ua
|
|
1509
|
+
}), ja = {
|
|
1510
1510
|
dark: "bg-[#1e2330]",
|
|
1511
1511
|
light: "bg-[#f2f1ef]"
|
|
1512
|
-
},
|
|
1512
|
+
}, Va = {
|
|
1513
1513
|
dark: "text-white",
|
|
1514
1514
|
light: "text-[#000000]"
|
|
1515
|
-
},
|
|
1515
|
+
}, Ga = {
|
|
1516
1516
|
dark: "border-white/[0.08]",
|
|
1517
1517
|
light: "border-black/[0.08]"
|
|
1518
|
-
},
|
|
1518
|
+
}, Ha = (e) => e === "dark" ? "sender" : "receiver", Ya = {
|
|
1519
1519
|
sender: {
|
|
1520
1520
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1521
1521
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1537,7 +1537,7 @@ const bs = ({
|
|
|
1537
1537
|
children: i,
|
|
1538
1538
|
"data-testid": l
|
|
1539
1539
|
}) => {
|
|
1540
|
-
const o = t != null && t !== "", d =
|
|
1540
|
+
const o = t != null && t !== "", d = Ya[Ha(e)][a];
|
|
1541
1541
|
return /* @__PURE__ */ h(
|
|
1542
1542
|
"div",
|
|
1543
1543
|
{
|
|
@@ -1552,10 +1552,10 @@ const bs = ({
|
|
|
1552
1552
|
// as the surrounding `CustomMessage` text bubbles.
|
|
1553
1553
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
1554
1554
|
d,
|
|
1555
|
-
|
|
1556
|
-
|
|
1555
|
+
ja[e],
|
|
1556
|
+
Va[e],
|
|
1557
1557
|
n && "border",
|
|
1558
|
-
n &&
|
|
1558
|
+
n && Ga[e],
|
|
1559
1559
|
r
|
|
1560
1560
|
),
|
|
1561
1561
|
children: [
|
|
@@ -1598,16 +1598,16 @@ const bs = ({
|
|
|
1598
1598
|
),
|
|
1599
1599
|
children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
|
|
1600
1600
|
}
|
|
1601
|
-
), Ee = (e) => e === "received" ? "light" : "dark",
|
|
1601
|
+
), Ee = (e) => e === "received" ? "light" : "dark", Wa = ({
|
|
1602
1602
|
firstOfGroup: e,
|
|
1603
1603
|
endOfGroup: t,
|
|
1604
1604
|
groupedByUser: n
|
|
1605
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1605
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", qa = ({
|
|
1606
1606
|
src: e,
|
|
1607
1607
|
mimeType: t,
|
|
1608
1608
|
filename: n,
|
|
1609
1609
|
items: a
|
|
1610
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1610
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Xa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1611
1611
|
/* @__PURE__ */ s(
|
|
1612
1612
|
"audio",
|
|
1613
1613
|
{
|
|
@@ -1630,7 +1630,7 @@ const bs = ({
|
|
|
1630
1630
|
preload: o,
|
|
1631
1631
|
onDismiss: d
|
|
1632
1632
|
}) => {
|
|
1633
|
-
const u = Ee(e), g = e === "composer" && !!d, m =
|
|
1633
|
+
const u = Ee(e), g = e === "composer" && !!d, m = qa({ src: t, mimeType: n, filename: a, items: r });
|
|
1634
1634
|
if (m.length === 0)
|
|
1635
1635
|
return null;
|
|
1636
1636
|
const f = o ?? (m.length > 1 ? "none" : "metadata");
|
|
@@ -1642,7 +1642,7 @@ const bs = ({
|
|
|
1642
1642
|
groupPosition: l,
|
|
1643
1643
|
"data-testid": "audio-attachment",
|
|
1644
1644
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((c, v) => /* @__PURE__ */ s(
|
|
1645
|
-
|
|
1645
|
+
Xa,
|
|
1646
1646
|
{
|
|
1647
1647
|
item: c,
|
|
1648
1648
|
preload: f,
|
|
@@ -1656,15 +1656,15 @@ const bs = ({
|
|
|
1656
1656
|
)) })
|
|
1657
1657
|
}
|
|
1658
1658
|
);
|
|
1659
|
-
},
|
|
1660
|
-
Composer:
|
|
1661
|
-
Sent:
|
|
1662
|
-
Received:
|
|
1659
|
+
}, Ka = (e) => /* @__PURE__ */ s(lt, { ...e, state: "composer" }), Za = (e) => /* @__PURE__ */ s(lt, { ...e, state: "sent" }), Ja = (e) => /* @__PURE__ */ s(lt, { ...e, state: "received" }), Qa = {
|
|
1660
|
+
Composer: Ka,
|
|
1661
|
+
Sent: Za,
|
|
1662
|
+
Received: Ja
|
|
1663
1663
|
};
|
|
1664
|
-
function
|
|
1664
|
+
function er(e) {
|
|
1665
1665
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
1666
1666
|
}
|
|
1667
|
-
const
|
|
1667
|
+
const tr = {
|
|
1668
1668
|
pdf: "PDF",
|
|
1669
1669
|
doc: "DOC",
|
|
1670
1670
|
xls: "XLS",
|
|
@@ -1674,7 +1674,7 @@ const Qa = {
|
|
|
1674
1674
|
text: "TXT",
|
|
1675
1675
|
markdown: "MD"
|
|
1676
1676
|
};
|
|
1677
|
-
function
|
|
1677
|
+
function sr(e, t) {
|
|
1678
1678
|
if (t) {
|
|
1679
1679
|
const r = t.lastIndexOf(".");
|
|
1680
1680
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1684,7 +1684,7 @@ function er(e, t) {
|
|
|
1684
1684
|
}
|
|
1685
1685
|
if (!e) return;
|
|
1686
1686
|
if (oe(e) === "document") {
|
|
1687
|
-
const r = ms(e), i =
|
|
1687
|
+
const r = ms(e), i = tr[r];
|
|
1688
1688
|
if (i) return i;
|
|
1689
1689
|
if (e === "application/octet-stream") return;
|
|
1690
1690
|
}
|
|
@@ -1692,8 +1692,8 @@ function er(e, t) {
|
|
|
1692
1692
|
if (!(!a || a === "*"))
|
|
1693
1693
|
return a.toUpperCase();
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1696
|
-
const a =
|
|
1695
|
+
function nr(e, t, n) {
|
|
1696
|
+
const a = sr(e, t), r = typeof n == "number" && n > 0 ? er(n) : void 0;
|
|
1697
1697
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1698
1698
|
}
|
|
1699
1699
|
function ne(e) {
|
|
@@ -1704,13 +1704,13 @@ function ne(e) {
|
|
|
1704
1704
|
return "download";
|
|
1705
1705
|
}
|
|
1706
1706
|
}
|
|
1707
|
-
const
|
|
1707
|
+
const ar = {
|
|
1708
1708
|
dark: "text-white/55",
|
|
1709
1709
|
light: "text-black/65"
|
|
1710
|
-
},
|
|
1710
|
+
}, rr = {
|
|
1711
1711
|
dark: "bg-white/10",
|
|
1712
1712
|
light: "bg-black/5"
|
|
1713
|
-
},
|
|
1713
|
+
}, ir = {
|
|
1714
1714
|
dark: "text-white/85",
|
|
1715
1715
|
light: "text-black/85"
|
|
1716
1716
|
}, xs = ({
|
|
@@ -1723,16 +1723,16 @@ const sr = {
|
|
|
1723
1723
|
activateLabel: l,
|
|
1724
1724
|
trailingAction: o
|
|
1725
1725
|
}) => {
|
|
1726
|
-
const d = n ?? t ?? "File", u =
|
|
1726
|
+
const d = n ?? t ?? "File", u = nr(a, t, r), g = /* @__PURE__ */ s(
|
|
1727
1727
|
"div",
|
|
1728
1728
|
{
|
|
1729
1729
|
className: N(
|
|
1730
1730
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1731
|
-
|
|
1731
|
+
rr[e]
|
|
1732
1732
|
),
|
|
1733
1733
|
"aria-hidden": !0,
|
|
1734
|
-
children:
|
|
1735
|
-
className: N("size-6",
|
|
1734
|
+
children: be(a, {
|
|
1735
|
+
className: N("size-6", ir[e]),
|
|
1736
1736
|
weight: "regular"
|
|
1737
1737
|
})
|
|
1738
1738
|
}
|
|
@@ -1743,7 +1743,7 @@ const sr = {
|
|
|
1743
1743
|
{
|
|
1744
1744
|
className: N(
|
|
1745
1745
|
"truncate text-xs leading-4",
|
|
1746
|
-
|
|
1746
|
+
ar[e]
|
|
1747
1747
|
),
|
|
1748
1748
|
children: u
|
|
1749
1749
|
}
|
|
@@ -1763,7 +1763,7 @@ const sr = {
|
|
|
1763
1763
|
m
|
|
1764
1764
|
]
|
|
1765
1765
|
}
|
|
1766
|
-
) : /* @__PURE__ */ h(
|
|
1766
|
+
) : /* @__PURE__ */ h(K, { children: [
|
|
1767
1767
|
g,
|
|
1768
1768
|
m
|
|
1769
1769
|
] });
|
|
@@ -1786,14 +1786,14 @@ async function ws(e, t) {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
1789
|
-
const
|
|
1789
|
+
const or = ({
|
|
1790
1790
|
src: e,
|
|
1791
1791
|
filename: t,
|
|
1792
1792
|
fileSize: n,
|
|
1793
1793
|
mimeType: a,
|
|
1794
1794
|
title: r,
|
|
1795
1795
|
items: i
|
|
1796
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1796
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], lr = ({
|
|
1797
1797
|
variant: e,
|
|
1798
1798
|
item: t,
|
|
1799
1799
|
index: n,
|
|
@@ -1827,7 +1827,7 @@ const rr = ({
|
|
|
1827
1827
|
onClick: u,
|
|
1828
1828
|
onDismiss: g
|
|
1829
1829
|
}) => {
|
|
1830
|
-
const m = Ee(e), f = e === "composer" && !!g, c =
|
|
1830
|
+
const m = Ee(e), f = e === "composer" && !!g, c = or({
|
|
1831
1831
|
src: t,
|
|
1832
1832
|
filename: n,
|
|
1833
1833
|
fileSize: a,
|
|
@@ -1862,7 +1862,7 @@ const rr = ({
|
|
|
1862
1862
|
groupPosition: d,
|
|
1863
1863
|
"data-testid": "file-attachment",
|
|
1864
1864
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((p, b) => /* @__PURE__ */ s(
|
|
1865
|
-
|
|
1865
|
+
lr,
|
|
1866
1866
|
{
|
|
1867
1867
|
variant: m,
|
|
1868
1868
|
item: p,
|
|
@@ -1874,16 +1874,16 @@ const rr = ({
|
|
|
1874
1874
|
)) })
|
|
1875
1875
|
}
|
|
1876
1876
|
);
|
|
1877
|
-
},
|
|
1878
|
-
Composer:
|
|
1879
|
-
Sent:
|
|
1880
|
-
Received:
|
|
1877
|
+
}, cr = (e) => /* @__PURE__ */ s(ct, { ...e, state: "composer" }), dr = (e) => /* @__PURE__ */ s(ct, { ...e, state: "sent" }), ur = (e) => /* @__PURE__ */ s(ct, { ...e, state: "received" }), mr = {
|
|
1878
|
+
Composer: cr,
|
|
1879
|
+
Sent: dr,
|
|
1880
|
+
Received: ur
|
|
1881
1881
|
}, dt = ({
|
|
1882
1882
|
onPrev: e,
|
|
1883
1883
|
onNext: t,
|
|
1884
1884
|
prevLabel: n = "Previous",
|
|
1885
1885
|
nextLabel: a = "Next"
|
|
1886
|
-
}) => /* @__PURE__ */ h(
|
|
1886
|
+
}) => /* @__PURE__ */ h(K, { children: [
|
|
1887
1887
|
/* @__PURE__ */ s(
|
|
1888
1888
|
"button",
|
|
1889
1889
|
{
|
|
@@ -1891,7 +1891,7 @@ const rr = ({
|
|
|
1891
1891
|
onClick: e,
|
|
1892
1892
|
"aria-label": n,
|
|
1893
1893
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1894
|
-
children: /* @__PURE__ */ s(
|
|
1894
|
+
children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1895
1895
|
}
|
|
1896
1896
|
),
|
|
1897
1897
|
/* @__PURE__ */ s(
|
|
@@ -1913,7 +1913,7 @@ const rr = ({
|
|
|
1913
1913
|
tone: i = "dark",
|
|
1914
1914
|
onTriggered: l
|
|
1915
1915
|
}) => {
|
|
1916
|
-
const [o, d] = F(!1), u =
|
|
1916
|
+
const [o, d] = F(!1), u = q(
|
|
1917
1917
|
(c) => {
|
|
1918
1918
|
c.stopPropagation(), !o && (d(!0), ws(e, t).catch(() => {
|
|
1919
1919
|
}).finally(() => {
|
|
@@ -1940,7 +1940,7 @@ const rr = ({
|
|
|
1940
1940
|
}[i]
|
|
1941
1941
|
),
|
|
1942
1942
|
children: o ? /* @__PURE__ */ s(
|
|
1943
|
-
|
|
1943
|
+
pe,
|
|
1944
1944
|
{
|
|
1945
1945
|
className: "size-4 animate-spin",
|
|
1946
1946
|
weight: "bold",
|
|
@@ -1963,7 +1963,7 @@ const rr = ({
|
|
|
1963
1963
|
disabled: o,
|
|
1964
1964
|
"aria-label": a,
|
|
1965
1965
|
className: "mes-media-viewer__action",
|
|
1966
|
-
children: o ? /* @__PURE__ */ s(
|
|
1966
|
+
children: o ? /* @__PURE__ */ s(pe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ne, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1967
1967
|
}
|
|
1968
1968
|
) : /* @__PURE__ */ h(
|
|
1969
1969
|
"button",
|
|
@@ -1978,7 +1978,7 @@ const rr = ({
|
|
|
1978
1978
|
),
|
|
1979
1979
|
children: [
|
|
1980
1980
|
o ? /* @__PURE__ */ s(
|
|
1981
|
-
|
|
1981
|
+
pe,
|
|
1982
1982
|
{
|
|
1983
1983
|
className: "size-4 animate-spin",
|
|
1984
1984
|
weight: "bold",
|
|
@@ -2000,9 +2000,9 @@ const rr = ({
|
|
|
2000
2000
|
}, [n, t, e]), Y(() => {
|
|
2001
2001
|
i((d) => Ye(d, 0, Math.max(e - 1, 0)));
|
|
2002
2002
|
}, [e]);
|
|
2003
|
-
const l =
|
|
2003
|
+
const l = q(() => {
|
|
2004
2004
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
2005
|
-
}, [e]), o =
|
|
2005
|
+
}, [e]), o = q(() => {
|
|
2006
2006
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
2007
2007
|
}, [e]);
|
|
2008
2008
|
return Y(() => {
|
|
@@ -2160,7 +2160,7 @@ const rr = ({
|
|
|
2160
2160
|
]
|
|
2161
2161
|
}
|
|
2162
2162
|
) : null;
|
|
2163
|
-
},
|
|
2163
|
+
}, hr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", ys = ({
|
|
2164
2164
|
tiles: e,
|
|
2165
2165
|
onTileActivate: t,
|
|
2166
2166
|
maxVisible: n = 4,
|
|
@@ -2169,7 +2169,7 @@ const rr = ({
|
|
|
2169
2169
|
const r = e.length;
|
|
2170
2170
|
if (r === 0) return null;
|
|
2171
2171
|
const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, g) => {
|
|
2172
|
-
const m = N(
|
|
2172
|
+
const m = N(hr, "h-full w-full");
|
|
2173
2173
|
return t ? /* @__PURE__ */ h(
|
|
2174
2174
|
"button",
|
|
2175
2175
|
{
|
|
@@ -2231,14 +2231,14 @@ const rr = ({
|
|
|
2231
2231
|
}
|
|
2232
2232
|
);
|
|
2233
2233
|
}, Ie = (e) => {
|
|
2234
|
-
const [t, n] = F(!1), [a, r] = F(0), i =
|
|
2234
|
+
const [t, n] = F(!1), [a, r] = F(0), i = q(
|
|
2235
2235
|
(o) => {
|
|
2236
2236
|
(e == null ? void 0 : e(o)) !== !1 && (r(o), n(!0));
|
|
2237
2237
|
},
|
|
2238
2238
|
[e]
|
|
2239
|
-
), l =
|
|
2239
|
+
), l = q(() => n(!1), []);
|
|
2240
2240
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
2241
|
-
},
|
|
2241
|
+
}, fr = (e, t, n, a) => ({
|
|
2242
2242
|
ariaLabel: `Open image ${t + 1} of ${n}`,
|
|
2243
2243
|
content: /* @__PURE__ */ s(
|
|
2244
2244
|
"img",
|
|
@@ -2253,7 +2253,7 @@ const rr = ({
|
|
|
2253
2253
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2254
2254
|
}
|
|
2255
2255
|
)
|
|
2256
|
-
}),
|
|
2256
|
+
}), gr = ({
|
|
2257
2257
|
src: e,
|
|
2258
2258
|
alt: t,
|
|
2259
2259
|
items: n
|
|
@@ -2261,7 +2261,7 @@ const rr = ({
|
|
|
2261
2261
|
src: n.src,
|
|
2262
2262
|
alt: n.alt,
|
|
2263
2263
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2264
|
-
})),
|
|
2264
|
+
})), pr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2265
2265
|
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Ie(
|
|
2266
2266
|
r
|
|
2267
2267
|
);
|
|
@@ -2308,13 +2308,13 @@ const rr = ({
|
|
|
2308
2308
|
loading: o = "lazy",
|
|
2309
2309
|
onClick: d
|
|
2310
2310
|
}) => {
|
|
2311
|
-
const u =
|
|
2311
|
+
const u = gr({ src: t, alt: n, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: v } = Ie(
|
|
2312
2312
|
d
|
|
2313
2313
|
);
|
|
2314
2314
|
if (u.length === 0)
|
|
2315
2315
|
return null;
|
|
2316
2316
|
const x = u.map(
|
|
2317
|
-
(p, b) =>
|
|
2317
|
+
(p, b) => fr(p, b, u.length, o)
|
|
2318
2318
|
);
|
|
2319
2319
|
return /* @__PURE__ */ h(
|
|
2320
2320
|
Ce,
|
|
@@ -2337,11 +2337,11 @@ const rr = ({
|
|
|
2337
2337
|
]
|
|
2338
2338
|
}
|
|
2339
2339
|
);
|
|
2340
|
-
},
|
|
2341
|
-
Composer:
|
|
2342
|
-
Sent:
|
|
2343
|
-
Received:
|
|
2344
|
-
},
|
|
2340
|
+
}, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "received" }), wr = {
|
|
2341
|
+
Composer: br,
|
|
2342
|
+
Sent: vr,
|
|
2343
|
+
Received: xr
|
|
2344
|
+
}, _r = ({
|
|
2345
2345
|
open: e,
|
|
2346
2346
|
items: t,
|
|
2347
2347
|
initialIndex: n = 0,
|
|
@@ -2355,7 +2355,7 @@ const rr = ({
|
|
|
2355
2355
|
() => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "document"),
|
|
2356
2356
|
[o]
|
|
2357
2357
|
), u = se(
|
|
2358
|
-
() => o ?
|
|
2358
|
+
() => o ? Nr(o.src) : void 0,
|
|
2359
2359
|
[o]
|
|
2360
2360
|
);
|
|
2361
2361
|
return !o || !u ? null : /* @__PURE__ */ h(
|
|
@@ -2389,16 +2389,16 @@ const rr = ({
|
|
|
2389
2389
|
]
|
|
2390
2390
|
}
|
|
2391
2391
|
);
|
|
2392
|
-
},
|
|
2392
|
+
}, Nr = (e) => {
|
|
2393
2393
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2394
2394
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2395
|
-
},
|
|
2395
|
+
}, yr = ({
|
|
2396
2396
|
src: e,
|
|
2397
2397
|
filename: t,
|
|
2398
2398
|
fileSize: n,
|
|
2399
2399
|
title: a,
|
|
2400
2400
|
items: r
|
|
2401
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2401
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], kr = ({
|
|
2402
2402
|
variant: e,
|
|
2403
2403
|
item: t,
|
|
2404
2404
|
index: n,
|
|
@@ -2431,7 +2431,7 @@ const rr = ({
|
|
|
2431
2431
|
onClick: d,
|
|
2432
2432
|
onDismiss: u
|
|
2433
2433
|
}) => {
|
|
2434
|
-
const g = Ee(e), m =
|
|
2434
|
+
const g = Ee(e), m = yr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: x } = Ie(
|
|
2435
2435
|
d
|
|
2436
2436
|
), p = e === "composer" && !!u;
|
|
2437
2437
|
if (m.length === 0)
|
|
@@ -2460,7 +2460,7 @@ const rr = ({
|
|
|
2460
2460
|
}
|
|
2461
2461
|
);
|
|
2462
2462
|
return /* @__PURE__ */ s(
|
|
2463
|
-
|
|
2463
|
+
kr,
|
|
2464
2464
|
{
|
|
2465
2465
|
variant: g,
|
|
2466
2466
|
item: w,
|
|
@@ -2472,7 +2472,7 @@ const rr = ({
|
|
|
2472
2472
|
);
|
|
2473
2473
|
}) }),
|
|
2474
2474
|
/* @__PURE__ */ s(
|
|
2475
|
-
|
|
2475
|
+
_r,
|
|
2476
2476
|
{
|
|
2477
2477
|
open: f,
|
|
2478
2478
|
items: b,
|
|
@@ -2483,10 +2483,10 @@ const rr = ({
|
|
|
2483
2483
|
]
|
|
2484
2484
|
}
|
|
2485
2485
|
);
|
|
2486
|
-
},
|
|
2487
|
-
Composer:
|
|
2488
|
-
Sent:
|
|
2489
|
-
Received:
|
|
2486
|
+
}, Cr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ s(ht, { ...e, state: "sent" }), Er = (e) => /* @__PURE__ */ s(ht, { ...e, state: "received" }), Ir = {
|
|
2487
|
+
Composer: Cr,
|
|
2488
|
+
Sent: Sr,
|
|
2489
|
+
Received: Er
|
|
2490
2490
|
}, Ss = ({
|
|
2491
2491
|
open: e,
|
|
2492
2492
|
items: t,
|
|
@@ -2537,7 +2537,7 @@ const rr = ({
|
|
|
2537
2537
|
]
|
|
2538
2538
|
}
|
|
2539
2539
|
) : null;
|
|
2540
|
-
},
|
|
2540
|
+
}, Tr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(Qe, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Es = ({
|
|
2541
2541
|
item: e,
|
|
2542
2542
|
index: t
|
|
2543
2543
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2559,11 +2559,11 @@ const rr = ({
|
|
|
2559
2559
|
"aria-hidden": !0
|
|
2560
2560
|
}
|
|
2561
2561
|
) }),
|
|
2562
|
-
/* @__PURE__ */ s(
|
|
2563
|
-
] }),
|
|
2562
|
+
/* @__PURE__ */ s(Tr, {})
|
|
2563
|
+
] }), Mr = (e, t, n) => ({
|
|
2564
2564
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2565
2565
|
content: /* @__PURE__ */ s(Es, { item: e, index: t })
|
|
2566
|
-
}),
|
|
2566
|
+
}), Ar = ({
|
|
2567
2567
|
src: e,
|
|
2568
2568
|
poster: t,
|
|
2569
2569
|
mimeType: n,
|
|
@@ -2575,7 +2575,7 @@ const rr = ({
|
|
|
2575
2575
|
mimeType: n.mimeType,
|
|
2576
2576
|
preload: n.preload,
|
|
2577
2577
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2578
|
-
})),
|
|
2578
|
+
})), Rr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
|
|
2579
2579
|
const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Ie(
|
|
2580
2580
|
i
|
|
2581
2581
|
);
|
|
@@ -2616,13 +2616,13 @@ const rr = ({
|
|
|
2616
2616
|
preload: d,
|
|
2617
2617
|
onClick: u
|
|
2618
2618
|
}) => {
|
|
2619
|
-
const g =
|
|
2619
|
+
const g = Ar({ src: t, poster: n, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: x } = Ie(
|
|
2620
2620
|
u
|
|
2621
2621
|
);
|
|
2622
2622
|
if (g.length === 0)
|
|
2623
2623
|
return null;
|
|
2624
2624
|
const p = g.map(
|
|
2625
|
-
(b, w) =>
|
|
2625
|
+
(b, w) => Mr(b, w, g.length)
|
|
2626
2626
|
);
|
|
2627
2627
|
return /* @__PURE__ */ h(
|
|
2628
2628
|
Ce,
|
|
@@ -2652,31 +2652,31 @@ const rr = ({
|
|
|
2652
2652
|
]
|
|
2653
2653
|
}
|
|
2654
2654
|
);
|
|
2655
|
-
},
|
|
2656
|
-
Composer:
|
|
2657
|
-
Sent:
|
|
2658
|
-
Received:
|
|
2659
|
-
},
|
|
2660
|
-
Image:
|
|
2661
|
-
Video:
|
|
2662
|
-
Audio:
|
|
2663
|
-
Pdf:
|
|
2664
|
-
File:
|
|
2665
|
-
},
|
|
2655
|
+
}, Lr = (e) => /* @__PURE__ */ s(Rr, { ...e }), Dr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), zr = {
|
|
2656
|
+
Composer: Lr,
|
|
2657
|
+
Sent: Dr,
|
|
2658
|
+
Received: Pr
|
|
2659
|
+
}, we = {
|
|
2660
|
+
Image: wr,
|
|
2661
|
+
Video: zr,
|
|
2662
|
+
Audio: Qa,
|
|
2663
|
+
Pdf: Ir,
|
|
2664
|
+
File: mr
|
|
2665
|
+
}, Or = {
|
|
2666
2666
|
isUnlocking: () => !1
|
|
2667
|
-
},
|
|
2668
|
-
LockedAttachment:
|
|
2669
|
-
}, Ms = st({}),
|
|
2670
|
-
function
|
|
2671
|
-
return ye(Ms)[e] ??
|
|
2667
|
+
}, Fr = {
|
|
2668
|
+
LockedAttachment: Or
|
|
2669
|
+
}, Ms = st({}), vo = Ms.Provider;
|
|
2670
|
+
function Br(e) {
|
|
2671
|
+
return ye(Ms)[e] ?? Fr[e];
|
|
2672
2672
|
}
|
|
2673
|
-
const
|
|
2673
|
+
const $r = j.lazy(() => import("./Card-qS17qnN0.js")), Ur = j.lazy(() => import("./Card-C9Zg6RqU.js")), jr = () => /* @__PURE__ */ s(
|
|
2674
2674
|
"div",
|
|
2675
2675
|
{
|
|
2676
2676
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
|
|
2677
2677
|
"aria-hidden": !0
|
|
2678
2678
|
}
|
|
2679
|
-
), Re = (e) => /* @__PURE__ */ s(
|
|
2679
|
+
), Re = (e) => /* @__PURE__ */ s(Hs, { fallback: /* @__PURE__ */ s(jr, {}), children: e.contentType === "text" ? /* @__PURE__ */ s($r, { ...e }) : /* @__PURE__ */ s(Ur, { ...e }) }), Vr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2680
2680
|
"svg",
|
|
2681
2681
|
{
|
|
2682
2682
|
width: e,
|
|
@@ -2693,7 +2693,7 @@ const Fr = j.lazy(() => import("./Card-qS17qnN0.js")), Br = j.lazy(() => import(
|
|
|
2693
2693
|
}
|
|
2694
2694
|
)
|
|
2695
2695
|
}
|
|
2696
|
-
),
|
|
2696
|
+
), Gr = (e) => {
|
|
2697
2697
|
var t;
|
|
2698
2698
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
2699
2699
|
}, As = (e) => {
|
|
@@ -2705,16 +2705,16 @@ const Fr = j.lazy(() => import("./Card-qS17qnN0.js")), Br = j.lazy(() => import(
|
|
|
2705
2705
|
}, ft = (e) => {
|
|
2706
2706
|
var t;
|
|
2707
2707
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2708
|
-
},
|
|
2708
|
+
}, Hr = (e) => {
|
|
2709
2709
|
var t;
|
|
2710
2710
|
return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
2711
|
-
},
|
|
2711
|
+
}, Yr = (e) => {
|
|
2712
2712
|
var t;
|
|
2713
2713
|
return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
2714
|
-
}, Rs = (e) =>
|
|
2714
|
+
}, Rs = (e) => Gr(e) || As(e), Wr = (e) => {
|
|
2715
2715
|
var t;
|
|
2716
2716
|
return Rs(e) && !((t = e.text) != null && t.trim());
|
|
2717
|
-
},
|
|
2717
|
+
}, We = ({
|
|
2718
2718
|
message: e,
|
|
2719
2719
|
standalone: t = !1,
|
|
2720
2720
|
isMyMessage: n = !1,
|
|
@@ -2729,7 +2729,7 @@ const Fr = j.lazy(() => import("./Card-qS17qnN0.js")), Br = j.lazy(() => import(
|
|
|
2729
2729
|
if (!f) return null;
|
|
2730
2730
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = As(e) ? "message" : "tip", x = t ? `${f} ${v}` : `Delivered with ${f} ${v}`;
|
|
2731
2731
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
2732
|
-
/* @__PURE__ */ s(
|
|
2732
|
+
/* @__PURE__ */ s(Wn, { size: t ? 14 : 12 }),
|
|
2733
2733
|
/* @__PURE__ */ s("span", { children: x })
|
|
2734
2734
|
] });
|
|
2735
2735
|
}
|
|
@@ -2737,15 +2737,15 @@ const Fr = j.lazy(() => import("./Card-qS17qnN0.js")), Br = j.lazy(() => import(
|
|
|
2737
2737
|
"message-chatbot-indicator",
|
|
2738
2738
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2739
2739
|
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2740
|
-
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2741
|
-
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(
|
|
2740
|
+
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Vr, { size: l ? 12 : 15 }) });
|
|
2741
|
+
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(K, { children: [
|
|
2742
2742
|
u,
|
|
2743
2743
|
g
|
|
2744
|
-
] }) : /* @__PURE__ */ h(
|
|
2744
|
+
] }) : /* @__PURE__ */ h(K, { children: [
|
|
2745
2745
|
g,
|
|
2746
2746
|
u
|
|
2747
2747
|
] }) });
|
|
2748
|
-
},
|
|
2748
|
+
}, qr = ({
|
|
2749
2749
|
selected: e,
|
|
2750
2750
|
onVoteUp: t,
|
|
2751
2751
|
onVoteDown: n
|
|
@@ -2775,11 +2775,11 @@ const Fr = j.lazy(() => import("./Card-qS17qnN0.js")), Br = j.lazy(() => import(
|
|
|
2775
2775
|
"aria-label": "Bad response",
|
|
2776
2776
|
"aria-pressed": e === "down",
|
|
2777
2777
|
"data-tooltip": "Bad response",
|
|
2778
|
-
children: /* @__PURE__ */ s(
|
|
2778
|
+
children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2779
2779
|
}
|
|
2780
2780
|
)
|
|
2781
|
-
] }),
|
|
2782
|
-
const { message: e } =
|
|
2781
|
+
] }), Ls = () => {
|
|
2782
|
+
const { message: e } = me("SentMessageDeliveryStatus"), { messages: t } = ue("SentMessageDeliveryStatus"), n = (() => {
|
|
2783
2783
|
if (t)
|
|
2784
2784
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
2785
2785
|
const r = t[a];
|
|
@@ -2787,37 +2787,55 @@ const Fr = j.lazy(() => import("./Card-qS17qnN0.js")), Br = j.lazy(() => import(
|
|
|
2787
2787
|
return r.id;
|
|
2788
2788
|
}
|
|
2789
2789
|
})();
|
|
2790
|
-
return e.id
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
}
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
),
|
|
2790
|
+
return e.id === n;
|
|
2791
|
+
}, qe = () => Ls() ? /* @__PURE__ */ h(K, { children: [
|
|
2792
|
+
/* @__PURE__ */ s(Zn, { weight: "bold", "aria-hidden": "true" }),
|
|
2793
|
+
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2794
|
+
] }) : null, Xr = () => Ls() ? /* @__PURE__ */ h(K, { children: [
|
|
2795
|
+
/* @__PURE__ */ s(
|
|
2796
|
+
pe,
|
|
2797
|
+
{
|
|
2798
|
+
className: "sent-message-status__spinner animate-spin",
|
|
2799
|
+
weight: "bold",
|
|
2800
|
+
"aria-hidden": "true"
|
|
2801
|
+
}
|
|
2802
|
+
),
|
|
2803
|
+
/* @__PURE__ */ s("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
|
|
2804
|
+
] }) : null, Kr = () => /* @__PURE__ */ h("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
2805
|
+
/* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
|
|
2806
|
+
/* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
2807
|
+
] }), Zr = () => {
|
|
2808
|
+
const { isMyMessage: e, message: t, threadList: n } = me(
|
|
2809
|
+
"SentMessageDeliveryStatus"
|
|
2810
|
+
);
|
|
2811
|
+
return t.status === "failed" && e() && t.type !== "error" && !n ? /* @__PURE__ */ s(Kr, {}) : /* @__PURE__ */ s(
|
|
2812
|
+
Ks,
|
|
2813
|
+
{
|
|
2814
|
+
MessageSentStatus: qe,
|
|
2815
|
+
MessageDeliveredStatus: qe,
|
|
2816
|
+
MessageReadStatus: qe,
|
|
2817
|
+
MessageSendingStatus: Xr
|
|
2818
|
+
}
|
|
2819
|
+
);
|
|
2820
|
+
}, Jr = /^([a-z][a-z0-9+.-]*):/i, Qr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2803
2821
|
function gt(e) {
|
|
2804
2822
|
if (typeof e != "string") return;
|
|
2805
2823
|
const t = e.trim();
|
|
2806
2824
|
if (t === "") return;
|
|
2807
|
-
const n =
|
|
2825
|
+
const n = Jr.exec(t);
|
|
2808
2826
|
if (n) {
|
|
2809
2827
|
const a = n[1].toLowerCase();
|
|
2810
|
-
return
|
|
2828
|
+
return Qr.has(a) ? t : void 0;
|
|
2811
2829
|
}
|
|
2812
2830
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2813
2831
|
}
|
|
2814
|
-
const
|
|
2832
|
+
const ei = {
|
|
2815
2833
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2816
2834
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2817
|
-
},
|
|
2835
|
+
}, ti = ({ variant: e, cta: t }) => {
|
|
2818
2836
|
const n = N(
|
|
2819
2837
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2820
|
-
|
|
2838
|
+
ei[e]
|
|
2821
2839
|
), a = gt(t.href);
|
|
2822
2840
|
return a ? /* @__PURE__ */ s(
|
|
2823
2841
|
"a",
|
|
@@ -2844,10 +2862,10 @@ const Zr = {
|
|
|
2844
2862
|
children: t.label
|
|
2845
2863
|
}
|
|
2846
2864
|
);
|
|
2847
|
-
},
|
|
2865
|
+
}, si = {
|
|
2848
2866
|
dark: "text-white",
|
|
2849
2867
|
light: "text-black/90"
|
|
2850
|
-
},
|
|
2868
|
+
}, ni = "text-white/30", ai = {
|
|
2851
2869
|
dark: "text-white/55",
|
|
2852
2870
|
light: "text-black/55"
|
|
2853
2871
|
}, pt = ({
|
|
@@ -2864,10 +2882,10 @@ const Zr = {
|
|
|
2864
2882
|
if (!g && !m && !c && !v) return null;
|
|
2865
2883
|
const p = N(
|
|
2866
2884
|
"truncate text-base font-medium leading-6",
|
|
2867
|
-
d && !t ?
|
|
2885
|
+
d && !t ? ni : si[e]
|
|
2868
2886
|
), b = N(
|
|
2869
2887
|
"truncate text-xs leading-4",
|
|
2870
|
-
|
|
2888
|
+
ai[e]
|
|
2871
2889
|
);
|
|
2872
2890
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2873
2891
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2883,9 +2901,9 @@ const Zr = {
|
|
|
2883
2901
|
] }),
|
|
2884
2902
|
o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
|
|
2885
2903
|
] }),
|
|
2886
|
-
l && /* @__PURE__ */ s(
|
|
2904
|
+
l && /* @__PURE__ */ s(ti, { variant: e, cta: l })
|
|
2887
2905
|
] });
|
|
2888
|
-
},
|
|
2906
|
+
}, ri = N(
|
|
2889
2907
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2890
2908
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2891
2909
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2904,7 +2922,7 @@ const Zr = {
|
|
|
2904
2922
|
"data-testid": d
|
|
2905
2923
|
}) => {
|
|
2906
2924
|
const u = n != null || a != null, g = N(
|
|
2907
|
-
|
|
2925
|
+
ri,
|
|
2908
2926
|
o ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
|
|
2909
2927
|
// `focus-ring` is a design-system utility from the component-library
|
|
2910
2928
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2952,10 +2970,10 @@ const Zr = {
|
|
|
2952
2970
|
]
|
|
2953
2971
|
}
|
|
2954
2972
|
);
|
|
2955
|
-
},
|
|
2973
|
+
}, ii = {
|
|
2956
2974
|
dark: "bg-white/10",
|
|
2957
2975
|
light: "bg-black/5"
|
|
2958
|
-
},
|
|
2976
|
+
}, oi = {
|
|
2959
2977
|
dark: "size-16 text-white/25",
|
|
2960
2978
|
light: "size-16 text-black/25"
|
|
2961
2979
|
}, $e = (e, t) => !!t && !!e && oe(e) === "audio", bt = (e, t) => {
|
|
@@ -3013,10 +3031,10 @@ const Zr = {
|
|
|
3013
3031
|
{
|
|
3014
3032
|
className: N(
|
|
3015
3033
|
"flex h-full w-full items-center justify-center",
|
|
3016
|
-
|
|
3034
|
+
ii[e]
|
|
3017
3035
|
),
|
|
3018
|
-
children:
|
|
3019
|
-
className:
|
|
3036
|
+
children: be(r, {
|
|
3037
|
+
className: oi[e],
|
|
3020
3038
|
weight: "regular"
|
|
3021
3039
|
})
|
|
3022
3040
|
}
|
|
@@ -3026,7 +3044,7 @@ const Zr = {
|
|
|
3026
3044
|
]
|
|
3027
3045
|
}
|
|
3028
3046
|
);
|
|
3029
|
-
},
|
|
3047
|
+
}, li = ({
|
|
3030
3048
|
title: e,
|
|
3031
3049
|
placeholderTitle: t,
|
|
3032
3050
|
description: n,
|
|
@@ -3056,7 +3074,7 @@ const Zr = {
|
|
|
3056
3074
|
onClick: m,
|
|
3057
3075
|
"aria-label": "Edit attachment",
|
|
3058
3076
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3059
|
-
children: /* @__PURE__ */ s(
|
|
3077
|
+
children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
|
|
3060
3078
|
}
|
|
3061
3079
|
) : void 0;
|
|
3062
3080
|
return c ? /* @__PURE__ */ s(Pe, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3103,7 +3121,7 @@ const Zr = {
|
|
|
3103
3121
|
]
|
|
3104
3122
|
}
|
|
3105
3123
|
);
|
|
3106
|
-
},
|
|
3124
|
+
}, ci = ({
|
|
3107
3125
|
title: e,
|
|
3108
3126
|
description: t,
|
|
3109
3127
|
url: n,
|
|
@@ -3156,7 +3174,7 @@ const Zr = {
|
|
|
3156
3174
|
]
|
|
3157
3175
|
}
|
|
3158
3176
|
);
|
|
3159
|
-
},
|
|
3177
|
+
}, di = ({
|
|
3160
3178
|
title: e,
|
|
3161
3179
|
placeholderTitle: t,
|
|
3162
3180
|
description: n,
|
|
@@ -3204,9 +3222,9 @@ const Zr = {
|
|
|
3204
3222
|
}
|
|
3205
3223
|
);
|
|
3206
3224
|
}, Ht = {
|
|
3207
|
-
Composer:
|
|
3208
|
-
Sent:
|
|
3209
|
-
Received:
|
|
3225
|
+
Composer: li,
|
|
3226
|
+
Sent: di,
|
|
3227
|
+
Received: ci
|
|
3210
3228
|
};
|
|
3211
3229
|
function P(e) {
|
|
3212
3230
|
const t = e == null ? void 0 : e.trim();
|
|
@@ -3215,7 +3233,7 @@ function P(e) {
|
|
|
3215
3233
|
function Yt(e) {
|
|
3216
3234
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3217
3235
|
}
|
|
3218
|
-
function
|
|
3236
|
+
function ui(e, t) {
|
|
3219
3237
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3220
3238
|
return !1;
|
|
3221
3239
|
const n = Yt(e), a = Yt(t);
|
|
@@ -3226,7 +3244,7 @@ function li(e, t) {
|
|
|
3226
3244
|
const r = n.split(a).join("");
|
|
3227
3245
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3228
3246
|
}
|
|
3229
|
-
function
|
|
3247
|
+
function Wt(e) {
|
|
3230
3248
|
const t = P(e.og_scrape_url) ?? P(e.title_link), n = P(e.image_url) ?? P(e.thumb_url), a = P(e.asset_url), r = P(e.mime_type);
|
|
3231
3249
|
return {
|
|
3232
3250
|
title: P(e.title),
|
|
@@ -3240,15 +3258,15 @@ function qt(e) {
|
|
|
3240
3258
|
mimeType: r
|
|
3241
3259
|
};
|
|
3242
3260
|
}
|
|
3243
|
-
function
|
|
3261
|
+
function mi(e) {
|
|
3244
3262
|
var t;
|
|
3245
|
-
return
|
|
3263
|
+
return Ds(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3246
3264
|
}
|
|
3247
|
-
function
|
|
3265
|
+
function Ds(e) {
|
|
3248
3266
|
const t = P(e.og_scrape_url);
|
|
3249
3267
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3250
3268
|
}
|
|
3251
|
-
function
|
|
3269
|
+
function Ps(e) {
|
|
3252
3270
|
if (!(e != null && e.length)) return [];
|
|
3253
3271
|
const t = [], n = (r, i) => {
|
|
3254
3272
|
const l = t[t.length - 1];
|
|
@@ -3266,45 +3284,45 @@ function Ds(e) {
|
|
|
3266
3284
|
t.push({ type: "link", attachments: [r] });
|
|
3267
3285
|
};
|
|
3268
3286
|
for (const r of e) {
|
|
3269
|
-
if (
|
|
3287
|
+
if (Ds(r)) {
|
|
3270
3288
|
a(r);
|
|
3271
3289
|
continue;
|
|
3272
3290
|
}
|
|
3273
|
-
const i =
|
|
3291
|
+
const i = mi(r);
|
|
3274
3292
|
i && n(i, r);
|
|
3275
3293
|
}
|
|
3276
3294
|
return t;
|
|
3277
3295
|
}
|
|
3278
|
-
function
|
|
3296
|
+
function hi(e) {
|
|
3279
3297
|
return e.filter((t) => t.type === "media").length;
|
|
3280
3298
|
}
|
|
3281
|
-
function
|
|
3299
|
+
function fi(e, t, n) {
|
|
3282
3300
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3283
3301
|
}
|
|
3284
|
-
function
|
|
3302
|
+
function qt(e) {
|
|
3285
3303
|
return P(e.image_url) ?? P(e.asset_url) ?? "";
|
|
3286
3304
|
}
|
|
3287
|
-
function
|
|
3305
|
+
function gi(e) {
|
|
3288
3306
|
switch (e) {
|
|
3289
3307
|
case "image":
|
|
3290
|
-
return
|
|
3308
|
+
return we.Image;
|
|
3291
3309
|
case "video":
|
|
3292
|
-
return
|
|
3310
|
+
return we.Video;
|
|
3293
3311
|
case "audio":
|
|
3294
|
-
return
|
|
3312
|
+
return we.Audio;
|
|
3295
3313
|
case "pdf":
|
|
3296
|
-
return
|
|
3314
|
+
return we.Pdf;
|
|
3297
3315
|
default:
|
|
3298
|
-
return
|
|
3316
|
+
return we.File;
|
|
3299
3317
|
}
|
|
3300
3318
|
}
|
|
3301
|
-
function
|
|
3319
|
+
function pi(e, t) {
|
|
3302
3320
|
if (t.length > 1)
|
|
3303
3321
|
switch (e) {
|
|
3304
3322
|
case "image":
|
|
3305
3323
|
return {
|
|
3306
3324
|
items: t.map((a) => ({
|
|
3307
|
-
src:
|
|
3325
|
+
src: qt(a),
|
|
3308
3326
|
alt: P(a.title)
|
|
3309
3327
|
}))
|
|
3310
3328
|
};
|
|
@@ -3355,7 +3373,7 @@ function hi(e, t) {
|
|
|
3355
3373
|
switch (e) {
|
|
3356
3374
|
case "image":
|
|
3357
3375
|
return {
|
|
3358
|
-
src:
|
|
3376
|
+
src: qt(n),
|
|
3359
3377
|
alt: P(n.title)
|
|
3360
3378
|
};
|
|
3361
3379
|
case "video":
|
|
@@ -3385,42 +3403,42 @@ function hi(e, t) {
|
|
|
3385
3403
|
};
|
|
3386
3404
|
}
|
|
3387
3405
|
}
|
|
3388
|
-
function
|
|
3406
|
+
function bi({
|
|
3389
3407
|
groupPosition: e,
|
|
3390
3408
|
isMyMessage: t,
|
|
3391
3409
|
segment: n
|
|
3392
3410
|
}) {
|
|
3393
|
-
const a =
|
|
3394
|
-
...
|
|
3411
|
+
const a = gi(n.kind), r = {
|
|
3412
|
+
...pi(n.kind, n.attachments),
|
|
3395
3413
|
groupPosition: e
|
|
3396
3414
|
};
|
|
3397
3415
|
return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
|
|
3398
3416
|
}
|
|
3399
|
-
const
|
|
3417
|
+
const vi = ({
|
|
3400
3418
|
groupPosition: e,
|
|
3401
3419
|
isMyMessage: t,
|
|
3402
3420
|
message: n,
|
|
3403
3421
|
renderText: a
|
|
3404
3422
|
}) => {
|
|
3405
3423
|
var v;
|
|
3406
|
-
const r =
|
|
3424
|
+
const r = Ps(n.attachments);
|
|
3407
3425
|
if (r.length === 0) return null;
|
|
3408
|
-
const i =
|
|
3426
|
+
const i = hi(r), l = (v = n.text) == null ? void 0 : v.trim(), o = r.find((x) => x.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? Wt(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
|
|
3409
3427
|
let g = 0;
|
|
3410
3428
|
const m = [], f = (x, p) => {
|
|
3411
3429
|
const b = t ? Ht.Sent : Ht.Received;
|
|
3412
3430
|
m.push(
|
|
3413
|
-
/* @__PURE__ */ s(b, { ...
|
|
3431
|
+
/* @__PURE__ */ s(b, { ...Wt(x) }, p)
|
|
3414
3432
|
);
|
|
3415
3433
|
}, c = (x, p) => {
|
|
3416
|
-
const b =
|
|
3434
|
+
const b = fi(
|
|
3417
3435
|
g,
|
|
3418
3436
|
i,
|
|
3419
3437
|
e
|
|
3420
3438
|
);
|
|
3421
3439
|
g += 1, m.push(
|
|
3422
3440
|
/* @__PURE__ */ s(
|
|
3423
|
-
|
|
3441
|
+
bi,
|
|
3424
3442
|
{
|
|
3425
3443
|
groupPosition: b,
|
|
3426
3444
|
isMyMessage: t,
|
|
@@ -3467,7 +3485,7 @@ const gi = ({
|
|
|
3467
3485
|
/* @__PURE__ */ s(Ze, {})
|
|
3468
3486
|
] }) : null
|
|
3469
3487
|
] });
|
|
3470
|
-
},
|
|
3488
|
+
}, xi = (e) => {
|
|
3471
3489
|
var Ct, St, Et, It, Tt, Mt, At, Rt, Lt, Dt;
|
|
3472
3490
|
const {
|
|
3473
3491
|
additionalMessageInputProps: t,
|
|
@@ -3486,54 +3504,54 @@ const gi = ({
|
|
|
3486
3504
|
renderText: v,
|
|
3487
3505
|
threadList: x,
|
|
3488
3506
|
viewerLanguage: p
|
|
3489
|
-
} = e, { client: b } = ke("CustomMessage"), { channel: w } = ue("CustomMessage"), { isUnlocking: E, onUnlockClick: k, onFetchSource: R, onDownloadClick: A } =
|
|
3490
|
-
Attachment: S =
|
|
3491
|
-
EditMessageModal: I =
|
|
3507
|
+
} = e, { client: b } = ke("CustomMessage"), { channel: w } = ue("CustomMessage"), { isUnlocking: E, onUnlockClick: k, onFetchSource: R, onDownloadClick: A } = Br("LockedAttachment"), [z, B] = F(!1), O = Js(c.id), { selected: L, voteUp: C, voteDown: T } = wa(c), {
|
|
3508
|
+
Attachment: S = Qs,
|
|
3509
|
+
EditMessageModal: I = en,
|
|
3492
3510
|
MessageActions: y,
|
|
3493
|
-
MessageBlocked: D =
|
|
3494
|
-
MessageBouncePrompt: H =
|
|
3495
|
-
MessageDeleted:
|
|
3496
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
3497
|
-
MessageRepliesCountButton:
|
|
3498
|
-
ReminderNotification: V =
|
|
3499
|
-
StreamedMessageText: _ =
|
|
3511
|
+
MessageBlocked: D = tn,
|
|
3512
|
+
MessageBouncePrompt: H = sn,
|
|
3513
|
+
MessageDeleted: W = nn,
|
|
3514
|
+
MessageIsThreadReplyInChannelButtonIndicator: Z = an,
|
|
3515
|
+
MessageRepliesCountButton: J = rn,
|
|
3516
|
+
ReminderNotification: V = on,
|
|
3517
|
+
StreamedMessageText: _ = ln,
|
|
3500
3518
|
PinIndicator: M
|
|
3501
|
-
} = es("CustomMessage"), $ =
|
|
3519
|
+
} = es("CustomMessage"), $ = cn(c), te = dn(c), X = se(
|
|
3502
3520
|
() => m == null ? void 0 : m(c),
|
|
3503
3521
|
[m, c]
|
|
3504
3522
|
), U = se(() => {
|
|
3505
|
-
const ce = c.attachments ?? [],
|
|
3506
|
-
if (!De(c)) return
|
|
3507
|
-
const Pt =
|
|
3508
|
-
return Pt.length ===
|
|
3509
|
-
}, [c]),
|
|
3510
|
-
() =>
|
|
3523
|
+
const ce = c.attachments ?? [], ge = c.shared_location ? [c.shared_location, ...ce] : ce;
|
|
3524
|
+
if (!De(c)) return ge;
|
|
3525
|
+
const Pt = ge.filter((zt) => !("type" in zt) || !ps(zt));
|
|
3526
|
+
return Pt.length === ge.length ? ge : Pt;
|
|
3527
|
+
}, [c]), Q = se(
|
|
3528
|
+
() => Ps(U),
|
|
3511
3529
|
[U]
|
|
3512
3530
|
), ae = se(() => {
|
|
3513
3531
|
const ce = us({ message: c, viewerLanguage: p });
|
|
3514
3532
|
return ce === c.text ? c : { ...c, text: ce };
|
|
3515
|
-
}, [c, p]), Te =
|
|
3516
|
-
(ce,
|
|
3533
|
+
}, [c, p]), Te = Q.length > 0, Me = Q.reduce(
|
|
3534
|
+
(ce, ge) => ce + ge.attachments.length,
|
|
3517
3535
|
0
|
|
3518
|
-
) === ((U == null ? void 0 : U.length) ?? 0), re =
|
|
3536
|
+
) === ((U == null ? void 0 : U.length) ?? 0), re = Wa({
|
|
3519
3537
|
endOfGroup: r,
|
|
3520
3538
|
firstOfGroup: i,
|
|
3521
3539
|
groupedByUser: l
|
|
3522
3540
|
});
|
|
3523
|
-
if (
|
|
3541
|
+
if (un(c))
|
|
3524
3542
|
return null;
|
|
3525
3543
|
if (c.deleted_at || c.type === "deleted")
|
|
3526
|
-
return /* @__PURE__ */ s(
|
|
3527
|
-
if (
|
|
3544
|
+
return /* @__PURE__ */ s(W, { message: c });
|
|
3545
|
+
if (mn(c))
|
|
3528
3546
|
return /* @__PURE__ */ s(D, {});
|
|
3529
|
-
const le = !x && !!c.reply_count, ie = !x && c.show_in_channel && c.parent_id, xt = c.status === "failed" && ((Ct = c.error) == null ? void 0 : Ct.status) !== 403, wt =
|
|
3530
|
-
let
|
|
3531
|
-
xt ?
|
|
3532
|
-
const
|
|
3547
|
+
const le = !x && !!c.reply_count, ie = !x && c.show_in_channel && c.parent_id, xt = c.status === "failed" && ((Ct = c.error) == null ? void 0 : Ct.status) !== 403, wt = hn(c);
|
|
3548
|
+
let he;
|
|
3549
|
+
xt ? he = () => u(c) : wt && (he = () => B(!0));
|
|
3550
|
+
const ee = f(), Us = N(
|
|
3533
3551
|
"str-chat__message str-chat__message-simple",
|
|
3534
3552
|
`str-chat__message--${c.type}`,
|
|
3535
3553
|
`str-chat__message--${c.status}`,
|
|
3536
|
-
|
|
3554
|
+
ee ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
3537
3555
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
3538
3556
|
{
|
|
3539
3557
|
"str-chat__message--has-attachment": $,
|
|
@@ -3546,7 +3564,7 @@ const gi = ({
|
|
|
3546
3564
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3547
3565
|
"str-chat__virtual-message__wrapper--group": l
|
|
3548
3566
|
}
|
|
3549
|
-
), Ue = c.poll_id && b.polls.fromState(c.poll_id), _t =
|
|
3567
|
+
), Ue = c.poll_id && b.polls.fromState(c.poll_id), _t = Wr(c), fe = De(c), js = ft(c), je = !!(U != null && U.length && !c.quoted_message), Nt = fe && ee && je, Vs = Te && Me && !c.quoted_message && !Ue && !X && !fe, yt = {
|
|
3550
3568
|
contentType: "text",
|
|
3551
3569
|
amountText: (Et = c.metadata) == null ? void 0 : Et.amount_text,
|
|
3552
3570
|
paymentStatus: (It = c.metadata) == null ? void 0 : It.payment_status,
|
|
@@ -3561,7 +3579,7 @@ const gi = ({
|
|
|
3561
3579
|
paymentStatus: (Dt = c.metadata) == null ? void 0 : Dt.payment_status,
|
|
3562
3580
|
onFetchSource: R ? () => R(c, w) : void 0
|
|
3563
3581
|
};
|
|
3564
|
-
return /* @__PURE__ */ h(
|
|
3582
|
+
return /* @__PURE__ */ h(K, { children: [
|
|
3565
3583
|
a && /* @__PURE__ */ s(
|
|
3566
3584
|
I,
|
|
3567
3585
|
{
|
|
@@ -3569,7 +3587,7 @@ const gi = ({
|
|
|
3569
3587
|
}
|
|
3570
3588
|
),
|
|
3571
3589
|
z && /* @__PURE__ */ s(
|
|
3572
|
-
|
|
3590
|
+
fn,
|
|
3573
3591
|
{
|
|
3574
3592
|
MessageBouncePrompt: H,
|
|
3575
3593
|
onClose: () => B(!1),
|
|
@@ -3579,14 +3597,14 @@ const gi = ({
|
|
|
3579
3597
|
/* @__PURE__ */ h(
|
|
3580
3598
|
"div",
|
|
3581
3599
|
{
|
|
3582
|
-
className:
|
|
3600
|
+
className: Us,
|
|
3583
3601
|
"data-message-id": c.id,
|
|
3584
3602
|
"data-dd-privacy": "mask",
|
|
3585
3603
|
children: [
|
|
3586
3604
|
M && /* @__PURE__ */ s(M, {}),
|
|
3587
3605
|
!!O && /* @__PURE__ */ s(V, { reminder: O }),
|
|
3588
3606
|
c.user && /* @__PURE__ */ s(
|
|
3589
|
-
|
|
3607
|
+
ve,
|
|
3590
3608
|
{
|
|
3591
3609
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
3592
3610
|
id: c.user.id,
|
|
@@ -3594,7 +3612,7 @@ const gi = ({
|
|
|
3594
3612
|
name: c.user.name || c.user.id,
|
|
3595
3613
|
size: 24,
|
|
3596
3614
|
shape: "circle",
|
|
3597
|
-
dmAgentEnabled:
|
|
3615
|
+
dmAgentEnabled: fe
|
|
3598
3616
|
}
|
|
3599
3617
|
),
|
|
3600
3618
|
/* @__PURE__ */ s(
|
|
@@ -3604,19 +3622,19 @@ const gi = ({
|
|
|
3604
3622
|
"str-chat__simple-message--error-failed": xt || wt
|
|
3605
3623
|
}),
|
|
3606
3624
|
"data-testid": "message-inner",
|
|
3607
|
-
onClick:
|
|
3608
|
-
onKeyDown:
|
|
3609
|
-
role:
|
|
3610
|
-
tabIndex:
|
|
3625
|
+
onClick: he,
|
|
3626
|
+
onKeyDown: he,
|
|
3627
|
+
role: he ? "button" : void 0,
|
|
3628
|
+
tabIndex: he ? 0 : void 0,
|
|
3611
3629
|
style: {
|
|
3612
3630
|
// Force margins to 0 to prevent hover layout shift
|
|
3613
3631
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
3614
3632
|
marginInlineEnd: 0,
|
|
3615
3633
|
marginInlineStart: 0
|
|
3616
3634
|
},
|
|
3617
|
-
children: _t ? /* @__PURE__ */ s(
|
|
3618
|
-
|
|
3619
|
-
|
|
3635
|
+
children: _t ? /* @__PURE__ */ s(We, { message: c, standalone: !0 }) : Hr(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3636
|
+
ee && y && /* @__PURE__ */ s(y, {}),
|
|
3637
|
+
ee ? /* @__PURE__ */ s(
|
|
3620
3638
|
Re,
|
|
3621
3639
|
{
|
|
3622
3640
|
...yt,
|
|
@@ -3631,11 +3649,11 @@ const gi = ({
|
|
|
3631
3649
|
onUnlockClick: () => k == null ? void 0 : k(c, w)
|
|
3632
3650
|
}
|
|
3633
3651
|
),
|
|
3634
|
-
!
|
|
3635
|
-
] }) }) :
|
|
3652
|
+
!ee && y && /* @__PURE__ */ s(y, {})
|
|
3653
|
+
] }) }) : Yr(c) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3636
3654
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3637
|
-
|
|
3638
|
-
|
|
3655
|
+
ee && y && /* @__PURE__ */ s(y, {}),
|
|
3656
|
+
ee ? /* @__PURE__ */ s(
|
|
3639
3657
|
Re,
|
|
3640
3658
|
{
|
|
3641
3659
|
...kt,
|
|
@@ -3652,7 +3670,7 @@ const gi = ({
|
|
|
3652
3670
|
onDownloadClick: () => A ? A(c, w) : void 0
|
|
3653
3671
|
}
|
|
3654
3672
|
),
|
|
3655
|
-
!
|
|
3673
|
+
!ee && y && /* @__PURE__ */ s(y, {})
|
|
3656
3674
|
] }),
|
|
3657
3675
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
3658
3676
|
Le,
|
|
@@ -3661,11 +3679,11 @@ const gi = ({
|
|
|
3661
3679
|
renderText: v
|
|
3662
3680
|
}
|
|
3663
3681
|
) })
|
|
3664
|
-
] }) :
|
|
3665
|
-
|
|
3682
|
+
] }) : Vs ? /* @__PURE__ */ s(
|
|
3683
|
+
vi,
|
|
3666
3684
|
{
|
|
3667
3685
|
groupPosition: re,
|
|
3668
|
-
isMyMessage:
|
|
3686
|
+
isMyMessage: ee,
|
|
3669
3687
|
message: {
|
|
3670
3688
|
...ae,
|
|
3671
3689
|
attachments: U,
|
|
@@ -3677,15 +3695,15 @@ const gi = ({
|
|
|
3677
3695
|
renderText: v
|
|
3678
3696
|
}
|
|
3679
3697
|
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
3680
|
-
|
|
3681
|
-
|
|
3698
|
+
fe && !Nt && /* @__PURE__ */ s(
|
|
3699
|
+
We,
|
|
3682
3700
|
{
|
|
3683
3701
|
message: c,
|
|
3684
3702
|
hasAttachment: je,
|
|
3685
|
-
isMyMessage:
|
|
3703
|
+
isMyMessage: ee
|
|
3686
3704
|
}
|
|
3687
3705
|
),
|
|
3688
|
-
Ue && /* @__PURE__ */ s(
|
|
3706
|
+
Ue && /* @__PURE__ */ s(gn, { poll: Ue }),
|
|
3689
3707
|
U != null && U.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3690
3708
|
S,
|
|
3691
3709
|
{
|
|
@@ -3710,17 +3728,17 @@ const gi = ({
|
|
|
3710
3728
|
] }) })
|
|
3711
3729
|
}
|
|
3712
3730
|
),
|
|
3713
|
-
!
|
|
3714
|
-
(!
|
|
3715
|
-
|
|
3731
|
+
!js && !_t && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
3732
|
+
(!fe || Nt) && /* @__PURE__ */ s(
|
|
3733
|
+
We,
|
|
3716
3734
|
{
|
|
3717
3735
|
message: c,
|
|
3718
3736
|
hasAttachment: je,
|
|
3719
|
-
isMyMessage:
|
|
3737
|
+
isMyMessage: ee
|
|
3720
3738
|
}
|
|
3721
3739
|
),
|
|
3722
|
-
n &&
|
|
3723
|
-
|
|
3740
|
+
n && fe && /* @__PURE__ */ s(
|
|
3741
|
+
qr,
|
|
3724
3742
|
{
|
|
3725
3743
|
selected: L,
|
|
3726
3744
|
onVoteUp: C,
|
|
@@ -3728,29 +3746,29 @@ const gi = ({
|
|
|
3728
3746
|
}
|
|
3729
3747
|
)
|
|
3730
3748
|
] }),
|
|
3731
|
-
/* @__PURE__ */ s(
|
|
3749
|
+
/* @__PURE__ */ s(Zr, {}),
|
|
3732
3750
|
le && /* @__PURE__ */ s(
|
|
3733
|
-
|
|
3751
|
+
J,
|
|
3734
3752
|
{
|
|
3735
3753
|
onClick: d,
|
|
3736
3754
|
reply_count: c.reply_count
|
|
3737
3755
|
}
|
|
3738
3756
|
),
|
|
3739
|
-
ie && /* @__PURE__ */ s(
|
|
3757
|
+
ie && /* @__PURE__ */ s(Z, {})
|
|
3740
3758
|
]
|
|
3741
3759
|
},
|
|
3742
3760
|
c.id
|
|
3743
3761
|
)
|
|
3744
3762
|
] });
|
|
3745
|
-
},
|
|
3746
|
-
|
|
3747
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
3748
|
-
),
|
|
3749
|
-
const t =
|
|
3750
|
-
return /* @__PURE__ */ s(
|
|
3751
|
-
},
|
|
3763
|
+
}, wi = j.memo(
|
|
3764
|
+
xi,
|
|
3765
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Zs(e, t)
|
|
3766
|
+
), _i = (e) => {
|
|
3767
|
+
const t = me("CustomMessage");
|
|
3768
|
+
return /* @__PURE__ */ s(wi, { ...t, ...e });
|
|
3769
|
+
}, Ni = () => {
|
|
3752
3770
|
var n;
|
|
3753
|
-
const { handleDelete: e, message: t } =
|
|
3771
|
+
const { handleDelete: e, message: t } = me("CustomMessageActions");
|
|
3754
3772
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
3755
3773
|
rs,
|
|
3756
3774
|
{
|
|
@@ -3758,11 +3776,11 @@ const gi = ({
|
|
|
3758
3776
|
"aria-label": "Delete",
|
|
3759
3777
|
title: "Delete",
|
|
3760
3778
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3761
|
-
children: /* @__PURE__ */ s(
|
|
3779
|
+
children: /* @__PURE__ */ s(Qn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3762
3780
|
}
|
|
3763
3781
|
);
|
|
3764
|
-
},
|
|
3765
|
-
const { handleFlag: e } =
|
|
3782
|
+
}, yi = () => {
|
|
3783
|
+
const { handleFlag: e } = me("CustomMessageActions");
|
|
3766
3784
|
return /* @__PURE__ */ s(
|
|
3767
3785
|
rs,
|
|
3768
3786
|
{
|
|
@@ -3773,19 +3791,19 @@ const gi = ({
|
|
|
3773
3791
|
children: /* @__PURE__ */ s(ts, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3774
3792
|
}
|
|
3775
3793
|
);
|
|
3776
|
-
},
|
|
3794
|
+
}, ki = () => {
|
|
3777
3795
|
var t;
|
|
3778
|
-
const { message: e } =
|
|
3796
|
+
const { message: e } = me("CustomMessageActions");
|
|
3779
3797
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3780
|
-
|
|
3798
|
+
na,
|
|
3781
3799
|
{
|
|
3782
3800
|
messageActionSet: [
|
|
3783
|
-
{ Component:
|
|
3784
|
-
{ Component:
|
|
3801
|
+
{ Component: Ni, placement: "quick", type: "delete" },
|
|
3802
|
+
{ Component: yi, placement: "quick", type: "flag" }
|
|
3785
3803
|
]
|
|
3786
3804
|
}
|
|
3787
3805
|
);
|
|
3788
|
-
},
|
|
3806
|
+
}, Ci = ({
|
|
3789
3807
|
link: e,
|
|
3790
3808
|
onDismiss: t
|
|
3791
3809
|
}) => {
|
|
@@ -3825,14 +3843,14 @@ const gi = ({
|
|
|
3825
3843
|
]
|
|
3826
3844
|
}
|
|
3827
3845
|
);
|
|
3828
|
-
},
|
|
3846
|
+
}, Si = (e) => ({
|
|
3829
3847
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3830
3848
|
(t) => Ot.previewIsLoaded(t) || Ot.previewIsLoading(t)
|
|
3831
3849
|
)
|
|
3832
|
-
}),
|
|
3833
|
-
const { linkPreviewsManager: e } =
|
|
3850
|
+
}), Ei = () => {
|
|
3851
|
+
const { linkPreviewsManager: e } = pn(), { linkPreviews: t } = bn(
|
|
3834
3852
|
e.state,
|
|
3835
|
-
|
|
3853
|
+
Si
|
|
3836
3854
|
), n = (r) => {
|
|
3837
3855
|
e.dismissPreview(r);
|
|
3838
3856
|
};
|
|
@@ -3845,9 +3863,9 @@ const gi = ({
|
|
|
3845
3863
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3846
3864
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3847
3865
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3848
|
-
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
|
|
3866
|
+
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Ci, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3849
3867
|
) : null;
|
|
3850
|
-
}, Oe = j.createContext(!1),
|
|
3868
|
+
}, Oe = j.createContext(!1), Ii = 200, xo = () => ye(Oe), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3851
3869
|
"button",
|
|
3852
3870
|
{
|
|
3853
3871
|
...n,
|
|
@@ -3856,12 +3874,12 @@ const gi = ({
|
|
|
3856
3874
|
disabled: t,
|
|
3857
3875
|
onPointerDown: (a) => a.preventDefault(),
|
|
3858
3876
|
onClick: e,
|
|
3859
|
-
children: /* @__PURE__ */ s(
|
|
3877
|
+
children: /* @__PURE__ */ s(ea, { weight: "bold", className: "size-4" })
|
|
3860
3878
|
}
|
|
3861
3879
|
), Xt = () => {
|
|
3862
|
-
const e = ye(Oe), { handleSubmit: t } =
|
|
3863
|
-
SendButton: r =
|
|
3864
|
-
AttachmentPreviewList: i =
|
|
3880
|
+
const e = ye(Oe), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
|
|
3881
|
+
SendButton: r = Ti,
|
|
3882
|
+
AttachmentPreviewList: i = wn
|
|
3865
3883
|
} = es("CustomMessageInput");
|
|
3866
3884
|
return (
|
|
3867
3885
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
@@ -3892,13 +3910,13 @@ const gi = ({
|
|
|
3892
3910
|
"data-dd-privacy": "mask",
|
|
3893
3911
|
children: [
|
|
3894
3912
|
/* @__PURE__ */ h("div", { className: "messaging-composer-previews empty:hidden flex min-h-0 flex-col gap-2 px-2 pt-2", children: [
|
|
3895
|
-
/* @__PURE__ */ s(
|
|
3896
|
-
/* @__PURE__ */ s(
|
|
3913
|
+
/* @__PURE__ */ s(_n, {}),
|
|
3914
|
+
/* @__PURE__ */ s(Ei, {}),
|
|
3897
3915
|
/* @__PURE__ */ s(i, {})
|
|
3898
3916
|
] }),
|
|
3899
3917
|
/* @__PURE__ */ h("div", { className: "messaging-composer-row flex shrink-0 items-start", children: [
|
|
3900
3918
|
/* @__PURE__ */ s(
|
|
3901
|
-
|
|
3919
|
+
Nn,
|
|
3902
3920
|
{
|
|
3903
3921
|
"aria-disabled": e || void 0,
|
|
3904
3922
|
containerClassName: "min-w-0 flex-1 leading-[0]",
|
|
@@ -3948,7 +3966,7 @@ const gi = ({
|
|
|
3948
3966
|
c = p;
|
|
3949
3967
|
const w = Array.from(
|
|
3950
3968
|
f.querySelectorAll(".str-chat__list")
|
|
3951
|
-
).find((k) => k.scrollHeight > k.clientHeight) ?? null, E = w ? w.scrollHeight - w.scrollTop - w.clientHeight <
|
|
3969
|
+
).find((k) => k.scrollHeight > k.clientHeight) ?? null, E = w ? w.scrollHeight - w.scrollTop - w.clientHeight < Ii : !1;
|
|
3952
3970
|
f.style.setProperty(
|
|
3953
3971
|
"--messaging-composer-height",
|
|
3954
3972
|
`${p}px`
|
|
@@ -3981,7 +3999,7 @@ const gi = ({
|
|
|
3981
3999
|
] })
|
|
3982
4000
|
]
|
|
3983
4001
|
}
|
|
3984
|
-
) : /* @__PURE__ */ h(
|
|
4002
|
+
) : /* @__PURE__ */ h(K, { children: [
|
|
3985
4003
|
t == null ? void 0 : t(),
|
|
3986
4004
|
/* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
3987
4005
|
n == null ? void 0 : n()
|
|
@@ -4035,22 +4053,22 @@ const gi = ({
|
|
|
4035
4053
|
),
|
|
4036
4054
|
n == null ? void 0 : n()
|
|
4037
4055
|
] });
|
|
4038
|
-
},
|
|
4056
|
+
}, Mi = [
|
|
4039
4057
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
4040
4058
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
4041
|
-
],
|
|
4059
|
+
], Ai = {
|
|
4042
4060
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4043
4061
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4044
|
-
},
|
|
4062
|
+
}, Ri = [
|
|
4045
4063
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
4046
|
-
],
|
|
4064
|
+
], Li = ["SYSTEM_AGE_SAFETY_BLOCKED"], Di = {
|
|
4047
4065
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4048
|
-
}, Xe = "age safety guidelines.",
|
|
4066
|
+
}, Xe = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", Zt = (e) => Mi.includes(e), zi = (e) => Ri.includes(e), Oi = (e) => Li.includes(
|
|
4049
4067
|
e
|
|
4050
|
-
),
|
|
4068
|
+
), Fi = (e) => {
|
|
4051
4069
|
var t;
|
|
4052
|
-
return
|
|
4053
|
-
},
|
|
4070
|
+
return Oi((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4071
|
+
}, Bi = (e) => {
|
|
4054
4072
|
var a;
|
|
4055
4073
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4056
4074
|
if (Zt(t))
|
|
@@ -4058,7 +4076,7 @@ const gi = ({
|
|
|
4058
4076
|
kind: "dm-agent",
|
|
4059
4077
|
type: t
|
|
4060
4078
|
};
|
|
4061
|
-
if (
|
|
4079
|
+
if (zi(t))
|
|
4062
4080
|
return {
|
|
4063
4081
|
kind: "age-safety",
|
|
4064
4082
|
type: t
|
|
@@ -4069,17 +4087,17 @@ const gi = ({
|
|
|
4069
4087
|
kind: "dm-agent",
|
|
4070
4088
|
type: n
|
|
4071
4089
|
};
|
|
4072
|
-
},
|
|
4090
|
+
}, $i = (e) => {
|
|
4073
4091
|
const t = e.indexOf(Xe);
|
|
4074
4092
|
if (t === -1)
|
|
4075
4093
|
return e;
|
|
4076
4094
|
const n = t + Xe.length;
|
|
4077
|
-
return /* @__PURE__ */ h(
|
|
4095
|
+
return /* @__PURE__ */ h(K, { children: [
|
|
4078
4096
|
e.slice(0, t),
|
|
4079
4097
|
/* @__PURE__ */ s(
|
|
4080
4098
|
"a",
|
|
4081
4099
|
{
|
|
4082
|
-
href:
|
|
4100
|
+
href: Pi,
|
|
4083
4101
|
target: "_blank",
|
|
4084
4102
|
rel: "noopener noreferrer",
|
|
4085
4103
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -4088,13 +4106,13 @@ const gi = ({
|
|
|
4088
4106
|
),
|
|
4089
4107
|
e.slice(n)
|
|
4090
4108
|
] });
|
|
4091
|
-
},
|
|
4109
|
+
}, Ui = (e) => {
|
|
4092
4110
|
var a, r;
|
|
4093
|
-
const t = !
|
|
4111
|
+
const t = !Fi(e.message), n = Bi(
|
|
4094
4112
|
e.message
|
|
4095
4113
|
);
|
|
4096
4114
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
4097
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4115
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
|
|
4098
4116
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4099
4117
|
/* @__PURE__ */ h(
|
|
4100
4118
|
"div",
|
|
@@ -4104,7 +4122,7 @@ const gi = ({
|
|
|
4104
4122
|
"data-dm-agent-system-type": n.type,
|
|
4105
4123
|
children: [
|
|
4106
4124
|
/* @__PURE__ */ s(
|
|
4107
|
-
|
|
4125
|
+
ta,
|
|
4108
4126
|
{
|
|
4109
4127
|
size: 16,
|
|
4110
4128
|
weight: "regular",
|
|
@@ -4120,7 +4138,7 @@ const gi = ({
|
|
|
4120
4138
|
] });
|
|
4121
4139
|
}
|
|
4122
4140
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
4123
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4141
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Di[n.type];
|
|
4124
4142
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4125
4143
|
/* @__PURE__ */ h(
|
|
4126
4144
|
"div",
|
|
@@ -4130,7 +4148,7 @@ const gi = ({
|
|
|
4130
4148
|
"data-age-safety-system-type": n.type,
|
|
4131
4149
|
children: [
|
|
4132
4150
|
/* @__PURE__ */ s(
|
|
4133
|
-
|
|
4151
|
+
sa,
|
|
4134
4152
|
{
|
|
4135
4153
|
size: 24,
|
|
4136
4154
|
weight: "duotone",
|
|
@@ -4139,7 +4157,7 @@ const gi = ({
|
|
|
4139
4157
|
"data-testid": "age-safety-system-message-icon"
|
|
4140
4158
|
}
|
|
4141
4159
|
),
|
|
4142
|
-
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
4160
|
+
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: $i(i) }) })
|
|
4143
4161
|
]
|
|
4144
4162
|
}
|
|
4145
4163
|
),
|
|
@@ -4154,7 +4172,7 @@ const gi = ({
|
|
|
4154
4172
|
] }),
|
|
4155
4173
|
!t && /* @__PURE__ */ s(Ve, { message: e.message })
|
|
4156
4174
|
] });
|
|
4157
|
-
},
|
|
4175
|
+
}, zs = st(!1), Ke = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
4158
4176
|
"animateTransform",
|
|
4159
4177
|
{
|
|
4160
4178
|
attributeName: "transform",
|
|
@@ -4164,15 +4182,15 @@ const gi = ({
|
|
|
4164
4182
|
begin: `${120 * t}ms`,
|
|
4165
4183
|
repeatCount: "indefinite"
|
|
4166
4184
|
}
|
|
4167
|
-
) }),
|
|
4185
|
+
) }), ji = /* @__PURE__ */ new Set([
|
|
4168
4186
|
Ge.Thinking,
|
|
4169
4187
|
Ge.Generating,
|
|
4170
4188
|
Ge.ExternalSources
|
|
4171
|
-
]),
|
|
4189
|
+
]), Vi = ({ threadList: e }) => {
|
|
4172
4190
|
var v, x;
|
|
4173
|
-
const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = ke(), { typing: i = {} } =
|
|
4174
|
-
if (!e && o &&
|
|
4175
|
-
const p =
|
|
4191
|
+
const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = ke(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = ye(zs);
|
|
4192
|
+
if (!e && o && ji.has(l)) {
|
|
4193
|
+
const p = Gi(t, (v = r.user) == null ? void 0 : v.id);
|
|
4176
4194
|
return /* @__PURE__ */ s(
|
|
4177
4195
|
Jt,
|
|
4178
4196
|
{
|
|
@@ -4223,7 +4241,7 @@ const gi = ({
|
|
|
4223
4241
|
},
|
|
4224
4242
|
children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
|
|
4225
4243
|
/* @__PURE__ */ s(
|
|
4226
|
-
|
|
4244
|
+
ve,
|
|
4227
4245
|
{
|
|
4228
4246
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
4229
4247
|
id: e,
|
|
@@ -4252,7 +4270,7 @@ const gi = ({
|
|
|
4252
4270
|
] })
|
|
4253
4271
|
}
|
|
4254
4272
|
);
|
|
4255
|
-
function
|
|
4273
|
+
function Gi(e, t) {
|
|
4256
4274
|
var a;
|
|
4257
4275
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4258
4276
|
for (const r of Object.values(n)) {
|
|
@@ -4261,7 +4279,7 @@ function Ui(e, t) {
|
|
|
4261
4279
|
return i;
|
|
4262
4280
|
}
|
|
4263
4281
|
}
|
|
4264
|
-
const
|
|
4282
|
+
const Hi = () => null, Yi = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
4265
4283
|
"div",
|
|
4266
4284
|
{
|
|
4267
4285
|
className: N("flex items-center justify-center h-full", e),
|
|
@@ -4305,11 +4323,11 @@ const ji = () => null, Vi = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
4305
4323
|
]
|
|
4306
4324
|
}
|
|
4307
4325
|
), Fe = j.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
4308
|
-
/* @__PURE__ */ s(
|
|
4326
|
+
/* @__PURE__ */ s(Yi, { className: "w-6 h-6" }),
|
|
4309
4327
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4310
4328
|
] }) }));
|
|
4311
4329
|
Fe.displayName = "LoadingState";
|
|
4312
|
-
const
|
|
4330
|
+
const Wi = ({
|
|
4313
4331
|
onBack: e,
|
|
4314
4332
|
showBackButton: t,
|
|
4315
4333
|
renderMessageInputActions: n,
|
|
@@ -4339,7 +4357,7 @@ const Gi = ({
|
|
|
4339
4357
|
const { channel: O } = ue(), L = O.state.messages.some(
|
|
4340
4358
|
(I) => I.type !== "deleted"
|
|
4341
4359
|
), C = b ? /* @__PURE__ */ s(j.Fragment, { children: b() }, "lt-channel-banner") : null, T = /* @__PURE__ */ s(
|
|
4342
|
-
|
|
4360
|
+
ba,
|
|
4343
4361
|
{
|
|
4344
4362
|
className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
|
|
4345
4363
|
onBack: e,
|
|
@@ -4358,10 +4376,10 @@ const Gi = ({
|
|
|
4358
4376
|
renderChannelActions: E,
|
|
4359
4377
|
onParticipantNameClick: z
|
|
4360
4378
|
}
|
|
4361
|
-
), S =
|
|
4379
|
+
), S = q(
|
|
4362
4380
|
(I) => {
|
|
4363
|
-
const { message: y } =
|
|
4364
|
-
|
|
4381
|
+
const { message: y } = me("ChannelView"), D = /* @__PURE__ */ s(
|
|
4382
|
+
_i,
|
|
4365
4383
|
{
|
|
4366
4384
|
...I,
|
|
4367
4385
|
chatbotVotingEnabled: p,
|
|
@@ -4372,16 +4390,16 @@ const Gi = ({
|
|
|
4372
4390
|
},
|
|
4373
4391
|
[p, k, R]
|
|
4374
4392
|
);
|
|
4375
|
-
return /* @__PURE__ */ s(
|
|
4376
|
-
|
|
4393
|
+
return /* @__PURE__ */ s(K, { children: /* @__PURE__ */ s(
|
|
4394
|
+
Sn,
|
|
4377
4395
|
{
|
|
4378
4396
|
overrides: {
|
|
4379
4397
|
Message: S,
|
|
4380
|
-
MessageActions:
|
|
4398
|
+
MessageActions: ki,
|
|
4381
4399
|
UnreadMessagesNotification: () => null,
|
|
4382
4400
|
UnreadMessagesSeparator: () => null
|
|
4383
4401
|
},
|
|
4384
|
-
children: /* @__PURE__ */ s(
|
|
4402
|
+
children: /* @__PURE__ */ s(En, { children: B ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4385
4403
|
/* @__PURE__ */ h(
|
|
4386
4404
|
"div",
|
|
4387
4405
|
{
|
|
@@ -4422,7 +4440,7 @@ const Gi = ({
|
|
|
4422
4440
|
},
|
|
4423
4441
|
"lt-channel-message-input"
|
|
4424
4442
|
)
|
|
4425
|
-
] }) : /* @__PURE__ */ h(
|
|
4443
|
+
] }) : /* @__PURE__ */ h(K, { children: [
|
|
4426
4444
|
/* @__PURE__ */ h(
|
|
4427
4445
|
"div",
|
|
4428
4446
|
{
|
|
@@ -4464,7 +4482,7 @@ const Gi = ({
|
|
|
4464
4482
|
] }) })
|
|
4465
4483
|
}
|
|
4466
4484
|
) });
|
|
4467
|
-
},
|
|
4485
|
+
}, Os = j.memo(
|
|
4468
4486
|
({
|
|
4469
4487
|
channel: e,
|
|
4470
4488
|
onBack: t,
|
|
@@ -4475,7 +4493,7 @@ const Gi = ({
|
|
|
4475
4493
|
onLeaveConversation: l,
|
|
4476
4494
|
onBlockParticipant: o,
|
|
4477
4495
|
className: d,
|
|
4478
|
-
CustomChannelEmptyState: u =
|
|
4496
|
+
CustomChannelEmptyState: u = Hi,
|
|
4479
4497
|
showDeleteConversation: g = !0,
|
|
4480
4498
|
onDeleteConversationClick: m,
|
|
4481
4499
|
onBlockParticipantClick: f,
|
|
@@ -4501,10 +4519,10 @@ const Gi = ({
|
|
|
4501
4519
|
onParticipantNameClick: D,
|
|
4502
4520
|
composerInput: H
|
|
4503
4521
|
}) => {
|
|
4504
|
-
const
|
|
4505
|
-
async (
|
|
4506
|
-
var
|
|
4507
|
-
const M = ((
|
|
4522
|
+
const W = q(
|
|
4523
|
+
async (J, V, _) => {
|
|
4524
|
+
var Q;
|
|
4525
|
+
const M = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, $ = w && !M, te = {
|
|
4508
4526
|
...V,
|
|
4509
4527
|
...$ && { silent: !0 },
|
|
4510
4528
|
...E && {
|
|
@@ -4520,40 +4538,40 @@ const Gi = ({
|
|
|
4520
4538
|
return k == null || k(U), U;
|
|
4521
4539
|
},
|
|
4522
4540
|
[e, w, E, k]
|
|
4523
|
-
),
|
|
4541
|
+
), Z = G(null);
|
|
4524
4542
|
return Y(() => {
|
|
4525
4543
|
if (!C) return;
|
|
4526
|
-
const
|
|
4527
|
-
if (!
|
|
4544
|
+
const J = Z.current;
|
|
4545
|
+
if (!J) return;
|
|
4528
4546
|
const V = (_) => {
|
|
4529
4547
|
const M = _.target, $ = M == null ? void 0 : M.closest("a[href]"), te = $ == null ? void 0 : $.getAttribute("href");
|
|
4530
4548
|
if (!te) return;
|
|
4531
|
-
const X = $ == null ? void 0 : $.closest("[data-message-id]"), U = X == null ? void 0 : X.getAttribute("data-message-id"),
|
|
4532
|
-
C(te,
|
|
4549
|
+
const X = $ == null ? void 0 : $.closest("[data-message-id]"), U = X == null ? void 0 : X.getAttribute("data-message-id"), Q = U ? e.state.messages.find((ae) => ae.id === U) : void 0;
|
|
4550
|
+
C(te, Q);
|
|
4533
4551
|
};
|
|
4534
|
-
return
|
|
4552
|
+
return J.addEventListener("click", V), () => J.removeEventListener("click", V);
|
|
4535
4553
|
}, [C, e]), /* @__PURE__ */ s(
|
|
4536
4554
|
"div",
|
|
4537
4555
|
{
|
|
4538
|
-
ref:
|
|
4556
|
+
ref: Z,
|
|
4539
4557
|
className: N(
|
|
4540
4558
|
"messaging-channel-view h-full flex flex-col",
|
|
4541
4559
|
d
|
|
4542
4560
|
),
|
|
4543
|
-
children: /* @__PURE__ */ s(
|
|
4544
|
-
|
|
4561
|
+
children: /* @__PURE__ */ s(zs.Provider, { value: w ?? !1, children: /* @__PURE__ */ s(
|
|
4562
|
+
Cn,
|
|
4545
4563
|
{
|
|
4546
4564
|
channel: e,
|
|
4547
|
-
MessageSystem:
|
|
4565
|
+
MessageSystem: Ui,
|
|
4548
4566
|
EmptyStateIndicator: u,
|
|
4549
4567
|
LoadingIndicator: Fe,
|
|
4550
|
-
DateSeparator:
|
|
4551
|
-
TypingIndicator:
|
|
4552
|
-
doSendMessageRequest:
|
|
4568
|
+
DateSeparator: va,
|
|
4569
|
+
TypingIndicator: Vi,
|
|
4570
|
+
doSendMessageRequest: W,
|
|
4553
4571
|
...T ? { SendButton: T } : {},
|
|
4554
4572
|
...S ? { AttachmentPreviewList: S } : {},
|
|
4555
4573
|
children: /* @__PURE__ */ s(
|
|
4556
|
-
|
|
4574
|
+
Wi,
|
|
4557
4575
|
{
|
|
4558
4576
|
onBack: t,
|
|
4559
4577
|
showBackButton: n,
|
|
@@ -4589,8 +4607,8 @@ const Gi = ({
|
|
|
4589
4607
|
);
|
|
4590
4608
|
}
|
|
4591
4609
|
);
|
|
4592
|
-
|
|
4593
|
-
const
|
|
4610
|
+
Os.displayName = "ChannelView";
|
|
4611
|
+
const _e = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
4594
4612
|
/* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
4595
4613
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
4596
4614
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -4604,8 +4622,8 @@ const we = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4604
4622
|
}
|
|
4605
4623
|
)
|
|
4606
4624
|
] }) }));
|
|
4607
|
-
|
|
4608
|
-
const
|
|
4625
|
+
_e.displayName = "ErrorState";
|
|
4626
|
+
const wo = ({
|
|
4609
4627
|
capabilities: e = {},
|
|
4610
4628
|
renderMessageInputActions: t,
|
|
4611
4629
|
renderConversationFooter: n,
|
|
@@ -4637,8 +4655,8 @@ const bo = ({
|
|
|
4637
4655
|
refreshConnection: L,
|
|
4638
4656
|
service: C,
|
|
4639
4657
|
debug: T
|
|
4640
|
-
} =
|
|
4641
|
-
|
|
4658
|
+
} = aa(), [S, I] = F(null), [y, D] = F(null), [H, W] = F(!1), { showDeleteConversation: Z = !0 } = e, J = G(l);
|
|
4659
|
+
J.current = l;
|
|
4642
4660
|
const V = G(a);
|
|
4643
4661
|
V.current = a;
|
|
4644
4662
|
const _ = G(null), M = G(null);
|
|
@@ -4651,7 +4669,7 @@ const bo = ({
|
|
|
4651
4669
|
const U = `${X}::${i}`;
|
|
4652
4670
|
if (_.current === U) return;
|
|
4653
4671
|
_.current = U;
|
|
4654
|
-
const
|
|
4672
|
+
const Q = () => {
|
|
4655
4673
|
_.current === U && (_.current = null);
|
|
4656
4674
|
};
|
|
4657
4675
|
(async () => {
|
|
@@ -4676,9 +4694,9 @@ const bo = ({
|
|
|
4676
4694
|
);
|
|
4677
4695
|
return;
|
|
4678
4696
|
}
|
|
4679
|
-
const le =
|
|
4697
|
+
const le = J.current;
|
|
4680
4698
|
if (!le || !C) {
|
|
4681
|
-
|
|
4699
|
+
Q(), D("No conversation found with this account"), T && console.log(
|
|
4682
4700
|
"[MessagingShell] No conversation found for:",
|
|
4683
4701
|
i
|
|
4684
4702
|
);
|
|
@@ -4698,30 +4716,30 @@ const bo = ({
|
|
|
4698
4716
|
console.error(
|
|
4699
4717
|
"[MessagingShell] Failed to create conversation:",
|
|
4700
4718
|
ie
|
|
4701
|
-
),
|
|
4719
|
+
), Q(), D("Failed to create conversation");
|
|
4702
4720
|
}
|
|
4703
4721
|
} catch (re) {
|
|
4704
4722
|
console.error(
|
|
4705
4723
|
"[MessagingShell] Failed to load initial conversation:",
|
|
4706
4724
|
re
|
|
4707
|
-
),
|
|
4725
|
+
), Q(), M.current || D("Failed to load conversation");
|
|
4708
4726
|
}
|
|
4709
4727
|
})();
|
|
4710
4728
|
}, [i, A, z, C, T]);
|
|
4711
4729
|
const $ = G(r);
|
|
4712
4730
|
$.current = r;
|
|
4713
|
-
const te =
|
|
4731
|
+
const te = q(() => {
|
|
4714
4732
|
var X;
|
|
4715
|
-
I(null),
|
|
4733
|
+
I(null), W(!0), (X = $.current) == null || X.call($);
|
|
4716
4734
|
}, []);
|
|
4717
|
-
return B ? /* @__PURE__ */ s(Fe, {}) : O ? /* @__PURE__ */ s(
|
|
4718
|
-
|
|
4735
|
+
return B ? /* @__PURE__ */ s(Fe, {}) : O ? /* @__PURE__ */ s(_e, { message: O, onBack: L }) : !z || !A ? /* @__PURE__ */ s(
|
|
4736
|
+
_e,
|
|
4719
4737
|
{
|
|
4720
4738
|
message: "Not connected to messaging service",
|
|
4721
4739
|
onBack: L
|
|
4722
4740
|
}
|
|
4723
|
-
) : y ? /* @__PURE__ */ s(
|
|
4724
|
-
|
|
4741
|
+
) : y ? /* @__PURE__ */ s(_e, { message: y }) : H && !S ? /* @__PURE__ */ s(_e, { message: "Conversation ended" }) : S ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
4742
|
+
Os,
|
|
4725
4743
|
{
|
|
4726
4744
|
channel: S,
|
|
4727
4745
|
renderMessageInputActions: t,
|
|
@@ -4730,7 +4748,7 @@ const bo = ({
|
|
|
4730
4748
|
onLeaveConversation: te,
|
|
4731
4749
|
onBlockParticipant: te,
|
|
4732
4750
|
CustomChannelEmptyState: o,
|
|
4733
|
-
showDeleteConversation:
|
|
4751
|
+
showDeleteConversation: Z,
|
|
4734
4752
|
onBlockParticipantClick: d,
|
|
4735
4753
|
onReportParticipantClick: u,
|
|
4736
4754
|
dmAgentEnabled: g,
|
|
@@ -4748,13 +4766,13 @@ const bo = ({
|
|
|
4748
4766
|
S.id
|
|
4749
4767
|
) }) }) : /* @__PURE__ */ s(Fe, {});
|
|
4750
4768
|
};
|
|
4751
|
-
function
|
|
4769
|
+
function qi(e) {
|
|
4752
4770
|
const t = e.state.pending_messages;
|
|
4753
4771
|
if (t != null && t.length)
|
|
4754
4772
|
for (const n of t)
|
|
4755
4773
|
e.state.addMessageSorted(n.message);
|
|
4756
4774
|
}
|
|
4757
|
-
const
|
|
4775
|
+
const Fs = j.createContext({
|
|
4758
4776
|
selectedChannel: void 0,
|
|
4759
4777
|
onChannelSelect: () => {
|
|
4760
4778
|
},
|
|
@@ -4762,18 +4780,18 @@ const Os = j.createContext({
|
|
|
4762
4780
|
renderMessagePreview: void 0,
|
|
4763
4781
|
channelPreview: void 0,
|
|
4764
4782
|
viewerLanguage: void 0
|
|
4765
|
-
}),
|
|
4783
|
+
}), Xi = Fs.Provider, Ki = () => j.useContext(Fs), Zi = (e, t) => {
|
|
4766
4784
|
const n = new Date(
|
|
4767
4785
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
4768
4786
|
), r = new Date(
|
|
4769
4787
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
4770
4788
|
).getTime() - n.getTime();
|
|
4771
4789
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
4772
|
-
},
|
|
4790
|
+
}, Ji = (e) => {
|
|
4773
4791
|
const t = /* @__PURE__ */ new Date();
|
|
4774
4792
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
4775
4793
|
return "Just now";
|
|
4776
|
-
const a =
|
|
4794
|
+
const a = Zi(e, t);
|
|
4777
4795
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
4778
4796
|
hour: "numeric",
|
|
4779
4797
|
minute: "2-digit",
|
|
@@ -4783,7 +4801,7 @@ const Os = j.createContext({
|
|
|
4783
4801
|
month: "short",
|
|
4784
4802
|
year: "2-digit"
|
|
4785
4803
|
});
|
|
4786
|
-
},
|
|
4804
|
+
}, Bs = j.memo(
|
|
4787
4805
|
(e) => {
|
|
4788
4806
|
var B, O, L;
|
|
4789
4807
|
const { channel: t, unread: n } = e, {
|
|
@@ -4793,7 +4811,7 @@ const Os = j.createContext({
|
|
|
4793
4811
|
channelPreview: l,
|
|
4794
4812
|
renderMessagePreview: o,
|
|
4795
4813
|
viewerLanguage: d
|
|
4796
|
-
} =
|
|
4814
|
+
} = Ki(), { client: u } = ke(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = os(t);
|
|
4797
4815
|
if (l)
|
|
4798
4816
|
return /* @__PURE__ */ s(
|
|
4799
4817
|
l,
|
|
@@ -4840,7 +4858,7 @@ const Os = j.createContext({
|
|
|
4840
4858
|
if (C) return C;
|
|
4841
4859
|
const I = (y = b == null ? void 0 : b.attachments) == null ? void 0 : y[0];
|
|
4842
4860
|
return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
4843
|
-
})(), k = b != null && b.created_at ?
|
|
4861
|
+
})(), k = b != null && b.created_at ? Ji(new Date(b.created_at)) : "", R = b ? De(b) : !1, A = o ? o(b, E) : `${R ? "✨ " : ""}${E}`, z = n ?? 0;
|
|
4844
4862
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
4845
4863
|
channelId: t == null ? void 0 : t.id,
|
|
4846
4864
|
isSelected: g,
|
|
@@ -4864,7 +4882,7 @@ const Os = j.createContext({
|
|
|
4864
4882
|
"data-dd-privacy": "mask",
|
|
4865
4883
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
4866
4884
|
/* @__PURE__ */ s(
|
|
4867
|
-
|
|
4885
|
+
ve,
|
|
4868
4886
|
{
|
|
4869
4887
|
id: ((L = v == null ? void 0 : v.user) == null ? void 0 : L.id) || t.id || "unknown",
|
|
4870
4888
|
name: x,
|
|
@@ -4899,18 +4917,18 @@ const Os = j.createContext({
|
|
|
4899
4917
|
);
|
|
4900
4918
|
}
|
|
4901
4919
|
);
|
|
4902
|
-
|
|
4903
|
-
const
|
|
4920
|
+
Bs.displayName = "CustomChannelPreview";
|
|
4921
|
+
const Qi = { last_message_at: -1 }, eo = j.memo(
|
|
4904
4922
|
({
|
|
4905
4923
|
onChannelSelect: e,
|
|
4906
4924
|
selectedChannel: t,
|
|
4907
4925
|
filters: n,
|
|
4908
4926
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
4909
4927
|
channelRenderFilterFn: r,
|
|
4910
|
-
sort: i =
|
|
4928
|
+
sort: i = Qi,
|
|
4911
4929
|
className: l,
|
|
4912
4930
|
customEmptyStateIndicator: o,
|
|
4913
|
-
channelListPaginator: d =
|
|
4931
|
+
channelListPaginator: d = Tn,
|
|
4914
4932
|
channelPreview: u,
|
|
4915
4933
|
renderMessagePreview: g,
|
|
4916
4934
|
viewerLanguage: m,
|
|
@@ -4926,7 +4944,7 @@ const Ki = { last_message_at: -1 }, Zi = j.memo(
|
|
|
4926
4944
|
const { debug: E = !1 } = nt(), k = j.useCallback(
|
|
4927
4945
|
(A) => {
|
|
4928
4946
|
for (const z of A)
|
|
4929
|
-
|
|
4947
|
+
qi(z);
|
|
4930
4948
|
return r ? r(A) : A;
|
|
4931
4949
|
},
|
|
4932
4950
|
[r]
|
|
@@ -4961,8 +4979,8 @@ const Ki = { last_message_at: -1 }, Zi = j.memo(
|
|
|
4961
4979
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
4962
4980
|
l
|
|
4963
4981
|
),
|
|
4964
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
4965
|
-
|
|
4982
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: R, children: /* @__PURE__ */ s(
|
|
4983
|
+
In,
|
|
4966
4984
|
{
|
|
4967
4985
|
filters: n,
|
|
4968
4986
|
sort: i,
|
|
@@ -4976,7 +4994,7 @@ const Ki = { last_message_at: -1 }, Zi = j.memo(
|
|
|
4976
4994
|
onAddedToChannel: p,
|
|
4977
4995
|
onChannelUpdated: b,
|
|
4978
4996
|
Paginator: d,
|
|
4979
|
-
Preview:
|
|
4997
|
+
Preview: Bs,
|
|
4980
4998
|
EmptyStateIndicator: o
|
|
4981
4999
|
},
|
|
4982
5000
|
`${JSON.stringify(n)}:${JSON.stringify(i)}`
|
|
@@ -4985,11 +5003,11 @@ const Ki = { last_message_at: -1 }, Zi = j.memo(
|
|
|
4985
5003
|
);
|
|
4986
5004
|
}
|
|
4987
5005
|
);
|
|
4988
|
-
|
|
4989
|
-
const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`,
|
|
5006
|
+
eo.displayName = "ChannelList";
|
|
5007
|
+
const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, to = {
|
|
4990
5008
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
4991
5009
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
4992
|
-
},
|
|
5010
|
+
}, so = ({ variant: e }) => /* @__PURE__ */ s(
|
|
4993
5011
|
"span",
|
|
4994
5012
|
{
|
|
4995
5013
|
"aria-hidden": "true",
|
|
@@ -4999,12 +5017,12 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
4999
5017
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5000
5018
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5001
5019
|
transformOrigin: "center",
|
|
5002
|
-
backgroundColor:
|
|
5020
|
+
backgroundColor: to[e],
|
|
5003
5021
|
WebkitMask: Qt,
|
|
5004
5022
|
mask: Qt
|
|
5005
5023
|
}
|
|
5006
5024
|
}
|
|
5007
|
-
),
|
|
5025
|
+
), no = {
|
|
5008
5026
|
sent: {
|
|
5009
5027
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5010
5028
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5013,7 +5031,7 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5013
5031
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5014
5032
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5015
5033
|
}
|
|
5016
|
-
},
|
|
5034
|
+
}, $s = ({
|
|
5017
5035
|
variant: e,
|
|
5018
5036
|
text: t,
|
|
5019
5037
|
tail: n = !0,
|
|
@@ -5029,23 +5047,23 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5029
5047
|
r
|
|
5030
5048
|
),
|
|
5031
5049
|
style: {
|
|
5032
|
-
...
|
|
5050
|
+
...no[e],
|
|
5033
5051
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5034
5052
|
isolation: "isolate"
|
|
5035
5053
|
},
|
|
5036
5054
|
children: [
|
|
5037
5055
|
a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5038
5056
|
/* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
|
|
5039
|
-
n && /* @__PURE__ */ s(
|
|
5057
|
+
n && /* @__PURE__ */ s(so, { variant: e })
|
|
5040
5058
|
]
|
|
5041
5059
|
}
|
|
5042
|
-
),
|
|
5060
|
+
), ao = ({
|
|
5043
5061
|
text: e,
|
|
5044
5062
|
tail: t,
|
|
5045
5063
|
header: n,
|
|
5046
5064
|
className: a
|
|
5047
5065
|
}) => /* @__PURE__ */ s(
|
|
5048
|
-
|
|
5066
|
+
$s,
|
|
5049
5067
|
{
|
|
5050
5068
|
variant: "received",
|
|
5051
5069
|
text: e,
|
|
@@ -5053,10 +5071,10 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5053
5071
|
header: n,
|
|
5054
5072
|
className: a
|
|
5055
5073
|
}
|
|
5056
|
-
),
|
|
5057
|
-
Sent:
|
|
5058
|
-
Received:
|
|
5059
|
-
},
|
|
5074
|
+
), ro = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s($s, { variant: "sent", text: e, tail: t, className: n }), _o = {
|
|
5075
|
+
Sent: ro,
|
|
5076
|
+
Received: ao
|
|
5077
|
+
}, io = ({
|
|
5060
5078
|
question: e,
|
|
5061
5079
|
onClick: t,
|
|
5062
5080
|
loading: n = !1,
|
|
@@ -5078,7 +5096,7 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5078
5096
|
),
|
|
5079
5097
|
children: e
|
|
5080
5098
|
}
|
|
5081
|
-
),
|
|
5099
|
+
), No = ({
|
|
5082
5100
|
faqs: e,
|
|
5083
5101
|
onFaqClick: t,
|
|
5084
5102
|
loadingFaqId: n,
|
|
@@ -5090,7 +5108,7 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5090
5108
|
const o = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
|
|
5091
5109
|
return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
5092
5110
|
(i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
|
|
5093
|
-
|
|
5111
|
+
ve,
|
|
5094
5112
|
{
|
|
5095
5113
|
id: l || "account",
|
|
5096
5114
|
name: l || "Account",
|
|
@@ -5107,7 +5125,7 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5107
5125
|
children: [
|
|
5108
5126
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5109
5127
|
o.map((d) => /* @__PURE__ */ s(
|
|
5110
|
-
|
|
5128
|
+
io,
|
|
5111
5129
|
{
|
|
5112
5130
|
question: d.question,
|
|
5113
5131
|
onClick: () => t(d.id),
|
|
@@ -5123,40 +5141,40 @@ const Qt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5123
5141
|
export {
|
|
5124
5142
|
hs as A,
|
|
5125
5143
|
ot as B,
|
|
5126
|
-
|
|
5144
|
+
Hi as C,
|
|
5127
5145
|
cs as D,
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5146
|
+
xo as E,
|
|
5147
|
+
No as F,
|
|
5148
|
+
Br as G,
|
|
5149
|
+
wa as H,
|
|
5150
|
+
aa as I,
|
|
5133
5151
|
Ht as L,
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5152
|
+
bo as M,
|
|
5153
|
+
xe as a,
|
|
5154
|
+
ve as b,
|
|
5155
|
+
eo as c,
|
|
5156
|
+
Os as d,
|
|
5157
|
+
vo as e,
|
|
5158
|
+
io as f,
|
|
5141
5159
|
oe as g,
|
|
5142
5160
|
Re as h,
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5161
|
+
we as i,
|
|
5162
|
+
_o as j,
|
|
5163
|
+
qr as k,
|
|
5164
|
+
po as l,
|
|
5165
|
+
wo as m,
|
|
5166
|
+
nr as n,
|
|
5149
5167
|
de as o,
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5168
|
+
er as p,
|
|
5169
|
+
Ji as q,
|
|
5170
|
+
be as r,
|
|
5171
|
+
sr as s,
|
|
5154
5172
|
us as t,
|
|
5155
5173
|
ps as u,
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5174
|
+
la as v,
|
|
5175
|
+
Wa as w,
|
|
5176
|
+
_a as x,
|
|
5159
5177
|
ls as y,
|
|
5160
5178
|
it as z
|
|
5161
5179
|
};
|
|
5162
|
-
//# sourceMappingURL=index-
|
|
5180
|
+
//# sourceMappingURL=index-vYOR0x6o.js.map
|