@linktr.ee/messaging-react 3.32.0-rc-1786001289 → 3.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Card-CFhwCGD9.cjs → Card-BZ1ULvgX.cjs} +2 -2
- package/dist/{Card-CFhwCGD9.cjs.map → Card-BZ1ULvgX.cjs.map} +1 -1
- package/dist/{Card-DPKAKVEP.js → Card-C0e9vL3X.js} +2 -2
- package/dist/{Card-DPKAKVEP.js.map → Card-C0e9vL3X.js.map} +1 -1
- package/dist/index-DWddHoFx.cjs +2 -0
- package/dist/index-DWddHoFx.cjs.map +1 -0
- package/dist/{index-KC2xnb1K.js → index-DtTSu6m9.js} +339 -334
- package/dist/index-DtTSu6m9.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -16
- package/dist/index.js +1 -1
- package/dist/testing.d.ts +3 -16
- package/package.json +3 -3
- package/src/components/LinkAttachment/LinkAttachment.test.tsx +18 -0
- package/src/components/LinkAttachment/components/Composer/Card.tsx +1 -0
- package/src/components/LinkAttachment/components/Received/Card.tsx +1 -0
- package/src/components/LinkAttachment/components/Sent/Card.tsx +1 -0
- package/src/components/LinkAttachment/components/_shared/CardBody.tsx +9 -1
- package/src/components/LinkAttachment/components/_shared/useChinPalette.ts +10 -0
- package/src/stream-custom-data.ts +13 -17
- package/dist/index-C0SNOT_0.cjs +0 -2
- package/dist/index-C0SNOT_0.cjs.map +0 -1
- package/dist/index-KC2xnb1K.js.map +0 -1
|
@@ -3,7 +3,7 @@ import F, { createContext as Ve, useContext as _e, useCallback as q, useState as
|
|
|
3
3
|
import { StreamChatService as en } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as tn, LinkPreviewsManager as et } from "stream-chat";
|
|
5
5
|
import { Chat as sn, useChannelStateContext as fe, useChatContext as Ee, DateSeparator as nn, useMessageContext as ge, MessageStatus as an, MessageErrorIcon as tt, MessageText as ze, areMessageUIPropsEqual as rn, useMessageReminder as on, useComponentContext as is, Attachment as ln, EditMessageModal as cn, MessageBlocked as dn, MessageBouncePrompt as un, MessageDeleted as mn, MessageIsThreadReplyInChannelButtonIndicator as hn, MessageRepliesCountButton as fn, ReminderNotification as gn, StreamedMessageText as pn, messageHasAttachments as bn, messageHasReactions as vn, isDateSeparatorMessage as xn, isMessageBlocked as wn, isMessageBounced as _n, MessageBounceModal as yn, Poll as Nn, useMessageComposer as kn, useStateStore as Cn, MessageInput as Ht, useMessageInputContext as Sn, useMessageComposerHasSendableData as En, AttachmentPreviewList as In, QuotedMessagePreview as Tn, TextareaComposer as An, MessageTimestamp as Ye, AIStates as We, useTypingContext as Ln, useAIState as Mn, Channel as Rn, WithComponents as Dn, Window as Pn, MessageList as Gt, ChannelList as On, InfiniteScroll as zn } from "stream-chat-react";
|
|
6
|
-
import
|
|
6
|
+
import N from "classnames";
|
|
7
7
|
import { StarIcon as st, DotsThreeIcon as Bn, SpinnerGapIcon as Pe, SignOutIcon as Fn, ProhibitInsetIcon as Yt, FlagIcon as os, CurrencyDollarIcon as $n, CaretRightIcon as ls, ArrowLeftIcon as Un, FileIcon as cs, ImageIcon as jn, SpeakerHighIcon as Vn, VideoCameraIcon as ds, FileMdIcon as Hn, FileTextIcon as Gn, FileZipIcon as Yn, FilePptIcon as Wn, FileCsvIcon as qn, FileXlsIcon as Xn, FileDocIcon as Kn, FilePdfIcon as Zn, CircleNotchIcon as xe, PlayIcon as nt, PauseIcon as Jn, LinkIcon as Qn, DownloadSimpleIcon as Se, XIcon as ot, CaretLeftIcon as ea, GiftIcon as ta, ThumbsUpIcon as sa, ThumbsDownIcon as na, WarningCircleIcon as aa, MegaphoneIcon as ra, ChecksIcon as ia, PencilSimpleIcon as oa, TrashSimpleIcon as la, ArrowUpIcon as ca, SparkleIcon as da, ProhibitIcon as ua } from "@phosphor-icons/react";
|
|
8
8
|
import { isOfficialChannel as ma, OFFICIAL_SENDER_USER_ID as ha, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as Wt, isAgeSafetySystemType as fa, selectEnabledFaqs as ga } from "@linktr.ee/messaging-taxonomy";
|
|
9
9
|
import { MessageActions as pa, DefaultDropdownActionButton as us } from "stream-chat-react/experimental";
|
|
@@ -26,7 +26,7 @@ const ms = Ve({
|
|
|
26
26
|
debug: i = !1,
|
|
27
27
|
client: l
|
|
28
28
|
}) => {
|
|
29
|
-
var S,
|
|
29
|
+
var S, A;
|
|
30
30
|
const o = q(
|
|
31
31
|
(E, ...B) => {
|
|
32
32
|
i && console.log(`🔥 [MessagingProvider] ${E}`, ...B);
|
|
@@ -39,11 +39,11 @@ const ms = Ve({
|
|
|
39
39
|
serviceConfig: !!n,
|
|
40
40
|
capabilities: Object.keys(r)
|
|
41
41
|
});
|
|
42
|
-
const [d, m] = $(null), [f, u] = $(null), [g, c] = $(!1), [x, w] = $(!1), [
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
const
|
|
42
|
+
const [d, m] = $(null), [f, u] = $(null), [g, c] = $(!1), [x, w] = $(!1), [b, p] = $(null), v = H(!1), _ = H(null), k = H(n);
|
|
43
|
+
k.current = n;
|
|
44
|
+
const L = H(i);
|
|
45
|
+
L.current = i;
|
|
46
|
+
const T = H({
|
|
47
47
|
userId: t == null ? void 0 : t.id,
|
|
48
48
|
apiKey: a,
|
|
49
49
|
serviceConfig: n,
|
|
@@ -53,12 +53,12 @@ const ms = Ve({
|
|
|
53
53
|
renderCount: z.current,
|
|
54
54
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
55
55
|
propChanges: {
|
|
56
|
-
userChanged:
|
|
57
|
-
apiKeyChanged:
|
|
58
|
-
serviceConfigChanged:
|
|
59
|
-
capabilitiesChanged:
|
|
56
|
+
userChanged: T.current.userId !== (t == null ? void 0 : t.id),
|
|
57
|
+
apiKeyChanged: T.current.apiKey !== a,
|
|
58
|
+
serviceConfigChanged: T.current.serviceConfig !== n,
|
|
59
|
+
capabilitiesChanged: T.current.capabilities !== r
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), T.current = {
|
|
62
62
|
userId: t == null ? void 0 : t.id,
|
|
63
63
|
apiKey: a,
|
|
64
64
|
serviceConfig: n,
|
|
@@ -66,11 +66,11 @@ const ms = Ve({
|
|
|
66
66
|
};
|
|
67
67
|
const P = H(null);
|
|
68
68
|
!l && a && ((S = P.current) == null ? void 0 : S.apiKey) !== a && (P.current = { apiKey: a, client: new tn(a) });
|
|
69
|
-
const U = l || (a ? ((
|
|
69
|
+
const U = l || (a ? ((A = P.current) == null ? void 0 : A.client) ?? null : null);
|
|
70
70
|
Y(() => {
|
|
71
|
-
const E = z.current, B =
|
|
71
|
+
const E = z.current, B = k.current;
|
|
72
72
|
if (l) {
|
|
73
|
-
_.current = null, m(null), u(null), c(!1),
|
|
73
|
+
_.current = null, m(null), u(null), c(!1), p(null), w(!1);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
if (!a || !U || !B) {
|
|
@@ -87,7 +87,7 @@ const ms = Ve({
|
|
|
87
87
|
const O = new en({
|
|
88
88
|
...B,
|
|
89
89
|
apiKey: a,
|
|
90
|
-
debug:
|
|
90
|
+
debug: L.current,
|
|
91
91
|
client: U
|
|
92
92
|
});
|
|
93
93
|
_.current = O, m(O), o("✅ SERVICE SET", {
|
|
@@ -123,7 +123,7 @@ const ms = Ve({
|
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
(async () => {
|
|
126
|
-
o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, w(!0),
|
|
126
|
+
o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, w(!0), p(null);
|
|
127
127
|
try {
|
|
128
128
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
129
129
|
const j = await d.connectUser(t);
|
|
@@ -133,7 +133,7 @@ const ms = Ve({
|
|
|
133
133
|
});
|
|
134
134
|
} catch (j) {
|
|
135
135
|
const K = j instanceof Error ? j.message : "Connection failed";
|
|
136
|
-
|
|
136
|
+
p(K), o("❌ USER CONNECTION ERROR", {
|
|
137
137
|
userId: t.id,
|
|
138
138
|
error: K
|
|
139
139
|
});
|
|
@@ -164,10 +164,10 @@ const ms = Ve({
|
|
|
164
164
|
try {
|
|
165
165
|
o("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
|
|
166
166
|
const E = await d.connectUser(t);
|
|
167
|
-
u(E), c(!0),
|
|
167
|
+
u(E), c(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
168
168
|
} catch (E) {
|
|
169
169
|
const B = E instanceof Error ? E.message : "Refresh failed";
|
|
170
|
-
|
|
170
|
+
p(B), o("❌ CONNECTION REFRESH ERROR", {
|
|
171
171
|
userId: t.id,
|
|
172
172
|
error: B
|
|
173
173
|
});
|
|
@@ -180,7 +180,7 @@ const ms = Ve({
|
|
|
180
180
|
hasClient: !!f,
|
|
181
181
|
isConnected: g,
|
|
182
182
|
isLoading: x,
|
|
183
|
-
hasError: !!
|
|
183
|
+
hasError: !!b,
|
|
184
184
|
capabilitiesKeys: Object.keys(r)
|
|
185
185
|
}), {
|
|
186
186
|
// With an injected client, expose no service — the injected client owns
|
|
@@ -195,7 +195,7 @@ const ms = Ve({
|
|
|
195
195
|
client: l ?? f,
|
|
196
196
|
isConnected: l ? !0 : g,
|
|
197
197
|
isLoading: l ? !1 : x,
|
|
198
|
-
error: l ? null :
|
|
198
|
+
error: l ? null : b,
|
|
199
199
|
capabilities: r,
|
|
200
200
|
refreshConnection: C,
|
|
201
201
|
debug: i
|
|
@@ -205,7 +205,7 @@ const ms = Ve({
|
|
|
205
205
|
l,
|
|
206
206
|
g,
|
|
207
207
|
x,
|
|
208
|
-
|
|
208
|
+
b,
|
|
209
209
|
r,
|
|
210
210
|
C,
|
|
211
211
|
i,
|
|
@@ -342,7 +342,7 @@ const ye = ({
|
|
|
342
342
|
"div",
|
|
343
343
|
{
|
|
344
344
|
"aria-hidden": "true",
|
|
345
|
-
className:
|
|
345
|
+
className: N(
|
|
346
346
|
"avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
|
|
347
347
|
),
|
|
348
348
|
style: { fontSize: u, lineHeight: 1 },
|
|
@@ -352,7 +352,7 @@ const ye = ({
|
|
|
352
352
|
return /* @__PURE__ */ h(
|
|
353
353
|
"div",
|
|
354
354
|
{
|
|
355
|
-
className:
|
|
355
|
+
className: N(
|
|
356
356
|
"relative flex-shrink-0",
|
|
357
357
|
a
|
|
358
358
|
),
|
|
@@ -376,7 +376,7 @@ const ye = ({
|
|
|
376
376
|
"div",
|
|
377
377
|
{
|
|
378
378
|
"data-testid": "avatar-ring",
|
|
379
|
-
className:
|
|
379
|
+
className: N(
|
|
380
380
|
"h-full w-full",
|
|
381
381
|
"bg-transparent"
|
|
382
382
|
),
|
|
@@ -409,24 +409,24 @@ const ye = ({
|
|
|
409
409
|
logLabel: f = "useChannelModerationActions"
|
|
410
410
|
}) => {
|
|
411
411
|
var D;
|
|
412
|
-
const { service: u, debug: g } = lt(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, x = !!(a && n && u && c), [w,
|
|
412
|
+
const { service: u, debug: g } = lt(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, x = !!(a && n && u && c), [w, b] = $(!1), [p, v] = $(null), [_, k] = $(!1), [L, T] = $(!1), z = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
|
|
413
413
|
return Y(() => {
|
|
414
414
|
if (!x || !u || !c) {
|
|
415
|
-
|
|
415
|
+
b(!1), v(null);
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
418
|
let S = !1;
|
|
419
419
|
return (async () => {
|
|
420
420
|
try {
|
|
421
|
-
const
|
|
421
|
+
const A = await u.getBlockedUsers();
|
|
422
422
|
if (S) return;
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
b(
|
|
424
|
+
A.some(
|
|
425
425
|
(E) => E.blocked_user_id === c
|
|
426
426
|
)
|
|
427
427
|
);
|
|
428
|
-
} catch (
|
|
429
|
-
S || console.error(`[${f}] Failed to check blocked status:`,
|
|
428
|
+
} catch (A) {
|
|
429
|
+
S || console.error(`[${f}] Failed to check blocked status:`, A);
|
|
430
430
|
} finally {
|
|
431
431
|
S || v({ participantId: c, service: u });
|
|
432
432
|
}
|
|
@@ -437,44 +437,44 @@ const ye = ({
|
|
|
437
437
|
isParticipantBlocked: w,
|
|
438
438
|
isCheckingBlockedStatus: z,
|
|
439
439
|
isLeaving: _,
|
|
440
|
-
isUpdatingBlockStatus:
|
|
440
|
+
isUpdatingBlockStatus: L,
|
|
441
441
|
handleLeaveConversation: async () => {
|
|
442
442
|
var S;
|
|
443
443
|
if (!_) {
|
|
444
|
-
l == null || l(), g && console.log(`[${f}] Leave conversation`, e.cid),
|
|
444
|
+
l == null || l(), g && console.log(`[${f}] Leave conversation`, e.cid), k(!0);
|
|
445
445
|
try {
|
|
446
|
-
const
|
|
447
|
-
await e.hide(
|
|
448
|
-
} catch (
|
|
449
|
-
console.error(`[${f}] Failed to leave conversation`,
|
|
446
|
+
const A = ((S = e._client) == null ? void 0 : S.userID) ?? null;
|
|
447
|
+
await e.hide(A, !1), r && await r(e), m == null || m();
|
|
448
|
+
} catch (A) {
|
|
449
|
+
console.error(`[${f}] Failed to leave conversation`, A);
|
|
450
450
|
} finally {
|
|
451
|
-
|
|
451
|
+
k(!1);
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
},
|
|
455
455
|
handleBlockUser: async () => {
|
|
456
|
-
var S,
|
|
457
|
-
if (!(
|
|
458
|
-
o == null || o(), g && console.log(`[${f}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id),
|
|
456
|
+
var S, A, E;
|
|
457
|
+
if (!(L || !u)) {
|
|
458
|
+
o == null || o(), g && console.log(`[${f}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), T(!0);
|
|
459
459
|
try {
|
|
460
|
-
await u.blockUser((
|
|
460
|
+
await u.blockUser((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
|
|
461
461
|
} catch (B) {
|
|
462
462
|
console.error(`[${f}] Failed to block member`, B);
|
|
463
463
|
} finally {
|
|
464
|
-
|
|
464
|
+
T(!1);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
handleUnblockUser: async () => {
|
|
469
|
-
var S,
|
|
470
|
-
if (!(
|
|
471
|
-
o == null || o(), g && console.log(`[${f}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id),
|
|
469
|
+
var S, A, E;
|
|
470
|
+
if (!(L || !u)) {
|
|
471
|
+
o == null || o(), g && console.log(`[${f}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), T(!0);
|
|
472
472
|
try {
|
|
473
|
-
await u.unBlockUser((
|
|
473
|
+
await u.unBlockUser((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
|
|
474
474
|
} catch (B) {
|
|
475
475
|
console.error(`[${f}] Failed to unblock member`, B);
|
|
476
476
|
} finally {
|
|
477
|
-
|
|
477
|
+
T(!1);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
},
|
|
@@ -491,7 +491,7 @@ const ye = ({
|
|
|
491
491
|
"button",
|
|
492
492
|
{
|
|
493
493
|
type: "button",
|
|
494
|
-
className:
|
|
494
|
+
className: N(
|
|
495
495
|
"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
|
|
496
496
|
e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
497
497
|
t
|
|
@@ -513,13 +513,13 @@ const ye = ({
|
|
|
513
513
|
customChannelActions: f,
|
|
514
514
|
triggerClassName: u
|
|
515
515
|
}) => {
|
|
516
|
-
const [g, c] = $(!1), x = H(null), w = Js(),
|
|
517
|
-
isParticipantBlocked:
|
|
516
|
+
const [g, c] = $(!1), x = H(null), w = Js(), b = q(() => c(!1), []), {
|
|
517
|
+
isParticipantBlocked: p,
|
|
518
518
|
isCheckingBlockedStatus: v,
|
|
519
519
|
isLeaving: _,
|
|
520
|
-
isUpdatingBlockStatus:
|
|
521
|
-
handleLeaveConversation:
|
|
522
|
-
handleBlockUser:
|
|
520
|
+
isUpdatingBlockStatus: k,
|
|
521
|
+
handleLeaveConversation: L,
|
|
522
|
+
handleBlockUser: T,
|
|
523
523
|
handleUnblockUser: z,
|
|
524
524
|
handleReportUser: P
|
|
525
525
|
} = ka({
|
|
@@ -532,7 +532,7 @@ const ye = ({
|
|
|
532
532
|
onDeleteConversationClick: o,
|
|
533
533
|
onBlockParticipantClick: d,
|
|
534
534
|
onReportParticipantClick: m,
|
|
535
|
-
onActionComplete:
|
|
535
|
+
onActionComplete: b,
|
|
536
536
|
logLabel: "ChannelActionsMenu"
|
|
537
537
|
});
|
|
538
538
|
return Y(() => {
|
|
@@ -566,7 +566,7 @@ const ye = ({
|
|
|
566
566
|
{
|
|
567
567
|
id: w,
|
|
568
568
|
"aria-label": "Conversation options",
|
|
569
|
-
className:
|
|
569
|
+
className: N(
|
|
570
570
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
571
571
|
"rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
|
|
572
572
|
),
|
|
@@ -574,7 +574,7 @@ const ye = ({
|
|
|
574
574
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(
|
|
575
575
|
Ne,
|
|
576
576
|
{
|
|
577
|
-
onClick:
|
|
577
|
+
onClick: L,
|
|
578
578
|
disabled: _,
|
|
579
579
|
"aria-busy": _,
|
|
580
580
|
children: [
|
|
@@ -590,25 +590,25 @@ const ye = ({
|
|
|
590
590
|
/* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }),
|
|
591
591
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
592
592
|
] })
|
|
593
|
-
) :
|
|
593
|
+
) : p ? /* @__PURE__ */ h(
|
|
594
594
|
Ne,
|
|
595
595
|
{
|
|
596
596
|
onClick: z,
|
|
597
|
-
disabled:
|
|
598
|
-
"aria-busy":
|
|
597
|
+
disabled: k,
|
|
598
|
+
"aria-busy": k,
|
|
599
599
|
children: [
|
|
600
|
-
|
|
600
|
+
k ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
|
|
601
601
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
602
602
|
]
|
|
603
603
|
}
|
|
604
604
|
) : /* @__PURE__ */ h(
|
|
605
605
|
Ne,
|
|
606
606
|
{
|
|
607
|
-
onClick:
|
|
608
|
-
disabled:
|
|
609
|
-
"aria-busy":
|
|
607
|
+
onClick: T,
|
|
608
|
+
disabled: k,
|
|
609
|
+
"aria-busy": k,
|
|
610
610
|
children: [
|
|
611
|
-
|
|
611
|
+
k ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
|
|
612
612
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
613
613
|
]
|
|
614
614
|
}
|
|
@@ -640,20 +640,20 @@ const ye = ({
|
|
|
640
640
|
showChannelInfo: x = !0,
|
|
641
641
|
onParticipantNameClick: w
|
|
642
642
|
}) => {
|
|
643
|
-
var C, D, S,
|
|
644
|
-
const { channel:
|
|
643
|
+
var C, D, S, A;
|
|
644
|
+
const { channel: b } = fe(), { client: p } = Ee(), v = F.useMemo(
|
|
645
645
|
() => {
|
|
646
646
|
var E;
|
|
647
647
|
return fs(
|
|
648
|
-
(E =
|
|
649
|
-
|
|
650
|
-
|
|
648
|
+
(E = b.state) == null ? void 0 : E.members,
|
|
649
|
+
p == null ? void 0 : p.userID,
|
|
650
|
+
b.type
|
|
651
651
|
);
|
|
652
652
|
},
|
|
653
|
-
[(C =
|
|
654
|
-
), _ = gs(v == null ? void 0 : v.user),
|
|
653
|
+
[(C = b.state) == null ? void 0 : C.members, p == null ? void 0 : p.userID, b.type]
|
|
654
|
+
), _ = gs(v == null ? void 0 : v.user), k = (D = v == null ? void 0 : v.user) == null ? void 0 : D.image, L = hs(b), T = Ea((S = b.data) == null ? void 0 : S.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, z = a && L, P = T || z || !!w, U = async () => {
|
|
655
655
|
try {
|
|
656
|
-
|
|
656
|
+
L ? await b.unpin() : await b.pin();
|
|
657
657
|
} catch (E) {
|
|
658
658
|
console.error(
|
|
659
659
|
"[ChannelHeaderRedesign] Failed to update pinned status:",
|
|
@@ -664,9 +664,9 @@ const ye = ({
|
|
|
664
664
|
/* @__PURE__ */ s(
|
|
665
665
|
ye,
|
|
666
666
|
{
|
|
667
|
-
id: ((
|
|
667
|
+
id: ((A = v == null ? void 0 : v.user) == null ? void 0 : A.id) || b.id || "unknown",
|
|
668
668
|
name: _,
|
|
669
|
-
image:
|
|
669
|
+
image: k,
|
|
670
670
|
shape: "circle",
|
|
671
671
|
size: 48,
|
|
672
672
|
className: "-mb-2"
|
|
@@ -675,14 +675,14 @@ const ye = ({
|
|
|
675
675
|
/* @__PURE__ */ s(
|
|
676
676
|
"span",
|
|
677
677
|
{
|
|
678
|
-
className:
|
|
678
|
+
className: N(
|
|
679
679
|
"relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95",
|
|
680
680
|
P ? "pl-3 pr-2" : "px-3"
|
|
681
681
|
),
|
|
682
682
|
children: /* @__PURE__ */ h("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
683
683
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: _ }),
|
|
684
684
|
P && /* @__PURE__ */ h("span", { className: "ml-2 flex gap-1", children: [
|
|
685
|
-
|
|
685
|
+
T && /* @__PURE__ */ s(
|
|
686
686
|
"span",
|
|
687
687
|
{
|
|
688
688
|
"aria-label": "Paid customer",
|
|
@@ -714,7 +714,7 @@ const ye = ({
|
|
|
714
714
|
return /* @__PURE__ */ s(
|
|
715
715
|
"div",
|
|
716
716
|
{
|
|
717
|
-
className:
|
|
717
|
+
className: N(
|
|
718
718
|
"@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
|
|
719
719
|
e
|
|
720
720
|
),
|
|
@@ -722,7 +722,7 @@ const ye = ({
|
|
|
722
722
|
/* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
|
|
723
723
|
"button",
|
|
724
724
|
{
|
|
725
|
-
className:
|
|
725
|
+
className: N(
|
|
726
726
|
qe,
|
|
727
727
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
728
728
|
),
|
|
@@ -750,16 +750,16 @@ const ye = ({
|
|
|
750
750
|
className: qe,
|
|
751
751
|
onClick: U,
|
|
752
752
|
type: "button",
|
|
753
|
-
"aria-pressed":
|
|
754
|
-
"aria-label":
|
|
753
|
+
"aria-pressed": L,
|
|
754
|
+
"aria-label": L ? "Unstar conversation" : "Star conversation",
|
|
755
755
|
children: /* @__PURE__ */ s(
|
|
756
756
|
st,
|
|
757
757
|
{
|
|
758
|
-
className:
|
|
759
|
-
"text-[#FFD60A]":
|
|
760
|
-
"text-black/90": !
|
|
758
|
+
className: N("size-5", {
|
|
759
|
+
"text-[#FFD60A]": L,
|
|
760
|
+
"text-black/90": !L
|
|
761
761
|
}),
|
|
762
|
-
weight:
|
|
762
|
+
weight: L ? "fill" : "regular"
|
|
763
763
|
}
|
|
764
764
|
)
|
|
765
765
|
}
|
|
@@ -767,7 +767,7 @@ const ye = ({
|
|
|
767
767
|
x && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
768
768
|
Ca,
|
|
769
769
|
{
|
|
770
|
-
channel:
|
|
770
|
+
channel: b,
|
|
771
771
|
participant: v,
|
|
772
772
|
showDeleteConversation: l,
|
|
773
773
|
showBlockParticipant: o,
|
|
@@ -905,8 +905,8 @@ const $a = (e) => {
|
|
|
905
905
|
muted: d = !1,
|
|
906
906
|
onContainerClick: m
|
|
907
907
|
}) => {
|
|
908
|
-
const f = de(t), u = H(null), g = H(null), c = H(null), x = H(r), [w,
|
|
909
|
-
P(!1),
|
|
908
|
+
const f = de(t), u = H(null), g = H(null), c = H(null), x = H(r), [w, b] = $(a), [p, v] = $(0), [_, k] = $(!1), [L, T] = $(!1), [z, P] = $(!1), [U, R] = $(!1), [C, D] = $(!0), [S, A] = $(null), E = q(() => {
|
|
909
|
+
P(!1), b(!0);
|
|
910
910
|
}, []), B = q((y) => {
|
|
911
911
|
const I = g.current;
|
|
912
912
|
if (!I) return 0;
|
|
@@ -919,12 +919,12 @@ const $a = (e) => {
|
|
|
919
919
|
const I = u.current;
|
|
920
920
|
I && I.duration && (I.currentTime = y * I.duration);
|
|
921
921
|
}, []), j = (y) => {
|
|
922
|
-
y.stopPropagation(),
|
|
922
|
+
y.stopPropagation(), k(!0);
|
|
923
923
|
const I = B(y);
|
|
924
924
|
v(I), O(I);
|
|
925
925
|
};
|
|
926
926
|
Y(() => {
|
|
927
|
-
r !== void 0 && r !== x.current && (x.current = r,
|
|
927
|
+
r !== void 0 && r !== x.current && (x.current = r, b(r));
|
|
928
928
|
}, [r]), Y(() => {
|
|
929
929
|
if (!w) {
|
|
930
930
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
@@ -940,18 +940,18 @@ const $a = (e) => {
|
|
|
940
940
|
}, [w, _]), Y(() => {
|
|
941
941
|
const y = u.current;
|
|
942
942
|
y && (w ? y.play().catch((I) => {
|
|
943
|
-
|
|
943
|
+
b(!1), P(!0);
|
|
944
944
|
}) : y.pause());
|
|
945
945
|
}, [w]), Y(() => {
|
|
946
946
|
if (!_) return;
|
|
947
947
|
const y = (W) => v(B(W)), I = (W) => {
|
|
948
|
-
|
|
948
|
+
k(!1), O(B(W));
|
|
949
949
|
};
|
|
950
950
|
return window.addEventListener("mousemove", y), window.addEventListener("mouseup", I), window.addEventListener("touchmove", y, { passive: !0 }), window.addEventListener("touchend", I), () => {
|
|
951
951
|
window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", y), window.removeEventListener("touchend", I);
|
|
952
952
|
};
|
|
953
953
|
}, [_, B, O]);
|
|
954
|
-
const K = S ? { aspectRatio: String(S) } : void 0, se = S ? "" : " aspect-video", G = Math.round(
|
|
954
|
+
const K = S ? { aspectRatio: String(S) } : void 0, se = S ? "" : " aspect-video", G = Math.round(p * 100);
|
|
955
955
|
return /* @__PURE__ */ h(
|
|
956
956
|
"div",
|
|
957
957
|
{
|
|
@@ -964,7 +964,7 @@ const $a = (e) => {
|
|
|
964
964
|
m(y);
|
|
965
965
|
return;
|
|
966
966
|
}
|
|
967
|
-
z || l &&
|
|
967
|
+
z || l && b((I) => !I);
|
|
968
968
|
},
|
|
969
969
|
onKeyDown: (y) => {
|
|
970
970
|
if (!(y.key !== "Enter" && y.key !== " ")) {
|
|
@@ -972,7 +972,7 @@ const $a = (e) => {
|
|
|
972
972
|
m(y);
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
975
|
-
z || l &&
|
|
975
|
+
z || l && b((I) => !I);
|
|
976
976
|
}
|
|
977
977
|
},
|
|
978
978
|
children: [
|
|
@@ -1003,7 +1003,7 @@ const $a = (e) => {
|
|
|
1003
1003
|
onWaiting: () => R(!0),
|
|
1004
1004
|
onPlay: () => P(!1),
|
|
1005
1005
|
onEnded: () => {
|
|
1006
|
-
i || (
|
|
1006
|
+
i || (b(!1), v(0));
|
|
1007
1007
|
},
|
|
1008
1008
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1009
1009
|
}
|
|
@@ -1024,10 +1024,10 @@ const $a = (e) => {
|
|
|
1024
1024
|
onPlay: () => P(!1),
|
|
1025
1025
|
onLoadedMetadata: () => {
|
|
1026
1026
|
const y = u.current;
|
|
1027
|
-
y instanceof HTMLVideoElement && y.videoWidth && y.videoHeight &&
|
|
1027
|
+
y instanceof HTMLVideoElement && y.videoWidth && y.videoHeight && A(y.videoWidth / y.videoHeight);
|
|
1028
1028
|
},
|
|
1029
1029
|
onEnded: () => {
|
|
1030
|
-
i || (
|
|
1030
|
+
i || (b(!1), v(0));
|
|
1031
1031
|
},
|
|
1032
1032
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1033
1033
|
}
|
|
@@ -1070,7 +1070,7 @@ const $a = (e) => {
|
|
|
1070
1070
|
onTouchStart: j,
|
|
1071
1071
|
onClick: (y) => y.stopPropagation(),
|
|
1072
1072
|
onKeyDown: (y) => {
|
|
1073
|
-
y.key === "ArrowRight" && O(Math.min(1,
|
|
1073
|
+
y.key === "ArrowRight" && O(Math.min(1, p + 0.05)), y.key === "ArrowLeft" && O(Math.max(0, p - 0.05));
|
|
1074
1074
|
},
|
|
1075
1075
|
children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
|
|
1076
1076
|
"div",
|
|
@@ -1087,7 +1087,7 @@ const $a = (e) => {
|
|
|
1087
1087
|
{
|
|
1088
1088
|
type: "button",
|
|
1089
1089
|
onClick: (y) => {
|
|
1090
|
-
y.stopPropagation(),
|
|
1090
|
+
y.stopPropagation(), b((I) => !I);
|
|
1091
1091
|
},
|
|
1092
1092
|
className: "shrink-0 text-white",
|
|
1093
1093
|
"aria-label": w ? "Pause" : "Play",
|
|
@@ -1108,16 +1108,16 @@ const $a = (e) => {
|
|
|
1108
1108
|
onMouseDown: j,
|
|
1109
1109
|
onTouchStart: j,
|
|
1110
1110
|
onClick: (y) => y.stopPropagation(),
|
|
1111
|
-
onMouseEnter: () =>
|
|
1112
|
-
onMouseLeave: () =>
|
|
1111
|
+
onMouseEnter: () => T(!0),
|
|
1112
|
+
onMouseLeave: () => T(!1),
|
|
1113
1113
|
onKeyDown: (y) => {
|
|
1114
|
-
y.key === "ArrowRight" && O(Math.min(1,
|
|
1114
|
+
y.key === "ArrowRight" && O(Math.min(1, p + 0.05)), y.key === "ArrowLeft" && O(Math.max(0, p - 0.05));
|
|
1115
1115
|
},
|
|
1116
1116
|
children: [
|
|
1117
1117
|
/* @__PURE__ */ s(
|
|
1118
1118
|
"div",
|
|
1119
1119
|
{
|
|
1120
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
1120
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${L || _ ? "h-1.5" : "h-1"}`,
|
|
1121
1121
|
children: /* @__PURE__ */ s(
|
|
1122
1122
|
"div",
|
|
1123
1123
|
{
|
|
@@ -1130,7 +1130,7 @@ const $a = (e) => {
|
|
|
1130
1130
|
/* @__PURE__ */ s(
|
|
1131
1131
|
"div",
|
|
1132
1132
|
{
|
|
1133
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
1133
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${L || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1134
1134
|
style: { left: `${G}%` }
|
|
1135
1135
|
}
|
|
1136
1136
|
)
|
|
@@ -1241,7 +1241,7 @@ const $a = (e) => {
|
|
|
1241
1241
|
{
|
|
1242
1242
|
ref: f,
|
|
1243
1243
|
"data-testid": u,
|
|
1244
|
-
className:
|
|
1244
|
+
className: N(
|
|
1245
1245
|
"relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
1246
1246
|
g ? "bg-[#1e2330]" : "bg-white"
|
|
1247
1247
|
),
|
|
@@ -1253,7 +1253,7 @@ const $a = (e) => {
|
|
|
1253
1253
|
c.trim() !== "" && /* @__PURE__ */ s(
|
|
1254
1254
|
"p",
|
|
1255
1255
|
{
|
|
1256
|
-
className:
|
|
1256
|
+
className: N("mb-0.5 truncate text-base font-medium", {
|
|
1257
1257
|
"text-black": !g,
|
|
1258
1258
|
"text-white/30": g && x,
|
|
1259
1259
|
"text-white": g && !x
|
|
@@ -1263,7 +1263,7 @@ const $a = (e) => {
|
|
|
1263
1263
|
),
|
|
1264
1264
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1265
1265
|
we(r, {
|
|
1266
|
-
className:
|
|
1266
|
+
className: N(
|
|
1267
1267
|
"size-5 shrink-0",
|
|
1268
1268
|
g ? "text-white/55" : "text-black/55"
|
|
1269
1269
|
),
|
|
@@ -1272,7 +1272,7 @@ const $a = (e) => {
|
|
|
1272
1272
|
i != null && i !== "" && /* @__PURE__ */ s(
|
|
1273
1273
|
"span",
|
|
1274
1274
|
{
|
|
1275
|
-
className:
|
|
1275
|
+
className: N(
|
|
1276
1276
|
"text-xs font-medium",
|
|
1277
1277
|
g ? "text-white/55" : "text-black/55"
|
|
1278
1278
|
),
|
|
@@ -1547,7 +1547,7 @@ const Ns = ({
|
|
|
1547
1547
|
{
|
|
1548
1548
|
"data-testid": m,
|
|
1549
1549
|
"data-group-position": a,
|
|
1550
|
-
className:
|
|
1550
|
+
className: N(
|
|
1551
1551
|
// Defaults describe a 280px-wide document / audio / link
|
|
1552
1552
|
// bubble: that width matches the mobile chat attachment and
|
|
1553
1553
|
// the 8px / 16px inset matches `--str-chat__spacing-2
|
|
@@ -1581,7 +1581,7 @@ const Ns = ({
|
|
|
1581
1581
|
f ? /* @__PURE__ */ s(
|
|
1582
1582
|
"p",
|
|
1583
1583
|
{
|
|
1584
|
-
className:
|
|
1584
|
+
className: N(
|
|
1585
1585
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
1586
1586
|
// the same font family + size as `.str-chat__message-text`
|
|
1587
1587
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -1613,7 +1613,7 @@ const Ns = ({
|
|
|
1613
1613
|
a.stopPropagation(), e();
|
|
1614
1614
|
},
|
|
1615
1615
|
"aria-label": n,
|
|
1616
|
-
className:
|
|
1616
|
+
className: N(
|
|
1617
1617
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
1618
1618
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
1619
1619
|
),
|
|
@@ -1747,13 +1747,13 @@ const gr = {
|
|
|
1747
1747
|
const d = n ?? t ?? "File", m = fr(a, t, r), f = /* @__PURE__ */ s(
|
|
1748
1748
|
"div",
|
|
1749
1749
|
{
|
|
1750
|
-
className:
|
|
1750
|
+
className: N(
|
|
1751
1751
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1752
1752
|
pr[e]
|
|
1753
1753
|
),
|
|
1754
1754
|
"aria-hidden": !0,
|
|
1755
1755
|
children: we(a, {
|
|
1756
|
-
className:
|
|
1756
|
+
className: N("size-6", br[e]),
|
|
1757
1757
|
weight: "regular"
|
|
1758
1758
|
})
|
|
1759
1759
|
}
|
|
@@ -1762,7 +1762,7 @@ const gr = {
|
|
|
1762
1762
|
m ? /* @__PURE__ */ s(
|
|
1763
1763
|
"p",
|
|
1764
1764
|
{
|
|
1765
|
-
className:
|
|
1765
|
+
className: N(
|
|
1766
1766
|
"truncate text-xs leading-4",
|
|
1767
1767
|
gr[e]
|
|
1768
1768
|
),
|
|
@@ -1775,7 +1775,7 @@ const gr = {
|
|
|
1775
1775
|
type: "button",
|
|
1776
1776
|
onClick: i,
|
|
1777
1777
|
"aria-label": l,
|
|
1778
|
-
className:
|
|
1778
|
+
className: N(
|
|
1779
1779
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
1780
1780
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
1781
1781
|
),
|
|
@@ -1855,19 +1855,19 @@ const vr = ({
|
|
|
1855
1855
|
mimeType: r,
|
|
1856
1856
|
title: i,
|
|
1857
1857
|
items: l
|
|
1858
|
-
}), x = (
|
|
1859
|
-
if ((m == null ? void 0 : m(
|
|
1860
|
-
const
|
|
1861
|
-
if (!
|
|
1862
|
-
const v =
|
|
1863
|
-
Ss(
|
|
1858
|
+
}), x = (b) => {
|
|
1859
|
+
if ((m == null ? void 0 : m(b)) === !1) return;
|
|
1860
|
+
const p = c[b];
|
|
1861
|
+
if (!p) return;
|
|
1862
|
+
const v = p.filename ?? re(p.src);
|
|
1863
|
+
Ss(p.src, v);
|
|
1864
1864
|
};
|
|
1865
1865
|
if (c.length === 0)
|
|
1866
1866
|
return null;
|
|
1867
1867
|
const w = /* @__PURE__ */ s(
|
|
1868
1868
|
"span",
|
|
1869
1869
|
{
|
|
1870
|
-
className:
|
|
1870
|
+
className: N(
|
|
1871
1871
|
"flex size-8 items-center justify-center rounded-full",
|
|
1872
1872
|
u === "dark" ? "text-white/70" : "text-black/70"
|
|
1873
1873
|
),
|
|
@@ -1882,16 +1882,16 @@ const vr = ({
|
|
|
1882
1882
|
text: o,
|
|
1883
1883
|
groupPosition: d,
|
|
1884
1884
|
"data-testid": "file-attachment",
|
|
1885
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((
|
|
1885
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, p) => /* @__PURE__ */ s(
|
|
1886
1886
|
xr,
|
|
1887
1887
|
{
|
|
1888
1888
|
variant: u,
|
|
1889
|
-
item:
|
|
1890
|
-
index:
|
|
1889
|
+
item: b,
|
|
1890
|
+
index: p,
|
|
1891
1891
|
onActivate: x,
|
|
1892
|
-
trailingAction: g &&
|
|
1892
|
+
trailingAction: g && p === 0 ? /* @__PURE__ */ s(Te, { onClick: f, variant: "inline" }) : w
|
|
1893
1893
|
},
|
|
1894
|
-
`${
|
|
1894
|
+
`${b.src}-${p}`
|
|
1895
1895
|
)) })
|
|
1896
1896
|
}
|
|
1897
1897
|
);
|
|
@@ -1942,7 +1942,7 @@ const vr = ({
|
|
|
1942
1942
|
}));
|
|
1943
1943
|
},
|
|
1944
1944
|
[o, e, t, l]
|
|
1945
|
-
), f = r ?? n !== "pill", g = { className:
|
|
1945
|
+
), f = r ?? n !== "pill", g = { className: N(
|
|
1946
1946
|
n === "pill" ? "size-4" : "size-5",
|
|
1947
1947
|
"shrink-0"
|
|
1948
1948
|
), weight: "bold" };
|
|
@@ -1953,7 +1953,7 @@ const vr = ({
|
|
|
1953
1953
|
onClick: m,
|
|
1954
1954
|
disabled: o,
|
|
1955
1955
|
"aria-label": a,
|
|
1956
|
-
className:
|
|
1956
|
+
className: N(
|
|
1957
1957
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
1958
1958
|
{
|
|
1959
1959
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
@@ -1993,7 +1993,7 @@ const vr = ({
|
|
|
1993
1993
|
onClick: m,
|
|
1994
1994
|
disabled: o,
|
|
1995
1995
|
"aria-label": f ? a : void 0,
|
|
1996
|
-
className:
|
|
1996
|
+
className: N(
|
|
1997
1997
|
"mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
|
|
1998
1998
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
1999
1999
|
),
|
|
@@ -2202,7 +2202,7 @@ const vr = ({
|
|
|
2202
2202
|
if (i === 0) return null;
|
|
2203
2203
|
const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (f, u, g) => {
|
|
2204
2204
|
var x;
|
|
2205
|
-
const c =
|
|
2205
|
+
const c = N(
|
|
2206
2206
|
kr,
|
|
2207
2207
|
"h-full w-full",
|
|
2208
2208
|
(x = Cr[l.length]) == null ? void 0 : x[u]
|
|
@@ -2213,7 +2213,7 @@ const vr = ({
|
|
|
2213
2213
|
type: "button",
|
|
2214
2214
|
onClick: () => t(u),
|
|
2215
2215
|
"aria-label": f.ariaLabel ?? `Open media ${u + 1}`,
|
|
2216
|
-
className:
|
|
2216
|
+
className: N(c, "cursor-zoom-in"),
|
|
2217
2217
|
children: [
|
|
2218
2218
|
f.content,
|
|
2219
2219
|
g
|
|
@@ -2236,7 +2236,7 @@ const vr = ({
|
|
|
2236
2236
|
}), l.length === 1 ? /* @__PURE__ */ s(
|
|
2237
2237
|
"div",
|
|
2238
2238
|
{
|
|
2239
|
-
className:
|
|
2239
|
+
className: N(
|
|
2240
2240
|
a ? Er : "aspect-square w-full",
|
|
2241
2241
|
r
|
|
2242
2242
|
),
|
|
@@ -2246,7 +2246,7 @@ const vr = ({
|
|
|
2246
2246
|
) : l.length === 2 ? /* @__PURE__ */ s(
|
|
2247
2247
|
"div",
|
|
2248
2248
|
{
|
|
2249
|
-
className:
|
|
2249
|
+
className: N(
|
|
2250
2250
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
2251
2251
|
r
|
|
2252
2252
|
),
|
|
@@ -2255,7 +2255,7 @@ const vr = ({
|
|
|
2255
2255
|
) : l.length === 3 ? /* @__PURE__ */ h(
|
|
2256
2256
|
"div",
|
|
2257
2257
|
{
|
|
2258
|
-
className:
|
|
2258
|
+
className: N(
|
|
2259
2259
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
2260
2260
|
r
|
|
2261
2261
|
),
|
|
@@ -2268,7 +2268,7 @@ const vr = ({
|
|
|
2268
2268
|
) : /* @__PURE__ */ s(
|
|
2269
2269
|
"div",
|
|
2270
2270
|
{
|
|
2271
|
-
className:
|
|
2271
|
+
className: N(
|
|
2272
2272
|
// 379x286 is the content box of Figma's 383x290 stacked-media
|
|
2273
2273
|
// card (`attachment-single-image` 1973:13863) once its 2px
|
|
2274
2274
|
// frame is removed. Pinning the aspect on the container — as
|
|
@@ -2404,17 +2404,17 @@ const vr = ({
|
|
|
2404
2404
|
}) => {
|
|
2405
2405
|
const m = Ar({ src: t, alt: n, items: r }), f = Ae(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: x } = Le(
|
|
2406
2406
|
d
|
|
2407
|
-
), w = m.length === 1,
|
|
2407
|
+
), w = m.length === 1, b = Rr(w ? m[0] : void 0);
|
|
2408
2408
|
if (m.length === 0)
|
|
2409
2409
|
return null;
|
|
2410
|
-
const
|
|
2410
|
+
const p = m.map(
|
|
2411
2411
|
(v, _) => Tr({
|
|
2412
2412
|
item: v,
|
|
2413
2413
|
index: _,
|
|
2414
2414
|
totalCount: m.length,
|
|
2415
2415
|
fallbackLoading: o,
|
|
2416
|
-
imgRef: w ?
|
|
2417
|
-
onLoad: w ?
|
|
2416
|
+
imgRef: w ? b.imgRef : void 0,
|
|
2417
|
+
onLoad: w ? b.onLoad : void 0
|
|
2418
2418
|
})
|
|
2419
2419
|
);
|
|
2420
2420
|
return /* @__PURE__ */ h(
|
|
@@ -2432,9 +2432,9 @@ const vr = ({
|
|
|
2432
2432
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2433
2433
|
Ts,
|
|
2434
2434
|
{
|
|
2435
|
-
tiles:
|
|
2435
|
+
tiles: p,
|
|
2436
2436
|
onTileActivate: c,
|
|
2437
|
-
singleAspectRatio: w ?
|
|
2437
|
+
singleAspectRatio: w ? b.ratio : void 0
|
|
2438
2438
|
}
|
|
2439
2439
|
) }),
|
|
2440
2440
|
/* @__PURE__ */ s(
|
|
@@ -2545,10 +2545,10 @@ const vr = ({
|
|
|
2545
2545
|
}) => {
|
|
2546
2546
|
const f = Ae(e), u = $r({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: w } = Le(
|
|
2547
2547
|
d
|
|
2548
|
-
),
|
|
2548
|
+
), b = e === "composer" && !!m;
|
|
2549
2549
|
if (u.length === 0)
|
|
2550
2550
|
return null;
|
|
2551
|
-
const
|
|
2551
|
+
const p = u.map((v) => ({
|
|
2552
2552
|
src: v.src,
|
|
2553
2553
|
filename: v.filename ?? re(v.src)
|
|
2554
2554
|
}));
|
|
@@ -2561,13 +2561,13 @@ const vr = ({
|
|
|
2561
2561
|
"data-testid": "pdf-attachment",
|
|
2562
2562
|
children: [
|
|
2563
2563
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((v, _) => {
|
|
2564
|
-
const
|
|
2564
|
+
const k = v.filename ?? re(v.src), L = b && _ === 0 ? /* @__PURE__ */ s(Te, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2565
2565
|
Es,
|
|
2566
2566
|
{
|
|
2567
2567
|
url: v.src,
|
|
2568
|
-
filename:
|
|
2568
|
+
filename: k,
|
|
2569
2569
|
variant: "inline",
|
|
2570
|
-
label: `Download ${
|
|
2570
|
+
label: `Download ${k}`,
|
|
2571
2571
|
tone: f
|
|
2572
2572
|
}
|
|
2573
2573
|
);
|
|
@@ -2578,7 +2578,7 @@ const vr = ({
|
|
|
2578
2578
|
item: v,
|
|
2579
2579
|
index: _,
|
|
2580
2580
|
onActivate: x,
|
|
2581
|
-
trailingAction:
|
|
2581
|
+
trailingAction: L
|
|
2582
2582
|
},
|
|
2583
2583
|
`${v.src}-${_}`
|
|
2584
2584
|
);
|
|
@@ -2587,7 +2587,7 @@ const vr = ({
|
|
|
2587
2587
|
Br,
|
|
2588
2588
|
{
|
|
2589
2589
|
open: g,
|
|
2590
|
-
items:
|
|
2590
|
+
items: p,
|
|
2591
2591
|
initialIndex: c,
|
|
2592
2592
|
onClose: w
|
|
2593
2593
|
}
|
|
@@ -2733,8 +2733,8 @@ const vr = ({
|
|
|
2733
2733
|
);
|
|
2734
2734
|
if (f.length === 0)
|
|
2735
2735
|
return null;
|
|
2736
|
-
const
|
|
2737
|
-
(
|
|
2736
|
+
const b = f.map(
|
|
2737
|
+
(p, v) => Wr(p, v, f.length)
|
|
2738
2738
|
);
|
|
2739
2739
|
return /* @__PURE__ */ h(
|
|
2740
2740
|
Ie,
|
|
@@ -2744,7 +2744,7 @@ const vr = ({
|
|
|
2744
2744
|
groupPosition: o,
|
|
2745
2745
|
"data-testid": "video-attachment",
|
|
2746
2746
|
children: [
|
|
2747
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ts, { tiles:
|
|
2747
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ts, { tiles: b, onTileActivate: x }) }),
|
|
2748
2748
|
/* @__PURE__ */ s(
|
|
2749
2749
|
Ms,
|
|
2750
2750
|
{
|
|
@@ -2803,7 +2803,7 @@ const vr = ({
|
|
|
2803
2803
|
function ii(e) {
|
|
2804
2804
|
return _e(zs)[e] ?? ri[e];
|
|
2805
2805
|
}
|
|
2806
|
-
const oi = F.lazy(() => import("./Card-qS17qnN0.js")), li = F.lazy(() => import("./Card-
|
|
2806
|
+
const oi = F.lazy(() => import("./Card-qS17qnN0.js")), li = F.lazy(() => import("./Card-C0e9vL3X.js")), ci = () => /* @__PURE__ */ s(
|
|
2807
2807
|
"div",
|
|
2808
2808
|
{
|
|
2809
2809
|
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)]",
|
|
@@ -2887,7 +2887,7 @@ const oi = F.lazy(() => import("./Card-qS17qnN0.js")), li = F.lazy(() => import(
|
|
|
2887
2887
|
"button",
|
|
2888
2888
|
{
|
|
2889
2889
|
type: "button",
|
|
2890
|
-
className:
|
|
2890
|
+
className: N("message-vote-button focus-ring", {
|
|
2891
2891
|
"message-vote-button--selected": e === "up"
|
|
2892
2892
|
}),
|
|
2893
2893
|
onClick: t,
|
|
@@ -2901,7 +2901,7 @@ const oi = F.lazy(() => import("./Card-qS17qnN0.js")), li = F.lazy(() => import(
|
|
|
2901
2901
|
"button",
|
|
2902
2902
|
{
|
|
2903
2903
|
type: "button",
|
|
2904
|
-
className:
|
|
2904
|
+
className: N("message-vote-button focus-ring", {
|
|
2905
2905
|
"message-vote-button--selected": e === "down"
|
|
2906
2906
|
}),
|
|
2907
2907
|
onClick: n,
|
|
@@ -3032,7 +3032,7 @@ const yi = {
|
|
|
3032
3032
|
secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
|
|
3033
3033
|
}
|
|
3034
3034
|
}, Ni = ({ variant: e, cta: t }) => {
|
|
3035
|
-
const n = t.variant ?? "primary", a =
|
|
3035
|
+
const n = t.variant ?? "primary", a = N(
|
|
3036
3036
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
3037
3037
|
yi[e][n]
|
|
3038
3038
|
), r = _t(t.href);
|
|
@@ -3072,59 +3072,60 @@ const yi = {
|
|
|
3072
3072
|
light: "bg-black/15"
|
|
3073
3073
|
}, yt = ({
|
|
3074
3074
|
variant: e,
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3075
|
+
ctaSurface: t,
|
|
3076
|
+
chinTextColor: n,
|
|
3077
|
+
title: a,
|
|
3078
|
+
placeholderTitle: r,
|
|
3079
|
+
description: i,
|
|
3080
|
+
url: l,
|
|
3081
|
+
appIcon: o,
|
|
3082
|
+
cta: d,
|
|
3083
|
+
trailingAction: m,
|
|
3084
|
+
isLoading: f = !1
|
|
3084
3085
|
}) => {
|
|
3085
|
-
const
|
|
3086
|
-
if (!
|
|
3086
|
+
const u = e === "dark", g = a ?? (u ? r : void 0) ?? "", c = g.trim() !== "", x = i != null && i.trim() !== "", w = typeof l == "string" ? l.trim() : "", b = w !== "", p = d != null;
|
|
3087
|
+
if (!f && !c && !x && !b && !p)
|
|
3087
3088
|
return null;
|
|
3088
|
-
const
|
|
3089
|
+
const v = u && !a, _ = N(
|
|
3089
3090
|
"line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
|
|
3090
|
-
|
|
3091
|
-
),
|
|
3091
|
+
n == null && (v ? Ci : ki[e])
|
|
3092
|
+
), k = N(
|
|
3092
3093
|
"truncate text-[12px] leading-4 tracking-[0.24px]",
|
|
3093
|
-
|
|
3094
|
+
n == null && Si[e]
|
|
3094
3095
|
);
|
|
3095
|
-
if (
|
|
3096
|
-
const
|
|
3096
|
+
if (f) {
|
|
3097
|
+
const T = N(
|
|
3097
3098
|
"animate-pulse rounded",
|
|
3098
3099
|
Ei[e]
|
|
3099
3100
|
);
|
|
3100
3101
|
return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
3101
|
-
/* @__PURE__ */ s("div", { className:
|
|
3102
|
-
/* @__PURE__ */ s("div", { className:
|
|
3102
|
+
/* @__PURE__ */ s("div", { className: N("h-5 w-3/4", T), "aria-hidden": !0 }),
|
|
3103
|
+
/* @__PURE__ */ s("div", { className: N("h-4 w-1/2", T), "aria-hidden": !0 })
|
|
3103
3104
|
] }) });
|
|
3104
3105
|
}
|
|
3105
|
-
const
|
|
3106
|
+
const L = n ? { color: n } : void 0;
|
|
3106
3107
|
return /* @__PURE__ */ h("div", { className: "shrink-0 px-4 py-3", children: [
|
|
3107
3108
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
3108
3109
|
/* @__PURE__ */ h("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
|
|
3109
|
-
|
|
3110
|
-
|
|
3110
|
+
c && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3111
|
+
o ? /* @__PURE__ */ s("span", { className: "shrink-0", children: o }) : null,
|
|
3111
3112
|
/* @__PURE__ */ s(
|
|
3112
3113
|
"p",
|
|
3113
3114
|
{
|
|
3114
|
-
className:
|
|
3115
|
-
style:
|
|
3116
|
-
children:
|
|
3115
|
+
className: N("min-w-0", _),
|
|
3116
|
+
style: L,
|
|
3117
|
+
children: g
|
|
3117
3118
|
}
|
|
3118
3119
|
)
|
|
3119
3120
|
] }),
|
|
3120
|
-
|
|
3121
|
-
!p &&
|
|
3121
|
+
x && /* @__PURE__ */ s("p", { className: k, style: L, children: i }),
|
|
3122
|
+
!p && b && /* @__PURE__ */ s("p", { className: k, style: L, children: w })
|
|
3122
3123
|
] }),
|
|
3123
|
-
|
|
3124
|
+
m && /* @__PURE__ */ s("div", { className: "shrink-0", children: m })
|
|
3124
3125
|
] }),
|
|
3125
|
-
|
|
3126
|
+
d && /* @__PURE__ */ s(Ni, { variant: t ?? e, cta: d })
|
|
3126
3127
|
] });
|
|
3127
|
-
}, Ii = "Loading link preview", Ti =
|
|
3128
|
+
}, Ii = "Loading link preview", Ti = N(
|
|
3128
3129
|
"relative w-[290px] select-none overflow-hidden",
|
|
3129
3130
|
// 20px corners — no token exists for it in the component-library preset,
|
|
3130
3131
|
// whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
|
|
@@ -3143,7 +3144,7 @@ const yi = {
|
|
|
3143
3144
|
busy: f = !1,
|
|
3144
3145
|
"data-testid": u
|
|
3145
3146
|
}) => {
|
|
3146
|
-
const g = n != null || a != null, c =
|
|
3147
|
+
const g = n != null || a != null, c = N(
|
|
3147
3148
|
"messaging-link-card",
|
|
3148
3149
|
Ti,
|
|
3149
3150
|
m ? Ai : "block",
|
|
@@ -3168,7 +3169,7 @@ const yi = {
|
|
|
3168
3169
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
3169
3170
|
// with offset, so keyboard users can see the focused card.
|
|
3170
3171
|
g ? "cursor-pointer no-underline focus-ring" : null
|
|
3171
|
-
), x = f ? { role: "status", "aria-busy": !0, "aria-label": Ii } : void 0, w = d ? { "--accent": d } : void 0,
|
|
3172
|
+
), x = f ? { role: "status", "aria-busy": !0, "aria-label": Ii } : void 0, w = d ? { "--accent": d } : void 0, b = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
|
|
3172
3173
|
return n ? /* @__PURE__ */ h(
|
|
3173
3174
|
"a",
|
|
3174
3175
|
{
|
|
@@ -3184,7 +3185,7 @@ const yi = {
|
|
|
3184
3185
|
...x,
|
|
3185
3186
|
children: [
|
|
3186
3187
|
t,
|
|
3187
|
-
|
|
3188
|
+
b
|
|
3188
3189
|
]
|
|
3189
3190
|
}
|
|
3190
3191
|
) : a ? /* @__PURE__ */ h(
|
|
@@ -3196,12 +3197,12 @@ const yi = {
|
|
|
3196
3197
|
"aria-label": r,
|
|
3197
3198
|
"data-testid": u,
|
|
3198
3199
|
"data-variant": e,
|
|
3199
|
-
className:
|
|
3200
|
+
className: N(c, "text-left"),
|
|
3200
3201
|
style: w,
|
|
3201
3202
|
...x,
|
|
3202
3203
|
children: [
|
|
3203
3204
|
t,
|
|
3204
|
-
|
|
3205
|
+
b
|
|
3205
3206
|
]
|
|
3206
3207
|
}
|
|
3207
3208
|
) : /* @__PURE__ */ h(
|
|
@@ -3215,7 +3216,7 @@ const yi = {
|
|
|
3215
3216
|
...x,
|
|
3216
3217
|
children: [
|
|
3217
3218
|
t,
|
|
3218
|
-
|
|
3219
|
+
b
|
|
3219
3220
|
]
|
|
3220
3221
|
}
|
|
3221
3222
|
);
|
|
@@ -3253,7 +3254,7 @@ const yi = {
|
|
|
3253
3254
|
) }) : /* @__PURE__ */ h(
|
|
3254
3255
|
"div",
|
|
3255
3256
|
{
|
|
3256
|
-
className:
|
|
3257
|
+
className: N(
|
|
3257
3258
|
// `flex-1 min-h-0` inside the shell's 250px column: the hero takes
|
|
3258
3259
|
// every pixel the chin doesn't, which is 168px at a two-line title
|
|
3259
3260
|
// and 188px at one.
|
|
@@ -3270,7 +3271,7 @@ const yi = {
|
|
|
3270
3271
|
/* @__PURE__ */ s(
|
|
3271
3272
|
"div",
|
|
3272
3273
|
{
|
|
3273
|
-
className:
|
|
3274
|
+
className: N(
|
|
3274
3275
|
"h-full w-full animate-pulse",
|
|
3275
3276
|
Jt[e]
|
|
3276
3277
|
),
|
|
@@ -3314,7 +3315,7 @@ const yi = {
|
|
|
3314
3315
|
) : /* @__PURE__ */ s(
|
|
3315
3316
|
"div",
|
|
3316
3317
|
{
|
|
3317
|
-
className:
|
|
3318
|
+
className: N(
|
|
3318
3319
|
"flex h-full w-full items-center justify-center",
|
|
3319
3320
|
Jt[e]
|
|
3320
3321
|
),
|
|
@@ -3358,6 +3359,7 @@ function Ct({
|
|
|
3358
3359
|
thumbnailUrl: o ? void 0 : r,
|
|
3359
3360
|
accentHex: c,
|
|
3360
3361
|
chinTextColor: x,
|
|
3362
|
+
surface: f ? "light" : e,
|
|
3361
3363
|
isLoading: n === "loading",
|
|
3362
3364
|
onImageError: m
|
|
3363
3365
|
};
|
|
@@ -3379,7 +3381,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3379
3381
|
onEditClick: c,
|
|
3380
3382
|
dismissLabel: x = "Dismiss attachment"
|
|
3381
3383
|
}) => {
|
|
3382
|
-
const w = o === "classic",
|
|
3384
|
+
const w = o === "classic", b = Me(r, l), p = Ct({
|
|
3383
3385
|
variant: "dark",
|
|
3384
3386
|
accentColor: f,
|
|
3385
3387
|
status: u,
|
|
@@ -3393,9 +3395,9 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3393
3395
|
type: "button",
|
|
3394
3396
|
onClick: g,
|
|
3395
3397
|
"aria-label": x,
|
|
3396
|
-
className:
|
|
3398
|
+
className: N(
|
|
3397
3399
|
Oi,
|
|
3398
|
-
!
|
|
3400
|
+
!b && zi
|
|
3399
3401
|
),
|
|
3400
3402
|
children: /* @__PURE__ */ s(ot, { className: "size-3", weight: "bold" })
|
|
3401
3403
|
}
|
|
@@ -3409,7 +3411,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3409
3411
|
children: /* @__PURE__ */ s(oa, { className: "size-5", weight: "regular" })
|
|
3410
3412
|
}
|
|
3411
3413
|
) : void 0;
|
|
3412
|
-
return
|
|
3414
|
+
return b && !p.isLoading ? /* @__PURE__ */ s(Fe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3413
3415
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3414
3416
|
$e,
|
|
3415
3417
|
{
|
|
@@ -3425,28 +3427,29 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3425
3427
|
{
|
|
3426
3428
|
variant: "dark",
|
|
3427
3429
|
fixedHeight: !w,
|
|
3428
|
-
accentHex:
|
|
3429
|
-
busy:
|
|
3430
|
+
accentHex: p.accentHex,
|
|
3431
|
+
busy: p.isLoading,
|
|
3430
3432
|
topRight: w ? v : void 0,
|
|
3431
3433
|
children: [
|
|
3432
3434
|
!w && /* @__PURE__ */ s(
|
|
3433
3435
|
$e,
|
|
3434
3436
|
{
|
|
3435
3437
|
variant: "dark",
|
|
3436
|
-
thumbnailUrl:
|
|
3438
|
+
thumbnailUrl: p.thumbnailUrl,
|
|
3437
3439
|
sourceUrl: l,
|
|
3438
3440
|
title: e,
|
|
3439
3441
|
mimeType: r,
|
|
3440
3442
|
topRight: v,
|
|
3441
|
-
isLoading:
|
|
3442
|
-
onImageError:
|
|
3443
|
+
isLoading: p.isLoading,
|
|
3444
|
+
onImageError: p.onImageError
|
|
3443
3445
|
}
|
|
3444
3446
|
),
|
|
3445
3447
|
/* @__PURE__ */ s(
|
|
3446
3448
|
yt,
|
|
3447
3449
|
{
|
|
3448
|
-
chinTextColor:
|
|
3450
|
+
chinTextColor: p.chinTextColor,
|
|
3449
3451
|
variant: "dark",
|
|
3452
|
+
ctaSurface: p.surface,
|
|
3450
3453
|
title: e,
|
|
3451
3454
|
placeholderTitle: t,
|
|
3452
3455
|
description: n,
|
|
@@ -3454,7 +3457,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3454
3457
|
appIcon: d,
|
|
3455
3458
|
cta: m,
|
|
3456
3459
|
trailingAction: _,
|
|
3457
|
-
isLoading:
|
|
3460
|
+
isLoading: p.isLoading
|
|
3458
3461
|
}
|
|
3459
3462
|
)
|
|
3460
3463
|
]
|
|
@@ -3478,7 +3481,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3478
3481
|
"data-testid": "link-card-tail",
|
|
3479
3482
|
"data-variant": t === "sender" ? "dark" : "light",
|
|
3480
3483
|
style: e ? { "--accent": e } : void 0,
|
|
3481
|
-
className:
|
|
3484
|
+
className: N(
|
|
3482
3485
|
"messaging-link-card-tail",
|
|
3483
3486
|
t === "receiver" && "messaging-link-card-tail--received"
|
|
3484
3487
|
)
|
|
@@ -3500,11 +3503,11 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3500
3503
|
onClick: u,
|
|
3501
3504
|
groupPosition: g = "single"
|
|
3502
3505
|
}) => {
|
|
3503
|
-
const c = Nt(a, i), x = _t(n), w = d == null && x != null && !c ? x : void 0,
|
|
3506
|
+
const c = Nt(a, i), x = _t(n), w = d == null && x != null && !c ? x : void 0, b = d == null && !c ? u : void 0, p = f !== "loading" && Me(a, i) ? kt : void 0, v = d && u ? {
|
|
3504
3507
|
...d,
|
|
3505
3508
|
onClick: () => {
|
|
3506
|
-
var
|
|
3507
|
-
u(), (
|
|
3509
|
+
var k;
|
|
3510
|
+
u(), (k = d.onClick) == null || k.call(d);
|
|
3508
3511
|
}
|
|
3509
3512
|
} : d, _ = Ct({
|
|
3510
3513
|
variant: "light",
|
|
@@ -3520,18 +3523,18 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3520
3523
|
{
|
|
3521
3524
|
accentHex: _.accentHex,
|
|
3522
3525
|
side: "receiver",
|
|
3523
|
-
visible:
|
|
3526
|
+
visible: p == null && (g === "single" || g === "end"),
|
|
3524
3527
|
children: /* @__PURE__ */ h(
|
|
3525
3528
|
Fe,
|
|
3526
3529
|
{
|
|
3527
3530
|
variant: "light",
|
|
3528
3531
|
href: w,
|
|
3529
|
-
onClick:
|
|
3532
|
+
onClick: b,
|
|
3530
3533
|
ariaLabel: e ?? "Open attachment preview",
|
|
3531
|
-
fixedHeight: l === "featured" &&
|
|
3534
|
+
fixedHeight: l === "featured" && p == null,
|
|
3532
3535
|
accentHex: _.accentHex,
|
|
3533
3536
|
busy: _.isLoading,
|
|
3534
|
-
bgClassName:
|
|
3537
|
+
bgClassName: p,
|
|
3535
3538
|
"data-testid": "link-attachment",
|
|
3536
3539
|
children: [
|
|
3537
3540
|
l === "featured" && /* @__PURE__ */ s(
|
|
@@ -3551,6 +3554,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3551
3554
|
{
|
|
3552
3555
|
chinTextColor: _.chinTextColor,
|
|
3553
3556
|
variant: "light",
|
|
3557
|
+
ctaSurface: _.surface,
|
|
3554
3558
|
title: e,
|
|
3555
3559
|
description: t,
|
|
3556
3560
|
url: n,
|
|
@@ -3580,7 +3584,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3580
3584
|
onClick: g,
|
|
3581
3585
|
groupPosition: c = "single"
|
|
3582
3586
|
}) => {
|
|
3583
|
-
const x = Nt(r, l), w = _t(a),
|
|
3587
|
+
const x = Nt(r, l), w = _t(a), b = m == null && w != null && !x ? w : void 0, p = m == null && !x && b != null ? g : void 0, v = u !== "loading" && Me(r, l), _ = Ct({
|
|
3584
3588
|
variant: "dark",
|
|
3585
3589
|
accentColor: f,
|
|
3586
3590
|
status: u,
|
|
@@ -3599,8 +3603,8 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3599
3603
|
Fe,
|
|
3600
3604
|
{
|
|
3601
3605
|
variant: "dark",
|
|
3602
|
-
href:
|
|
3603
|
-
onClick:
|
|
3606
|
+
href: b,
|
|
3607
|
+
onClick: p,
|
|
3604
3608
|
fixedHeight: o === "featured" && !v,
|
|
3605
3609
|
accentHex: _.accentHex,
|
|
3606
3610
|
busy: _.isLoading,
|
|
@@ -3623,6 +3627,7 @@ const Oi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3623
3627
|
{
|
|
3624
3628
|
chinTextColor: _.chinTextColor,
|
|
3625
3629
|
variant: "dark",
|
|
3630
|
+
ctaSurface: _.surface,
|
|
3626
3631
|
title: e,
|
|
3627
3632
|
placeholderTitle: t,
|
|
3628
3633
|
description: n,
|
|
@@ -3843,21 +3848,21 @@ const qi = ({
|
|
|
3843
3848
|
var w;
|
|
3844
3849
|
const r = Vs(n.attachments);
|
|
3845
3850
|
if (r.length === 0) return null;
|
|
3846
|
-
const i = Vi(r), l = (w = n.text) == null ? void 0 : w.trim(), o = r.find((
|
|
3851
|
+
const i = Vi(r), l = (w = n.text) == null ? void 0 : w.trim(), o = r.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? es(o.attachments[0] ?? {}).url : void 0, m = l && Ui(l, d) ? void 0 : l;
|
|
3847
3852
|
let f = 0;
|
|
3848
|
-
const u = [], g = m ? "middle" : e, c = (
|
|
3853
|
+
const u = [], g = m ? "middle" : e, c = (b, p, v) => {
|
|
3849
3854
|
const _ = t ? it.Sent : it.Received;
|
|
3850
3855
|
u.push(
|
|
3851
3856
|
/* @__PURE__ */ s(
|
|
3852
3857
|
_,
|
|
3853
3858
|
{
|
|
3854
|
-
...es(
|
|
3859
|
+
...es(b),
|
|
3855
3860
|
groupPosition: v ? g : "middle"
|
|
3856
3861
|
},
|
|
3857
|
-
|
|
3862
|
+
p
|
|
3858
3863
|
)
|
|
3859
3864
|
);
|
|
3860
|
-
}, x = (
|
|
3865
|
+
}, x = (b, p) => {
|
|
3861
3866
|
const v = Hi(
|
|
3862
3867
|
f,
|
|
3863
3868
|
i,
|
|
@@ -3869,25 +3874,25 @@ const qi = ({
|
|
|
3869
3874
|
{
|
|
3870
3875
|
groupPosition: v,
|
|
3871
3876
|
isMyMessage: t,
|
|
3872
|
-
segment:
|
|
3877
|
+
segment: b
|
|
3873
3878
|
},
|
|
3874
|
-
|
|
3879
|
+
p
|
|
3875
3880
|
)
|
|
3876
3881
|
);
|
|
3877
3882
|
};
|
|
3878
|
-
return r.forEach((
|
|
3879
|
-
const v =
|
|
3880
|
-
if (
|
|
3881
|
-
|
|
3883
|
+
return r.forEach((b, p) => {
|
|
3884
|
+
const v = p === r.length - 1;
|
|
3885
|
+
if (b.type === "link") {
|
|
3886
|
+
b.attachments.forEach((_, k) => {
|
|
3882
3887
|
c(
|
|
3883
3888
|
_,
|
|
3884
|
-
`link-${
|
|
3885
|
-
v &&
|
|
3889
|
+
`link-${p}-${k}`,
|
|
3890
|
+
v && k === b.attachments.length - 1
|
|
3886
3891
|
);
|
|
3887
3892
|
});
|
|
3888
3893
|
return;
|
|
3889
3894
|
}
|
|
3890
|
-
x(
|
|
3895
|
+
x(b, `media-${p}`);
|
|
3891
3896
|
}), /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3892
3897
|
/* @__PURE__ */ h(
|
|
3893
3898
|
"div",
|
|
@@ -3929,10 +3934,10 @@ const qi = ({
|
|
|
3929
3934
|
message: c,
|
|
3930
3935
|
renderText: x,
|
|
3931
3936
|
threadList: w,
|
|
3932
|
-
viewerLanguage:
|
|
3933
|
-
onBroadcastClick:
|
|
3937
|
+
viewerLanguage: b,
|
|
3938
|
+
onBroadcastClick: p,
|
|
3934
3939
|
resolvedBroadcastName: v
|
|
3935
|
-
} = e, { client: _ } = Ee("CustomMessage"), { channel:
|
|
3940
|
+
} = e, { client: _ } = Ee("CustomMessage"), { channel: k } = fe("CustomMessage"), { isUnlocking: L, onUnlockClick: T, onFetchSource: z, onDownloadClick: P } = ii("LockedAttachment"), [U, R] = $(!1), C = on(c.id), { selected: D, voteUp: S, voteDown: A } = La(c), {
|
|
3936
3941
|
Attachment: E = ln,
|
|
3937
3942
|
EditMessageModal: B = cn,
|
|
3938
3943
|
MessageActions: O,
|
|
@@ -3956,9 +3961,9 @@ const qi = ({
|
|
|
3956
3961
|
() => Vs(V),
|
|
3957
3962
|
[V]
|
|
3958
3963
|
), ie = ae(() => {
|
|
3959
|
-
const me = bs({ message: c, viewerLanguage:
|
|
3964
|
+
const me = bs({ message: c, viewerLanguage: b });
|
|
3960
3965
|
return me === c.text ? c : { ...c, text: me };
|
|
3961
|
-
}, [c,
|
|
3966
|
+
}, [c, b]), Re = ee.length > 0, De = ee.reduce(
|
|
3962
3967
|
(me, ve) => me + ve.attachments.length,
|
|
3963
3968
|
0
|
|
3964
3969
|
) === ((V == null ? void 0 : V.length) ?? 0), oe = ar({
|
|
@@ -3975,7 +3980,7 @@ const qi = ({
|
|
|
3975
3980
|
const ue = !w && !!c.reply_count, le = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Mt = c.error) == null ? void 0 : Mt.status) !== 403, Et = _n(c);
|
|
3976
3981
|
let pe;
|
|
3977
3982
|
St ? pe = () => m(c) : Et && (pe = () => R(!0));
|
|
3978
|
-
const te = g(), Xs =
|
|
3983
|
+
const te = g(), Xs = N(
|
|
3979
3984
|
"str-chat__message str-chat__message-simple",
|
|
3980
3985
|
`str-chat__message--${c.type}`,
|
|
3981
3986
|
`str-chat__message--${c.status}`,
|
|
@@ -4005,7 +4010,7 @@ const qi = ({
|
|
|
4005
4010
|
amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
|
|
4006
4011
|
detail: ($t = c.metadata) == null ? void 0 : $t.attachment_detail,
|
|
4007
4012
|
paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
|
|
4008
|
-
onFetchSource: z ? () => z(c,
|
|
4013
|
+
onFetchSource: z ? () => z(c, k) : void 0
|
|
4009
4014
|
};
|
|
4010
4015
|
return /* @__PURE__ */ h(J, { children: [
|
|
4011
4016
|
a && /* @__PURE__ */ s(
|
|
@@ -4046,7 +4051,7 @@ const qi = ({
|
|
|
4046
4051
|
/* @__PURE__ */ s(
|
|
4047
4052
|
"div",
|
|
4048
4053
|
{
|
|
4049
|
-
className:
|
|
4054
|
+
className: N("str-chat__message-inner", {
|
|
4050
4055
|
"str-chat__simple-message--error-failed": St || Et
|
|
4051
4056
|
}),
|
|
4052
4057
|
"data-testid": "message-inner",
|
|
@@ -4073,8 +4078,8 @@ const qi = ({
|
|
|
4073
4078
|
{
|
|
4074
4079
|
...At,
|
|
4075
4080
|
isMine: !1,
|
|
4076
|
-
isUnlocking:
|
|
4077
|
-
onUnlockClick: () =>
|
|
4081
|
+
isUnlocking: L(c.id),
|
|
4082
|
+
onUnlockClick: () => T == null ? void 0 : T(c, k)
|
|
4078
4083
|
}
|
|
4079
4084
|
),
|
|
4080
4085
|
!te && O && /* @__PURE__ */ s(O, {})
|
|
@@ -4086,16 +4091,16 @@ const qi = ({
|
|
|
4086
4091
|
{
|
|
4087
4092
|
...Lt,
|
|
4088
4093
|
isMine: !0,
|
|
4089
|
-
onPreviewClick: () =>
|
|
4094
|
+
onPreviewClick: () => T ? T(c, k) : void 0
|
|
4090
4095
|
}
|
|
4091
4096
|
) : /* @__PURE__ */ s(
|
|
4092
4097
|
Oe,
|
|
4093
4098
|
{
|
|
4094
4099
|
...Lt,
|
|
4095
4100
|
isMine: !1,
|
|
4096
|
-
isUnlocking:
|
|
4097
|
-
onUnlockClick: () =>
|
|
4098
|
-
onDownloadClick: () => P ? P(c,
|
|
4101
|
+
isUnlocking: L(c.id),
|
|
4102
|
+
onUnlockClick: () => T ? T(c, k) : void 0,
|
|
4103
|
+
onDownloadClick: () => P ? P(c, k) : void 0
|
|
4099
4104
|
}
|
|
4100
4105
|
),
|
|
4101
4106
|
!te && O && /* @__PURE__ */ s(O, {})
|
|
@@ -4170,14 +4175,14 @@ const qi = ({
|
|
|
4170
4175
|
{
|
|
4171
4176
|
selected: D,
|
|
4172
4177
|
onVoteUp: S,
|
|
4173
|
-
onVoteDown:
|
|
4178
|
+
onVoteDown: A
|
|
4174
4179
|
}
|
|
4175
4180
|
)
|
|
4176
4181
|
] }),
|
|
4177
4182
|
/* @__PURE__ */ s(
|
|
4178
4183
|
xi,
|
|
4179
4184
|
{
|
|
4180
|
-
onBroadcastClick:
|
|
4185
|
+
onBroadcastClick: p,
|
|
4181
4186
|
resolvedBroadcastName: v
|
|
4182
4187
|
}
|
|
4183
4188
|
),
|
|
@@ -4445,15 +4450,15 @@ const qi = ({
|
|
|
4445
4450
|
return;
|
|
4446
4451
|
let c = u.offsetHeight;
|
|
4447
4452
|
const x = () => {
|
|
4448
|
-
const
|
|
4449
|
-
c =
|
|
4453
|
+
const b = u.offsetHeight, p = b > c;
|
|
4454
|
+
c = b;
|
|
4450
4455
|
const v = Array.from(
|
|
4451
4456
|
g.querySelectorAll(".str-chat__list")
|
|
4452
|
-
).find((
|
|
4457
|
+
).find((k) => k.scrollHeight > k.clientHeight) ?? null, _ = v ? v.scrollHeight - v.scrollTop - v.clientHeight < no : !1;
|
|
4453
4458
|
g.style.setProperty(
|
|
4454
4459
|
"--messaging-composer-height",
|
|
4455
|
-
`${
|
|
4456
|
-
),
|
|
4460
|
+
`${b}px`
|
|
4461
|
+
), p && _ && v && (v.scrollTop = v.scrollHeight);
|
|
4457
4462
|
};
|
|
4458
4463
|
if (x(), typeof ResizeObserver > "u")
|
|
4459
4464
|
return;
|
|
@@ -4668,13 +4673,13 @@ const qi = ({
|
|
|
4668
4673
|
var x, w;
|
|
4669
4674
|
const { channel: t, channelConfig: n, thread: a } = fe(), { client: r } = Ee(), { typing: i = {} } = Ln(), { aiState: l } = Mn(t), o = _e(Hs);
|
|
4670
4675
|
if (!e && o && go.has(l)) {
|
|
4671
|
-
const
|
|
4676
|
+
const b = bo(t, (x = r.user) == null ? void 0 : x.id);
|
|
4672
4677
|
return /* @__PURE__ */ s(
|
|
4673
4678
|
as,
|
|
4674
4679
|
{
|
|
4675
|
-
avatarId: (
|
|
4676
|
-
avatarName: (
|
|
4677
|
-
avatarImage:
|
|
4680
|
+
avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
|
|
4681
|
+
avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
|
|
4682
|
+
avatarImage: b == null ? void 0 : b.image,
|
|
4678
4683
|
testId: "typing-indicator-ai"
|
|
4679
4684
|
}
|
|
4680
4685
|
);
|
|
@@ -4682,14 +4687,14 @@ const qi = ({
|
|
|
4682
4687
|
if ((n == null ? void 0 : n.typing_events) === !1)
|
|
4683
4688
|
return null;
|
|
4684
4689
|
const m = e ? [] : Object.values(i).filter(
|
|
4685
|
-
({ parent_id:
|
|
4690
|
+
({ parent_id: b, user: p }) => {
|
|
4686
4691
|
var v;
|
|
4687
|
-
return (
|
|
4692
|
+
return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && !b;
|
|
4688
4693
|
}
|
|
4689
4694
|
), f = e ? Object.values(i).filter(
|
|
4690
|
-
({ parent_id:
|
|
4695
|
+
({ parent_id: b, user: p }) => {
|
|
4691
4696
|
var v;
|
|
4692
|
-
return (
|
|
4697
|
+
return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && b === (a == null ? void 0 : a.id);
|
|
4693
4698
|
}
|
|
4694
4699
|
) : [], u = e ? f : m;
|
|
4695
4700
|
if (!u.length)
|
|
@@ -4760,7 +4765,7 @@ function bo(e, t) {
|
|
|
4760
4765
|
const vo = () => null, xo = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
4761
4766
|
"div",
|
|
4762
4767
|
{
|
|
4763
|
-
className:
|
|
4768
|
+
className: N("flex items-center justify-center h-full", e),
|
|
4764
4769
|
children: [
|
|
4765
4770
|
/* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
4766
4771
|
/* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
|
|
@@ -4822,13 +4827,13 @@ const wo = ({
|
|
|
4822
4827
|
composerDisabled: c = !1,
|
|
4823
4828
|
composerDisabledReason: x,
|
|
4824
4829
|
showStarButton: w = !1,
|
|
4825
|
-
chatbotVotingEnabled:
|
|
4826
|
-
renderChannelBanner:
|
|
4830
|
+
chatbotVotingEnabled: b = !1,
|
|
4831
|
+
renderChannelBanner: p,
|
|
4827
4832
|
customChannelActions: v,
|
|
4828
4833
|
renderChannelActions: _,
|
|
4829
|
-
renderMessage:
|
|
4830
|
-
viewerLanguage:
|
|
4831
|
-
showChannelInfo:
|
|
4834
|
+
renderMessage: k,
|
|
4835
|
+
viewerLanguage: L,
|
|
4836
|
+
showChannelInfo: T = !0,
|
|
4832
4837
|
onParticipantNameClick: z,
|
|
4833
4838
|
onBroadcastClick: P,
|
|
4834
4839
|
resolveBroadcastName: U,
|
|
@@ -4838,21 +4843,21 @@ const wo = ({
|
|
|
4838
4843
|
Y(() => {
|
|
4839
4844
|
S.current = P;
|
|
4840
4845
|
}, [P]);
|
|
4841
|
-
const
|
|
4846
|
+
const A = q((G) => {
|
|
4842
4847
|
var y;
|
|
4843
4848
|
(y = S.current) == null || y.call(S, G);
|
|
4844
|
-
}, []), E = P ?
|
|
4849
|
+
}, []), E = P ? A : void 0, B = ni(
|
|
4845
4850
|
D,
|
|
4846
4851
|
U
|
|
4847
4852
|
), O = C.state.messages.some(
|
|
4848
4853
|
(G) => G.type !== "deleted"
|
|
4849
|
-
), j =
|
|
4854
|
+
), j = p ? /* @__PURE__ */ s(F.Fragment, { children: p() }, "lt-channel-banner") : null, K = /* @__PURE__ */ s(
|
|
4850
4855
|
Ia,
|
|
4851
4856
|
{
|
|
4852
4857
|
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%)]",
|
|
4853
4858
|
onBack: e,
|
|
4854
4859
|
showBackButton: t,
|
|
4855
|
-
showChannelInfo:
|
|
4860
|
+
showChannelInfo: T,
|
|
4856
4861
|
showStarButton: w,
|
|
4857
4862
|
onLeaveConversation: i,
|
|
4858
4863
|
onBlockParticipant: l,
|
|
@@ -4872,14 +4877,14 @@ const wo = ({
|
|
|
4872
4877
|
Zi,
|
|
4873
4878
|
{
|
|
4874
4879
|
...G,
|
|
4875
|
-
chatbotVotingEnabled:
|
|
4876
|
-
viewerLanguage:
|
|
4880
|
+
chatbotVotingEnabled: b,
|
|
4881
|
+
viewerLanguage: L,
|
|
4877
4882
|
onBroadcastClick: E
|
|
4878
4883
|
}
|
|
4879
4884
|
);
|
|
4880
|
-
return !
|
|
4885
|
+
return !k || !y ? I : k(I, y);
|
|
4881
4886
|
},
|
|
4882
|
-
[
|
|
4887
|
+
[b, E, k, L]
|
|
4883
4888
|
);
|
|
4884
4889
|
return /* @__PURE__ */ s(Os.Provider, { value: B, children: /* @__PURE__ */ s(
|
|
4885
4890
|
Dn,
|
|
@@ -4991,13 +4996,13 @@ const wo = ({
|
|
|
4991
4996
|
onReportParticipantClick: c,
|
|
4992
4997
|
showBlockParticipant: x = !0,
|
|
4993
4998
|
showReportParticipant: w = !0,
|
|
4994
|
-
composerDisabled:
|
|
4995
|
-
composerDisabledReason:
|
|
4999
|
+
composerDisabled: b = !1,
|
|
5000
|
+
composerDisabledReason: p,
|
|
4996
5001
|
dmAgentEnabled: v,
|
|
4997
5002
|
messageMetadata: _,
|
|
4998
|
-
onMessageSent:
|
|
4999
|
-
showStarButton:
|
|
5000
|
-
chatbotVotingEnabled:
|
|
5003
|
+
onMessageSent: k,
|
|
5004
|
+
showStarButton: L = !1,
|
|
5005
|
+
chatbotVotingEnabled: T = !1,
|
|
5001
5006
|
renderChannelBanner: z,
|
|
5002
5007
|
customChannelActions: P,
|
|
5003
5008
|
renderChannelActions: U,
|
|
@@ -5005,7 +5010,7 @@ const wo = ({
|
|
|
5005
5010
|
onMessageLinkClick: C,
|
|
5006
5011
|
sendButton: D,
|
|
5007
5012
|
attachmentPreviewList: S,
|
|
5008
|
-
viewerLanguage:
|
|
5013
|
+
viewerLanguage: A,
|
|
5009
5014
|
showChannelInfo: E = !0,
|
|
5010
5015
|
onParticipantNameClick: B,
|
|
5011
5016
|
onBroadcastClick: O,
|
|
@@ -5028,9 +5033,9 @@ const wo = ({
|
|
|
5028
5033
|
...W,
|
|
5029
5034
|
...X && { skip_push: !0 }
|
|
5030
5035
|
}, V = await e.sendMessage(ne, Z);
|
|
5031
|
-
return
|
|
5036
|
+
return k == null || k(V), V;
|
|
5032
5037
|
},
|
|
5033
|
-
[e, v, _,
|
|
5038
|
+
[e, v, _, k]
|
|
5034
5039
|
), G = H(null);
|
|
5035
5040
|
return Y(() => {
|
|
5036
5041
|
if (!C) return;
|
|
@@ -5047,7 +5052,7 @@ const wo = ({
|
|
|
5047
5052
|
"div",
|
|
5048
5053
|
{
|
|
5049
5054
|
ref: G,
|
|
5050
|
-
className:
|
|
5055
|
+
className: N(
|
|
5051
5056
|
"messaging-channel-view h-full flex flex-col",
|
|
5052
5057
|
d
|
|
5053
5058
|
),
|
|
@@ -5080,15 +5085,15 @@ const wo = ({
|
|
|
5080
5085
|
onReportParticipantClick: c,
|
|
5081
5086
|
showBlockParticipant: x,
|
|
5082
5087
|
showReportParticipant: w,
|
|
5083
|
-
composerDisabled:
|
|
5084
|
-
composerDisabledReason:
|
|
5085
|
-
showStarButton:
|
|
5086
|
-
chatbotVotingEnabled:
|
|
5088
|
+
composerDisabled: b,
|
|
5089
|
+
composerDisabledReason: p,
|
|
5090
|
+
showStarButton: L,
|
|
5091
|
+
chatbotVotingEnabled: T,
|
|
5087
5092
|
renderChannelBanner: z,
|
|
5088
5093
|
customChannelActions: P,
|
|
5089
5094
|
renderChannelActions: U,
|
|
5090
5095
|
renderMessage: R,
|
|
5091
|
-
viewerLanguage:
|
|
5096
|
+
viewerLanguage: A,
|
|
5092
5097
|
showChannelInfo: E,
|
|
5093
5098
|
onParticipantNameClick: B,
|
|
5094
5099
|
onBroadcastClick: O,
|
|
@@ -5135,13 +5140,13 @@ const Wo = ({
|
|
|
5135
5140
|
viewerLanguage: c,
|
|
5136
5141
|
renderChannelBanner: x,
|
|
5137
5142
|
customChannelActions: w,
|
|
5138
|
-
renderChannelActions:
|
|
5139
|
-
onParticipantNameClick:
|
|
5143
|
+
renderChannelActions: b,
|
|
5144
|
+
onParticipantNameClick: p,
|
|
5140
5145
|
onBroadcastClick: v,
|
|
5141
5146
|
resolveBroadcastName: _,
|
|
5142
|
-
renderMessage:
|
|
5143
|
-
onMessageLinkClick:
|
|
5144
|
-
showChannelInfo:
|
|
5147
|
+
renderMessage: k,
|
|
5148
|
+
onMessageLinkClick: L,
|
|
5149
|
+
showChannelInfo: T,
|
|
5145
5150
|
composerInput: z
|
|
5146
5151
|
}) => {
|
|
5147
5152
|
const {
|
|
@@ -5151,7 +5156,7 @@ const Wo = ({
|
|
|
5151
5156
|
error: C,
|
|
5152
5157
|
refreshConnection: D,
|
|
5153
5158
|
service: S,
|
|
5154
|
-
debug:
|
|
5159
|
+
debug: A
|
|
5155
5160
|
} = ba(), [E, B] = $(null), [O, j] = $(null), [K, se] = $(!1), { showDeleteConversation: G = !0 } = e, y = H(l);
|
|
5156
5161
|
y.current = l;
|
|
5157
5162
|
const I = H(a);
|
|
@@ -5172,7 +5177,7 @@ const Wo = ({
|
|
|
5172
5177
|
(async () => {
|
|
5173
5178
|
var Re, De;
|
|
5174
5179
|
try {
|
|
5175
|
-
|
|
5180
|
+
A && console.log(
|
|
5176
5181
|
"[MessagingShell] Loading initial conversation with:",
|
|
5177
5182
|
i
|
|
5178
5183
|
);
|
|
@@ -5185,7 +5190,7 @@ const Wo = ({
|
|
|
5185
5190
|
{ limit: 1 }
|
|
5186
5191
|
);
|
|
5187
5192
|
if (oe.length > 0) {
|
|
5188
|
-
B(oe[0]), j(null), (Re = I.current) == null || Re.call(I, oe[0]),
|
|
5193
|
+
B(oe[0]), j(null), (Re = I.current) == null || Re.call(I, oe[0]), A && console.log(
|
|
5189
5194
|
"[MessagingShell] Initial conversation loaded:",
|
|
5190
5195
|
oe[0].id
|
|
5191
5196
|
);
|
|
@@ -5193,7 +5198,7 @@ const Wo = ({
|
|
|
5193
5198
|
}
|
|
5194
5199
|
const ue = y.current;
|
|
5195
5200
|
if (!ue || !S) {
|
|
5196
|
-
ee(), j("No conversation found with this account"),
|
|
5201
|
+
ee(), j("No conversation found with this account"), A && console.log(
|
|
5197
5202
|
"[MessagingShell] No conversation found for:",
|
|
5198
5203
|
i
|
|
5199
5204
|
);
|
|
@@ -5205,7 +5210,7 @@ const Wo = ({
|
|
|
5205
5210
|
name: ue.name,
|
|
5206
5211
|
phone: ue.phone
|
|
5207
5212
|
});
|
|
5208
|
-
B(le), j(null), (De = I.current) == null || De.call(I, le),
|
|
5213
|
+
B(le), j(null), (De = I.current) == null || De.call(I, le), A && console.log(
|
|
5209
5214
|
"[MessagingShell] Channel created and loaded:",
|
|
5210
5215
|
le.id
|
|
5211
5216
|
);
|
|
@@ -5222,7 +5227,7 @@ const Wo = ({
|
|
|
5222
5227
|
), ee(), Q.current || j("Failed to load conversation");
|
|
5223
5228
|
}
|
|
5224
5229
|
})();
|
|
5225
|
-
}, [i, P, U, S,
|
|
5230
|
+
}, [i, P, U, S, A]);
|
|
5226
5231
|
const X = H(r);
|
|
5227
5232
|
X.current = r;
|
|
5228
5233
|
const ne = q(() => {
|
|
@@ -5253,13 +5258,13 @@ const Wo = ({
|
|
|
5253
5258
|
chatbotVotingEnabled: g,
|
|
5254
5259
|
viewerLanguage: c,
|
|
5255
5260
|
customChannelActions: w,
|
|
5256
|
-
renderChannelActions:
|
|
5257
|
-
onParticipantNameClick:
|
|
5261
|
+
renderChannelActions: b,
|
|
5262
|
+
onParticipantNameClick: p,
|
|
5258
5263
|
onBroadcastClick: v,
|
|
5259
5264
|
resolveBroadcastName: _,
|
|
5260
|
-
renderMessage:
|
|
5261
|
-
onMessageLinkClick:
|
|
5262
|
-
showChannelInfo:
|
|
5265
|
+
renderMessage: k,
|
|
5266
|
+
onMessageLinkClick: L,
|
|
5267
|
+
showChannelInfo: T,
|
|
5263
5268
|
composerInput: z
|
|
5264
5269
|
},
|
|
5265
5270
|
E.id
|
|
@@ -5330,7 +5335,7 @@ const Ys = F.createContext({
|
|
|
5330
5335
|
(P = t == null ? void 0 : t.state) == null ? void 0 : P.members,
|
|
5331
5336
|
m == null ? void 0 : m.userID,
|
|
5332
5337
|
t == null ? void 0 : t.type
|
|
5333
|
-
), w = gs(x == null ? void 0 : x.user),
|
|
5338
|
+
), w = gs(x == null ? void 0 : x.user), b = (U = x == null ? void 0 : x.user) == null ? void 0 : U.image, p = (() => {
|
|
5334
5339
|
var D;
|
|
5335
5340
|
const C = (D = t == null ? void 0 : t.state) == null ? void 0 : D.messages;
|
|
5336
5341
|
if (C != null && C.length) {
|
|
@@ -5340,9 +5345,9 @@ const Ys = F.createContext({
|
|
|
5340
5345
|
})(), _ = (() => {
|
|
5341
5346
|
var E;
|
|
5342
5347
|
const C = bs({
|
|
5343
|
-
message:
|
|
5348
|
+
message: p,
|
|
5344
5349
|
viewerLanguage: d
|
|
5345
|
-
}), { custom_type: D, attachment_content_type: S } = (
|
|
5350
|
+
}), { custom_type: D, attachment_content_type: S } = (p == null ? void 0 : p.metadata) || {};
|
|
5346
5351
|
if (D === ce.TIP)
|
|
5347
5352
|
return C || "Sent a tip";
|
|
5348
5353
|
if (D === ce.PAID)
|
|
@@ -5354,15 +5359,15 @@ const Ys = F.createContext({
|
|
|
5354
5359
|
return "🔒 Sent a locked attachment";
|
|
5355
5360
|
}
|
|
5356
5361
|
if (C) return C;
|
|
5357
|
-
const
|
|
5358
|
-
return
|
|
5359
|
-
})(),
|
|
5362
|
+
const A = (E = p == null ? void 0 : p.attachments) == null ? void 0 : E[0];
|
|
5363
|
+
return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5364
|
+
})(), k = p != null && p.created_at ? Co(new Date(p.created_at)) : "", L = p ? Be(p) : !1, T = o ? o(p, _) : `${L ? "✨ " : ""}${_}`, z = n ?? 0;
|
|
5360
5365
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5361
5366
|
channelId: t == null ? void 0 : t.id,
|
|
5362
5367
|
isSelected: f,
|
|
5363
5368
|
participantName: w,
|
|
5364
5369
|
unreadCount: z,
|
|
5365
|
-
hasTimestamp: !!
|
|
5370
|
+
hasTimestamp: !!k
|
|
5366
5371
|
}), /* @__PURE__ */ s(
|
|
5367
5372
|
"div",
|
|
5368
5373
|
{
|
|
@@ -5370,7 +5375,7 @@ const Ys = F.createContext({
|
|
|
5370
5375
|
tabIndex: 0,
|
|
5371
5376
|
onClick: g,
|
|
5372
5377
|
onKeyDown: c,
|
|
5373
|
-
className:
|
|
5378
|
+
className: N(
|
|
5374
5379
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
5375
5380
|
{
|
|
5376
5381
|
"bg-black/[0.04]": f,
|
|
@@ -5384,7 +5389,7 @@ const Ys = F.createContext({
|
|
|
5384
5389
|
{
|
|
5385
5390
|
id: ((R = x == null ? void 0 : x.user) == null ? void 0 : R.id) || t.id || "unknown",
|
|
5386
5391
|
name: w,
|
|
5387
|
-
image:
|
|
5392
|
+
image: b,
|
|
5388
5393
|
size: 48,
|
|
5389
5394
|
starred: u
|
|
5390
5395
|
}
|
|
@@ -5394,7 +5399,7 @@ const Ys = F.createContext({
|
|
|
5394
5399
|
/* @__PURE__ */ h(
|
|
5395
5400
|
"h3",
|
|
5396
5401
|
{
|
|
5397
|
-
className:
|
|
5402
|
+
className: N(
|
|
5398
5403
|
"text-sm font-medium truncate text-[#191918]"
|
|
5399
5404
|
),
|
|
5400
5405
|
children: [
|
|
@@ -5403,10 +5408,10 @@ const Ys = F.createContext({
|
|
|
5403
5408
|
]
|
|
5404
5409
|
}
|
|
5405
5410
|
),
|
|
5406
|
-
|
|
5411
|
+
k && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: k })
|
|
5407
5412
|
] }),
|
|
5408
5413
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
5409
|
-
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
5414
|
+
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: T }),
|
|
5410
5415
|
z > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: z > 99 ? "99+" : z })
|
|
5411
5416
|
] })
|
|
5412
5417
|
] })
|
|
@@ -5434,16 +5439,16 @@ const So = { last_message_at: -1 }, Eo = F.memo(
|
|
|
5434
5439
|
onMessageNewHandler: c,
|
|
5435
5440
|
onMessageNew: x,
|
|
5436
5441
|
onChannelVisible: w,
|
|
5437
|
-
onAddedToChannel:
|
|
5438
|
-
onChannelUpdated:
|
|
5442
|
+
onAddedToChannel: b,
|
|
5443
|
+
onChannelUpdated: p
|
|
5439
5444
|
}) => {
|
|
5440
5445
|
const v = F.useRef(0);
|
|
5441
5446
|
v.current++;
|
|
5442
|
-
const { debug: _ = !1 } = lt(),
|
|
5443
|
-
(
|
|
5444
|
-
for (const z of
|
|
5447
|
+
const { debug: _ = !1 } = lt(), k = F.useCallback(
|
|
5448
|
+
(T) => {
|
|
5449
|
+
for (const z of T)
|
|
5445
5450
|
_o(z);
|
|
5446
|
-
return r ? r(
|
|
5451
|
+
return r ? r(T) : T;
|
|
5447
5452
|
},
|
|
5448
5453
|
[r]
|
|
5449
5454
|
);
|
|
@@ -5452,7 +5457,7 @@ const So = { last_message_at: -1 }, Eo = F.memo(
|
|
|
5452
5457
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5453
5458
|
filters: n
|
|
5454
5459
|
});
|
|
5455
|
-
const
|
|
5460
|
+
const L = F.useMemo(
|
|
5456
5461
|
() => ({
|
|
5457
5462
|
selectedChannel: t,
|
|
5458
5463
|
onChannelSelect: e,
|
|
@@ -5473,24 +5478,24 @@ const So = { last_message_at: -1 }, Eo = F.memo(
|
|
|
5473
5478
|
return /* @__PURE__ */ s(
|
|
5474
5479
|
"div",
|
|
5475
5480
|
{
|
|
5476
|
-
className:
|
|
5481
|
+
className: N(
|
|
5477
5482
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5478
5483
|
l
|
|
5479
5484
|
),
|
|
5480
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(yo, { value:
|
|
5485
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(yo, { value: L, children: /* @__PURE__ */ s(
|
|
5481
5486
|
On,
|
|
5482
5487
|
{
|
|
5483
5488
|
filters: n,
|
|
5484
5489
|
sort: i,
|
|
5485
5490
|
options: { limit: 30 },
|
|
5486
5491
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5487
|
-
channelRenderFilterFn:
|
|
5492
|
+
channelRenderFilterFn: k,
|
|
5488
5493
|
lockChannelOrder: g,
|
|
5489
5494
|
onMessageNewHandler: c,
|
|
5490
5495
|
onMessageNew: x,
|
|
5491
5496
|
onChannelVisible: w,
|
|
5492
|
-
onAddedToChannel:
|
|
5493
|
-
onChannelUpdated:
|
|
5497
|
+
onAddedToChannel: b,
|
|
5498
|
+
onChannelUpdated: p,
|
|
5494
5499
|
Paginator: d,
|
|
5495
5500
|
Preview: Ws,
|
|
5496
5501
|
EmptyStateIndicator: o
|
|
@@ -5539,7 +5544,7 @@ const rs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5539
5544
|
"div",
|
|
5540
5545
|
{
|
|
5541
5546
|
"data-dd-privacy": "mask",
|
|
5542
|
-
className:
|
|
5547
|
+
className: N(
|
|
5543
5548
|
"relative px-4 py-3",
|
|
5544
5549
|
"text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
|
|
5545
5550
|
r
|
|
@@ -5584,7 +5589,7 @@ const rs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5584
5589
|
onClick: t,
|
|
5585
5590
|
disabled: n,
|
|
5586
5591
|
style: { backgroundColor: "#E6E5E3" },
|
|
5587
|
-
className:
|
|
5592
|
+
className: N(
|
|
5588
5593
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
5589
5594
|
{
|
|
5590
5595
|
"hover:brightness-95 active:brightness-90": !n,
|
|
@@ -5675,4 +5680,4 @@ export {
|
|
|
5675
5680
|
fs as y,
|
|
5676
5681
|
ut as z
|
|
5677
5682
|
};
|
|
5678
|
-
//# sourceMappingURL=index-
|
|
5683
|
+
//# sourceMappingURL=index-DtTSu6m9.js.map
|