@linktr.ee/messaging-react 4.1.8 → 4.1.9-rc-1787325645
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-B5YUxWCs.js → Card-DJ0YiWXB.js} +2 -2
- package/dist/{Card-B5YUxWCs.js.map → Card-DJ0YiWXB.js.map} +1 -1
- package/dist/{Card-DjafcNS_.cjs → Card-DOAG1fie.cjs} +2 -2
- package/dist/{Card-DjafcNS_.cjs.map → Card-DOAG1fie.cjs.map} +1 -1
- package/dist/index-B50WBNpA.cjs +3 -0
- package/dist/index-B50WBNpA.cjs.map +1 -0
- package/dist/{index-l73T0G4A.js → index-B6hhiZHx.js} +403 -403
- package/dist/index-B6hhiZHx.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/AttachmentCard/AttachmentCard.stories.tsx +36 -0
- package/src/components/AttachmentCard/Thumbnail.tsx +2 -2
- package/dist/index-Bwjn-YoV.cjs +0 -3
- package/dist/index-Bwjn-YoV.cjs.map +0 -1
- package/dist/index-l73T0G4A.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as n, jsxs as f, Fragment as q } from "react/jsx-runtime";
|
|
2
|
-
import P, { createContext as Ve, useContext as we, useCallback as X, useState as B, useRef as V, useEffect as K, useId as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { isOfficialChannel as
|
|
2
|
+
import P, { createContext as Ve, useContext as we, useCallback as X, useState as B, useRef as V, useEffect as K, useId as os, Suspense as cs, useMemo as oe } from "react";
|
|
3
|
+
import { StreamChatService as ds } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as us, LinkPreviewsManager as st } from "stream-chat";
|
|
5
|
+
import { Chat as ms, useChannelStateContext as _e, useChatContext as Ge, DateSeparator as hs, useMessageContext as ge, MessageStatus as fs, MessageErrorIcon as at, MessageText as Be, areMessageUIPropsEqual as gs, useMessageReminder as ps, useComponentContext as gn, Attachment as bs, EditMessageModal as vs, MessageBlocked as xs, MessageBouncePrompt as ws, MessageDeleted as _s, MessageIsThreadReplyInChannelButtonIndicator as ys, MessageRepliesCountButton as Ns, ReminderNotification as ks, StreamedMessageText as Cs, messageHasAttachments as Ss, messageHasReactions as Es, isDateSeparatorMessage as Is, isMessageBlocked as Ts, isMessageBounced as As, MessageBounceModal as Rs, Poll as Ls, useMessageComposer as Ms, useStateStore as Ds, MessageInput as Yt, useMessageInputContext as Os, useMessageComposerHasSendableData as Ps, AttachmentPreviewList as Fs, QuotedMessagePreview as zs, TextareaComposer as Bs, MessageTimestamp as qe, AIStates as Ze, useTypingContext as $s, useAIState as Us, Channel as js, WithComponents as Hs, Window as Vs, MessageList as Wt, ChannelList as Gs, InfiniteScroll as Ys } from "stream-chat-react";
|
|
6
|
+
import { isOfficialChannel as pn, OFFICIAL_SENDER_USER_ID as Ws, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as Kt, isAgeSafetySystemType as Ks, resolveRichCardImagePresentation as Xs, selectEnabledFaqs as qs } from "@linktr.ee/messaging-taxonomy";
|
|
7
7
|
import k from "classnames";
|
|
8
|
-
import { StarIcon as
|
|
9
|
-
import { MessageActions as
|
|
10
|
-
const
|
|
8
|
+
import { StarIcon as rt, DotsThreeIcon as Zs, SpinnerGapIcon as Pe, SignOutIcon as Js, ProhibitInsetIcon as Xt, FlagIcon as bn, CurrencyDollarIcon as Qs, CaretRightIcon as vn, ArrowLeftIcon as ea, FileIcon as xn, ImageIcon as ta, SpeakerHighIcon as na, VideoCameraIcon as wn, FileMdIcon as sa, FileTextIcon as aa, FileZipIcon as ra, FilePptIcon as ia, FileCsvIcon as la, FileXlsIcon as oa, FileDocIcon as ca, FilePdfIcon as da, CircleNotchIcon as ve, PlayIcon as it, PauseIcon as ua, LinkIcon as ma, DownloadSimpleIcon as Ee, GiftIcon as ha, WarningCircleIcon as fa, MegaphoneIcon as ga, ChecksIcon as pa, XIcon as ot, PencilSimpleIcon as ba, CaretLeftIcon as va, TrashSimpleIcon as xa, ArrowUpIcon as wa, SparkleIcon as _a, ProhibitIcon as ya } from "@phosphor-icons/react";
|
|
9
|
+
import { MessageActions as Na, DefaultDropdownActionButton as _n } from "stream-chat-react/experimental";
|
|
10
|
+
const yn = Ve({
|
|
11
11
|
service: null,
|
|
12
12
|
client: null,
|
|
13
13
|
isConnected: !1,
|
|
@@ -17,7 +17,7 @@ const _n = Ve({
|
|
|
17
17
|
refreshConnection: async () => {
|
|
18
18
|
},
|
|
19
19
|
debug: !1
|
|
20
|
-
}),
|
|
20
|
+
}), ct = () => we(yn), so = ({
|
|
21
21
|
children: e,
|
|
22
22
|
user: t,
|
|
23
23
|
serviceConfig: s,
|
|
@@ -65,7 +65,7 @@ const _n = Ve({
|
|
|
65
65
|
capabilities: r
|
|
66
66
|
};
|
|
67
67
|
const z = V(null);
|
|
68
|
-
!o && a && ((I = z.current) == null ? void 0 : I.apiKey) !== a && (z.current = { apiKey: a, client: new
|
|
68
|
+
!o && a && ((I = z.current) == null ? void 0 : I.apiKey) !== a && (z.current = { apiKey: a, client: new us(a) });
|
|
69
69
|
const F = o || (a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null);
|
|
70
70
|
K(() => {
|
|
71
71
|
const S = R.current, O = _.current;
|
|
@@ -84,7 +84,7 @@ const _n = Ve({
|
|
|
84
84
|
renderCount: S,
|
|
85
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
86
86
|
});
|
|
87
|
-
const U = new
|
|
87
|
+
const U = new ds({
|
|
88
88
|
...O,
|
|
89
89
|
apiKey: a,
|
|
90
90
|
debug: T.current,
|
|
@@ -215,8 +215,8 @@ const _n = Ve({
|
|
|
215
215
|
renderCount: R.current,
|
|
216
216
|
willRenderChat: !!F,
|
|
217
217
|
contextValueReady: !!D
|
|
218
|
-
}), /* @__PURE__ */ n(
|
|
219
|
-
|
|
218
|
+
}), /* @__PURE__ */ n(yn.Provider, { value: D, children: F ? /* @__PURE__ */ n(
|
|
219
|
+
ms,
|
|
220
220
|
{
|
|
221
221
|
client: F,
|
|
222
222
|
customClasses: {
|
|
@@ -225,7 +225,7 @@ const _n = Ve({
|
|
|
225
225
|
children: e
|
|
226
226
|
}
|
|
227
227
|
) : e });
|
|
228
|
-
},
|
|
228
|
+
}, ka = () => ct(), Nn = (e) => {
|
|
229
229
|
var a, r;
|
|
230
230
|
const [t, s] = B(
|
|
231
231
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -248,13 +248,13 @@ const _n = Ve({
|
|
|
248
248
|
};
|
|
249
249
|
}, [e]), t;
|
|
250
250
|
};
|
|
251
|
-
function
|
|
251
|
+
function kn(e, t, s) {
|
|
252
252
|
const a = Object.values(e || {});
|
|
253
|
-
if (
|
|
253
|
+
if (pn(s)) {
|
|
254
254
|
const r = a.find(
|
|
255
255
|
(i) => {
|
|
256
256
|
var o;
|
|
257
|
-
return ((o = i.user) == null ? void 0 : o.id) ===
|
|
257
|
+
return ((o = i.user) == null ? void 0 : o.id) === Ws;
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
if (r) return r;
|
|
@@ -266,18 +266,18 @@ function Nn(e, t, s) {
|
|
|
266
266
|
}
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
function
|
|
271
|
-
return
|
|
269
|
+
const Ca = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
270
|
+
function Sa(e) {
|
|
271
|
+
return Ca.test(e.trim());
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function qt(e, t) {
|
|
274
274
|
const s = e == null ? void 0 : e.trim();
|
|
275
|
-
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !
|
|
275
|
+
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !Sa(s);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function Cn(e) {
|
|
278
|
+
return qt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : qt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const Zt = [
|
|
281
281
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
282
282
|
// Apple
|
|
283
283
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -305,7 +305,7 @@ const qt = [
|
|
|
305
305
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
306
306
|
// Melon
|
|
307
307
|
];
|
|
308
|
-
function
|
|
308
|
+
function Ea(e) {
|
|
309
309
|
let t = 0;
|
|
310
310
|
for (let s = 0; s < e.length; s++) {
|
|
311
311
|
const a = e.charCodeAt(s);
|
|
@@ -313,14 +313,14 @@ function Sa(e) {
|
|
|
313
313
|
}
|
|
314
314
|
return Math.abs(t);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
318
|
-
}
|
|
319
|
-
function Ea(e) {
|
|
320
|
-
return Cn(e).emoji;
|
|
316
|
+
function Sn(e) {
|
|
317
|
+
return Zt[Ea(e) % Zt.length];
|
|
321
318
|
}
|
|
322
319
|
function Ia(e) {
|
|
323
|
-
return
|
|
320
|
+
return Sn(e).emoji;
|
|
321
|
+
}
|
|
322
|
+
function Ta(e) {
|
|
323
|
+
return Sn(e).bgColor;
|
|
324
324
|
}
|
|
325
325
|
const ye = ({
|
|
326
326
|
id: e,
|
|
@@ -331,7 +331,7 @@ const ye = ({
|
|
|
331
331
|
shape: i = "squircle",
|
|
332
332
|
dmAgentEnabled: o = !1
|
|
333
333
|
}) => {
|
|
334
|
-
const l =
|
|
334
|
+
const l = Ia(e), d = Ta(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
337
|
"aria-hidden": "true",
|
|
@@ -359,7 +359,7 @@ const ye = ({
|
|
|
359
359
|
{
|
|
360
360
|
"aria-hidden": "true",
|
|
361
361
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
362
|
-
children: /* @__PURE__ */ n(
|
|
362
|
+
children: /* @__PURE__ */ n(rt, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
365
|
/* @__PURE__ */ n(
|
|
@@ -382,7 +382,7 @@ const ye = ({
|
|
|
382
382
|
]
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
|
-
},
|
|
385
|
+
}, Aa = "https://linktr.ee/s/about/trust-center/report", Ra = ({
|
|
386
386
|
channel: e,
|
|
387
387
|
participant: t,
|
|
388
388
|
showBlockParticipant: s = !0,
|
|
@@ -396,7 +396,7 @@ const ye = ({
|
|
|
396
396
|
logLabel: h = "useChannelModerationActions"
|
|
397
397
|
}) => {
|
|
398
398
|
var D;
|
|
399
|
-
const { service: m, debug: g } =
|
|
399
|
+
const { service: m, debug: g } = ct(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && m && c), [w, v] = B(!1), [x, p] = B(null), [y, _] = B(!1), [T, A] = B(!1), R = b && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
|
|
400
400
|
return K(() => {
|
|
401
401
|
if (!b || !m || !c) {
|
|
402
402
|
v(!1), p(null);
|
|
@@ -466,7 +466,7 @@ const ye = ({
|
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
handleReportUser: () => {
|
|
469
|
-
d == null || d(), u == null || u(), window.open(
|
|
469
|
+
d == null || d(), u == null || u(), window.open(Aa, "_blank", "noopener,noreferrer");
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
}, ke = ({
|
|
@@ -486,7 +486,7 @@ const ye = ({
|
|
|
486
486
|
...a,
|
|
487
487
|
children: s
|
|
488
488
|
}
|
|
489
|
-
),
|
|
489
|
+
), La = ({
|
|
490
490
|
channel: e,
|
|
491
491
|
participant: t,
|
|
492
492
|
showDeleteConversation: s = !0,
|
|
@@ -500,7 +500,7 @@ const ye = ({
|
|
|
500
500
|
customChannelActions: h,
|
|
501
501
|
triggerClassName: m
|
|
502
502
|
}) => {
|
|
503
|
-
const [g, c] = B(!1), b = V(null), w =
|
|
503
|
+
const [g, c] = B(!1), b = V(null), w = os(), v = X(() => c(!1), []), {
|
|
504
504
|
isParticipantBlocked: x,
|
|
505
505
|
isCheckingBlockedStatus: p,
|
|
506
506
|
isLeaving: y,
|
|
@@ -509,7 +509,7 @@ const ye = ({
|
|
|
509
509
|
handleBlockUser: A,
|
|
510
510
|
handleUnblockUser: R,
|
|
511
511
|
handleReportUser: z
|
|
512
|
-
} =
|
|
512
|
+
} = Ra({
|
|
513
513
|
channel: e,
|
|
514
514
|
participant: t,
|
|
515
515
|
showBlockParticipant: a,
|
|
@@ -543,7 +543,7 @@ const ye = ({
|
|
|
543
543
|
"aria-controls": g ? w : void 0,
|
|
544
544
|
onClick: () => c((L) => !L),
|
|
545
545
|
children: [
|
|
546
|
-
/* @__PURE__ */ n(
|
|
546
|
+
/* @__PURE__ */ n(Zs, { className: "size-5 text-black/90" }),
|
|
547
547
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
548
548
|
]
|
|
549
549
|
}
|
|
@@ -565,7 +565,7 @@ const ye = ({
|
|
|
565
565
|
disabled: y,
|
|
566
566
|
"aria-busy": y,
|
|
567
567
|
children: [
|
|
568
|
-
y ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
568
|
+
y ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Js, { className: "h-5 w-5" }),
|
|
569
569
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
570
570
|
]
|
|
571
571
|
}
|
|
@@ -584,7 +584,7 @@ const ye = ({
|
|
|
584
584
|
disabled: _,
|
|
585
585
|
"aria-busy": _,
|
|
586
586
|
children: [
|
|
587
|
-
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
587
|
+
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Xt, { className: "h-5 w-5" }),
|
|
588
588
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
589
589
|
]
|
|
590
590
|
}
|
|
@@ -595,13 +595,13 @@ const ye = ({
|
|
|
595
595
|
disabled: _,
|
|
596
596
|
"aria-busy": _,
|
|
597
597
|
children: [
|
|
598
|
-
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
598
|
+
_ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Xt, { className: "h-5 w-5" }),
|
|
599
599
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
600
600
|
]
|
|
601
601
|
}
|
|
602
602
|
) }),
|
|
603
603
|
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(ke, { variant: "danger", onClick: z, children: [
|
|
604
|
-
/* @__PURE__ */ n(
|
|
604
|
+
/* @__PURE__ */ n(bn, { className: "h-5 w-5" }),
|
|
605
605
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
606
606
|
] }) }),
|
|
607
607
|
h
|
|
@@ -609,7 +609,7 @@ const ye = ({
|
|
|
609
609
|
}
|
|
610
610
|
)
|
|
611
611
|
] });
|
|
612
|
-
}, Je = "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",
|
|
612
|
+
}, Je = "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", Ma = "CUSTOMER_PAID", Da = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ma, Oa = ({
|
|
613
613
|
className: e,
|
|
614
614
|
onBack: t,
|
|
615
615
|
showBackButton: s,
|
|
@@ -631,14 +631,14 @@ const ye = ({
|
|
|
631
631
|
const { channel: v } = _e(), { client: x } = Ge(), p = P.useMemo(
|
|
632
632
|
() => {
|
|
633
633
|
var S;
|
|
634
|
-
return
|
|
634
|
+
return kn(
|
|
635
635
|
(S = v.state) == null ? void 0 : S.members,
|
|
636
636
|
x == null ? void 0 : x.userID,
|
|
637
637
|
v.type
|
|
638
638
|
);
|
|
639
639
|
},
|
|
640
640
|
[(E = v.state) == null ? void 0 : E.members, x == null ? void 0 : x.userID, v.type]
|
|
641
|
-
), y =
|
|
641
|
+
), y = Cn(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, T = Nn(v), A = Da((I = v.data) == null ? void 0 : I.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, R = a && T, z = A || R || !!w, F = async () => {
|
|
642
642
|
try {
|
|
643
643
|
T ? await v.unpin() : await v.pin();
|
|
644
644
|
} catch (S) {
|
|
@@ -674,7 +674,7 @@ const ye = ({
|
|
|
674
674
|
{
|
|
675
675
|
"aria-label": "Paid customer",
|
|
676
676
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
677
|
-
children: /* @__PURE__ */ n(
|
|
677
|
+
children: /* @__PURE__ */ n(Qs, { className: "size-2.5", weight: "bold" })
|
|
678
678
|
}
|
|
679
679
|
),
|
|
680
680
|
R && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
|
|
@@ -682,11 +682,11 @@ const ye = ({
|
|
|
682
682
|
{
|
|
683
683
|
"aria-label": "Starred conversation",
|
|
684
684
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
|
|
685
|
-
children: /* @__PURE__ */ n(
|
|
685
|
+
children: /* @__PURE__ */ n(rt, { className: "size-2.5", weight: "fill" })
|
|
686
686
|
}
|
|
687
687
|
) }),
|
|
688
688
|
w && /* @__PURE__ */ n(
|
|
689
|
-
|
|
689
|
+
vn,
|
|
690
690
|
{
|
|
691
691
|
"aria-hidden": "true",
|
|
692
692
|
className: "size-4 shrink-0 text-black/65",
|
|
@@ -717,7 +717,7 @@ const ye = ({
|
|
|
717
717
|
}),
|
|
718
718
|
type: "button",
|
|
719
719
|
"aria-label": "Back to conversations",
|
|
720
|
-
children: /* @__PURE__ */ n(
|
|
720
|
+
children: /* @__PURE__ */ n(ea, { className: "size-5 text-black/90" })
|
|
721
721
|
}
|
|
722
722
|
) }),
|
|
723
723
|
/* @__PURE__ */ n("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ n(
|
|
@@ -740,7 +740,7 @@ const ye = ({
|
|
|
740
740
|
"aria-pressed": T,
|
|
741
741
|
"aria-label": T ? "Unstar conversation" : "Star conversation",
|
|
742
742
|
children: /* @__PURE__ */ n(
|
|
743
|
-
|
|
743
|
+
rt,
|
|
744
744
|
{
|
|
745
745
|
className: k("size-5", {
|
|
746
746
|
"text-[#FFD60A]": T,
|
|
@@ -752,7 +752,7 @@ const ye = ({
|
|
|
752
752
|
}
|
|
753
753
|
),
|
|
754
754
|
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
755
|
-
|
|
755
|
+
La,
|
|
756
756
|
{
|
|
757
757
|
channel: v,
|
|
758
758
|
participant: p,
|
|
@@ -772,40 +772,40 @@ const ye = ({
|
|
|
772
772
|
] })
|
|
773
773
|
}
|
|
774
774
|
);
|
|
775
|
-
},
|
|
776
|
-
function
|
|
775
|
+
}, Pa = (e) => /* @__PURE__ */ n(hs, { ...e, position: "center" });
|
|
776
|
+
function Fa(e) {
|
|
777
777
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function En({
|
|
780
780
|
message: e,
|
|
781
781
|
viewerLanguage: t
|
|
782
782
|
}) {
|
|
783
783
|
var r;
|
|
784
|
-
const s = e == null ? void 0 : e.text, a =
|
|
784
|
+
const s = e == null ? void 0 : e.text, a = Fa(t);
|
|
785
785
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
786
786
|
}
|
|
787
|
-
const
|
|
788
|
-
function
|
|
787
|
+
const za = ["linktr.ee"], Jt = "messaging-attachment-v1_0";
|
|
788
|
+
function Ba(e) {
|
|
789
789
|
try {
|
|
790
790
|
return new URL(e).hostname.toLowerCase();
|
|
791
791
|
} catch {
|
|
792
792
|
return null;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
return
|
|
795
|
+
function $a(e) {
|
|
796
|
+
return za.some(
|
|
797
797
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
800
|
function de(e) {
|
|
801
801
|
const t = e == null ? void 0 : e.trim();
|
|
802
802
|
if (!t) return;
|
|
803
|
-
const s =
|
|
804
|
-
if (!s ||
|
|
803
|
+
const s = Ba(t);
|
|
804
|
+
if (!s || !$a(s)) return t;
|
|
805
805
|
const a = new URL(t);
|
|
806
|
-
return a.searchParams.get("io") === "true" && a.searchParams.get("size") ===
|
|
806
|
+
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Jt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Jt), a.toString());
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const Ua = [
|
|
809
809
|
[/pdf/, "pdf"],
|
|
810
810
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
811
811
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -818,39 +818,39 @@ const $a = [
|
|
|
818
818
|
function ue(e) {
|
|
819
819
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const t =
|
|
821
|
+
function In(e) {
|
|
822
|
+
const t = Ua.find(
|
|
823
823
|
([s]) => s.test(e)
|
|
824
824
|
);
|
|
825
825
|
return t ? t[1] : "generic";
|
|
826
826
|
}
|
|
827
|
-
const
|
|
828
|
-
video:
|
|
829
|
-
audio:
|
|
830
|
-
image:
|
|
831
|
-
document:
|
|
832
|
-
},
|
|
833
|
-
pdf:
|
|
834
|
-
doc:
|
|
835
|
-
xls:
|
|
836
|
-
csv:
|
|
837
|
-
ppt:
|
|
838
|
-
zip:
|
|
839
|
-
text:
|
|
840
|
-
markdown:
|
|
841
|
-
generic:
|
|
827
|
+
const ja = {
|
|
828
|
+
video: wn,
|
|
829
|
+
audio: na,
|
|
830
|
+
image: ta,
|
|
831
|
+
document: xn
|
|
832
|
+
}, Ha = {
|
|
833
|
+
pdf: da,
|
|
834
|
+
doc: ca,
|
|
835
|
+
xls: oa,
|
|
836
|
+
csv: la,
|
|
837
|
+
ppt: ia,
|
|
838
|
+
zip: ra,
|
|
839
|
+
text: aa,
|
|
840
|
+
markdown: sa,
|
|
841
|
+
generic: xn
|
|
842
842
|
};
|
|
843
|
-
function
|
|
843
|
+
function Va(e) {
|
|
844
844
|
const t = ue(e);
|
|
845
|
-
return t !== "document" ?
|
|
845
|
+
return t !== "document" ? ja[t] : Ha[In(e)];
|
|
846
846
|
}
|
|
847
847
|
function xe(e, t) {
|
|
848
|
-
return P.createElement(
|
|
848
|
+
return P.createElement(Va(e), t);
|
|
849
849
|
}
|
|
850
|
-
const
|
|
850
|
+
const Ga = (e) => {
|
|
851
851
|
var t, s;
|
|
852
852
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
|
|
853
|
-
},
|
|
853
|
+
}, Ya = ({
|
|
854
854
|
source: e,
|
|
855
855
|
mimeType: t,
|
|
856
856
|
poster: s,
|
|
@@ -870,7 +870,7 @@ const Va = (e) => {
|
|
|
870
870
|
const Y = M.getBoundingClientRect();
|
|
871
871
|
return Math.max(
|
|
872
872
|
0,
|
|
873
|
-
Math.min(1, (
|
|
873
|
+
Math.min(1, (Ga(N) - Y.left) / Y.width)
|
|
874
874
|
);
|
|
875
875
|
}, []), U = X((N) => {
|
|
876
876
|
const M = m.current;
|
|
@@ -1014,7 +1014,7 @@ const Va = (e) => {
|
|
|
1014
1014
|
onKeyDown: (N) => {
|
|
1015
1015
|
N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), S());
|
|
1016
1016
|
},
|
|
1017
|
-
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(
|
|
1017
|
+
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(it, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1018
1018
|
}
|
|
1019
1019
|
),
|
|
1020
1020
|
l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
|
|
@@ -1051,7 +1051,7 @@ const Va = (e) => {
|
|
|
1051
1051
|
},
|
|
1052
1052
|
className: "shrink-0 text-white",
|
|
1053
1053
|
"aria-label": w ? "Pause" : "Play",
|
|
1054
|
-
children: w ? /* @__PURE__ */ n(
|
|
1054
|
+
children: w ? /* @__PURE__ */ n(ua, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(it, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1055
1055
|
}
|
|
1056
1056
|
),
|
|
1057
1057
|
/* @__PURE__ */ f(
|
|
@@ -1099,7 +1099,7 @@ const Va = (e) => {
|
|
|
1099
1099
|
]
|
|
1100
1100
|
}
|
|
1101
1101
|
);
|
|
1102
|
-
},
|
|
1102
|
+
}, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Qe = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Tn = ({
|
|
1103
1103
|
mimeType: e,
|
|
1104
1104
|
sourceUrl: t,
|
|
1105
1105
|
thumbnailUrl: s,
|
|
@@ -1110,7 +1110,7 @@ const Va = (e) => {
|
|
|
1110
1110
|
}) => {
|
|
1111
1111
|
const l = ue(e), [d, u] = B(!1), h = de(t), m = de(s);
|
|
1112
1112
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
1113
|
-
|
|
1113
|
+
Ya,
|
|
1114
1114
|
{
|
|
1115
1115
|
source: t,
|
|
1116
1116
|
mimeType: e,
|
|
@@ -1118,7 +1118,7 @@ const Va = (e) => {
|
|
|
1118
1118
|
controls: !0,
|
|
1119
1119
|
...i
|
|
1120
1120
|
}
|
|
1121
|
-
) : t && l === "image" ? o ? /* @__PURE__ */ n("div", { className:
|
|
1121
|
+
) : t && l === "image" ? o ? /* @__PURE__ */ n("div", { className: `relative ${Qe(r)}`, children: /* @__PURE__ */ n(
|
|
1122
1122
|
"img",
|
|
1123
1123
|
{
|
|
1124
1124
|
src: h ?? t,
|
|
@@ -1135,7 +1135,7 @@ const Va = (e) => {
|
|
|
1135
1135
|
className: "block w-full",
|
|
1136
1136
|
draggable: !1
|
|
1137
1137
|
}
|
|
1138
|
-
) : t && l === "document" ? s ? o ? /* @__PURE__ */ n("div", { className:
|
|
1138
|
+
) : t && l === "document" ? s ? o ? /* @__PURE__ */ n("div", { className: `relative ${Qe(r)}`, children: /* @__PURE__ */ n(
|
|
1139
1139
|
"img",
|
|
1140
1140
|
{
|
|
1141
1141
|
src: m ?? s,
|
|
@@ -1157,11 +1157,11 @@ const Va = (e) => {
|
|
|
1157
1157
|
{
|
|
1158
1158
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1159
1159
|
children: xe(e, {
|
|
1160
|
-
className:
|
|
1160
|
+
className: Qt(r),
|
|
1161
1161
|
weight: "regular"
|
|
1162
1162
|
})
|
|
1163
1163
|
}
|
|
1164
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
1164
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${Qe(r)}`, children: /* @__PURE__ */ n(
|
|
1165
1165
|
"img",
|
|
1166
1166
|
{
|
|
1167
1167
|
src: m ?? s,
|
|
@@ -1174,12 +1174,12 @@ const Va = (e) => {
|
|
|
1174
1174
|
{
|
|
1175
1175
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1176
1176
|
children: xe(e, {
|
|
1177
|
-
className:
|
|
1177
|
+
className: Qt(r),
|
|
1178
1178
|
weight: "regular"
|
|
1179
1179
|
})
|
|
1180
1180
|
}
|
|
1181
1181
|
);
|
|
1182
|
-
},
|
|
1182
|
+
}, An = ({
|
|
1183
1183
|
variant: e,
|
|
1184
1184
|
thumbnail: t,
|
|
1185
1185
|
title: s,
|
|
@@ -1245,10 +1245,10 @@ const Va = (e) => {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
1247
|
};
|
|
1248
|
-
function
|
|
1248
|
+
function Rn(e) {
|
|
1249
1249
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function dt(e) {
|
|
1252
1252
|
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)]`;
|
|
1253
1253
|
}
|
|
1254
1254
|
function Wa(e) {
|
|
@@ -1266,7 +1266,7 @@ function qa(e) {
|
|
|
1266
1266
|
function Za(e) {
|
|
1267
1267
|
return e ? "text-white/20" : "text-black/20";
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1269
|
+
const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
1270
1270
|
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ f(P.Fragment, { children: [
|
|
1271
1271
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1272
1272
|
"img",
|
|
@@ -1279,7 +1279,7 @@ const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
1281
|
className: `aspect-video w-full rounded-[20px] ${Wa(t)} flex items-center justify-center`,
|
|
1282
|
-
children: /* @__PURE__ */ n(
|
|
1282
|
+
children: /* @__PURE__ */ n(ma, { className: `size-12 ${Za(t)}` })
|
|
1283
1283
|
}
|
|
1284
1284
|
) }),
|
|
1285
1285
|
/* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
|
|
@@ -1321,7 +1321,7 @@ function Ye(e) {
|
|
|
1321
1321
|
var t;
|
|
1322
1322
|
return e.type === "link" || !!((t = e.og_scrape_url) != null && t.trim()) && !e.asset_url;
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function mt(e) {
|
|
1325
1325
|
var t;
|
|
1326
1326
|
return (t = e.attachments) == null ? void 0 : t.find(Ye);
|
|
1327
1327
|
}
|
|
@@ -1370,7 +1370,7 @@ const Qa = ({
|
|
|
1370
1370
|
}
|
|
1371
1371
|
);
|
|
1372
1372
|
};
|
|
1373
|
-
function
|
|
1373
|
+
function ht(e) {
|
|
1374
1374
|
var m, g, c, b;
|
|
1375
1375
|
const t = (m = e.attachments) == null ? void 0 : m.find(
|
|
1376
1376
|
(w) => w.type === "video" && w.asset_url
|
|
@@ -1391,16 +1391,16 @@ function mt(e) {
|
|
|
1391
1391
|
thumbnailUrl: h
|
|
1392
1392
|
};
|
|
1393
1393
|
}
|
|
1394
|
-
const
|
|
1394
|
+
const Ln = ({
|
|
1395
1395
|
resolvedUrl: e,
|
|
1396
1396
|
resolvedType: t,
|
|
1397
1397
|
title: s,
|
|
1398
1398
|
fileSize: a,
|
|
1399
1399
|
thumbnailUrl: r
|
|
1400
1400
|
}) => {
|
|
1401
|
-
const i = a !== void 0 ?
|
|
1401
|
+
const i = a !== void 0 ? Rn(a) : void 0;
|
|
1402
1402
|
return /* @__PURE__ */ n(
|
|
1403
|
-
|
|
1403
|
+
An,
|
|
1404
1404
|
{
|
|
1405
1405
|
variant: "dark",
|
|
1406
1406
|
title: s,
|
|
@@ -1408,7 +1408,7 @@ const Rn = ({
|
|
|
1408
1408
|
mimeType: t,
|
|
1409
1409
|
detail: i,
|
|
1410
1410
|
thumbnail: /* @__PURE__ */ n(
|
|
1411
|
-
|
|
1411
|
+
Tn,
|
|
1412
1412
|
{
|
|
1413
1413
|
mimeType: t,
|
|
1414
1414
|
sourceUrl: e,
|
|
@@ -1419,23 +1419,23 @@ const Rn = ({
|
|
|
1419
1419
|
)
|
|
1420
1420
|
}
|
|
1421
1421
|
);
|
|
1422
|
-
},
|
|
1422
|
+
}, Mn = ({
|
|
1423
1423
|
resolvedUrl: e,
|
|
1424
1424
|
resolvedType: t,
|
|
1425
1425
|
title: s,
|
|
1426
1426
|
fileSize: a,
|
|
1427
1427
|
thumbnailUrl: r
|
|
1428
1428
|
}) => {
|
|
1429
|
-
const i = ue(t), o = a !== void 0 ?
|
|
1429
|
+
const i = ue(t), o = a !== void 0 ? Rn(a) : void 0;
|
|
1430
1430
|
return /* @__PURE__ */ n(
|
|
1431
|
-
|
|
1431
|
+
An,
|
|
1432
1432
|
{
|
|
1433
1433
|
variant: "light",
|
|
1434
1434
|
title: s,
|
|
1435
1435
|
mimeType: t,
|
|
1436
1436
|
detail: o,
|
|
1437
1437
|
thumbnail: /* @__PURE__ */ n(
|
|
1438
|
-
|
|
1438
|
+
Tn,
|
|
1439
1439
|
{
|
|
1440
1440
|
mimeType: t,
|
|
1441
1441
|
sourceUrl: e,
|
|
@@ -1452,7 +1452,7 @@ const Rn = ({
|
|
|
1452
1452
|
message: e,
|
|
1453
1453
|
isMyMessage: t = !1
|
|
1454
1454
|
}) => {
|
|
1455
|
-
const s =
|
|
1455
|
+
const s = mt(e), a = ht(e);
|
|
1456
1456
|
return !s && !a ? null : /* @__PURE__ */ f("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: [
|
|
1457
1457
|
!t && e.user && /* @__PURE__ */ n(
|
|
1458
1458
|
ye,
|
|
@@ -1479,13 +1479,13 @@ const Rn = ({
|
|
|
1479
1479
|
overflow: "visible",
|
|
1480
1480
|
background: "transparent"
|
|
1481
1481
|
},
|
|
1482
|
-
children: s ? /* @__PURE__ */ n("div", { className:
|
|
1483
|
-
|
|
1482
|
+
children: s ? /* @__PURE__ */ n("div", { className: dt(t), children: /* @__PURE__ */ n(
|
|
1483
|
+
ut,
|
|
1484
1484
|
{
|
|
1485
1485
|
attachment: s,
|
|
1486
1486
|
isMyMessage: t
|
|
1487
1487
|
}
|
|
1488
|
-
) }) : t ? /* @__PURE__ */ n(
|
|
1488
|
+
) }) : t ? /* @__PURE__ */ n(Ln, { ...a }) : /* @__PURE__ */ n(Mn, { ...a })
|
|
1489
1489
|
}
|
|
1490
1490
|
) })
|
|
1491
1491
|
}
|
|
@@ -1494,19 +1494,19 @@ const Rn = ({
|
|
|
1494
1494
|
}, tr = ({
|
|
1495
1495
|
message: e
|
|
1496
1496
|
}) => {
|
|
1497
|
-
const t =
|
|
1497
|
+
const t = mt(e);
|
|
1498
1498
|
if (t)
|
|
1499
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1500
|
-
const s =
|
|
1501
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1499
|
+
return /* @__PURE__ */ n("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ut, { attachment: t, isMyMessage: !0 }) });
|
|
1500
|
+
const s = ht(e);
|
|
1501
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Ln, { ...s }) }) : null;
|
|
1502
1502
|
}, nr = ({
|
|
1503
1503
|
message: e
|
|
1504
1504
|
}) => {
|
|
1505
|
-
const t =
|
|
1505
|
+
const t = mt(e);
|
|
1506
1506
|
if (t)
|
|
1507
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1508
|
-
const s =
|
|
1509
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1507
|
+
return /* @__PURE__ */ n("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ut, { attachment: t, isMyMessage: !1 }) });
|
|
1508
|
+
const s = ht(e);
|
|
1509
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Mn, { ...s }) }) : null;
|
|
1510
1510
|
}, ao = Object.assign(er, {
|
|
1511
1511
|
Creator: tr,
|
|
1512
1512
|
Visitor: nr
|
|
@@ -1514,17 +1514,17 @@ const Rn = ({
|
|
|
1514
1514
|
isUnlocking: () => !1
|
|
1515
1515
|
}, ar = {
|
|
1516
1516
|
LockedAttachment: sr
|
|
1517
|
-
},
|
|
1517
|
+
}, Dn = Ve({}), ro = Dn.Provider;
|
|
1518
1518
|
function rr(e) {
|
|
1519
|
-
return we(
|
|
1519
|
+
return we(Dn)[e] ?? ar[e];
|
|
1520
1520
|
}
|
|
1521
|
-
const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import("./Card-
|
|
1521
|
+
const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import("./Card-DJ0YiWXB.js")), or = () => /* @__PURE__ */ n(
|
|
1522
1522
|
"div",
|
|
1523
1523
|
{
|
|
1524
1524
|
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)]",
|
|
1525
1525
|
"aria-hidden": !0
|
|
1526
1526
|
}
|
|
1527
|
-
), Fe = (e) => /* @__PURE__ */ n(
|
|
1527
|
+
), Fe = (e) => /* @__PURE__ */ n(cs, { fallback: /* @__PURE__ */ n(or, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ir, { ...e }) : /* @__PURE__ */ n(lr, { ...e }) }), cr = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1528
1528
|
"svg",
|
|
1529
1529
|
{
|
|
1530
1530
|
width: e,
|
|
@@ -1541,37 +1541,37 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1541
1541
|
}
|
|
1542
1542
|
)
|
|
1543
1543
|
}
|
|
1544
|
-
),
|
|
1544
|
+
), On = (e) => {
|
|
1545
1545
|
var t;
|
|
1546
1546
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.PAID;
|
|
1547
1547
|
}, $e = (e) => {
|
|
1548
1548
|
var t;
|
|
1549
1549
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.CHATBOT;
|
|
1550
|
-
},
|
|
1550
|
+
}, ft = (e) => {
|
|
1551
1551
|
var t;
|
|
1552
1552
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.ATTACHMENT;
|
|
1553
1553
|
}, dr = (e) => {
|
|
1554
1554
|
var t;
|
|
1555
|
-
return
|
|
1555
|
+
return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
1556
1556
|
}, ur = (e) => {
|
|
1557
1557
|
var t;
|
|
1558
|
-
return
|
|
1558
|
+
return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
1559
1559
|
}, mr = (e) => {
|
|
1560
1560
|
var t;
|
|
1561
|
-
return
|
|
1562
|
-
},
|
|
1561
|
+
return On(e) && !!((t = e.metadata) != null && t.amount_text);
|
|
1562
|
+
}, en = ({
|
|
1563
1563
|
message: e,
|
|
1564
1564
|
isMyMessage: t = !1,
|
|
1565
1565
|
hasAttachment: s = !1
|
|
1566
1566
|
}) => {
|
|
1567
1567
|
var m;
|
|
1568
|
-
const a =
|
|
1568
|
+
const a = On(e), r = $e(e);
|
|
1569
1569
|
if (!a && !r)
|
|
1570
1570
|
return null;
|
|
1571
1571
|
if (a) {
|
|
1572
1572
|
const g = (m = e.metadata) == null ? void 0 : m.amount_text;
|
|
1573
1573
|
return g ? /* @__PURE__ */ f("div", { className: "message-tag--paid inline-flex items-center gap-1 text-[12px] font-medium leading-[2] text-[#016630]", children: [
|
|
1574
|
-
/* @__PURE__ */ n(
|
|
1574
|
+
/* @__PURE__ */ n(ha, { size: 12 }),
|
|
1575
1575
|
/* @__PURE__ */ f("span", { children: [
|
|
1576
1576
|
"Delivered with ",
|
|
1577
1577
|
g,
|
|
@@ -1594,7 +1594,7 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1594
1594
|
] })
|
|
1595
1595
|
}
|
|
1596
1596
|
);
|
|
1597
|
-
},
|
|
1597
|
+
}, tn = `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%`, hr = {
|
|
1598
1598
|
me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
1599
1599
|
other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
1600
1600
|
}, Ue = ({ side: e }) => /* @__PURE__ */ n(
|
|
@@ -1608,11 +1608,11 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1608
1608
|
transform: e === "other" ? "scaleX(-1)" : void 0,
|
|
1609
1609
|
transformOrigin: "center",
|
|
1610
1610
|
backgroundColor: hr[e],
|
|
1611
|
-
WebkitMask:
|
|
1612
|
-
mask:
|
|
1611
|
+
WebkitMask: tn,
|
|
1612
|
+
mask: tn
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
-
),
|
|
1615
|
+
), Pn = Ve(
|
|
1616
1616
|
void 0
|
|
1617
1617
|
), fr = (e) => {
|
|
1618
1618
|
var s;
|
|
@@ -1650,7 +1650,7 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1650
1650
|
}, br = (e, t) => {
|
|
1651
1651
|
const s = gr(e, t), [a, r] = B(s);
|
|
1652
1652
|
return pr(a, s) ? a : (r(s), s);
|
|
1653
|
-
},
|
|
1653
|
+
}, Fn = (e) => {
|
|
1654
1654
|
var t;
|
|
1655
1655
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.TIP;
|
|
1656
1656
|
}, vr = ({ message: e }) => {
|
|
@@ -1670,7 +1670,7 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1670
1670
|
" tip!"
|
|
1671
1671
|
] })
|
|
1672
1672
|
] }) : null;
|
|
1673
|
-
},
|
|
1673
|
+
}, gt = () => {
|
|
1674
1674
|
const { message: e } = ge("SentMessageDeliveryStatus"), { messages: t } = _e("SentMessageDeliveryStatus"), s = (() => {
|
|
1675
1675
|
if (t)
|
|
1676
1676
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
@@ -1680,10 +1680,10 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1680
1680
|
}
|
|
1681
1681
|
})();
|
|
1682
1682
|
return e.id === s;
|
|
1683
|
-
}, ze = () =>
|
|
1684
|
-
/* @__PURE__ */ n(
|
|
1683
|
+
}, ze = () => gt() ? /* @__PURE__ */ f(q, { children: [
|
|
1684
|
+
/* @__PURE__ */ n(pa, { weight: "bold", "aria-hidden": "true" }),
|
|
1685
1685
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
1686
|
-
] }) : null, xr = () =>
|
|
1686
|
+
] }) : null, xr = () => gt() ? /* @__PURE__ */ f(q, { children: [
|
|
1687
1687
|
/* @__PURE__ */ n(
|
|
1688
1688
|
ve,
|
|
1689
1689
|
{
|
|
@@ -1698,7 +1698,7 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1698
1698
|
onOutboundClick: t
|
|
1699
1699
|
}) => {
|
|
1700
1700
|
const s = e.name || "Broadcast", r = /* @__PURE__ */ f(q, { children: [
|
|
1701
|
-
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1701
|
+
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ga, { weight: "fill" }) }),
|
|
1702
1702
|
/* @__PURE__ */ n(
|
|
1703
1703
|
"span",
|
|
1704
1704
|
{
|
|
@@ -1721,7 +1721,7 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1721
1721
|
}
|
|
1722
1722
|
) : r;
|
|
1723
1723
|
}, _r = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
1724
|
-
/* @__PURE__ */ n(
|
|
1724
|
+
/* @__PURE__ */ n(fa, { weight: "bold", "aria-hidden": "true" }),
|
|
1725
1725
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
1726
1726
|
] }), yr = ({
|
|
1727
1727
|
onOutboundClick: e,
|
|
@@ -1730,7 +1730,7 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1730
1730
|
var h;
|
|
1731
1731
|
const { isMyMessage: s, message: a, threadList: r } = ge(
|
|
1732
1732
|
"SentMessageDeliveryStatus"
|
|
1733
|
-
), i = s(), o =
|
|
1733
|
+
), i = s(), o = gt();
|
|
1734
1734
|
if (r)
|
|
1735
1735
|
return null;
|
|
1736
1736
|
if (a.status === "failed" && i && a.type !== "error")
|
|
@@ -1744,12 +1744,12 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1744
1744
|
onOutboundClick: e
|
|
1745
1745
|
}
|
|
1746
1746
|
) : null, u = mr(a) ? null : /* @__PURE__ */ n(
|
|
1747
|
-
|
|
1747
|
+
fs,
|
|
1748
1748
|
{
|
|
1749
1749
|
MessageSentStatus: ze,
|
|
1750
1750
|
MessageDeliveredStatus: ze,
|
|
1751
1751
|
MessageReadStatus: ze,
|
|
1752
|
-
MessageSendingStatus:
|
|
1752
|
+
MessageSendingStatus: Fn(a) ? ze : xr
|
|
1753
1753
|
}
|
|
1754
1754
|
);
|
|
1755
1755
|
return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
|
|
@@ -1758,7 +1758,7 @@ const ir = P.lazy(() => import("./Card-BzvDr-pU.js")), lr = P.lazy(() => import(
|
|
|
1758
1758
|
d
|
|
1759
1759
|
] }) : u;
|
|
1760
1760
|
}, Nr = /^([a-z][a-z0-9+.-]*):/i, kr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
1761
|
-
function
|
|
1761
|
+
function pt(e) {
|
|
1762
1762
|
if (typeof e != "string") return;
|
|
1763
1763
|
const t = e.trim();
|
|
1764
1764
|
if (t === "") return;
|
|
@@ -1778,7 +1778,7 @@ const Cr = {
|
|
|
1778
1778
|
primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
|
|
1779
1779
|
secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
|
|
1780
1780
|
}
|
|
1781
|
-
},
|
|
1781
|
+
}, zn = ({
|
|
1782
1782
|
variant: e,
|
|
1783
1783
|
cta: t,
|
|
1784
1784
|
fullWidth: s = !0,
|
|
@@ -1789,7 +1789,7 @@ const Cr = {
|
|
|
1789
1789
|
s ? "w-full" : "min-w-0",
|
|
1790
1790
|
!a && "mt-2",
|
|
1791
1791
|
Cr[e][r]
|
|
1792
|
-
), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l =
|
|
1792
|
+
), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = pt(t.href);
|
|
1793
1793
|
return l ? /* @__PURE__ */ n(
|
|
1794
1794
|
"a",
|
|
1795
1795
|
{
|
|
@@ -1818,13 +1818,13 @@ const Cr = {
|
|
|
1818
1818
|
}, Sr = {
|
|
1819
1819
|
dark: "text-white",
|
|
1820
1820
|
light: "text-black/90"
|
|
1821
|
-
}, Er = "text-white/30",
|
|
1821
|
+
}, Er = "text-white/30", nn = {
|
|
1822
1822
|
dark: "text-white/55",
|
|
1823
1823
|
light: "text-black/55"
|
|
1824
1824
|
}, Ir = {
|
|
1825
1825
|
dark: "bg-white/25",
|
|
1826
1826
|
light: "bg-black/15"
|
|
1827
|
-
},
|
|
1827
|
+
}, bt = ({
|
|
1828
1828
|
variant: e,
|
|
1829
1829
|
ctaSurface: t,
|
|
1830
1830
|
chinTextColor: s,
|
|
@@ -1846,11 +1846,11 @@ const Cr = {
|
|
|
1846
1846
|
s == null && (y ? Er : Sr[e])
|
|
1847
1847
|
), T = k(
|
|
1848
1848
|
"truncate text-[12px] leading-4 tracking-[0.24px]",
|
|
1849
|
-
s == null &&
|
|
1849
|
+
s == null && nn[e]
|
|
1850
1850
|
), A = k(
|
|
1851
1851
|
"text-[12px] leading-4 tracking-[0.24px]",
|
|
1852
1852
|
o <= 1 && "truncate",
|
|
1853
|
-
s == null &&
|
|
1853
|
+
s == null && nn[e]
|
|
1854
1854
|
);
|
|
1855
1855
|
if (m) {
|
|
1856
1856
|
const F = k(
|
|
@@ -1896,7 +1896,7 @@ const Cr = {
|
|
|
1896
1896
|
] }),
|
|
1897
1897
|
h && /* @__PURE__ */ n("div", { className: "shrink-0", children: h })
|
|
1898
1898
|
] }),
|
|
1899
|
-
u && /* @__PURE__ */ n(
|
|
1899
|
+
u && /* @__PURE__ */ n(zn, { variant: t ?? e, cta: u })
|
|
1900
1900
|
] });
|
|
1901
1901
|
}, Tr = "Loading link preview", Ar = k(
|
|
1902
1902
|
// Width is a channel-scoped token: default 290px, but a read-only surface with no
|
|
@@ -1998,17 +1998,17 @@ const Cr = {
|
|
|
1998
1998
|
]
|
|
1999
1999
|
}
|
|
2000
2000
|
);
|
|
2001
|
-
},
|
|
2001
|
+
}, sn = {
|
|
2002
2002
|
dark: "bg-white/10",
|
|
2003
2003
|
light: "bg-black/5"
|
|
2004
2004
|
}, Lr = {
|
|
2005
2005
|
dark: "size-16 text-white/25",
|
|
2006
2006
|
light: "size-16 text-black/25"
|
|
2007
|
-
}, Ae = (e, t) => !!t && !!e && ue(e) === "audio",
|
|
2007
|
+
}, Ae = (e, t) => !!t && !!e && ue(e) === "audio", vt = (e, t) => {
|
|
2008
2008
|
if (!t || !e) return !1;
|
|
2009
2009
|
const s = ue(e);
|
|
2010
2010
|
return s === "video" || s === "audio";
|
|
2011
|
-
},
|
|
2011
|
+
}, xt = "bg-[#F2F3F4]", Te = ({
|
|
2012
2012
|
variant: e,
|
|
2013
2013
|
thumbnailUrl: t,
|
|
2014
2014
|
sourceUrl: s,
|
|
@@ -2051,7 +2051,7 @@ const Cr = {
|
|
|
2051
2051
|
{
|
|
2052
2052
|
className: k(
|
|
2053
2053
|
"h-full w-full animate-pulse",
|
|
2054
|
-
|
|
2054
|
+
sn[e]
|
|
2055
2055
|
),
|
|
2056
2056
|
"aria-hidden": !0
|
|
2057
2057
|
}
|
|
@@ -2095,7 +2095,7 @@ const Cr = {
|
|
|
2095
2095
|
{
|
|
2096
2096
|
className: k(
|
|
2097
2097
|
"flex h-full w-full items-center justify-center",
|
|
2098
|
-
|
|
2098
|
+
sn[e]
|
|
2099
2099
|
),
|
|
2100
2100
|
children: xe(r, {
|
|
2101
2101
|
className: Lr[e],
|
|
@@ -2113,9 +2113,9 @@ function Dr(e) {
|
|
|
2113
2113
|
const t = e.trim();
|
|
2114
2114
|
return t.startsWith("#") ? t : `#${t}`;
|
|
2115
2115
|
}
|
|
2116
|
-
const Or = "#FFFFFF",
|
|
2116
|
+
const Or = "#FFFFFF", Bn = "#040403", Pr = {
|
|
2117
2117
|
dark: Or,
|
|
2118
|
-
light:
|
|
2118
|
+
light: Bn
|
|
2119
2119
|
};
|
|
2120
2120
|
function We({
|
|
2121
2121
|
variant: e,
|
|
@@ -2132,7 +2132,7 @@ function We({
|
|
|
2132
2132
|
}, [r]);
|
|
2133
2133
|
const u = P.useCallback(() => {
|
|
2134
2134
|
d(!0);
|
|
2135
|
-
}, []), h = Ae(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Mr.test(t.trim()) ? Dr(t) : void 0, b = h ?
|
|
2135
|
+
}, []), h = Ae(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Mr.test(t.trim()) ? Dr(t) : void 0, b = h ? Bn : Pr[e];
|
|
2136
2136
|
return {
|
|
2137
2137
|
thumbnailUrl: l ? void 0 : r,
|
|
2138
2138
|
accentHex: c,
|
|
@@ -2178,7 +2178,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2178
2178
|
Fr,
|
|
2179
2179
|
!x && zr
|
|
2180
2180
|
),
|
|
2181
|
-
children: /* @__PURE__ */ n(
|
|
2181
|
+
children: /* @__PURE__ */ n(ot, { className: "size-3", weight: "bold" })
|
|
2182
2182
|
}
|
|
2183
2183
|
) : void 0, _ = b ? /* @__PURE__ */ n(
|
|
2184
2184
|
"button",
|
|
@@ -2187,10 +2187,10 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2187
2187
|
onClick: b,
|
|
2188
2188
|
"aria-label": "Edit attachment",
|
|
2189
2189
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
2190
|
-
children: /* @__PURE__ */ n(
|
|
2190
|
+
children: /* @__PURE__ */ n(ba, { className: "size-5", weight: "regular" })
|
|
2191
2191
|
}
|
|
2192
2192
|
) : void 0;
|
|
2193
|
-
return x && !p.isLoading ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName:
|
|
2193
|
+
return x && !p.isLoading ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: xt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
2194
2194
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
|
|
2195
2195
|
Te,
|
|
2196
2196
|
{
|
|
@@ -2224,7 +2224,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2224
2224
|
}
|
|
2225
2225
|
),
|
|
2226
2226
|
/* @__PURE__ */ n(
|
|
2227
|
-
|
|
2227
|
+
bt,
|
|
2228
2228
|
{
|
|
2229
2229
|
chinTextColor: p.chinTextColor,
|
|
2230
2230
|
variant: "dark",
|
|
@@ -2243,7 +2243,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2243
2243
|
]
|
|
2244
2244
|
}
|
|
2245
2245
|
);
|
|
2246
|
-
},
|
|
2246
|
+
}, wt = ({
|
|
2247
2247
|
accentHex: e,
|
|
2248
2248
|
side: t,
|
|
2249
2249
|
visible: s,
|
|
@@ -2284,7 +2284,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2284
2284
|
onClick: g,
|
|
2285
2285
|
groupPosition: c = "single"
|
|
2286
2286
|
}) => {
|
|
2287
|
-
const b =
|
|
2287
|
+
const b = vt(r, o), w = pt(a), v = u == null && w != null && !b ? w : void 0, x = u == null && !b ? g : void 0, p = m !== "loading" && Ae(r, o) ? xt : void 0, y = u && g ? {
|
|
2288
2288
|
...u,
|
|
2289
2289
|
onClick: () => {
|
|
2290
2290
|
var T;
|
|
@@ -2300,7 +2300,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2300
2300
|
sourceUrl: o
|
|
2301
2301
|
});
|
|
2302
2302
|
return /* @__PURE__ */ n(
|
|
2303
|
-
|
|
2303
|
+
wt,
|
|
2304
2304
|
{
|
|
2305
2305
|
accentHex: _.accentHex,
|
|
2306
2306
|
side: "receiver",
|
|
@@ -2331,7 +2331,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2331
2331
|
}
|
|
2332
2332
|
),
|
|
2333
2333
|
/* @__PURE__ */ n(
|
|
2334
|
-
|
|
2334
|
+
bt,
|
|
2335
2335
|
{
|
|
2336
2336
|
chinTextColor: _.chinTextColor,
|
|
2337
2337
|
variant: "light",
|
|
@@ -2367,7 +2367,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2367
2367
|
onClick: c,
|
|
2368
2368
|
groupPosition: b = "single"
|
|
2369
2369
|
}) => {
|
|
2370
|
-
const w =
|
|
2370
|
+
const w = vt(i, l), v = pt(r), x = h == null && v != null && !w ? v : void 0, p = h == null && !w && x != null ? c : void 0, y = g !== "loading" && Ae(i, l), _ = We({
|
|
2371
2371
|
variant: "dark",
|
|
2372
2372
|
accentColor: m,
|
|
2373
2373
|
status: g,
|
|
@@ -2377,7 +2377,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2377
2377
|
sourceUrl: l
|
|
2378
2378
|
});
|
|
2379
2379
|
return /* @__PURE__ */ n(
|
|
2380
|
-
|
|
2380
|
+
wt,
|
|
2381
2381
|
{
|
|
2382
2382
|
accentHex: _.accentHex,
|
|
2383
2383
|
side: "sender",
|
|
@@ -2391,7 +2391,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2391
2391
|
fixedHeight: d === "featured" && !y,
|
|
2392
2392
|
accentHex: _.accentHex,
|
|
2393
2393
|
busy: _.isLoading,
|
|
2394
|
-
bgClassName: y ?
|
|
2394
|
+
bgClassName: y ? xt : void 0,
|
|
2395
2395
|
children: [
|
|
2396
2396
|
d === "featured" && /* @__PURE__ */ n(
|
|
2397
2397
|
Te,
|
|
@@ -2406,7 +2406,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2406
2406
|
}
|
|
2407
2407
|
),
|
|
2408
2408
|
/* @__PURE__ */ n(
|
|
2409
|
-
|
|
2409
|
+
bt,
|
|
2410
2410
|
{
|
|
2411
2411
|
chinTextColor: _.chinTextColor,
|
|
2412
2412
|
variant: "dark",
|
|
@@ -2426,7 +2426,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2426
2426
|
)
|
|
2427
2427
|
}
|
|
2428
2428
|
);
|
|
2429
|
-
},
|
|
2429
|
+
}, lt = {
|
|
2430
2430
|
Composer: Br,
|
|
2431
2431
|
Sent: Ur,
|
|
2432
2432
|
Received: $r
|
|
@@ -2540,7 +2540,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2540
2540
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
2541
2541
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
2542
2542
|
),
|
|
2543
|
-
children: /* @__PURE__ */ n(
|
|
2543
|
+
children: /* @__PURE__ */ n(ot, { className: "size-3", weight: "bold" })
|
|
2544
2544
|
}
|
|
2545
2545
|
), Me = (e) => e === "received" ? "light" : "dark", io = ({
|
|
2546
2546
|
firstOfGroup: e,
|
|
@@ -2563,7 +2563,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2563
2563
|
}
|
|
2564
2564
|
),
|
|
2565
2565
|
s ?? null
|
|
2566
|
-
] }),
|
|
2566
|
+
] }), _t = ({
|
|
2567
2567
|
state: e,
|
|
2568
2568
|
src: t,
|
|
2569
2569
|
mimeType: s,
|
|
@@ -2600,7 +2600,7 @@ const Fr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2600
2600
|
)) })
|
|
2601
2601
|
}
|
|
2602
2602
|
);
|
|
2603
|
-
}, Xr = (e) => /* @__PURE__ */ n(
|
|
2603
|
+
}, Xr = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), qr = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), Jr = {
|
|
2604
2604
|
Composer: Xr,
|
|
2605
2605
|
Sent: qr,
|
|
2606
2606
|
Received: Zr
|
|
@@ -2628,7 +2628,7 @@ function ti(e, t) {
|
|
|
2628
2628
|
}
|
|
2629
2629
|
if (!e) return;
|
|
2630
2630
|
if (ue(e) === "document") {
|
|
2631
|
-
const r =
|
|
2631
|
+
const r = In(e), i = ei[r];
|
|
2632
2632
|
if (i) return i;
|
|
2633
2633
|
if (e === "application/octet-stream") return;
|
|
2634
2634
|
}
|
|
@@ -2657,7 +2657,7 @@ const si = {
|
|
|
2657
2657
|
}, ri = {
|
|
2658
2658
|
dark: "text-white/85",
|
|
2659
2659
|
light: "text-black/85"
|
|
2660
|
-
},
|
|
2660
|
+
}, $n = ({
|
|
2661
2661
|
variant: e,
|
|
2662
2662
|
filename: t,
|
|
2663
2663
|
title: s,
|
|
@@ -2716,7 +2716,7 @@ const si = {
|
|
|
2716
2716
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
2717
2717
|
] });
|
|
2718
2718
|
};
|
|
2719
|
-
async function
|
|
2719
|
+
async function Un(e, t) {
|
|
2720
2720
|
const s = t ?? re(e);
|
|
2721
2721
|
try {
|
|
2722
2722
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -2746,7 +2746,7 @@ const ii = ({
|
|
|
2746
2746
|
}) => {
|
|
2747
2747
|
const i = t.filename ?? re(t.src);
|
|
2748
2748
|
return /* @__PURE__ */ n(
|
|
2749
|
-
|
|
2749
|
+
$n,
|
|
2750
2750
|
{
|
|
2751
2751
|
variant: e,
|
|
2752
2752
|
filename: i,
|
|
@@ -2758,7 +2758,7 @@ const ii = ({
|
|
|
2758
2758
|
trailingAction: r
|
|
2759
2759
|
}
|
|
2760
2760
|
);
|
|
2761
|
-
},
|
|
2761
|
+
}, yt = ({
|
|
2762
2762
|
state: e,
|
|
2763
2763
|
src: t,
|
|
2764
2764
|
filename: s,
|
|
@@ -2783,7 +2783,7 @@ const ii = ({
|
|
|
2783
2783
|
const x = c[v];
|
|
2784
2784
|
if (!x) return;
|
|
2785
2785
|
const p = x.filename ?? re(x.src);
|
|
2786
|
-
|
|
2786
|
+
Un(x.src, p);
|
|
2787
2787
|
};
|
|
2788
2788
|
if (c.length === 0)
|
|
2789
2789
|
return null;
|
|
@@ -2818,11 +2818,11 @@ const ii = ({
|
|
|
2818
2818
|
)) })
|
|
2819
2819
|
}
|
|
2820
2820
|
);
|
|
2821
|
-
}, oi = (e) => /* @__PURE__ */ n(
|
|
2821
|
+
}, oi = (e) => /* @__PURE__ */ n(yt, { ...e, state: "composer" }), ci = (e) => /* @__PURE__ */ n(yt, { ...e, state: "sent" }), di = (e) => /* @__PURE__ */ n(yt, { ...e, state: "received" }), ui = {
|
|
2822
2822
|
Composer: oi,
|
|
2823
2823
|
Sent: ci,
|
|
2824
2824
|
Received: di
|
|
2825
|
-
},
|
|
2825
|
+
}, jn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", an = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", Nt = ({
|
|
2826
2826
|
onPrev: e,
|
|
2827
2827
|
onNext: t,
|
|
2828
2828
|
prevLabel: s = "Previous",
|
|
@@ -2834,8 +2834,8 @@ const ii = ({
|
|
|
2834
2834
|
type: "button",
|
|
2835
2835
|
onClick: e,
|
|
2836
2836
|
"aria-label": s,
|
|
2837
|
-
className: `${
|
|
2838
|
-
children: /* @__PURE__ */ n(
|
|
2837
|
+
className: `${an} left-4`,
|
|
2838
|
+
children: /* @__PURE__ */ n(va, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2839
2839
|
}
|
|
2840
2840
|
),
|
|
2841
2841
|
/* @__PURE__ */ n(
|
|
@@ -2844,11 +2844,11 @@ const ii = ({
|
|
|
2844
2844
|
type: "button",
|
|
2845
2845
|
onClick: t,
|
|
2846
2846
|
"aria-label": a,
|
|
2847
|
-
className: `${
|
|
2848
|
-
children: /* @__PURE__ */ n(
|
|
2847
|
+
className: `${an} right-4`,
|
|
2848
|
+
children: /* @__PURE__ */ n(vn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2849
2849
|
}
|
|
2850
2850
|
)
|
|
2851
|
-
] }),
|
|
2851
|
+
] }), Hn = ({
|
|
2852
2852
|
url: e,
|
|
2853
2853
|
filename: t,
|
|
2854
2854
|
variant: s = "pill",
|
|
@@ -2859,7 +2859,7 @@ const ii = ({
|
|
|
2859
2859
|
}) => {
|
|
2860
2860
|
const [l, d] = B(!1), u = X(
|
|
2861
2861
|
(c) => {
|
|
2862
|
-
c.stopPropagation(), !l && (d(!0),
|
|
2862
|
+
c.stopPropagation(), !l && (d(!0), Un(e, t).catch(() => {
|
|
2863
2863
|
}).finally(() => {
|
|
2864
2864
|
d(!1), o == null || o();
|
|
2865
2865
|
}));
|
|
@@ -2906,7 +2906,7 @@ const ii = ({
|
|
|
2906
2906
|
onClick: u,
|
|
2907
2907
|
disabled: l,
|
|
2908
2908
|
"aria-label": a,
|
|
2909
|
-
className:
|
|
2909
|
+
className: jn,
|
|
2910
2910
|
children: l ? /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ee, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2911
2911
|
}
|
|
2912
2912
|
) : /* @__PURE__ */ f(
|
|
@@ -2933,16 +2933,16 @@ const ii = ({
|
|
|
2933
2933
|
]
|
|
2934
2934
|
}
|
|
2935
2935
|
);
|
|
2936
|
-
},
|
|
2936
|
+
}, et = (e, t, s) => Math.min(Math.max(e, t), s), kt = ({
|
|
2937
2937
|
length: e,
|
|
2938
2938
|
initialIndex: t,
|
|
2939
2939
|
open: s
|
|
2940
2940
|
}) => {
|
|
2941
|
-
const a =
|
|
2941
|
+
const a = et(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
|
|
2942
2942
|
K(() => {
|
|
2943
|
-
s && i(
|
|
2943
|
+
s && i(et(t, 0, Math.max(e - 1, 0)));
|
|
2944
2944
|
}, [s, t, e]), K(() => {
|
|
2945
|
-
i((d) =>
|
|
2945
|
+
i((d) => et(d, 0, Math.max(e - 1, 0)));
|
|
2946
2946
|
}, [e]);
|
|
2947
2947
|
const o = X(() => {
|
|
2948
2948
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
@@ -2958,7 +2958,7 @@ const ii = ({
|
|
|
2958
2958
|
};
|
|
2959
2959
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2960
2960
|
}, [s, e, o, l]), { index: r, prev: o, next: l };
|
|
2961
|
-
},
|
|
2961
|
+
}, Ct = ({
|
|
2962
2962
|
open: e,
|
|
2963
2963
|
onClose: t,
|
|
2964
2964
|
ariaLabel: s,
|
|
@@ -3038,8 +3038,8 @@ const ii = ({
|
|
|
3038
3038
|
type: "button",
|
|
3039
3039
|
onClick: t,
|
|
3040
3040
|
"aria-label": "Close viewer",
|
|
3041
|
-
className:
|
|
3042
|
-
children: /* @__PURE__ */ n(
|
|
3041
|
+
className: jn,
|
|
3042
|
+
children: /* @__PURE__ */ n(ot, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3043
3043
|
}
|
|
3044
3044
|
)
|
|
3045
3045
|
] })
|
|
@@ -3048,13 +3048,13 @@ const ii = ({
|
|
|
3048
3048
|
]
|
|
3049
3049
|
}
|
|
3050
3050
|
);
|
|
3051
|
-
},
|
|
3051
|
+
}, Vn = ({
|
|
3052
3052
|
open: e,
|
|
3053
3053
|
items: t,
|
|
3054
3054
|
initialIndex: s = 0,
|
|
3055
3055
|
onClose: a
|
|
3056
3056
|
}) => {
|
|
3057
|
-
const { index: r, prev: i, next: o } =
|
|
3057
|
+
const { index: r, prev: i, next: o } = kt({
|
|
3058
3058
|
length: t.length,
|
|
3059
3059
|
initialIndex: s,
|
|
3060
3060
|
open: e
|
|
@@ -3063,14 +3063,14 @@ const ii = ({
|
|
|
3063
3063
|
[l]
|
|
3064
3064
|
);
|
|
3065
3065
|
return l ? /* @__PURE__ */ f(
|
|
3066
|
-
|
|
3066
|
+
Ct,
|
|
3067
3067
|
{
|
|
3068
3068
|
open: e,
|
|
3069
3069
|
onClose: a,
|
|
3070
3070
|
ariaLabel: d,
|
|
3071
3071
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3072
3072
|
actions: /* @__PURE__ */ n(
|
|
3073
|
-
|
|
3073
|
+
Hn,
|
|
3074
3074
|
{
|
|
3075
3075
|
url: l.src,
|
|
3076
3076
|
filename: d,
|
|
@@ -3092,7 +3092,7 @@ const ii = ({
|
|
|
3092
3092
|
`${r}:${l.src}`
|
|
3093
3093
|
) : null,
|
|
3094
3094
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3095
|
-
|
|
3095
|
+
Nt,
|
|
3096
3096
|
{
|
|
3097
3097
|
onPrev: i,
|
|
3098
3098
|
onNext: o,
|
|
@@ -3113,7 +3113,7 @@ const ii = ({
|
|
|
3113
3113
|
"rounded-bl-[18px]",
|
|
3114
3114
|
"rounded-br-[18px]"
|
|
3115
3115
|
]
|
|
3116
|
-
}, fi = "--mes-single-width-cap", gi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", pi = 436,
|
|
3116
|
+
}, fi = "--mes-single-width-cap", gi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", pi = 436, Gn = ({
|
|
3117
3117
|
tiles: e,
|
|
3118
3118
|
onTileActivate: t,
|
|
3119
3119
|
maxVisible: s = 4,
|
|
@@ -3254,7 +3254,7 @@ const ii = ({
|
|
|
3254
3254
|
src: e,
|
|
3255
3255
|
alt: t,
|
|
3256
3256
|
items: s
|
|
3257
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
3257
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Yn = (e, t) => e.map((s, a) => ({
|
|
3258
3258
|
src: s.src,
|
|
3259
3259
|
alt: s.alt,
|
|
3260
3260
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
@@ -3283,10 +3283,10 @@ const ii = ({
|
|
|
3283
3283
|
),
|
|
3284
3284
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Le, { onClick: i }) }) : null,
|
|
3285
3285
|
/* @__PURE__ */ n(
|
|
3286
|
-
|
|
3286
|
+
Vn,
|
|
3287
3287
|
{
|
|
3288
3288
|
open: o,
|
|
3289
|
-
items:
|
|
3289
|
+
items: Yn([{ src: e, alt: t }], s),
|
|
3290
3290
|
initialIndex: l,
|
|
3291
3291
|
onClose: u
|
|
3292
3292
|
}
|
|
@@ -3311,7 +3311,7 @@ const ii = ({
|
|
|
3311
3311
|
imgRef: r,
|
|
3312
3312
|
onLoad: i
|
|
3313
3313
|
};
|
|
3314
|
-
},
|
|
3314
|
+
}, Wn = ({
|
|
3315
3315
|
state: e,
|
|
3316
3316
|
src: t,
|
|
3317
3317
|
alt: s,
|
|
@@ -3348,7 +3348,7 @@ const ii = ({
|
|
|
3348
3348
|
"data-testid": "image-attachment",
|
|
3349
3349
|
children: [
|
|
3350
3350
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
3351
|
-
|
|
3351
|
+
Gn,
|
|
3352
3352
|
{
|
|
3353
3353
|
tiles: x,
|
|
3354
3354
|
onTileActivate: c,
|
|
@@ -3356,10 +3356,10 @@ const ii = ({
|
|
|
3356
3356
|
}
|
|
3357
3357
|
) }),
|
|
3358
3358
|
/* @__PURE__ */ n(
|
|
3359
|
-
|
|
3359
|
+
Vn,
|
|
3360
3360
|
{
|
|
3361
3361
|
open: m,
|
|
3362
|
-
items:
|
|
3362
|
+
items: Yn(u, a),
|
|
3363
3363
|
initialIndex: g,
|
|
3364
3364
|
onClose: b
|
|
3365
3365
|
}
|
|
@@ -3367,7 +3367,7 @@ const ii = ({
|
|
|
3367
3367
|
]
|
|
3368
3368
|
}
|
|
3369
3369
|
);
|
|
3370
|
-
}, yi = (e) => /* @__PURE__ */ n(xi, { ...e }), Ni = (e) => /* @__PURE__ */ n(
|
|
3370
|
+
}, yi = (e) => /* @__PURE__ */ n(xi, { ...e }), Ni = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "sent" }), ki = (e) => /* @__PURE__ */ n(Wn, { ...e, state: "received" }), Ci = {
|
|
3371
3371
|
Composer: yi,
|
|
3372
3372
|
Sent: Ni,
|
|
3373
3373
|
Received: ki
|
|
@@ -3377,7 +3377,7 @@ const ii = ({
|
|
|
3377
3377
|
initialIndex: s = 0,
|
|
3378
3378
|
onClose: a
|
|
3379
3379
|
}) => {
|
|
3380
|
-
const { index: r, prev: i, next: o } =
|
|
3380
|
+
const { index: r, prev: i, next: o } = kt({
|
|
3381
3381
|
length: t.length,
|
|
3382
3382
|
initialIndex: s,
|
|
3383
3383
|
open: e
|
|
@@ -3389,7 +3389,7 @@ const ii = ({
|
|
|
3389
3389
|
[l]
|
|
3390
3390
|
);
|
|
3391
3391
|
return !l || !u ? null : /* @__PURE__ */ f(
|
|
3392
|
-
|
|
3392
|
+
Ct,
|
|
3393
3393
|
{
|
|
3394
3394
|
open: e,
|
|
3395
3395
|
onClose: a,
|
|
@@ -3408,7 +3408,7 @@ const ii = ({
|
|
|
3408
3408
|
`${r}:${l.src}`
|
|
3409
3409
|
),
|
|
3410
3410
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3411
|
-
|
|
3411
|
+
Nt,
|
|
3412
3412
|
{
|
|
3413
3413
|
onPrev: i,
|
|
3414
3414
|
onNext: o,
|
|
@@ -3437,7 +3437,7 @@ const ii = ({
|
|
|
3437
3437
|
}) => {
|
|
3438
3438
|
const i = t.filename ?? re(t.src);
|
|
3439
3439
|
return /* @__PURE__ */ n(
|
|
3440
|
-
|
|
3440
|
+
$n,
|
|
3441
3441
|
{
|
|
3442
3442
|
variant: e,
|
|
3443
3443
|
filename: i,
|
|
@@ -3449,7 +3449,7 @@ const ii = ({
|
|
|
3449
3449
|
trailingAction: r
|
|
3450
3450
|
}
|
|
3451
3451
|
);
|
|
3452
|
-
},
|
|
3452
|
+
}, St = ({
|
|
3453
3453
|
state: e,
|
|
3454
3454
|
src: t,
|
|
3455
3455
|
filename: s,
|
|
@@ -3478,7 +3478,7 @@ const ii = ({
|
|
|
3478
3478
|
children: [
|
|
3479
3479
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((p, y) => {
|
|
3480
3480
|
const _ = p.filename ?? re(p.src), T = v && y === 0 ? /* @__PURE__ */ n(Le, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
3481
|
-
|
|
3481
|
+
Hn,
|
|
3482
3482
|
{
|
|
3483
3483
|
url: p.src,
|
|
3484
3484
|
filename: _,
|
|
@@ -3511,17 +3511,17 @@ const ii = ({
|
|
|
3511
3511
|
]
|
|
3512
3512
|
}
|
|
3513
3513
|
);
|
|
3514
|
-
}, Ai = (e) => /* @__PURE__ */ n(
|
|
3514
|
+
}, Ai = (e) => /* @__PURE__ */ n(St, { ...e, state: "composer" }), Ri = (e) => /* @__PURE__ */ n(St, { ...e, state: "sent" }), Li = (e) => /* @__PURE__ */ n(St, { ...e, state: "received" }), Mi = {
|
|
3515
3515
|
Composer: Ai,
|
|
3516
3516
|
Sent: Ri,
|
|
3517
3517
|
Received: Li
|
|
3518
|
-
},
|
|
3518
|
+
}, Kn = ({
|
|
3519
3519
|
open: e,
|
|
3520
3520
|
items: t,
|
|
3521
3521
|
initialIndex: s = 0,
|
|
3522
3522
|
onClose: a
|
|
3523
3523
|
}) => {
|
|
3524
|
-
const { index: r, prev: i, next: o } =
|
|
3524
|
+
const { index: r, prev: i, next: o } = kt({
|
|
3525
3525
|
length: t.length,
|
|
3526
3526
|
initialIndex: s,
|
|
3527
3527
|
open: e
|
|
@@ -3530,7 +3530,7 @@ const ii = ({
|
|
|
3530
3530
|
[l]
|
|
3531
3531
|
);
|
|
3532
3532
|
return l ? /* @__PURE__ */ f(
|
|
3533
|
-
|
|
3533
|
+
Ct,
|
|
3534
3534
|
{
|
|
3535
3535
|
open: e,
|
|
3536
3536
|
onClose: a,
|
|
@@ -3554,7 +3554,7 @@ const ii = ({
|
|
|
3554
3554
|
`${r}:${l.src}`
|
|
3555
3555
|
),
|
|
3556
3556
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3557
|
-
|
|
3557
|
+
Nt,
|
|
3558
3558
|
{
|
|
3559
3559
|
onPrev: i,
|
|
3560
3560
|
onNext: o,
|
|
@@ -3565,7 +3565,7 @@ const ii = ({
|
|
|
3565
3565
|
]
|
|
3566
3566
|
}
|
|
3567
3567
|
) : null;
|
|
3568
|
-
}, Di = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(
|
|
3568
|
+
}, Di = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(it, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Xn = ({
|
|
3569
3569
|
item: e,
|
|
3570
3570
|
index: t
|
|
3571
3571
|
}) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -3580,7 +3580,7 @@ const ii = ({
|
|
|
3580
3580
|
className: "absolute inset-0 size-full object-cover"
|
|
3581
3581
|
}
|
|
3582
3582
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
3583
|
-
|
|
3583
|
+
wn,
|
|
3584
3584
|
{
|
|
3585
3585
|
className: "size-16 text-white/30",
|
|
3586
3586
|
weight: "regular",
|
|
@@ -3590,14 +3590,14 @@ const ii = ({
|
|
|
3590
3590
|
/* @__PURE__ */ n(Di, {})
|
|
3591
3591
|
] }), Oi = (e, t, s) => ({
|
|
3592
3592
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
3593
|
-
content: /* @__PURE__ */ n(
|
|
3593
|
+
content: /* @__PURE__ */ n(Xn, { item: e, index: t })
|
|
3594
3594
|
}), Pi = ({
|
|
3595
3595
|
src: e,
|
|
3596
3596
|
poster: t,
|
|
3597
3597
|
mimeType: s,
|
|
3598
3598
|
preload: a,
|
|
3599
3599
|
items: r
|
|
3600
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
3600
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], qn = (e, t) => e.map((s, a) => ({
|
|
3601
3601
|
src: s.src,
|
|
3602
3602
|
poster: s.poster,
|
|
3603
3603
|
mimeType: s.mimeType,
|
|
@@ -3613,21 +3613,21 @@ const ii = ({
|
|
|
3613
3613
|
onClick: () => u(0),
|
|
3614
3614
|
"aria-label": "Play video",
|
|
3615
3615
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
3616
|
-
children: /* @__PURE__ */ n(
|
|
3616
|
+
children: /* @__PURE__ */ n(Xn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
3617
3617
|
}
|
|
3618
3618
|
),
|
|
3619
3619
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Le, { onClick: o }) }) : null,
|
|
3620
3620
|
/* @__PURE__ */ n(
|
|
3621
|
-
|
|
3621
|
+
Kn,
|
|
3622
3622
|
{
|
|
3623
3623
|
open: l,
|
|
3624
|
-
items:
|
|
3624
|
+
items: qn([{ src: e, poster: t, mimeType: s, preload: r }], a),
|
|
3625
3625
|
initialIndex: d,
|
|
3626
3626
|
onClose: h
|
|
3627
3627
|
}
|
|
3628
3628
|
)
|
|
3629
3629
|
] });
|
|
3630
|
-
},
|
|
3630
|
+
}, Zn = ({
|
|
3631
3631
|
state: e,
|
|
3632
3632
|
src: t,
|
|
3633
3633
|
poster: s,
|
|
@@ -3653,12 +3653,12 @@ const ii = ({
|
|
|
3653
3653
|
groupPosition: l,
|
|
3654
3654
|
"data-testid": "video-attachment",
|
|
3655
3655
|
children: [
|
|
3656
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
3656
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Gn, { tiles: v, onTileActivate: b }) }),
|
|
3657
3657
|
/* @__PURE__ */ n(
|
|
3658
|
-
|
|
3658
|
+
Kn,
|
|
3659
3659
|
{
|
|
3660
3660
|
open: g,
|
|
3661
|
-
items:
|
|
3661
|
+
items: qn(h, r),
|
|
3662
3662
|
initialIndex: c,
|
|
3663
3663
|
onClose: w
|
|
3664
3664
|
}
|
|
@@ -3666,7 +3666,7 @@ const ii = ({
|
|
|
3666
3666
|
]
|
|
3667
3667
|
}
|
|
3668
3668
|
);
|
|
3669
|
-
}, zi = (e) => /* @__PURE__ */ n(Fi, { ...e }), Bi = (e) => /* @__PURE__ */ n(
|
|
3669
|
+
}, zi = (e) => /* @__PURE__ */ n(Fi, { ...e }), Bi = (e) => /* @__PURE__ */ n(Zn, { ...e, state: "sent" }), $i = (e) => /* @__PURE__ */ n(Zn, { ...e, state: "received" }), Ui = {
|
|
3670
3670
|
Composer: zi,
|
|
3671
3671
|
Sent: Bi,
|
|
3672
3672
|
Received: $i
|
|
@@ -3681,13 +3681,13 @@ function H(e) {
|
|
|
3681
3681
|
const t = e == null ? void 0 : e.trim();
|
|
3682
3682
|
return t || void 0;
|
|
3683
3683
|
}
|
|
3684
|
-
function
|
|
3684
|
+
function rn(e) {
|
|
3685
3685
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3686
3686
|
}
|
|
3687
3687
|
function ji(e, t) {
|
|
3688
3688
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3689
3689
|
return !1;
|
|
3690
|
-
const s =
|
|
3690
|
+
const s = rn(e), a = rn(t);
|
|
3691
3691
|
if (s === a)
|
|
3692
3692
|
return !0;
|
|
3693
3693
|
if (!s.includes(a))
|
|
@@ -3695,7 +3695,7 @@ function ji(e, t) {
|
|
|
3695
3695
|
const r = s.split(a).join("");
|
|
3696
3696
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3697
3697
|
}
|
|
3698
|
-
function
|
|
3698
|
+
function ln(e) {
|
|
3699
3699
|
const t = H(e.og_scrape_url) ?? H(e.title_link), s = H(e.image_url) ?? H(e.thumb_url), a = H(e.asset_url), r = H(e.mime_type);
|
|
3700
3700
|
return {
|
|
3701
3701
|
title: H(e.title),
|
|
@@ -3705,7 +3705,7 @@ function rn(e) {
|
|
|
3705
3705
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3706
3706
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3707
3707
|
sourceUrl: a,
|
|
3708
|
-
layout: s ||
|
|
3708
|
+
layout: s || vt(r, a) ? "featured" : "classic",
|
|
3709
3709
|
mimeType: r,
|
|
3710
3710
|
// Dominant colour of the image, resolved by the sender at stage time and
|
|
3711
3711
|
// persisted on the attachment (`stream-custom-data.ts`), so every viewer
|
|
@@ -3721,7 +3721,7 @@ function Hi(e) {
|
|
|
3721
3721
|
var t;
|
|
3722
3722
|
return Ye(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;
|
|
3723
3723
|
}
|
|
3724
|
-
function
|
|
3724
|
+
function Jn(e) {
|
|
3725
3725
|
if (!(e != null && e.length)) return [];
|
|
3726
3726
|
const t = [], s = (r, i) => {
|
|
3727
3727
|
const o = t[t.length - 1];
|
|
@@ -3771,7 +3771,7 @@ function Wi(e) {
|
|
|
3771
3771
|
return Ce.File;
|
|
3772
3772
|
}
|
|
3773
3773
|
}
|
|
3774
|
-
function
|
|
3774
|
+
function on(e, t) {
|
|
3775
3775
|
switch (e) {
|
|
3776
3776
|
case "image":
|
|
3777
3777
|
return {
|
|
@@ -3811,11 +3811,11 @@ function Ki(e, t) {
|
|
|
3811
3811
|
if (t.length > 1)
|
|
3812
3812
|
return {
|
|
3813
3813
|
items: t.map(
|
|
3814
|
-
(a) =>
|
|
3814
|
+
(a) => on(e, a)
|
|
3815
3815
|
)
|
|
3816
3816
|
};
|
|
3817
3817
|
const s = t[0];
|
|
3818
|
-
return s ?
|
|
3818
|
+
return s ? on(e, s) : {};
|
|
3819
3819
|
}
|
|
3820
3820
|
function Xi({
|
|
3821
3821
|
groupPosition: e,
|
|
@@ -3835,17 +3835,17 @@ const qi = ({
|
|
|
3835
3835
|
renderText: a
|
|
3836
3836
|
}) => {
|
|
3837
3837
|
var v;
|
|
3838
|
-
const r =
|
|
3838
|
+
const r = Jn(s.attachments);
|
|
3839
3839
|
if (r.length === 0) return null;
|
|
3840
|
-
const i = Vi(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ?
|
|
3840
|
+
const i = Vi(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ln(l.attachments[0] ?? {}).url : void 0, u = o && ji(o, d) ? void 0 : o;
|
|
3841
3841
|
let h = 0;
|
|
3842
3842
|
const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", b = (x, p, y) => {
|
|
3843
|
-
const _ = t ?
|
|
3843
|
+
const _ = t ? lt.Sent : lt.Received;
|
|
3844
3844
|
m.push(
|
|
3845
3845
|
/* @__PURE__ */ n(
|
|
3846
3846
|
_,
|
|
3847
3847
|
{
|
|
3848
|
-
...
|
|
3848
|
+
...ln(x),
|
|
3849
3849
|
groupPosition: y ? g : "middle"
|
|
3850
3850
|
},
|
|
3851
3851
|
p
|
|
@@ -3896,7 +3896,7 @@ const qi = ({
|
|
|
3896
3896
|
},
|
|
3897
3897
|
children: [
|
|
3898
3898
|
m,
|
|
3899
|
-
!u && /* @__PURE__ */ n(
|
|
3899
|
+
!u && /* @__PURE__ */ n(at, {})
|
|
3900
3900
|
]
|
|
3901
3901
|
}
|
|
3902
3902
|
),
|
|
@@ -3908,14 +3908,14 @@ const qi = ({
|
|
|
3908
3908
|
}),
|
|
3909
3909
|
children: [
|
|
3910
3910
|
/* @__PURE__ */ n(Be, { message: s, renderText: a }),
|
|
3911
|
-
/* @__PURE__ */ n(
|
|
3911
|
+
/* @__PURE__ */ n(at, {}),
|
|
3912
3912
|
c && /* @__PURE__ */ n(Ue, { side: t ? "me" : "other" })
|
|
3913
3913
|
]
|
|
3914
3914
|
}
|
|
3915
3915
|
) : null
|
|
3916
3916
|
] });
|
|
3917
3917
|
}, Zi = (e) => {
|
|
3918
|
-
var
|
|
3918
|
+
var Mt, Dt, Ot, Pt, Ft, zt, Bt, $t, Ut, jt, Ht;
|
|
3919
3919
|
const {
|
|
3920
3920
|
additionalMessageInputProps: t,
|
|
3921
3921
|
editing: s,
|
|
@@ -3935,46 +3935,46 @@ const qi = ({
|
|
|
3935
3935
|
viewerLanguage: v,
|
|
3936
3936
|
onOutboundClick: x,
|
|
3937
3937
|
resolvedOutbound: p
|
|
3938
|
-
} = e, { client: y } = Ge("CustomMessage"), { channel: _ } = _e("CustomMessage"), { isUnlocking: T, onUnlockClick: A, onFetchSource: R, onDownloadClick: z } = rr("LockedAttachment"), [F, L] = B(!1), E =
|
|
3939
|
-
Attachment: D =
|
|
3940
|
-
EditMessageModal: I =
|
|
3938
|
+
} = e, { client: y } = Ge("CustomMessage"), { channel: _ } = _e("CustomMessage"), { isUnlocking: T, onUnlockClick: A, onFetchSource: R, onDownloadClick: z } = rr("LockedAttachment"), [F, L] = B(!1), E = ps(c.id), {
|
|
3939
|
+
Attachment: D = bs,
|
|
3940
|
+
EditMessageModal: I = vs,
|
|
3941
3941
|
MessageActions: C,
|
|
3942
|
-
MessageBlocked: S =
|
|
3943
|
-
MessageBouncePrompt: O =
|
|
3944
|
-
MessageDeleted: U =
|
|
3945
|
-
MessageIsThreadReplyInChannelButtonIndicator: j =
|
|
3946
|
-
MessageRepliesCountButton: J =
|
|
3947
|
-
ReminderNotification: Z =
|
|
3948
|
-
StreamedMessageText: Q =
|
|
3942
|
+
MessageBlocked: S = xs,
|
|
3943
|
+
MessageBouncePrompt: O = ws,
|
|
3944
|
+
MessageDeleted: U = _s,
|
|
3945
|
+
MessageIsThreadReplyInChannelButtonIndicator: j = ys,
|
|
3946
|
+
MessageRepliesCountButton: J = Ns,
|
|
3947
|
+
ReminderNotification: Z = ks,
|
|
3948
|
+
StreamedMessageText: Q = Cs,
|
|
3949
3949
|
PinIndicator: G
|
|
3950
|
-
} =
|
|
3950
|
+
} = gn("CustomMessage"), N = Ss(c), M = Es(c), Y = oe(
|
|
3951
3951
|
() => m == null ? void 0 : m(c),
|
|
3952
3952
|
[m, c]
|
|
3953
3953
|
), $ = oe(() => {
|
|
3954
3954
|
const fe = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...fe] : fe;
|
|
3955
3955
|
if (!$e(c)) return be;
|
|
3956
|
-
const
|
|
3957
|
-
return
|
|
3956
|
+
const Vt = be.filter((Gt) => !("type" in Gt) || !Ye(Gt));
|
|
3957
|
+
return Vt.length === be.length ? be : Vt;
|
|
3958
3958
|
}, [c]), ne = oe(
|
|
3959
|
-
() =>
|
|
3959
|
+
() => Jn($),
|
|
3960
3960
|
[$]
|
|
3961
3961
|
), W = oe(() => {
|
|
3962
|
-
const fe =
|
|
3962
|
+
const fe = En({ message: c, viewerLanguage: v });
|
|
3963
3963
|
return fe === c.text ? c : { ...c, text: fe };
|
|
3964
3964
|
}, [c, v]), te = ne.length > 0, se = ne.reduce(
|
|
3965
3965
|
(fe, be) => fe + be.attachments.length,
|
|
3966
3966
|
0
|
|
3967
3967
|
) === (($ == null ? void 0 : $.length) ?? 0), ie = (i == null ? void 0 : i[0]) ?? "", Oe = ie === "top" ? "first" : ie === "middle" ? "middle" : ie === "bottom" ? "end" : "single", me = ie === "single" || ie === "bottom";
|
|
3968
|
-
if (
|
|
3968
|
+
if (Is(c))
|
|
3969
3969
|
return null;
|
|
3970
3970
|
if (c.deleted_at || c.type === "deleted")
|
|
3971
3971
|
return /* @__PURE__ */ n(U, { message: c });
|
|
3972
|
-
if (
|
|
3972
|
+
if (Ts(c))
|
|
3973
3973
|
return /* @__PURE__ */ n(S, {});
|
|
3974
|
-
const ae = !w && !!c.reply_count, he = !w && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((
|
|
3974
|
+
const ae = !w && !!c.reply_count, he = !w && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Mt = c.error) == null ? void 0 : Mt.status) !== 403, Et = As(c);
|
|
3975
3975
|
let pe;
|
|
3976
|
-
le ? pe = () => u(c) :
|
|
3977
|
-
const ee = g(),
|
|
3976
|
+
le ? pe = () => u(c) : Et && (pe = () => L(!0));
|
|
3977
|
+
const ee = g(), rs = k(
|
|
3978
3978
|
"str-chat__message str-chat__message-simple",
|
|
3979
3979
|
`str-chat__message--${c.type}`,
|
|
3980
3980
|
`str-chat__message--${c.status}`,
|
|
@@ -3985,27 +3985,27 @@ const qi = ({
|
|
|
3985
3985
|
"str-chat__message--highlighted": h,
|
|
3986
3986
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3987
3987
|
"str-chat__message--with-reactions": M,
|
|
3988
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3988
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Dt = c == null ? void 0 : c.error) == null ? void 0 : Dt.status) !== 403,
|
|
3989
3989
|
"str-chat__message-with-thread-link": ae || he,
|
|
3990
3990
|
"str-chat__virtual-message__wrapper--end": a,
|
|
3991
3991
|
"str-chat__virtual-message__wrapper--first": r,
|
|
3992
3992
|
"str-chat__virtual-message__wrapper--group": o
|
|
3993
3993
|
}
|
|
3994
|
-
), Ke = c.poll_id && y.polls.fromState(c.poll_id),
|
|
3994
|
+
), Ke = c.poll_id && y.polls.fromState(c.poll_id), It = Fn(c), Ne = $e(c), is = ft(c), Xe = !!($ != null && $.length && !c.quoted_message), Tt = Ne && ee && Xe, ls = te && se && !c.quoted_message && !Ke && !Y && !Ne, At = {
|
|
3995
3995
|
contentType: "text",
|
|
3996
|
-
amountText: (
|
|
3997
|
-
paymentStatus: (
|
|
3996
|
+
amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
|
|
3997
|
+
paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
|
|
3998
3998
|
renderedText: c.text && /* @__PURE__ */ n(Be, { message: W, renderText: b })
|
|
3999
|
-
},
|
|
3999
|
+
}, Rt = {
|
|
4000
4000
|
contentType: "media",
|
|
4001
|
-
title: (
|
|
4002
|
-
mimeType: (
|
|
4003
|
-
thumbnailUrl: (
|
|
4004
|
-
amountText: (
|
|
4005
|
-
detail: (
|
|
4006
|
-
paymentStatus: (
|
|
4001
|
+
title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
|
|
4002
|
+
mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
|
|
4003
|
+
thumbnailUrl: (Bt = c.metadata) == null ? void 0 : Bt.attachment_thumbnail,
|
|
4004
|
+
amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
|
|
4005
|
+
detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
|
|
4006
|
+
paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
|
|
4007
4007
|
onFetchSource: R ? () => R(c, _) : void 0
|
|
4008
|
-
},
|
|
4008
|
+
}, Lt = /* @__PURE__ */ f(
|
|
4009
4009
|
"div",
|
|
4010
4010
|
{
|
|
4011
4011
|
className: k("str-chat__message-bubble", {
|
|
@@ -4025,7 +4025,7 @@ const qi = ({
|
|
|
4025
4025
|
}
|
|
4026
4026
|
),
|
|
4027
4027
|
F && /* @__PURE__ */ n(
|
|
4028
|
-
|
|
4028
|
+
Rs,
|
|
4029
4029
|
{
|
|
4030
4030
|
MessageBouncePrompt: O,
|
|
4031
4031
|
onClose: () => L(!1),
|
|
@@ -4035,7 +4035,7 @@ const qi = ({
|
|
|
4035
4035
|
/* @__PURE__ */ f(
|
|
4036
4036
|
"div",
|
|
4037
4037
|
{
|
|
4038
|
-
className:
|
|
4038
|
+
className: rs,
|
|
4039
4039
|
"data-message-id": c.id,
|
|
4040
4040
|
"data-dd-privacy": "mask",
|
|
4041
4041
|
children: [
|
|
@@ -4057,7 +4057,7 @@ const qi = ({
|
|
|
4057
4057
|
"div",
|
|
4058
4058
|
{
|
|
4059
4059
|
className: k("str-chat__message-inner", {
|
|
4060
|
-
"str-chat__simple-message--error-failed": le ||
|
|
4060
|
+
"str-chat__simple-message--error-failed": le || Et
|
|
4061
4061
|
}),
|
|
4062
4062
|
"data-testid": "message-inner",
|
|
4063
4063
|
onClick: pe,
|
|
@@ -4070,15 +4070,15 @@ const qi = ({
|
|
|
4070
4070
|
marginInlineEnd: 0,
|
|
4071
4071
|
marginInlineStart: 0
|
|
4072
4072
|
},
|
|
4073
|
-
children:
|
|
4073
|
+
children: It ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper message-tip-wrapper", children: [
|
|
4074
4074
|
/* @__PURE__ */ n(vr, { message: c }),
|
|
4075
|
-
((
|
|
4075
|
+
((Ht = c.text) == null ? void 0 : Ht.trim()) && Lt
|
|
4076
4076
|
] }) : dr(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4077
4077
|
ee && C && /* @__PURE__ */ n(C, {}),
|
|
4078
|
-
ee ? /* @__PURE__ */ n(Fe, { ...
|
|
4078
|
+
ee ? /* @__PURE__ */ n(Fe, { ...At, isMine: !0 }) : /* @__PURE__ */ n(
|
|
4079
4079
|
Fe,
|
|
4080
4080
|
{
|
|
4081
|
-
...
|
|
4081
|
+
...At,
|
|
4082
4082
|
isMine: !1,
|
|
4083
4083
|
isUnlocking: T(c.id),
|
|
4084
4084
|
onUnlockClick: () => A == null ? void 0 : A(c, _)
|
|
@@ -4091,14 +4091,14 @@ const qi = ({
|
|
|
4091
4091
|
ee ? /* @__PURE__ */ n(
|
|
4092
4092
|
Fe,
|
|
4093
4093
|
{
|
|
4094
|
-
...
|
|
4094
|
+
...Rt,
|
|
4095
4095
|
isMine: !0,
|
|
4096
4096
|
onPreviewClick: () => A ? A(c, _) : void 0
|
|
4097
4097
|
}
|
|
4098
4098
|
) : /* @__PURE__ */ n(
|
|
4099
4099
|
Fe,
|
|
4100
4100
|
{
|
|
4101
|
-
...
|
|
4101
|
+
...Rt,
|
|
4102
4102
|
isMine: !1,
|
|
4103
4103
|
isUnlocking: T(c.id),
|
|
4104
4104
|
onUnlockClick: () => A ? A(c, _) : void 0,
|
|
@@ -4107,8 +4107,8 @@ const qi = ({
|
|
|
4107
4107
|
),
|
|
4108
4108
|
!ee && C && /* @__PURE__ */ n(C, {})
|
|
4109
4109
|
] }),
|
|
4110
|
-
c.text &&
|
|
4111
|
-
] }) :
|
|
4110
|
+
c.text && Lt
|
|
4111
|
+
] }) : ls ? /* @__PURE__ */ n(
|
|
4112
4112
|
qi,
|
|
4113
4113
|
{
|
|
4114
4114
|
groupPosition: Oe,
|
|
@@ -4130,15 +4130,15 @@ const qi = ({
|
|
|
4130
4130
|
"relative isolate": me
|
|
4131
4131
|
}),
|
|
4132
4132
|
children: [
|
|
4133
|
-
Ne && !
|
|
4134
|
-
|
|
4133
|
+
Ne && !Tt && /* @__PURE__ */ n(
|
|
4134
|
+
en,
|
|
4135
4135
|
{
|
|
4136
4136
|
message: c,
|
|
4137
4137
|
hasAttachment: Xe,
|
|
4138
4138
|
isMyMessage: ee
|
|
4139
4139
|
}
|
|
4140
4140
|
),
|
|
4141
|
-
Ke && /* @__PURE__ */ n(
|
|
4141
|
+
Ke && /* @__PURE__ */ n(Ls, { poll: Ke }),
|
|
4142
4142
|
$ != null && $.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
4143
4143
|
D,
|
|
4144
4144
|
{
|
|
@@ -4159,15 +4159,15 @@ const qi = ({
|
|
|
4159
4159
|
renderText: b
|
|
4160
4160
|
}
|
|
4161
4161
|
),
|
|
4162
|
-
/* @__PURE__ */ n(
|
|
4162
|
+
/* @__PURE__ */ n(at, {}),
|
|
4163
4163
|
me && /* @__PURE__ */ n(Ue, { side: ee ? "me" : "other" })
|
|
4164
4164
|
]
|
|
4165
4165
|
}
|
|
4166
4166
|
) })
|
|
4167
4167
|
}
|
|
4168
4168
|
),
|
|
4169
|
-
!
|
|
4170
|
-
|
|
4169
|
+
!is && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!Ne || Tt) && /* @__PURE__ */ n(
|
|
4170
|
+
en,
|
|
4171
4171
|
{
|
|
4172
4172
|
message: c,
|
|
4173
4173
|
hasAttachment: Xe,
|
|
@@ -4198,11 +4198,11 @@ const qi = ({
|
|
|
4198
4198
|
Zi,
|
|
4199
4199
|
(e, t) => {
|
|
4200
4200
|
var s, a, r, i;
|
|
4201
|
-
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 :
|
|
4201
|
+
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : gs(e, t);
|
|
4202
4202
|
}
|
|
4203
4203
|
), Qi = (e) => {
|
|
4204
4204
|
var i;
|
|
4205
|
-
const t = ge("CustomMessage"), s = we(
|
|
4205
|
+
const t = ge("CustomMessage"), s = we(Pn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
|
|
4206
4206
|
return /* @__PURE__ */ n(
|
|
4207
4207
|
Ji,
|
|
4208
4208
|
{
|
|
@@ -4215,32 +4215,32 @@ const qi = ({
|
|
|
4215
4215
|
var s;
|
|
4216
4216
|
const { handleDelete: e, message: t } = ge("CustomMessageActions");
|
|
4217
4217
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
4218
|
-
|
|
4218
|
+
_n,
|
|
4219
4219
|
{
|
|
4220
4220
|
onClick: e,
|
|
4221
4221
|
"aria-label": "Delete",
|
|
4222
4222
|
title: "Delete",
|
|
4223
4223
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4224
|
-
children: /* @__PURE__ */ n(
|
|
4224
|
+
children: /* @__PURE__ */ n(xa, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4225
4225
|
}
|
|
4226
4226
|
);
|
|
4227
4227
|
}, tl = () => {
|
|
4228
4228
|
const { handleFlag: e } = ge("CustomMessageActions");
|
|
4229
4229
|
return /* @__PURE__ */ n(
|
|
4230
|
-
|
|
4230
|
+
_n,
|
|
4231
4231
|
{
|
|
4232
4232
|
onClick: e,
|
|
4233
4233
|
"aria-label": "Report",
|
|
4234
4234
|
title: "Report",
|
|
4235
4235
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4236
|
-
children: /* @__PURE__ */ n(
|
|
4236
|
+
children: /* @__PURE__ */ n(bn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4237
4237
|
}
|
|
4238
4238
|
);
|
|
4239
4239
|
}, nl = () => {
|
|
4240
4240
|
var t;
|
|
4241
4241
|
const { message: e } = ge("CustomMessageActions");
|
|
4242
4242
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== ce.ATTACHMENT ? null : /* @__PURE__ */ n(
|
|
4243
|
-
|
|
4243
|
+
Na,
|
|
4244
4244
|
{
|
|
4245
4245
|
messageActionSet: [
|
|
4246
4246
|
{ Component: el, placement: "quick", type: "delete" },
|
|
@@ -4250,10 +4250,10 @@ const qi = ({
|
|
|
4250
4250
|
);
|
|
4251
4251
|
}, sl = (e) => ({
|
|
4252
4252
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
4253
|
-
(t) =>
|
|
4253
|
+
(t) => st.previewIsLoaded(t) || st.previewIsLoading(t)
|
|
4254
4254
|
)
|
|
4255
4255
|
}), al = () => {
|
|
4256
|
-
const { linkPreviewsManager: e } =
|
|
4256
|
+
const { linkPreviewsManager: e } = Ms(), { linkPreviews: t } = Ds(
|
|
4257
4257
|
e.state,
|
|
4258
4258
|
sl
|
|
4259
4259
|
), s = (r) => {
|
|
@@ -4304,9 +4304,9 @@ const qi = ({
|
|
|
4304
4304
|
// edge lands ~6px past the fold, reachable by scrolling. That residue
|
|
4305
4305
|
// belongs to whoever owns the mobile layout contract, not to this component.
|
|
4306
4306
|
/* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2", children: t.map((r) => {
|
|
4307
|
-
const i =
|
|
4307
|
+
const i = st.previewIsLoading(r);
|
|
4308
4308
|
return /* @__PURE__ */ n(
|
|
4309
|
-
|
|
4309
|
+
lt.Composer,
|
|
4310
4310
|
{
|
|
4311
4311
|
title: r.title,
|
|
4312
4312
|
url: r.og_scrape_url,
|
|
@@ -4328,13 +4328,13 @@ const qi = ({
|
|
|
4328
4328
|
disabled: t,
|
|
4329
4329
|
onPointerDown: (a) => a.preventDefault(),
|
|
4330
4330
|
onClick: e,
|
|
4331
|
-
children: /* @__PURE__ */ n(
|
|
4331
|
+
children: /* @__PURE__ */ n(wa, { weight: "bold", className: "size-4" })
|
|
4332
4332
|
}
|
|
4333
|
-
),
|
|
4334
|
-
const e = we(je), { handleSubmit: t } =
|
|
4333
|
+
), cn = () => {
|
|
4334
|
+
const e = we(je), { handleSubmit: t } = Os(), s = Ps(), a = e || !s, {
|
|
4335
4335
|
SendButton: r = il,
|
|
4336
|
-
AttachmentPreviewList: i =
|
|
4337
|
-
} =
|
|
4336
|
+
AttachmentPreviewList: i = Fs
|
|
4337
|
+
} = gn("CustomMessageInput"), o = P.useRef(null);
|
|
4338
4338
|
return P.useEffect(() => {
|
|
4339
4339
|
const l = o.current;
|
|
4340
4340
|
if (!l || typeof ResizeObserver > "u")
|
|
@@ -4397,13 +4397,13 @@ const qi = ({
|
|
|
4397
4397
|
"data-dd-privacy": "mask",
|
|
4398
4398
|
children: [
|
|
4399
4399
|
/* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
|
|
4400
|
-
/* @__PURE__ */ n(
|
|
4400
|
+
/* @__PURE__ */ n(zs, {}),
|
|
4401
4401
|
/* @__PURE__ */ n(al, {}),
|
|
4402
4402
|
/* @__PURE__ */ n(i, {})
|
|
4403
4403
|
] }),
|
|
4404
4404
|
/* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
|
|
4405
4405
|
/* @__PURE__ */ n(
|
|
4406
|
-
|
|
4406
|
+
Bs,
|
|
4407
4407
|
{
|
|
4408
4408
|
"aria-disabled": e || void 0,
|
|
4409
4409
|
containerClassName: "min-w-0 flex-1 leading-[0]",
|
|
@@ -4430,14 +4430,14 @@ const qi = ({
|
|
|
4430
4430
|
]
|
|
4431
4431
|
}
|
|
4432
4432
|
);
|
|
4433
|
-
},
|
|
4433
|
+
}, dn = () => /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
|
|
4434
4434
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4435
4435
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4436
4436
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4437
4437
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4438
4438
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4439
4439
|
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4440
|
-
] }),
|
|
4440
|
+
] }), un = ({
|
|
4441
4441
|
renderActions: e,
|
|
4442
4442
|
renderHeader: t,
|
|
4443
4443
|
renderFooter: s,
|
|
@@ -4477,7 +4477,7 @@ const qi = ({
|
|
|
4477
4477
|
ref: u,
|
|
4478
4478
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4479
4479
|
children: [
|
|
4480
|
-
/* @__PURE__ */ n(
|
|
4480
|
+
/* @__PURE__ */ n(dn, {}),
|
|
4481
4481
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex flex-col", children: [
|
|
4482
4482
|
t == null ? void 0 : t(),
|
|
4483
4483
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
@@ -4495,7 +4495,7 @@ const qi = ({
|
|
|
4495
4495
|
ref: u,
|
|
4496
4496
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4497
4497
|
children: [
|
|
4498
|
-
/* @__PURE__ */ n(
|
|
4498
|
+
/* @__PURE__ */ n(dn, {}),
|
|
4499
4499
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex min-h-0 flex-col", children: [
|
|
4500
4500
|
t == null ? void 0 : t(),
|
|
4501
4501
|
/* @__PURE__ */ f("div", { className: "flex min-h-0 flex-col gap-4 p-3 pb-5 md:p-5", children: [
|
|
@@ -4507,7 +4507,7 @@ const qi = ({
|
|
|
4507
4507
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4508
4508
|
children: [
|
|
4509
4509
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4510
|
-
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(
|
|
4510
|
+
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(Yt, { Input: i ?? cn }) })
|
|
4511
4511
|
]
|
|
4512
4512
|
}
|
|
4513
4513
|
),
|
|
@@ -4526,7 +4526,7 @@ const qi = ({
|
|
|
4526
4526
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4527
4527
|
children: [
|
|
4528
4528
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4529
|
-
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(
|
|
4529
|
+
/* @__PURE__ */ n(je.Provider, { value: l, children: /* @__PURE__ */ n(Yt, { Input: cn }) })
|
|
4530
4530
|
]
|
|
4531
4531
|
}
|
|
4532
4532
|
),
|
|
@@ -4539,7 +4539,7 @@ const qi = ({
|
|
|
4539
4539
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
4540
4540
|
], cl = {
|
|
4541
4541
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4542
|
-
},
|
|
4542
|
+
}, tt = "age safety guidelines.", dl = "https://linktr.ee/s/about/contact", ul = (e) => ol.includes(
|
|
4543
4543
|
e
|
|
4544
4544
|
), ml = (e) => {
|
|
4545
4545
|
var t;
|
|
@@ -4547,27 +4547,27 @@ const qi = ({
|
|
|
4547
4547
|
}, hl = (e) => {
|
|
4548
4548
|
var a;
|
|
4549
4549
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4550
|
-
if (
|
|
4550
|
+
if (Kt(t))
|
|
4551
4551
|
return {
|
|
4552
4552
|
kind: "dm-agent",
|
|
4553
4553
|
type: t
|
|
4554
4554
|
};
|
|
4555
|
-
if (
|
|
4555
|
+
if (Ks(t))
|
|
4556
4556
|
return {
|
|
4557
4557
|
kind: "age-safety",
|
|
4558
4558
|
type: t
|
|
4559
4559
|
};
|
|
4560
4560
|
const s = e.dm_agent_system_type;
|
|
4561
|
-
if (
|
|
4561
|
+
if (Kt(s))
|
|
4562
4562
|
return {
|
|
4563
4563
|
kind: "dm-agent",
|
|
4564
4564
|
type: s
|
|
4565
4565
|
};
|
|
4566
4566
|
}, fl = (e) => {
|
|
4567
|
-
const t = e.indexOf(
|
|
4567
|
+
const t = e.indexOf(tt);
|
|
4568
4568
|
if (t === -1)
|
|
4569
4569
|
return e;
|
|
4570
|
-
const s = t +
|
|
4570
|
+
const s = t + tt.length;
|
|
4571
4571
|
return /* @__PURE__ */ f(q, { children: [
|
|
4572
4572
|
e.slice(0, t),
|
|
4573
4573
|
/* @__PURE__ */ n(
|
|
@@ -4577,7 +4577,7 @@ const qi = ({
|
|
|
4577
4577
|
target: "_blank",
|
|
4578
4578
|
rel: "noopener noreferrer",
|
|
4579
4579
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
4580
|
-
children:
|
|
4580
|
+
children: tt
|
|
4581
4581
|
}
|
|
4582
4582
|
),
|
|
4583
4583
|
e.slice(s)
|
|
@@ -4598,7 +4598,7 @@ const qi = ({
|
|
|
4598
4598
|
"data-dm-agent-system-type": s.type,
|
|
4599
4599
|
children: [
|
|
4600
4600
|
/* @__PURE__ */ n(
|
|
4601
|
-
|
|
4601
|
+
_a,
|
|
4602
4602
|
{
|
|
4603
4603
|
size: 16,
|
|
4604
4604
|
weight: "regular",
|
|
@@ -4624,7 +4624,7 @@ const qi = ({
|
|
|
4624
4624
|
"data-age-safety-system-type": s.type,
|
|
4625
4625
|
children: [
|
|
4626
4626
|
/* @__PURE__ */ n(
|
|
4627
|
-
|
|
4627
|
+
ya,
|
|
4628
4628
|
{
|
|
4629
4629
|
size: 24,
|
|
4630
4630
|
weight: "duotone",
|
|
@@ -4648,7 +4648,7 @@ const qi = ({
|
|
|
4648
4648
|
] }),
|
|
4649
4649
|
!t && /* @__PURE__ */ n(qe, { message: e.message })
|
|
4650
4650
|
] });
|
|
4651
|
-
},
|
|
4651
|
+
}, Qn = Ve(!1), nt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
4652
4652
|
"animateTransform",
|
|
4653
4653
|
{
|
|
4654
4654
|
attributeName: "transform",
|
|
@@ -4664,11 +4664,11 @@ const qi = ({
|
|
|
4664
4664
|
Ze.ExternalSources
|
|
4665
4665
|
]), bl = ({ threadList: e }) => {
|
|
4666
4666
|
var b, w;
|
|
4667
|
-
const { channel: t, channelConfig: s, thread: a } = _e(), { client: r } = Ge(), { typing: i = {} } =
|
|
4667
|
+
const { channel: t, channelConfig: s, thread: a } = _e(), { client: r } = Ge(), { typing: i = {} } = $s(), { aiState: o } = Us(t), l = we(Qn);
|
|
4668
4668
|
if (!e && l && pl.has(o)) {
|
|
4669
4669
|
const v = vl(t, (b = r.user) == null ? void 0 : b.id);
|
|
4670
4670
|
return /* @__PURE__ */ n(
|
|
4671
|
-
|
|
4671
|
+
mn,
|
|
4672
4672
|
{
|
|
4673
4673
|
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
4674
4674
|
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
@@ -4694,7 +4694,7 @@ const qi = ({
|
|
|
4694
4694
|
return null;
|
|
4695
4695
|
const g = (w = m[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4696
4696
|
return /* @__PURE__ */ n(
|
|
4697
|
-
|
|
4697
|
+
mn,
|
|
4698
4698
|
{
|
|
4699
4699
|
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4700
4700
|
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
@@ -4702,7 +4702,7 @@ const qi = ({
|
|
|
4702
4702
|
testId: "typing-indicator"
|
|
4703
4703
|
}
|
|
4704
4704
|
);
|
|
4705
|
-
},
|
|
4705
|
+
}, mn = ({
|
|
4706
4706
|
avatarId: e,
|
|
4707
4707
|
avatarName: t,
|
|
4708
4708
|
avatarImage: s,
|
|
@@ -4738,9 +4738,9 @@ const qi = ({
|
|
|
4738
4738
|
height: "13",
|
|
4739
4739
|
overflow: "visible",
|
|
4740
4740
|
children: [
|
|
4741
|
-
/* @__PURE__ */ n(
|
|
4742
|
-
/* @__PURE__ */ n(
|
|
4743
|
-
/* @__PURE__ */ n(
|
|
4741
|
+
/* @__PURE__ */ n(nt, { cx: "4", index: 0 }),
|
|
4742
|
+
/* @__PURE__ */ n(nt, { cx: "16", index: 1 }),
|
|
4743
|
+
/* @__PURE__ */ n(nt, { cx: "28", index: 2 })
|
|
4744
4744
|
]
|
|
4745
4745
|
}
|
|
4746
4746
|
) }) }),
|
|
@@ -4844,7 +4844,7 @@ const _l = ({
|
|
|
4844
4844
|
}, []), C = R ? I : void 0, S = br(E, z), O = L.state.messages.some(
|
|
4845
4845
|
(Z) => Z.type !== "deleted"
|
|
4846
4846
|
), U = v ? /* @__PURE__ */ n(P.Fragment, { children: v() }, "lt-channel-banner") : null, j = /* @__PURE__ */ n(
|
|
4847
|
-
|
|
4847
|
+
Oa,
|
|
4848
4848
|
{
|
|
4849
4849
|
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%)]",
|
|
4850
4850
|
onBack: e,
|
|
@@ -4877,8 +4877,8 @@ const _l = ({
|
|
|
4877
4877
|
},
|
|
4878
4878
|
[C, y, _]
|
|
4879
4879
|
);
|
|
4880
|
-
return /* @__PURE__ */ n(
|
|
4881
|
-
|
|
4880
|
+
return /* @__PURE__ */ n(Pn.Provider, { value: S, children: /* @__PURE__ */ n(
|
|
4881
|
+
Hs,
|
|
4882
4882
|
{
|
|
4883
4883
|
overrides: {
|
|
4884
4884
|
Message: J,
|
|
@@ -4886,7 +4886,7 @@ const _l = ({
|
|
|
4886
4886
|
UnreadMessagesNotification: () => null,
|
|
4887
4887
|
UnreadMessagesSeparator: () => null
|
|
4888
4888
|
},
|
|
4889
|
-
children: /* @__PURE__ */ n(
|
|
4889
|
+
children: /* @__PURE__ */ n(Vs, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4890
4890
|
/* @__PURE__ */ f(
|
|
4891
4891
|
"div",
|
|
4892
4892
|
{
|
|
@@ -4897,7 +4897,7 @@ const _l = ({
|
|
|
4897
4897
|
U
|
|
4898
4898
|
] }) }),
|
|
4899
4899
|
/* @__PURE__ */ n(
|
|
4900
|
-
|
|
4900
|
+
Wt,
|
|
4901
4901
|
{
|
|
4902
4902
|
head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4903
4903
|
j,
|
|
@@ -4912,7 +4912,7 @@ const _l = ({
|
|
|
4912
4912
|
"lt-channel-message-list"
|
|
4913
4913
|
),
|
|
4914
4914
|
/* @__PURE__ */ n(
|
|
4915
|
-
|
|
4915
|
+
un,
|
|
4916
4916
|
{
|
|
4917
4917
|
...s && {
|
|
4918
4918
|
renderActions: () => s == null ? void 0 : s(L)
|
|
@@ -4938,7 +4938,7 @@ const _l = ({
|
|
|
4938
4938
|
U
|
|
4939
4939
|
] }) }),
|
|
4940
4940
|
/* @__PURE__ */ n(
|
|
4941
|
-
|
|
4941
|
+
Wt,
|
|
4942
4942
|
{
|
|
4943
4943
|
head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4944
4944
|
j,
|
|
@@ -4954,7 +4954,7 @@ const _l = ({
|
|
|
4954
4954
|
),
|
|
4955
4955
|
r ? /* @__PURE__ */ n(P.Fragment, { children: r(L) }, "lt-channel-conversation-footer") : null,
|
|
4956
4956
|
/* @__PURE__ */ n(
|
|
4957
|
-
|
|
4957
|
+
un,
|
|
4958
4958
|
{
|
|
4959
4959
|
...s && {
|
|
4960
4960
|
renderActions: () => s == null ? void 0 : s(L)
|
|
@@ -4969,7 +4969,7 @@ const _l = ({
|
|
|
4969
4969
|
] }) })
|
|
4970
4970
|
}
|
|
4971
4971
|
) });
|
|
4972
|
-
},
|
|
4972
|
+
}, es = P.memo(
|
|
4973
4973
|
({
|
|
4974
4974
|
channel: e,
|
|
4975
4975
|
onBack: t,
|
|
@@ -5039,7 +5039,7 @@ const _l = ({
|
|
|
5039
5039
|
};
|
|
5040
5040
|
return G.addEventListener("click", N), () => G.removeEventListener("click", N);
|
|
5041
5041
|
}, [L, e]);
|
|
5042
|
-
const Q =
|
|
5042
|
+
const Q = pn(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
|
|
5043
5043
|
return /* @__PURE__ */ n(
|
|
5044
5044
|
"div",
|
|
5045
5045
|
{
|
|
@@ -5049,14 +5049,14 @@ const _l = ({
|
|
|
5049
5049
|
d
|
|
5050
5050
|
),
|
|
5051
5051
|
style: Q,
|
|
5052
|
-
children: /* @__PURE__ */ n(
|
|
5053
|
-
|
|
5052
|
+
children: /* @__PURE__ */ n(Qn.Provider, { value: p ?? !1, children: /* @__PURE__ */ n(
|
|
5053
|
+
js,
|
|
5054
5054
|
{
|
|
5055
5055
|
channel: e,
|
|
5056
5056
|
MessageSystem: gl,
|
|
5057
5057
|
EmptyStateIndicator: u,
|
|
5058
5058
|
LoadingIndicator: He,
|
|
5059
|
-
DateSeparator:
|
|
5059
|
+
DateSeparator: Pa,
|
|
5060
5060
|
TypingIndicator: bl,
|
|
5061
5061
|
doSendMessageRequest: J,
|
|
5062
5062
|
...E ? { SendButton: E } : {},
|
|
@@ -5099,7 +5099,7 @@ const _l = ({
|
|
|
5099
5099
|
);
|
|
5100
5100
|
}
|
|
5101
5101
|
);
|
|
5102
|
-
|
|
5102
|
+
es.displayName = "ChannelView";
|
|
5103
5103
|
const Se = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
|
|
5104
5104
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
5105
5105
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -5149,7 +5149,7 @@ const oo = ({
|
|
|
5149
5149
|
refreshConnection: D,
|
|
5150
5150
|
service: I,
|
|
5151
5151
|
debug: C
|
|
5152
|
-
} =
|
|
5152
|
+
} = ka(), [S, O] = B(null), [U, j] = B(null), [J, Z] = B(!1), { showDeleteConversation: Q = !0 } = e, G = V(o);
|
|
5153
5153
|
G.current = o;
|
|
5154
5154
|
const N = V(a);
|
|
5155
5155
|
N.current = a;
|
|
@@ -5233,7 +5233,7 @@ const oo = ({
|
|
|
5233
5233
|
onBack: D
|
|
5234
5234
|
}
|
|
5235
5235
|
) : U ? /* @__PURE__ */ n(Se, { message: U }) : J && !S ? /* @__PURE__ */ n(Se, { message: "Conversation ended" }) : S ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
5236
|
-
|
|
5236
|
+
es,
|
|
5237
5237
|
{
|
|
5238
5238
|
channel: S,
|
|
5239
5239
|
renderMessageInputActions: t,
|
|
@@ -5268,7 +5268,7 @@ function yl(e) {
|
|
|
5268
5268
|
for (const s of t)
|
|
5269
5269
|
e.state.addMessageSorted(s.message);
|
|
5270
5270
|
}
|
|
5271
|
-
const
|
|
5271
|
+
const ts = P.createContext({
|
|
5272
5272
|
selectedChannel: void 0,
|
|
5273
5273
|
onChannelSelect: () => {
|
|
5274
5274
|
},
|
|
@@ -5276,7 +5276,7 @@ const es = P.createContext({
|
|
|
5276
5276
|
renderMessagePreview: void 0,
|
|
5277
5277
|
channelPreview: void 0,
|
|
5278
5278
|
viewerLanguage: void 0
|
|
5279
|
-
}), Nl =
|
|
5279
|
+
}), Nl = ts.Provider, kl = () => P.useContext(ts), Cl = (e, t) => {
|
|
5280
5280
|
const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
5281
5281
|
return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
|
|
5282
5282
|
}, Sl = (e) => {
|
|
@@ -5296,7 +5296,7 @@ const es = P.createContext({
|
|
|
5296
5296
|
day: "numeric",
|
|
5297
5297
|
year: "numeric"
|
|
5298
5298
|
});
|
|
5299
|
-
},
|
|
5299
|
+
}, ns = P.memo(
|
|
5300
5300
|
(e) => {
|
|
5301
5301
|
var z, F, L;
|
|
5302
5302
|
const { channel: t, unread: s } = e, {
|
|
@@ -5306,7 +5306,7 @@ const es = P.createContext({
|
|
|
5306
5306
|
channelPreview: o,
|
|
5307
5307
|
renderMessagePreview: l,
|
|
5308
5308
|
viewerLanguage: d
|
|
5309
|
-
} = kl(), { client: u } = Ge(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m =
|
|
5309
|
+
} = kl(), { client: u } = Ge(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = Nn(t);
|
|
5310
5310
|
if (o)
|
|
5311
5311
|
return /* @__PURE__ */ n(
|
|
5312
5312
|
o,
|
|
@@ -5323,11 +5323,11 @@ const es = P.createContext({
|
|
|
5323
5323
|
}, c = (E) => {
|
|
5324
5324
|
const D = E.key === "Enter" || E.key === " ", I = E.repeat;
|
|
5325
5325
|
!D || I || (E.preventDefault(), g());
|
|
5326
|
-
}, b =
|
|
5326
|
+
}, b = kn(
|
|
5327
5327
|
(z = t == null ? void 0 : t.state) == null ? void 0 : z.members,
|
|
5328
5328
|
u == null ? void 0 : u.userID,
|
|
5329
5329
|
t == null ? void 0 : t.type
|
|
5330
|
-
), w =
|
|
5330
|
+
), w = Cn(b == null ? void 0 : b.user), v = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, x = (() => {
|
|
5331
5331
|
var D;
|
|
5332
5332
|
const E = (D = t == null ? void 0 : t.state) == null ? void 0 : D.messages;
|
|
5333
5333
|
if (E != null && E.length) {
|
|
@@ -5336,7 +5336,7 @@ const es = P.createContext({
|
|
|
5336
5336
|
}
|
|
5337
5337
|
})(), y = (() => {
|
|
5338
5338
|
var S;
|
|
5339
|
-
const E =
|
|
5339
|
+
const E = En({
|
|
5340
5340
|
message: x,
|
|
5341
5341
|
viewerLanguage: d
|
|
5342
5342
|
}), { custom_type: D, attachment_content_type: I } = (x == null ? void 0 : x.metadata) || {};
|
|
@@ -5412,7 +5412,7 @@ const es = P.createContext({
|
|
|
5412
5412
|
);
|
|
5413
5413
|
}
|
|
5414
5414
|
);
|
|
5415
|
-
|
|
5415
|
+
ns.displayName = "CustomChannelPreview";
|
|
5416
5416
|
const El = { last_message_at: -1 }, Il = P.memo(
|
|
5417
5417
|
({
|
|
5418
5418
|
onChannelSelect: e,
|
|
@@ -5423,7 +5423,7 @@ const El = { last_message_at: -1 }, Il = P.memo(
|
|
|
5423
5423
|
sort: i = El,
|
|
5424
5424
|
className: o,
|
|
5425
5425
|
customEmptyStateIndicator: l,
|
|
5426
|
-
channelListPaginator: d =
|
|
5426
|
+
channelListPaginator: d = Ys,
|
|
5427
5427
|
channelPreview: u,
|
|
5428
5428
|
renderMessagePreview: h,
|
|
5429
5429
|
viewerLanguage: m,
|
|
@@ -5436,7 +5436,7 @@ const El = { last_message_at: -1 }, Il = P.memo(
|
|
|
5436
5436
|
}) => {
|
|
5437
5437
|
const p = P.useRef(0);
|
|
5438
5438
|
p.current++;
|
|
5439
|
-
const { debug: y = !1 } =
|
|
5439
|
+
const { debug: y = !1 } = ct(), _ = P.useCallback(
|
|
5440
5440
|
(A) => {
|
|
5441
5441
|
for (const R of A)
|
|
5442
5442
|
yl(R);
|
|
@@ -5475,7 +5475,7 @@ const El = { last_message_at: -1 }, Il = P.memo(
|
|
|
5475
5475
|
o
|
|
5476
5476
|
),
|
|
5477
5477
|
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Nl, { value: T, children: /* @__PURE__ */ n(
|
|
5478
|
-
|
|
5478
|
+
Gs,
|
|
5479
5479
|
{
|
|
5480
5480
|
filters: s,
|
|
5481
5481
|
sort: i,
|
|
@@ -5489,7 +5489,7 @@ const El = { last_message_at: -1 }, Il = P.memo(
|
|
|
5489
5489
|
onAddedToChannel: v,
|
|
5490
5490
|
onChannelUpdated: x,
|
|
5491
5491
|
Paginator: d,
|
|
5492
|
-
Preview:
|
|
5492
|
+
Preview: ns,
|
|
5493
5493
|
EmptyStateIndicator: l
|
|
5494
5494
|
},
|
|
5495
5495
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -5499,7 +5499,7 @@ const El = { last_message_at: -1 }, Il = P.memo(
|
|
|
5499
5499
|
}
|
|
5500
5500
|
);
|
|
5501
5501
|
Il.displayName = "ChannelList";
|
|
5502
|
-
const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", Al = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]",
|
|
5502
|
+
const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", Al = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", hn = ({ surface: e, actions: t, layout: s }) => {
|
|
5503
5503
|
if (t == null || t.length === 0) return null;
|
|
5504
5504
|
const a = s === "stacked";
|
|
5505
5505
|
return /* @__PURE__ */ n(
|
|
@@ -5514,7 +5514,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5514
5514
|
a ? "mt-3 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"
|
|
5515
5515
|
),
|
|
5516
5516
|
children: t.map((r, i) => /* @__PURE__ */ n(
|
|
5517
|
-
|
|
5517
|
+
zn,
|
|
5518
5518
|
{
|
|
5519
5519
|
variant: e,
|
|
5520
5520
|
cta: r,
|
|
@@ -5570,11 +5570,11 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5570
5570
|
] });
|
|
5571
5571
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5572
5572
|
c,
|
|
5573
|
-
/* @__PURE__ */ n(
|
|
5573
|
+
/* @__PURE__ */ n(hn, { surface: e, actions: o, layout: "row" })
|
|
5574
5574
|
] }) : /* @__PURE__ */ f(q, { children: [
|
|
5575
5575
|
c,
|
|
5576
5576
|
/* @__PURE__ */ n(
|
|
5577
|
-
|
|
5577
|
+
hn,
|
|
5578
5578
|
{
|
|
5579
5579
|
surface: e,
|
|
5580
5580
|
actions: o,
|
|
@@ -5653,7 +5653,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5653
5653
|
onImageError: i
|
|
5654
5654
|
}
|
|
5655
5655
|
)
|
|
5656
|
-
) }),
|
|
5656
|
+
) }), ss = ({
|
|
5657
5657
|
variant: e,
|
|
5658
5658
|
title: t,
|
|
5659
5659
|
subtitle: s,
|
|
@@ -5665,7 +5665,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5665
5665
|
accentColor: d,
|
|
5666
5666
|
groupPosition: u = "single"
|
|
5667
5667
|
}) => {
|
|
5668
|
-
const h =
|
|
5668
|
+
const h = Xs({
|
|
5669
5669
|
imagePresentation: i,
|
|
5670
5670
|
images: r
|
|
5671
5671
|
}), m = r.length > 0, g = m && h === "hero", c = We({
|
|
@@ -5675,7 +5675,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5675
5675
|
thumbnailUrl: g ? r[0] : void 0
|
|
5676
5676
|
}), b = u === "single" || u === "end";
|
|
5677
5677
|
return /* @__PURE__ */ n(
|
|
5678
|
-
|
|
5678
|
+
wt,
|
|
5679
5679
|
{
|
|
5680
5680
|
accentHex: c.accentHex,
|
|
5681
5681
|
side: e === "dark" ? "sender" : "receiver",
|
|
@@ -5715,10 +5715,10 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5715
5715
|
)
|
|
5716
5716
|
}
|
|
5717
5717
|
);
|
|
5718
|
-
}, $l = (e) => /* @__PURE__ */ n(
|
|
5718
|
+
}, $l = (e) => /* @__PURE__ */ n(ss, { ...e, variant: "dark" }), Ul = (e) => /* @__PURE__ */ n(ss, { ...e, variant: "light" }), co = {
|
|
5719
5719
|
Sent: $l,
|
|
5720
5720
|
Received: Ul
|
|
5721
|
-
},
|
|
5721
|
+
}, fn = `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%`, jl = {
|
|
5722
5722
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5723
5723
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5724
5724
|
}, Hl = ({ variant: e }) => /* @__PURE__ */ n(
|
|
@@ -5732,8 +5732,8 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5732
5732
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5733
5733
|
transformOrigin: "center",
|
|
5734
5734
|
backgroundColor: jl[e],
|
|
5735
|
-
WebkitMask:
|
|
5736
|
-
mask:
|
|
5735
|
+
WebkitMask: fn,
|
|
5736
|
+
mask: fn
|
|
5737
5737
|
}
|
|
5738
5738
|
}
|
|
5739
5739
|
), Vl = {
|
|
@@ -5745,7 +5745,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5745
5745
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5746
5746
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5747
5747
|
}
|
|
5748
|
-
},
|
|
5748
|
+
}, as = ({
|
|
5749
5749
|
variant: e,
|
|
5750
5750
|
text: t,
|
|
5751
5751
|
tail: s = !0,
|
|
@@ -5777,7 +5777,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5777
5777
|
header: s,
|
|
5778
5778
|
className: a
|
|
5779
5779
|
}) => /* @__PURE__ */ n(
|
|
5780
|
-
|
|
5780
|
+
as,
|
|
5781
5781
|
{
|
|
5782
5782
|
variant: "received",
|
|
5783
5783
|
text: e,
|
|
@@ -5785,7 +5785,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5785
5785
|
header: s,
|
|
5786
5786
|
className: a
|
|
5787
5787
|
}
|
|
5788
|
-
), Yl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(
|
|
5788
|
+
), Yl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(as, { variant: "sent", text: e, tail: t, className: s }), uo = {
|
|
5789
5789
|
Sent: Yl,
|
|
5790
5790
|
Received: Gl
|
|
5791
5791
|
}, Wl = ({
|
|
@@ -5819,7 +5819,7 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5819
5819
|
avatarImage: i,
|
|
5820
5820
|
avatarName: o
|
|
5821
5821
|
}) => {
|
|
5822
|
-
const l =
|
|
5822
|
+
const l = qs(e);
|
|
5823
5823
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
|
|
5824
5824
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
5825
5825
|
ye,
|
|
@@ -5853,22 +5853,22 @@ const Tl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5853
5853
|
] }) });
|
|
5854
5854
|
};
|
|
5855
5855
|
export {
|
|
5856
|
-
|
|
5857
|
-
|
|
5856
|
+
Tn as A,
|
|
5857
|
+
ht as B,
|
|
5858
5858
|
xl as C,
|
|
5859
|
-
|
|
5859
|
+
Cn as D,
|
|
5860
5860
|
lo as E,
|
|
5861
5861
|
mo as F,
|
|
5862
5862
|
rr as G,
|
|
5863
|
-
|
|
5864
|
-
|
|
5863
|
+
ka as H,
|
|
5864
|
+
lt as L,
|
|
5865
5865
|
ao as M,
|
|
5866
5866
|
co as R,
|
|
5867
5867
|
vr as T,
|
|
5868
5868
|
ke as a,
|
|
5869
5869
|
ye as b,
|
|
5870
5870
|
Il as c,
|
|
5871
|
-
|
|
5871
|
+
es as d,
|
|
5872
5872
|
ro as e,
|
|
5873
5873
|
Wl as f,
|
|
5874
5874
|
ue as g,
|
|
@@ -5883,13 +5883,13 @@ export {
|
|
|
5883
5883
|
Sl as p,
|
|
5884
5884
|
ti as q,
|
|
5885
5885
|
xe as r,
|
|
5886
|
-
|
|
5886
|
+
En as s,
|
|
5887
5887
|
Ye as t,
|
|
5888
|
-
|
|
5889
|
-
|
|
5888
|
+
Fn as u,
|
|
5889
|
+
Sa as v,
|
|
5890
5890
|
io as w,
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5891
|
+
Fa as x,
|
|
5892
|
+
kn as y,
|
|
5893
|
+
mt as z
|
|
5894
5894
|
};
|
|
5895
|
-
//# sourceMappingURL=index-
|
|
5895
|
+
//# sourceMappingURL=index-B6hhiZHx.js.map
|