@linktr.ee/messaging-react 3.4.0-rc-1782387968 → 3.4.0-rc-1782392622
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-BOD2Qo_b.js → Card-BKd0E-B9.js} +3 -3
- package/dist/{Card-BOD2Qo_b.js.map → Card-BKd0E-B9.js.map} +1 -1
- package/dist/{Card-utKbCGom.cjs → Card-CdaZxDEx.cjs} +2 -2
- package/dist/{Card-utKbCGom.cjs.map → Card-CdaZxDEx.cjs.map} +1 -1
- package/dist/{Card-DcEBssw0.js → Card-CrTBu2I6.js} +2 -2
- package/dist/{Card-DcEBssw0.js.map → Card-CrTBu2I6.js.map} +1 -1
- package/dist/{Card-DkNdLpVE.cjs → Card-DXWp0uwi.cjs} +2 -2
- package/dist/{Card-DkNdLpVE.cjs.map → Card-DXWp0uwi.cjs.map} +1 -1
- package/dist/{Card-UbPYWjnX.cjs → Card-DaalkoQW.cjs} +2 -2
- package/dist/{Card-UbPYWjnX.cjs.map → Card-DaalkoQW.cjs.map} +1 -1
- package/dist/{Card-beoX9cug.js → Card-XVTz8IYz.js} +2 -2
- package/dist/{Card-beoX9cug.js.map → Card-XVTz8IYz.js.map} +1 -1
- package/dist/{LockedThumbnail-Bjdf-fTw.cjs → LockedThumbnail-D3Xwdb5_.cjs} +2 -2
- package/dist/{LockedThumbnail-Bjdf-fTw.cjs.map → LockedThumbnail-D3Xwdb5_.cjs.map} +1 -1
- package/dist/{LockedThumbnail-bOjjYYyV.js → LockedThumbnail-D_44b-Uy.js} +2 -2
- package/dist/{LockedThumbnail-bOjjYYyV.js.map → LockedThumbnail-D_44b-Uy.js.map} +1 -1
- package/dist/index-Cds2w5zi.cjs +2 -0
- package/dist/index-Cds2w5zi.cjs.map +1 -0
- package/dist/{index-DG5LOHey.js → index-DPGZRLRM.js} +998 -973
- package/dist/index-DPGZRLRM.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +11 -19
- package/dist/index.js +19 -20
- package/package.json +2 -2
- package/src/components/ChannelList/CustomChannelPreview.test.tsx +0 -38
- package/src/components/ChannelList/CustomChannelPreview.tsx +6 -5
- package/src/components/ChannelView.stories.tsx +16 -0
- package/src/components/ChannelView.test.tsx +20 -35
- package/src/components/ChannelView.tsx +55 -17
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/index.ts +0 -2
- package/src/stream-custom-data.ts +0 -8
- package/src/types.ts +12 -0
- package/dist/index-B3oQq9zK.cjs +0 -2
- package/dist/index-B3oQq9zK.cjs.map +0 -1
- package/dist/index-DG5LOHey.js.map +0 -1
- package/src/components/VerifiedBadge/index.tsx +0 -25
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as n, jsxs as h, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import j, { createContext as Ye, useContext as Ae, useCallback as K, useState as $, useRef as G, useEffect as X, useId as Sn, useMemo as se, 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 ce, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as
|
|
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,
|
|
7
|
-
import
|
|
8
|
-
import { MessageActions as
|
|
5
|
+
import { Chat as An, DateSeparator as Mn, useChannelStateContext as ce, 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
|
+
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 N from "classnames";
|
|
8
|
+
import { MessageActions as Os, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
|
|
9
9
|
const qt = Ye({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
@@ -16,7 +16,7 @@ const qt = Ye({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), Xe = () => Ae(qt),
|
|
19
|
+
}), Xe = () => Ae(qt), Ni = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -24,10 +24,10 @@ const qt = Ye({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var
|
|
28
|
-
const o =
|
|
29
|
-
(I, ...
|
|
30
|
-
i && console.log(`🔥 [MessagingProvider] ${I}`, ...
|
|
27
|
+
var D, C;
|
|
28
|
+
const o = K(
|
|
29
|
+
(I, ...T) => {
|
|
30
|
+
i && console.log(`🔥 [MessagingProvider] ${I}`, ...T);
|
|
31
31
|
},
|
|
32
32
|
[i]
|
|
33
33
|
);
|
|
@@ -37,18 +37,18 @@ const qt = Ye({
|
|
|
37
37
|
serviceConfig: !!s,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [l, d] =
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
40
|
+
const [l, d] = $(null), [m, g] = $(null), [u, f] = $(!1), [c, b] = $(!1), [_, v] = $(null), p = G(!1), x = G(null), A = G(s);
|
|
41
|
+
A.current = s;
|
|
42
|
+
const M = G(i);
|
|
43
|
+
M.current = i;
|
|
44
44
|
const y = G({
|
|
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
|
+
}), R = G(0);
|
|
50
|
+
R.current++, o("📊 RENDER INFO", {
|
|
51
|
+
renderCount: R.current,
|
|
52
52
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
53
53
|
propChanges: {
|
|
54
54
|
userChanged: y.current.userId !== (t == null ? void 0 : t.id),
|
|
@@ -62,12 +62,12 @@ const qt = Ye({
|
|
|
62
62
|
serviceConfig: s,
|
|
63
63
|
capabilities: r
|
|
64
64
|
};
|
|
65
|
-
const
|
|
66
|
-
a && ((
|
|
67
|
-
const P = a ? ((
|
|
65
|
+
const z = G(null);
|
|
66
|
+
a && ((D = z.current) == null ? void 0 : D.apiKey) !== a && (z.current = { apiKey: a, client: new Tn(a) });
|
|
67
|
+
const P = a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null;
|
|
68
68
|
X(() => {
|
|
69
|
-
const I =
|
|
70
|
-
if (!a || !P || !
|
|
69
|
+
const I = R.current, T = A.current;
|
|
70
|
+
if (!a || !P || !T) {
|
|
71
71
|
o("⚠️ SERVICE INIT SKIPPED", {
|
|
72
72
|
renderCount: I,
|
|
73
73
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
@@ -79,35 +79,35 @@ const qt = Ye({
|
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
81
|
const O = new In({
|
|
82
|
-
...
|
|
82
|
+
...T,
|
|
83
83
|
apiKey: a,
|
|
84
|
-
debug:
|
|
84
|
+
debug: M.current,
|
|
85
85
|
client: P
|
|
86
86
|
});
|
|
87
|
-
|
|
87
|
+
x.current = O, d(O), o("✅ SERVICE SET", {
|
|
88
88
|
renderCount: I,
|
|
89
89
|
serviceInstance: !!O
|
|
90
90
|
});
|
|
91
91
|
}, [a, P]);
|
|
92
|
-
const
|
|
92
|
+
const S = G(null);
|
|
93
93
|
X(() => {
|
|
94
|
-
var
|
|
94
|
+
var T, O;
|
|
95
95
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
96
96
|
hasService: !!l,
|
|
97
97
|
hasUser: !!t,
|
|
98
98
|
userId: t == null ? void 0 : t.id,
|
|
99
|
-
isConnecting:
|
|
99
|
+
isConnecting: p.current,
|
|
100
100
|
isConnected: u,
|
|
101
101
|
dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
|
|
102
102
|
}), !l || !t) {
|
|
103
103
|
o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (p.current) {
|
|
107
107
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
if (((
|
|
110
|
+
if (((T = S.current) == null ? void 0 : T.serviceId) === l && ((O = S.current) == null ? void 0 : O.userId) === t.id) {
|
|
111
111
|
o(
|
|
112
112
|
"⚠️ USER CONNECTION SKIPPED",
|
|
113
113
|
"Already connected this user with this service"
|
|
@@ -115,22 +115,22 @@ const qt = Ye({
|
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(async () => {
|
|
118
|
-
o("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
118
|
+
o("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
|
|
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), S.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
123
123
|
userId: t.id,
|
|
124
124
|
clientId: F.userID
|
|
125
125
|
});
|
|
126
126
|
} catch (F) {
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
const Y = F instanceof Error ? F.message : "Connection failed";
|
|
128
|
+
v(Y), o("❌ USER CONNECTION ERROR", {
|
|
129
129
|
userId: t.id,
|
|
130
|
-
error:
|
|
130
|
+
error: Y
|
|
131
131
|
});
|
|
132
132
|
} finally {
|
|
133
|
-
|
|
133
|
+
b(!1), p.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
134
134
|
userId: t.id,
|
|
135
135
|
isConnected: u
|
|
136
136
|
});
|
|
@@ -139,11 +139,11 @@ const qt = Ye({
|
|
|
139
139
|
}, [l, t, o, u]), X(() => {
|
|
140
140
|
const I = P;
|
|
141
141
|
return () => {
|
|
142
|
-
var
|
|
143
|
-
I && (
|
|
142
|
+
var T;
|
|
143
|
+
I && (S.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
|
|
144
144
|
};
|
|
145
145
|
}, [P]);
|
|
146
|
-
const
|
|
146
|
+
const E = K(async () => {
|
|
147
147
|
if (o("🔄 REFRESH CONNECTION CALLED", {
|
|
148
148
|
hasService: !!l,
|
|
149
149
|
hasUser: !!t
|
|
@@ -151,52 +151,52 @@ const qt = Ye({
|
|
|
151
151
|
o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
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
157
|
const I = await l.connectUser(t);
|
|
158
|
-
g(I), f(!0),
|
|
158
|
+
g(I), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
159
159
|
} catch (I) {
|
|
160
|
-
const
|
|
161
|
-
|
|
160
|
+
const T = I instanceof Error ? I.message : "Refresh failed";
|
|
161
|
+
v(T), o("❌ CONNECTION REFRESH ERROR", {
|
|
162
162
|
userId: t.id,
|
|
163
|
-
error:
|
|
163
|
+
error: T
|
|
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]), L = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
169
|
hasService: !!l,
|
|
170
170
|
hasClient: !!m,
|
|
171
171
|
isConnected: u,
|
|
172
172
|
isLoading: c,
|
|
173
|
-
hasError: !!
|
|
173
|
+
hasError: !!_,
|
|
174
174
|
capabilitiesKeys: Object.keys(r)
|
|
175
175
|
}), {
|
|
176
176
|
service: l,
|
|
177
177
|
client: m,
|
|
178
178
|
isConnected: u,
|
|
179
179
|
isLoading: c,
|
|
180
|
-
error:
|
|
180
|
+
error: _,
|
|
181
181
|
capabilities: r,
|
|
182
|
-
refreshConnection:
|
|
182
|
+
refreshConnection: E,
|
|
183
183
|
debug: i
|
|
184
184
|
}), [
|
|
185
185
|
l,
|
|
186
186
|
m,
|
|
187
187
|
u,
|
|
188
188
|
c,
|
|
189
|
-
|
|
189
|
+
_,
|
|
190
190
|
r,
|
|
191
|
-
|
|
191
|
+
E,
|
|
192
192
|
i,
|
|
193
193
|
o
|
|
194
194
|
]);
|
|
195
195
|
return o("🔄 RENDER END", {
|
|
196
|
-
renderCount:
|
|
196
|
+
renderCount: R.current,
|
|
197
197
|
willRenderChat: !!P,
|
|
198
|
-
contextValueReady: !!
|
|
199
|
-
}), /* @__PURE__ */ n(qt.Provider, { value:
|
|
198
|
+
contextValueReady: !!L
|
|
199
|
+
}), /* @__PURE__ */ n(qt.Provider, { value: L, children: P ? /* @__PURE__ */ n(
|
|
200
200
|
An,
|
|
201
201
|
{
|
|
202
202
|
client: P,
|
|
@@ -206,9 +206,9 @@ const qt = Ye({
|
|
|
206
206
|
children: e
|
|
207
207
|
}
|
|
208
208
|
) : e });
|
|
209
|
-
},
|
|
209
|
+
}, Ps = () => Xe(), Wt = (e) => {
|
|
210
210
|
var a, r;
|
|
211
|
-
const [t, s] =
|
|
211
|
+
const [t, s] = $(
|
|
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(() => {
|
|
@@ -228,18 +228,18 @@ const qt = Ye({
|
|
|
228
228
|
e.off("member.updated", i);
|
|
229
229
|
};
|
|
230
230
|
}, [e]), t;
|
|
231
|
-
},
|
|
232
|
-
function
|
|
233
|
-
return
|
|
231
|
+
}, zs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
232
|
+
function $s(e) {
|
|
233
|
+
return zs.test(e.trim());
|
|
234
234
|
}
|
|
235
235
|
function Dt(e, t) {
|
|
236
236
|
const s = e == null ? void 0 : e.trim();
|
|
237
|
-
return !s || t && s === t ? !1 :
|
|
237
|
+
return !s || t && s === t ? !1 : !$s(s);
|
|
238
238
|
}
|
|
239
239
|
function Xt(e) {
|
|
240
240
|
return Dt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Dt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const Ot = [
|
|
243
243
|
"🍎",
|
|
244
244
|
// Apple
|
|
245
245
|
"🍌",
|
|
@@ -267,7 +267,7 @@ const Pt = [
|
|
|
267
267
|
"🍈"
|
|
268
268
|
// Melon
|
|
269
269
|
];
|
|
270
|
-
function
|
|
270
|
+
function Fs(e) {
|
|
271
271
|
let t = 0;
|
|
272
272
|
for (let s = 0; s < e.length; s++) {
|
|
273
273
|
const a = e.charCodeAt(s);
|
|
@@ -275,11 +275,11 @@ function Us(e) {
|
|
|
275
275
|
}
|
|
276
276
|
return Math.abs(t);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const s =
|
|
280
|
-
return
|
|
278
|
+
function Bs(e) {
|
|
279
|
+
const s = Fs(e) % Ot.length;
|
|
280
|
+
return Ot[s];
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const ie = ({
|
|
283
283
|
id: e,
|
|
284
284
|
image: t,
|
|
285
285
|
size: s = 40,
|
|
@@ -288,7 +288,7 @@ const re = ({
|
|
|
288
288
|
shape: i = "squircle",
|
|
289
289
|
dmAgentEnabled: o = !1
|
|
290
290
|
}) => {
|
|
291
|
-
const l =
|
|
291
|
+
const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
292
292
|
"img",
|
|
293
293
|
{
|
|
294
294
|
src: t,
|
|
@@ -299,7 +299,7 @@ const re = ({
|
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
"aria-hidden": "true",
|
|
302
|
-
className:
|
|
302
|
+
className: N(
|
|
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 re = ({
|
|
|
309
309
|
return /* @__PURE__ */ h(
|
|
310
310
|
"div",
|
|
311
311
|
{
|
|
312
|
-
className:
|
|
312
|
+
className: N(
|
|
313
313
|
"relative flex-shrink-0 !bg-transparent",
|
|
314
314
|
a
|
|
315
315
|
),
|
|
@@ -331,7 +331,7 @@ const re = ({
|
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
333
|
"data-testid": "avatar-ring",
|
|
334
|
-
className:
|
|
334
|
+
className: N(
|
|
335
335
|
"h-full w-full",
|
|
336
336
|
"bg-transparent"
|
|
337
337
|
),
|
|
@@ -350,7 +350,7 @@ const re = ({
|
|
|
350
350
|
]
|
|
351
351
|
}
|
|
352
352
|
);
|
|
353
|
-
},
|
|
353
|
+
}, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
|
|
354
354
|
channel: e,
|
|
355
355
|
participant: t,
|
|
356
356
|
showBlockParticipant: s = !0,
|
|
@@ -363,78 +363,78 @@ const re = ({
|
|
|
363
363
|
onActionComplete: m,
|
|
364
364
|
logLabel: g = "useChannelModerationActions"
|
|
365
365
|
}) => {
|
|
366
|
-
var
|
|
367
|
-
const { service: u, debug: f } = Xe(), c = (
|
|
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] = $(!1), [p, x] = $(null), [A, M] = $(!1), [y, R] = $(!1), z = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
|
|
368
368
|
return X(() => {
|
|
369
|
-
if (!
|
|
370
|
-
|
|
369
|
+
if (!b || !u || !c) {
|
|
370
|
+
v(!1), x(null);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
|
-
let
|
|
373
|
+
let C = !1;
|
|
374
374
|
return (async () => {
|
|
375
375
|
try {
|
|
376
376
|
const I = await u.getBlockedUsers();
|
|
377
|
-
if (
|
|
378
|
-
|
|
377
|
+
if (C) return;
|
|
378
|
+
v(
|
|
379
379
|
I.some(
|
|
380
|
-
(
|
|
380
|
+
(T) => T.blocked_user_id === c
|
|
381
381
|
)
|
|
382
382
|
);
|
|
383
383
|
} catch (I) {
|
|
384
|
-
|
|
384
|
+
C || console.error(`[${g}] Failed to check blocked status:`, I);
|
|
385
385
|
} finally {
|
|
386
|
-
|
|
386
|
+
C || x({ participantId: c, service: u });
|
|
387
387
|
}
|
|
388
388
|
})(), () => {
|
|
389
|
-
|
|
389
|
+
C = !0;
|
|
390
390
|
};
|
|
391
|
-
}, [
|
|
392
|
-
isParticipantBlocked:
|
|
393
|
-
isCheckingBlockedStatus:
|
|
394
|
-
isLeaving:
|
|
391
|
+
}, [b, u, c, g]), {
|
|
392
|
+
isParticipantBlocked: _,
|
|
393
|
+
isCheckingBlockedStatus: z,
|
|
394
|
+
isLeaving: A,
|
|
395
395
|
isUpdatingBlockStatus: y,
|
|
396
396
|
handleLeaveConversation: async () => {
|
|
397
|
-
var
|
|
398
|
-
if (!
|
|
399
|
-
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid),
|
|
397
|
+
var C;
|
|
398
|
+
if (!A) {
|
|
399
|
+
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), M(!0);
|
|
400
400
|
try {
|
|
401
|
-
const I = ((
|
|
401
|
+
const I = ((C = e._client) == null ? void 0 : C.userID) ?? null;
|
|
402
402
|
await e.hide(I, !1), r && await r(e), m == null || m();
|
|
403
403
|
} catch (I) {
|
|
404
404
|
console.error(`[${g}] Failed to leave conversation`, I);
|
|
405
405
|
} finally {
|
|
406
|
-
|
|
406
|
+
M(!1);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
handleBlockUser: async () => {
|
|
411
|
-
var
|
|
411
|
+
var C, I, T;
|
|
412
412
|
if (!(y || !u)) {
|
|
413
|
-
l == null || l(), f && console.log(`[${g}] Block member`, (
|
|
413
|
+
l == null || l(), f && console.log(`[${g}] Block member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), R(!0);
|
|
414
414
|
try {
|
|
415
|
-
await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((
|
|
415
|
+
await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
|
|
416
416
|
} catch (O) {
|
|
417
417
|
console.error(`[${g}] Failed to block member`, O);
|
|
418
418
|
} finally {
|
|
419
|
-
|
|
419
|
+
R(!1);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
handleUnblockUser: async () => {
|
|
424
|
-
var
|
|
424
|
+
var C, I, T;
|
|
425
425
|
if (!(y || !u)) {
|
|
426
|
-
l == null || l(), f && console.log(`[${g}] Unblock member`, (
|
|
426
|
+
l == null || l(), f && console.log(`[${g}] Unblock member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), R(!0);
|
|
427
427
|
try {
|
|
428
|
-
await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((
|
|
428
|
+
await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
|
|
429
429
|
} catch (O) {
|
|
430
430
|
console.error(`[${g}] Failed to unblock member`, O);
|
|
431
431
|
} finally {
|
|
432
|
-
|
|
432
|
+
R(!1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
handleReportUser: () => {
|
|
437
|
-
d == null || d(), m == null || m(), window.open(
|
|
437
|
+
d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
|
|
438
438
|
}
|
|
439
439
|
};
|
|
440
440
|
}, ge = ({
|
|
@@ -446,7 +446,7 @@ const re = ({
|
|
|
446
446
|
"button",
|
|
447
447
|
{
|
|
448
448
|
type: "button",
|
|
449
|
-
className:
|
|
449
|
+
className: N(
|
|
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
|
|
@@ -454,7 +454,7 @@ const re = ({
|
|
|
454
454
|
...a,
|
|
455
455
|
children: s
|
|
456
456
|
}
|
|
457
|
-
),
|
|
457
|
+
), Pt = ({
|
|
458
458
|
channel: e,
|
|
459
459
|
participant: t,
|
|
460
460
|
showDeleteConversation: s = !0,
|
|
@@ -468,16 +468,16 @@ const re = ({
|
|
|
468
468
|
customChannelActions: g,
|
|
469
469
|
triggerClassName: u
|
|
470
470
|
}) => {
|
|
471
|
-
const [f, c] =
|
|
472
|
-
isParticipantBlocked:
|
|
473
|
-
isCheckingBlockedStatus:
|
|
474
|
-
isLeaving:
|
|
475
|
-
isUpdatingBlockStatus:
|
|
471
|
+
const [f, c] = $(!1), b = G(null), _ = Sn(), v = K(() => c(!1), []), {
|
|
472
|
+
isParticipantBlocked: p,
|
|
473
|
+
isCheckingBlockedStatus: x,
|
|
474
|
+
isLeaving: A,
|
|
475
|
+
isUpdatingBlockStatus: M,
|
|
476
476
|
handleLeaveConversation: y,
|
|
477
|
-
handleBlockUser:
|
|
478
|
-
handleUnblockUser:
|
|
477
|
+
handleBlockUser: R,
|
|
478
|
+
handleUnblockUser: z,
|
|
479
479
|
handleReportUser: P
|
|
480
|
-
} =
|
|
480
|
+
} = js({
|
|
481
481
|
channel: e,
|
|
482
482
|
participant: t,
|
|
483
483
|
showBlockParticipant: a,
|
|
@@ -487,20 +487,20 @@ const re = ({
|
|
|
487
487
|
onDeleteConversationClick: l,
|
|
488
488
|
onBlockParticipantClick: d,
|
|
489
489
|
onReportParticipantClick: m,
|
|
490
|
-
onActionComplete:
|
|
490
|
+
onActionComplete: v,
|
|
491
491
|
logLabel: "ChannelActionsMenu"
|
|
492
492
|
});
|
|
493
493
|
return X(() => {
|
|
494
494
|
if (!f) return;
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
},
|
|
498
|
-
|
|
495
|
+
const E = (D) => {
|
|
496
|
+
b.current && !b.current.contains(D.target) && c(!1);
|
|
497
|
+
}, L = (D) => {
|
|
498
|
+
D.key === "Escape" && c(!1);
|
|
499
499
|
};
|
|
500
|
-
return document.addEventListener("mousedown",
|
|
501
|
-
document.removeEventListener("mousedown",
|
|
500
|
+
return document.addEventListener("mousedown", E), document.addEventListener("keydown", L), () => {
|
|
501
|
+
document.removeEventListener("mousedown", E), document.removeEventListener("keydown", L);
|
|
502
502
|
};
|
|
503
|
-
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref:
|
|
503
|
+
}, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
|
|
504
504
|
/* @__PURE__ */ h(
|
|
505
505
|
"button",
|
|
506
506
|
{
|
|
@@ -508,8 +508,8 @@ const re = ({
|
|
|
508
508
|
type: "button",
|
|
509
509
|
"aria-haspopup": "true",
|
|
510
510
|
"aria-expanded": f,
|
|
511
|
-
"aria-controls": f ?
|
|
512
|
-
onClick: () => c((
|
|
511
|
+
"aria-controls": f ? _ : void 0,
|
|
512
|
+
onClick: () => c((E) => !E),
|
|
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" })
|
|
@@ -519,9 +519,9 @@ const re = ({
|
|
|
519
519
|
f && /* @__PURE__ */ n(
|
|
520
520
|
"div",
|
|
521
521
|
{
|
|
522
|
-
id:
|
|
522
|
+
id: _,
|
|
523
523
|
"aria-label": "Conversation options",
|
|
524
|
-
className:
|
|
524
|
+
className: N(
|
|
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
|
),
|
|
@@ -530,40 +530,40 @@ const re = ({
|
|
|
530
530
|
ge,
|
|
531
531
|
{
|
|
532
532
|
onClick: y,
|
|
533
|
-
disabled:
|
|
534
|
-
"aria-busy":
|
|
533
|
+
disabled: A,
|
|
534
|
+
"aria-busy": A,
|
|
535
535
|
children: [
|
|
536
|
-
|
|
536
|
+
A ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
|
|
537
537
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
538
538
|
]
|
|
539
539
|
}
|
|
540
540
|
) }),
|
|
541
|
-
a && /* @__PURE__ */ n("li", { children:
|
|
541
|
+
a && /* @__PURE__ */ n("li", { children: x ? (
|
|
542
542
|
// Block status not yet resolved — show a disabled placeholder
|
|
543
543
|
// so a premature click can't act on a stale block state.
|
|
544
544
|
/* @__PURE__ */ h(ge, { disabled: !0, "aria-busy": !0, children: [
|
|
545
545
|
/* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }),
|
|
546
546
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
547
547
|
] })
|
|
548
|
-
) :
|
|
548
|
+
) : p ? /* @__PURE__ */ h(
|
|
549
549
|
ge,
|
|
550
550
|
{
|
|
551
|
-
onClick:
|
|
552
|
-
disabled:
|
|
553
|
-
"aria-busy":
|
|
551
|
+
onClick: z,
|
|
552
|
+
disabled: M,
|
|
553
|
+
"aria-busy": M,
|
|
554
554
|
children: [
|
|
555
|
-
|
|
555
|
+
M ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
|
|
556
556
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
) : /* @__PURE__ */ h(
|
|
560
560
|
ge,
|
|
561
561
|
{
|
|
562
|
-
onClick:
|
|
563
|
-
disabled:
|
|
564
|
-
"aria-busy":
|
|
562
|
+
onClick: R,
|
|
563
|
+
disabled: M,
|
|
564
|
+
"aria-busy": M,
|
|
565
565
|
children: [
|
|
566
|
-
|
|
566
|
+
M ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
|
|
567
567
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
568
568
|
]
|
|
569
569
|
}
|
|
@@ -577,30 +577,30 @@ const re = ({
|
|
|
577
577
|
}
|
|
578
578
|
)
|
|
579
579
|
] });
|
|
580
|
-
},
|
|
581
|
-
function
|
|
582
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
580
|
+
}, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ge = "vote_up", He = "vote_down";
|
|
581
|
+
function Gs(e) {
|
|
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
|
-
function
|
|
585
|
-
const { channel: t } = ce(), { client: s } = We("useMessageVote"), a =
|
|
586
|
-
() =>
|
|
584
|
+
function Hs(e) {
|
|
585
|
+
const { channel: t } = ce(), { client: s } = We("useMessageVote"), a = se(
|
|
586
|
+
() => Gs(e.own_reactions),
|
|
587
587
|
[e.own_reactions]
|
|
588
|
-
), r =
|
|
588
|
+
), r = K(async () => {
|
|
589
589
|
if (s != null && s.userID)
|
|
590
590
|
try {
|
|
591
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
591
|
+
a === "up" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
|
|
592
592
|
e.id,
|
|
593
|
-
{ type:
|
|
593
|
+
{ type: Ge },
|
|
594
594
|
{ enforce_unique: !0, skip_push: !0 }
|
|
595
595
|
);
|
|
596
596
|
} catch {
|
|
597
597
|
}
|
|
598
|
-
}, [t, s == null ? void 0 : s.userID, e.id, a]), i =
|
|
598
|
+
}, [t, s == null ? void 0 : s.userID, e.id, a]), i = K(async () => {
|
|
599
599
|
if (s != null && s.userID)
|
|
600
600
|
try {
|
|
601
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
601
|
+
a === "down" ? await t.deleteReaction(e.id, He) : await t.sendReaction(
|
|
602
602
|
e.id,
|
|
603
|
-
{ type:
|
|
603
|
+
{ type: He },
|
|
604
604
|
{ enforce_unique: !0, skip_push: !0 }
|
|
605
605
|
);
|
|
606
606
|
} catch {
|
|
@@ -608,7 +608,7 @@ function qs(e) {
|
|
|
608
608
|
}, [t, s == null ? void 0 : s.userID, e.id, a]);
|
|
609
609
|
return { selected: a, voteUp: r, voteDown: i };
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function Ys(e) {
|
|
612
612
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
613
613
|
}
|
|
614
614
|
function Kt({
|
|
@@ -616,16 +616,16 @@ function Kt({
|
|
|
616
616
|
viewerLanguage: t
|
|
617
617
|
}) {
|
|
618
618
|
var r;
|
|
619
|
-
const s = e == null ? void 0 : e.text, a =
|
|
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
|
|
622
|
+
const qs = j.lazy(() => import("./Card-XVTz8IYz.js")), Ws = j.lazy(() => import("./Card-CrTBu2I6.js")), Xs = j.lazy(() => import("./Card-BKd0E-B9.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)]",
|
|
626
626
|
"aria-hidden": !0
|
|
627
627
|
}
|
|
628
|
-
),
|
|
628
|
+
), Ks = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Jt, Zs = Zt, zt = { Composer: Ks, Sent: Jt, Received: Zt, Creator: Js, Visitor: Zs }, Qs = [
|
|
629
629
|
[/pdf/, "pdf"],
|
|
630
630
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
631
631
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -635,21 +635,21 @@ const Xs = U.lazy(() => import("./Card-beoX9cug.js")), Ks = U.lazy(() => import(
|
|
|
635
635
|
[/plain|rtf/, "text"],
|
|
636
636
|
[/markdown/, "markdown"]
|
|
637
637
|
];
|
|
638
|
-
function
|
|
638
|
+
function re(e) {
|
|
639
639
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
640
640
|
}
|
|
641
641
|
function Qt(e) {
|
|
642
|
-
const t =
|
|
642
|
+
const t = Qs.find(
|
|
643
643
|
([s]) => s.test(e)
|
|
644
644
|
);
|
|
645
645
|
return t ? t[1] : "generic";
|
|
646
646
|
}
|
|
647
|
-
const
|
|
647
|
+
const ea = {
|
|
648
648
|
video: Ht,
|
|
649
649
|
audio: bs,
|
|
650
650
|
image: gs,
|
|
651
651
|
document: Gt
|
|
652
|
-
},
|
|
652
|
+
}, ta = {
|
|
653
653
|
pdf: Cs,
|
|
654
654
|
doc: ys,
|
|
655
655
|
xls: Ns,
|
|
@@ -660,17 +660,17 @@ const na = {
|
|
|
660
660
|
markdown: ps,
|
|
661
661
|
generic: Gt
|
|
662
662
|
};
|
|
663
|
-
function
|
|
664
|
-
const t =
|
|
665
|
-
return t !== "document" ?
|
|
663
|
+
function na(e) {
|
|
664
|
+
const t = re(e);
|
|
665
|
+
return t !== "document" ? ea[t] : ta[Qt(e)];
|
|
666
666
|
}
|
|
667
667
|
function le(e, t) {
|
|
668
|
-
return
|
|
668
|
+
return j.createElement(na(e), t);
|
|
669
669
|
}
|
|
670
|
-
const
|
|
670
|
+
const sa = (e) => {
|
|
671
671
|
var t, s;
|
|
672
672
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
|
|
673
|
-
},
|
|
673
|
+
}, aa = ({
|
|
674
674
|
source: e,
|
|
675
675
|
mimeType: t,
|
|
676
676
|
poster: s,
|
|
@@ -682,78 +682,78 @@ const ra = (e) => {
|
|
|
682
682
|
muted: d = !1,
|
|
683
683
|
onContainerClick: m
|
|
684
684
|
}) => {
|
|
685
|
-
const g =
|
|
686
|
-
P(!1),
|
|
687
|
-
}, []), O =
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
690
|
-
const B =
|
|
685
|
+
const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [_, v] = $(a), [p, x] = $(0), [A, M] = $(!1), [y, R] = $(!1), [z, P] = $(!1), [S, E] = $(!1), [L, D] = $(!0), [C, I] = $(null), T = K(() => {
|
|
686
|
+
P(!1), v(!0);
|
|
687
|
+
}, []), O = K((w) => {
|
|
688
|
+
const k = f.current;
|
|
689
|
+
if (!k) return 0;
|
|
690
|
+
const B = k.getBoundingClientRect();
|
|
691
691
|
return Math.max(
|
|
692
692
|
0,
|
|
693
|
-
Math.min(1, (
|
|
693
|
+
Math.min(1, (sa(w) - B.left) / B.width)
|
|
694
694
|
);
|
|
695
|
-
}, []), F =
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
}, []),
|
|
699
|
-
|
|
700
|
-
const
|
|
701
|
-
|
|
695
|
+
}, []), F = K((w) => {
|
|
696
|
+
const k = u.current;
|
|
697
|
+
k && k.duration && (k.currentTime = w * k.duration);
|
|
698
|
+
}, []), Y = (w) => {
|
|
699
|
+
w.stopPropagation(), M(!0);
|
|
700
|
+
const k = O(w);
|
|
701
|
+
x(k), F(k);
|
|
702
702
|
};
|
|
703
703
|
X(() => {
|
|
704
|
-
r !== void 0 && r !==
|
|
704
|
+
r !== void 0 && r !== b.current && (b.current = r, v(r));
|
|
705
705
|
}, [r]), X(() => {
|
|
706
|
-
if (!
|
|
706
|
+
if (!_) {
|
|
707
707
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
|
-
const
|
|
711
|
-
const
|
|
712
|
-
|
|
710
|
+
const w = () => {
|
|
711
|
+
const k = u.current;
|
|
712
|
+
k && k.duration && !A && x(k.currentTime / k.duration), c.current = requestAnimationFrame(w);
|
|
713
713
|
};
|
|
714
|
-
return c.current = requestAnimationFrame(
|
|
714
|
+
return c.current = requestAnimationFrame(w), () => {
|
|
715
715
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
716
716
|
};
|
|
717
|
-
}, [
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}) :
|
|
722
|
-
}, [
|
|
723
|
-
if (!
|
|
724
|
-
const
|
|
725
|
-
|
|
717
|
+
}, [_, A]), X(() => {
|
|
718
|
+
const w = u.current;
|
|
719
|
+
w && (_ ? w.play().catch((k) => {
|
|
720
|
+
v(!1), P(!0);
|
|
721
|
+
}) : w.pause());
|
|
722
|
+
}, [_]), X(() => {
|
|
723
|
+
if (!A) return;
|
|
724
|
+
const w = (B) => x(O(B)), k = (B) => {
|
|
725
|
+
M(!1), F(O(B));
|
|
726
726
|
};
|
|
727
|
-
return window.addEventListener("mousemove",
|
|
728
|
-
window.removeEventListener("mousemove",
|
|
727
|
+
return window.addEventListener("mousemove", w), window.addEventListener("mouseup", k), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", k), () => {
|
|
728
|
+
window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", k);
|
|
729
729
|
};
|
|
730
|
-
}, [
|
|
731
|
-
const
|
|
730
|
+
}, [A, O, F]);
|
|
731
|
+
const Z = C ? { aspectRatio: String(C) } : void 0, J = C ? "" : " aspect-video", U = 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 ${
|
|
738
|
-
style:
|
|
739
|
-
onClick: (
|
|
737
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${J}`,
|
|
738
|
+
style: Z,
|
|
739
|
+
onClick: (w) => {
|
|
740
740
|
if (m) {
|
|
741
|
-
m(
|
|
741
|
+
m(w);
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
|
-
|
|
744
|
+
z || o && v((k) => !k);
|
|
745
745
|
},
|
|
746
|
-
onKeyDown: (
|
|
747
|
-
if (!(
|
|
748
|
-
if (
|
|
749
|
-
m(
|
|
746
|
+
onKeyDown: (w) => {
|
|
747
|
+
if (!(w.key !== "Enter" && w.key !== " ")) {
|
|
748
|
+
if (w.preventDefault(), m) {
|
|
749
|
+
m(w);
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
|
|
752
|
+
z || o && v((k) => !k);
|
|
753
753
|
}
|
|
754
754
|
},
|
|
755
755
|
children: [
|
|
756
|
-
s && (g === "audio" ||
|
|
756
|
+
s && (g === "audio" || L) && /* @__PURE__ */ n(
|
|
757
757
|
"img",
|
|
758
758
|
{
|
|
759
759
|
src: s,
|
|
@@ -761,7 +761,7 @@ const ra = (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" || L) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
|
|
765
765
|
className: "size-12 text-black/20",
|
|
766
766
|
weight: "regular"
|
|
767
767
|
}) }),
|
|
@@ -773,14 +773,14 @@ const ra = (e) => {
|
|
|
773
773
|
loop: i,
|
|
774
774
|
muted: d,
|
|
775
775
|
style: { width: "100%", height: "100%" },
|
|
776
|
-
onLoadStart: () =>
|
|
776
|
+
onLoadStart: () => E(!0),
|
|
777
777
|
onCanPlay: () => {
|
|
778
|
-
|
|
778
|
+
E(!1), D(!1);
|
|
779
779
|
},
|
|
780
|
-
onWaiting: () =>
|
|
780
|
+
onWaiting: () => E(!0),
|
|
781
781
|
onPlay: () => P(!1),
|
|
782
782
|
onEnded: () => {
|
|
783
|
-
i || (
|
|
783
|
+
i || (v(!1), x(0));
|
|
784
784
|
},
|
|
785
785
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
786
786
|
}
|
|
@@ -793,41 +793,41 @@ const ra = (e) => {
|
|
|
793
793
|
muted: d,
|
|
794
794
|
playsInline: !0,
|
|
795
795
|
style: { width: "100%", height: "100%" },
|
|
796
|
-
onLoadStart: () =>
|
|
796
|
+
onLoadStart: () => E(!0),
|
|
797
797
|
onCanPlay: () => {
|
|
798
|
-
|
|
798
|
+
E(!1), D(!1);
|
|
799
799
|
},
|
|
800
|
-
onWaiting: () =>
|
|
800
|
+
onWaiting: () => E(!0),
|
|
801
801
|
onPlay: () => P(!1),
|
|
802
802
|
onLoadedMetadata: () => {
|
|
803
|
-
const
|
|
804
|
-
|
|
803
|
+
const w = u.current;
|
|
804
|
+
w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && I(w.videoWidth / w.videoHeight);
|
|
805
805
|
},
|
|
806
806
|
onEnded: () => {
|
|
807
|
-
i || (
|
|
807
|
+
i || (v(!1), x(0));
|
|
808
808
|
},
|
|
809
809
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
810
810
|
}
|
|
811
811
|
) }),
|
|
812
|
-
|
|
812
|
+
S && !z && /* @__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
|
+
z && !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",
|
|
823
823
|
role: "button",
|
|
824
824
|
tabIndex: 0,
|
|
825
825
|
"aria-label": "Play preview",
|
|
826
|
-
onClick: (
|
|
827
|
-
|
|
826
|
+
onClick: (w) => {
|
|
827
|
+
w.stopPropagation(), T();
|
|
828
828
|
},
|
|
829
|
-
onKeyDown: (
|
|
830
|
-
|
|
829
|
+
onKeyDown: (w) => {
|
|
830
|
+
w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), T());
|
|
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,23 +837,23 @@ const ra = (e) => {
|
|
|
837
837
|
{
|
|
838
838
|
role: "slider",
|
|
839
839
|
"aria-label": "Playback position",
|
|
840
|
-
"aria-valuenow":
|
|
840
|
+
"aria-valuenow": U,
|
|
841
841
|
"aria-valuemin": 0,
|
|
842
842
|
"aria-valuemax": 100,
|
|
843
843
|
tabIndex: 0,
|
|
844
844
|
ref: f,
|
|
845
845
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
846
|
-
onMouseDown:
|
|
847
|
-
onTouchStart:
|
|
848
|
-
onClick: (
|
|
849
|
-
onKeyDown: (
|
|
850
|
-
|
|
846
|
+
onMouseDown: Y,
|
|
847
|
+
onTouchStart: Y,
|
|
848
|
+
onClick: (w) => w.stopPropagation(),
|
|
849
|
+
onKeyDown: (w) => {
|
|
850
|
+
w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
|
|
851
851
|
},
|
|
852
852
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
853
853
|
"div",
|
|
854
854
|
{
|
|
855
855
|
className: "h-full rounded-full bg-white",
|
|
856
|
-
style: { width: `${
|
|
856
|
+
style: { width: `${U}%` }
|
|
857
857
|
}
|
|
858
858
|
) })
|
|
859
859
|
}
|
|
@@ -863,12 +863,12 @@ const ra = (e) => {
|
|
|
863
863
|
"button",
|
|
864
864
|
{
|
|
865
865
|
type: "button",
|
|
866
|
-
onClick: (
|
|
867
|
-
|
|
866
|
+
onClick: (w) => {
|
|
867
|
+
w.stopPropagation(), v((k) => !k);
|
|
868
868
|
},
|
|
869
869
|
className: "shrink-0 text-white",
|
|
870
|
-
"aria-label":
|
|
871
|
-
children:
|
|
870
|
+
"aria-label": _ ? "Pause" : "Play",
|
|
871
|
+
children: _ ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
|
|
872
872
|
}
|
|
873
873
|
),
|
|
874
874
|
/* @__PURE__ */ h(
|
|
@@ -876,30 +876,30 @@ const ra = (e) => {
|
|
|
876
876
|
{
|
|
877
877
|
role: "slider",
|
|
878
878
|
"aria-label": "Playback position",
|
|
879
|
-
"aria-valuenow":
|
|
879
|
+
"aria-valuenow": U,
|
|
880
880
|
"aria-valuemin": 0,
|
|
881
881
|
"aria-valuemax": 100,
|
|
882
882
|
tabIndex: 0,
|
|
883
883
|
ref: f,
|
|
884
884
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
885
|
-
onMouseDown:
|
|
886
|
-
onTouchStart:
|
|
887
|
-
onClick: (
|
|
888
|
-
onMouseEnter: () =>
|
|
889
|
-
onMouseLeave: () =>
|
|
890
|
-
onKeyDown: (
|
|
891
|
-
|
|
885
|
+
onMouseDown: Y,
|
|
886
|
+
onTouchStart: Y,
|
|
887
|
+
onClick: (w) => w.stopPropagation(),
|
|
888
|
+
onMouseEnter: () => R(!0),
|
|
889
|
+
onMouseLeave: () => R(!1),
|
|
890
|
+
onKeyDown: (w) => {
|
|
891
|
+
w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
|
|
892
892
|
},
|
|
893
893
|
children: [
|
|
894
894
|
/* @__PURE__ */ n(
|
|
895
895
|
"div",
|
|
896
896
|
{
|
|
897
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${y ||
|
|
897
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${y || 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: `${U}%` }
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
}
|
|
@@ -907,8 +907,8 @@ const ra = (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 ${y ||
|
|
911
|
-
style: { left: `${
|
|
910
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${y || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
911
|
+
style: { left: `${U}%` }
|
|
912
912
|
}
|
|
913
913
|
)
|
|
914
914
|
]
|
|
@@ -918,7 +918,7 @@ const ra = (e) => {
|
|
|
918
918
|
]
|
|
919
919
|
}
|
|
920
920
|
);
|
|
921
|
-
}, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
921
|
+
}, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
|
|
922
922
|
mimeType: e,
|
|
923
923
|
sourceUrl: t,
|
|
924
924
|
thumbnailUrl: s,
|
|
@@ -927,9 +927,9 @@ const ra = (e) => {
|
|
|
927
927
|
mediaPlayerProps: i,
|
|
928
928
|
containedImage: o = !1
|
|
929
929
|
}) => {
|
|
930
|
-
const l =
|
|
930
|
+
const l = re(e), [d, m] = $(!1);
|
|
931
931
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
932
|
-
|
|
932
|
+
aa,
|
|
933
933
|
{
|
|
934
934
|
source: t,
|
|
935
935
|
mimeType: e,
|
|
@@ -980,7 +980,7 @@ const ra = (e) => {
|
|
|
980
980
|
weight: "regular"
|
|
981
981
|
})
|
|
982
982
|
}
|
|
983
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
983
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
|
|
984
984
|
"img",
|
|
985
985
|
{
|
|
986
986
|
src: s,
|
|
@@ -1012,13 +1012,13 @@ const ra = (e) => {
|
|
|
1012
1012
|
rootRef: g,
|
|
1013
1013
|
"data-testid": u
|
|
1014
1014
|
}) => {
|
|
1015
|
-
const f = e === "dark", c = f ? s ?? a : s ?? "",
|
|
1015
|
+
const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
|
|
1016
1016
|
return /* @__PURE__ */ h(
|
|
1017
1017
|
"div",
|
|
1018
1018
|
{
|
|
1019
1019
|
ref: g,
|
|
1020
1020
|
"data-testid": u,
|
|
1021
|
-
className:
|
|
1021
|
+
className: N(
|
|
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,17 +1030,17 @@ const ra = (e) => {
|
|
|
1030
1030
|
c.trim() !== "" && /* @__PURE__ */ n(
|
|
1031
1031
|
"p",
|
|
1032
1032
|
{
|
|
1033
|
-
className:
|
|
1033
|
+
className: N("mb-0.5 truncate text-base font-medium", {
|
|
1034
1034
|
"text-black": !f,
|
|
1035
|
-
"text-white/30": f &&
|
|
1036
|
-
"text-white": f && !
|
|
1035
|
+
"text-white/30": f && b,
|
|
1036
|
+
"text-white": f && !b
|
|
1037
1037
|
}),
|
|
1038
1038
|
children: c
|
|
1039
1039
|
}
|
|
1040
1040
|
),
|
|
1041
1041
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1042
1042
|
le(r, {
|
|
1043
|
-
className:
|
|
1043
|
+
className: N(
|
|
1044
1044
|
"size-5 shrink-0",
|
|
1045
1045
|
f ? "text-white/55" : "text-black/55"
|
|
1046
1046
|
),
|
|
@@ -1049,7 +1049,7 @@ const ra = (e) => {
|
|
|
1049
1049
|
i != null && i !== "" && /* @__PURE__ */ n(
|
|
1050
1050
|
"span",
|
|
1051
1051
|
{
|
|
1052
|
-
className:
|
|
1052
|
+
className: N(
|
|
1053
1053
|
"text-xs font-medium",
|
|
1054
1054
|
f ? "text-white/55" : "text-black/55"
|
|
1055
1055
|
),
|
|
@@ -1070,23 +1070,23 @@ function nn(e) {
|
|
|
1070
1070
|
function Je(e) {
|
|
1071
1071
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function ia(e) {
|
|
1074
1074
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function oa(e) {
|
|
1077
1077
|
return e ? "text-white" : "text-black";
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function la(e) {
|
|
1080
1080
|
return e ? "text-white/55" : "text-black/55";
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function ca(e) {
|
|
1083
1083
|
return e ? "text-white/40" : "text-black/40";
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
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(j.Fragment, { children: [
|
|
1090
1090
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1091
1091
|
"img",
|
|
1092
1092
|
{
|
|
@@ -1097,14 +1097,14 @@ const Ze = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1097
1097
|
) : /* @__PURE__ */ n(
|
|
1098
1098
|
"div",
|
|
1099
1099
|
{
|
|
1100
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1101
|
-
children: /* @__PURE__ */ n(Es, { className: `size-12 ${
|
|
1100
|
+
className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
|
|
1101
|
+
children: /* @__PURE__ */ n(Es, { className: `size-12 ${da(t)}` })
|
|
1102
1102
|
}
|
|
1103
1103
|
) }),
|
|
1104
1104
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1105
|
-
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1106
|
-
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${
|
|
1107
|
-
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1105
|
+
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${oa(t)}`, children: s }),
|
|
1106
|
+
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${la(t)}`, children: a }),
|
|
1107
|
+
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
|
|
1108
1108
|
] })
|
|
1109
1109
|
] });
|
|
1110
1110
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
|
|
@@ -1116,7 +1116,7 @@ function Qe(e) {
|
|
|
1116
1116
|
var t;
|
|
1117
1117
|
return (t = e.attachments) == null ? void 0 : t.find(sn);
|
|
1118
1118
|
}
|
|
1119
|
-
async function
|
|
1119
|
+
async function ua(e, t) {
|
|
1120
1120
|
let s;
|
|
1121
1121
|
try {
|
|
1122
1122
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1128,11 +1128,11 @@ async function ha(e, t) {
|
|
|
1128
1128
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1129
1129
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1131
|
+
const ma = ({
|
|
1132
1132
|
url: e,
|
|
1133
1133
|
filename: t
|
|
1134
1134
|
}) => {
|
|
1135
|
-
const [s, a] =
|
|
1135
|
+
const [s, a] = $(!1);
|
|
1136
1136
|
return /* @__PURE__ */ n(
|
|
1137
1137
|
"button",
|
|
1138
1138
|
{
|
|
@@ -1140,7 +1140,7 @@ const fa = ({
|
|
|
1140
1140
|
onClick: (i) => {
|
|
1141
1141
|
i.stopPropagation();
|
|
1142
1142
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1143
|
-
a(!0),
|
|
1143
|
+
a(!0), ua(e, t).then(() => {
|
|
1144
1144
|
o == null || o.close();
|
|
1145
1145
|
}).catch(() => {
|
|
1146
1146
|
o && (o.location.href = e);
|
|
@@ -1148,7 +1148,7 @@ const fa = ({
|
|
|
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(j.Fragment, { children: [
|
|
1152
1152
|
/* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
|
|
1153
1153
|
"Download"
|
|
1154
1154
|
] })
|
|
@@ -1156,15 +1156,15 @@ const fa = ({
|
|
|
1156
1156
|
);
|
|
1157
1157
|
};
|
|
1158
1158
|
function et(e) {
|
|
1159
|
-
var u, f, c,
|
|
1159
|
+
var u, f, c, b;
|
|
1160
1160
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1161
|
-
(
|
|
1161
|
+
(_) => _.type === "video" && _.asset_url
|
|
1162
1162
|
), s = (f = e.attachments) == null ? void 0 : f.find(
|
|
1163
|
-
(
|
|
1163
|
+
(_) => _.type === "image" && _.image_url
|
|
1164
1164
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1165
|
-
(
|
|
1166
|
-
), r = (
|
|
1167
|
-
(
|
|
1165
|
+
(_) => _.type === "audio" && _.asset_url
|
|
1166
|
+
), r = (b = e.attachments) == null ? void 0 : b.find(
|
|
1167
|
+
(_) => _.type === "file" && _.asset_url
|
|
1168
1168
|
), i = t ?? s ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1169
1169
|
if (!o) return null;
|
|
1170
1170
|
const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
|
|
@@ -1211,7 +1211,7 @@ const an = ({
|
|
|
1211
1211
|
fileSize: a,
|
|
1212
1212
|
thumbnailUrl: r
|
|
1213
1213
|
}) => {
|
|
1214
|
-
const i =
|
|
1214
|
+
const i = re(t), o = a !== void 0 ? nn(a) : void 0;
|
|
1215
1215
|
return /* @__PURE__ */ n(
|
|
1216
1216
|
tn,
|
|
1217
1217
|
{
|
|
@@ -1230,17 +1230,17 @@ const an = ({
|
|
|
1230
1230
|
containedImage: i === "image" || i === "document"
|
|
1231
1231
|
}
|
|
1232
1232
|
),
|
|
1233
|
-
action: /* @__PURE__ */ n(
|
|
1233
|
+
action: /* @__PURE__ */ n(ma, { url: e, filename: s })
|
|
1234
1234
|
}
|
|
1235
1235
|
);
|
|
1236
|
-
},
|
|
1236
|
+
}, ha = ({
|
|
1237
1237
|
message: e,
|
|
1238
1238
|
isMyMessage: t = !1
|
|
1239
1239
|
}) => {
|
|
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
|
+
ie,
|
|
1244
1244
|
{
|
|
1245
1245
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1246
1246
|
id: e.user.id,
|
|
@@ -1264,7 +1264,7 @@ const an = ({
|
|
|
1264
1264
|
}
|
|
1265
1265
|
)
|
|
1266
1266
|
] });
|
|
1267
|
-
},
|
|
1267
|
+
}, fa = ({
|
|
1268
1268
|
message: e
|
|
1269
1269
|
}) => {
|
|
1270
1270
|
const t = Qe(e);
|
|
@@ -1272,7 +1272,7 @@ const an = ({
|
|
|
1272
1272
|
return /* @__PURE__ */ n("div", { className: Je(!0), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !0 }) });
|
|
1273
1273
|
const s = et(e);
|
|
1274
1274
|
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1275
|
-
},
|
|
1275
|
+
}, ga = ({
|
|
1276
1276
|
message: e
|
|
1277
1277
|
}) => {
|
|
1278
1278
|
const t = Qe(e);
|
|
@@ -1280,18 +1280,18 @@ const an = ({
|
|
|
1280
1280
|
return /* @__PURE__ */ n("div", { className: Je(!1), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !1 }) });
|
|
1281
1281
|
const s = et(e);
|
|
1282
1282
|
return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
|
|
1283
|
-
},
|
|
1284
|
-
Creator:
|
|
1285
|
-
Visitor:
|
|
1286
|
-
}),
|
|
1283
|
+
}, yi = Object.assign(ha, {
|
|
1284
|
+
Creator: fa,
|
|
1285
|
+
Visitor: ga
|
|
1286
|
+
}), ba = {
|
|
1287
1287
|
isUnlocking: () => !1
|
|
1288
|
-
},
|
|
1289
|
-
LockedAttachment:
|
|
1290
|
-
}, on = Ye({}),
|
|
1291
|
-
function
|
|
1292
|
-
return Ae(on)[e] ??
|
|
1288
|
+
}, pa = {
|
|
1289
|
+
LockedAttachment: ba
|
|
1290
|
+
}, on = Ye({}), Ci = on.Provider;
|
|
1291
|
+
function va(e) {
|
|
1292
|
+
return Ae(on)[e] ?? pa[e];
|
|
1293
1293
|
}
|
|
1294
|
-
const
|
|
1294
|
+
const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1295
1295
|
"svg",
|
|
1296
1296
|
{
|
|
1297
1297
|
width: e,
|
|
@@ -1308,22 +1308,22 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1308
1308
|
}
|
|
1309
1309
|
)
|
|
1310
1310
|
}
|
|
1311
|
-
),
|
|
1311
|
+
), wa = (e) => {
|
|
1312
1312
|
var t;
|
|
1313
1313
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
1314
|
-
},
|
|
1314
|
+
}, _a = (e) => {
|
|
1315
1315
|
var t;
|
|
1316
1316
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
1317
1317
|
}, Ee = (e) => {
|
|
1318
1318
|
var t;
|
|
1319
1319
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
1320
|
-
},
|
|
1320
|
+
}, Na = (e) => {
|
|
1321
1321
|
var t;
|
|
1322
1322
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1323
|
-
}, ln = (e) =>
|
|
1323
|
+
}, ln = (e) => wa(e) || _a(e), ya = (e) => {
|
|
1324
1324
|
var t;
|
|
1325
1325
|
return ln(e) && !((t = e.text) != null && t.trim());
|
|
1326
|
-
},
|
|
1326
|
+
}, Pe = ({
|
|
1327
1327
|
message: e,
|
|
1328
1328
|
standalone: t = !1,
|
|
1329
1329
|
isMyMessage: s = !1,
|
|
@@ -1336,25 +1336,25 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1336
1336
|
if (r) {
|
|
1337
1337
|
const f = (u = e.metadata) == null ? void 0 : u.amount_text;
|
|
1338
1338
|
if (!f) return null;
|
|
1339
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
1339
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1340
1340
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1341
1341
|
/* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
|
|
1342
|
-
/* @__PURE__ */ n("span", { children:
|
|
1342
|
+
/* @__PURE__ */ n("span", { children: b })
|
|
1343
1343
|
] });
|
|
1344
1344
|
}
|
|
1345
1345
|
const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
|
|
1346
1346
|
"message-chatbot-indicator",
|
|
1347
1347
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1348
1348
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
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(
|
|
1350
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(
|
|
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(ae, { children: [
|
|
1351
1351
|
m,
|
|
1352
1352
|
g
|
|
1353
|
-
] }) : /* @__PURE__ */ h(
|
|
1353
|
+
] }) : /* @__PURE__ */ h(ae, { children: [
|
|
1354
1354
|
g,
|
|
1355
1355
|
m
|
|
1356
1356
|
] }) });
|
|
1357
|
-
},
|
|
1357
|
+
}, Ca = ({
|
|
1358
1358
|
selected: e,
|
|
1359
1359
|
onVoteUp: t,
|
|
1360
1360
|
onVoteDown: s
|
|
@@ -1363,7 +1363,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1363
1363
|
"button",
|
|
1364
1364
|
{
|
|
1365
1365
|
type: "button",
|
|
1366
|
-
className:
|
|
1366
|
+
className: N("message-vote-button focus-ring", {
|
|
1367
1367
|
"message-vote-button--selected": e === "up"
|
|
1368
1368
|
}),
|
|
1369
1369
|
onClick: t,
|
|
@@ -1377,7 +1377,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1377
1377
|
"button",
|
|
1378
1378
|
{
|
|
1379
1379
|
type: "button",
|
|
1380
|
-
className:
|
|
1380
|
+
className: N("message-vote-button focus-ring", {
|
|
1381
1381
|
"message-vote-button--selected": e === "down"
|
|
1382
1382
|
}),
|
|
1383
1383
|
onClick: s,
|
|
@@ -1387,7 +1387,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1387
1387
|
children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1388
1388
|
}
|
|
1389
1389
|
)
|
|
1390
|
-
] }),
|
|
1390
|
+
] }), ka = (e) => {
|
|
1391
1391
|
var ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St;
|
|
1392
1392
|
const {
|
|
1393
1393
|
additionalMessageInputProps: t,
|
|
@@ -1403,47 +1403,47 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1403
1403
|
isMessageAIGenerated: u,
|
|
1404
1404
|
isMyMessage: f,
|
|
1405
1405
|
message: c,
|
|
1406
|
-
renderText:
|
|
1407
|
-
threadList:
|
|
1408
|
-
viewerLanguage:
|
|
1409
|
-
} = e, { client:
|
|
1410
|
-
Attachment:
|
|
1411
|
-
EditMessageModal: I =
|
|
1412
|
-
MessageActions:
|
|
1413
|
-
MessageBlocked: O =
|
|
1406
|
+
renderText: b,
|
|
1407
|
+
threadList: _,
|
|
1408
|
+
viewerLanguage: v
|
|
1409
|
+
} = e, { client: p } = We("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: y, onDownloadClick: R } = va("LockedAttachment"), [z, P] = $(!1), S = Ln(c.id), { selected: E, voteUp: L, voteDown: D } = Hs(c), {
|
|
1410
|
+
Attachment: C = Dn,
|
|
1411
|
+
EditMessageModal: I = On,
|
|
1412
|
+
MessageActions: T,
|
|
1413
|
+
MessageBlocked: O = Pn,
|
|
1414
1414
|
MessageBouncePrompt: F = zn,
|
|
1415
|
-
MessageDeleted:
|
|
1416
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
1417
|
-
MessageRepliesCountButton:
|
|
1418
|
-
ReminderNotification:
|
|
1419
|
-
StreamedMessageText:
|
|
1420
|
-
PinIndicator:
|
|
1421
|
-
} = jt("CustomMessage"), B = Vn(c), q = Gn(c),
|
|
1415
|
+
MessageDeleted: Y = $n,
|
|
1416
|
+
MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
|
|
1417
|
+
MessageRepliesCountButton: J = Bn,
|
|
1418
|
+
ReminderNotification: U = Un,
|
|
1419
|
+
StreamedMessageText: w = jn,
|
|
1420
|
+
PinIndicator: k
|
|
1421
|
+
} = jt("CustomMessage"), B = Vn(c), q = Gn(c), H = se(
|
|
1422
1422
|
() => u == null ? void 0 : u(c),
|
|
1423
1423
|
[u, c]
|
|
1424
|
-
), V =
|
|
1424
|
+
), V = se(() => {
|
|
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]),
|
|
1430
|
-
const fe = Kt({ message: c, viewerLanguage:
|
|
1429
|
+
}, [c]), W = se(() => {
|
|
1430
|
+
const fe = Kt({ message: c, viewerLanguage: v });
|
|
1431
1431
|
return fe === c.text ? c : { ...c, text: fe };
|
|
1432
|
-
}, [c,
|
|
1432
|
+
}, [c, v]);
|
|
1433
1433
|
if (Hn(c))
|
|
1434
1434
|
return null;
|
|
1435
1435
|
if (c.deleted_at || c.type === "deleted")
|
|
1436
|
-
return /* @__PURE__ */ n(
|
|
1436
|
+
return /* @__PURE__ */ n(Y, { message: c });
|
|
1437
1437
|
if (Yn(c))
|
|
1438
1438
|
return /* @__PURE__ */ n(O, {});
|
|
1439
|
-
const de = !
|
|
1440
|
-
let
|
|
1441
|
-
|
|
1442
|
-
const
|
|
1439
|
+
const de = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, te = qn(c);
|
|
1440
|
+
let Q;
|
|
1441
|
+
me ? Q = () => m(c) : te && (Q = () => P(!0));
|
|
1442
|
+
const ee = f(), En = N(
|
|
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
|
+
ee ? "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,
|
|
@@ -1456,20 +1456,20 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
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 &&
|
|
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 && ee && Le;
|
|
1460
|
+
return /* @__PURE__ */ h(ae, { children: [
|
|
1461
1461
|
a && /* @__PURE__ */ n(
|
|
1462
1462
|
I,
|
|
1463
1463
|
{
|
|
1464
1464
|
additionalMessageInputProps: t
|
|
1465
1465
|
}
|
|
1466
1466
|
),
|
|
1467
|
-
|
|
1467
|
+
z && /* @__PURE__ */ n(
|
|
1468
1468
|
Wn,
|
|
1469
1469
|
{
|
|
1470
1470
|
MessageBouncePrompt: F,
|
|
1471
1471
|
onClose: () => P(!1),
|
|
1472
|
-
open:
|
|
1472
|
+
open: z
|
|
1473
1473
|
}
|
|
1474
1474
|
),
|
|
1475
1475
|
/* @__PURE__ */ h(
|
|
@@ -1478,10 +1478,10 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1478
1478
|
className: En,
|
|
1479
1479
|
"data-message-id": c.id,
|
|
1480
1480
|
children: [
|
|
1481
|
-
|
|
1482
|
-
!!
|
|
1481
|
+
k && /* @__PURE__ */ n(k, {}),
|
|
1482
|
+
!!S && /* @__PURE__ */ n(U, { reminder: S }),
|
|
1483
1483
|
c.user && /* @__PURE__ */ n(
|
|
1484
|
-
|
|
1484
|
+
ie,
|
|
1485
1485
|
{
|
|
1486
1486
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1487
1487
|
id: c.user.id,
|
|
@@ -1495,14 +1495,14 @@ const _a = ({ 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: N("str-chat__message-inner", {
|
|
1499
|
+
"str-chat__simple-message--error-failed": me || te
|
|
1500
1500
|
}),
|
|
1501
1501
|
"data-testid": "message-inner",
|
|
1502
|
-
onClick:
|
|
1503
|
-
onKeyDown:
|
|
1504
|
-
role:
|
|
1505
|
-
tabIndex:
|
|
1502
|
+
onClick: Q,
|
|
1503
|
+
onKeyDown: Q,
|
|
1504
|
+
role: Q ? "button" : void 0,
|
|
1505
|
+
tabIndex: Q ? 0 : void 0,
|
|
1506
1506
|
style: {
|
|
1507
1507
|
// Force margins to 0 to prevent hover layout shift
|
|
1508
1508
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
@@ -1510,8 +1510,8 @@ const _a = ({ 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
|
+
ee ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1514
|
+
T && /* @__PURE__ */ n(T, {}),
|
|
1515
1515
|
/* @__PURE__ */ n(
|
|
1516
1516
|
zt.Sent,
|
|
1517
1517
|
{
|
|
@@ -1521,8 +1521,8 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1521
1521
|
amountText: (xt = c.metadata) == null ? void 0 : xt.amount_text,
|
|
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
|
-
onPreviewClick: () =>
|
|
1525
|
-
onFetchSource: async () => await (y == null ? void 0 : y(c,
|
|
1524
|
+
onPreviewClick: () => M == null ? void 0 : M(c, x),
|
|
1525
|
+
onFetchSource: async () => await (y == null ? void 0 : y(c, x))
|
|
1526
1526
|
}
|
|
1527
1527
|
)
|
|
1528
1528
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1535,52 +1535,52 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1535
1535
|
amountText: (kt = c.metadata) == null ? void 0 : kt.amount_text,
|
|
1536
1536
|
detail: (Et = c.metadata) == null ? void 0 : Et.attachment_detail,
|
|
1537
1537
|
paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
|
|
1538
|
-
isUnlocking:
|
|
1539
|
-
onUnlockClick: () =>
|
|
1540
|
-
onFetchSource: async () => await (y == null ? void 0 : y(c,
|
|
1541
|
-
onDownloadClick: () =>
|
|
1538
|
+
isUnlocking: A(c.id),
|
|
1539
|
+
onUnlockClick: () => M == null ? void 0 : M(c, x),
|
|
1540
|
+
onFetchSource: async () => await (y == null ? void 0 : y(c, x)),
|
|
1541
|
+
onDownloadClick: () => R == null ? void 0 : R(c, x)
|
|
1542
1542
|
}
|
|
1543
1543
|
),
|
|
1544
|
-
|
|
1544
|
+
T && /* @__PURE__ */ n(T, {})
|
|
1545
1545
|
] }),
|
|
1546
1546
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1547
1547
|
Mt,
|
|
1548
1548
|
{
|
|
1549
|
-
message:
|
|
1550
|
-
renderText:
|
|
1549
|
+
message: W,
|
|
1550
|
+
renderText: b
|
|
1551
1551
|
}
|
|
1552
1552
|
) })
|
|
1553
1553
|
] }) : ut ? (
|
|
1554
1554
|
/* Tip-only messages render as a standalone bubble */
|
|
1555
|
-
/* @__PURE__ */ n(
|
|
1555
|
+
/* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
|
|
1556
1556
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
1557
1557
|
he && !ht && /* @__PURE__ */ n(
|
|
1558
|
-
|
|
1558
|
+
Pe,
|
|
1559
1559
|
{
|
|
1560
1560
|
message: c,
|
|
1561
1561
|
hasAttachment: Le,
|
|
1562
|
-
isMyMessage:
|
|
1562
|
+
isMyMessage: ee
|
|
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
|
+
C,
|
|
1568
1568
|
{
|
|
1569
1569
|
actionHandler: l,
|
|
1570
1570
|
attachments: V
|
|
1571
1571
|
}
|
|
1572
1572
|
) : null,
|
|
1573
|
-
|
|
1574
|
-
|
|
1573
|
+
H ? /* @__PURE__ */ n(
|
|
1574
|
+
w,
|
|
1575
1575
|
{
|
|
1576
|
-
message:
|
|
1577
|
-
renderText:
|
|
1576
|
+
message: W,
|
|
1577
|
+
renderText: b
|
|
1578
1578
|
}
|
|
1579
1579
|
) : /* @__PURE__ */ n(
|
|
1580
1580
|
Mt,
|
|
1581
1581
|
{
|
|
1582
|
-
message:
|
|
1583
|
-
renderText:
|
|
1582
|
+
message: W,
|
|
1583
|
+
renderText: b
|
|
1584
1584
|
}
|
|
1585
1585
|
),
|
|
1586
1586
|
/* @__PURE__ */ n(Kn, {})
|
|
@@ -1589,42 +1589,42 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1589
1589
|
),
|
|
1590
1590
|
!mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1591
1591
|
(!he || ht) && /* @__PURE__ */ n(
|
|
1592
|
-
|
|
1592
|
+
Pe,
|
|
1593
1593
|
{
|
|
1594
1594
|
message: c,
|
|
1595
1595
|
hasAttachment: Le,
|
|
1596
|
-
isMyMessage:
|
|
1596
|
+
isMyMessage: ee
|
|
1597
1597
|
}
|
|
1598
1598
|
),
|
|
1599
1599
|
s && he && /* @__PURE__ */ n(
|
|
1600
|
-
|
|
1600
|
+
Ca,
|
|
1601
1601
|
{
|
|
1602
|
-
selected:
|
|
1603
|
-
onVoteUp:
|
|
1604
|
-
onVoteDown:
|
|
1602
|
+
selected: E,
|
|
1603
|
+
onVoteUp: L,
|
|
1604
|
+
onVoteDown: D
|
|
1605
1605
|
}
|
|
1606
1606
|
)
|
|
1607
1607
|
] }),
|
|
1608
1608
|
de && /* @__PURE__ */ n(
|
|
1609
|
-
|
|
1609
|
+
J,
|
|
1610
1610
|
{
|
|
1611
1611
|
onClick: d,
|
|
1612
1612
|
reply_count: c.reply_count
|
|
1613
1613
|
}
|
|
1614
1614
|
),
|
|
1615
|
-
ue && /* @__PURE__ */ n(
|
|
1615
|
+
ue && /* @__PURE__ */ n(Z, {})
|
|
1616
1616
|
]
|
|
1617
1617
|
},
|
|
1618
1618
|
c.id
|
|
1619
1619
|
)
|
|
1620
1620
|
] });
|
|
1621
|
-
},
|
|
1622
|
-
|
|
1621
|
+
}, Ea = j.memo(
|
|
1622
|
+
ka,
|
|
1623
1623
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
|
|
1624
|
-
),
|
|
1624
|
+
), Sa = (e) => {
|
|
1625
1625
|
const t = xe("CustomMessage");
|
|
1626
|
-
return /* @__PURE__ */ n(
|
|
1627
|
-
},
|
|
1626
|
+
return /* @__PURE__ */ n(Ea, { ...t, ...e });
|
|
1627
|
+
}, Ia = () => {
|
|
1628
1628
|
var s;
|
|
1629
1629
|
const { handleDelete: e, message: t } = xe("CustomMessageActions");
|
|
1630
1630
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
@@ -1637,7 +1637,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1637
1637
|
children: /* @__PURE__ */ n(As, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1638
1638
|
}
|
|
1639
1639
|
);
|
|
1640
|
-
},
|
|
1640
|
+
}, Ta = () => {
|
|
1641
1641
|
const { handleFlag: e } = xe("CustomMessageActions");
|
|
1642
1642
|
return /* @__PURE__ */ n(
|
|
1643
1643
|
Yt,
|
|
@@ -1649,19 +1649,19 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1649
1649
|
children: /* @__PURE__ */ n(Vt, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
|
-
},
|
|
1652
|
+
}, Aa = () => {
|
|
1653
1653
|
var t;
|
|
1654
1654
|
const { message: e } = xe("CustomMessageActions");
|
|
1655
1655
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
|
|
1656
|
-
|
|
1656
|
+
Os,
|
|
1657
1657
|
{
|
|
1658
1658
|
messageActionSet: [
|
|
1659
|
-
{ Component:
|
|
1660
|
-
{ Component:
|
|
1659
|
+
{ Component: Ia, placement: "quick", type: "delete" },
|
|
1660
|
+
{ Component: Ta, placement: "quick", type: "flag" }
|
|
1661
1661
|
]
|
|
1662
1662
|
}
|
|
1663
1663
|
);
|
|
1664
|
-
},
|
|
1664
|
+
}, Ma = ({
|
|
1665
1665
|
link: e,
|
|
1666
1666
|
onDismiss: t
|
|
1667
1667
|
}) => {
|
|
@@ -1701,26 +1701,26 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1701
1701
|
]
|
|
1702
1702
|
}
|
|
1703
1703
|
);
|
|
1704
|
-
},
|
|
1704
|
+
}, Ra = (e) => ({
|
|
1705
1705
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1706
1706
|
(t) => At.previewIsLoaded(t) || At.previewIsLoading(t)
|
|
1707
1707
|
)
|
|
1708
|
-
}),
|
|
1708
|
+
}), La = () => {
|
|
1709
1709
|
const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
|
|
1710
1710
|
e.state,
|
|
1711
|
-
|
|
1711
|
+
Ra
|
|
1712
1712
|
), s = (r) => {
|
|
1713
1713
|
e.dismissPreview(r);
|
|
1714
1714
|
};
|
|
1715
1715
|
return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
|
|
1716
|
-
|
|
1716
|
+
Ma,
|
|
1717
1717
|
{
|
|
1718
1718
|
link: r,
|
|
1719
1719
|
onDismiss: s
|
|
1720
1720
|
},
|
|
1721
1721
|
r.og_scrape_url
|
|
1722
1722
|
)) }) : null;
|
|
1723
|
-
}, cn =
|
|
1723
|
+
}, cn = j.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1724
1724
|
"button",
|
|
1725
1725
|
{
|
|
1726
1726
|
...s,
|
|
@@ -1730,14 +1730,14 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1730
1730
|
onClick: e,
|
|
1731
1731
|
children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
|
|
1732
1732
|
}
|
|
1733
|
-
),
|
|
1733
|
+
), Oa = () => {
|
|
1734
1734
|
const e = Ae(cn), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
|
|
1735
|
-
SendButton: r =
|
|
1735
|
+
SendButton: r = Da,
|
|
1736
1736
|
AttachmentPreviewList: i = ns
|
|
1737
1737
|
} = jt("CustomMessageInput");
|
|
1738
1738
|
return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
1739
1739
|
/* @__PURE__ */ n(ss, {}),
|
|
1740
|
-
/* @__PURE__ */ n(
|
|
1740
|
+
/* @__PURE__ */ n(La, {}),
|
|
1741
1741
|
/* @__PURE__ */ n(i, {}),
|
|
1742
1742
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1743
1743
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
@@ -1764,7 +1764,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1764
1764
|
)
|
|
1765
1765
|
] })
|
|
1766
1766
|
] });
|
|
1767
|
-
},
|
|
1767
|
+
}, Pa = ({
|
|
1768
1768
|
renderActions: e,
|
|
1769
1769
|
renderFooter: t,
|
|
1770
1770
|
disabled: s = !1,
|
|
@@ -1772,7 +1772,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1772
1772
|
}) => {
|
|
1773
1773
|
var o;
|
|
1774
1774
|
const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
|
|
1775
|
-
return s ? /* @__PURE__ */ h(
|
|
1775
|
+
return s ? /* @__PURE__ */ h(ae, { 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: [
|
|
@@ -1784,23 +1784,23 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1784
1784
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1785
1785
|
children: [
|
|
1786
1786
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1787
|
-
/* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input:
|
|
1787
|
+
/* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input: Oa }) })
|
|
1788
1788
|
]
|
|
1789
1789
|
}
|
|
1790
1790
|
),
|
|
1791
1791
|
t == null ? void 0 : t()
|
|
1792
1792
|
] });
|
|
1793
|
-
},
|
|
1793
|
+
}, za = [
|
|
1794
1794
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1795
1795
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1796
|
-
],
|
|
1796
|
+
], $a = {
|
|
1797
1797
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1798
1798
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1799
|
-
},
|
|
1799
|
+
}, Fa = [
|
|
1800
1800
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1801
|
-
],
|
|
1801
|
+
], Ba = {
|
|
1802
1802
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1803
|
-
}, ze = "age safety guidelines.",
|
|
1803
|
+
}, ze = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", Ft = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
|
|
1804
1804
|
var a;
|
|
1805
1805
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1806
1806
|
if (Ft(t))
|
|
@@ -1808,7 +1808,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1808
1808
|
kind: "dm-agent",
|
|
1809
1809
|
type: t
|
|
1810
1810
|
};
|
|
1811
|
-
if (
|
|
1811
|
+
if (ja(t))
|
|
1812
1812
|
return {
|
|
1813
1813
|
kind: "age-safety",
|
|
1814
1814
|
type: t
|
|
@@ -1819,17 +1819,17 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1819
1819
|
kind: "dm-agent",
|
|
1820
1820
|
type: s
|
|
1821
1821
|
};
|
|
1822
|
-
},
|
|
1822
|
+
}, Ga = (e) => {
|
|
1823
1823
|
const t = e.indexOf(ze);
|
|
1824
1824
|
if (t === -1)
|
|
1825
1825
|
return e;
|
|
1826
1826
|
const s = t + ze.length;
|
|
1827
|
-
return /* @__PURE__ */ h(
|
|
1827
|
+
return /* @__PURE__ */ h(ae, { children: [
|
|
1828
1828
|
e.slice(0, t),
|
|
1829
1829
|
/* @__PURE__ */ n(
|
|
1830
1830
|
"a",
|
|
1831
1831
|
{
|
|
1832
|
-
href:
|
|
1832
|
+
href: Ua,
|
|
1833
1833
|
target: "_blank",
|
|
1834
1834
|
rel: "noopener noreferrer",
|
|
1835
1835
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -1838,13 +1838,13 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1838
1838
|
),
|
|
1839
1839
|
e.slice(s)
|
|
1840
1840
|
] });
|
|
1841
|
-
},
|
|
1841
|
+
}, Ha = (e) => {
|
|
1842
1842
|
var a, r;
|
|
1843
|
-
const t = e.message.hide_date === !0, s =
|
|
1843
|
+
const t = e.message.hide_date === !0, s = Va(
|
|
1844
1844
|
e.message
|
|
1845
1845
|
);
|
|
1846
1846
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
1847
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
1847
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || $a[s.type];
|
|
1848
1848
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1849
1849
|
/* @__PURE__ */ h(
|
|
1850
1850
|
"div",
|
|
@@ -1870,7 +1870,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1870
1870
|
] });
|
|
1871
1871
|
}
|
|
1872
1872
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
1873
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
1873
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ba[s.type];
|
|
1874
1874
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1875
1875
|
/* @__PURE__ */ h(
|
|
1876
1876
|
"div",
|
|
@@ -1889,7 +1889,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1889
1889
|
"data-testid": "age-safety-system-message-icon"
|
|
1890
1890
|
}
|
|
1891
1891
|
),
|
|
1892
|
-
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
1892
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ga(i) }) })
|
|
1893
1893
|
]
|
|
1894
1894
|
}
|
|
1895
1895
|
),
|
|
@@ -1914,21 +1914,21 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1914
1914
|
begin: `${120 * t}ms`,
|
|
1915
1915
|
repeatCount: "indefinite"
|
|
1916
1916
|
}
|
|
1917
|
-
) }),
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
]),
|
|
1922
|
-
var
|
|
1917
|
+
) }), Ya = /* @__PURE__ */ new Set([
|
|
1918
|
+
Oe.Thinking,
|
|
1919
|
+
Oe.Generating,
|
|
1920
|
+
Oe.ExternalSources
|
|
1921
|
+
]), qa = ({ threadList: e }) => {
|
|
1922
|
+
var b, _;
|
|
1923
1923
|
const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
|
|
1924
|
-
if (!e && l &&
|
|
1925
|
-
const
|
|
1924
|
+
if (!e && l && Ya.has(o)) {
|
|
1925
|
+
const v = Wa(t, (b = r.user) == null ? void 0 : b.id);
|
|
1926
1926
|
return /* @__PURE__ */ n(
|
|
1927
1927
|
Bt,
|
|
1928
1928
|
{
|
|
1929
|
-
avatarId: (
|
|
1930
|
-
avatarName: (
|
|
1931
|
-
avatarImage:
|
|
1929
|
+
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
1930
|
+
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
1931
|
+
avatarImage: v == null ? void 0 : v.image,
|
|
1932
1932
|
testId: "typing-indicator-ai"
|
|
1933
1933
|
}
|
|
1934
1934
|
);
|
|
@@ -1936,19 +1936,19 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1936
1936
|
if ((s == null ? void 0 : s.typing_events) === !1)
|
|
1937
1937
|
return null;
|
|
1938
1938
|
const m = e ? [] : Object.values(i).filter(
|
|
1939
|
-
({ parent_id:
|
|
1940
|
-
var
|
|
1941
|
-
return (
|
|
1939
|
+
({ parent_id: v, user: p }) => {
|
|
1940
|
+
var x;
|
|
1941
|
+
return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
|
|
1942
1942
|
}
|
|
1943
1943
|
), g = e ? Object.values(i).filter(
|
|
1944
|
-
({ parent_id:
|
|
1945
|
-
var
|
|
1946
|
-
return (
|
|
1944
|
+
({ parent_id: v, user: p }) => {
|
|
1945
|
+
var x;
|
|
1946
|
+
return (p == null ? void 0 : p.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
|
|
1947
1947
|
}
|
|
1948
1948
|
) : [], u = e ? g : m;
|
|
1949
1949
|
if (!u.length)
|
|
1950
1950
|
return null;
|
|
1951
|
-
const f = (
|
|
1951
|
+
const f = (_ = u[0]) == null ? void 0 : _.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
1952
1952
|
return /* @__PURE__ */ n(
|
|
1953
1953
|
Bt,
|
|
1954
1954
|
{
|
|
@@ -1973,7 +1973,7 @@ const _a = ({ 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
|
+
ie,
|
|
1977
1977
|
{
|
|
1978
1978
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1979
1979
|
id: e,
|
|
@@ -2002,7 +2002,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2002
2002
|
] })
|
|
2003
2003
|
}
|
|
2004
2004
|
);
|
|
2005
|
-
function
|
|
2005
|
+
function Wa(e, t) {
|
|
2006
2006
|
var a;
|
|
2007
2007
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
2008
2008
|
for (const r of Object.values(s)) {
|
|
@@ -2011,10 +2011,10 @@ function Ka(e, t) {
|
|
|
2011
2011
|
return i;
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
|
-
const
|
|
2014
|
+
const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2015
2015
|
"div",
|
|
2016
2016
|
{
|
|
2017
|
-
className:
|
|
2017
|
+
className: N("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,24 +2054,12 @@ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2054
2054
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
2055
2055
|
]
|
|
2056
2056
|
}
|
|
2057
|
-
), Se =
|
|
2058
|
-
/* @__PURE__ */ n(
|
|
2057
|
+
), Se = j.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
|
+
/* @__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
|
|
2063
|
-
className: e,
|
|
2064
|
-
size: t = 16
|
|
2065
|
-
}) => /* @__PURE__ */ n(
|
|
2066
|
-
Ls,
|
|
2067
|
-
{
|
|
2068
|
-
weight: "fill",
|
|
2069
|
-
size: t,
|
|
2070
|
-
className: k("shrink-0 text-[#1D9BF0]", e),
|
|
2071
|
-
"aria-label": "Verified",
|
|
2072
|
-
role: "img"
|
|
2073
|
-
}
|
|
2074
|
-
), oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Qa = ({
|
|
2062
|
+
const oe = "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 = ({
|
|
2075
2063
|
onBack: e,
|
|
2076
2064
|
showBackButton: t,
|
|
2077
2065
|
showStarButton: s = !1,
|
|
@@ -2086,29 +2074,30 @@ const He = ({
|
|
|
2086
2074
|
onReportParticipantClick: u,
|
|
2087
2075
|
customChannelActions: f,
|
|
2088
2076
|
renderChannelActions: c,
|
|
2089
|
-
showChannelInfo:
|
|
2090
|
-
|
|
2077
|
+
showChannelInfo: b = !0,
|
|
2078
|
+
onParticipantNameClick: _,
|
|
2079
|
+
renderHeaderTitleBadges: v
|
|
2091
2080
|
}) => {
|
|
2092
|
-
var P,
|
|
2093
|
-
const { channel: p } = ce(),
|
|
2094
|
-
var
|
|
2095
|
-
const
|
|
2096
|
-
return
|
|
2097
|
-
(
|
|
2098
|
-
var
|
|
2099
|
-
return ((
|
|
2081
|
+
var P, S, E, L, D;
|
|
2082
|
+
const { channel: p } = ce(), x = j.useMemo(() => {
|
|
2083
|
+
var T, O;
|
|
2084
|
+
const C = (T = p._client) == null ? void 0 : T.userID;
|
|
2085
|
+
return C ? Object.values(((O = p.state) == null ? void 0 : O.members) || {}).find(
|
|
2086
|
+
(F) => {
|
|
2087
|
+
var Y;
|
|
2088
|
+
return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !== C;
|
|
2100
2089
|
}
|
|
2101
2090
|
) : void 0;
|
|
2102
|
-
}, [(P = p._client) == null ? void 0 : P.userID, (
|
|
2091
|
+
}, [(P = p._client) == null ? void 0 : P.userID, (S = p.state) == null ? void 0 : S.members]), A = Xt(x == null ? void 0 : x.user), M = (E = x == null ? void 0 : x.user) == null ? void 0 : E.image, y = Wt(p), R = v == null ? void 0 : v({
|
|
2103
2092
|
channel: p,
|
|
2104
|
-
participant:
|
|
2105
|
-
}),
|
|
2093
|
+
participant: x
|
|
2094
|
+
}), z = async () => {
|
|
2106
2095
|
try {
|
|
2107
2096
|
y ? await p.unpin() : await p.pin();
|
|
2108
|
-
} catch (
|
|
2097
|
+
} catch (C) {
|
|
2109
2098
|
console.error(
|
|
2110
2099
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
2111
|
-
|
|
2100
|
+
C
|
|
2112
2101
|
);
|
|
2113
2102
|
}
|
|
2114
2103
|
};
|
|
@@ -2117,7 +2106,7 @@ const He = ({
|
|
|
2117
2106
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2118
2107
|
"button",
|
|
2119
2108
|
{
|
|
2120
|
-
className:
|
|
2109
|
+
className: N(
|
|
2121
2110
|
oe,
|
|
2122
2111
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2123
2112
|
),
|
|
@@ -2130,20 +2119,32 @@ const He = ({
|
|
|
2130
2119
|
) }),
|
|
2131
2120
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
2132
2121
|
/* @__PURE__ */ n(
|
|
2133
|
-
|
|
2122
|
+
ie,
|
|
2134
2123
|
{
|
|
2135
|
-
id: ((
|
|
2136
|
-
name:
|
|
2137
|
-
image:
|
|
2124
|
+
id: ((L = x == null ? void 0 : x.user) == null ? void 0 : L.id) || p.id || "unknown",
|
|
2125
|
+
name: A,
|
|
2126
|
+
image: M,
|
|
2138
2127
|
starred: s && y,
|
|
2139
2128
|
dmAgentEnabled: a,
|
|
2140
2129
|
size: 48
|
|
2141
2130
|
}
|
|
2142
2131
|
),
|
|
2143
|
-
/* @__PURE__ */ h(
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2132
|
+
_ ? /* @__PURE__ */ h(
|
|
2133
|
+
"button",
|
|
2134
|
+
{
|
|
2135
|
+
type: "button",
|
|
2136
|
+
onClick: _,
|
|
2137
|
+
"aria-label": `View details for ${A}`,
|
|
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
|
+
children: [
|
|
2140
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2141
|
+
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
|
|
2142
|
+
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0", weight: "bold" })
|
|
2143
|
+
]
|
|
2144
|
+
}
|
|
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
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2147
|
+
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
|
|
2147
2148
|
] }),
|
|
2148
2149
|
a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2149
2150
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
@@ -2155,13 +2156,13 @@ const He = ({
|
|
|
2155
2156
|
"button",
|
|
2156
2157
|
{
|
|
2157
2158
|
className: oe,
|
|
2158
|
-
onClick:
|
|
2159
|
+
onClick: z,
|
|
2159
2160
|
type: "button",
|
|
2160
2161
|
"aria-label": y ? "Unstar conversation" : "Star conversation",
|
|
2161
2162
|
children: /* @__PURE__ */ n(
|
|
2162
2163
|
Be,
|
|
2163
2164
|
{
|
|
2164
|
-
className:
|
|
2165
|
+
className: N("size-5", {
|
|
2165
2166
|
"text-yellow-600": y,
|
|
2166
2167
|
"text-black/90": !y
|
|
2167
2168
|
}),
|
|
@@ -2170,11 +2171,11 @@ const He = ({
|
|
|
2170
2171
|
)
|
|
2171
2172
|
}
|
|
2172
2173
|
),
|
|
2173
|
-
|
|
2174
|
-
|
|
2174
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2175
|
+
Pt,
|
|
2175
2176
|
{
|
|
2176
2177
|
channel: p,
|
|
2177
|
-
participant:
|
|
2178
|
+
participant: x,
|
|
2178
2179
|
showDeleteConversation: o,
|
|
2179
2180
|
showBlockParticipant: l,
|
|
2180
2181
|
showReportParticipant: d,
|
|
@@ -2184,7 +2185,7 @@ const He = ({
|
|
|
2184
2185
|
onBlockParticipantClick: g,
|
|
2185
2186
|
onReportParticipantClick: u,
|
|
2186
2187
|
customChannelActions: f,
|
|
2187
|
-
triggerClassName:
|
|
2188
|
+
triggerClassName: N(oe, "bg-[#F1F0EE]")
|
|
2188
2189
|
}
|
|
2189
2190
|
))
|
|
2190
2191
|
] })
|
|
@@ -2194,7 +2195,7 @@ const He = ({
|
|
|
2194
2195
|
t && e && /* @__PURE__ */ n(
|
|
2195
2196
|
"button",
|
|
2196
2197
|
{
|
|
2197
|
-
className:
|
|
2198
|
+
className: N(
|
|
2198
2199
|
oe,
|
|
2199
2200
|
"messaging-channel-view-back-button-desktop"
|
|
2200
2201
|
),
|
|
@@ -2205,21 +2206,33 @@ const He = ({
|
|
|
2205
2206
|
}
|
|
2206
2207
|
),
|
|
2207
2208
|
/* @__PURE__ */ n(
|
|
2208
|
-
|
|
2209
|
+
ie,
|
|
2209
2210
|
{
|
|
2210
|
-
id: ((
|
|
2211
|
-
name:
|
|
2212
|
-
image:
|
|
2211
|
+
id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || p.id || "unknown",
|
|
2212
|
+
name: A,
|
|
2213
|
+
image: M,
|
|
2213
2214
|
starred: s && y,
|
|
2214
2215
|
dmAgentEnabled: a,
|
|
2215
2216
|
size: 48
|
|
2216
2217
|
}
|
|
2217
2218
|
),
|
|
2218
2219
|
/* @__PURE__ */ h("div", { className: "min-w-0", children: [
|
|
2219
|
-
/* @__PURE__ */ h(
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2220
|
+
_ ? /* @__PURE__ */ h(
|
|
2221
|
+
"button",
|
|
2222
|
+
{
|
|
2223
|
+
type: "button",
|
|
2224
|
+
onClick: _,
|
|
2225
|
+
"aria-label": `View details for ${A}`,
|
|
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
|
+
children: [
|
|
2228
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2229
|
+
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
|
|
2230
|
+
/* @__PURE__ */ n(Ve, { className: "size-4 shrink-0", weight: "bold" })
|
|
2231
|
+
]
|
|
2232
|
+
}
|
|
2233
|
+
) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
2234
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
|
|
2235
|
+
R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
|
|
2223
2236
|
] }),
|
|
2224
2237
|
a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2225
2238
|
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
@@ -2232,13 +2245,13 @@ const He = ({
|
|
|
2232
2245
|
"button",
|
|
2233
2246
|
{
|
|
2234
2247
|
className: oe,
|
|
2235
|
-
onClick:
|
|
2248
|
+
onClick: z,
|
|
2236
2249
|
type: "button",
|
|
2237
2250
|
"aria-label": y ? "Unstar conversation" : "Star conversation",
|
|
2238
2251
|
children: /* @__PURE__ */ n(
|
|
2239
2252
|
Be,
|
|
2240
2253
|
{
|
|
2241
|
-
className:
|
|
2254
|
+
className: N("size-6", {
|
|
2242
2255
|
"text-yellow-600": y,
|
|
2243
2256
|
"text-black/90": !y
|
|
2244
2257
|
}),
|
|
@@ -2247,11 +2260,11 @@ const He = ({
|
|
|
2247
2260
|
)
|
|
2248
2261
|
}
|
|
2249
2262
|
),
|
|
2250
|
-
|
|
2251
|
-
|
|
2263
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
2264
|
+
Pt,
|
|
2252
2265
|
{
|
|
2253
2266
|
channel: p,
|
|
2254
|
-
participant:
|
|
2267
|
+
participant: x,
|
|
2255
2268
|
showDeleteConversation: o,
|
|
2256
2269
|
showBlockParticipant: l,
|
|
2257
2270
|
showReportParticipant: d,
|
|
@@ -2267,7 +2280,7 @@ const He = ({
|
|
|
2267
2280
|
] })
|
|
2268
2281
|
] })
|
|
2269
2282
|
] });
|
|
2270
|
-
},
|
|
2283
|
+
}, Za = ({
|
|
2271
2284
|
onBack: e,
|
|
2272
2285
|
showBackButton: t,
|
|
2273
2286
|
renderMessageInputActions: s,
|
|
@@ -2282,65 +2295,66 @@ const He = ({
|
|
|
2282
2295
|
showBlockParticipant: u = !0,
|
|
2283
2296
|
showReportParticipant: f = !0,
|
|
2284
2297
|
composerDisabled: c = !1,
|
|
2285
|
-
composerDisabledReason:
|
|
2286
|
-
showStarButton:
|
|
2287
|
-
chatbotVotingEnabled:
|
|
2288
|
-
renderChannelBanner:
|
|
2289
|
-
renderHeaderTitleBadges:
|
|
2290
|
-
customChannelActions:
|
|
2291
|
-
renderChannelActions:
|
|
2298
|
+
composerDisabledReason: b,
|
|
2299
|
+
showStarButton: _ = !1,
|
|
2300
|
+
chatbotVotingEnabled: v = !1,
|
|
2301
|
+
renderChannelBanner: p,
|
|
2302
|
+
renderHeaderTitleBadges: x,
|
|
2303
|
+
customChannelActions: A,
|
|
2304
|
+
renderChannelActions: M,
|
|
2292
2305
|
renderMessage: y,
|
|
2293
|
-
dmAgentEnabled:
|
|
2294
|
-
viewerLanguage:
|
|
2295
|
-
showChannelInfo: P = !0
|
|
2306
|
+
dmAgentEnabled: R = !1,
|
|
2307
|
+
viewerLanguage: z,
|
|
2308
|
+
showChannelInfo: P = !0,
|
|
2309
|
+
onParticipantNameClick: S
|
|
2296
2310
|
}) => {
|
|
2297
|
-
var
|
|
2298
|
-
const { channel:
|
|
2299
|
-
var
|
|
2300
|
-
const
|
|
2301
|
-
return
|
|
2302
|
-
(
|
|
2303
|
-
var
|
|
2304
|
-
return ((
|
|
2311
|
+
var F, Y, Z, J, U, w;
|
|
2312
|
+
const { channel: E } = ce(), L = j.useMemo(() => {
|
|
2313
|
+
var q, H;
|
|
2314
|
+
const k = (q = E._client) == null ? void 0 : q.userID;
|
|
2315
|
+
return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find(
|
|
2316
|
+
(V) => {
|
|
2317
|
+
var W;
|
|
2318
|
+
return ((W = V.user) == null ? void 0 : W.id) && V.user.id !== k;
|
|
2305
2319
|
}
|
|
2306
2320
|
) : void 0;
|
|
2307
|
-
}, [(
|
|
2308
|
-
var
|
|
2309
|
-
const
|
|
2310
|
-
return
|
|
2311
|
-
var
|
|
2312
|
-
return ((
|
|
2321
|
+
}, [(F = E._client) == null ? void 0 : F.userID, (Y = E.state) == null ? void 0 : Y.members]), D = j.useMemo(() => {
|
|
2322
|
+
var q, H;
|
|
2323
|
+
const k = (q = E._client) == null ? void 0 : q.userID;
|
|
2324
|
+
return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find((V) => {
|
|
2325
|
+
var W;
|
|
2326
|
+
return ((W = V.user) == null ? void 0 : W.id) === k;
|
|
2313
2327
|
}) : void 0;
|
|
2314
|
-
}, [(
|
|
2315
|
-
(
|
|
2316
|
-
const { message:
|
|
2317
|
-
|
|
2328
|
+
}, [(Z = E._client) == null ? void 0 : Z.userID, (J = E.state) == null ? void 0 : J.members]), C = ((U = D == null ? void 0 : D.user) == null ? void 0 : U.is_account) ?? (D == null ? void 0 : D.is_account), I = ((w = L == null ? void 0 : L.user) == null ? void 0 : w.is_account) ?? (L == null ? void 0 : L.is_account), T = R && C === !1 && I === !0, O = K(
|
|
2329
|
+
(k) => {
|
|
2330
|
+
const { message: B } = xe("ChannelView"), q = /* @__PURE__ */ n(
|
|
2331
|
+
Sa,
|
|
2318
2332
|
{
|
|
2319
|
-
...
|
|
2320
|
-
chatbotVotingEnabled:
|
|
2321
|
-
viewerLanguage:
|
|
2333
|
+
...k,
|
|
2334
|
+
chatbotVotingEnabled: v,
|
|
2335
|
+
viewerLanguage: z
|
|
2322
2336
|
}
|
|
2323
2337
|
);
|
|
2324
|
-
return !y || !
|
|
2338
|
+
return !y || !B ? q : y(q, B);
|
|
2325
2339
|
},
|
|
2326
|
-
[
|
|
2340
|
+
[v, y, z]
|
|
2327
2341
|
);
|
|
2328
|
-
return /* @__PURE__ */ n(
|
|
2342
|
+
return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
|
|
2329
2343
|
ls,
|
|
2330
2344
|
{
|
|
2331
2345
|
overrides: {
|
|
2332
|
-
Message:
|
|
2333
|
-
MessageActions:
|
|
2346
|
+
Message: O,
|
|
2347
|
+
MessageActions: Aa
|
|
2334
2348
|
},
|
|
2335
2349
|
children: /* @__PURE__ */ h(cs, { children: [
|
|
2336
2350
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
2337
|
-
|
|
2351
|
+
Ja,
|
|
2338
2352
|
{
|
|
2339
2353
|
onBack: e,
|
|
2340
2354
|
showBackButton: t,
|
|
2341
2355
|
showChannelInfo: P,
|
|
2342
|
-
showStarButton:
|
|
2343
|
-
dmAgentEnabled:
|
|
2356
|
+
showStarButton: _,
|
|
2357
|
+
dmAgentEnabled: T,
|
|
2344
2358
|
onLeaveConversation: i,
|
|
2345
2359
|
onBlockParticipant: o,
|
|
2346
2360
|
showDeleteConversation: l,
|
|
@@ -2349,12 +2363,13 @@ const He = ({
|
|
|
2349
2363
|
onDeleteConversationClick: d,
|
|
2350
2364
|
onBlockParticipantClick: m,
|
|
2351
2365
|
onReportParticipantClick: g,
|
|
2352
|
-
customChannelActions:
|
|
2353
|
-
renderChannelActions:
|
|
2354
|
-
|
|
2366
|
+
customChannelActions: A,
|
|
2367
|
+
renderChannelActions: M,
|
|
2368
|
+
onParticipantNameClick: S,
|
|
2369
|
+
renderHeaderTitleBadges: x
|
|
2355
2370
|
}
|
|
2356
2371
|
) }, "lt-channel-header"),
|
|
2357
|
-
|
|
2372
|
+
p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null,
|
|
2358
2373
|
/* @__PURE__ */ n(
|
|
2359
2374
|
"div",
|
|
2360
2375
|
{
|
|
@@ -2363,23 +2378,23 @@ const He = ({
|
|
|
2363
2378
|
},
|
|
2364
2379
|
"lt-channel-message-list"
|
|
2365
2380
|
),
|
|
2366
|
-
r ? /* @__PURE__ */ n(
|
|
2381
|
+
r ? /* @__PURE__ */ n(j.Fragment, { children: r(E) }, "lt-channel-conversation-footer") : null,
|
|
2367
2382
|
/* @__PURE__ */ n(
|
|
2368
|
-
|
|
2383
|
+
Pa,
|
|
2369
2384
|
{
|
|
2370
2385
|
...s && {
|
|
2371
|
-
renderActions: () => s == null ? void 0 : s(
|
|
2386
|
+
renderActions: () => s == null ? void 0 : s(E)
|
|
2372
2387
|
},
|
|
2373
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
2388
|
+
renderFooter: () => a == null ? void 0 : a(E),
|
|
2374
2389
|
disabled: c,
|
|
2375
|
-
disabledReason:
|
|
2390
|
+
disabledReason: b
|
|
2376
2391
|
},
|
|
2377
2392
|
"lt-channel-message-input"
|
|
2378
2393
|
)
|
|
2379
2394
|
] })
|
|
2380
2395
|
}
|
|
2381
2396
|
) });
|
|
2382
|
-
}, un =
|
|
2397
|
+
}, un = j.memo(
|
|
2383
2398
|
({
|
|
2384
2399
|
channel: e,
|
|
2385
2400
|
onBack: t,
|
|
@@ -2390,84 +2405,85 @@ const He = ({
|
|
|
2390
2405
|
onLeaveConversation: o,
|
|
2391
2406
|
onBlockParticipant: l,
|
|
2392
2407
|
className: d,
|
|
2393
|
-
CustomChannelEmptyState: m =
|
|
2408
|
+
CustomChannelEmptyState: m = Xa,
|
|
2394
2409
|
showDeleteConversation: g = !0,
|
|
2395
2410
|
onDeleteConversationClick: u,
|
|
2396
2411
|
onBlockParticipantClick: f,
|
|
2397
2412
|
onReportParticipantClick: c,
|
|
2398
|
-
showBlockParticipant:
|
|
2399
|
-
showReportParticipant:
|
|
2400
|
-
composerDisabled:
|
|
2401
|
-
composerDisabledReason:
|
|
2402
|
-
dmAgentEnabled:
|
|
2403
|
-
messageMetadata:
|
|
2404
|
-
onMessageSent:
|
|
2413
|
+
showBlockParticipant: b = !0,
|
|
2414
|
+
showReportParticipant: _ = !0,
|
|
2415
|
+
composerDisabled: v = !1,
|
|
2416
|
+
composerDisabledReason: p,
|
|
2417
|
+
dmAgentEnabled: x,
|
|
2418
|
+
messageMetadata: A,
|
|
2419
|
+
onMessageSent: M,
|
|
2405
2420
|
showStarButton: y = !1,
|
|
2406
|
-
chatbotVotingEnabled:
|
|
2407
|
-
renderChannelBanner:
|
|
2421
|
+
chatbotVotingEnabled: R = !1,
|
|
2422
|
+
renderChannelBanner: z,
|
|
2408
2423
|
renderHeaderTitleBadges: P,
|
|
2409
|
-
customChannelActions:
|
|
2410
|
-
renderChannelActions:
|
|
2411
|
-
renderMessage:
|
|
2412
|
-
onMessageLinkClick:
|
|
2413
|
-
sendButton:
|
|
2424
|
+
customChannelActions: S,
|
|
2425
|
+
renderChannelActions: E,
|
|
2426
|
+
renderMessage: L,
|
|
2427
|
+
onMessageLinkClick: D,
|
|
2428
|
+
sendButton: C,
|
|
2414
2429
|
attachmentPreviewList: I,
|
|
2415
|
-
viewerLanguage:
|
|
2416
|
-
showChannelInfo: O = !0
|
|
2430
|
+
viewerLanguage: T,
|
|
2431
|
+
showChannelInfo: O = !0,
|
|
2432
|
+
onParticipantNameClick: F
|
|
2417
2433
|
}) => {
|
|
2418
|
-
const
|
|
2419
|
-
async (
|
|
2420
|
-
var
|
|
2421
|
-
const
|
|
2422
|
-
...
|
|
2423
|
-
...
|
|
2424
|
-
...
|
|
2434
|
+
const Y = K(
|
|
2435
|
+
async (J, U, w) => {
|
|
2436
|
+
var W;
|
|
2437
|
+
const k = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, B = x && !k, q = {
|
|
2438
|
+
...U,
|
|
2439
|
+
...B && { silent: !0 },
|
|
2440
|
+
...A && {
|
|
2425
2441
|
metadata: {
|
|
2426
|
-
...
|
|
2427
|
-
...
|
|
2442
|
+
...U.metadata ?? {},
|
|
2443
|
+
...A
|
|
2428
2444
|
}
|
|
2429
2445
|
}
|
|
2430
|
-
},
|
|
2431
|
-
...
|
|
2432
|
-
...
|
|
2433
|
-
},
|
|
2434
|
-
return
|
|
2446
|
+
}, H = {
|
|
2447
|
+
...w,
|
|
2448
|
+
...B && { skip_push: !0 }
|
|
2449
|
+
}, V = await e.sendMessage(q, H);
|
|
2450
|
+
return M == null || M(V), V;
|
|
2435
2451
|
},
|
|
2436
|
-
[e,
|
|
2437
|
-
),
|
|
2452
|
+
[e, x, A, M]
|
|
2453
|
+
), Z = G(null);
|
|
2438
2454
|
return X(() => {
|
|
2439
|
-
if (!
|
|
2440
|
-
const
|
|
2441
|
-
if (!
|
|
2442
|
-
const
|
|
2443
|
-
const
|
|
2444
|
-
if (!
|
|
2445
|
-
const
|
|
2446
|
-
|
|
2455
|
+
if (!D) return;
|
|
2456
|
+
const J = Z.current;
|
|
2457
|
+
if (!J) return;
|
|
2458
|
+
const U = (w) => {
|
|
2459
|
+
const k = w.target, B = k == null ? void 0 : k.closest("a[href]"), q = B == null ? void 0 : B.getAttribute("href");
|
|
2460
|
+
if (!q) return;
|
|
2461
|
+
const H = B == null ? void 0 : B.closest("[data-message-id]"), V = H == null ? void 0 : H.getAttribute("data-message-id"), W = V ? e.state.messages.find((de) => de.id === V) : void 0;
|
|
2462
|
+
D(q, W);
|
|
2447
2463
|
};
|
|
2448
|
-
return
|
|
2449
|
-
}, [
|
|
2464
|
+
return J.addEventListener("click", U), () => J.removeEventListener("click", U);
|
|
2465
|
+
}, [D, e]), /* @__PURE__ */ n(
|
|
2450
2466
|
"div",
|
|
2451
2467
|
{
|
|
2452
|
-
ref:
|
|
2453
|
-
className:
|
|
2468
|
+
ref: Z,
|
|
2469
|
+
className: N(
|
|
2454
2470
|
"messaging-channel-view h-full flex flex-col",
|
|
2455
2471
|
d
|
|
2456
2472
|
),
|
|
2457
|
-
children: /* @__PURE__ */ n(dn.Provider, { value:
|
|
2473
|
+
children: /* @__PURE__ */ n(dn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
|
|
2458
2474
|
os,
|
|
2459
2475
|
{
|
|
2460
2476
|
channel: e,
|
|
2461
|
-
MessageSystem:
|
|
2477
|
+
MessageSystem: Ha,
|
|
2462
2478
|
EmptyStateIndicator: m,
|
|
2463
2479
|
LoadingIndicator: Se,
|
|
2464
|
-
DateSeparator:
|
|
2465
|
-
TypingIndicator:
|
|
2466
|
-
doSendMessageRequest:
|
|
2467
|
-
...
|
|
2480
|
+
DateSeparator: Vs,
|
|
2481
|
+
TypingIndicator: qa,
|
|
2482
|
+
doSendMessageRequest: Y,
|
|
2483
|
+
...C ? { SendButton: C } : {},
|
|
2468
2484
|
...I ? { AttachmentPreviewList: I } : {},
|
|
2469
2485
|
children: /* @__PURE__ */ n(
|
|
2470
|
-
|
|
2486
|
+
Za,
|
|
2471
2487
|
{
|
|
2472
2488
|
onBack: t,
|
|
2473
2489
|
showBackButton: s,
|
|
@@ -2481,20 +2497,21 @@ const He = ({
|
|
|
2481
2497
|
onDeleteConversationClick: u,
|
|
2482
2498
|
onBlockParticipantClick: f,
|
|
2483
2499
|
onReportParticipantClick: c,
|
|
2484
|
-
showBlockParticipant:
|
|
2485
|
-
showReportParticipant:
|
|
2486
|
-
composerDisabled:
|
|
2487
|
-
composerDisabledReason:
|
|
2500
|
+
showBlockParticipant: b,
|
|
2501
|
+
showReportParticipant: _,
|
|
2502
|
+
composerDisabled: v,
|
|
2503
|
+
composerDisabledReason: p,
|
|
2488
2504
|
showStarButton: y,
|
|
2489
|
-
dmAgentEnabled:
|
|
2490
|
-
chatbotVotingEnabled:
|
|
2491
|
-
renderChannelBanner:
|
|
2505
|
+
dmAgentEnabled: x,
|
|
2506
|
+
chatbotVotingEnabled: R,
|
|
2507
|
+
renderChannelBanner: z,
|
|
2492
2508
|
renderHeaderTitleBadges: P,
|
|
2493
|
-
customChannelActions:
|
|
2494
|
-
renderChannelActions:
|
|
2495
|
-
renderMessage:
|
|
2496
|
-
viewerLanguage:
|
|
2497
|
-
showChannelInfo: O
|
|
2509
|
+
customChannelActions: S,
|
|
2510
|
+
renderChannelActions: E,
|
|
2511
|
+
renderMessage: L,
|
|
2512
|
+
viewerLanguage: T,
|
|
2513
|
+
showChannelInfo: O,
|
|
2514
|
+
onParticipantNameClick: F
|
|
2498
2515
|
}
|
|
2499
2516
|
)
|
|
2500
2517
|
}
|
|
@@ -2504,7 +2521,7 @@ const He = ({
|
|
|
2504
2521
|
}
|
|
2505
2522
|
);
|
|
2506
2523
|
un.displayName = "ChannelView";
|
|
2507
|
-
const be =
|
|
2524
|
+
const be = j.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: [
|
|
2508
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: "⚠️" }) }),
|
|
2509
2526
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2510
2527
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -2519,7 +2536,7 @@ const be = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
2519
2536
|
)
|
|
2520
2537
|
] }) }));
|
|
2521
2538
|
be.displayName = "ErrorState";
|
|
2522
|
-
const
|
|
2539
|
+
const ki = ({
|
|
2523
2540
|
capabilities: e = {},
|
|
2524
2541
|
renderMessageInputActions: t,
|
|
2525
2542
|
renderConversationFooter: s,
|
|
@@ -2534,157 +2551,159 @@ const Si = ({
|
|
|
2534
2551
|
onMessageSent: u,
|
|
2535
2552
|
chatbotVotingEnabled: f = !1,
|
|
2536
2553
|
viewerLanguage: c,
|
|
2537
|
-
renderHeaderTitleBadges:
|
|
2538
|
-
renderChannelBanner:
|
|
2539
|
-
customChannelActions:
|
|
2540
|
-
renderChannelActions:
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2554
|
+
renderHeaderTitleBadges: b,
|
|
2555
|
+
renderChannelBanner: _,
|
|
2556
|
+
customChannelActions: v,
|
|
2557
|
+
renderChannelActions: p,
|
|
2558
|
+
onParticipantNameClick: x,
|
|
2559
|
+
renderMessage: A,
|
|
2560
|
+
onMessageLinkClick: M,
|
|
2561
|
+
showChannelInfo: y
|
|
2544
2562
|
}) => {
|
|
2545
2563
|
const {
|
|
2546
|
-
client:
|
|
2547
|
-
isConnected:
|
|
2548
|
-
isLoading:
|
|
2549
|
-
error:
|
|
2550
|
-
refreshConnection:
|
|
2551
|
-
service:
|
|
2552
|
-
debug:
|
|
2553
|
-
} =
|
|
2554
|
-
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2557
|
-
const
|
|
2564
|
+
client: R,
|
|
2565
|
+
isConnected: z,
|
|
2566
|
+
isLoading: P,
|
|
2567
|
+
error: S,
|
|
2568
|
+
refreshConnection: E,
|
|
2569
|
+
service: L,
|
|
2570
|
+
debug: D
|
|
2571
|
+
} = Ps(), [C, I] = $(null), [T, O] = $(null), [F, Y] = $(!1), { showDeleteConversation: Z = !0 } = e, J = G(o);
|
|
2572
|
+
J.current = o;
|
|
2573
|
+
const U = G(a);
|
|
2574
|
+
U.current = a;
|
|
2575
|
+
const w = G(null), k = G(null);
|
|
2558
2576
|
X(() => {
|
|
2559
|
-
|
|
2560
|
-
}, [
|
|
2561
|
-
if (!
|
|
2562
|
-
const
|
|
2563
|
-
if (!
|
|
2564
|
-
const
|
|
2565
|
-
if (
|
|
2566
|
-
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2577
|
+
k.current = C;
|
|
2578
|
+
}, [C]), X(() => {
|
|
2579
|
+
if (!R || !z) return;
|
|
2580
|
+
const H = R.userID;
|
|
2581
|
+
if (!H) return;
|
|
2582
|
+
const V = `${H}::${i}`;
|
|
2583
|
+
if (w.current === V) return;
|
|
2584
|
+
w.current = V;
|
|
2585
|
+
const W = () => {
|
|
2586
|
+
w.current === V && (w.current = null);
|
|
2569
2587
|
};
|
|
2570
2588
|
(async () => {
|
|
2571
|
-
var
|
|
2589
|
+
var ue, me;
|
|
2572
2590
|
try {
|
|
2573
|
-
|
|
2591
|
+
D && console.log(
|
|
2574
2592
|
"[MessagingShell] Loading initial conversation with:",
|
|
2575
2593
|
i
|
|
2576
2594
|
);
|
|
2577
|
-
const
|
|
2595
|
+
const te = await R.queryChannels(
|
|
2578
2596
|
{
|
|
2579
2597
|
type: "messaging",
|
|
2580
|
-
members: { $eq: [
|
|
2598
|
+
members: { $eq: [H, i] }
|
|
2581
2599
|
},
|
|
2582
2600
|
{},
|
|
2583
2601
|
{ limit: 1 }
|
|
2584
2602
|
);
|
|
2585
|
-
if (
|
|
2586
|
-
|
|
2603
|
+
if (te.length > 0) {
|
|
2604
|
+
I(te[0]), O(null), (ue = U.current) == null || ue.call(U, te[0]), D && console.log(
|
|
2587
2605
|
"[MessagingShell] Initial conversation loaded:",
|
|
2588
|
-
|
|
2606
|
+
te[0].id
|
|
2589
2607
|
);
|
|
2590
2608
|
return;
|
|
2591
2609
|
}
|
|
2592
|
-
const
|
|
2593
|
-
if (!
|
|
2594
|
-
|
|
2610
|
+
const Q = J.current;
|
|
2611
|
+
if (!Q || !L) {
|
|
2612
|
+
W(), O("No conversation found with this account"), D && console.log(
|
|
2595
2613
|
"[MessagingShell] No conversation found for:",
|
|
2596
2614
|
i
|
|
2597
2615
|
);
|
|
2598
2616
|
return;
|
|
2599
2617
|
}
|
|
2600
2618
|
try {
|
|
2601
|
-
const
|
|
2602
|
-
id:
|
|
2603
|
-
name:
|
|
2604
|
-
phone:
|
|
2619
|
+
const ee = await L.startChannelWithParticipant({
|
|
2620
|
+
id: Q.id,
|
|
2621
|
+
name: Q.name,
|
|
2622
|
+
phone: Q.phone
|
|
2605
2623
|
});
|
|
2606
|
-
|
|
2624
|
+
I(ee), O(null), (me = U.current) == null || me.call(U, ee), D && console.log(
|
|
2607
2625
|
"[MessagingShell] Channel created and loaded:",
|
|
2608
|
-
|
|
2626
|
+
ee.id
|
|
2609
2627
|
);
|
|
2610
|
-
} catch (
|
|
2628
|
+
} catch (ee) {
|
|
2611
2629
|
console.error(
|
|
2612
2630
|
"[MessagingShell] Failed to create conversation:",
|
|
2613
|
-
|
|
2614
|
-
),
|
|
2631
|
+
ee
|
|
2632
|
+
), W(), O("Failed to create conversation");
|
|
2615
2633
|
}
|
|
2616
|
-
} catch (
|
|
2634
|
+
} catch (te) {
|
|
2617
2635
|
console.error(
|
|
2618
2636
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2619
|
-
|
|
2620
|
-
),
|
|
2637
|
+
te
|
|
2638
|
+
), W(), k.current || O("Failed to load conversation");
|
|
2621
2639
|
}
|
|
2622
2640
|
})();
|
|
2623
|
-
}, [i,
|
|
2624
|
-
const
|
|
2625
|
-
|
|
2626
|
-
const
|
|
2627
|
-
var
|
|
2628
|
-
|
|
2641
|
+
}, [i, R, z, L, D]);
|
|
2642
|
+
const B = G(r);
|
|
2643
|
+
B.current = r;
|
|
2644
|
+
const q = K(() => {
|
|
2645
|
+
var H;
|
|
2646
|
+
I(null), Y(!0), (H = B.current) == null || H.call(B);
|
|
2629
2647
|
}, []);
|
|
2630
|
-
return
|
|
2648
|
+
return P ? /* @__PURE__ */ n(Se, {}) : S ? /* @__PURE__ */ n(be, { message: S, onBack: E }) : !z || !R ? /* @__PURE__ */ n(
|
|
2631
2649
|
be,
|
|
2632
2650
|
{
|
|
2633
2651
|
message: "Not connected to messaging service",
|
|
2634
|
-
onBack:
|
|
2652
|
+
onBack: E
|
|
2635
2653
|
}
|
|
2636
|
-
) :
|
|
2654
|
+
) : T ? /* @__PURE__ */ n(be, { message: T }) : F && !C ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : C ? /* @__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(
|
|
2637
2655
|
un,
|
|
2638
2656
|
{
|
|
2639
|
-
channel:
|
|
2657
|
+
channel: C,
|
|
2640
2658
|
renderMessageInputActions: t,
|
|
2641
2659
|
renderConversationFooter: s,
|
|
2642
|
-
renderChannelBanner:
|
|
2643
|
-
onLeaveConversation:
|
|
2644
|
-
onBlockParticipant:
|
|
2660
|
+
renderChannelBanner: _,
|
|
2661
|
+
onLeaveConversation: q,
|
|
2662
|
+
onBlockParticipant: q,
|
|
2645
2663
|
CustomChannelEmptyState: l,
|
|
2646
|
-
showDeleteConversation:
|
|
2664
|
+
showDeleteConversation: Z,
|
|
2647
2665
|
onBlockParticipantClick: d,
|
|
2648
2666
|
onReportParticipantClick: m,
|
|
2649
2667
|
dmAgentEnabled: g,
|
|
2650
2668
|
onMessageSent: u,
|
|
2651
2669
|
chatbotVotingEnabled: f,
|
|
2652
2670
|
viewerLanguage: c,
|
|
2653
|
-
renderHeaderTitleBadges:
|
|
2654
|
-
customChannelActions:
|
|
2655
|
-
renderChannelActions:
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2671
|
+
renderHeaderTitleBadges: b,
|
|
2672
|
+
customChannelActions: v,
|
|
2673
|
+
renderChannelActions: p,
|
|
2674
|
+
onParticipantNameClick: x,
|
|
2675
|
+
renderMessage: A,
|
|
2676
|
+
onMessageLinkClick: M,
|
|
2677
|
+
showChannelInfo: y
|
|
2659
2678
|
},
|
|
2660
|
-
|
|
2679
|
+
C.id
|
|
2661
2680
|
) }) }) : /* @__PURE__ */ n(Se, {});
|
|
2662
2681
|
};
|
|
2663
|
-
function
|
|
2682
|
+
function Qa(e) {
|
|
2664
2683
|
const t = e.state.pending_messages;
|
|
2665
2684
|
if (t != null && t.length)
|
|
2666
2685
|
for (const s of t)
|
|
2667
2686
|
e.state.addMessageSorted(s.message);
|
|
2668
2687
|
}
|
|
2669
|
-
const mn =
|
|
2688
|
+
const mn = j.createContext({
|
|
2670
2689
|
selectedChannel: void 0,
|
|
2671
2690
|
onChannelSelect: () => {
|
|
2672
2691
|
},
|
|
2673
2692
|
debug: !1,
|
|
2674
2693
|
renderMessagePreview: void 0,
|
|
2675
2694
|
viewerLanguage: void 0
|
|
2676
|
-
}),
|
|
2695
|
+
}), er = mn.Provider, tr = () => j.useContext(mn), nr = (e, t) => {
|
|
2677
2696
|
const s = new Date(
|
|
2678
2697
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2679
2698
|
), r = new Date(
|
|
2680
2699
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
2681
2700
|
).getTime() - s.getTime();
|
|
2682
2701
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
2683
|
-
},
|
|
2702
|
+
}, sr = (e) => {
|
|
2684
2703
|
const t = /* @__PURE__ */ new Date();
|
|
2685
2704
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
2686
2705
|
return "Just now";
|
|
2687
|
-
const a =
|
|
2706
|
+
const a = nr(e, t);
|
|
2688
2707
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
2689
2708
|
hour: "numeric",
|
|
2690
2709
|
minute: "2-digit",
|
|
@@ -2694,51 +2713,51 @@ const mn = U.createContext({
|
|
|
2694
2713
|
day: "numeric",
|
|
2695
2714
|
year: "2-digit"
|
|
2696
2715
|
});
|
|
2697
|
-
}, hn =
|
|
2716
|
+
}, hn = j.memo(
|
|
2698
2717
|
({ channel: e, unread: t }) => {
|
|
2699
|
-
var
|
|
2718
|
+
var R, z, P;
|
|
2700
2719
|
const {
|
|
2701
2720
|
selectedChannel: s,
|
|
2702
2721
|
onChannelSelect: a,
|
|
2703
2722
|
debug: r,
|
|
2704
2723
|
renderMessagePreview: i,
|
|
2705
2724
|
viewerLanguage: o
|
|
2706
|
-
} =
|
|
2725
|
+
} = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2707
2726
|
e && a(e);
|
|
2708
|
-
}, m = (
|
|
2709
|
-
const
|
|
2710
|
-
!
|
|
2711
|
-
}, u = Object.values(((
|
|
2712
|
-
(
|
|
2713
|
-
var
|
|
2714
|
-
return ((
|
|
2727
|
+
}, m = (S) => {
|
|
2728
|
+
const E = S.key === "Enter" || S.key === " ", L = S.repeat;
|
|
2729
|
+
!E || L || (S.preventDefault(), d());
|
|
2730
|
+
}, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
|
|
2731
|
+
(S) => {
|
|
2732
|
+
var E, L;
|
|
2733
|
+
return ((E = S.user) == null ? void 0 : E.id) && S.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
|
|
2715
2734
|
}
|
|
2716
|
-
), f = Xt(u == null ? void 0 : u.user), c = (
|
|
2717
|
-
var
|
|
2718
|
-
const
|
|
2719
|
-
if (
|
|
2720
|
-
for (let
|
|
2721
|
-
if (
|
|
2735
|
+
), f = Xt(u == null ? void 0 : u.user), c = (z = u == null ? void 0 : u.user) == null ? void 0 : z.image, b = (() => {
|
|
2736
|
+
var E;
|
|
2737
|
+
const S = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
|
|
2738
|
+
if (S != null && S.length) {
|
|
2739
|
+
for (let L = S.length - 1; L >= 0; L--)
|
|
2740
|
+
if (S[L].type !== "system") return S[L];
|
|
2722
2741
|
}
|
|
2723
2742
|
})(), v = (() => {
|
|
2724
|
-
var
|
|
2725
|
-
const
|
|
2743
|
+
var I, T, O, F;
|
|
2744
|
+
const S = Kt({
|
|
2726
2745
|
message: b,
|
|
2727
2746
|
viewerLanguage: o
|
|
2728
2747
|
});
|
|
2729
|
-
if (((
|
|
2730
|
-
if (((
|
|
2731
|
-
if (((
|
|
2732
|
-
if (
|
|
2733
|
-
const
|
|
2734
|
-
return
|
|
2735
|
-
})(),
|
|
2748
|
+
if (((I = b == null ? void 0 : b.metadata) == null ? void 0 : I.custom_type) === "MESSAGE_TIP") return S ? `💵 ${S}` : "💵 Sent a tip";
|
|
2749
|
+
if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_PAID") return S ? `💰 ${S}` : "💰 Sent a message";
|
|
2750
|
+
if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_ATTACHMENT") return S ? `📎 ${S}` : "📎 Sent an attachment";
|
|
2751
|
+
if (S) return S;
|
|
2752
|
+
const C = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
|
|
2753
|
+
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
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), y = t ?? 0;
|
|
2736
2755
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2737
2756
|
channelId: e == null ? void 0 : e.id,
|
|
2738
2757
|
isSelected: l,
|
|
2739
2758
|
participantName: f,
|
|
2740
|
-
unreadCount:
|
|
2741
|
-
hasTimestamp: !!
|
|
2759
|
+
unreadCount: y,
|
|
2760
|
+
hasTimestamp: !!p
|
|
2742
2761
|
}), /* @__PURE__ */ n(
|
|
2743
2762
|
"div",
|
|
2744
2763
|
{
|
|
@@ -2746,7 +2765,7 @@ const mn = U.createContext({
|
|
|
2746
2765
|
tabIndex: 0,
|
|
2747
2766
|
onClick: d,
|
|
2748
2767
|
onKeyDown: m,
|
|
2749
|
-
className:
|
|
2768
|
+
className: N(
|
|
2750
2769
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
2751
2770
|
{
|
|
2752
2771
|
"bg-black/[0.04]": l,
|
|
@@ -2755,27 +2774,34 @@ const mn = U.createContext({
|
|
|
2755
2774
|
),
|
|
2756
2775
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
2757
2776
|
/* @__PURE__ */ n(
|
|
2758
|
-
|
|
2777
|
+
ie,
|
|
2759
2778
|
{
|
|
2760
|
-
id: ((
|
|
2779
|
+
id: ((P = u == null ? void 0 : u.user) == null ? void 0 : P.id) || e.id || "unknown",
|
|
2761
2780
|
name: f,
|
|
2762
2781
|
image: c,
|
|
2763
2782
|
size: 48,
|
|
2764
|
-
starred:
|
|
2783
|
+
starred: M
|
|
2765
2784
|
}
|
|
2766
2785
|
),
|
|
2767
2786
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
2768
2787
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2769
|
-
/* @__PURE__ */ h(
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2788
|
+
/* @__PURE__ */ h(
|
|
2789
|
+
"h3",
|
|
2790
|
+
{
|
|
2791
|
+
className: N(
|
|
2792
|
+
"text-sm font-medium truncate text-[#191918]"
|
|
2793
|
+
),
|
|
2794
|
+
children: [
|
|
2795
|
+
M && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
2796
|
+
f
|
|
2797
|
+
]
|
|
2798
|
+
}
|
|
2799
|
+
),
|
|
2800
|
+
p && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: p })
|
|
2775
2801
|
] }),
|
|
2776
2802
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2777
|
-
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
2778
|
-
|
|
2803
|
+
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
|
|
2804
|
+
y > 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: y > 99 ? "99+" : y })
|
|
2779
2805
|
] })
|
|
2780
2806
|
] })
|
|
2781
2807
|
] })
|
|
@@ -2784,26 +2810,26 @@ const mn = U.createContext({
|
|
|
2784
2810
|
}
|
|
2785
2811
|
);
|
|
2786
2812
|
hn.displayName = "CustomChannelPreview";
|
|
2787
|
-
const
|
|
2813
|
+
const ar = { last_message_at: -1 }, rr = j.memo(
|
|
2788
2814
|
({
|
|
2789
2815
|
onChannelSelect: e,
|
|
2790
2816
|
selectedChannel: t,
|
|
2791
2817
|
filters: s,
|
|
2792
2818
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2793
2819
|
channelRenderFilterFn: r,
|
|
2794
|
-
sort: i =
|
|
2820
|
+
sort: i = ar,
|
|
2795
2821
|
className: o,
|
|
2796
2822
|
customEmptyStateIndicator: l,
|
|
2797
2823
|
renderMessagePreview: d,
|
|
2798
2824
|
viewerLanguage: m
|
|
2799
2825
|
}) => {
|
|
2800
|
-
const g =
|
|
2826
|
+
const g = j.useRef(0);
|
|
2801
2827
|
g.current++;
|
|
2802
|
-
const { debug: u = !1 } = Xe(), f =
|
|
2803
|
-
(
|
|
2804
|
-
for (const
|
|
2805
|
-
|
|
2806
|
-
return r ? r(
|
|
2828
|
+
const { debug: u = !1 } = Xe(), f = j.useCallback(
|
|
2829
|
+
(b) => {
|
|
2830
|
+
for (const _ of b)
|
|
2831
|
+
Qa(_);
|
|
2832
|
+
return r ? r(b) : b;
|
|
2807
2833
|
},
|
|
2808
2834
|
[r]
|
|
2809
2835
|
);
|
|
@@ -2812,7 +2838,7 @@ const ir = { last_message_at: -1 }, or = U.memo(
|
|
|
2812
2838
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
2813
2839
|
filters: s
|
|
2814
2840
|
});
|
|
2815
|
-
const c =
|
|
2841
|
+
const c = j.useMemo(
|
|
2816
2842
|
() => ({
|
|
2817
2843
|
selectedChannel: t,
|
|
2818
2844
|
onChannelSelect: e,
|
|
@@ -2831,11 +2857,11 @@ const ir = { last_message_at: -1 }, or = U.memo(
|
|
|
2831
2857
|
return /* @__PURE__ */ n(
|
|
2832
2858
|
"div",
|
|
2833
2859
|
{
|
|
2834
|
-
className:
|
|
2860
|
+
className: N(
|
|
2835
2861
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2836
2862
|
o
|
|
2837
2863
|
),
|
|
2838
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
2864
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: c, children: /* @__PURE__ */ n(
|
|
2839
2865
|
us,
|
|
2840
2866
|
{
|
|
2841
2867
|
filters: s,
|
|
@@ -2853,26 +2879,26 @@ const ir = { last_message_at: -1 }, or = U.memo(
|
|
|
2853
2879
|
);
|
|
2854
2880
|
}
|
|
2855
2881
|
);
|
|
2856
|
-
|
|
2857
|
-
const
|
|
2882
|
+
rr.displayName = "ChannelList";
|
|
2883
|
+
const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2858
2884
|
function tt(e) {
|
|
2859
2885
|
if (typeof e != "string") return;
|
|
2860
2886
|
const t = e.trim();
|
|
2861
2887
|
if (t === "") return;
|
|
2862
|
-
const s =
|
|
2888
|
+
const s = ir.exec(t);
|
|
2863
2889
|
if (s) {
|
|
2864
2890
|
const a = s[1].toLowerCase();
|
|
2865
|
-
return
|
|
2891
|
+
return or.has(a) ? t : void 0;
|
|
2866
2892
|
}
|
|
2867
2893
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2868
2894
|
}
|
|
2869
|
-
const
|
|
2895
|
+
const lr = {
|
|
2870
2896
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2871
2897
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2872
|
-
},
|
|
2873
|
-
const s =
|
|
2898
|
+
}, cr = ({ variant: e, cta: t }) => {
|
|
2899
|
+
const s = N(
|
|
2874
2900
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2875
|
-
|
|
2901
|
+
lr[e]
|
|
2876
2902
|
), a = tt(t.href);
|
|
2877
2903
|
return a ? /* @__PURE__ */ n(
|
|
2878
2904
|
"a",
|
|
@@ -2899,10 +2925,10 @@ const dr = {
|
|
|
2899
2925
|
children: t.label
|
|
2900
2926
|
}
|
|
2901
2927
|
);
|
|
2902
|
-
},
|
|
2928
|
+
}, dr = {
|
|
2903
2929
|
dark: "text-white",
|
|
2904
2930
|
light: "text-black/90"
|
|
2905
|
-
},
|
|
2931
|
+
}, ur = "text-white/30", mr = {
|
|
2906
2932
|
dark: "text-white/55",
|
|
2907
2933
|
light: "text-black/55"
|
|
2908
2934
|
}, nt = ({
|
|
@@ -2915,14 +2941,14 @@ const dr = {
|
|
|
2915
2941
|
cta: o,
|
|
2916
2942
|
trailingAction: l
|
|
2917
2943
|
}) => {
|
|
2918
|
-
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 !== "",
|
|
2919
|
-
if (!g && !u && !c && !
|
|
2920
|
-
const
|
|
2944
|
+
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
|
+
if (!g && !u && !c && !b) return null;
|
|
2946
|
+
const v = N(
|
|
2921
2947
|
"truncate text-base font-medium leading-6",
|
|
2922
|
-
d && !t ?
|
|
2923
|
-
),
|
|
2948
|
+
d && !t ? ur : dr[e]
|
|
2949
|
+
), p = N(
|
|
2924
2950
|
"truncate text-xs leading-4",
|
|
2925
|
-
|
|
2951
|
+
mr[e]
|
|
2926
2952
|
);
|
|
2927
2953
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2928
2954
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2930,17 +2956,17 @@ const dr = {
|
|
|
2930
2956
|
/* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2931
2957
|
g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2932
2958
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
2933
|
-
/* @__PURE__ */ n("p", { className:
|
|
2959
|
+
/* @__PURE__ */ n("p", { className: N("min-w-0", v), children: m })
|
|
2934
2960
|
] }),
|
|
2935
|
-
u && /* @__PURE__ */ n("p", { className:
|
|
2961
|
+
u && /* @__PURE__ */ n("p", { className: p, children: a })
|
|
2936
2962
|
] }),
|
|
2937
|
-
!
|
|
2963
|
+
!b && c && /* @__PURE__ */ n("p", { className: p, children: f })
|
|
2938
2964
|
] }),
|
|
2939
2965
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2940
2966
|
] }),
|
|
2941
|
-
o && /* @__PURE__ */ n(
|
|
2967
|
+
o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
|
|
2942
2968
|
] });
|
|
2943
|
-
},
|
|
2969
|
+
}, hr = N(
|
|
2944
2970
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2945
2971
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2946
2972
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2958,8 +2984,8 @@ const dr = {
|
|
|
2958
2984
|
bgClassName: l,
|
|
2959
2985
|
"data-testid": d
|
|
2960
2986
|
}) => {
|
|
2961
|
-
const m = s != null || a != null, g =
|
|
2962
|
-
|
|
2987
|
+
const m = s != null || a != null, g = N(
|
|
2988
|
+
hr,
|
|
2963
2989
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2964
2990
|
// `focus-ring` is a design-system utility from the component-library
|
|
2965
2991
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2989,7 +3015,7 @@ const dr = {
|
|
|
2989
3015
|
onClick: a,
|
|
2990
3016
|
"aria-label": r,
|
|
2991
3017
|
"data-testid": d,
|
|
2992
|
-
className:
|
|
3018
|
+
className: N(g, "text-left"),
|
|
2993
3019
|
children: [
|
|
2994
3020
|
t,
|
|
2995
3021
|
u
|
|
@@ -3007,15 +3033,15 @@ const dr = {
|
|
|
3007
3033
|
]
|
|
3008
3034
|
}
|
|
3009
3035
|
);
|
|
3010
|
-
},
|
|
3036
|
+
}, fr = {
|
|
3011
3037
|
dark: "bg-white/10",
|
|
3012
3038
|
light: "bg-black/5"
|
|
3013
|
-
},
|
|
3039
|
+
}, gr = {
|
|
3014
3040
|
dark: "size-16 text-white/25",
|
|
3015
3041
|
light: "size-16 text-black/25"
|
|
3016
|
-
}, Re = (e, t) => !!t && !!e &&
|
|
3042
|
+
}, Re = (e, t) => !!t && !!e && re(e) === "audio", fn = (e, t) => {
|
|
3017
3043
|
if (!t || !e) return !1;
|
|
3018
|
-
const s =
|
|
3044
|
+
const s = re(e);
|
|
3019
3045
|
return s === "video" || s === "audio";
|
|
3020
3046
|
}, st = "bg-[#F2F3F4]", Te = ({
|
|
3021
3047
|
variant: e,
|
|
@@ -3026,7 +3052,7 @@ const dr = {
|
|
|
3026
3052
|
topLeft: i,
|
|
3027
3053
|
topRight: o
|
|
3028
3054
|
}) => {
|
|
3029
|
-
const l =
|
|
3055
|
+
const l = re(r), d = !!s && l === "video";
|
|
3030
3056
|
return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3031
3057
|
"audio",
|
|
3032
3058
|
{
|
|
@@ -3039,7 +3065,7 @@ const dr = {
|
|
|
3039
3065
|
) }) : /* @__PURE__ */ h(
|
|
3040
3066
|
"div",
|
|
3041
3067
|
{
|
|
3042
|
-
className:
|
|
3068
|
+
className: N(
|
|
3043
3069
|
"relative h-[180px] w-full overflow-hidden",
|
|
3044
3070
|
d && "bg-black"
|
|
3045
3071
|
),
|
|
@@ -3066,12 +3092,12 @@ const dr = {
|
|
|
3066
3092
|
) : /* @__PURE__ */ n(
|
|
3067
3093
|
"div",
|
|
3068
3094
|
{
|
|
3069
|
-
className:
|
|
3095
|
+
className: N(
|
|
3070
3096
|
"flex h-full w-full items-center justify-center",
|
|
3071
|
-
|
|
3097
|
+
fr[e]
|
|
3072
3098
|
),
|
|
3073
3099
|
children: le(r, {
|
|
3074
|
-
className:
|
|
3100
|
+
className: gr[e],
|
|
3075
3101
|
weight: "regular"
|
|
3076
3102
|
})
|
|
3077
3103
|
}
|
|
@@ -3081,7 +3107,7 @@ const dr = {
|
|
|
3081
3107
|
]
|
|
3082
3108
|
}
|
|
3083
3109
|
);
|
|
3084
|
-
},
|
|
3110
|
+
}, br = ({
|
|
3085
3111
|
title: e,
|
|
3086
3112
|
placeholderTitle: t,
|
|
3087
3113
|
description: s,
|
|
@@ -3095,7 +3121,7 @@ const dr = {
|
|
|
3095
3121
|
onDismiss: g,
|
|
3096
3122
|
onEditClick: u
|
|
3097
3123
|
}) => {
|
|
3098
|
-
const f = l === "classic", c = Re(r, o),
|
|
3124
|
+
const f = l === "classic", c = Re(r, o), b = g ? /* @__PURE__ */ n(
|
|
3099
3125
|
"button",
|
|
3100
3126
|
{
|
|
3101
3127
|
type: "button",
|
|
@@ -3104,14 +3130,14 @@ const dr = {
|
|
|
3104
3130
|
className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
|
|
3105
3131
|
children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
|
|
3106
3132
|
}
|
|
3107
|
-
) : void 0,
|
|
3133
|
+
) : void 0, _ = u ? /* @__PURE__ */ n(
|
|
3108
3134
|
"button",
|
|
3109
3135
|
{
|
|
3110
3136
|
type: "button",
|
|
3111
3137
|
onClick: u,
|
|
3112
3138
|
"aria-label": "Edit attachment",
|
|
3113
3139
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3114
|
-
children: /* @__PURE__ */ n(
|
|
3140
|
+
children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
|
|
3115
3141
|
}
|
|
3116
3142
|
) : void 0;
|
|
3117
3143
|
return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: st, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3124,12 +3150,12 @@ const dr = {
|
|
|
3124
3150
|
mimeType: r
|
|
3125
3151
|
}
|
|
3126
3152
|
) }),
|
|
3127
|
-
|
|
3153
|
+
b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
|
|
3128
3154
|
] }) }) : /* @__PURE__ */ h(
|
|
3129
3155
|
Ie,
|
|
3130
3156
|
{
|
|
3131
3157
|
variant: "dark",
|
|
3132
|
-
topRight: f ?
|
|
3158
|
+
topRight: f ? b : void 0,
|
|
3133
3159
|
children: [
|
|
3134
3160
|
!f && /* @__PURE__ */ n(
|
|
3135
3161
|
Te,
|
|
@@ -3139,7 +3165,7 @@ const dr = {
|
|
|
3139
3165
|
sourceUrl: o,
|
|
3140
3166
|
title: e,
|
|
3141
3167
|
mimeType: r,
|
|
3142
|
-
topRight:
|
|
3168
|
+
topRight: b
|
|
3143
3169
|
}
|
|
3144
3170
|
),
|
|
3145
3171
|
/* @__PURE__ */ n(
|
|
@@ -3152,13 +3178,13 @@ const dr = {
|
|
|
3152
3178
|
url: a,
|
|
3153
3179
|
appIcon: d,
|
|
3154
3180
|
cta: m,
|
|
3155
|
-
trailingAction:
|
|
3181
|
+
trailingAction: _
|
|
3156
3182
|
}
|
|
3157
3183
|
)
|
|
3158
3184
|
]
|
|
3159
3185
|
}
|
|
3160
3186
|
);
|
|
3161
|
-
},
|
|
3187
|
+
}, pr = ({
|
|
3162
3188
|
title: e,
|
|
3163
3189
|
description: t,
|
|
3164
3190
|
url: s,
|
|
@@ -3170,11 +3196,11 @@ const dr = {
|
|
|
3170
3196
|
cta: d,
|
|
3171
3197
|
onClick: m
|
|
3172
3198
|
}) => {
|
|
3173
|
-
const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0,
|
|
3199
|
+
const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Re(a, i) ? st : void 0, _ = d && m ? {
|
|
3174
3200
|
...d,
|
|
3175
3201
|
onClick: () => {
|
|
3176
|
-
var
|
|
3177
|
-
m(), (
|
|
3202
|
+
var v;
|
|
3203
|
+
m(), (v = d.onClick) == null || v.call(d);
|
|
3178
3204
|
}
|
|
3179
3205
|
} : d;
|
|
3180
3206
|
return /* @__PURE__ */ h(
|
|
@@ -3184,7 +3210,7 @@ const dr = {
|
|
|
3184
3210
|
href: f,
|
|
3185
3211
|
onClick: c,
|
|
3186
3212
|
ariaLabel: e ?? "Open attachment preview",
|
|
3187
|
-
bgClassName:
|
|
3213
|
+
bgClassName: b,
|
|
3188
3214
|
"data-testid": "link-attachment",
|
|
3189
3215
|
children: [
|
|
3190
3216
|
o === "featured" && /* @__PURE__ */ n(
|
|
@@ -3205,13 +3231,13 @@ const dr = {
|
|
|
3205
3231
|
description: t,
|
|
3206
3232
|
url: s,
|
|
3207
3233
|
appIcon: l,
|
|
3208
|
-
cta:
|
|
3234
|
+
cta: _
|
|
3209
3235
|
}
|
|
3210
3236
|
)
|
|
3211
3237
|
]
|
|
3212
3238
|
}
|
|
3213
3239
|
);
|
|
3214
|
-
},
|
|
3240
|
+
}, vr = ({
|
|
3215
3241
|
title: e,
|
|
3216
3242
|
placeholderTitle: t,
|
|
3217
3243
|
description: s,
|
|
@@ -3224,13 +3250,13 @@ const dr = {
|
|
|
3224
3250
|
cta: m,
|
|
3225
3251
|
onClick: g
|
|
3226
3252
|
}) => {
|
|
3227
|
-
const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0,
|
|
3253
|
+
const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
|
|
3228
3254
|
return /* @__PURE__ */ h(
|
|
3229
3255
|
Ie,
|
|
3230
3256
|
{
|
|
3231
3257
|
variant: "dark",
|
|
3232
3258
|
href: c,
|
|
3233
|
-
onClick:
|
|
3259
|
+
onClick: b,
|
|
3234
3260
|
bgClassName: Re(r, o) ? st : void 0,
|
|
3235
3261
|
children: [
|
|
3236
3262
|
l === "featured" && /* @__PURE__ */ n(
|
|
@@ -3258,20 +3284,20 @@ const dr = {
|
|
|
3258
3284
|
]
|
|
3259
3285
|
}
|
|
3260
3286
|
);
|
|
3261
|
-
},
|
|
3262
|
-
Composer:
|
|
3263
|
-
Sent:
|
|
3264
|
-
Received:
|
|
3265
|
-
},
|
|
3287
|
+
}, Ei = {
|
|
3288
|
+
Composer: br,
|
|
3289
|
+
Sent: vr,
|
|
3290
|
+
Received: pr
|
|
3291
|
+
}, xr = {
|
|
3266
3292
|
dark: "bg-[#121110]",
|
|
3267
3293
|
light: "bg-[#e9eaed]"
|
|
3268
|
-
},
|
|
3294
|
+
}, wr = {
|
|
3269
3295
|
dark: "text-white",
|
|
3270
3296
|
light: "text-[#080707]"
|
|
3271
|
-
},
|
|
3297
|
+
}, _r = {
|
|
3272
3298
|
dark: "border-white/[0.08]",
|
|
3273
3299
|
light: "border-black/[0.08]"
|
|
3274
|
-
},
|
|
3300
|
+
}, Nr = (e) => e === "dark" ? "sender" : "receiver", yr = {
|
|
3275
3301
|
sender: {
|
|
3276
3302
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3277
3303
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3293,13 +3319,13 @@ const dr = {
|
|
|
3293
3319
|
children: i,
|
|
3294
3320
|
"data-testid": o
|
|
3295
3321
|
}) => {
|
|
3296
|
-
const l = t != null && t !== "", d =
|
|
3322
|
+
const l = t != null && t !== "", d = yr[Nr(e)][a];
|
|
3297
3323
|
return /* @__PURE__ */ h(
|
|
3298
3324
|
"div",
|
|
3299
3325
|
{
|
|
3300
3326
|
"data-testid": o,
|
|
3301
3327
|
"data-group-position": a,
|
|
3302
|
-
className:
|
|
3328
|
+
className: N(
|
|
3303
3329
|
// 280px-wide bubble — matches the mobile chat attachment width
|
|
3304
3330
|
// and keeps the document / image / audio bubbles visually
|
|
3305
3331
|
// consistent inside the conversation timeline. The 8px / 16px
|
|
@@ -3308,10 +3334,10 @@ const dr = {
|
|
|
3308
3334
|
// as the surrounding `CustomMessage` text bubbles.
|
|
3309
3335
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
3310
3336
|
d,
|
|
3311
|
-
|
|
3312
|
-
|
|
3337
|
+
xr[e],
|
|
3338
|
+
wr[e],
|
|
3313
3339
|
s && "border",
|
|
3314
|
-
s &&
|
|
3340
|
+
s && _r[e],
|
|
3315
3341
|
r
|
|
3316
3342
|
),
|
|
3317
3343
|
children: [
|
|
@@ -3319,7 +3345,7 @@ const dr = {
|
|
|
3319
3345
|
l ? /* @__PURE__ */ n(
|
|
3320
3346
|
"p",
|
|
3321
3347
|
{
|
|
3322
|
-
className:
|
|
3348
|
+
className: N(
|
|
3323
3349
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
3324
3350
|
// the same font family + size as `.str-chat__message-text`
|
|
3325
3351
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -3348,22 +3374,22 @@ const dr = {
|
|
|
3348
3374
|
a.stopPropagation(), e();
|
|
3349
3375
|
},
|
|
3350
3376
|
"aria-label": s,
|
|
3351
|
-
className:
|
|
3377
|
+
className: N(
|
|
3352
3378
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
3353
3379
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
3354
3380
|
),
|
|
3355
3381
|
children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
|
|
3356
3382
|
}
|
|
3357
|
-
), Ne = (e) => e === "received" ? "light" : "dark",
|
|
3383
|
+
), Ne = (e) => e === "received" ? "light" : "dark", Si = ({
|
|
3358
3384
|
firstOfGroup: e,
|
|
3359
3385
|
endOfGroup: t,
|
|
3360
3386
|
groupedByUser: s
|
|
3361
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3387
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Cr = ({
|
|
3362
3388
|
src: e,
|
|
3363
3389
|
mimeType: t,
|
|
3364
3390
|
filename: s,
|
|
3365
3391
|
items: a
|
|
3366
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
3392
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], kr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3367
3393
|
/* @__PURE__ */ n(
|
|
3368
3394
|
"audio",
|
|
3369
3395
|
{
|
|
@@ -3386,7 +3412,7 @@ const dr = {
|
|
|
3386
3412
|
preload: l,
|
|
3387
3413
|
onDismiss: d
|
|
3388
3414
|
}) => {
|
|
3389
|
-
const m = Ne(e), g = e === "composer" && !!d, u =
|
|
3415
|
+
const m = Ne(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
|
|
3390
3416
|
if (u.length === 0)
|
|
3391
3417
|
return null;
|
|
3392
3418
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3397,30 +3423,30 @@ const dr = {
|
|
|
3397
3423
|
text: i,
|
|
3398
3424
|
groupPosition: o,
|
|
3399
3425
|
"data-testid": "audio-attachment",
|
|
3400
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c,
|
|
3401
|
-
|
|
3426
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
|
|
3427
|
+
kr,
|
|
3402
3428
|
{
|
|
3403
3429
|
item: c,
|
|
3404
3430
|
preload: f,
|
|
3405
3431
|
trailingAction: (
|
|
3406
3432
|
// Composer only supports a single attachment, so the
|
|
3407
3433
|
// dismiss control sits on the only player.
|
|
3408
|
-
g &&
|
|
3434
|
+
g && b === 0 ? /* @__PURE__ */ n(_e, { onClick: d, variant: "inline" }) : void 0
|
|
3409
3435
|
)
|
|
3410
3436
|
},
|
|
3411
|
-
`${c.src}-${
|
|
3437
|
+
`${c.src}-${b}`
|
|
3412
3438
|
)) })
|
|
3413
3439
|
}
|
|
3414
3440
|
);
|
|
3415
|
-
},
|
|
3416
|
-
Composer:
|
|
3417
|
-
Sent:
|
|
3418
|
-
Received:
|
|
3441
|
+
}, Er = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Tr = {
|
|
3442
|
+
Composer: Er,
|
|
3443
|
+
Sent: Sr,
|
|
3444
|
+
Received: Ir
|
|
3419
3445
|
};
|
|
3420
|
-
function
|
|
3446
|
+
function Ar(e) {
|
|
3421
3447
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
3422
3448
|
}
|
|
3423
|
-
const
|
|
3449
|
+
const Mr = {
|
|
3424
3450
|
pdf: "PDF",
|
|
3425
3451
|
doc: "DOC",
|
|
3426
3452
|
xls: "XLS",
|
|
@@ -3430,7 +3456,7 @@ const Lr = {
|
|
|
3430
3456
|
text: "TXT",
|
|
3431
3457
|
markdown: "MD"
|
|
3432
3458
|
};
|
|
3433
|
-
function
|
|
3459
|
+
function Rr(e, t) {
|
|
3434
3460
|
if (t) {
|
|
3435
3461
|
const r = t.lastIndexOf(".");
|
|
3436
3462
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -3439,8 +3465,8 @@ function Dr(e, t) {
|
|
|
3439
3465
|
}
|
|
3440
3466
|
}
|
|
3441
3467
|
if (!e) return;
|
|
3442
|
-
if (
|
|
3443
|
-
const r = Qt(e), i =
|
|
3468
|
+
if (re(e) === "document") {
|
|
3469
|
+
const r = Qt(e), i = Mr[r];
|
|
3444
3470
|
if (i) return i;
|
|
3445
3471
|
if (e === "application/octet-stream") return;
|
|
3446
3472
|
}
|
|
@@ -3448,11 +3474,11 @@ function Dr(e, t) {
|
|
|
3448
3474
|
if (!(!a || a === "*"))
|
|
3449
3475
|
return a.toUpperCase();
|
|
3450
3476
|
}
|
|
3451
|
-
function
|
|
3452
|
-
const a =
|
|
3477
|
+
function Lr(e, t, s) {
|
|
3478
|
+
const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
|
|
3453
3479
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3454
3480
|
}
|
|
3455
|
-
function
|
|
3481
|
+
function ne(e) {
|
|
3456
3482
|
try {
|
|
3457
3483
|
const s = new URL(e).pathname.split("/").pop();
|
|
3458
3484
|
return s && s.length > 0 ? decodeURIComponent(s) : "download";
|
|
@@ -3460,13 +3486,13 @@ function ee(e) {
|
|
|
3460
3486
|
return "download";
|
|
3461
3487
|
}
|
|
3462
3488
|
}
|
|
3463
|
-
const
|
|
3489
|
+
const Dr = {
|
|
3464
3490
|
dark: "text-white/55",
|
|
3465
3491
|
light: "text-black/65"
|
|
3466
|
-
},
|
|
3492
|
+
}, Or = {
|
|
3467
3493
|
dark: "bg-white/10",
|
|
3468
3494
|
light: "bg-black/5"
|
|
3469
|
-
},
|
|
3495
|
+
}, Pr = {
|
|
3470
3496
|
dark: "text-white/85",
|
|
3471
3497
|
light: "text-black/85"
|
|
3472
3498
|
}, gn = ({
|
|
@@ -3479,16 +3505,16 @@ const Or = {
|
|
|
3479
3505
|
activateLabel: o,
|
|
3480
3506
|
trailingAction: l
|
|
3481
3507
|
}) => {
|
|
3482
|
-
const d = s ?? t ?? "File", m =
|
|
3508
|
+
const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
|
|
3483
3509
|
"div",
|
|
3484
3510
|
{
|
|
3485
|
-
className:
|
|
3511
|
+
className: N(
|
|
3486
3512
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3487
|
-
|
|
3513
|
+
Or[e]
|
|
3488
3514
|
),
|
|
3489
3515
|
"aria-hidden": !0,
|
|
3490
3516
|
children: le(a, {
|
|
3491
|
-
className:
|
|
3517
|
+
className: N("size-6", Pr[e]),
|
|
3492
3518
|
weight: "regular"
|
|
3493
3519
|
})
|
|
3494
3520
|
}
|
|
@@ -3497,9 +3523,9 @@ const Or = {
|
|
|
3497
3523
|
m ? /* @__PURE__ */ n(
|
|
3498
3524
|
"p",
|
|
3499
3525
|
{
|
|
3500
|
-
className:
|
|
3526
|
+
className: N(
|
|
3501
3527
|
"truncate text-xs leading-4",
|
|
3502
|
-
|
|
3528
|
+
Dr[e]
|
|
3503
3529
|
),
|
|
3504
3530
|
children: m
|
|
3505
3531
|
}
|
|
@@ -3510,7 +3536,7 @@ const Or = {
|
|
|
3510
3536
|
type: "button",
|
|
3511
3537
|
onClick: i,
|
|
3512
3538
|
"aria-label": o,
|
|
3513
|
-
className:
|
|
3539
|
+
className: N(
|
|
3514
3540
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
3515
3541
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
3516
3542
|
),
|
|
@@ -3519,7 +3545,7 @@ const Or = {
|
|
|
3519
3545
|
u
|
|
3520
3546
|
]
|
|
3521
3547
|
}
|
|
3522
|
-
) : /* @__PURE__ */ h(
|
|
3548
|
+
) : /* @__PURE__ */ h(ae, { children: [
|
|
3523
3549
|
g,
|
|
3524
3550
|
u
|
|
3525
3551
|
] });
|
|
@@ -3529,7 +3555,7 @@ const Or = {
|
|
|
3529
3555
|
] });
|
|
3530
3556
|
};
|
|
3531
3557
|
async function bn(e, t) {
|
|
3532
|
-
const s = t ??
|
|
3558
|
+
const s = t ?? ne(e);
|
|
3533
3559
|
try {
|
|
3534
3560
|
const a = await fetch(e, { mode: "cors" });
|
|
3535
3561
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
@@ -3542,21 +3568,21 @@ async function bn(e, t) {
|
|
|
3542
3568
|
}
|
|
3543
3569
|
}
|
|
3544
3570
|
}
|
|
3545
|
-
const
|
|
3571
|
+
const zr = ({
|
|
3546
3572
|
src: e,
|
|
3547
3573
|
filename: t,
|
|
3548
3574
|
fileSize: s,
|
|
3549
3575
|
mimeType: a,
|
|
3550
3576
|
title: r,
|
|
3551
3577
|
items: i
|
|
3552
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
3578
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], $r = ({
|
|
3553
3579
|
variant: e,
|
|
3554
3580
|
item: t,
|
|
3555
3581
|
index: s,
|
|
3556
3582
|
onActivate: a,
|
|
3557
3583
|
trailingAction: r
|
|
3558
3584
|
}) => {
|
|
3559
|
-
const i = t.filename ??
|
|
3585
|
+
const i = t.filename ?? ne(t.src);
|
|
3560
3586
|
return /* @__PURE__ */ n(
|
|
3561
3587
|
gn,
|
|
3562
3588
|
{
|
|
@@ -3583,26 +3609,26 @@ const Fr = ({
|
|
|
3583
3609
|
onClick: m,
|
|
3584
3610
|
onDismiss: g
|
|
3585
3611
|
}) => {
|
|
3586
|
-
const u = Ne(e), f = e === "composer" && !!g, c =
|
|
3612
|
+
const u = Ne(e), f = e === "composer" && !!g, c = zr({
|
|
3587
3613
|
src: t,
|
|
3588
3614
|
filename: s,
|
|
3589
3615
|
fileSize: a,
|
|
3590
3616
|
mimeType: r,
|
|
3591
3617
|
title: i,
|
|
3592
3618
|
items: o
|
|
3593
|
-
}),
|
|
3594
|
-
if ((m == null ? void 0 : m(
|
|
3595
|
-
const
|
|
3596
|
-
if (!
|
|
3597
|
-
const
|
|
3598
|
-
bn(
|
|
3619
|
+
}), b = (v) => {
|
|
3620
|
+
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
3621
|
+
const p = c[v];
|
|
3622
|
+
if (!p) return;
|
|
3623
|
+
const x = p.filename ?? ne(p.src);
|
|
3624
|
+
bn(p.src, x);
|
|
3599
3625
|
};
|
|
3600
3626
|
if (c.length === 0)
|
|
3601
3627
|
return null;
|
|
3602
|
-
const
|
|
3628
|
+
const _ = /* @__PURE__ */ n(
|
|
3603
3629
|
"span",
|
|
3604
3630
|
{
|
|
3605
|
-
className:
|
|
3631
|
+
className: N(
|
|
3606
3632
|
"flex size-8 items-center justify-center rounded-full",
|
|
3607
3633
|
u === "dark" ? "text-white/70" : "text-black/70"
|
|
3608
3634
|
),
|
|
@@ -3617,29 +3643,29 @@ const Fr = ({
|
|
|
3617
3643
|
text: l,
|
|
3618
3644
|
groupPosition: d,
|
|
3619
3645
|
"data-testid": "file-attachment",
|
|
3620
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((
|
|
3621
|
-
|
|
3646
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
|
|
3647
|
+
$r,
|
|
3622
3648
|
{
|
|
3623
3649
|
variant: u,
|
|
3624
|
-
item:
|
|
3625
|
-
index:
|
|
3626
|
-
onActivate:
|
|
3627
|
-
trailingAction: f &&
|
|
3650
|
+
item: v,
|
|
3651
|
+
index: p,
|
|
3652
|
+
onActivate: b,
|
|
3653
|
+
trailingAction: f && p === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : _
|
|
3628
3654
|
},
|
|
3629
|
-
`${
|
|
3655
|
+
`${v.src}-${p}`
|
|
3630
3656
|
)) })
|
|
3631
3657
|
}
|
|
3632
3658
|
);
|
|
3633
|
-
},
|
|
3634
|
-
Composer:
|
|
3635
|
-
Sent:
|
|
3636
|
-
Received:
|
|
3659
|
+
}, Fr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(rt, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(rt, { ...e, state: "received" }), jr = {
|
|
3660
|
+
Composer: Fr,
|
|
3661
|
+
Sent: Br,
|
|
3662
|
+
Received: Ur
|
|
3637
3663
|
}, it = ({
|
|
3638
3664
|
onPrev: e,
|
|
3639
3665
|
onNext: t,
|
|
3640
3666
|
prevLabel: s = "Previous",
|
|
3641
3667
|
nextLabel: a = "Next"
|
|
3642
|
-
}) => /* @__PURE__ */ h(
|
|
3668
|
+
}) => /* @__PURE__ */ h(ae, { children: [
|
|
3643
3669
|
/* @__PURE__ */ n(
|
|
3644
3670
|
"button",
|
|
3645
3671
|
{
|
|
@@ -3647,7 +3673,7 @@ const Fr = ({
|
|
|
3647
3673
|
onClick: e,
|
|
3648
3674
|
"aria-label": s,
|
|
3649
3675
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3650
|
-
children: /* @__PURE__ */ n(
|
|
3676
|
+
children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3651
3677
|
}
|
|
3652
3678
|
),
|
|
3653
3679
|
/* @__PURE__ */ n(
|
|
@@ -3657,7 +3683,7 @@ const Fr = ({
|
|
|
3657
3683
|
onClick: t,
|
|
3658
3684
|
"aria-label": a,
|
|
3659
3685
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3660
|
-
children: /* @__PURE__ */ n(
|
|
3686
|
+
children: /* @__PURE__ */ n(Ve, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3661
3687
|
}
|
|
3662
3688
|
)
|
|
3663
3689
|
] }), pn = ({
|
|
@@ -3669,7 +3695,7 @@ const Fr = ({
|
|
|
3669
3695
|
tone: i = "dark",
|
|
3670
3696
|
onTriggered: o
|
|
3671
3697
|
}) => {
|
|
3672
|
-
const [l, d] =
|
|
3698
|
+
const [l, d] = $(!1), m = K(
|
|
3673
3699
|
(c) => {
|
|
3674
3700
|
c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
|
|
3675
3701
|
}).finally(() => {
|
|
@@ -3677,7 +3703,7 @@ const Fr = ({
|
|
|
3677
3703
|
}));
|
|
3678
3704
|
},
|
|
3679
3705
|
[l, e, t, o]
|
|
3680
|
-
), g = r ?? s !== "pill", f = { className:
|
|
3706
|
+
), g = r ?? s !== "pill", f = { className: N(
|
|
3681
3707
|
s === "pill" ? "size-4" : "size-5",
|
|
3682
3708
|
"shrink-0"
|
|
3683
3709
|
), weight: "bold" };
|
|
@@ -3688,7 +3714,7 @@ const Fr = ({
|
|
|
3688
3714
|
onClick: m,
|
|
3689
3715
|
disabled: l,
|
|
3690
3716
|
"aria-label": a,
|
|
3691
|
-
className:
|
|
3717
|
+
className: N(
|
|
3692
3718
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
3693
3719
|
{
|
|
3694
3720
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
@@ -3728,7 +3754,7 @@ const Fr = ({
|
|
|
3728
3754
|
onClick: m,
|
|
3729
3755
|
disabled: l,
|
|
3730
3756
|
"aria-label": g ? a : void 0,
|
|
3731
|
-
className:
|
|
3757
|
+
className: N(
|
|
3732
3758
|
"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",
|
|
3733
3759
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
3734
3760
|
),
|
|
@@ -3750,15 +3776,15 @@ const Fr = ({
|
|
|
3750
3776
|
initialIndex: t,
|
|
3751
3777
|
open: s
|
|
3752
3778
|
}) => {
|
|
3753
|
-
const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] =
|
|
3779
|
+
const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
|
|
3754
3780
|
X(() => {
|
|
3755
3781
|
s && i(Fe(t, 0, Math.max(e - 1, 0)));
|
|
3756
3782
|
}, [s, t, e]), X(() => {
|
|
3757
3783
|
i((d) => Fe(d, 0, Math.max(e - 1, 0)));
|
|
3758
3784
|
}, [e]);
|
|
3759
|
-
const o =
|
|
3785
|
+
const o = K(() => {
|
|
3760
3786
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
3761
|
-
}, [e]), l =
|
|
3787
|
+
}, [e]), l = K(() => {
|
|
3762
3788
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
3763
3789
|
}, [e]);
|
|
3764
3790
|
return X(() => {
|
|
@@ -3870,8 +3896,8 @@ const Fr = ({
|
|
|
3870
3896
|
length: t.length,
|
|
3871
3897
|
initialIndex: s,
|
|
3872
3898
|
open: e
|
|
3873
|
-
}), l = t[r], d =
|
|
3874
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
3899
|
+
}), l = t[r], d = se(
|
|
3900
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "image"),
|
|
3875
3901
|
[l]
|
|
3876
3902
|
);
|
|
3877
3903
|
return l ? /* @__PURE__ */ h(
|
|
@@ -3916,7 +3942,7 @@ const Fr = ({
|
|
|
3916
3942
|
]
|
|
3917
3943
|
}
|
|
3918
3944
|
) : null;
|
|
3919
|
-
},
|
|
3945
|
+
}, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", xn = ({
|
|
3920
3946
|
tiles: e,
|
|
3921
3947
|
onTileActivate: t,
|
|
3922
3948
|
maxVisible: s = 4,
|
|
@@ -3925,14 +3951,14 @@ const Fr = ({
|
|
|
3925
3951
|
const r = e.length;
|
|
3926
3952
|
if (r === 0) return null;
|
|
3927
3953
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
|
|
3928
|
-
const u =
|
|
3954
|
+
const u = N(Vr, "h-full w-full");
|
|
3929
3955
|
return t ? /* @__PURE__ */ h(
|
|
3930
3956
|
"button",
|
|
3931
3957
|
{
|
|
3932
3958
|
type: "button",
|
|
3933
3959
|
onClick: () => t(m),
|
|
3934
3960
|
"aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
|
|
3935
|
-
className:
|
|
3961
|
+
className: N(u, "cursor-zoom-in"),
|
|
3936
3962
|
children: [
|
|
3937
3963
|
d.content,
|
|
3938
3964
|
g
|
|
@@ -3944,10 +3970,10 @@ const Fr = ({
|
|
|
3944
3970
|
g
|
|
3945
3971
|
] }, m);
|
|
3946
3972
|
};
|
|
3947
|
-
return i.length === 1 ? /* @__PURE__ */ n("div", { className:
|
|
3973
|
+
return i.length === 1 ? /* @__PURE__ */ n("div", { className: N("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
|
|
3948
3974
|
"div",
|
|
3949
3975
|
{
|
|
3950
|
-
className:
|
|
3976
|
+
className: N(
|
|
3951
3977
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
3952
3978
|
a
|
|
3953
3979
|
),
|
|
@@ -3956,7 +3982,7 @@ const Fr = ({
|
|
|
3956
3982
|
) : i.length === 3 ? /* @__PURE__ */ h(
|
|
3957
3983
|
"div",
|
|
3958
3984
|
{
|
|
3959
|
-
className:
|
|
3985
|
+
className: N(
|
|
3960
3986
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3961
3987
|
a
|
|
3962
3988
|
),
|
|
@@ -3969,7 +3995,7 @@ const Fr = ({
|
|
|
3969
3995
|
) : /* @__PURE__ */ n(
|
|
3970
3996
|
"div",
|
|
3971
3997
|
{
|
|
3972
|
-
className:
|
|
3998
|
+
className: N(
|
|
3973
3999
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3974
4000
|
a
|
|
3975
4001
|
),
|
|
@@ -3987,14 +4013,14 @@ const Fr = ({
|
|
|
3987
4013
|
}
|
|
3988
4014
|
);
|
|
3989
4015
|
}, ye = (e) => {
|
|
3990
|
-
const [t, s] =
|
|
4016
|
+
const [t, s] = $(!1), [a, r] = $(0), i = K(
|
|
3991
4017
|
(l) => {
|
|
3992
4018
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
3993
4019
|
},
|
|
3994
4020
|
[e]
|
|
3995
|
-
), o =
|
|
4021
|
+
), o = K(() => s(!1), []);
|
|
3996
4022
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3997
|
-
},
|
|
4023
|
+
}, Gr = (e, t, s, a) => ({
|
|
3998
4024
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
3999
4025
|
content: /* @__PURE__ */ n(
|
|
4000
4026
|
"img",
|
|
@@ -4009,7 +4035,7 @@ const Fr = ({
|
|
|
4009
4035
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4010
4036
|
}
|
|
4011
4037
|
)
|
|
4012
|
-
}),
|
|
4038
|
+
}), Hr = ({
|
|
4013
4039
|
src: e,
|
|
4014
4040
|
alt: t,
|
|
4015
4041
|
items: s
|
|
@@ -4017,7 +4043,7 @@ const Fr = ({
|
|
|
4017
4043
|
src: s.src,
|
|
4018
4044
|
alt: s.alt,
|
|
4019
4045
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4020
|
-
})),
|
|
4046
|
+
})), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4021
4047
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = ye(
|
|
4022
4048
|
r
|
|
4023
4049
|
);
|
|
@@ -4064,13 +4090,13 @@ const Fr = ({
|
|
|
4064
4090
|
loading: l = "lazy",
|
|
4065
4091
|
onClick: d
|
|
4066
4092
|
}) => {
|
|
4067
|
-
const m =
|
|
4093
|
+
const m = Hr({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = ye(
|
|
4068
4094
|
d
|
|
4069
4095
|
);
|
|
4070
4096
|
if (m.length === 0)
|
|
4071
4097
|
return null;
|
|
4072
|
-
const
|
|
4073
|
-
(
|
|
4098
|
+
const _ = m.map(
|
|
4099
|
+
(v, p) => Gr(v, p, m.length, l)
|
|
4074
4100
|
);
|
|
4075
4101
|
return /* @__PURE__ */ h(
|
|
4076
4102
|
we,
|
|
@@ -4080,24 +4106,24 @@ const Fr = ({
|
|
|
4080
4106
|
groupPosition: o,
|
|
4081
4107
|
"data-testid": "image-attachment",
|
|
4082
4108
|
children: [
|
|
4083
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles:
|
|
4109
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: _, onTileActivate: c }) }),
|
|
4084
4110
|
/* @__PURE__ */ n(
|
|
4085
4111
|
vn,
|
|
4086
4112
|
{
|
|
4087
4113
|
open: u,
|
|
4088
4114
|
items: wn(m, a),
|
|
4089
4115
|
initialIndex: f,
|
|
4090
|
-
onClose:
|
|
4116
|
+
onClose: b
|
|
4091
4117
|
}
|
|
4092
4118
|
)
|
|
4093
4119
|
]
|
|
4094
4120
|
}
|
|
4095
4121
|
);
|
|
4096
|
-
},
|
|
4097
|
-
Composer:
|
|
4098
|
-
Sent:
|
|
4099
|
-
Received:
|
|
4100
|
-
},
|
|
4122
|
+
}, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
|
|
4123
|
+
Composer: qr,
|
|
4124
|
+
Sent: Wr,
|
|
4125
|
+
Received: Xr
|
|
4126
|
+
}, Jr = ({
|
|
4101
4127
|
open: e,
|
|
4102
4128
|
items: t,
|
|
4103
4129
|
initialIndex: s = 0,
|
|
@@ -4107,11 +4133,11 @@ const Fr = ({
|
|
|
4107
4133
|
length: t.length,
|
|
4108
4134
|
initialIndex: s,
|
|
4109
4135
|
open: e
|
|
4110
|
-
}), l = t[r], d =
|
|
4111
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4136
|
+
}), l = t[r], d = se(
|
|
4137
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "document"),
|
|
4112
4138
|
[l]
|
|
4113
|
-
), m =
|
|
4114
|
-
() => l ?
|
|
4139
|
+
), m = se(
|
|
4140
|
+
() => l ? Zr(l.src) : void 0,
|
|
4115
4141
|
[l]
|
|
4116
4142
|
);
|
|
4117
4143
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
@@ -4145,23 +4171,23 @@ const Fr = ({
|
|
|
4145
4171
|
]
|
|
4146
4172
|
}
|
|
4147
4173
|
);
|
|
4148
|
-
},
|
|
4174
|
+
}, Zr = (e) => {
|
|
4149
4175
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
4150
4176
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
4151
|
-
},
|
|
4177
|
+
}, Qr = ({
|
|
4152
4178
|
src: e,
|
|
4153
4179
|
filename: t,
|
|
4154
4180
|
fileSize: s,
|
|
4155
4181
|
title: a,
|
|
4156
4182
|
items: r
|
|
4157
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
4183
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ei = ({
|
|
4158
4184
|
variant: e,
|
|
4159
4185
|
item: t,
|
|
4160
4186
|
index: s,
|
|
4161
4187
|
onActivate: a,
|
|
4162
4188
|
trailingAction: r
|
|
4163
4189
|
}) => {
|
|
4164
|
-
const i = t.filename ??
|
|
4190
|
+
const i = t.filename ?? ne(t.src);
|
|
4165
4191
|
return /* @__PURE__ */ n(
|
|
4166
4192
|
gn,
|
|
4167
4193
|
{
|
|
@@ -4187,14 +4213,14 @@ const Fr = ({
|
|
|
4187
4213
|
onClick: d,
|
|
4188
4214
|
onDismiss: m
|
|
4189
4215
|
}) => {
|
|
4190
|
-
const g = Ne(e), u =
|
|
4216
|
+
const g = Ne(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ye(
|
|
4191
4217
|
d
|
|
4192
|
-
),
|
|
4218
|
+
), v = e === "composer" && !!m;
|
|
4193
4219
|
if (u.length === 0)
|
|
4194
4220
|
return null;
|
|
4195
|
-
const
|
|
4196
|
-
src:
|
|
4197
|
-
filename:
|
|
4221
|
+
const p = u.map((x) => ({
|
|
4222
|
+
src: x.src,
|
|
4223
|
+
filename: x.filename ?? ne(x.src)
|
|
4198
4224
|
}));
|
|
4199
4225
|
return /* @__PURE__ */ h(
|
|
4200
4226
|
we,
|
|
@@ -4204,45 +4230,45 @@ const Fr = ({
|
|
|
4204
4230
|
groupPosition: l,
|
|
4205
4231
|
"data-testid": "pdf-attachment",
|
|
4206
4232
|
children: [
|
|
4207
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((
|
|
4208
|
-
const
|
|
4233
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, A) => {
|
|
4234
|
+
const M = x.filename ?? ne(x.src), y = v && A === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4209
4235
|
pn,
|
|
4210
4236
|
{
|
|
4211
|
-
url:
|
|
4212
|
-
filename:
|
|
4237
|
+
url: x.src,
|
|
4238
|
+
filename: M,
|
|
4213
4239
|
variant: "inline",
|
|
4214
|
-
label: `Download ${
|
|
4240
|
+
label: `Download ${M}`,
|
|
4215
4241
|
tone: g
|
|
4216
4242
|
}
|
|
4217
4243
|
);
|
|
4218
4244
|
return /* @__PURE__ */ n(
|
|
4219
|
-
|
|
4245
|
+
ei,
|
|
4220
4246
|
{
|
|
4221
4247
|
variant: g,
|
|
4222
|
-
item:
|
|
4223
|
-
index:
|
|
4224
|
-
onActivate:
|
|
4248
|
+
item: x,
|
|
4249
|
+
index: A,
|
|
4250
|
+
onActivate: b,
|
|
4225
4251
|
trailingAction: y
|
|
4226
4252
|
},
|
|
4227
|
-
`${
|
|
4253
|
+
`${x.src}-${A}`
|
|
4228
4254
|
);
|
|
4229
4255
|
}) }),
|
|
4230
4256
|
/* @__PURE__ */ n(
|
|
4231
|
-
|
|
4257
|
+
Jr,
|
|
4232
4258
|
{
|
|
4233
4259
|
open: f,
|
|
4234
|
-
items:
|
|
4260
|
+
items: p,
|
|
4235
4261
|
initialIndex: c,
|
|
4236
|
-
onClose:
|
|
4262
|
+
onClose: _
|
|
4237
4263
|
}
|
|
4238
4264
|
)
|
|
4239
4265
|
]
|
|
4240
4266
|
}
|
|
4241
4267
|
);
|
|
4242
|
-
},
|
|
4243
|
-
Composer:
|
|
4244
|
-
Sent:
|
|
4245
|
-
Received:
|
|
4268
|
+
}, ti = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), ai = {
|
|
4269
|
+
Composer: ti,
|
|
4270
|
+
Sent: ni,
|
|
4271
|
+
Received: si
|
|
4246
4272
|
}, Nn = ({
|
|
4247
4273
|
open: e,
|
|
4248
4274
|
items: t,
|
|
@@ -4253,8 +4279,8 @@ const Fr = ({
|
|
|
4253
4279
|
length: t.length,
|
|
4254
4280
|
initialIndex: s,
|
|
4255
4281
|
open: e
|
|
4256
|
-
}), l = t[r], d =
|
|
4257
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4282
|
+
}), l = t[r], d = se(
|
|
4283
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "video"),
|
|
4258
4284
|
[l]
|
|
4259
4285
|
);
|
|
4260
4286
|
return l ? /* @__PURE__ */ h(
|
|
@@ -4293,7 +4319,7 @@ const Fr = ({
|
|
|
4293
4319
|
]
|
|
4294
4320
|
}
|
|
4295
4321
|
) : null;
|
|
4296
|
-
},
|
|
4322
|
+
}, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Ue, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
|
|
4297
4323
|
item: e,
|
|
4298
4324
|
index: t
|
|
4299
4325
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4315,11 +4341,11 @@ const Fr = ({
|
|
|
4315
4341
|
"aria-hidden": !0
|
|
4316
4342
|
}
|
|
4317
4343
|
) }),
|
|
4318
|
-
/* @__PURE__ */ n(
|
|
4319
|
-
] }),
|
|
4344
|
+
/* @__PURE__ */ n(ri, {})
|
|
4345
|
+
] }), ii = (e, t, s) => ({
|
|
4320
4346
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4321
4347
|
content: /* @__PURE__ */ n(yn, { item: e, index: t })
|
|
4322
|
-
}),
|
|
4348
|
+
}), oi = ({
|
|
4323
4349
|
src: e,
|
|
4324
4350
|
poster: t,
|
|
4325
4351
|
mimeType: s,
|
|
@@ -4331,7 +4357,7 @@ const Fr = ({
|
|
|
4331
4357
|
mimeType: s.mimeType,
|
|
4332
4358
|
preload: s.preload,
|
|
4333
4359
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4334
|
-
})),
|
|
4360
|
+
})), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4335
4361
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = ye(
|
|
4336
4362
|
i
|
|
4337
4363
|
);
|
|
@@ -4372,13 +4398,13 @@ const Fr = ({
|
|
|
4372
4398
|
preload: d,
|
|
4373
4399
|
onClick: m
|
|
4374
4400
|
}) => {
|
|
4375
|
-
const g =
|
|
4401
|
+
const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ye(
|
|
4376
4402
|
m
|
|
4377
4403
|
);
|
|
4378
4404
|
if (g.length === 0)
|
|
4379
4405
|
return null;
|
|
4380
|
-
const
|
|
4381
|
-
(
|
|
4406
|
+
const v = g.map(
|
|
4407
|
+
(p, x) => ii(p, x, g.length)
|
|
4382
4408
|
);
|
|
4383
4409
|
return /* @__PURE__ */ h(
|
|
4384
4410
|
we,
|
|
@@ -4391,8 +4417,8 @@ const Fr = ({
|
|
|
4391
4417
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4392
4418
|
xn,
|
|
4393
4419
|
{
|
|
4394
|
-
tiles:
|
|
4395
|
-
onTileActivate:
|
|
4420
|
+
tiles: v,
|
|
4421
|
+
onTileActivate: b,
|
|
4396
4422
|
className: "overflow-hidden rounded-md"
|
|
4397
4423
|
}
|
|
4398
4424
|
) }),
|
|
@@ -4402,23 +4428,23 @@ const Fr = ({
|
|
|
4402
4428
|
open: f,
|
|
4403
4429
|
items: Cn(g, r),
|
|
4404
4430
|
initialIndex: c,
|
|
4405
|
-
onClose:
|
|
4431
|
+
onClose: _
|
|
4406
4432
|
}
|
|
4407
4433
|
)
|
|
4408
4434
|
]
|
|
4409
4435
|
}
|
|
4410
4436
|
);
|
|
4411
|
-
},
|
|
4412
|
-
Composer:
|
|
4413
|
-
Sent:
|
|
4414
|
-
Received:
|
|
4415
|
-
},
|
|
4416
|
-
Image:
|
|
4417
|
-
Video:
|
|
4418
|
-
Audio:
|
|
4419
|
-
Pdf:
|
|
4420
|
-
File:
|
|
4421
|
-
},
|
|
4437
|
+
}, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), mi = {
|
|
4438
|
+
Composer: ci,
|
|
4439
|
+
Sent: di,
|
|
4440
|
+
Received: ui
|
|
4441
|
+
}, Ii = {
|
|
4442
|
+
Image: Kr,
|
|
4443
|
+
Video: mi,
|
|
4444
|
+
Audio: Tr,
|
|
4445
|
+
Pdf: ai,
|
|
4446
|
+
File: jr
|
|
4447
|
+
}, hi = ({
|
|
4422
4448
|
question: e,
|
|
4423
4449
|
onClick: t,
|
|
4424
4450
|
loading: s = !1,
|
|
@@ -4430,7 +4456,7 @@ const Fr = ({
|
|
|
4430
4456
|
onClick: t,
|
|
4431
4457
|
disabled: s,
|
|
4432
4458
|
style: { backgroundColor: "#E6E5E3" },
|
|
4433
|
-
className:
|
|
4459
|
+
className: N(
|
|
4434
4460
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
4435
4461
|
{
|
|
4436
4462
|
"hover:brightness-95 active:brightness-90": !s,
|
|
@@ -4440,7 +4466,7 @@ const Fr = ({
|
|
|
4440
4466
|
),
|
|
4441
4467
|
children: e
|
|
4442
4468
|
}
|
|
4443
|
-
),
|
|
4469
|
+
), Ti = ({
|
|
4444
4470
|
faqs: e,
|
|
4445
4471
|
onFaqClick: t,
|
|
4446
4472
|
loadingFaqId: s,
|
|
@@ -4452,7 +4478,7 @@ const Fr = ({
|
|
|
4452
4478
|
const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
4453
4479
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4454
4480
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4455
|
-
|
|
4481
|
+
ie,
|
|
4456
4482
|
{
|
|
4457
4483
|
id: o || "account",
|
|
4458
4484
|
name: o || "Account",
|
|
@@ -4469,7 +4495,7 @@ const Fr = ({
|
|
|
4469
4495
|
children: [
|
|
4470
4496
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4471
4497
|
l.map((d) => /* @__PURE__ */ n(
|
|
4472
|
-
|
|
4498
|
+
hi,
|
|
4473
4499
|
{
|
|
4474
4500
|
question: d.question,
|
|
4475
4501
|
onClick: () => t(d.id),
|
|
@@ -4484,38 +4510,37 @@ const Fr = ({
|
|
|
4484
4510
|
};
|
|
4485
4511
|
export {
|
|
4486
4512
|
en as A,
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
He as V,
|
|
4513
|
+
Hs as B,
|
|
4514
|
+
Xa as C,
|
|
4515
|
+
Ps as D,
|
|
4516
|
+
Ti as F,
|
|
4517
|
+
Ei as L,
|
|
4518
|
+
yi as M,
|
|
4494
4519
|
ge as a,
|
|
4495
|
-
|
|
4496
|
-
|
|
4520
|
+
ie as b,
|
|
4521
|
+
rr as c,
|
|
4497
4522
|
un as d,
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4523
|
+
Ci as e,
|
|
4524
|
+
hi as f,
|
|
4525
|
+
re as g,
|
|
4501
4526
|
zt as h,
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4527
|
+
Ii as i,
|
|
4528
|
+
Ca as j,
|
|
4529
|
+
Ni as k,
|
|
4530
|
+
ki as l,
|
|
4531
|
+
Lr as m,
|
|
4532
|
+
Ar as n,
|
|
4533
|
+
sr as o,
|
|
4534
|
+
Rr as p,
|
|
4510
4535
|
Kt as q,
|
|
4511
4536
|
le as r,
|
|
4512
4537
|
sn as s,
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4538
|
+
$s as t,
|
|
4539
|
+
Si as u,
|
|
4540
|
+
Ys as v,
|
|
4516
4541
|
Qe as w,
|
|
4517
4542
|
et as x,
|
|
4518
4543
|
Xt as y,
|
|
4519
|
-
|
|
4544
|
+
va as z
|
|
4520
4545
|
};
|
|
4521
|
-
//# sourceMappingURL=index-
|
|
4546
|
+
//# sourceMappingURL=index-DPGZRLRM.js.map
|