@linktr.ee/messaging-react 3.4.0-rc-1782392622 → 3.4.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-CdaZxDEx.cjs → Card-6snF25TP.cjs} +2 -2
- package/dist/{Card-CdaZxDEx.cjs.map → Card-6snF25TP.cjs.map} +1 -1
- package/dist/{Card-DaalkoQW.cjs → Card-BTbz8XCg.cjs} +2 -2
- package/dist/{Card-DaalkoQW.cjs.map → Card-BTbz8XCg.cjs.map} +1 -1
- package/dist/{Card-XVTz8IYz.js → Card-CBi3z_Wt.js} +2 -2
- package/dist/{Card-XVTz8IYz.js.map → Card-CBi3z_Wt.js.map} +1 -1
- package/dist/{Card-BKd0E-B9.js → Card-Cbw4GBkm.js} +3 -3
- package/dist/{Card-BKd0E-B9.js.map → Card-Cbw4GBkm.js.map} +1 -1
- package/dist/{Card-CrTBu2I6.js → Card-D3-jTRWp.js} +2 -2
- package/dist/{Card-CrTBu2I6.js.map → Card-D3-jTRWp.js.map} +1 -1
- package/dist/{Card-DXWp0uwi.cjs → Card-DdK8Vv7y.cjs} +2 -2
- package/dist/{Card-DXWp0uwi.cjs.map → Card-DdK8Vv7y.cjs.map} +1 -1
- package/dist/{LockedThumbnail-D3Xwdb5_.cjs → LockedThumbnail-Cih__olI.cjs} +2 -2
- package/dist/{LockedThumbnail-D3Xwdb5_.cjs.map → LockedThumbnail-Cih__olI.cjs.map} +1 -1
- package/dist/{LockedThumbnail-D_44b-Uy.js → LockedThumbnail-qPBaTZon.js} +2 -2
- package/dist/{LockedThumbnail-D_44b-Uy.js.map → LockedThumbnail-qPBaTZon.js.map} +1 -1
- package/dist/{index-DPGZRLRM.js → index-BOsrtjME.js} +507 -509
- package/dist/index-BOsrtjME.js.map +1 -0
- package/dist/index-DQk6hOJg.cjs +2 -0
- package/dist/index-DQk6hOJg.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/MessagingShell/index.tsx +0 -2
- package/src/types.ts +0 -1
- package/dist/index-Cds2w5zi.cjs +0 -2
- package/dist/index-Cds2w5zi.cjs.map +0 -1
- package/dist/index-DPGZRLRM.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as n, jsxs as h, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import U, { createContext as Ye, useContext as Ae, useCallback as K, useState as z, useRef as H, useEffect as X, useId as Sn, useMemo as ne, Suspense as qe } from "react";
|
|
3
3
|
import { StreamChatService as In } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as Tn, LinkPreviewsManager as At } from "stream-chat";
|
|
5
|
-
import { Chat as An, DateSeparator as Mn, useChannelStateContext as
|
|
5
|
+
import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Mt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as xe, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as De, AIStates as Oe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
|
|
6
6
|
import { StarIcon as Be, DotsThreeIcon as hs, SpinnerGapIcon as ke, SignOutIcon as fs, ProhibitInsetIcon as Rt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Ht, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Me, ArrowUpIcon as Ms, SparkleIcon as je, ProhibitIcon as Rs, ArrowLeftIcon as Lt, CaretRightIcon as Ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
|
|
7
|
-
import
|
|
7
|
+
import y from "classnames";
|
|
8
8
|
import { MessageActions as Os, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
|
|
9
9
|
const qt = Ye({
|
|
10
10
|
service: null,
|
|
@@ -24,10 +24,10 @@ const qt = Ye({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var D,
|
|
27
|
+
var D, I;
|
|
28
28
|
const o = K(
|
|
29
|
-
(
|
|
30
|
-
i && console.log(`🔥 [MessagingProvider] ${
|
|
29
|
+
(T, ...S) => {
|
|
30
|
+
i && console.log(`🔥 [MessagingProvider] ${T}`, ...S);
|
|
31
31
|
},
|
|
32
32
|
[i]
|
|
33
33
|
);
|
|
@@ -37,61 +37,61 @@ const qt = Ye({
|
|
|
37
37
|
serviceConfig: !!s,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [l, d] =
|
|
40
|
+
const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, b] = z(!1), [_, v] = z(null), p = H(!1), x = H(null), A = H(s);
|
|
41
41
|
A.current = s;
|
|
42
|
-
const M =
|
|
42
|
+
const M = H(i);
|
|
43
43
|
M.current = i;
|
|
44
|
-
const
|
|
44
|
+
const N = H({
|
|
45
45
|
userId: t == null ? void 0 : t.id,
|
|
46
46
|
apiKey: a,
|
|
47
47
|
serviceConfig: s,
|
|
48
48
|
capabilities: r
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
renderCount:
|
|
49
|
+
}), L = H(0);
|
|
50
|
+
L.current++, o("📊 RENDER INFO", {
|
|
51
|
+
renderCount: L.current,
|
|
52
52
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
53
53
|
propChanges: {
|
|
54
|
-
userChanged:
|
|
55
|
-
apiKeyChanged:
|
|
56
|
-
serviceConfigChanged:
|
|
57
|
-
capabilitiesChanged:
|
|
54
|
+
userChanged: N.current.userId !== (t == null ? void 0 : t.id),
|
|
55
|
+
apiKeyChanged: N.current.apiKey !== a,
|
|
56
|
+
serviceConfigChanged: N.current.serviceConfig !== s,
|
|
57
|
+
capabilitiesChanged: N.current.capabilities !== r
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), N.current = {
|
|
60
60
|
userId: t == null ? void 0 : t.id,
|
|
61
61
|
apiKey: a,
|
|
62
62
|
serviceConfig: s,
|
|
63
63
|
capabilities: r
|
|
64
64
|
};
|
|
65
|
-
const
|
|
66
|
-
a && ((D =
|
|
67
|
-
const
|
|
65
|
+
const $ = H(null);
|
|
66
|
+
a && ((D = $.current) == null ? void 0 : D.apiKey) !== a && ($.current = { apiKey: a, client: new Tn(a) });
|
|
67
|
+
const O = a ? ((I = $.current) == null ? void 0 : I.client) ?? null : null;
|
|
68
68
|
X(() => {
|
|
69
|
-
const
|
|
70
|
-
if (!a || !
|
|
69
|
+
const T = L.current, S = A.current;
|
|
70
|
+
if (!a || !O || !S) {
|
|
71
71
|
o("⚠️ SERVICE INIT SKIPPED", {
|
|
72
|
-
renderCount:
|
|
72
|
+
renderCount: T,
|
|
73
73
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
74
74
|
});
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
o("🚀 CREATING SERVICE", {
|
|
78
|
-
renderCount:
|
|
78
|
+
renderCount: T,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
|
-
const
|
|
82
|
-
...
|
|
81
|
+
const P = new In({
|
|
82
|
+
...S,
|
|
83
83
|
apiKey: a,
|
|
84
84
|
debug: M.current,
|
|
85
|
-
client:
|
|
85
|
+
client: O
|
|
86
86
|
});
|
|
87
|
-
x.current =
|
|
88
|
-
renderCount:
|
|
89
|
-
serviceInstance: !!
|
|
87
|
+
x.current = P, d(P), o("✅ SERVICE SET", {
|
|
88
|
+
renderCount: T,
|
|
89
|
+
serviceInstance: !!P
|
|
90
90
|
});
|
|
91
|
-
}, [a,
|
|
92
|
-
const
|
|
91
|
+
}, [a, O]);
|
|
92
|
+
const E = H(null);
|
|
93
93
|
X(() => {
|
|
94
|
-
var
|
|
94
|
+
var S, P;
|
|
95
95
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
96
96
|
hasService: !!l,
|
|
97
97
|
hasUser: !!t,
|
|
@@ -107,7 +107,7 @@ const qt = Ye({
|
|
|
107
107
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
if (((
|
|
110
|
+
if (((S = E.current) == null ? void 0 : S.serviceId) === l && ((P = E.current) == null ? void 0 : P.userId) === t.id) {
|
|
111
111
|
o(
|
|
112
112
|
"⚠️ USER CONNECTION SKIPPED",
|
|
113
113
|
"Already connected this user with this service"
|
|
@@ -119,7 +119,7 @@ const qt = Ye({
|
|
|
119
119
|
try {
|
|
120
120
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
121
121
|
const F = await l.connectUser(t);
|
|
122
|
-
g(F), f(!0),
|
|
122
|
+
g(F), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
123
123
|
userId: t.id,
|
|
124
124
|
clientId: F.userID
|
|
125
125
|
});
|
|
@@ -137,13 +137,13 @@ const qt = Ye({
|
|
|
137
137
|
}
|
|
138
138
|
})();
|
|
139
139
|
}, [l, t, o, u]), X(() => {
|
|
140
|
-
const
|
|
140
|
+
const T = O;
|
|
141
141
|
return () => {
|
|
142
|
-
var
|
|
143
|
-
|
|
142
|
+
var S;
|
|
143
|
+
T && (E.current = null, (S = x.current) == null || S.disconnectUser().catch(console.error));
|
|
144
144
|
};
|
|
145
|
-
}, [
|
|
146
|
-
const
|
|
145
|
+
}, [O]);
|
|
146
|
+
const k = K(async () => {
|
|
147
147
|
if (o("🔄 REFRESH CONNECTION CALLED", {
|
|
148
148
|
hasService: !!l,
|
|
149
149
|
hasUser: !!t
|
|
@@ -154,18 +154,18 @@ const qt = Ye({
|
|
|
154
154
|
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
|
|
155
155
|
try {
|
|
156
156
|
o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
|
|
157
|
-
const
|
|
158
|
-
g(
|
|
159
|
-
} catch (
|
|
160
|
-
const
|
|
161
|
-
v(
|
|
157
|
+
const T = await l.connectUser(t);
|
|
158
|
+
g(T), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
159
|
+
} catch (T) {
|
|
160
|
+
const S = T instanceof Error ? T.message : "Refresh failed";
|
|
161
|
+
v(S), o("❌ CONNECTION REFRESH ERROR", {
|
|
162
162
|
userId: t.id,
|
|
163
|
-
error:
|
|
163
|
+
error: S
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
166
|
b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
167
167
|
}
|
|
168
|
-
}, [l, t, o]),
|
|
168
|
+
}, [l, t, o]), R = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
169
|
hasService: !!l,
|
|
170
170
|
hasClient: !!m,
|
|
171
171
|
isConnected: u,
|
|
@@ -179,7 +179,7 @@ const qt = Ye({
|
|
|
179
179
|
isLoading: c,
|
|
180
180
|
error: _,
|
|
181
181
|
capabilities: r,
|
|
182
|
-
refreshConnection:
|
|
182
|
+
refreshConnection: k,
|
|
183
183
|
debug: i
|
|
184
184
|
}), [
|
|
185
185
|
l,
|
|
@@ -188,18 +188,18 @@ const qt = Ye({
|
|
|
188
188
|
c,
|
|
189
189
|
_,
|
|
190
190
|
r,
|
|
191
|
-
|
|
191
|
+
k,
|
|
192
192
|
i,
|
|
193
193
|
o
|
|
194
194
|
]);
|
|
195
195
|
return o("🔄 RENDER END", {
|
|
196
|
-
renderCount:
|
|
197
|
-
willRenderChat: !!
|
|
198
|
-
contextValueReady: !!
|
|
199
|
-
}), /* @__PURE__ */ n(qt.Provider, { value:
|
|
196
|
+
renderCount: L.current,
|
|
197
|
+
willRenderChat: !!O,
|
|
198
|
+
contextValueReady: !!R
|
|
199
|
+
}), /* @__PURE__ */ n(qt.Provider, { value: R, children: O ? /* @__PURE__ */ n(
|
|
200
200
|
An,
|
|
201
201
|
{
|
|
202
|
-
client:
|
|
202
|
+
client: O,
|
|
203
203
|
customClasses: {
|
|
204
204
|
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
|
|
205
205
|
},
|
|
@@ -208,7 +208,7 @@ const qt = Ye({
|
|
|
208
208
|
) : e });
|
|
209
209
|
}, Ps = () => Xe(), Wt = (e) => {
|
|
210
210
|
var a, r;
|
|
211
|
-
const [t, s] =
|
|
211
|
+
const [t, s] = z(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
213
213
|
);
|
|
214
214
|
return X(() => {
|
|
@@ -279,7 +279,7 @@ function Bs(e) {
|
|
|
279
279
|
const s = Fs(e) % Ot.length;
|
|
280
280
|
return Ot[s];
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const oe = ({
|
|
283
283
|
id: e,
|
|
284
284
|
image: t,
|
|
285
285
|
size: s = 40,
|
|
@@ -299,7 +299,7 @@ const ie = ({
|
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
"aria-hidden": "true",
|
|
302
|
-
className:
|
|
302
|
+
className: y(
|
|
303
303
|
"avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
|
|
304
304
|
m
|
|
305
305
|
),
|
|
@@ -309,7 +309,7 @@ const ie = ({
|
|
|
309
309
|
return /* @__PURE__ */ h(
|
|
310
310
|
"div",
|
|
311
311
|
{
|
|
312
|
-
className:
|
|
312
|
+
className: y(
|
|
313
313
|
"relative flex-shrink-0 !bg-transparent",
|
|
314
314
|
a
|
|
315
315
|
),
|
|
@@ -331,7 +331,7 @@ const ie = ({
|
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
333
|
"data-testid": "avatar-ring",
|
|
334
|
-
className:
|
|
334
|
+
className: y(
|
|
335
335
|
"h-full w-full",
|
|
336
336
|
"bg-transparent"
|
|
337
337
|
),
|
|
@@ -364,72 +364,72 @@ const ie = ({
|
|
|
364
364
|
logLabel: g = "useChannelModerationActions"
|
|
365
365
|
}) => {
|
|
366
366
|
var D;
|
|
367
|
-
const { service: u, debug: f } = Xe(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && u && c), [_, v] =
|
|
367
|
+
const { service: u, debug: f } = Xe(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && u && c), [_, v] = z(!1), [p, x] = z(null), [A, M] = z(!1), [N, L] = z(!1), $ = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
|
|
368
368
|
return X(() => {
|
|
369
369
|
if (!b || !u || !c) {
|
|
370
370
|
v(!1), x(null);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
|
-
let
|
|
373
|
+
let I = !1;
|
|
374
374
|
return (async () => {
|
|
375
375
|
try {
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
376
|
+
const T = await u.getBlockedUsers();
|
|
377
|
+
if (I) return;
|
|
378
378
|
v(
|
|
379
|
-
|
|
380
|
-
(
|
|
379
|
+
T.some(
|
|
380
|
+
(S) => S.blocked_user_id === c
|
|
381
381
|
)
|
|
382
382
|
);
|
|
383
|
-
} catch (
|
|
384
|
-
|
|
383
|
+
} catch (T) {
|
|
384
|
+
I || console.error(`[${g}] Failed to check blocked status:`, T);
|
|
385
385
|
} finally {
|
|
386
|
-
|
|
386
|
+
I || x({ participantId: c, service: u });
|
|
387
387
|
}
|
|
388
388
|
})(), () => {
|
|
389
|
-
|
|
389
|
+
I = !0;
|
|
390
390
|
};
|
|
391
391
|
}, [b, u, c, g]), {
|
|
392
392
|
isParticipantBlocked: _,
|
|
393
|
-
isCheckingBlockedStatus:
|
|
393
|
+
isCheckingBlockedStatus: $,
|
|
394
394
|
isLeaving: A,
|
|
395
|
-
isUpdatingBlockStatus:
|
|
395
|
+
isUpdatingBlockStatus: N,
|
|
396
396
|
handleLeaveConversation: async () => {
|
|
397
|
-
var
|
|
397
|
+
var I;
|
|
398
398
|
if (!A) {
|
|
399
399
|
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), M(!0);
|
|
400
400
|
try {
|
|
401
|
-
const
|
|
402
|
-
await e.hide(
|
|
403
|
-
} catch (
|
|
404
|
-
console.error(`[${g}] Failed to leave conversation`,
|
|
401
|
+
const T = ((I = e._client) == null ? void 0 : I.userID) ?? null;
|
|
402
|
+
await e.hide(T, !1), r && await r(e), m == null || m();
|
|
403
|
+
} catch (T) {
|
|
404
|
+
console.error(`[${g}] Failed to leave conversation`, T);
|
|
405
405
|
} finally {
|
|
406
406
|
M(!1);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
handleBlockUser: async () => {
|
|
411
|
-
var
|
|
412
|
-
if (!(
|
|
413
|
-
l == null || l(), f && console.log(`[${g}] Block member`, (
|
|
411
|
+
var I, T, S;
|
|
412
|
+
if (!(N || !u)) {
|
|
413
|
+
l == null || l(), f && console.log(`[${g}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), L(!0);
|
|
414
414
|
try {
|
|
415
|
-
await u.blockUser((
|
|
416
|
-
} catch (
|
|
417
|
-
console.error(`[${g}] Failed to block member`,
|
|
415
|
+
await u.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
|
|
416
|
+
} catch (P) {
|
|
417
|
+
console.error(`[${g}] Failed to block member`, P);
|
|
418
418
|
} finally {
|
|
419
|
-
|
|
419
|
+
L(!1);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
handleUnblockUser: async () => {
|
|
424
|
-
var
|
|
425
|
-
if (!(
|
|
426
|
-
l == null || l(), f && console.log(`[${g}] Unblock member`, (
|
|
424
|
+
var I, T, S;
|
|
425
|
+
if (!(N || !u)) {
|
|
426
|
+
l == null || l(), f && console.log(`[${g}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), L(!0);
|
|
427
427
|
try {
|
|
428
|
-
await u.unBlockUser((
|
|
429
|
-
} catch (
|
|
430
|
-
console.error(`[${g}] Failed to unblock member`,
|
|
428
|
+
await u.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
|
|
429
|
+
} catch (P) {
|
|
430
|
+
console.error(`[${g}] Failed to unblock member`, P);
|
|
431
431
|
} finally {
|
|
432
|
-
|
|
432
|
+
L(!1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
},
|
|
@@ -446,7 +446,7 @@ const ie = ({
|
|
|
446
446
|
"button",
|
|
447
447
|
{
|
|
448
448
|
type: "button",
|
|
449
|
-
className:
|
|
449
|
+
className: y(
|
|
450
450
|
"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",
|
|
451
451
|
e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
452
452
|
t
|
|
@@ -468,15 +468,15 @@ const ie = ({
|
|
|
468
468
|
customChannelActions: g,
|
|
469
469
|
triggerClassName: u
|
|
470
470
|
}) => {
|
|
471
|
-
const [f, c] =
|
|
471
|
+
const [f, c] = z(!1), b = H(null), _ = Sn(), v = K(() => c(!1), []), {
|
|
472
472
|
isParticipantBlocked: p,
|
|
473
473
|
isCheckingBlockedStatus: x,
|
|
474
474
|
isLeaving: A,
|
|
475
475
|
isUpdatingBlockStatus: M,
|
|
476
|
-
handleLeaveConversation:
|
|
477
|
-
handleBlockUser:
|
|
478
|
-
handleUnblockUser:
|
|
479
|
-
handleReportUser:
|
|
476
|
+
handleLeaveConversation: N,
|
|
477
|
+
handleBlockUser: L,
|
|
478
|
+
handleUnblockUser: $,
|
|
479
|
+
handleReportUser: O
|
|
480
480
|
} = js({
|
|
481
481
|
channel: e,
|
|
482
482
|
participant: t,
|
|
@@ -492,13 +492,13 @@ const ie = ({
|
|
|
492
492
|
});
|
|
493
493
|
return X(() => {
|
|
494
494
|
if (!f) return;
|
|
495
|
-
const
|
|
495
|
+
const k = (D) => {
|
|
496
496
|
b.current && !b.current.contains(D.target) && c(!1);
|
|
497
|
-
},
|
|
497
|
+
}, R = (D) => {
|
|
498
498
|
D.key === "Escape" && c(!1);
|
|
499
499
|
};
|
|
500
|
-
return document.addEventListener("mousedown",
|
|
501
|
-
document.removeEventListener("mousedown",
|
|
500
|
+
return document.addEventListener("mousedown", k), document.addEventListener("keydown", R), () => {
|
|
501
|
+
document.removeEventListener("mousedown", k), document.removeEventListener("keydown", R);
|
|
502
502
|
};
|
|
503
503
|
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
|
|
504
504
|
/* @__PURE__ */ h(
|
|
@@ -509,7 +509,7 @@ const ie = ({
|
|
|
509
509
|
"aria-haspopup": "true",
|
|
510
510
|
"aria-expanded": f,
|
|
511
511
|
"aria-controls": f ? _ : void 0,
|
|
512
|
-
onClick: () => c((
|
|
512
|
+
onClick: () => c((k) => !k),
|
|
513
513
|
children: [
|
|
514
514
|
/* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
|
|
515
515
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
@@ -521,7 +521,7 @@ const ie = ({
|
|
|
521
521
|
{
|
|
522
522
|
id: _,
|
|
523
523
|
"aria-label": "Conversation options",
|
|
524
|
-
className:
|
|
524
|
+
className: y(
|
|
525
525
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
526
526
|
"rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
|
|
527
527
|
),
|
|
@@ -529,7 +529,7 @@ const ie = ({
|
|
|
529
529
|
s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
|
|
530
530
|
ge,
|
|
531
531
|
{
|
|
532
|
-
onClick:
|
|
532
|
+
onClick: N,
|
|
533
533
|
disabled: A,
|
|
534
534
|
"aria-busy": A,
|
|
535
535
|
children: [
|
|
@@ -548,7 +548,7 @@ const ie = ({
|
|
|
548
548
|
) : p ? /* @__PURE__ */ h(
|
|
549
549
|
ge,
|
|
550
550
|
{
|
|
551
|
-
onClick:
|
|
551
|
+
onClick: $,
|
|
552
552
|
disabled: M,
|
|
553
553
|
"aria-busy": M,
|
|
554
554
|
children: [
|
|
@@ -559,7 +559,7 @@ const ie = ({
|
|
|
559
559
|
) : /* @__PURE__ */ h(
|
|
560
560
|
ge,
|
|
561
561
|
{
|
|
562
|
-
onClick:
|
|
562
|
+
onClick: L,
|
|
563
563
|
disabled: M,
|
|
564
564
|
"aria-busy": M,
|
|
565
565
|
children: [
|
|
@@ -568,7 +568,7 @@ const ie = ({
|
|
|
568
568
|
]
|
|
569
569
|
}
|
|
570
570
|
) }),
|
|
571
|
-
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick:
|
|
571
|
+
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: O, children: [
|
|
572
572
|
/* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
|
|
573
573
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
574
574
|
] }) }),
|
|
@@ -582,7 +582,7 @@ function Gs(e) {
|
|
|
582
582
|
return e != null && e.length ? e.some((t) => t.type === He) ? "down" : e.some((t) => t.type === Ge) ? "up" : null : null;
|
|
583
583
|
}
|
|
584
584
|
function Hs(e) {
|
|
585
|
-
const { channel: t } =
|
|
585
|
+
const { channel: t } = de(), { client: s } = We("useMessageVote"), a = ne(
|
|
586
586
|
() => Gs(e.own_reactions),
|
|
587
587
|
[e.own_reactions]
|
|
588
588
|
), r = K(async () => {
|
|
@@ -619,7 +619,7 @@ function Kt({
|
|
|
619
619
|
const s = e == null ? void 0 : e.text, a = Ys(t);
|
|
620
620
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
621
621
|
}
|
|
622
|
-
const qs =
|
|
622
|
+
const qs = U.lazy(() => import("./Card-CBi3z_Wt.js")), Ws = U.lazy(() => import("./Card-D3-jTRWp.js")), Xs = U.lazy(() => import("./Card-Cbw4GBkm.js")), Ke = () => /* @__PURE__ */ n(
|
|
623
623
|
"div",
|
|
624
624
|
{
|
|
625
625
|
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)]",
|
|
@@ -635,7 +635,7 @@ const qs = j.lazy(() => import("./Card-XVTz8IYz.js")), Ws = j.lazy(() => import(
|
|
|
635
635
|
[/plain|rtf/, "text"],
|
|
636
636
|
[/markdown/, "markdown"]
|
|
637
637
|
];
|
|
638
|
-
function
|
|
638
|
+
function ae(e) {
|
|
639
639
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
640
640
|
}
|
|
641
641
|
function Qt(e) {
|
|
@@ -661,11 +661,11 @@ const ea = {
|
|
|
661
661
|
generic: Gt
|
|
662
662
|
};
|
|
663
663
|
function na(e) {
|
|
664
|
-
const t =
|
|
664
|
+
const t = ae(e);
|
|
665
665
|
return t !== "document" ? ea[t] : ta[Qt(e)];
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
return
|
|
667
|
+
function ce(e, t) {
|
|
668
|
+
return U.createElement(na(e), t);
|
|
669
669
|
}
|
|
670
670
|
const sa = (e) => {
|
|
671
671
|
var t, s;
|
|
@@ -682,23 +682,23 @@ const sa = (e) => {
|
|
|
682
682
|
muted: d = !1,
|
|
683
683
|
onContainerClick: m
|
|
684
684
|
}) => {
|
|
685
|
-
const g =
|
|
686
|
-
|
|
687
|
-
}, []),
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
690
|
-
const B =
|
|
685
|
+
const g = ae(t), u = H(null), f = H(null), c = H(null), b = H(r), [_, v] = z(a), [p, x] = z(0), [A, M] = z(!1), [N, L] = z(!1), [$, O] = z(!1), [E, k] = z(!1), [R, D] = z(!0), [I, T] = z(null), S = K(() => {
|
|
686
|
+
O(!1), v(!0);
|
|
687
|
+
}, []), P = K((w) => {
|
|
688
|
+
const C = f.current;
|
|
689
|
+
if (!C) return 0;
|
|
690
|
+
const B = C.getBoundingClientRect();
|
|
691
691
|
return Math.max(
|
|
692
692
|
0,
|
|
693
693
|
Math.min(1, (sa(w) - B.left) / B.width)
|
|
694
694
|
);
|
|
695
695
|
}, []), F = K((w) => {
|
|
696
|
-
const
|
|
697
|
-
|
|
696
|
+
const C = u.current;
|
|
697
|
+
C && C.duration && (C.currentTime = w * C.duration);
|
|
698
698
|
}, []), Y = (w) => {
|
|
699
699
|
w.stopPropagation(), M(!0);
|
|
700
|
-
const
|
|
701
|
-
x(
|
|
700
|
+
const C = P(w);
|
|
701
|
+
x(C), F(C);
|
|
702
702
|
};
|
|
703
703
|
X(() => {
|
|
704
704
|
r !== void 0 && r !== b.current && (b.current = r, v(r));
|
|
@@ -708,40 +708,40 @@ const sa = (e) => {
|
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
710
|
const w = () => {
|
|
711
|
-
const
|
|
712
|
-
|
|
711
|
+
const C = u.current;
|
|
712
|
+
C && C.duration && !A && x(C.currentTime / C.duration), c.current = requestAnimationFrame(w);
|
|
713
713
|
};
|
|
714
714
|
return c.current = requestAnimationFrame(w), () => {
|
|
715
715
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
716
716
|
};
|
|
717
717
|
}, [_, A]), X(() => {
|
|
718
718
|
const w = u.current;
|
|
719
|
-
w && (_ ? w.play().catch((
|
|
720
|
-
v(!1),
|
|
719
|
+
w && (_ ? w.play().catch((C) => {
|
|
720
|
+
v(!1), O(!0);
|
|
721
721
|
}) : w.pause());
|
|
722
722
|
}, [_]), X(() => {
|
|
723
723
|
if (!A) return;
|
|
724
|
-
const w = (B) => x(
|
|
725
|
-
M(!1), F(
|
|
724
|
+
const w = (B) => x(P(B)), C = (B) => {
|
|
725
|
+
M(!1), F(P(B));
|
|
726
726
|
};
|
|
727
|
-
return window.addEventListener("mousemove", w), window.addEventListener("mouseup",
|
|
728
|
-
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup",
|
|
727
|
+
return window.addEventListener("mousemove", w), window.addEventListener("mouseup", C), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", C), () => {
|
|
728
|
+
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", C);
|
|
729
729
|
};
|
|
730
|
-
}, [A,
|
|
731
|
-
const Z =
|
|
730
|
+
}, [A, P, F]);
|
|
731
|
+
const Z = I ? { aspectRatio: String(I) } : void 0, q = I ? "" : " aspect-video", G = Math.round(p * 100);
|
|
732
732
|
return /* @__PURE__ */ h(
|
|
733
733
|
"div",
|
|
734
734
|
{
|
|
735
735
|
role: "button",
|
|
736
736
|
tabIndex: 0,
|
|
737
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
737
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${q}`,
|
|
738
738
|
style: Z,
|
|
739
739
|
onClick: (w) => {
|
|
740
740
|
if (m) {
|
|
741
741
|
m(w);
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
|
-
|
|
744
|
+
$ || o && v((C) => !C);
|
|
745
745
|
},
|
|
746
746
|
onKeyDown: (w) => {
|
|
747
747
|
if (!(w.key !== "Enter" && w.key !== " ")) {
|
|
@@ -749,11 +749,11 @@ const sa = (e) => {
|
|
|
749
749
|
m(w);
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
|
|
752
|
+
$ || o && v((C) => !C);
|
|
753
753
|
}
|
|
754
754
|
},
|
|
755
755
|
children: [
|
|
756
|
-
s && (g === "audio" ||
|
|
756
|
+
s && (g === "audio" || R) && /* @__PURE__ */ n(
|
|
757
757
|
"img",
|
|
758
758
|
{
|
|
759
759
|
src: s,
|
|
@@ -761,7 +761,7 @@ const sa = (e) => {
|
|
|
761
761
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
762
762
|
}
|
|
763
763
|
),
|
|
764
|
-
!s && (g === "audio" ||
|
|
764
|
+
!s && (g === "audio" || R) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
|
|
765
765
|
className: "size-12 text-black/20",
|
|
766
766
|
weight: "regular"
|
|
767
767
|
}) }),
|
|
@@ -773,12 +773,12 @@ const sa = (e) => {
|
|
|
773
773
|
loop: i,
|
|
774
774
|
muted: d,
|
|
775
775
|
style: { width: "100%", height: "100%" },
|
|
776
|
-
onLoadStart: () =>
|
|
776
|
+
onLoadStart: () => k(!0),
|
|
777
777
|
onCanPlay: () => {
|
|
778
|
-
|
|
778
|
+
k(!1), D(!1);
|
|
779
779
|
},
|
|
780
|
-
onWaiting: () =>
|
|
781
|
-
onPlay: () =>
|
|
780
|
+
onWaiting: () => k(!0),
|
|
781
|
+
onPlay: () => O(!1),
|
|
782
782
|
onEnded: () => {
|
|
783
783
|
i || (v(!1), x(0));
|
|
784
784
|
},
|
|
@@ -793,15 +793,15 @@ const sa = (e) => {
|
|
|
793
793
|
muted: d,
|
|
794
794
|
playsInline: !0,
|
|
795
795
|
style: { width: "100%", height: "100%" },
|
|
796
|
-
onLoadStart: () =>
|
|
796
|
+
onLoadStart: () => k(!0),
|
|
797
797
|
onCanPlay: () => {
|
|
798
|
-
|
|
798
|
+
k(!1), D(!1);
|
|
799
799
|
},
|
|
800
|
-
onWaiting: () =>
|
|
801
|
-
onPlay: () =>
|
|
800
|
+
onWaiting: () => k(!0),
|
|
801
|
+
onPlay: () => O(!1),
|
|
802
802
|
onLoadedMetadata: () => {
|
|
803
803
|
const w = u.current;
|
|
804
|
-
w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight &&
|
|
804
|
+
w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && T(w.videoWidth / w.videoHeight);
|
|
805
805
|
},
|
|
806
806
|
onEnded: () => {
|
|
807
807
|
i || (v(!1), x(0));
|
|
@@ -809,14 +809,14 @@ const sa = (e) => {
|
|
|
809
809
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
810
810
|
}
|
|
811
811
|
) }),
|
|
812
|
-
|
|
812
|
+
E && !$ && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
813
813
|
pe,
|
|
814
814
|
{
|
|
815
815
|
className: "size-8 animate-spin text-white/80",
|
|
816
816
|
weight: "bold"
|
|
817
817
|
}
|
|
818
818
|
) }),
|
|
819
|
-
|
|
819
|
+
$ && !o && /* @__PURE__ */ n(
|
|
820
820
|
"div",
|
|
821
821
|
{
|
|
822
822
|
className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
|
|
@@ -824,10 +824,10 @@ const sa = (e) => {
|
|
|
824
824
|
tabIndex: 0,
|
|
825
825
|
"aria-label": "Play preview",
|
|
826
826
|
onClick: (w) => {
|
|
827
|
-
w.stopPropagation(),
|
|
827
|
+
w.stopPropagation(), S();
|
|
828
828
|
},
|
|
829
829
|
onKeyDown: (w) => {
|
|
830
|
-
w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(),
|
|
830
|
+
w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), S());
|
|
831
831
|
},
|
|
832
832
|
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(Ue, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
833
833
|
}
|
|
@@ -837,7 +837,7 @@ const sa = (e) => {
|
|
|
837
837
|
{
|
|
838
838
|
role: "slider",
|
|
839
839
|
"aria-label": "Playback position",
|
|
840
|
-
"aria-valuenow":
|
|
840
|
+
"aria-valuenow": G,
|
|
841
841
|
"aria-valuemin": 0,
|
|
842
842
|
"aria-valuemax": 100,
|
|
843
843
|
tabIndex: 0,
|
|
@@ -853,7 +853,7 @@ const sa = (e) => {
|
|
|
853
853
|
"div",
|
|
854
854
|
{
|
|
855
855
|
className: "h-full rounded-full bg-white",
|
|
856
|
-
style: { width: `${
|
|
856
|
+
style: { width: `${G}%` }
|
|
857
857
|
}
|
|
858
858
|
) })
|
|
859
859
|
}
|
|
@@ -864,7 +864,7 @@ const sa = (e) => {
|
|
|
864
864
|
{
|
|
865
865
|
type: "button",
|
|
866
866
|
onClick: (w) => {
|
|
867
|
-
w.stopPropagation(), v((
|
|
867
|
+
w.stopPropagation(), v((C) => !C);
|
|
868
868
|
},
|
|
869
869
|
className: "shrink-0 text-white",
|
|
870
870
|
"aria-label": _ ? "Pause" : "Play",
|
|
@@ -876,7 +876,7 @@ const sa = (e) => {
|
|
|
876
876
|
{
|
|
877
877
|
role: "slider",
|
|
878
878
|
"aria-label": "Playback position",
|
|
879
|
-
"aria-valuenow":
|
|
879
|
+
"aria-valuenow": G,
|
|
880
880
|
"aria-valuemin": 0,
|
|
881
881
|
"aria-valuemax": 100,
|
|
882
882
|
tabIndex: 0,
|
|
@@ -885,8 +885,8 @@ const sa = (e) => {
|
|
|
885
885
|
onMouseDown: Y,
|
|
886
886
|
onTouchStart: Y,
|
|
887
887
|
onClick: (w) => w.stopPropagation(),
|
|
888
|
-
onMouseEnter: () =>
|
|
889
|
-
onMouseLeave: () =>
|
|
888
|
+
onMouseEnter: () => L(!0),
|
|
889
|
+
onMouseLeave: () => L(!1),
|
|
890
890
|
onKeyDown: (w) => {
|
|
891
891
|
w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
|
|
892
892
|
},
|
|
@@ -894,12 +894,12 @@ const sa = (e) => {
|
|
|
894
894
|
/* @__PURE__ */ n(
|
|
895
895
|
"div",
|
|
896
896
|
{
|
|
897
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
897
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${N || A ? "h-1.5" : "h-1"}`,
|
|
898
898
|
children: /* @__PURE__ */ n(
|
|
899
899
|
"div",
|
|
900
900
|
{
|
|
901
901
|
className: "h-full rounded-full bg-white",
|
|
902
|
-
style: { width: `${
|
|
902
|
+
style: { width: `${G}%` }
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
}
|
|
@@ -907,8 +907,8 @@ const sa = (e) => {
|
|
|
907
907
|
/* @__PURE__ */ n(
|
|
908
908
|
"div",
|
|
909
909
|
{
|
|
910
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
911
|
-
style: { left: `${
|
|
910
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${N || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
911
|
+
style: { left: `${G}%` }
|
|
912
912
|
}
|
|
913
913
|
)
|
|
914
914
|
]
|
|
@@ -927,7 +927,7 @@ const sa = (e) => {
|
|
|
927
927
|
mediaPlayerProps: i,
|
|
928
928
|
containedImage: o = !1
|
|
929
929
|
}) => {
|
|
930
|
-
const l =
|
|
930
|
+
const l = ae(e), [d, m] = z(!1);
|
|
931
931
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
932
932
|
aa,
|
|
933
933
|
{
|
|
@@ -975,7 +975,7 @@ const sa = (e) => {
|
|
|
975
975
|
"div",
|
|
976
976
|
{
|
|
977
977
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
978
|
-
children:
|
|
978
|
+
children: ce(e, {
|
|
979
979
|
className: $t(r),
|
|
980
980
|
weight: "regular"
|
|
981
981
|
})
|
|
@@ -992,7 +992,7 @@ const sa = (e) => {
|
|
|
992
992
|
"div",
|
|
993
993
|
{
|
|
994
994
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
995
|
-
children:
|
|
995
|
+
children: ce(e, {
|
|
996
996
|
className: $t(r),
|
|
997
997
|
weight: "regular"
|
|
998
998
|
})
|
|
@@ -1018,7 +1018,7 @@ const sa = (e) => {
|
|
|
1018
1018
|
{
|
|
1019
1019
|
ref: g,
|
|
1020
1020
|
"data-testid": u,
|
|
1021
|
-
className:
|
|
1021
|
+
className: y(
|
|
1022
1022
|
"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)]",
|
|
1023
1023
|
f ? "bg-[#121110]" : "bg-white"
|
|
1024
1024
|
),
|
|
@@ -1030,7 +1030,7 @@ const sa = (e) => {
|
|
|
1030
1030
|
c.trim() !== "" && /* @__PURE__ */ n(
|
|
1031
1031
|
"p",
|
|
1032
1032
|
{
|
|
1033
|
-
className:
|
|
1033
|
+
className: y("mb-0.5 truncate text-base font-medium", {
|
|
1034
1034
|
"text-black": !f,
|
|
1035
1035
|
"text-white/30": f && b,
|
|
1036
1036
|
"text-white": f && !b
|
|
@@ -1039,8 +1039,8 @@ const sa = (e) => {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
),
|
|
1041
1041
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1042
|
-
|
|
1043
|
-
className:
|
|
1042
|
+
ce(r, {
|
|
1043
|
+
className: y(
|
|
1044
1044
|
"size-5 shrink-0",
|
|
1045
1045
|
f ? "text-white/55" : "text-black/55"
|
|
1046
1046
|
),
|
|
@@ -1049,7 +1049,7 @@ const sa = (e) => {
|
|
|
1049
1049
|
i != null && i !== "" && /* @__PURE__ */ n(
|
|
1050
1050
|
"span",
|
|
1051
1051
|
{
|
|
1052
|
-
className:
|
|
1052
|
+
className: y(
|
|
1053
1053
|
"text-xs font-medium",
|
|
1054
1054
|
f ? "text-white/55" : "text-black/55"
|
|
1055
1055
|
),
|
|
@@ -1086,7 +1086,7 @@ function da(e) {
|
|
|
1086
1086
|
return e ? "text-white/20" : "text-black/20";
|
|
1087
1087
|
}
|
|
1088
1088
|
const Ze = ({ attachment: e, isMyMessage: t }) => {
|
|
1089
|
-
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, m = /* @__PURE__ */ h(
|
|
1089
|
+
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, m = /* @__PURE__ */ h(U.Fragment, { children: [
|
|
1090
1090
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1091
1091
|
"img",
|
|
1092
1092
|
{
|
|
@@ -1132,7 +1132,7 @@ const ma = ({
|
|
|
1132
1132
|
url: e,
|
|
1133
1133
|
filename: t
|
|
1134
1134
|
}) => {
|
|
1135
|
-
const [s, a] =
|
|
1135
|
+
const [s, a] = z(!1);
|
|
1136
1136
|
return /* @__PURE__ */ n(
|
|
1137
1137
|
"button",
|
|
1138
1138
|
{
|
|
@@ -1148,7 +1148,7 @@ const ma = ({
|
|
|
1148
1148
|
},
|
|
1149
1149
|
disabled: s,
|
|
1150
1150
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1151
|
-
children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(
|
|
1151
|
+
children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(U.Fragment, { children: [
|
|
1152
1152
|
/* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
|
|
1153
1153
|
"Download"
|
|
1154
1154
|
] })
|
|
@@ -1211,7 +1211,7 @@ const an = ({
|
|
|
1211
1211
|
fileSize: a,
|
|
1212
1212
|
thumbnailUrl: r
|
|
1213
1213
|
}) => {
|
|
1214
|
-
const i =
|
|
1214
|
+
const i = ae(t), o = a !== void 0 ? nn(a) : void 0;
|
|
1215
1215
|
return /* @__PURE__ */ n(
|
|
1216
1216
|
tn,
|
|
1217
1217
|
{
|
|
@@ -1240,7 +1240,7 @@ const an = ({
|
|
|
1240
1240
|
const s = Qe(e), a = et(e);
|
|
1241
1241
|
return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
|
|
1242
1242
|
!t && e.user && /* @__PURE__ */ n(
|
|
1243
|
-
|
|
1243
|
+
oe,
|
|
1244
1244
|
{
|
|
1245
1245
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1246
1246
|
id: e.user.id,
|
|
@@ -1347,10 +1347,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1347
1347
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1348
1348
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1349
1349
|
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
|
|
1350
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(
|
|
1350
|
+
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
|
|
1351
1351
|
m,
|
|
1352
1352
|
g
|
|
1353
|
-
] }) : /* @__PURE__ */ h(
|
|
1353
|
+
] }) : /* @__PURE__ */ h(se, { children: [
|
|
1354
1354
|
g,
|
|
1355
1355
|
m
|
|
1356
1356
|
] }) });
|
|
@@ -1363,7 +1363,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1363
1363
|
"button",
|
|
1364
1364
|
{
|
|
1365
1365
|
type: "button",
|
|
1366
|
-
className:
|
|
1366
|
+
className: y("message-vote-button focus-ring", {
|
|
1367
1367
|
"message-vote-button--selected": e === "up"
|
|
1368
1368
|
}),
|
|
1369
1369
|
onClick: t,
|
|
@@ -1377,7 +1377,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1377
1377
|
"button",
|
|
1378
1378
|
{
|
|
1379
1379
|
type: "button",
|
|
1380
|
-
className:
|
|
1380
|
+
className: y("message-vote-button focus-ring", {
|
|
1381
1381
|
"message-vote-button--selected": e === "down"
|
|
1382
1382
|
}),
|
|
1383
1383
|
onClick: s,
|
|
@@ -1406,27 +1406,27 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1406
1406
|
renderText: b,
|
|
1407
1407
|
threadList: _,
|
|
1408
1408
|
viewerLanguage: v
|
|
1409
|
-
} = e, { client: p } = We("CustomMessage"), { channel: x } =
|
|
1410
|
-
Attachment:
|
|
1411
|
-
EditMessageModal:
|
|
1412
|
-
MessageActions:
|
|
1413
|
-
MessageBlocked:
|
|
1409
|
+
} = e, { client: p } = We("CustomMessage"), { channel: x } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: N, onDownloadClick: L } = va("LockedAttachment"), [$, O] = z(!1), E = Ln(c.id), { selected: k, voteUp: R, voteDown: D } = Hs(c), {
|
|
1410
|
+
Attachment: I = Dn,
|
|
1411
|
+
EditMessageModal: T = On,
|
|
1412
|
+
MessageActions: S,
|
|
1413
|
+
MessageBlocked: P = Pn,
|
|
1414
1414
|
MessageBouncePrompt: F = zn,
|
|
1415
1415
|
MessageDeleted: Y = $n,
|
|
1416
1416
|
MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
|
|
1417
|
-
MessageRepliesCountButton:
|
|
1418
|
-
ReminderNotification:
|
|
1417
|
+
MessageRepliesCountButton: q = Bn,
|
|
1418
|
+
ReminderNotification: G = Un,
|
|
1419
1419
|
StreamedMessageText: w = jn,
|
|
1420
|
-
PinIndicator:
|
|
1421
|
-
} = jt("CustomMessage"), B = Vn(c),
|
|
1420
|
+
PinIndicator: C
|
|
1421
|
+
} = jt("CustomMessage"), B = Vn(c), j = Gn(c), W = ne(
|
|
1422
1422
|
() => u == null ? void 0 : u(c),
|
|
1423
1423
|
[u, c]
|
|
1424
|
-
), V =
|
|
1424
|
+
), V = ne(() => {
|
|
1425
1425
|
const fe = c.attachments ?? [], Ce = c.shared_location ? [c.shared_location, ...fe] : fe;
|
|
1426
1426
|
if (!Ee(c)) return Ce;
|
|
1427
1427
|
const It = Ce.filter((Tt) => !("type" in Tt) || !sn(Tt));
|
|
1428
1428
|
return It.length === Ce.length ? Ce : It;
|
|
1429
|
-
}, [c]),
|
|
1429
|
+
}, [c]), J = ne(() => {
|
|
1430
1430
|
const fe = Kt({ message: c, viewerLanguage: v });
|
|
1431
1431
|
return fe === c.text ? c : { ...c, text: fe };
|
|
1432
1432
|
}, [c, v]);
|
|
@@ -1435,41 +1435,41 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1435
1435
|
if (c.deleted_at || c.type === "deleted")
|
|
1436
1436
|
return /* @__PURE__ */ n(Y, { message: c });
|
|
1437
1437
|
if (Yn(c))
|
|
1438
|
-
return /* @__PURE__ */ n(
|
|
1439
|
-
const
|
|
1438
|
+
return /* @__PURE__ */ n(P, {});
|
|
1439
|
+
const re = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, ee = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ie = qn(c);
|
|
1440
1440
|
let Q;
|
|
1441
|
-
|
|
1442
|
-
const
|
|
1441
|
+
ee ? Q = () => m(c) : ie && (Q = () => O(!0));
|
|
1442
|
+
const me = f(), En = y(
|
|
1443
1443
|
"str-chat__message str-chat__message-simple",
|
|
1444
1444
|
`str-chat__message--${c.type}`,
|
|
1445
1445
|
`str-chat__message--${c.status}`,
|
|
1446
|
-
|
|
1446
|
+
me ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
1447
1447
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
1448
1448
|
{
|
|
1449
1449
|
"str-chat__message--has-attachment": B,
|
|
1450
1450
|
"str-chat__message--highlighted": g,
|
|
1451
1451
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1452
|
-
"str-chat__message--with-reactions":
|
|
1452
|
+
"str-chat__message--with-reactions": j,
|
|
1453
1453
|
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((gt = c == null ? void 0 : c.error) == null ? void 0 : gt.status) !== 403,
|
|
1454
|
-
"str-chat__message-with-thread-link":
|
|
1454
|
+
"str-chat__message-with-thread-link": re || ue,
|
|
1455
1455
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1456
1456
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1457
1457
|
"str-chat__virtual-message__wrapper--group": o
|
|
1458
1458
|
}
|
|
1459
|
-
), dt = c.poll_id && p.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he &&
|
|
1460
|
-
return /* @__PURE__ */ h(
|
|
1459
|
+
), dt = c.poll_id && p.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he && me && Le;
|
|
1460
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1461
1461
|
a && /* @__PURE__ */ n(
|
|
1462
|
-
|
|
1462
|
+
T,
|
|
1463
1463
|
{
|
|
1464
1464
|
additionalMessageInputProps: t
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
|
-
|
|
1467
|
+
$ && /* @__PURE__ */ n(
|
|
1468
1468
|
Wn,
|
|
1469
1469
|
{
|
|
1470
1470
|
MessageBouncePrompt: F,
|
|
1471
|
-
onClose: () =>
|
|
1472
|
-
open:
|
|
1471
|
+
onClose: () => O(!1),
|
|
1472
|
+
open: $
|
|
1473
1473
|
}
|
|
1474
1474
|
),
|
|
1475
1475
|
/* @__PURE__ */ h(
|
|
@@ -1478,10 +1478,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1478
1478
|
className: En,
|
|
1479
1479
|
"data-message-id": c.id,
|
|
1480
1480
|
children: [
|
|
1481
|
-
|
|
1482
|
-
!!
|
|
1481
|
+
C && /* @__PURE__ */ n(C, {}),
|
|
1482
|
+
!!E && /* @__PURE__ */ n(G, { reminder: E }),
|
|
1483
1483
|
c.user && /* @__PURE__ */ n(
|
|
1484
|
-
|
|
1484
|
+
oe,
|
|
1485
1485
|
{
|
|
1486
1486
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1487
1487
|
id: c.user.id,
|
|
@@ -1495,8 +1495,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1495
1495
|
/* @__PURE__ */ n(
|
|
1496
1496
|
"div",
|
|
1497
1497
|
{
|
|
1498
|
-
className:
|
|
1499
|
-
"str-chat__simple-message--error-failed":
|
|
1498
|
+
className: y("str-chat__message-inner", {
|
|
1499
|
+
"str-chat__simple-message--error-failed": ee || ie
|
|
1500
1500
|
}),
|
|
1501
1501
|
"data-testid": "message-inner",
|
|
1502
1502
|
onClick: Q,
|
|
@@ -1510,8 +1510,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1510
1510
|
marginInlineStart: 0
|
|
1511
1511
|
},
|
|
1512
1512
|
children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1513
|
-
|
|
1514
|
-
|
|
1513
|
+
me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1514
|
+
S && /* @__PURE__ */ n(S, {}),
|
|
1515
1515
|
/* @__PURE__ */ n(
|
|
1516
1516
|
zt.Sent,
|
|
1517
1517
|
{
|
|
@@ -1522,7 +1522,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1522
1522
|
detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
|
|
1523
1523
|
paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
|
|
1524
1524
|
onPreviewClick: () => M == null ? void 0 : M(c, x),
|
|
1525
|
-
onFetchSource: async () => await (
|
|
1525
|
+
onFetchSource: async () => await (N == null ? void 0 : N(c, x))
|
|
1526
1526
|
}
|
|
1527
1527
|
)
|
|
1528
1528
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1537,16 +1537,16 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1537
1537
|
paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
|
|
1538
1538
|
isUnlocking: A(c.id),
|
|
1539
1539
|
onUnlockClick: () => M == null ? void 0 : M(c, x),
|
|
1540
|
-
onFetchSource: async () => await (
|
|
1541
|
-
onDownloadClick: () =>
|
|
1540
|
+
onFetchSource: async () => await (N == null ? void 0 : N(c, x)),
|
|
1541
|
+
onDownloadClick: () => L == null ? void 0 : L(c, x)
|
|
1542
1542
|
}
|
|
1543
1543
|
),
|
|
1544
|
-
|
|
1544
|
+
S && /* @__PURE__ */ n(S, {})
|
|
1545
1545
|
] }),
|
|
1546
1546
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1547
1547
|
Mt,
|
|
1548
1548
|
{
|
|
1549
|
-
message:
|
|
1549
|
+
message: J,
|
|
1550
1550
|
renderText: b
|
|
1551
1551
|
}
|
|
1552
1552
|
) })
|
|
@@ -1559,27 +1559,27 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1559
1559
|
{
|
|
1560
1560
|
message: c,
|
|
1561
1561
|
hasAttachment: Le,
|
|
1562
|
-
isMyMessage:
|
|
1562
|
+
isMyMessage: me
|
|
1563
1563
|
}
|
|
1564
1564
|
),
|
|
1565
1565
|
dt && /* @__PURE__ */ n(Xn, { poll: dt }),
|
|
1566
1566
|
V != null && V.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1567
|
-
|
|
1567
|
+
I,
|
|
1568
1568
|
{
|
|
1569
1569
|
actionHandler: l,
|
|
1570
1570
|
attachments: V
|
|
1571
1571
|
}
|
|
1572
1572
|
) : null,
|
|
1573
|
-
|
|
1573
|
+
W ? /* @__PURE__ */ n(
|
|
1574
1574
|
w,
|
|
1575
1575
|
{
|
|
1576
|
-
message:
|
|
1576
|
+
message: J,
|
|
1577
1577
|
renderText: b
|
|
1578
1578
|
}
|
|
1579
1579
|
) : /* @__PURE__ */ n(
|
|
1580
1580
|
Mt,
|
|
1581
1581
|
{
|
|
1582
|
-
message:
|
|
1582
|
+
message: J,
|
|
1583
1583
|
renderText: b
|
|
1584
1584
|
}
|
|
1585
1585
|
),
|
|
@@ -1593,20 +1593,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1593
1593
|
{
|
|
1594
1594
|
message: c,
|
|
1595
1595
|
hasAttachment: Le,
|
|
1596
|
-
isMyMessage:
|
|
1596
|
+
isMyMessage: me
|
|
1597
1597
|
}
|
|
1598
1598
|
),
|
|
1599
1599
|
s && he && /* @__PURE__ */ n(
|
|
1600
1600
|
Ca,
|
|
1601
1601
|
{
|
|
1602
|
-
selected:
|
|
1603
|
-
onVoteUp:
|
|
1602
|
+
selected: k,
|
|
1603
|
+
onVoteUp: R,
|
|
1604
1604
|
onVoteDown: D
|
|
1605
1605
|
}
|
|
1606
1606
|
)
|
|
1607
1607
|
] }),
|
|
1608
|
-
|
|
1609
|
-
|
|
1608
|
+
re && /* @__PURE__ */ n(
|
|
1609
|
+
q,
|
|
1610
1610
|
{
|
|
1611
1611
|
onClick: d,
|
|
1612
1612
|
reply_count: c.reply_count
|
|
@@ -1618,7 +1618,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1618
1618
|
c.id
|
|
1619
1619
|
)
|
|
1620
1620
|
] });
|
|
1621
|
-
}, Ea =
|
|
1621
|
+
}, Ea = U.memo(
|
|
1622
1622
|
ka,
|
|
1623
1623
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
|
|
1624
1624
|
), Sa = (e) => {
|
|
@@ -1720,7 +1720,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1720
1720
|
},
|
|
1721
1721
|
r.og_scrape_url
|
|
1722
1722
|
)) }) : null;
|
|
1723
|
-
}, cn =
|
|
1723
|
+
}, cn = U.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1724
1724
|
"button",
|
|
1725
1725
|
{
|
|
1726
1726
|
...s,
|
|
@@ -1771,8 +1771,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1771
1771
|
disabledReason: a
|
|
1772
1772
|
}) => {
|
|
1773
1773
|
var o;
|
|
1774
|
-
const { channel: r } =
|
|
1775
|
-
return s ? /* @__PURE__ */ h(
|
|
1774
|
+
const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
|
|
1775
|
+
return s ? /* @__PURE__ */ h(se, { children: [
|
|
1776
1776
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
1777
1777
|
t == null ? void 0 : t()
|
|
1778
1778
|
] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
@@ -1824,7 +1824,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1824
1824
|
if (t === -1)
|
|
1825
1825
|
return e;
|
|
1826
1826
|
const s = t + ze.length;
|
|
1827
|
-
return /* @__PURE__ */ h(
|
|
1827
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1828
1828
|
e.slice(0, t),
|
|
1829
1829
|
/* @__PURE__ */ n(
|
|
1830
1830
|
"a",
|
|
@@ -1920,7 +1920,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1920
1920
|
Oe.ExternalSources
|
|
1921
1921
|
]), qa = ({ threadList: e }) => {
|
|
1922
1922
|
var b, _;
|
|
1923
|
-
const { channel: t, channelConfig: s, thread: a } =
|
|
1923
|
+
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
|
|
1924
1924
|
if (!e && l && Ya.has(o)) {
|
|
1925
1925
|
const v = Wa(t, (b = r.user) == null ? void 0 : b.id);
|
|
1926
1926
|
return /* @__PURE__ */ n(
|
|
@@ -1973,7 +1973,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1973
1973
|
},
|
|
1974
1974
|
children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
|
|
1975
1975
|
/* @__PURE__ */ n(
|
|
1976
|
-
|
|
1976
|
+
oe,
|
|
1977
1977
|
{
|
|
1978
1978
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1979
1979
|
id: e,
|
|
@@ -2014,7 +2014,7 @@ function Wa(e, t) {
|
|
|
2014
2014
|
const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2015
2015
|
"div",
|
|
2016
2016
|
{
|
|
2017
|
-
className:
|
|
2017
|
+
className: y("flex items-center justify-center h-full", e),
|
|
2018
2018
|
children: [
|
|
2019
2019
|
/* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
2020
2020
|
/* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
|
|
@@ -2054,12 +2054,12 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2054
2054
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
2055
2055
|
]
|
|
2056
2056
|
}
|
|
2057
|
-
), Se =
|
|
2057
|
+
), Se = U.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
2058
2058
|
/* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
|
|
2059
2059
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2060
2060
|
] }) }));
|
|
2061
2061
|
Se.displayName = "LoadingState";
|
|
2062
|
-
const
|
|
2062
|
+
const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Ja = ({
|
|
2063
2063
|
onBack: e,
|
|
2064
2064
|
showBackButton: t,
|
|
2065
2065
|
showStarButton: s = !1,
|
|
@@ -2078,26 +2078,26 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2078
2078
|
onParticipantNameClick: _,
|
|
2079
2079
|
renderHeaderTitleBadges: v
|
|
2080
2080
|
}) => {
|
|
2081
|
-
var
|
|
2082
|
-
const { channel: p } =
|
|
2083
|
-
var
|
|
2084
|
-
const
|
|
2085
|
-
return
|
|
2081
|
+
var O, E, k, R, D;
|
|
2082
|
+
const { channel: p } = de(), x = U.useMemo(() => {
|
|
2083
|
+
var S, P;
|
|
2084
|
+
const I = (S = p._client) == null ? void 0 : S.userID;
|
|
2085
|
+
return I ? Object.values(((P = p.state) == null ? void 0 : P.members) || {}).find(
|
|
2086
2086
|
(F) => {
|
|
2087
2087
|
var Y;
|
|
2088
|
-
return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !==
|
|
2088
|
+
return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !== I;
|
|
2089
2089
|
}
|
|
2090
2090
|
) : void 0;
|
|
2091
|
-
}, [(
|
|
2091
|
+
}, [(O = p._client) == null ? void 0 : O.userID, (E = p.state) == null ? void 0 : E.members]), A = Xt(x == null ? void 0 : x.user), M = (k = x == null ? void 0 : x.user) == null ? void 0 : k.image, N = Wt(p), L = v == null ? void 0 : v({
|
|
2092
2092
|
channel: p,
|
|
2093
2093
|
participant: x
|
|
2094
|
-
}),
|
|
2094
|
+
}), $ = async () => {
|
|
2095
2095
|
try {
|
|
2096
|
-
|
|
2097
|
-
} catch (
|
|
2096
|
+
N ? await p.unpin() : await p.pin();
|
|
2097
|
+
} catch (I) {
|
|
2098
2098
|
console.error(
|
|
2099
2099
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
2100
|
-
|
|
2100
|
+
I
|
|
2101
2101
|
);
|
|
2102
2102
|
}
|
|
2103
2103
|
};
|
|
@@ -2106,8 +2106,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2106
2106
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2107
2107
|
"button",
|
|
2108
2108
|
{
|
|
2109
|
-
className:
|
|
2110
|
-
|
|
2109
|
+
className: y(
|
|
2110
|
+
le,
|
|
2111
2111
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2112
2112
|
),
|
|
2113
2113
|
onClick: e || (() => {
|
|
@@ -2119,12 +2119,12 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2119
2119
|
) }),
|
|
2120
2120
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
2121
2121
|
/* @__PURE__ */ n(
|
|
2122
|
-
|
|
2122
|
+
oe,
|
|
2123
2123
|
{
|
|
2124
|
-
id: ((
|
|
2124
|
+
id: ((R = x == null ? void 0 : x.user) == null ? void 0 : R.id) || p.id || "unknown",
|
|
2125
2125
|
name: A,
|
|
2126
2126
|
image: M,
|
|
2127
|
-
starred: s &&
|
|
2127
|
+
starred: s && N,
|
|
2128
2128
|
dmAgentEnabled: a,
|
|
2129
2129
|
size: 48
|
|
2130
2130
|
}
|
|
@@ -2138,13 +2138,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2138
2138
|
className: "flex max-w-full items-center gap-0.5 rounded text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70",
|
|
2139
2139
|
children: [
|
|
2140
2140
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2141
|
-
|
|
2141
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
|
|
2142
2142
|
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0", weight: "bold" })
|
|
2143
2143
|
]
|
|
2144
2144
|
}
|
|
2145
2145
|
) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
|
|
2146
2146
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2147
|
-
|
|
2147
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
|
|
2148
2148
|
] }),
|
|
2149
2149
|
a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2150
2150
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
@@ -2155,18 +2155,18 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2155
2155
|
s && /* @__PURE__ */ n(
|
|
2156
2156
|
"button",
|
|
2157
2157
|
{
|
|
2158
|
-
className:
|
|
2159
|
-
onClick:
|
|
2158
|
+
className: le,
|
|
2159
|
+
onClick: $,
|
|
2160
2160
|
type: "button",
|
|
2161
|
-
"aria-label":
|
|
2161
|
+
"aria-label": N ? "Unstar conversation" : "Star conversation",
|
|
2162
2162
|
children: /* @__PURE__ */ n(
|
|
2163
2163
|
Be,
|
|
2164
2164
|
{
|
|
2165
|
-
className:
|
|
2166
|
-
"text-yellow-600":
|
|
2167
|
-
"text-black/90": !
|
|
2165
|
+
className: y("size-5", {
|
|
2166
|
+
"text-yellow-600": N,
|
|
2167
|
+
"text-black/90": !N
|
|
2168
2168
|
}),
|
|
2169
|
-
weight:
|
|
2169
|
+
weight: N ? "duotone" : "regular"
|
|
2170
2170
|
}
|
|
2171
2171
|
)
|
|
2172
2172
|
}
|
|
@@ -2185,7 +2185,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2185
2185
|
onBlockParticipantClick: g,
|
|
2186
2186
|
onReportParticipantClick: u,
|
|
2187
2187
|
customChannelActions: f,
|
|
2188
|
-
triggerClassName:
|
|
2188
|
+
triggerClassName: y(le, "bg-[#F1F0EE]")
|
|
2189
2189
|
}
|
|
2190
2190
|
))
|
|
2191
2191
|
] })
|
|
@@ -2195,8 +2195,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2195
2195
|
t && e && /* @__PURE__ */ n(
|
|
2196
2196
|
"button",
|
|
2197
2197
|
{
|
|
2198
|
-
className:
|
|
2199
|
-
|
|
2198
|
+
className: y(
|
|
2199
|
+
le,
|
|
2200
2200
|
"messaging-channel-view-back-button-desktop"
|
|
2201
2201
|
),
|
|
2202
2202
|
type: "button",
|
|
@@ -2206,12 +2206,12 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2206
2206
|
}
|
|
2207
2207
|
),
|
|
2208
2208
|
/* @__PURE__ */ n(
|
|
2209
|
-
|
|
2209
|
+
oe,
|
|
2210
2210
|
{
|
|
2211
2211
|
id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || p.id || "unknown",
|
|
2212
2212
|
name: A,
|
|
2213
2213
|
image: M,
|
|
2214
|
-
starred: s &&
|
|
2214
|
+
starred: s && N,
|
|
2215
2215
|
dmAgentEnabled: a,
|
|
2216
2216
|
size: 48
|
|
2217
2217
|
}
|
|
@@ -2226,13 +2226,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2226
2226
|
className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
|
|
2227
2227
|
children: [
|
|
2228
2228
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2229
|
-
|
|
2229
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
|
|
2230
2230
|
/* @__PURE__ */ n(Ve, { className: "size-4 shrink-0", weight: "bold" })
|
|
2231
2231
|
]
|
|
2232
2232
|
}
|
|
2233
2233
|
) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
2234
2234
|
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2235
|
-
|
|
2235
|
+
L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
|
|
2236
2236
|
] }),
|
|
2237
2237
|
a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2238
2238
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
@@ -2244,18 +2244,18 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2244
2244
|
s && /* @__PURE__ */ n(
|
|
2245
2245
|
"button",
|
|
2246
2246
|
{
|
|
2247
|
-
className:
|
|
2248
|
-
onClick:
|
|
2247
|
+
className: le,
|
|
2248
|
+
onClick: $,
|
|
2249
2249
|
type: "button",
|
|
2250
|
-
"aria-label":
|
|
2250
|
+
"aria-label": N ? "Unstar conversation" : "Star conversation",
|
|
2251
2251
|
children: /* @__PURE__ */ n(
|
|
2252
2252
|
Be,
|
|
2253
2253
|
{
|
|
2254
|
-
className:
|
|
2255
|
-
"text-yellow-600":
|
|
2256
|
-
"text-black/90": !
|
|
2254
|
+
className: y("size-6", {
|
|
2255
|
+
"text-yellow-600": N,
|
|
2256
|
+
"text-black/90": !N
|
|
2257
2257
|
}),
|
|
2258
|
-
weight:
|
|
2258
|
+
weight: N ? "duotone" : "regular"
|
|
2259
2259
|
}
|
|
2260
2260
|
)
|
|
2261
2261
|
}
|
|
@@ -2274,7 +2274,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2274
2274
|
onBlockParticipantClick: g,
|
|
2275
2275
|
onReportParticipantClick: u,
|
|
2276
2276
|
customChannelActions: f,
|
|
2277
|
-
triggerClassName:
|
|
2277
|
+
triggerClassName: le
|
|
2278
2278
|
}
|
|
2279
2279
|
))
|
|
2280
2280
|
] })
|
|
@@ -2302,48 +2302,48 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2302
2302
|
renderHeaderTitleBadges: x,
|
|
2303
2303
|
customChannelActions: A,
|
|
2304
2304
|
renderChannelActions: M,
|
|
2305
|
-
renderMessage:
|
|
2306
|
-
dmAgentEnabled:
|
|
2307
|
-
viewerLanguage:
|
|
2308
|
-
showChannelInfo:
|
|
2309
|
-
onParticipantNameClick:
|
|
2305
|
+
renderMessage: N,
|
|
2306
|
+
dmAgentEnabled: L = !1,
|
|
2307
|
+
viewerLanguage: $,
|
|
2308
|
+
showChannelInfo: O = !0,
|
|
2309
|
+
onParticipantNameClick: E
|
|
2310
2310
|
}) => {
|
|
2311
|
-
var F, Y, Z,
|
|
2312
|
-
const { channel:
|
|
2313
|
-
var
|
|
2314
|
-
const
|
|
2315
|
-
return
|
|
2311
|
+
var F, Y, Z, q, G, w;
|
|
2312
|
+
const { channel: k } = de(), R = U.useMemo(() => {
|
|
2313
|
+
var j, W;
|
|
2314
|
+
const C = (j = k._client) == null ? void 0 : j.userID;
|
|
2315
|
+
return C ? Object.values(((W = k.state) == null ? void 0 : W.members) || {}).find(
|
|
2316
2316
|
(V) => {
|
|
2317
|
-
var
|
|
2318
|
-
return ((
|
|
2317
|
+
var J;
|
|
2318
|
+
return ((J = V.user) == null ? void 0 : J.id) && V.user.id !== C;
|
|
2319
2319
|
}
|
|
2320
2320
|
) : void 0;
|
|
2321
|
-
}, [(F =
|
|
2322
|
-
var
|
|
2323
|
-
const
|
|
2324
|
-
return
|
|
2325
|
-
var
|
|
2326
|
-
return ((
|
|
2321
|
+
}, [(F = k._client) == null ? void 0 : F.userID, (Y = k.state) == null ? void 0 : Y.members]), D = U.useMemo(() => {
|
|
2322
|
+
var j, W;
|
|
2323
|
+
const C = (j = k._client) == null ? void 0 : j.userID;
|
|
2324
|
+
return C ? Object.values(((W = k.state) == null ? void 0 : W.members) || {}).find((V) => {
|
|
2325
|
+
var J;
|
|
2326
|
+
return ((J = V.user) == null ? void 0 : J.id) === C;
|
|
2327
2327
|
}) : void 0;
|
|
2328
|
-
}, [(Z =
|
|
2329
|
-
(
|
|
2330
|
-
const { message: B } = xe("ChannelView"),
|
|
2328
|
+
}, [(Z = k._client) == null ? void 0 : Z.userID, (q = k.state) == null ? void 0 : q.members]), I = ((G = D == null ? void 0 : D.user) == null ? void 0 : G.is_account) ?? (D == null ? void 0 : D.is_account), T = ((w = R == null ? void 0 : R.user) == null ? void 0 : w.is_account) ?? (R == null ? void 0 : R.is_account), S = L && I === !1 && T === !0, P = K(
|
|
2329
|
+
(C) => {
|
|
2330
|
+
const { message: B } = xe("ChannelView"), j = /* @__PURE__ */ n(
|
|
2331
2331
|
Sa,
|
|
2332
2332
|
{
|
|
2333
|
-
...
|
|
2333
|
+
...C,
|
|
2334
2334
|
chatbotVotingEnabled: v,
|
|
2335
|
-
viewerLanguage:
|
|
2335
|
+
viewerLanguage: $
|
|
2336
2336
|
}
|
|
2337
2337
|
);
|
|
2338
|
-
return !
|
|
2338
|
+
return !N || !B ? j : N(j, B);
|
|
2339
2339
|
},
|
|
2340
|
-
[v,
|
|
2340
|
+
[v, N, $]
|
|
2341
2341
|
);
|
|
2342
|
-
return /* @__PURE__ */ n(
|
|
2342
|
+
return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
|
|
2343
2343
|
ls,
|
|
2344
2344
|
{
|
|
2345
2345
|
overrides: {
|
|
2346
|
-
Message:
|
|
2346
|
+
Message: P,
|
|
2347
2347
|
MessageActions: Aa
|
|
2348
2348
|
},
|
|
2349
2349
|
children: /* @__PURE__ */ h(cs, { children: [
|
|
@@ -2352,9 +2352,9 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2352
2352
|
{
|
|
2353
2353
|
onBack: e,
|
|
2354
2354
|
showBackButton: t,
|
|
2355
|
-
showChannelInfo:
|
|
2355
|
+
showChannelInfo: O,
|
|
2356
2356
|
showStarButton: _,
|
|
2357
|
-
dmAgentEnabled:
|
|
2357
|
+
dmAgentEnabled: S,
|
|
2358
2358
|
onLeaveConversation: i,
|
|
2359
2359
|
onBlockParticipant: o,
|
|
2360
2360
|
showDeleteConversation: l,
|
|
@@ -2365,11 +2365,11 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2365
2365
|
onReportParticipantClick: g,
|
|
2366
2366
|
customChannelActions: A,
|
|
2367
2367
|
renderChannelActions: M,
|
|
2368
|
-
onParticipantNameClick:
|
|
2368
|
+
onParticipantNameClick: E,
|
|
2369
2369
|
renderHeaderTitleBadges: x
|
|
2370
2370
|
}
|
|
2371
2371
|
) }, "lt-channel-header"),
|
|
2372
|
-
p ? /* @__PURE__ */ n(
|
|
2372
|
+
p ? /* @__PURE__ */ n(U.Fragment, { children: p() }, "lt-channel-banner") : null,
|
|
2373
2373
|
/* @__PURE__ */ n(
|
|
2374
2374
|
"div",
|
|
2375
2375
|
{
|
|
@@ -2378,14 +2378,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2378
2378
|
},
|
|
2379
2379
|
"lt-channel-message-list"
|
|
2380
2380
|
),
|
|
2381
|
-
r ? /* @__PURE__ */ n(
|
|
2381
|
+
r ? /* @__PURE__ */ n(U.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
|
|
2382
2382
|
/* @__PURE__ */ n(
|
|
2383
2383
|
Pa,
|
|
2384
2384
|
{
|
|
2385
2385
|
...s && {
|
|
2386
|
-
renderActions: () => s == null ? void 0 : s(
|
|
2386
|
+
renderActions: () => s == null ? void 0 : s(k)
|
|
2387
2387
|
},
|
|
2388
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
2388
|
+
renderFooter: () => a == null ? void 0 : a(k),
|
|
2389
2389
|
disabled: c,
|
|
2390
2390
|
disabledReason: b
|
|
2391
2391
|
},
|
|
@@ -2394,7 +2394,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2394
2394
|
] })
|
|
2395
2395
|
}
|
|
2396
2396
|
) });
|
|
2397
|
-
}, un =
|
|
2397
|
+
}, un = U.memo(
|
|
2398
2398
|
({
|
|
2399
2399
|
channel: e,
|
|
2400
2400
|
onBack: t,
|
|
@@ -2417,56 +2417,56 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2417
2417
|
dmAgentEnabled: x,
|
|
2418
2418
|
messageMetadata: A,
|
|
2419
2419
|
onMessageSent: M,
|
|
2420
|
-
showStarButton:
|
|
2421
|
-
chatbotVotingEnabled:
|
|
2422
|
-
renderChannelBanner:
|
|
2423
|
-
renderHeaderTitleBadges:
|
|
2424
|
-
customChannelActions:
|
|
2425
|
-
renderChannelActions:
|
|
2426
|
-
renderMessage:
|
|
2420
|
+
showStarButton: N = !1,
|
|
2421
|
+
chatbotVotingEnabled: L = !1,
|
|
2422
|
+
renderChannelBanner: $,
|
|
2423
|
+
renderHeaderTitleBadges: O,
|
|
2424
|
+
customChannelActions: E,
|
|
2425
|
+
renderChannelActions: k,
|
|
2426
|
+
renderMessage: R,
|
|
2427
2427
|
onMessageLinkClick: D,
|
|
2428
|
-
sendButton:
|
|
2429
|
-
attachmentPreviewList:
|
|
2430
|
-
viewerLanguage:
|
|
2431
|
-
showChannelInfo:
|
|
2428
|
+
sendButton: I,
|
|
2429
|
+
attachmentPreviewList: T,
|
|
2430
|
+
viewerLanguage: S,
|
|
2431
|
+
showChannelInfo: P = !0,
|
|
2432
2432
|
onParticipantNameClick: F
|
|
2433
2433
|
}) => {
|
|
2434
2434
|
const Y = K(
|
|
2435
|
-
async (
|
|
2436
|
-
var
|
|
2437
|
-
const
|
|
2438
|
-
...
|
|
2435
|
+
async (q, G, w) => {
|
|
2436
|
+
var J;
|
|
2437
|
+
const C = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, B = x && !C, j = {
|
|
2438
|
+
...G,
|
|
2439
2439
|
...B && { silent: !0 },
|
|
2440
2440
|
...A && {
|
|
2441
2441
|
metadata: {
|
|
2442
|
-
...
|
|
2442
|
+
...G.metadata ?? {},
|
|
2443
2443
|
...A
|
|
2444
2444
|
}
|
|
2445
2445
|
}
|
|
2446
|
-
},
|
|
2446
|
+
}, W = {
|
|
2447
2447
|
...w,
|
|
2448
2448
|
...B && { skip_push: !0 }
|
|
2449
|
-
}, V = await e.sendMessage(
|
|
2449
|
+
}, V = await e.sendMessage(j, W);
|
|
2450
2450
|
return M == null || M(V), V;
|
|
2451
2451
|
},
|
|
2452
2452
|
[e, x, A, M]
|
|
2453
|
-
), Z =
|
|
2453
|
+
), Z = H(null);
|
|
2454
2454
|
return X(() => {
|
|
2455
2455
|
if (!D) return;
|
|
2456
|
-
const
|
|
2457
|
-
if (!
|
|
2458
|
-
const
|
|
2459
|
-
const
|
|
2460
|
-
if (!
|
|
2461
|
-
const
|
|
2462
|
-
D(
|
|
2456
|
+
const q = Z.current;
|
|
2457
|
+
if (!q) return;
|
|
2458
|
+
const G = (w) => {
|
|
2459
|
+
const C = w.target, B = C == null ? void 0 : C.closest("a[href]"), j = B == null ? void 0 : B.getAttribute("href");
|
|
2460
|
+
if (!j) return;
|
|
2461
|
+
const W = B == null ? void 0 : B.closest("[data-message-id]"), V = W == null ? void 0 : W.getAttribute("data-message-id"), J = V ? e.state.messages.find((re) => re.id === V) : void 0;
|
|
2462
|
+
D(j, J);
|
|
2463
2463
|
};
|
|
2464
|
-
return
|
|
2464
|
+
return q.addEventListener("click", G), () => q.removeEventListener("click", G);
|
|
2465
2465
|
}, [D, e]), /* @__PURE__ */ n(
|
|
2466
2466
|
"div",
|
|
2467
2467
|
{
|
|
2468
2468
|
ref: Z,
|
|
2469
|
-
className:
|
|
2469
|
+
className: y(
|
|
2470
2470
|
"messaging-channel-view h-full flex flex-col",
|
|
2471
2471
|
d
|
|
2472
2472
|
),
|
|
@@ -2480,8 +2480,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2480
2480
|
DateSeparator: Vs,
|
|
2481
2481
|
TypingIndicator: qa,
|
|
2482
2482
|
doSendMessageRequest: Y,
|
|
2483
|
-
...
|
|
2484
|
-
...
|
|
2483
|
+
...I ? { SendButton: I } : {},
|
|
2484
|
+
...T ? { AttachmentPreviewList: T } : {},
|
|
2485
2485
|
children: /* @__PURE__ */ n(
|
|
2486
2486
|
Za,
|
|
2487
2487
|
{
|
|
@@ -2501,16 +2501,16 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2501
2501
|
showReportParticipant: _,
|
|
2502
2502
|
composerDisabled: v,
|
|
2503
2503
|
composerDisabledReason: p,
|
|
2504
|
-
showStarButton:
|
|
2504
|
+
showStarButton: N,
|
|
2505
2505
|
dmAgentEnabled: x,
|
|
2506
|
-
chatbotVotingEnabled:
|
|
2507
|
-
renderChannelBanner:
|
|
2508
|
-
renderHeaderTitleBadges:
|
|
2509
|
-
customChannelActions:
|
|
2510
|
-
renderChannelActions:
|
|
2511
|
-
renderMessage:
|
|
2512
|
-
viewerLanguage:
|
|
2513
|
-
showChannelInfo:
|
|
2506
|
+
chatbotVotingEnabled: L,
|
|
2507
|
+
renderChannelBanner: $,
|
|
2508
|
+
renderHeaderTitleBadges: O,
|
|
2509
|
+
customChannelActions: E,
|
|
2510
|
+
renderChannelActions: k,
|
|
2511
|
+
renderMessage: R,
|
|
2512
|
+
viewerLanguage: S,
|
|
2513
|
+
showChannelInfo: P,
|
|
2514
2514
|
onParticipantNameClick: F
|
|
2515
2515
|
}
|
|
2516
2516
|
)
|
|
@@ -2521,7 +2521,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2521
2521
|
}
|
|
2522
2522
|
);
|
|
2523
2523
|
un.displayName = "ChannelView";
|
|
2524
|
-
const be =
|
|
2524
|
+
const be = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2525
2525
|
/* @__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: "⚠️" }) }),
|
|
2526
2526
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2527
2527
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -2555,113 +2555,112 @@ const ki = ({
|
|
|
2555
2555
|
renderChannelBanner: _,
|
|
2556
2556
|
customChannelActions: v,
|
|
2557
2557
|
renderChannelActions: p,
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
showChannelInfo: y
|
|
2558
|
+
renderMessage: x,
|
|
2559
|
+
onMessageLinkClick: A,
|
|
2560
|
+
showChannelInfo: M
|
|
2562
2561
|
}) => {
|
|
2563
2562
|
const {
|
|
2564
|
-
client:
|
|
2565
|
-
isConnected:
|
|
2566
|
-
isLoading:
|
|
2567
|
-
error:
|
|
2563
|
+
client: N,
|
|
2564
|
+
isConnected: L,
|
|
2565
|
+
isLoading: $,
|
|
2566
|
+
error: O,
|
|
2568
2567
|
refreshConnection: E,
|
|
2569
|
-
service:
|
|
2570
|
-
debug:
|
|
2571
|
-
} = Ps(), [
|
|
2572
|
-
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2575
|
-
const
|
|
2568
|
+
service: k,
|
|
2569
|
+
debug: R
|
|
2570
|
+
} = Ps(), [D, I] = z(null), [T, S] = z(null), [P, F] = z(!1), { showDeleteConversation: Y = !0 } = e, Z = H(o);
|
|
2571
|
+
Z.current = o;
|
|
2572
|
+
const q = H(a);
|
|
2573
|
+
q.current = a;
|
|
2574
|
+
const G = H(null), w = H(null);
|
|
2576
2575
|
X(() => {
|
|
2577
|
-
|
|
2578
|
-
}, [
|
|
2579
|
-
if (!
|
|
2580
|
-
const
|
|
2581
|
-
if (!
|
|
2582
|
-
const
|
|
2583
|
-
if (
|
|
2584
|
-
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2576
|
+
w.current = D;
|
|
2577
|
+
}, [D]), X(() => {
|
|
2578
|
+
if (!N || !L) return;
|
|
2579
|
+
const j = N.userID;
|
|
2580
|
+
if (!j) return;
|
|
2581
|
+
const W = `${j}::${i}`;
|
|
2582
|
+
if (G.current === W) return;
|
|
2583
|
+
G.current = W;
|
|
2584
|
+
const V = () => {
|
|
2585
|
+
G.current === W && (G.current = null);
|
|
2587
2586
|
};
|
|
2588
2587
|
(async () => {
|
|
2589
|
-
var
|
|
2588
|
+
var re, ue;
|
|
2590
2589
|
try {
|
|
2591
|
-
|
|
2590
|
+
R && console.log(
|
|
2592
2591
|
"[MessagingShell] Loading initial conversation with:",
|
|
2593
2592
|
i
|
|
2594
2593
|
);
|
|
2595
|
-
const
|
|
2594
|
+
const ee = await N.queryChannels(
|
|
2596
2595
|
{
|
|
2597
2596
|
type: "messaging",
|
|
2598
|
-
members: { $eq: [
|
|
2597
|
+
members: { $eq: [j, i] }
|
|
2599
2598
|
},
|
|
2600
2599
|
{},
|
|
2601
2600
|
{ limit: 1 }
|
|
2602
2601
|
);
|
|
2603
|
-
if (
|
|
2604
|
-
I(
|
|
2602
|
+
if (ee.length > 0) {
|
|
2603
|
+
I(ee[0]), S(null), (re = q.current) == null || re.call(q, ee[0]), R && console.log(
|
|
2605
2604
|
"[MessagingShell] Initial conversation loaded:",
|
|
2606
|
-
|
|
2605
|
+
ee[0].id
|
|
2607
2606
|
);
|
|
2608
2607
|
return;
|
|
2609
2608
|
}
|
|
2610
|
-
const
|
|
2611
|
-
if (!
|
|
2612
|
-
|
|
2609
|
+
const ie = Z.current;
|
|
2610
|
+
if (!ie || !k) {
|
|
2611
|
+
V(), S("No conversation found with this account"), R && console.log(
|
|
2613
2612
|
"[MessagingShell] No conversation found for:",
|
|
2614
2613
|
i
|
|
2615
2614
|
);
|
|
2616
2615
|
return;
|
|
2617
2616
|
}
|
|
2618
2617
|
try {
|
|
2619
|
-
const
|
|
2620
|
-
id:
|
|
2621
|
-
name:
|
|
2622
|
-
phone:
|
|
2618
|
+
const Q = await k.startChannelWithParticipant({
|
|
2619
|
+
id: ie.id,
|
|
2620
|
+
name: ie.name,
|
|
2621
|
+
phone: ie.phone
|
|
2623
2622
|
});
|
|
2624
|
-
I(
|
|
2623
|
+
I(Q), S(null), (ue = q.current) == null || ue.call(q, Q), R && console.log(
|
|
2625
2624
|
"[MessagingShell] Channel created and loaded:",
|
|
2626
|
-
|
|
2625
|
+
Q.id
|
|
2627
2626
|
);
|
|
2628
|
-
} catch (
|
|
2627
|
+
} catch (Q) {
|
|
2629
2628
|
console.error(
|
|
2630
2629
|
"[MessagingShell] Failed to create conversation:",
|
|
2631
|
-
|
|
2632
|
-
),
|
|
2630
|
+
Q
|
|
2631
|
+
), V(), S("Failed to create conversation");
|
|
2633
2632
|
}
|
|
2634
|
-
} catch (
|
|
2633
|
+
} catch (ee) {
|
|
2635
2634
|
console.error(
|
|
2636
2635
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2637
|
-
|
|
2638
|
-
),
|
|
2636
|
+
ee
|
|
2637
|
+
), V(), w.current || S("Failed to load conversation");
|
|
2639
2638
|
}
|
|
2640
2639
|
})();
|
|
2641
|
-
}, [i,
|
|
2642
|
-
const
|
|
2643
|
-
|
|
2644
|
-
const
|
|
2645
|
-
var
|
|
2646
|
-
I(null),
|
|
2640
|
+
}, [i, N, L, k, R]);
|
|
2641
|
+
const C = H(r);
|
|
2642
|
+
C.current = r;
|
|
2643
|
+
const B = K(() => {
|
|
2644
|
+
var j;
|
|
2645
|
+
I(null), F(!0), (j = C.current) == null || j.call(C);
|
|
2647
2646
|
}, []);
|
|
2648
|
-
return
|
|
2647
|
+
return $ ? /* @__PURE__ */ n(Se, {}) : O ? /* @__PURE__ */ n(be, { message: O, onBack: E }) : !L || !N ? /* @__PURE__ */ n(
|
|
2649
2648
|
be,
|
|
2650
2649
|
{
|
|
2651
2650
|
message: "Not connected to messaging service",
|
|
2652
2651
|
onBack: E
|
|
2653
2652
|
}
|
|
2654
|
-
) : T ? /* @__PURE__ */ n(be, { message: T }) :
|
|
2653
|
+
) : T ? /* @__PURE__ */ n(be, { message: T }) : P && !D ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : D ? /* @__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(
|
|
2655
2654
|
un,
|
|
2656
2655
|
{
|
|
2657
|
-
channel:
|
|
2656
|
+
channel: D,
|
|
2658
2657
|
renderMessageInputActions: t,
|
|
2659
2658
|
renderConversationFooter: s,
|
|
2660
2659
|
renderChannelBanner: _,
|
|
2661
|
-
onLeaveConversation:
|
|
2662
|
-
onBlockParticipant:
|
|
2660
|
+
onLeaveConversation: B,
|
|
2661
|
+
onBlockParticipant: B,
|
|
2663
2662
|
CustomChannelEmptyState: l,
|
|
2664
|
-
showDeleteConversation:
|
|
2663
|
+
showDeleteConversation: Y,
|
|
2665
2664
|
onBlockParticipantClick: d,
|
|
2666
2665
|
onReportParticipantClick: m,
|
|
2667
2666
|
dmAgentEnabled: g,
|
|
@@ -2671,12 +2670,11 @@ const ki = ({
|
|
|
2671
2670
|
renderHeaderTitleBadges: b,
|
|
2672
2671
|
customChannelActions: v,
|
|
2673
2672
|
renderChannelActions: p,
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
showChannelInfo: y
|
|
2673
|
+
renderMessage: x,
|
|
2674
|
+
onMessageLinkClick: A,
|
|
2675
|
+
showChannelInfo: M
|
|
2678
2676
|
},
|
|
2679
|
-
|
|
2677
|
+
D.id
|
|
2680
2678
|
) }) }) : /* @__PURE__ */ n(Se, {});
|
|
2681
2679
|
};
|
|
2682
2680
|
function Qa(e) {
|
|
@@ -2685,14 +2683,14 @@ function Qa(e) {
|
|
|
2685
2683
|
for (const s of t)
|
|
2686
2684
|
e.state.addMessageSorted(s.message);
|
|
2687
2685
|
}
|
|
2688
|
-
const mn =
|
|
2686
|
+
const mn = U.createContext({
|
|
2689
2687
|
selectedChannel: void 0,
|
|
2690
2688
|
onChannelSelect: () => {
|
|
2691
2689
|
},
|
|
2692
2690
|
debug: !1,
|
|
2693
2691
|
renderMessagePreview: void 0,
|
|
2694
2692
|
viewerLanguage: void 0
|
|
2695
|
-
}), er = mn.Provider, tr = () =>
|
|
2693
|
+
}), er = mn.Provider, tr = () => U.useContext(mn), nr = (e, t) => {
|
|
2696
2694
|
const s = new Date(
|
|
2697
2695
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2698
2696
|
), r = new Date(
|
|
@@ -2713,9 +2711,9 @@ const mn = j.createContext({
|
|
|
2713
2711
|
day: "numeric",
|
|
2714
2712
|
year: "2-digit"
|
|
2715
2713
|
});
|
|
2716
|
-
}, hn =
|
|
2714
|
+
}, hn = U.memo(
|
|
2717
2715
|
({ channel: e, unread: t }) => {
|
|
2718
|
-
var
|
|
2716
|
+
var L, $, O;
|
|
2719
2717
|
const {
|
|
2720
2718
|
selectedChannel: s,
|
|
2721
2719
|
onChannelSelect: a,
|
|
@@ -2724,39 +2722,39 @@ const mn = j.createContext({
|
|
|
2724
2722
|
viewerLanguage: o
|
|
2725
2723
|
} = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2726
2724
|
e && a(e);
|
|
2727
|
-
}, m = (
|
|
2728
|
-
const
|
|
2729
|
-
!
|
|
2730
|
-
}, u = Object.values(((
|
|
2731
|
-
(
|
|
2732
|
-
var
|
|
2733
|
-
return ((
|
|
2725
|
+
}, m = (E) => {
|
|
2726
|
+
const k = E.key === "Enter" || E.key === " ", R = E.repeat;
|
|
2727
|
+
!k || R || (E.preventDefault(), d());
|
|
2728
|
+
}, u = Object.values(((L = e == null ? void 0 : e.state) == null ? void 0 : L.members) || {}).find(
|
|
2729
|
+
(E) => {
|
|
2730
|
+
var k, R;
|
|
2731
|
+
return ((k = E.user) == null ? void 0 : k.id) && E.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
|
|
2734
2732
|
}
|
|
2735
|
-
), f = Xt(u == null ? void 0 : u.user), c = (
|
|
2736
|
-
var
|
|
2737
|
-
const
|
|
2738
|
-
if (
|
|
2739
|
-
for (let
|
|
2740
|
-
if (
|
|
2733
|
+
), f = Xt(u == null ? void 0 : u.user), c = ($ = u == null ? void 0 : u.user) == null ? void 0 : $.image, b = (() => {
|
|
2734
|
+
var k;
|
|
2735
|
+
const E = (k = e == null ? void 0 : e.state) == null ? void 0 : k.messages;
|
|
2736
|
+
if (E != null && E.length) {
|
|
2737
|
+
for (let R = E.length - 1; R >= 0; R--)
|
|
2738
|
+
if (E[R].type !== "system") return E[R];
|
|
2741
2739
|
}
|
|
2742
2740
|
})(), v = (() => {
|
|
2743
|
-
var
|
|
2744
|
-
const
|
|
2741
|
+
var T, S, P, F;
|
|
2742
|
+
const E = Kt({
|
|
2745
2743
|
message: b,
|
|
2746
2744
|
viewerLanguage: o
|
|
2747
2745
|
});
|
|
2748
|
-
if (((
|
|
2749
|
-
if (((
|
|
2750
|
-
if (((
|
|
2751
|
-
if (
|
|
2752
|
-
const
|
|
2753
|
-
return
|
|
2754
|
-
})(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", x = b ? Ee(b) : !1, A = i ? i(b, v) : `${x ? "✨ " : ""}${v}`, M = Wt(e),
|
|
2746
|
+
if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
|
|
2747
|
+
if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
|
|
2748
|
+
if (((P = b == null ? void 0 : b.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
|
|
2749
|
+
if (E) return E;
|
|
2750
|
+
const I = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
|
|
2751
|
+
return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2752
|
+
})(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", x = b ? Ee(b) : !1, A = i ? i(b, v) : `${x ? "✨ " : ""}${v}`, M = Wt(e), N = t ?? 0;
|
|
2755
2753
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2756
2754
|
channelId: e == null ? void 0 : e.id,
|
|
2757
2755
|
isSelected: l,
|
|
2758
2756
|
participantName: f,
|
|
2759
|
-
unreadCount:
|
|
2757
|
+
unreadCount: N,
|
|
2760
2758
|
hasTimestamp: !!p
|
|
2761
2759
|
}), /* @__PURE__ */ n(
|
|
2762
2760
|
"div",
|
|
@@ -2765,7 +2763,7 @@ const mn = j.createContext({
|
|
|
2765
2763
|
tabIndex: 0,
|
|
2766
2764
|
onClick: d,
|
|
2767
2765
|
onKeyDown: m,
|
|
2768
|
-
className:
|
|
2766
|
+
className: y(
|
|
2769
2767
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
2770
2768
|
{
|
|
2771
2769
|
"bg-black/[0.04]": l,
|
|
@@ -2774,9 +2772,9 @@ const mn = j.createContext({
|
|
|
2774
2772
|
),
|
|
2775
2773
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
2776
2774
|
/* @__PURE__ */ n(
|
|
2777
|
-
|
|
2775
|
+
oe,
|
|
2778
2776
|
{
|
|
2779
|
-
id: ((
|
|
2777
|
+
id: ((O = u == null ? void 0 : u.user) == null ? void 0 : O.id) || e.id || "unknown",
|
|
2780
2778
|
name: f,
|
|
2781
2779
|
image: c,
|
|
2782
2780
|
size: 48,
|
|
@@ -2788,7 +2786,7 @@ const mn = j.createContext({
|
|
|
2788
2786
|
/* @__PURE__ */ h(
|
|
2789
2787
|
"h3",
|
|
2790
2788
|
{
|
|
2791
|
-
className:
|
|
2789
|
+
className: y(
|
|
2792
2790
|
"text-sm font-medium truncate text-[#191918]"
|
|
2793
2791
|
),
|
|
2794
2792
|
children: [
|
|
@@ -2801,7 +2799,7 @@ const mn = j.createContext({
|
|
|
2801
2799
|
] }),
|
|
2802
2800
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2803
2801
|
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
|
|
2804
|
-
|
|
2802
|
+
N > 0 && /* @__PURE__ */ n("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: N > 99 ? "99+" : N })
|
|
2805
2803
|
] })
|
|
2806
2804
|
] })
|
|
2807
2805
|
] })
|
|
@@ -2810,7 +2808,7 @@ const mn = j.createContext({
|
|
|
2810
2808
|
}
|
|
2811
2809
|
);
|
|
2812
2810
|
hn.displayName = "CustomChannelPreview";
|
|
2813
|
-
const ar = { last_message_at: -1 }, rr =
|
|
2811
|
+
const ar = { last_message_at: -1 }, rr = U.memo(
|
|
2814
2812
|
({
|
|
2815
2813
|
onChannelSelect: e,
|
|
2816
2814
|
selectedChannel: t,
|
|
@@ -2823,9 +2821,9 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2823
2821
|
renderMessagePreview: d,
|
|
2824
2822
|
viewerLanguage: m
|
|
2825
2823
|
}) => {
|
|
2826
|
-
const g =
|
|
2824
|
+
const g = U.useRef(0);
|
|
2827
2825
|
g.current++;
|
|
2828
|
-
const { debug: u = !1 } = Xe(), f =
|
|
2826
|
+
const { debug: u = !1 } = Xe(), f = U.useCallback(
|
|
2829
2827
|
(b) => {
|
|
2830
2828
|
for (const _ of b)
|
|
2831
2829
|
Qa(_);
|
|
@@ -2838,7 +2836,7 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2838
2836
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
2839
2837
|
filters: s
|
|
2840
2838
|
});
|
|
2841
|
-
const c =
|
|
2839
|
+
const c = U.useMemo(
|
|
2842
2840
|
() => ({
|
|
2843
2841
|
selectedChannel: t,
|
|
2844
2842
|
onChannelSelect: e,
|
|
@@ -2857,7 +2855,7 @@ const ar = { last_message_at: -1 }, rr = j.memo(
|
|
|
2857
2855
|
return /* @__PURE__ */ n(
|
|
2858
2856
|
"div",
|
|
2859
2857
|
{
|
|
2860
|
-
className:
|
|
2858
|
+
className: y(
|
|
2861
2859
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2862
2860
|
o
|
|
2863
2861
|
),
|
|
@@ -2896,7 +2894,7 @@ const lr = {
|
|
|
2896
2894
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2897
2895
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2898
2896
|
}, cr = ({ variant: e, cta: t }) => {
|
|
2899
|
-
const s =
|
|
2897
|
+
const s = y(
|
|
2900
2898
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2901
2899
|
lr[e]
|
|
2902
2900
|
), a = tt(t.href);
|
|
@@ -2943,10 +2941,10 @@ const lr = {
|
|
|
2943
2941
|
}) => {
|
|
2944
2942
|
const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
|
|
2945
2943
|
if (!g && !u && !c && !b) return null;
|
|
2946
|
-
const v =
|
|
2944
|
+
const v = y(
|
|
2947
2945
|
"truncate text-base font-medium leading-6",
|
|
2948
2946
|
d && !t ? ur : dr[e]
|
|
2949
|
-
), p =
|
|
2947
|
+
), p = y(
|
|
2950
2948
|
"truncate text-xs leading-4",
|
|
2951
2949
|
mr[e]
|
|
2952
2950
|
);
|
|
@@ -2956,7 +2954,7 @@ const lr = {
|
|
|
2956
2954
|
/* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2957
2955
|
g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2958
2956
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
2959
|
-
/* @__PURE__ */ n("p", { className:
|
|
2957
|
+
/* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
|
|
2960
2958
|
] }),
|
|
2961
2959
|
u && /* @__PURE__ */ n("p", { className: p, children: a })
|
|
2962
2960
|
] }),
|
|
@@ -2966,7 +2964,7 @@ const lr = {
|
|
|
2966
2964
|
] }),
|
|
2967
2965
|
o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
|
|
2968
2966
|
] });
|
|
2969
|
-
}, hr =
|
|
2967
|
+
}, hr = y(
|
|
2970
2968
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2971
2969
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2972
2970
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2984,7 +2982,7 @@ const lr = {
|
|
|
2984
2982
|
bgClassName: l,
|
|
2985
2983
|
"data-testid": d
|
|
2986
2984
|
}) => {
|
|
2987
|
-
const m = s != null || a != null, g =
|
|
2985
|
+
const m = s != null || a != null, g = y(
|
|
2988
2986
|
hr,
|
|
2989
2987
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2990
2988
|
// `focus-ring` is a design-system utility from the component-library
|
|
@@ -3015,7 +3013,7 @@ const lr = {
|
|
|
3015
3013
|
onClick: a,
|
|
3016
3014
|
"aria-label": r,
|
|
3017
3015
|
"data-testid": d,
|
|
3018
|
-
className:
|
|
3016
|
+
className: y(g, "text-left"),
|
|
3019
3017
|
children: [
|
|
3020
3018
|
t,
|
|
3021
3019
|
u
|
|
@@ -3039,9 +3037,9 @@ const lr = {
|
|
|
3039
3037
|
}, gr = {
|
|
3040
3038
|
dark: "size-16 text-white/25",
|
|
3041
3039
|
light: "size-16 text-black/25"
|
|
3042
|
-
}, Re = (e, t) => !!t && !!e &&
|
|
3040
|
+
}, Re = (e, t) => !!t && !!e && ae(e) === "audio", fn = (e, t) => {
|
|
3043
3041
|
if (!t || !e) return !1;
|
|
3044
|
-
const s =
|
|
3042
|
+
const s = ae(e);
|
|
3045
3043
|
return s === "video" || s === "audio";
|
|
3046
3044
|
}, st = "bg-[#F2F3F4]", Te = ({
|
|
3047
3045
|
variant: e,
|
|
@@ -3052,7 +3050,7 @@ const lr = {
|
|
|
3052
3050
|
topLeft: i,
|
|
3053
3051
|
topRight: o
|
|
3054
3052
|
}) => {
|
|
3055
|
-
const l =
|
|
3053
|
+
const l = ae(r), d = !!s && l === "video";
|
|
3056
3054
|
return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3057
3055
|
"audio",
|
|
3058
3056
|
{
|
|
@@ -3065,7 +3063,7 @@ const lr = {
|
|
|
3065
3063
|
) }) : /* @__PURE__ */ h(
|
|
3066
3064
|
"div",
|
|
3067
3065
|
{
|
|
3068
|
-
className:
|
|
3066
|
+
className: y(
|
|
3069
3067
|
"relative h-[180px] w-full overflow-hidden",
|
|
3070
3068
|
d && "bg-black"
|
|
3071
3069
|
),
|
|
@@ -3092,11 +3090,11 @@ const lr = {
|
|
|
3092
3090
|
) : /* @__PURE__ */ n(
|
|
3093
3091
|
"div",
|
|
3094
3092
|
{
|
|
3095
|
-
className:
|
|
3093
|
+
className: y(
|
|
3096
3094
|
"flex h-full w-full items-center justify-center",
|
|
3097
3095
|
fr[e]
|
|
3098
3096
|
),
|
|
3099
|
-
children:
|
|
3097
|
+
children: ce(r, {
|
|
3100
3098
|
className: gr[e],
|
|
3101
3099
|
weight: "regular"
|
|
3102
3100
|
})
|
|
@@ -3325,7 +3323,7 @@ const lr = {
|
|
|
3325
3323
|
{
|
|
3326
3324
|
"data-testid": o,
|
|
3327
3325
|
"data-group-position": a,
|
|
3328
|
-
className:
|
|
3326
|
+
className: y(
|
|
3329
3327
|
// 280px-wide bubble — matches the mobile chat attachment width
|
|
3330
3328
|
// and keeps the document / image / audio bubbles visually
|
|
3331
3329
|
// consistent inside the conversation timeline. The 8px / 16px
|
|
@@ -3345,7 +3343,7 @@ const lr = {
|
|
|
3345
3343
|
l ? /* @__PURE__ */ n(
|
|
3346
3344
|
"p",
|
|
3347
3345
|
{
|
|
3348
|
-
className:
|
|
3346
|
+
className: y(
|
|
3349
3347
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
3350
3348
|
// the same font family + size as `.str-chat__message-text`
|
|
3351
3349
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -3374,7 +3372,7 @@ const lr = {
|
|
|
3374
3372
|
a.stopPropagation(), e();
|
|
3375
3373
|
},
|
|
3376
3374
|
"aria-label": s,
|
|
3377
|
-
className:
|
|
3375
|
+
className: y(
|
|
3378
3376
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
3379
3377
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
3380
3378
|
),
|
|
@@ -3465,7 +3463,7 @@ function Rr(e, t) {
|
|
|
3465
3463
|
}
|
|
3466
3464
|
}
|
|
3467
3465
|
if (!e) return;
|
|
3468
|
-
if (
|
|
3466
|
+
if (ae(e) === "document") {
|
|
3469
3467
|
const r = Qt(e), i = Mr[r];
|
|
3470
3468
|
if (i) return i;
|
|
3471
3469
|
if (e === "application/octet-stream") return;
|
|
@@ -3478,7 +3476,7 @@ function Lr(e, t, s) {
|
|
|
3478
3476
|
const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
|
|
3479
3477
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3480
3478
|
}
|
|
3481
|
-
function
|
|
3479
|
+
function te(e) {
|
|
3482
3480
|
try {
|
|
3483
3481
|
const s = new URL(e).pathname.split("/").pop();
|
|
3484
3482
|
return s && s.length > 0 ? decodeURIComponent(s) : "download";
|
|
@@ -3508,13 +3506,13 @@ const Dr = {
|
|
|
3508
3506
|
const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
|
|
3509
3507
|
"div",
|
|
3510
3508
|
{
|
|
3511
|
-
className:
|
|
3509
|
+
className: y(
|
|
3512
3510
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3513
3511
|
Or[e]
|
|
3514
3512
|
),
|
|
3515
3513
|
"aria-hidden": !0,
|
|
3516
|
-
children:
|
|
3517
|
-
className:
|
|
3514
|
+
children: ce(a, {
|
|
3515
|
+
className: y("size-6", Pr[e]),
|
|
3518
3516
|
weight: "regular"
|
|
3519
3517
|
})
|
|
3520
3518
|
}
|
|
@@ -3523,7 +3521,7 @@ const Dr = {
|
|
|
3523
3521
|
m ? /* @__PURE__ */ n(
|
|
3524
3522
|
"p",
|
|
3525
3523
|
{
|
|
3526
|
-
className:
|
|
3524
|
+
className: y(
|
|
3527
3525
|
"truncate text-xs leading-4",
|
|
3528
3526
|
Dr[e]
|
|
3529
3527
|
),
|
|
@@ -3536,7 +3534,7 @@ const Dr = {
|
|
|
3536
3534
|
type: "button",
|
|
3537
3535
|
onClick: i,
|
|
3538
3536
|
"aria-label": o,
|
|
3539
|
-
className:
|
|
3537
|
+
className: y(
|
|
3540
3538
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
3541
3539
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
3542
3540
|
),
|
|
@@ -3545,7 +3543,7 @@ const Dr = {
|
|
|
3545
3543
|
u
|
|
3546
3544
|
]
|
|
3547
3545
|
}
|
|
3548
|
-
) : /* @__PURE__ */ h(
|
|
3546
|
+
) : /* @__PURE__ */ h(se, { children: [
|
|
3549
3547
|
g,
|
|
3550
3548
|
u
|
|
3551
3549
|
] });
|
|
@@ -3555,7 +3553,7 @@ const Dr = {
|
|
|
3555
3553
|
] });
|
|
3556
3554
|
};
|
|
3557
3555
|
async function bn(e, t) {
|
|
3558
|
-
const s = t ??
|
|
3556
|
+
const s = t ?? te(e);
|
|
3559
3557
|
try {
|
|
3560
3558
|
const a = await fetch(e, { mode: "cors" });
|
|
3561
3559
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
@@ -3582,7 +3580,7 @@ const zr = ({
|
|
|
3582
3580
|
onActivate: a,
|
|
3583
3581
|
trailingAction: r
|
|
3584
3582
|
}) => {
|
|
3585
|
-
const i = t.filename ??
|
|
3583
|
+
const i = t.filename ?? te(t.src);
|
|
3586
3584
|
return /* @__PURE__ */ n(
|
|
3587
3585
|
gn,
|
|
3588
3586
|
{
|
|
@@ -3620,7 +3618,7 @@ const zr = ({
|
|
|
3620
3618
|
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
3621
3619
|
const p = c[v];
|
|
3622
3620
|
if (!p) return;
|
|
3623
|
-
const x = p.filename ??
|
|
3621
|
+
const x = p.filename ?? te(p.src);
|
|
3624
3622
|
bn(p.src, x);
|
|
3625
3623
|
};
|
|
3626
3624
|
if (c.length === 0)
|
|
@@ -3628,7 +3626,7 @@ const zr = ({
|
|
|
3628
3626
|
const _ = /* @__PURE__ */ n(
|
|
3629
3627
|
"span",
|
|
3630
3628
|
{
|
|
3631
|
-
className:
|
|
3629
|
+
className: y(
|
|
3632
3630
|
"flex size-8 items-center justify-center rounded-full",
|
|
3633
3631
|
u === "dark" ? "text-white/70" : "text-black/70"
|
|
3634
3632
|
),
|
|
@@ -3665,7 +3663,7 @@ const zr = ({
|
|
|
3665
3663
|
onNext: t,
|
|
3666
3664
|
prevLabel: s = "Previous",
|
|
3667
3665
|
nextLabel: a = "Next"
|
|
3668
|
-
}) => /* @__PURE__ */ h(
|
|
3666
|
+
}) => /* @__PURE__ */ h(se, { children: [
|
|
3669
3667
|
/* @__PURE__ */ n(
|
|
3670
3668
|
"button",
|
|
3671
3669
|
{
|
|
@@ -3695,7 +3693,7 @@ const zr = ({
|
|
|
3695
3693
|
tone: i = "dark",
|
|
3696
3694
|
onTriggered: o
|
|
3697
3695
|
}) => {
|
|
3698
|
-
const [l, d] =
|
|
3696
|
+
const [l, d] = z(!1), m = K(
|
|
3699
3697
|
(c) => {
|
|
3700
3698
|
c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
|
|
3701
3699
|
}).finally(() => {
|
|
@@ -3703,7 +3701,7 @@ const zr = ({
|
|
|
3703
3701
|
}));
|
|
3704
3702
|
},
|
|
3705
3703
|
[l, e, t, o]
|
|
3706
|
-
), g = r ?? s !== "pill", f = { className:
|
|
3704
|
+
), g = r ?? s !== "pill", f = { className: y(
|
|
3707
3705
|
s === "pill" ? "size-4" : "size-5",
|
|
3708
3706
|
"shrink-0"
|
|
3709
3707
|
), weight: "bold" };
|
|
@@ -3714,7 +3712,7 @@ const zr = ({
|
|
|
3714
3712
|
onClick: m,
|
|
3715
3713
|
disabled: l,
|
|
3716
3714
|
"aria-label": a,
|
|
3717
|
-
className:
|
|
3715
|
+
className: y(
|
|
3718
3716
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
3719
3717
|
{
|
|
3720
3718
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
@@ -3754,7 +3752,7 @@ const zr = ({
|
|
|
3754
3752
|
onClick: m,
|
|
3755
3753
|
disabled: l,
|
|
3756
3754
|
"aria-label": g ? a : void 0,
|
|
3757
|
-
className:
|
|
3755
|
+
className: y(
|
|
3758
3756
|
"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",
|
|
3759
3757
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
3760
3758
|
),
|
|
@@ -3776,7 +3774,7 @@ const zr = ({
|
|
|
3776
3774
|
initialIndex: t,
|
|
3777
3775
|
open: s
|
|
3778
3776
|
}) => {
|
|
3779
|
-
const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] =
|
|
3777
|
+
const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
|
|
3780
3778
|
X(() => {
|
|
3781
3779
|
s && i(Fe(t, 0, Math.max(e - 1, 0)));
|
|
3782
3780
|
}, [s, t, e]), X(() => {
|
|
@@ -3805,7 +3803,7 @@ const zr = ({
|
|
|
3805
3803
|
children: i,
|
|
3806
3804
|
"data-testid": o
|
|
3807
3805
|
}) => {
|
|
3808
|
-
const l =
|
|
3806
|
+
const l = H(null), d = H(null);
|
|
3809
3807
|
return X(() => {
|
|
3810
3808
|
var f;
|
|
3811
3809
|
const u = l.current;
|
|
@@ -3896,8 +3894,8 @@ const zr = ({
|
|
|
3896
3894
|
length: t.length,
|
|
3897
3895
|
initialIndex: s,
|
|
3898
3896
|
open: e
|
|
3899
|
-
}), l = t[r], d =
|
|
3900
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
3897
|
+
}), l = t[r], d = ne(
|
|
3898
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "image"),
|
|
3901
3899
|
[l]
|
|
3902
3900
|
);
|
|
3903
3901
|
return l ? /* @__PURE__ */ h(
|
|
@@ -3951,14 +3949,14 @@ const zr = ({
|
|
|
3951
3949
|
const r = e.length;
|
|
3952
3950
|
if (r === 0) return null;
|
|
3953
3951
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
|
|
3954
|
-
const u =
|
|
3952
|
+
const u = y(Vr, "h-full w-full");
|
|
3955
3953
|
return t ? /* @__PURE__ */ h(
|
|
3956
3954
|
"button",
|
|
3957
3955
|
{
|
|
3958
3956
|
type: "button",
|
|
3959
3957
|
onClick: () => t(m),
|
|
3960
3958
|
"aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
|
|
3961
|
-
className:
|
|
3959
|
+
className: y(u, "cursor-zoom-in"),
|
|
3962
3960
|
children: [
|
|
3963
3961
|
d.content,
|
|
3964
3962
|
g
|
|
@@ -3970,10 +3968,10 @@ const zr = ({
|
|
|
3970
3968
|
g
|
|
3971
3969
|
] }, m);
|
|
3972
3970
|
};
|
|
3973
|
-
return i.length === 1 ? /* @__PURE__ */ n("div", { className:
|
|
3971
|
+
return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
|
|
3974
3972
|
"div",
|
|
3975
3973
|
{
|
|
3976
|
-
className:
|
|
3974
|
+
className: y(
|
|
3977
3975
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
3978
3976
|
a
|
|
3979
3977
|
),
|
|
@@ -3982,7 +3980,7 @@ const zr = ({
|
|
|
3982
3980
|
) : i.length === 3 ? /* @__PURE__ */ h(
|
|
3983
3981
|
"div",
|
|
3984
3982
|
{
|
|
3985
|
-
className:
|
|
3983
|
+
className: y(
|
|
3986
3984
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3987
3985
|
a
|
|
3988
3986
|
),
|
|
@@ -3995,7 +3993,7 @@ const zr = ({
|
|
|
3995
3993
|
) : /* @__PURE__ */ n(
|
|
3996
3994
|
"div",
|
|
3997
3995
|
{
|
|
3998
|
-
className:
|
|
3996
|
+
className: y(
|
|
3999
3997
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
4000
3998
|
a
|
|
4001
3999
|
),
|
|
@@ -4013,7 +4011,7 @@ const zr = ({
|
|
|
4013
4011
|
}
|
|
4014
4012
|
);
|
|
4015
4013
|
}, ye = (e) => {
|
|
4016
|
-
const [t, s] =
|
|
4014
|
+
const [t, s] = z(!1), [a, r] = z(0), i = K(
|
|
4017
4015
|
(l) => {
|
|
4018
4016
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
4019
4017
|
},
|
|
@@ -4133,10 +4131,10 @@ const zr = ({
|
|
|
4133
4131
|
length: t.length,
|
|
4134
4132
|
initialIndex: s,
|
|
4135
4133
|
open: e
|
|
4136
|
-
}), l = t[r], d =
|
|
4137
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4134
|
+
}), l = t[r], d = ne(
|
|
4135
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "document"),
|
|
4138
4136
|
[l]
|
|
4139
|
-
), m =
|
|
4137
|
+
), m = ne(
|
|
4140
4138
|
() => l ? Zr(l.src) : void 0,
|
|
4141
4139
|
[l]
|
|
4142
4140
|
);
|
|
@@ -4187,7 +4185,7 @@ const zr = ({
|
|
|
4187
4185
|
onActivate: a,
|
|
4188
4186
|
trailingAction: r
|
|
4189
4187
|
}) => {
|
|
4190
|
-
const i = t.filename ??
|
|
4188
|
+
const i = t.filename ?? te(t.src);
|
|
4191
4189
|
return /* @__PURE__ */ n(
|
|
4192
4190
|
gn,
|
|
4193
4191
|
{
|
|
@@ -4220,7 +4218,7 @@ const zr = ({
|
|
|
4220
4218
|
return null;
|
|
4221
4219
|
const p = u.map((x) => ({
|
|
4222
4220
|
src: x.src,
|
|
4223
|
-
filename: x.filename ??
|
|
4221
|
+
filename: x.filename ?? te(x.src)
|
|
4224
4222
|
}));
|
|
4225
4223
|
return /* @__PURE__ */ h(
|
|
4226
4224
|
we,
|
|
@@ -4231,7 +4229,7 @@ const zr = ({
|
|
|
4231
4229
|
"data-testid": "pdf-attachment",
|
|
4232
4230
|
children: [
|
|
4233
4231
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, A) => {
|
|
4234
|
-
const M = x.filename ??
|
|
4232
|
+
const M = x.filename ?? te(x.src), N = v && A === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4235
4233
|
pn,
|
|
4236
4234
|
{
|
|
4237
4235
|
url: x.src,
|
|
@@ -4248,7 +4246,7 @@ const zr = ({
|
|
|
4248
4246
|
item: x,
|
|
4249
4247
|
index: A,
|
|
4250
4248
|
onActivate: b,
|
|
4251
|
-
trailingAction:
|
|
4249
|
+
trailingAction: N
|
|
4252
4250
|
},
|
|
4253
4251
|
`${x.src}-${A}`
|
|
4254
4252
|
);
|
|
@@ -4279,8 +4277,8 @@ const zr = ({
|
|
|
4279
4277
|
length: t.length,
|
|
4280
4278
|
initialIndex: s,
|
|
4281
4279
|
open: e
|
|
4282
|
-
}), l = t[r], d =
|
|
4283
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4280
|
+
}), l = t[r], d = ne(
|
|
4281
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "video"),
|
|
4284
4282
|
[l]
|
|
4285
4283
|
);
|
|
4286
4284
|
return l ? /* @__PURE__ */ h(
|
|
@@ -4456,7 +4454,7 @@ const zr = ({
|
|
|
4456
4454
|
onClick: t,
|
|
4457
4455
|
disabled: s,
|
|
4458
4456
|
style: { backgroundColor: "#E6E5E3" },
|
|
4459
|
-
className:
|
|
4457
|
+
className: y(
|
|
4460
4458
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
4461
4459
|
{
|
|
4462
4460
|
"hover:brightness-95 active:brightness-90": !s,
|
|
@@ -4478,7 +4476,7 @@ const zr = ({
|
|
|
4478
4476
|
const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
4479
4477
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4480
4478
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4481
|
-
|
|
4479
|
+
oe,
|
|
4482
4480
|
{
|
|
4483
4481
|
id: o || "account",
|
|
4484
4482
|
name: o || "Account",
|
|
@@ -4517,12 +4515,12 @@ export {
|
|
|
4517
4515
|
Ei as L,
|
|
4518
4516
|
yi as M,
|
|
4519
4517
|
ge as a,
|
|
4520
|
-
|
|
4518
|
+
oe as b,
|
|
4521
4519
|
rr as c,
|
|
4522
4520
|
un as d,
|
|
4523
4521
|
Ci as e,
|
|
4524
4522
|
hi as f,
|
|
4525
|
-
|
|
4523
|
+
ae as g,
|
|
4526
4524
|
zt as h,
|
|
4527
4525
|
Ii as i,
|
|
4528
4526
|
Ca as j,
|
|
@@ -4533,7 +4531,7 @@ export {
|
|
|
4533
4531
|
sr as o,
|
|
4534
4532
|
Rr as p,
|
|
4535
4533
|
Kt as q,
|
|
4536
|
-
|
|
4534
|
+
ce as r,
|
|
4537
4535
|
sn as s,
|
|
4538
4536
|
$s as t,
|
|
4539
4537
|
Si as u,
|
|
@@ -4543,4 +4541,4 @@ export {
|
|
|
4543
4541
|
Xt as y,
|
|
4544
4542
|
va as z
|
|
4545
4543
|
};
|
|
4546
|
-
//# sourceMappingURL=index-
|
|
4544
|
+
//# sourceMappingURL=index-BOsrtjME.js.map
|