@linktr.ee/messaging-react 1.0.1 → 1.1.0-ks-migrate-styles-1760927135

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.
Files changed (41) hide show
  1. package/dist/assets/index.css +1 -0
  2. package/dist/index.d.ts +2 -1
  3. package/dist/index.js +846 -1080
  4. package/dist/index.js.map +1 -1
  5. package/package.json +6 -5
  6. package/src/components/ActionButton/ActionButton.stories.tsx +2 -1
  7. package/src/components/ActionButton/ActionButton.test.tsx +2 -0
  8. package/src/components/Avatar/Avatar.stories.tsx +2 -1
  9. package/src/components/Avatar/avatarColors.ts +21 -22
  10. package/src/components/Avatar/index.tsx +2 -1
  11. package/src/components/ChannelList/ChannelList.stories.tsx +4 -2
  12. package/src/components/ChannelList/CustomChannelPreview.stories.tsx +31 -27
  13. package/src/components/ChannelList/CustomChannelPreview.tsx +29 -28
  14. package/src/components/ChannelList/index.tsx +43 -35
  15. package/src/components/ChannelView.tsx +150 -127
  16. package/src/components/CloseButton/index.tsx +4 -5
  17. package/src/components/IconButton/IconButton.stories.tsx +3 -3
  18. package/src/components/Loading/Loading.stories.tsx +2 -1
  19. package/src/components/Loading/index.tsx +7 -9
  20. package/src/components/MessagingShell/EmptyState.stories.tsx +2 -1
  21. package/src/components/MessagingShell/EmptyState.tsx +23 -20
  22. package/src/components/MessagingShell/ErrorState.stories.tsx +2 -1
  23. package/src/components/MessagingShell/LoadingState.stories.tsx +2 -1
  24. package/src/components/MessagingShell/LoadingState.tsx +3 -5
  25. package/src/components/MessagingShell/index.tsx +159 -135
  26. package/src/components/ParticipantPicker/ParticipantItem.stories.tsx +4 -2
  27. package/src/components/ParticipantPicker/ParticipantItem.tsx +25 -21
  28. package/src/components/ParticipantPicker/ParticipantPicker.stories.tsx +4 -2
  29. package/src/components/ParticipantPicker/ParticipantPicker.tsx +104 -76
  30. package/src/components/ParticipantPicker/index.tsx +93 -72
  31. package/src/components/SearchInput/SearchInput.stories.tsx +2 -1
  32. package/src/components/SearchInput/SearchInput.test.tsx +4 -2
  33. package/src/components/SearchInput/index.tsx +14 -15
  34. package/src/hooks/useParticipants.ts +1 -0
  35. package/src/index.ts +3 -0
  36. package/src/providers/MessagingProvider.tsx +213 -135
  37. package/src/stories/mocks.tsx +18 -19
  38. package/src/styles.css +75 -0
  39. package/src/test/setup.ts +11 -12
  40. package/src/test/utils.tsx +6 -7
  41. package/src/types.ts +1 -1
package/dist/index.js CHANGED
@@ -1,101 +1,10 @@
1
- import { jsxs as d, jsx as t, Fragment as oe } from "react/jsx-runtime";
2
- import * as e from "react";
3
- import _, { createContext as de, useContext as we, useState as A, useRef as $, useEffect as B, useCallback as H } from "react";
1
+ import { jsx as e, jsxs as i, Fragment as se } from "react/jsx-runtime";
4
2
  import L from "classnames";
5
- import { Chat as Ae, useChatContext as Ze, ChannelList as ve, Channel as Me, Window as pe, MessageList as ye, useChannelStateContext as Ie, MessageInput as Re } from "stream-chat-react";
6
- import { StreamChatService as Fe } from "@linktr.ee/messaging-core";
7
- const Le = de({
8
- color: "currentColor",
9
- size: "1em",
10
- weight: "regular",
11
- mirrored: !1
12
- }), D = e.forwardRef(
13
- (n, a) => {
14
- const {
15
- alt: l,
16
- color: o,
17
- size: c,
18
- weight: m,
19
- mirrored: u,
20
- children: r,
21
- weights: s,
22
- ...w
23
- } = n, {
24
- color: N = "currentColor",
25
- size: g,
26
- weight: i = "regular",
27
- mirrored: C = !1,
28
- ...x
29
- } = e.useContext(Le);
30
- return /* @__PURE__ */ e.createElement(
31
- "svg",
32
- {
33
- ref: a,
34
- xmlns: "http://www.w3.org/2000/svg",
35
- width: c ?? g,
36
- height: c ?? g,
37
- fill: o ?? N,
38
- viewBox: "0 0 256 256",
39
- transform: u || C ? "scale(-1, 1)" : void 0,
40
- ...x,
41
- ...w
42
- },
43
- !!l && /* @__PURE__ */ e.createElement("title", null, l),
44
- r,
45
- s.get(m ?? i)
46
- );
47
- }
48
- );
49
- D.displayName = "IconBase";
50
- const Ve = /* @__PURE__ */ new Map([
51
- [
52
- "bold",
53
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M232.49,55.51l-32-32a12,12,0,0,0-17,0l-96,96A12,12,0,0,0,84,128v32a12,12,0,0,0,12,12h32a12,12,0,0,0,8.49-3.51l96-96A12,12,0,0,0,232.49,55.51ZM192,49l15,15L196,75,181,60Zm-69,99H108V133l56-56,15,15Zm105-7.43V208a20,20,0,0,1-20,20H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28h67.43a12,12,0,0,1,0,24H52V204H204V140.57a12,12,0,0,1,24,0Z" }))
54
- ],
55
- [
56
- "duotone",
57
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M200,88l-72,72H96V128l72-72Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z" }))
58
- ],
59
- [
60
- "fill",
61
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Zm5.66-58.34-96,96A8,8,0,0,1,128,168H96a8,8,0,0,1-8-8V128a8,8,0,0,1,2.34-5.66l96-96a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,229.66,69.66Zm-17-5.66L192,43.31,179.31,56,200,76.69Z" }))
62
- ],
63
- [
64
- "light",
65
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M228.24,59.76l-32-32a6,6,0,0,0-8.48,0l-96,96A6,6,0,0,0,90,128v32a6,6,0,0,0,6,6h32a6,6,0,0,0,4.24-1.76l96-96A6,6,0,0,0,228.24,59.76ZM125.51,154H102V130.49l66-66L191.51,88ZM200,79.51,176.49,56,192,40.49,215.51,64ZM222,128v80a14,14,0,0,1-14,14H48a14,14,0,0,1-14-14V48A14,14,0,0,1,48,34h80a6,6,0,0,1,0,12H48a2,2,0,0,0-2,2V208a2,2,0,0,0,2,2H208a2,2,0,0,0,2-2V128a6,6,0,0,1,12,0Z" }))
66
- ],
67
- [
68
- "regular",
69
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z" }))
70
- ],
71
- [
72
- "thin",
73
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M226.83,61.17l-32-32a4,4,0,0,0-5.66,0l-96,96A4,4,0,0,0,92,128v32a4,4,0,0,0,4,4h32a4,4,0,0,0,2.83-1.17l96-96A4,4,0,0,0,226.83,61.17ZM126.34,156H100V129.66l68-68L194.34,88ZM200,82.34,173.66,56,192,37.66,218.34,64ZM220,128v80a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V48A12,12,0,0,1,48,36h80a4,4,0,0,1,0,8H48a4,4,0,0,0-4,4V208a4,4,0,0,0,4,4H208a4,4,0,0,0,4-4V128a4,4,0,0,1,8,0Z" }))
74
- ]
75
- ]), me = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Ve }));
76
- me.displayName = "NotePencilIcon";
77
- function J({ label: n, className: a, children: l, ...o }) {
78
- return /* @__PURE__ */ d(
79
- "button",
80
- {
81
- type: "button",
82
- className: L(
83
- "rounded-full p-2 transition-colors focus-ring",
84
- {
85
- "cursor-not-allowed opacity-50": o.disabled,
86
- "hover:bg-sand": !o.disabled
87
- },
88
- a
89
- ),
90
- ...o,
91
- children: [
92
- /* @__PURE__ */ t("span", { className: "sr-only", children: n }),
93
- l
94
- ]
95
- }
96
- );
97
- }
98
- const he = de({
3
+ import $, { createContext as ue, useContext as me, useCallback as U, useState as w, useRef as A, useEffect as B } from "react";
4
+ import { StreamChatService as he } from "@linktr.ee/messaging-core";
5
+ import { Chat as fe, useChatContext as ge, ChannelList as xe, Channel as Ne, Window as Ce, MessageList as be, useChannelStateContext as ve, MessageInput as we } from "stream-chat-react";
6
+ import { NotePencilIcon as Ee, XIcon as oe, ArrowLeftIcon as Ie, DotsThreeIcon as ye, SpinnerGapIcon as Q, SignOutIcon as Se, ProhibitInsetIcon as te, FlagIcon as Re, MagnifyingGlassIcon as ke, ChatCircleDotsIcon as ne } from "@phosphor-icons/react";
7
+ const ae = ue({
99
8
  service: null,
100
9
  client: null,
101
10
  isConnected: !1,
@@ -106,1086 +15,941 @@ const he = de({
106
15
  refreshConnection: async () => {
107
16
  },
108
17
  debug: !1
109
- }), K = () => we(he), s1 = ({
110
- children: n,
111
- user: a,
112
- serviceConfig: l,
113
- apiKey: o,
114
- capabilities: c = {},
18
+ }), Z = () => me(ae), Xe = ({
19
+ children: t,
20
+ user: s,
21
+ serviceConfig: n,
22
+ apiKey: l,
23
+ capabilities: a = {},
115
24
  customization: m = {},
116
- debug: u = !1
25
+ debug: d = !1
117
26
  }) => {
118
- const r = (b, ...M) => {
119
- u && console.log(`🔥 [MessagingProvider] ${b}`, ...M);
120
- };
27
+ const r = U(
28
+ (N, ...S) => {
29
+ d && console.log(`🔥 [MessagingProvider] ${N}`, ...S);
30
+ },
31
+ [d]
32
+ );
121
33
  r("🔄 RENDER START", {
122
- userId: a == null ? void 0 : a.id,
123
- apiKey: (o == null ? void 0 : o.substring(0, 8)) + "...",
124
- serviceConfig: !!l,
125
- capabilities: Object.keys(c),
34
+ userId: s == null ? void 0 : s.id,
35
+ apiKey: (l == null ? void 0 : l.substring(0, 8)) + "...",
36
+ serviceConfig: !!n,
37
+ capabilities: Object.keys(a),
126
38
  customization: Object.keys(m)
127
39
  });
128
- const [s, w] = A(null), [N, g] = A(null), [i, C] = A(!1), [x, p] = A(!1), [Z, V] = A(null), R = $(!1), v = $({ userId: a == null ? void 0 : a.id, apiKey: o, serviceConfig: l, capabilities: c, customization: m }), y = $(0);
129
- y.current++, r("📊 RENDER INFO", {
130
- renderCount: y.current,
131
- currentProps: { userId: a == null ? void 0 : a.id, apiKey: (o == null ? void 0 : o.substring(0, 8)) + "..." },
40
+ const [o, b] = w(null), [x, g] = w(null), [c, C] = w(!1), [v, y] = w(!1), [I, P] = w(null), p = A(!1), E = A({
41
+ userId: s == null ? void 0 : s.id,
42
+ apiKey: l,
43
+ serviceConfig: n,
44
+ capabilities: a,
45
+ customization: m
46
+ }), R = A(0);
47
+ R.current++, r("📊 RENDER INFO", {
48
+ renderCount: R.current,
49
+ currentProps: { userId: s == null ? void 0 : s.id, apiKey: (l == null ? void 0 : l.substring(0, 8)) + "..." },
132
50
  propChanges: {
133
- userChanged: v.current.userId !== (a == null ? void 0 : a.id),
134
- apiKeyChanged: v.current.apiKey !== o,
135
- serviceConfigChanged: v.current.serviceConfig !== l,
136
- capabilitiesChanged: v.current.capabilities !== c,
137
- customizationChanged: v.current.customization !== m
51
+ userChanged: E.current.userId !== (s == null ? void 0 : s.id),
52
+ apiKeyChanged: E.current.apiKey !== l,
53
+ serviceConfigChanged: E.current.serviceConfig !== n,
54
+ capabilitiesChanged: E.current.capabilities !== a,
55
+ customizationChanged: E.current.customization !== m
138
56
  }
139
- }), v.current = { userId: a == null ? void 0 : a.id, apiKey: o, serviceConfig: l, capabilities: c, customization: m }, B(() => {
140
- const b = y.current;
57
+ }), E.current = {
58
+ userId: s == null ? void 0 : s.id,
59
+ apiKey: l,
60
+ serviceConfig: n,
61
+ capabilities: a,
62
+ customization: m
63
+ }, B(() => {
64
+ const N = R.current;
141
65
  if (r("🔧 SERVICE INIT EFFECT TRIGGERED", {
142
- renderCount: b,
143
- apiKey: !!o,
144
- serviceConfig: !!l,
66
+ renderCount: N,
67
+ apiKey: !!l,
68
+ serviceConfig: !!n,
145
69
  dependencies: {
146
- apiKey: (o == null ? void 0 : o.substring(0, 8)) + "...",
147
- serviceConfigRef: l,
148
- serviceConfigStable: v.current.serviceConfig === l,
149
- apiKeyStable: v.current.apiKey === o
70
+ apiKey: (l == null ? void 0 : l.substring(0, 8)) + "...",
71
+ serviceConfigRef: n,
72
+ serviceConfigStable: E.current.serviceConfig === n,
73
+ apiKeyStable: E.current.apiKey === l
150
74
  }
151
- }), !o || !l) {
152
- r("⚠️ SERVICE INIT SKIPPED", { renderCount: b, reason: "Missing apiKey or serviceConfig" });
75
+ }), !l || !n) {
76
+ r("⚠️ SERVICE INIT SKIPPED", {
77
+ renderCount: N,
78
+ reason: "Missing apiKey or serviceConfig"
79
+ });
153
80
  return;
154
81
  }
155
82
  r("🚀 CREATING NEW SERVICE", {
156
- renderCount: b,
157
- apiKey: (o == null ? void 0 : o.substring(0, 8)) + "...",
158
- serviceConfigChanged: v.current.serviceConfig !== l
83
+ renderCount: N,
84
+ apiKey: (l == null ? void 0 : l.substring(0, 8)) + "...",
85
+ serviceConfigChanged: E.current.serviceConfig !== n
159
86
  });
160
- const M = new Fe({
161
- ...l,
162
- apiKey: o,
163
- debug: u
87
+ const S = new he({
88
+ ...n,
89
+ apiKey: l,
90
+ debug: d
164
91
  });
165
- return w(M), r("✅ SERVICE SET", { renderCount: b, serviceInstance: !!M }), () => {
166
- r("🧹 SERVICE CLEANUP", { renderCount: b, reason: "Effect cleanup" }), M.disconnectUser().catch(console.error);
92
+ return b(S), r("✅ SERVICE SET", {
93
+ renderCount: N,
94
+ serviceInstance: !!S
95
+ }), () => {
96
+ r("🧹 SERVICE CLEANUP", {
97
+ renderCount: N,
98
+ reason: "Effect cleanup"
99
+ }), S.disconnectUser().catch(console.error);
167
100
  };
168
- }, [o, l]);
169
- const F = $(null);
101
+ }, [l, n, d, r]);
102
+ const T = A(null);
170
103
  B(() => {
171
- var M, U;
104
+ var S, j;
172
105
  if (r("🔗 USER CONNECTION EFFECT TRIGGERED", {
173
- hasService: !!s,
174
- hasUser: !!a,
175
- userId: a == null ? void 0 : a.id,
176
- isConnecting: R.current,
177
- isConnected: i,
178
- dependencies: { service: !!s, userId: a == null ? void 0 : a.id }
179
- }), !s || !a) {
106
+ hasService: !!o,
107
+ hasUser: !!s,
108
+ userId: s == null ? void 0 : s.id,
109
+ isConnecting: p.current,
110
+ isConnected: c,
111
+ dependencies: { service: !!o, userId: s == null ? void 0 : s.id }
112
+ }), !o || !s) {
180
113
  r("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
181
114
  return;
182
115
  }
183
- if (R.current) {
116
+ if (p.current) {
184
117
  r("⚠️ USER CONNECTION SKIPPED", "Already connecting");
185
118
  return;
186
119
  }
187
- if (((M = F.current) == null ? void 0 : M.serviceId) === s && ((U = F.current) == null ? void 0 : U.userId) === a.id) {
188
- r("⚠️ USER CONNECTION SKIPPED", "Already connected this user with this service");
120
+ if (((S = T.current) == null ? void 0 : S.serviceId) === o && ((j = T.current) == null ? void 0 : j.userId) === s.id) {
121
+ r(
122
+ "⚠️ USER CONNECTION SKIPPED",
123
+ "Already connected this user with this service"
124
+ );
189
125
  return;
190
126
  }
191
127
  (async () => {
192
- r("🚀 STARTING USER CONNECTION", { userId: a.id }), R.current = !0, p(!0), V(null);
128
+ r("🚀 STARTING USER CONNECTION", { userId: s.id }), p.current = !0, y(!0), P(null);
193
129
  try {
194
- r("📞 CALLING SERVICE.CONNECTUSER", { userId: a.id });
195
- const k = await s.connectUser(a);
196
- g(k), C(!0), F.current = { serviceId: s, userId: a.id }, r("✅ USER CONNECTION SUCCESS", { userId: a.id, clientId: k.userID });
197
- } catch (k) {
198
- const P = k instanceof Error ? k.message : "Connection failed";
199
- V(P), r("❌ USER CONNECTION ERROR", { userId: a.id, error: P });
130
+ r("📞 CALLING SERVICE.CONNECTUSER", { userId: s.id });
131
+ const F = await o.connectUser(s);
132
+ g(F), C(!0), T.current = { serviceId: o, userId: s.id }, r("✅ USER CONNECTION SUCCESS", {
133
+ userId: s.id,
134
+ clientId: F.userID
135
+ });
136
+ } catch (F) {
137
+ const H = F instanceof Error ? F.message : "Connection failed";
138
+ P(H), r("❌ USER CONNECTION ERROR", {
139
+ userId: s.id,
140
+ error: H
141
+ });
200
142
  } finally {
201
- p(!1), R.current = !1, r("🔄 USER CONNECTION FINISHED", { userId: a.id, isConnected: i });
143
+ y(!1), p.current = !1, r("🔄 USER CONNECTION FINISHED", {
144
+ userId: s.id,
145
+ isConnected: c
146
+ });
202
147
  }
203
148
  })();
204
- }, [s, a]), B(() => (r("🔌 CLEANUP EFFECT REGISTERED", { hasService: !!s, isConnected: i }), () => {
205
- s && i ? (r("🧹 CLEANUP EFFECT TRIGGERED", "Cleaning up connection on unmount"), F.current = null, s.disconnectUser().catch(console.error)) : r("🔇 CLEANUP EFFECT SKIPPED", { hasService: !!s, isConnected: i });
206
- }), [s, i]);
207
- const f = H(async () => {
208
- if (r("🔄 REFRESH CONNECTION CALLED", { hasService: !!s, hasUser: !!a }), !s || !a) {
149
+ }, [o, s, r, c]), B(() => (r("🔌 CLEANUP EFFECT REGISTERED", {
150
+ hasService: !!o,
151
+ isConnected: c
152
+ }), () => {
153
+ o && c ? (r(
154
+ "🧹 CLEANUP EFFECT TRIGGERED",
155
+ "Cleaning up connection on unmount"
156
+ ), T.current = null, o.disconnectUser().catch(console.error)) : r("🔇 CLEANUP EFFECT SKIPPED", {
157
+ hasService: !!o,
158
+ isConnected: c
159
+ });
160
+ }), [o, c, r]);
161
+ const u = U(async () => {
162
+ if (r("🔄 REFRESH CONNECTION CALLED", {
163
+ hasService: !!o,
164
+ hasUser: !!s
165
+ }), !o || !s) {
209
166
  r("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
210
167
  return;
211
168
  }
212
- r("🚀 STARTING CONNECTION REFRESH", { userId: a.id }), p(!0);
169
+ r("🚀 STARTING CONNECTION REFRESH", { userId: s.id }), y(!0);
213
170
  try {
214
- r("🔌 DISCONNECTING FOR REFRESH"), await s.disconnectUser(), r("📞 RECONNECTING FOR REFRESH");
215
- const b = await s.connectUser(a);
216
- g(b), C(!0), V(null), r("✅ CONNECTION REFRESH SUCCESS", { userId: a.id });
217
- } catch (b) {
218
- const M = b instanceof Error ? b.message : "Refresh failed";
219
- V(M), r("❌ CONNECTION REFRESH ERROR", { userId: a.id, error: M });
171
+ r("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), r("📞 RECONNECTING FOR REFRESH");
172
+ const N = await o.connectUser(s);
173
+ g(N), C(!0), P(null), r("✅ CONNECTION REFRESH SUCCESS", { userId: s.id });
174
+ } catch (N) {
175
+ const S = N instanceof Error ? N.message : "Refresh failed";
176
+ P(S), r("❌ CONNECTION REFRESH ERROR", {
177
+ userId: s.id,
178
+ error: S
179
+ });
220
180
  } finally {
221
- p(!1), r("🔄 CONNECTION REFRESH FINISHED", { userId: a.id });
181
+ y(!1), r("🔄 CONNECTION REFRESH FINISHED", { userId: s.id });
222
182
  }
223
- }, [s, a]), h = _.useMemo(() => (r("💫 CONTEXT VALUE MEMOIZATION", {
224
- hasService: !!s,
225
- hasClient: !!N,
226
- isConnected: i,
227
- isLoading: x,
228
- hasError: !!Z,
229
- capabilitiesKeys: Object.keys(c),
183
+ }, [o, s, r]), f = $.useMemo(() => (r("💫 CONTEXT VALUE MEMOIZATION", {
184
+ hasService: !!o,
185
+ hasClient: !!x,
186
+ isConnected: c,
187
+ isLoading: v,
188
+ hasError: !!I,
189
+ capabilitiesKeys: Object.keys(a),
230
190
  customizationKeys: Object.keys(m)
231
191
  }), {
232
- service: s,
233
- client: N,
234
- isConnected: i,
235
- isLoading: x,
236
- error: Z,
237
- capabilities: c,
192
+ service: o,
193
+ client: x,
194
+ isConnected: c,
195
+ isLoading: v,
196
+ error: I,
197
+ capabilities: a,
238
198
  customization: m,
239
- refreshConnection: f,
240
- debug: u
241
- }), [s, N, i, x, Z, c, m, f, u]);
199
+ refreshConnection: u,
200
+ debug: d
201
+ }), [
202
+ o,
203
+ x,
204
+ c,
205
+ v,
206
+ I,
207
+ a,
208
+ m,
209
+ u,
210
+ d,
211
+ r
212
+ ]);
242
213
  return r("🔄 RENDER END", {
243
- renderCount: y.current,
244
- willRenderChat: !!(N && i),
245
- contextValueReady: !!h
246
- }), /* @__PURE__ */ t(he.Provider, { value: h, children: N && i ? /* @__PURE__ */ t(Ae, { client: N, children: n }) : n });
247
- };
248
- function He(n) {
249
- const a = [
250
- { bgColor: "bg-primary bg-opacity-20", textColor: "text-primary" },
214
+ renderCount: R.current,
215
+ willRenderChat: !!(x && c),
216
+ contextValueReady: !!f
217
+ }), /* @__PURE__ */ e(ae.Provider, { value: f, children: x && c ? /* @__PURE__ */ e(fe, { client: x, children: t }) : t });
218
+ }, Pe = () => Z();
219
+ function q({ label: t, className: s, children: n, ...l }) {
220
+ return /* @__PURE__ */ i(
221
+ "button",
222
+ {
223
+ type: "button",
224
+ className: L(
225
+ "rounded-full p-2 transition-colors focus-ring",
226
+ {
227
+ "cursor-not-allowed opacity-50": l.disabled,
228
+ "hover:bg-sand": !l.disabled
229
+ },
230
+ s
231
+ ),
232
+ ...l,
233
+ children: [
234
+ /* @__PURE__ */ e("span", { className: "sr-only", children: t }),
235
+ n
236
+ ]
237
+ }
238
+ );
239
+ }
240
+ function Te(t) {
241
+ const s = [
242
+ { bgColor: "bg-primary/20", textColor: "text-primary" },
251
243
  // #8129D9 - purple
252
- { bgColor: "bg-forest bg-opacity-20", textColor: "text-forest" },
244
+ { bgColor: "bg-forest/20", textColor: "text-forest" },
253
245
  // #254f1a - dark green
254
- { bgColor: "bg-iris bg-opacity-20", textColor: "text-iris" },
246
+ { bgColor: "bg-iris/20", textColor: "text-iris" },
255
247
  // #061492 - dark blue
256
- { bgColor: "bg-shade bg-opacity-20", textColor: "text-shade" },
248
+ { bgColor: "bg-shade/20", textColor: "text-shade" },
257
249
  // #1e2330 - dark blue-gray
258
- { bgColor: "bg-dahlia bg-opacity-20", textColor: "text-dahlia" },
250
+ { bgColor: "bg-dahlia/20", textColor: "text-dahlia" },
259
251
  // #502274 - dark purple
260
- { bgColor: "bg-orchid bg-opacity-20", textColor: "text-orchid" },
252
+ { bgColor: "bg-orchid/20", textColor: "text-orchid" },
261
253
  // #d717e7 - magenta
262
- { bgColor: "bg-currant bg-opacity-20", textColor: "text-currant" },
254
+ { bgColor: "bg-currant/20", textColor: "text-currant" },
263
255
  // #780016 - dark red
264
- { bgColor: "bg-apple bg-opacity-20", textColor: "text-apple" },
256
+ { bgColor: "bg-apple/20", textColor: "text-apple" },
265
257
  // #c41500 - red
266
- { bgColor: "bg-rose bg-opacity-20", textColor: "text-rose" },
258
+ { bgColor: "bg-rose/20", textColor: "text-rose" },
267
259
  // #fc3e4b - pink
268
- { bgColor: "bg-root bg-opacity-20", textColor: "text-root" },
260
+ { bgColor: "bg-root/20", textColor: "text-root" },
269
261
  // #4c2e05 - brown
270
- { bgColor: "bg-poppy bg-opacity-20", textColor: "text-poppy" },
262
+ { bgColor: "bg-poppy/20", textColor: "text-poppy" },
271
263
  // #ff6c02 - orange
272
- { bgColor: "bg-moss bg-opacity-20", textColor: "text-moss" }
264
+ { bgColor: "bg-moss/20", textColor: "text-moss" }
273
265
  // #70764d - olive green
274
266
  ];
275
- let l = 0;
276
- for (let c = 0; c < n.length; c++)
277
- l = (l << 5) - l + n.charCodeAt(c), l = l & l;
278
- const o = Math.abs(l) % a.length;
279
- return a[o];
267
+ let n = 0;
268
+ for (let a = 0; a < t.length; a++)
269
+ n = (n << 5) - n + t.charCodeAt(a), n = n & n;
270
+ const l = Math.abs(n) % s.length;
271
+ return s[l];
280
272
  }
281
- const ee = ({
282
- id: n,
283
- name: a,
284
- image: l,
285
- size: o = 40,
286
- className: c
273
+ const Y = ({
274
+ id: t,
275
+ name: s,
276
+ image: n,
277
+ size: l = 40,
278
+ className: a
287
279
  }) => {
288
- const { bgColor: m, textColor: u } = He(n), r = a.charAt(0).toUpperCase(), w = o < 32 ? "text-xs" : o < 56 ? "text-sm" : "text-lg";
289
- return /* @__PURE__ */ t(
280
+ const { bgColor: m, textColor: d } = Te(t), r = s.charAt(0).toUpperCase(), b = l < 32 ? "text-xs" : l < 56 ? "text-sm" : "text-lg";
281
+ return /* @__PURE__ */ e(
290
282
  "div",
291
283
  {
292
284
  className: L(
293
285
  "flex-shrink-0 overflow-hidden rounded-full",
294
- c
286
+ a
295
287
  ),
296
- style: { width: `${o}px`, height: `${o}px` },
297
- children: l ? /* @__PURE__ */ t(
288
+ style: { width: `${l}px`, height: `${l}px` },
289
+ children: n ? /* @__PURE__ */ e(
298
290
  "img",
299
291
  {
300
- src: l,
292
+ src: n,
301
293
  alt: "",
302
294
  className: "h-full w-full object-cover aspect-square"
303
295
  }
304
- ) : /* @__PURE__ */ t(
296
+ ) : /* @__PURE__ */ e(
305
297
  "div",
306
298
  {
307
299
  className: L(
308
300
  "flex h-full w-full items-center justify-center font-semibold",
309
301
  m,
310
- u,
311
- w
302
+ d,
303
+ b
312
304
  ),
313
305
  children: r
314
306
  }
315
307
  )
316
308
  }
317
309
  );
318
- }, Se = ({ channel: n, selectedChannel: a, onChannelSelect: l, debug: o = !1, ...c }) => {
319
- var p, Z, V, R, v, y, F;
320
- const m = (a == null ? void 0 : a.id) === (n == null ? void 0 : n.id), u = () => {
321
- n && l(n);
322
- }, s = Object.values(((p = n == null ? void 0 : n.state) == null ? void 0 : p.members) || {}).find(
323
- (f) => {
324
- var h, b;
325
- return ((h = f.user) == null ? void 0 : h.id) && f.user.id !== ((b = n == null ? void 0 : n._client) == null ? void 0 : b.userID);
310
+ }, De = ({ channel: t, selectedChannel: s, onChannelSelect: n, debug: l = !1 }) => {
311
+ var v, y, I, P, p, E, R;
312
+ const a = (s == null ? void 0 : s.id) === (t == null ? void 0 : t.id), m = () => {
313
+ t && n(t);
314
+ }, r = Object.values(((v = t == null ? void 0 : t.state) == null ? void 0 : v.members) || {}).find(
315
+ (T) => {
316
+ var u, f;
317
+ return ((u = T.user) == null ? void 0 : u.id) && T.user.id !== ((f = t == null ? void 0 : t._client) == null ? void 0 : f.userID);
326
318
  }
327
- ), w = ((Z = s == null ? void 0 : s.user) == null ? void 0 : Z.name) || "Conversation", N = (V = s == null ? void 0 : s.user) == null ? void 0 : V.image;
328
- w.charAt(0).toUpperCase();
329
- const g = (v = (R = n == null ? void 0 : n.state) == null ? void 0 : R.messages) == null ? void 0 : v[n.state.messages.length - 1], i = (g == null ? void 0 : g.text) || "No messages yet", C = g != null && g.created_at ? new Date(g.created_at).toLocaleTimeString([], {
319
+ ), o = ((y = r == null ? void 0 : r.user) == null ? void 0 : y.name) || "Conversation", b = (I = r == null ? void 0 : r.user) == null ? void 0 : I.image, x = (p = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages) == null ? void 0 : p[t.state.messages.length - 1], g = (x == null ? void 0 : x.text) || "No messages yet", c = x != null && x.created_at ? new Date(x.created_at).toLocaleTimeString([], {
330
320
  hour: "2-digit",
331
321
  minute: "2-digit"
332
- }) : "", x = ((y = n == null ? void 0 : n.state) == null ? void 0 : y.unreadCount) || 0;
333
- return o && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
334
- channelId: n == null ? void 0 : n.id,
335
- isSelected: m,
336
- participantName: w,
337
- unread: x,
338
- hasTimestamp: !!C
339
- }), /* @__PURE__ */ t(
322
+ }) : "", C = ((E = t == null ? void 0 : t.state) == null ? void 0 : E.unreadCount) || 0;
323
+ return l && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
324
+ channelId: t == null ? void 0 : t.id,
325
+ isSelected: a,
326
+ participantName: o,
327
+ unread: C,
328
+ hasTimestamp: !!c
329
+ }), /* @__PURE__ */ e(
340
330
  "button",
341
331
  {
342
332
  type: "button",
343
- onClick: u,
333
+ onClick: m,
344
334
  className: L(
345
335
  "w-full px-4 py-3 transition-colors border-b border-sand text-left max-w-full overflow-hidden focus-ring",
346
336
  {
347
- "bg-primary-alt bg-opacity-10 border-l-4 border-l-primary": m,
348
- "hover:bg-sand": !m
337
+ "bg-primary-alt/10 border-l-4 border-l-primary": a,
338
+ "hover:bg-sand": !a
349
339
  }
350
340
  ),
351
- children: /* @__PURE__ */ d("div", { className: "flex items-start gap-3", children: [
352
- /* @__PURE__ */ t(
353
- ee,
341
+ children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
342
+ /* @__PURE__ */ e(
343
+ Y,
354
344
  {
355
- id: ((F = s == null ? void 0 : s.user) == null ? void 0 : F.id) || n.id || "unknown",
356
- name: w,
357
- image: N,
345
+ id: ((R = r == null ? void 0 : r.user) == null ? void 0 : R.id) || t.id || "unknown",
346
+ name: o,
347
+ image: b,
358
348
  size: 44
359
349
  }
360
350
  ),
361
- /* @__PURE__ */ d("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
362
- /* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-2", children: [
363
- /* @__PURE__ */ t(
351
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
352
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2", children: [
353
+ /* @__PURE__ */ e(
364
354
  "h3",
365
355
  {
366
356
  className: L(
367
357
  "text-sm font-medium truncate",
368
- m ? "text-primary" : "text-charcoal"
358
+ a ? "text-primary" : "text-charcoal"
369
359
  ),
370
- children: w
360
+ children: o
371
361
  }
372
362
  ),
373
- C && /* @__PURE__ */ t("span", { className: "text-xs text-stone flex-shrink-0", children: C })
363
+ c && /* @__PURE__ */ e("span", { className: "text-xs text-stone flex-shrink-0", children: c })
374
364
  ] }),
375
- /* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
376
- /* @__PURE__ */ t("p", { className: "text-xs text-stone mr-2 flex-1 line-clamp-2", children: i }),
377
- x > 0 && /* @__PURE__ */ t("span", { className: "bg-primary text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: x > 99 ? "99+" : x })
365
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
366
+ /* @__PURE__ */ e("p", { className: "text-xs text-stone mr-2 flex-1 line-clamp-2", children: g }),
367
+ C > 0 && /* @__PURE__ */ e("span", { className: "bg-primary text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: C > 99 ? "99+" : C })
378
368
  ] })
379
369
  ] })
380
370
  ] })
381
371
  }
382
372
  );
383
- }, ke = ({
384
- onChannelSelect: n,
385
- selectedChannel: a,
386
- showStartConversation: l = !1,
387
- onStartConversation: o,
388
- participantLabel: c = "participants",
373
+ }, pe = ({
374
+ onChannelSelect: t,
375
+ selectedChannel: s,
376
+ showStartConversation: n = !1,
377
+ onStartConversation: l,
378
+ participantLabel: a = "participants",
389
379
  className: m
390
380
  }) => {
391
- var N;
392
- const u = _.useRef(0);
393
- u.current++;
394
- const { debug: r = !1 } = K();
381
+ var x;
382
+ const d = $.useRef(0);
383
+ d.current++;
384
+ const { debug: r = !1 } = Z();
395
385
  r && console.log("📺 [ChannelList] 🔄 RENDER START", {
396
- renderCount: u.current,
397
- selectedChannelId: a == null ? void 0 : a.id,
398
- showStartConversation: l,
399
- participantLabel: c
386
+ renderCount: d.current,
387
+ selectedChannelId: s == null ? void 0 : s.id,
388
+ showStartConversation: n,
389
+ participantLabel: a
400
390
  });
401
- const { client: s } = Ze();
391
+ const { client: o } = ge();
402
392
  r && console.log("📺 [ChannelList] 📡 CHAT CONTEXT", {
403
- renderCount: u.current,
404
- hasClient: !!s,
405
- clientUserId: s == null ? void 0 : s.userID,
406
- clientConnected: (N = s == null ? void 0 : s.wsConnection) == null ? void 0 : N.isHealthy
393
+ renderCount: d.current,
394
+ hasClient: !!o,
395
+ clientUserId: o == null ? void 0 : o.userID,
396
+ clientConnected: (x = o == null ? void 0 : o.wsConnection) == null ? void 0 : x.isHealthy
407
397
  });
408
- const w = _.useMemo(() => {
409
- const g = s.userID, i = g ? { type: "messaging", members: { $in: [g] }, hidden: !1 } : { type: "messaging" };
398
+ const b = $.useMemo(() => {
399
+ const g = o.userID, c = g ? { type: "messaging", members: { $in: [g] }, hidden: !1 } : { type: "messaging" };
410
400
  return r && console.log("📺 [ChannelList] 🔍 FILTERS MEMOIZED", {
411
- renderCount: u.current,
401
+ renderCount: d.current,
412
402
  userId: g,
413
- filters: i
414
- }), i;
415
- }, [s.userID, r]);
416
- return /* @__PURE__ */ d("div", { className: L("h-full flex flex-col min-w-0 overflow-hidden", m), children: [
417
- /* @__PURE__ */ t("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-3 min-h-10 min-w-0", children: [
418
- /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-charcoal", children: "Conversations" }),
419
- /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: l && o && /* @__PURE__ */ t(
420
- J,
421
- {
422
- label: "Start a new conversation",
423
- onClick: o,
424
- className: "inline-flex size-10 items-center justify-center",
425
- children: /* @__PURE__ */ t(me, { className: "h-5 w-5" })
426
- }
427
- ) })
428
- ] }) }),
429
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-hidden min-w-0", children: (r && console.log("📺 [ChannelList] 🎬 RENDERING STREAM CHANNEL LIST", {
430
- renderCount: u.current,
431
- filters: w,
432
- hasClient: !!s,
433
- clientUserId: s == null ? void 0 : s.userID
434
- }), /* @__PURE__ */ t(
435
- ve,
436
- {
437
- filters: w,
438
- sort: { last_message_at: -1 },
439
- options: { limit: 30 },
440
- Preview: (g) => {
441
- var i, C;
442
- return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
443
- channelId: (i = g.channel) == null ? void 0 : i.id,
444
- selectedChannelId: a == null ? void 0 : a.id,
445
- isSelected: (a == null ? void 0 : a.id) === ((C = g.channel) == null ? void 0 : C.id)
446
- }), /* @__PURE__ */ t(
447
- Se,
403
+ filters: c
404
+ }), c;
405
+ }, [o.userID, r]);
406
+ return /* @__PURE__ */ i(
407
+ "div",
408
+ {
409
+ className: L(
410
+ "h-full flex flex-col min-w-0 overflow-hidden",
411
+ m
412
+ ),
413
+ children: [
414
+ /* @__PURE__ */ e("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-3 min-h-10 min-w-0", children: [
415
+ /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Conversations" }),
416
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: n && l && /* @__PURE__ */ e(
417
+ q,
448
418
  {
449
- ...g,
450
- selectedChannel: a,
451
- onChannelSelect: n,
452
- debug: r
419
+ label: "Start a new conversation",
420
+ onClick: l,
421
+ className: "inline-flex size-10 items-center justify-center",
422
+ children: /* @__PURE__ */ e(Ee, { className: "h-5 w-5" })
453
423
  }
454
- );
455
- }
456
- }
457
- )) })
458
- ] });
459
- }, Pe = /* @__PURE__ */ new Map([
460
- [
461
- "bold",
462
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M40.14,46.88A12,12,0,0,0,36,56V224a12,12,0,0,0,24,0V181.72c22.84-17.12,42.1-9.12,70.68,5,16.23,8,34.74,17.2,54.8,17.2,14.72,0,30.28-4.94,46.38-18.88A12,12,0,0,0,236,176V56a12,12,0,0,0-19.86-9.07c-24.71,21.41-44.53,13.31-74.82-1.68C113.19,31.27,78.17,13.94,40.14,46.88ZM212,170.26c-22.84,17.13-42.1,9.11-70.68-5C118.16,153.76,90.33,140,60,153.87V61.69c22.84-17.12,42.1-9.12,70.68,5,16.23,8,34.74,17.2,54.8,17.2A63,63,0,0,0,212,78.08Z" }))
463
- ],
464
- [
465
- "duotone",
466
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
467
- "path",
468
- {
469
- d: "M224,56V176c-64,55.43-112-55.43-176,0V56C112,.57,160,111.43,224,56Z",
470
- opacity: "0.2"
471
- }
472
- ), /* @__PURE__ */ e.createElement("path", { d: "M42.76,50A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,218.76,50c-28,24.23-51.72,12.49-79.21-1.12C111.07,34.76,78.78,18.79,42.76,50ZM216,172.25c-26.79,21.16-49.87,9.74-76.45-3.41-25-12.35-52.81-26.13-83.55-8.4V59.79c26.79-21.16,49.87-9.75,76.45,3.4,25,12.35,52.82,26.13,83.55,8.4Z" }))
473
- ],
474
- [
475
- "fill",
476
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M232,56V176a8,8,0,0,1-2.76,6c-15.28,13.23-29.89,18-43.82,18-18.91,0-36.57-8.74-53-16.85C105.87,170,82.79,158.61,56,179.77V224a8,8,0,0,1-16,0V56a8,8,0,0,1,2.77-6h0c36-31.18,68.31-15.21,96.79-1.12C167,62.46,190.79,74.2,218.76,50A8,8,0,0,1,232,56Z" }))
477
- ],
478
- [
479
- "light",
480
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M44.08,51.37A6,6,0,0,0,42,55.9V224a6,6,0,0,0,12,0V178.78c28.08-22.79,51.88-11,79.34,2.57,16.12,8,33.49,16.58,52,16.58,13.57,0,27.76-4.6,42.56-17.42A6,6,0,0,0,230,176V55.9a6,6,0,0,0-9.93-4.54c-29,25.12-53.28,13.09-81.41-.84C110.77,36.71,79,21.16,44.08,51.37ZM218,173.17c-28.08,22.8-51.88,11-79.34-2.58C113.4,158.08,85.09,144.07,54,164V58.72c28.08-22.8,51.88-11,79.34,2.56C158.6,73.79,186.91,87.8,218,67.91Z" }))
481
- ],
482
- [
483
- "regular",
484
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M42.76,50A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,218.76,50c-28,24.23-51.72,12.49-79.21-1.12C111.07,34.76,78.78,18.79,42.76,50ZM216,172.25c-26.79,21.16-49.87,9.74-76.45-3.41-25-12.35-52.81-26.13-83.55-8.4V59.79c26.79-21.16,49.87-9.75,76.45,3.4,25,12.35,52.82,26.13,83.55,8.4Z" }))
485
- ],
486
- [
487
- "thin",
488
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M45.39,53.06a4,4,0,0,0-1.39,3V224a4,4,0,0,0,8,0V177.87c29.41-24.39,55.08-11.69,82.23,1.73,16.5,8.17,33.33,16.5,51.13,16.5,13.14,0,26.81-4.55,41.26-17.06a4,4,0,0,0,1.38-3v-120a4,4,0,0,0-6.62-3c-30,26-56,13.07-83.61-.57C109.07,38.28,79.4,23.62,45.39,53.06ZM220,174.17c-29.41,24.4-55.08,11.7-82.23-1.73-26.82-13.27-54.5-27-85.77-4.66V57.92c29.41-24.4,55.08-11.7,82.23,1.73,26.82,13.27,54.5,27,85.77,4.66Z" }))
489
- ]
490
- ]), ue = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Pe }));
491
- ue.displayName = "FlagIcon";
492
- const Te = /* @__PURE__ */ new Map([
493
- [
494
- "bold",
495
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M168.49,151.51a12,12,0,0,1-17,17l-64-64a12,12,0,0,1,17-17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z" }))
496
- ],
497
- [
498
- "duotone",
499
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M165.66,154.34a8,8,0,0,1-11.32,11.32l-64-64a8,8,0,0,1,11.32-11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" }))
500
- ],
501
- [
502
- "fill",
503
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,141.66a8,8,0,0,1-11.32,0l-64-64a8,8,0,0,1,11.32-11.32l64,64A8,8,0,0,1,165.66,165.66Z" }))
504
- ],
505
- [
506
- "light",
507
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M164.24,155.76a6,6,0,1,1-8.48,8.48l-64-64a6,6,0,0,1,8.48-8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z" }))
508
- ],
509
- [
510
- "regular",
511
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M165.66,154.34a8,8,0,0,1-11.32,11.32l-64-64a8,8,0,0,1,11.32-11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" }))
512
- ],
513
- [
514
- "thin",
515
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M162.83,157.17a4,4,0,0,1-5.66,5.66l-64-64a4,4,0,0,1,5.66-5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z" }))
516
- ]
517
- ]), ne = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Te }));
518
- ne.displayName = "ProhibitInsetIcon";
519
- const De = /* @__PURE__ */ new Map([
520
- [
521
- "bold",
522
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z" }))
523
- ],
524
- [
525
- "duotone",
526
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
527
- "path",
528
- {
529
- d: "M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",
530
- opacity: "0.2"
531
- }
532
- ), /* @__PURE__ */ e.createElement("path", { d: "M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z" }))
533
- ],
534
- [
535
- "fill",
536
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z" }))
537
- ],
538
- [
539
- "light",
540
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z" }))
541
- ],
542
- [
543
- "regular",
544
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z" }))
545
- ],
546
- [
547
- "thin",
548
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z" }))
549
- ]
550
- ]), ge = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: De }));
551
- ge.displayName = "SignOutIcon";
552
- const Oe = /* @__PURE__ */ new Map([
553
- [
554
- "bold",
555
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm84,84H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z" }))
556
- ],
557
- [
558
- "duotone",
559
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z" }))
560
- ],
561
- [
562
- "fill",
563
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z" }))
564
- ],
565
- [
566
- "light",
567
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm90,90H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z" }))
568
- ],
569
- [
570
- "regular",
571
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z" }))
572
- ],
573
- [
574
- "thin",
575
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm92,92H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z" }))
576
- ]
577
- ]), W = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Oe }));
578
- W.displayName = "SpinnerGapIcon";
579
- const Ue = /* @__PURE__ */ new Map([
580
- [
581
- "bold",
582
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z" }))
583
- ],
584
- [
585
- "duotone",
586
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M112,56V200L40,128Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z" }))
587
- ],
588
- [
589
- "fill",
590
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z" }))
591
- ],
592
- [
593
- "light",
594
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z" }))
595
- ],
596
- [
597
- "regular",
598
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" }))
599
- ],
600
- [
601
- "thin",
602
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z" }))
603
- ]
604
- ]), fe = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Ue }));
605
- fe.displayName = "ArrowLeftIcon";
606
- const $e = /* @__PURE__ */ new Map([
607
- [
608
- "bold",
609
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z" }))
610
- ],
611
- [
612
- "duotone",
613
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
614
- "path",
615
- {
616
- d: "M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",
617
- opacity: "0.2"
618
- }
619
- ), /* @__PURE__ */ e.createElement("path", { d: "M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z" }))
620
- ],
621
- [
622
- "fill",
623
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z" }))
624
- ],
625
- [
626
- "light",
627
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z" }))
628
- ],
629
- [
630
- "regular",
631
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z" }))
632
- ],
633
- [
634
- "thin",
635
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z" }))
636
- ]
637
- ]), Ee = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: $e }));
638
- Ee.displayName = "DotsThreeIcon";
639
- const je = /* @__PURE__ */ new Map([
640
- [
641
- "bold",
642
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
643
- ],
644
- [
645
- "duotone",
646
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
647
- "path",
648
- {
649
- d: "M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",
650
- opacity: "0.2"
651
- }
652
- ), /* @__PURE__ */ e.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
653
- ],
654
- [
655
- "fill",
656
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
657
- ],
658
- [
659
- "light",
660
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z" }))
661
- ],
662
- [
663
- "regular",
664
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
665
- ],
666
- [
667
- "thin",
668
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
669
- ]
670
- ]), re = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: je }));
671
- re.displayName = "XIcon";
672
- function xe({ onClick: n }) {
673
- return /* @__PURE__ */ t(J, { label: "Close", onClick: n, className: "p-1", children: /* @__PURE__ */ t(re, { className: "h-5 w-5 text-stone", weight: "bold" }) });
674
- }
675
- const Y = ({
676
- variant: n = "default",
677
- className: a,
678
- children: l,
679
- ...o
680
- }) => /* @__PURE__ */ t(
424
+ ) })
425
+ ] }) }),
426
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: (r && console.log("📺 [ChannelList] 🎬 RENDERING STREAM CHANNEL LIST", {
427
+ renderCount: d.current,
428
+ filters: b,
429
+ hasClient: !!o,
430
+ clientUserId: o == null ? void 0 : o.userID
431
+ }), /* @__PURE__ */ e(
432
+ xe,
433
+ {
434
+ filters: b,
435
+ sort: { last_message_at: -1 },
436
+ options: { limit: 30 },
437
+ Preview: (g) => {
438
+ var c, C;
439
+ return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
440
+ channelId: (c = g.channel) == null ? void 0 : c.id,
441
+ selectedChannelId: s == null ? void 0 : s.id,
442
+ isSelected: (s == null ? void 0 : s.id) === ((C = g.channel) == null ? void 0 : C.id)
443
+ }), /* @__PURE__ */ e(
444
+ De,
445
+ {
446
+ ...g,
447
+ selectedChannel: s,
448
+ onChannelSelect: t,
449
+ debug: r
450
+ }
451
+ );
452
+ }
453
+ }
454
+ )) })
455
+ ]
456
+ }
457
+ );
458
+ }, X = ({
459
+ variant: t = "default",
460
+ className: s,
461
+ children: n,
462
+ ...l
463
+ }) => /* @__PURE__ */ e(
681
464
  "button",
682
465
  {
683
466
  type: "button",
684
467
  className: L(
685
468
  "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",
686
- n === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
687
- a
469
+ t === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
470
+ s
688
471
  ),
689
- ...o,
690
- children: l
472
+ ...l,
473
+ children: n
691
474
  }
692
- ), Be = ({ renderActions: n }) => /* @__PURE__ */ d("div", { className: "message-input flex items-center gap-2 p-4", children: [
693
- n && n(),
694
- /* @__PURE__ */ t("div", { className: "flex-1", children: /* @__PURE__ */ t(Re, { focus: !0, maxRows: 4 }) })
695
- ] }), Ge = ({ onBack: n, showBackButton: a, onShowInfo: l, canShowInfo: o }) => {
696
- var s, w, N, g;
697
- const { channel: c } = Ie(), m = _.useMemo(() => Object.values(c.state.members || {}).find(
475
+ );
476
+ function ie({ onClick: t }) {
477
+ return /* @__PURE__ */ e(q, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(oe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
478
+ }
479
+ const Oe = ({ renderActions: t }) => /* @__PURE__ */ i("div", { className: "message-input flex items-center gap-2 p-4", children: [
480
+ t && t(),
481
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(we, { focus: !0, maxRows: 4 }) })
482
+ ] }), Ue = ({ onBack: t, showBackButton: s, onShowInfo: n, canShowInfo: l }) => {
483
+ var o, b, x, g;
484
+ const { channel: a } = ve(), m = $.useMemo(() => Object.values(a.state.members || {}).find(
698
485
  (C) => {
699
- var x;
700
- return ((x = C.user) == null ? void 0 : x.id) && C.user.id !== c._client.userID;
486
+ var v;
487
+ return ((v = C.user) == null ? void 0 : v.id) && C.user.id !== a._client.userID;
701
488
  }
702
- ), [c._client.userID, c.state.members]), u = ((s = m == null ? void 0 : m.user) == null ? void 0 : s.name) || ((w = m == null ? void 0 : m.user) == null ? void 0 : w.id) || "Unknown member", r = (N = m == null ? void 0 : m.user) == null ? void 0 : N.image;
703
- return /* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-3 min-h-12", children: [
704
- /* @__PURE__ */ d("div", { className: "flex items-center gap-3 min-w-0", children: [
705
- a && n && /* @__PURE__ */ t(
489
+ ), [a._client.userID, a.state.members]), d = ((o = m == null ? void 0 : m.user) == null ? void 0 : o.name) || ((b = m == null ? void 0 : m.user) == null ? void 0 : b.id) || "Unknown member", r = (x = m == null ? void 0 : m.user) == null ? void 0 : x.image;
490
+ return /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-3 min-h-12", children: [
491
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-3 min-w-0", children: [
492
+ s && t && /* @__PURE__ */ e(
706
493
  "button",
707
494
  {
708
495
  type: "button",
709
- onClick: n,
496
+ onClick: t,
710
497
  className: "inline-flex items-center justify-center w-8 h-8 rounded-lg hover:bg-sand focus:outline-none focus:ring-2 focus:ring-primary transition-colors lg:hidden",
711
498
  "aria-label": "Back to channel list",
712
- children: /* @__PURE__ */ t(fe, { className: "h-5 w-5 text-stone", weight: "bold" })
499
+ children: /* @__PURE__ */ e(Ie, { className: "h-5 w-5 text-stone", weight: "bold" })
713
500
  }
714
501
  ),
715
- /* @__PURE__ */ t(
716
- ee,
502
+ /* @__PURE__ */ e(
503
+ Y,
717
504
  {
718
- id: ((g = m == null ? void 0 : m.user) == null ? void 0 : g.id) || c.id || "unknown",
719
- name: u,
505
+ id: ((g = m == null ? void 0 : m.user) == null ? void 0 : g.id) || a.id || "unknown",
506
+ name: d,
720
507
  image: r,
721
508
  size: 40
722
509
  }
723
510
  ),
724
- /* @__PURE__ */ t("div", { className: "min-w-0", children: /* @__PURE__ */ t("h1", { className: "text-lg font-semibold text-charcoal truncate", children: u }) })
511
+ /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e("h1", { className: "text-lg font-semibold text-charcoal truncate", children: d }) })
725
512
  ] }),
726
- o && l && /* @__PURE__ */ t(
727
- J,
728
- {
729
- label: "Chat info",
730
- onClick: l,
731
- children: /* @__PURE__ */ t(Ee, { className: "h-6 w-6 text-charcoal", weight: "bold" })
732
- }
733
- )
513
+ l && n && /* @__PURE__ */ e(q, { label: "Chat info", onClick: n, children: /* @__PURE__ */ e(ye, { className: "h-6 w-6 text-charcoal", weight: "bold" }) })
734
514
  ] });
735
- }, _e = ({ isOpen: n, onClose: a, participant: l, channel: o, followerStatusLabel: c, onLeaveConversation: m, onBlockParticipant: u }) => {
736
- var k, P, X, Q, z, q, G;
737
- const { service: r, debug: s } = K(), w = $(null), [N, g] = A(!1), [i, C] = A(!1), [x, p] = A(!1);
515
+ }, Le = ({
516
+ isOpen: t,
517
+ onClose: s,
518
+ participant: n,
519
+ channel: l,
520
+ followerStatusLabel: a,
521
+ onLeaveConversation: m,
522
+ onBlockParticipant: d
523
+ }) => {
524
+ var F, H, V, _, W, G, z;
525
+ const { service: r, debug: o } = Z(), b = A(null), [x, g] = w(!1), [c, C] = w(!1), [v, y] = w(!1);
738
526
  B(() => {
739
- const I = w.current;
740
- I && (n ? I.showModal() : I.close());
741
- }, [n]);
742
- const Z = H(async () => {
743
- var I;
744
- if (!(!r || !((I = l == null ? void 0 : l.user) != null && I.id)))
527
+ const k = b.current;
528
+ k && (t ? k.showModal() : k.close());
529
+ }, [t]);
530
+ const I = U(async () => {
531
+ var k;
532
+ if (!(!r || !((k = n == null ? void 0 : n.user) != null && k.id)))
745
533
  try {
746
- const T = (await r.getBlockedUsers()).some(
747
- (E) => E.blocked_user_id === l.user.id
534
+ const h = (await r.getBlockedUsers()).some(
535
+ (O) => {
536
+ var M;
537
+ return O.blocked_user_id === ((M = n == null ? void 0 : n.user) == null ? void 0 : M.id);
538
+ }
539
+ );
540
+ g(h);
541
+ } catch (D) {
542
+ console.error(
543
+ "[ChannelInfoDialog] Failed to check blocked status:",
544
+ D
748
545
  );
749
- g(T);
750
- } catch (S) {
751
- console.error("[ChannelInfoDialog] Failed to check blocked status:", S);
752
546
  }
753
- }, [r, (k = l == null ? void 0 : l.user) == null ? void 0 : k.id]);
547
+ }, [r, (F = n == null ? void 0 : n.user) == null ? void 0 : F.id]);
754
548
  B(() => {
755
- n && Z();
756
- }, [n, Z]);
757
- const V = async () => {
758
- var I;
759
- if (!i) {
760
- s && console.log("[ChannelInfoDialog] Leave conversation", o.cid), C(!0);
549
+ t && I();
550
+ }, [t, I]);
551
+ const P = async () => {
552
+ var k;
553
+ if (!c) {
554
+ o && console.log("[ChannelInfoDialog] Leave conversation", l.cid), C(!0);
761
555
  try {
762
- const S = ((I = o._client) == null ? void 0 : I.userID) ?? null;
763
- await o.hide(S, !1), m && await m(o), a();
764
- } catch (S) {
765
- console.error("[ChannelInfoDialog] Failed to leave conversation", S);
556
+ const D = ((k = l._client) == null ? void 0 : k.userID) ?? null;
557
+ await l.hide(D, !1), m && await m(l), s();
558
+ } catch (D) {
559
+ console.error("[ChannelInfoDialog] Failed to leave conversation", D);
766
560
  } finally {
767
561
  C(!1);
768
562
  }
769
563
  }
770
- }, R = async () => {
771
- var I, S, T;
772
- if (!(x || !r)) {
773
- s && console.log("[ChannelInfoDialog] Block member", (I = l == null ? void 0 : l.user) == null ? void 0 : I.id), p(!0);
564
+ }, p = async () => {
565
+ var k, D, h;
566
+ if (!(v || !r)) {
567
+ o && console.log("[ChannelInfoDialog] Block member", (k = n == null ? void 0 : n.user) == null ? void 0 : k.id), y(!0);
774
568
  try {
775
- await r.blockUser((S = l == null ? void 0 : l.user) == null ? void 0 : S.id), u && await u((T = l == null ? void 0 : l.user) == null ? void 0 : T.id), a();
776
- } catch (E) {
777
- console.error("[ChannelInfoDialog] Failed to block member", E);
569
+ await r.blockUser((D = n == null ? void 0 : n.user) == null ? void 0 : D.id), d && await d((h = n == null ? void 0 : n.user) == null ? void 0 : h.id), s();
570
+ } catch (O) {
571
+ console.error("[ChannelInfoDialog] Failed to block member", O);
778
572
  } finally {
779
- p(!1);
573
+ y(!1);
780
574
  }
781
575
  }
782
- }, v = async () => {
783
- var I, S, T;
784
- if (!(x || !r)) {
785
- s && console.log("[ChannelInfoDialog] Unblock member", (I = l == null ? void 0 : l.user) == null ? void 0 : I.id), p(!0);
576
+ }, E = async () => {
577
+ var k, D, h;
578
+ if (!(v || !r)) {
579
+ o && console.log("[ChannelInfoDialog] Unblock member", (k = n == null ? void 0 : n.user) == null ? void 0 : k.id), y(!0);
786
580
  try {
787
- await r.unBlockUser((S = l == null ? void 0 : l.user) == null ? void 0 : S.id), u && await u((T = l == null ? void 0 : l.user) == null ? void 0 : T.id), a();
788
- } catch (E) {
789
- console.error("[ChannelInfoDialog] Failed to unblock member", E);
581
+ await r.unBlockUser((D = n == null ? void 0 : n.user) == null ? void 0 : D.id), d && await d((h = n == null ? void 0 : n.user) == null ? void 0 : h.id), s();
582
+ } catch (O) {
583
+ console.error("[ChannelInfoDialog] Failed to unblock member", O);
790
584
  } finally {
791
- p(!1);
585
+ y(!1);
792
586
  }
793
587
  }
794
- }, y = () => {
795
- a(), window.open(
588
+ }, R = () => {
589
+ s(), window.open(
796
590
  "https://linktr.ee/s/about/trust-center/report",
797
591
  "_blank",
798
592
  "noopener,noreferrer"
799
593
  );
800
594
  };
801
- if (!l) return null;
802
- const F = ((P = l.user) == null ? void 0 : P.name) || ((X = l.user) == null ? void 0 : X.id) || "Unknown member", f = (Q = l.user) == null ? void 0 : Q.image, h = (z = l.user) == null ? void 0 : z.email, b = (q = l.user) == null ? void 0 : q.username, M = h || (b ? `linktr.ee/${b}` : void 0), U = ((G = l.user) == null ? void 0 : G.id) || "unknown";
803
- return /* @__PURE__ */ t(
804
- "dialog",
805
- {
806
- ref: w,
807
- className: "mes-dialog",
808
- onClose: a,
809
- onClick: (I) => {
810
- I.target === w.current && a();
811
- },
812
- children: /* @__PURE__ */ d("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-max-elevation-light", children: [
813
- /* @__PURE__ */ d("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
814
- /* @__PURE__ */ t("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
815
- /* @__PURE__ */ t(xe, { onClick: a })
816
- ] }),
817
- /* @__PURE__ */ d("div", { className: "flex-1 overflow-y-auto px-6 py-6", children: [
818
- /* @__PURE__ */ t("div", { className: "rounded-2xl bg-chalk p-4", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-4", children: [
819
- /* @__PURE__ */ t(
820
- ee,
821
- {
822
- id: U,
823
- name: F,
824
- image: f,
825
- size: 64
826
- }
827
- ),
828
- /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
829
- /* @__PURE__ */ t("p", { className: "truncate text-base font-semibold text-charcoal", children: F }),
830
- M && /* @__PURE__ */ t("p", { className: "truncate text-sm text-stone", children: M }),
831
- c && /* @__PURE__ */ t("span", { className: "mt-2 inline-flex items-center rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700", children: c })
595
+ if (!n) return null;
596
+ const T = ((H = n.user) == null ? void 0 : H.name) || ((V = n.user) == null ? void 0 : V.id) || "Unknown member", u = (_ = n.user) == null ? void 0 : _.image, f = (W = n.user) == null ? void 0 : W.email, N = (G = n.user) == null ? void 0 : G.username, S = f || (N ? `linktr.ee/${N}` : void 0), j = ((z = n.user) == null ? void 0 : z.id) || "unknown";
597
+ return (
598
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
599
+ /* @__PURE__ */ e(
600
+ "dialog",
601
+ {
602
+ ref: b,
603
+ className: "mes-dialog",
604
+ onClose: s,
605
+ onClick: (k) => {
606
+ k.target === b.current && s();
607
+ },
608
+ children: /* @__PURE__ */ i("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-max-elevation-light", children: [
609
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
610
+ /* @__PURE__ */ e("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
611
+ /* @__PURE__ */ e(ie, { onClick: s })
612
+ ] }),
613
+ /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto px-6 py-6", children: [
614
+ /* @__PURE__ */ e("div", { className: "rounded-2xl bg-chalk p-4", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-4", children: [
615
+ /* @__PURE__ */ e(
616
+ Y,
617
+ {
618
+ id: j,
619
+ name: T,
620
+ image: u,
621
+ size: 64
622
+ }
623
+ ),
624
+ /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
625
+ /* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children: T }),
626
+ S && /* @__PURE__ */ e("p", { className: "truncate text-sm text-stone", children: S }),
627
+ a && /* @__PURE__ */ e("span", { className: "mt-2 inline-flex items-center rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700", children: a })
628
+ ] })
629
+ ] }) }),
630
+ /* @__PURE__ */ i("ul", { className: "flex flex-col gap-2 mt-2", children: [
631
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
632
+ X,
633
+ {
634
+ onClick: P,
635
+ disabled: c,
636
+ "aria-busy": c,
637
+ children: [
638
+ c ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Se, { className: "h-5 w-5" }),
639
+ /* @__PURE__ */ e("span", { children: "Leave Conversation" })
640
+ ]
641
+ }
642
+ ) }),
643
+ /* @__PURE__ */ e("li", { children: x ? /* @__PURE__ */ i(
644
+ X,
645
+ {
646
+ onClick: E,
647
+ disabled: v,
648
+ "aria-busy": v,
649
+ children: [
650
+ v ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(te, { className: "h-5 w-5" }),
651
+ /* @__PURE__ */ e("span", { children: "Unblock" })
652
+ ]
653
+ }
654
+ ) : /* @__PURE__ */ i(
655
+ X,
656
+ {
657
+ onClick: p,
658
+ disabled: v,
659
+ "aria-busy": v,
660
+ children: [
661
+ v ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(te, { className: "h-5 w-5" }),
662
+ /* @__PURE__ */ e("span", { children: "Block" })
663
+ ]
664
+ }
665
+ ) }),
666
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(X, { variant: "danger", onClick: R, children: [
667
+ /* @__PURE__ */ e(Re, { className: "h-5 w-5" }),
668
+ /* @__PURE__ */ e("span", { children: "Report" })
669
+ ] }) })
832
670
  ] })
833
- ] }) }),
834
- /* @__PURE__ */ d("ul", { className: "flex flex-col gap-2 mt-2", children: [
835
- /* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(
836
- Y,
837
- {
838
- onClick: V,
839
- disabled: i,
840
- "aria-busy": i,
841
- children: [
842
- i ? /* @__PURE__ */ t(W, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ t(ge, { className: "h-5 w-5" }),
843
- /* @__PURE__ */ t("span", { children: "Leave Conversation" })
844
- ]
845
- }
846
- ) }),
847
- /* @__PURE__ */ t("li", { children: N ? /* @__PURE__ */ d(
848
- Y,
849
- {
850
- onClick: v,
851
- disabled: x,
852
- "aria-busy": x,
853
- children: [
854
- x ? /* @__PURE__ */ t(W, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ t(ne, { className: "h-5 w-5" }),
855
- /* @__PURE__ */ t("span", { children: "Unblock" })
856
- ]
857
- }
858
- ) : /* @__PURE__ */ d(
859
- Y,
860
- {
861
- onClick: R,
862
- disabled: x,
863
- "aria-busy": x,
864
- children: [
865
- x ? /* @__PURE__ */ t(W, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ t(ne, { className: "h-5 w-5" }),
866
- /* @__PURE__ */ t("span", { children: "Block" })
867
- ]
868
- }
869
- ) }),
870
- /* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(Y, { variant: "danger", onClick: y, children: [
871
- /* @__PURE__ */ t(ue, { className: "h-5 w-5" }),
872
- /* @__PURE__ */ t("span", { children: "Report" })
873
- ] }) })
874
671
  ] })
875
672
  ] })
876
- ] })
877
- }
673
+ }
674
+ )
878
675
  );
879
- }, ze = ({
880
- channel: n,
881
- onBack: a,
882
- showBackButton: l = !1,
883
- renderMessageInputActions: o,
884
- onLeaveConversation: c,
676
+ }, Fe = ({
677
+ channel: t,
678
+ onBack: s,
679
+ showBackButton: n = !1,
680
+ renderMessageInputActions: l,
681
+ onLeaveConversation: a,
885
682
  onBlockParticipant: m,
886
- className: u
683
+ className: d
887
684
  }) => {
888
- const [r, s] = A(!1), w = _.useMemo(() => Object.values(n.state.members || {}).find(
889
- (i) => {
685
+ const [r, o] = w(!1), b = $.useMemo(() => Object.values(t.state.members || {}).find(
686
+ (c) => {
890
687
  var C;
891
- return ((C = i.user) == null ? void 0 : C.id) && i.user.id !== n._client.userID;
688
+ return ((C = c.user) == null ? void 0 : C.id) && c.user.id !== t._client.userID;
892
689
  }
893
- ), [n._client.userID, n.state.members]), N = _.useMemo(() => {
894
- const g = n.data ?? {};
690
+ ), [t._client.userID, t.state.members]), x = $.useMemo(() => {
691
+ const g = t.data ?? {};
895
692
  return g.followerStatus ? String(g.followerStatus) : g.isFollower ? "Subscribed to you" : void 0;
896
- }, [n.data]);
897
- return /* @__PURE__ */ d("div", { className: L("h-full flex flex-col", u), children: [
898
- /* @__PURE__ */ t(Me, { channel: n, children: /* @__PURE__ */ d(pe, { children: [
899
- /* @__PURE__ */ t("div", { className: "border-b border-sand bg-white px-4 py-3", children: /* @__PURE__ */ t(
900
- Ge,
693
+ }, [t.data]);
694
+ return /* @__PURE__ */ i("div", { className: L("h-full flex flex-col", d), children: [
695
+ /* @__PURE__ */ e(Ne, { channel: t, children: /* @__PURE__ */ i(Ce, { children: [
696
+ /* @__PURE__ */ e("div", { className: "border-b border-sand bg-white px-4 py-3", children: /* @__PURE__ */ e(
697
+ Ue,
901
698
  {
902
- onBack: a,
903
- showBackButton: l,
904
- onShowInfo: () => s(!0),
905
- canShowInfo: !!w
699
+ onBack: s,
700
+ showBackButton: n,
701
+ onShowInfo: () => o(!0),
702
+ canShowInfo: !!b
906
703
  }
907
704
  ) }),
908
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ t(ye, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 }) }),
909
- /* @__PURE__ */ t(
910
- Be,
705
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ e(be, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 }) }),
706
+ /* @__PURE__ */ e(
707
+ Oe,
911
708
  {
912
- renderActions: () => o == null ? void 0 : o(n)
709
+ renderActions: () => l == null ? void 0 : l(t)
913
710
  }
914
711
  )
915
712
  ] }) }),
916
- /* @__PURE__ */ t(
917
- _e,
713
+ /* @__PURE__ */ e(
714
+ Le,
918
715
  {
919
716
  isOpen: r,
920
- onClose: () => s(!1),
921
- participant: w,
922
- channel: n,
923
- followerStatusLabel: N,
924
- onLeaveConversation: c,
717
+ onClose: () => o(!1),
718
+ participant: b,
719
+ channel: t,
720
+ followerStatusLabel: x,
721
+ onLeaveConversation: a,
925
722
  onBlockParticipant: m
926
723
  }
927
724
  )
928
725
  ] });
929
- }, We = /* @__PURE__ */ new Map([
930
- [
931
- "bold",
932
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M120,128a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm32-16a16,16,0,1,0,16,16A16,16,0,0,0,152,112Zm84,16A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z" }))
933
- ],
934
- [
935
- "duotone",
936
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
937
- "path",
938
- {
939
- d: "M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",
940
- opacity: "0.2"
941
- }
942
- ), /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z" }))
943
- ],
944
- [
945
- "fill",
946
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z" }))
947
- ],
948
- [
949
- "light",
950
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z" }))
951
- ],
952
- [
953
- "regular",
954
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z" }))
955
- ],
956
- [
957
- "thin",
958
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z" }))
959
- ]
960
- ]), le = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: We }));
961
- le.displayName = "ChatCircleDotsIcon";
962
- const Xe = /* @__PURE__ */ new Map([
963
- [
964
- "bold",
965
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z" }))
966
- ],
967
- [
968
- "duotone",
969
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
970
- ],
971
- [
972
- "fill",
973
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z" }))
974
- ],
975
- [
976
- "light",
977
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z" }))
978
- ],
979
- [
980
- "regular",
981
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
982
- ],
983
- [
984
- "thin",
985
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z" }))
986
- ]
987
- ]), be = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Xe }));
988
- be.displayName = "MagnifyingGlassIcon";
989
- function Qe({
990
- searchQuery: n,
991
- setSearchQuery: a,
992
- placeholder: l
726
+ };
727
+ function Me({
728
+ searchQuery: t,
729
+ setSearchQuery: s,
730
+ placeholder: n
993
731
  }) {
994
- const o = $(null);
995
- return /* @__PURE__ */ d("div", { className: "relative", children: [
996
- /* @__PURE__ */ t(
997
- be,
732
+ const l = A(null);
733
+ return /* @__PURE__ */ i("div", { className: "relative", children: [
734
+ /* @__PURE__ */ e(
735
+ ke,
998
736
  {
999
737
  className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone",
1000
738
  weight: "bold"
1001
739
  }
1002
740
  ),
1003
- /* @__PURE__ */ t(
741
+ /* @__PURE__ */ e(
1004
742
  "input",
1005
743
  {
1006
- ref: o,
744
+ ref: l,
1007
745
  type: "text",
1008
- placeholder: l,
1009
- value: n,
1010
- onChange: (c) => a(c.target.value),
746
+ placeholder: n,
747
+ value: t,
748
+ onChange: (a) => s(a.target.value),
1011
749
  className: "w-full pl-10 pr-10 py-3 text-sm border border-sand rounded-xl focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent"
1012
750
  }
1013
751
  ),
1014
- n && /* @__PURE__ */ t(
1015
- J,
752
+ t && /* @__PURE__ */ e(
753
+ q,
1016
754
  {
1017
755
  label: "Clear search",
1018
756
  onClick: () => {
1019
- var c;
1020
- a(""), (c = o.current) == null || c.focus();
757
+ var a;
758
+ s(""), (a = l.current) == null || a.focus();
1021
759
  },
1022
760
  className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-stone hover:text-charcoal",
1023
- children: /* @__PURE__ */ t(re, { className: "h-4 w-4", weight: "bold" })
761
+ children: /* @__PURE__ */ e(oe, { className: "h-4 w-4", weight: "bold" })
1024
762
  }
1025
763
  )
1026
764
  ] });
1027
765
  }
1028
- const qe = ({
1029
- participantSource: n,
1030
- onSelectParticipant: a,
1031
- onClose: l,
1032
- existingParticipantIds: o = /* @__PURE__ */ new Set(),
1033
- participantLabel: c = "participants",
766
+ const je = ({
767
+ participantSource: t,
768
+ onSelectParticipant: s,
769
+ onClose: n,
770
+ existingParticipantIds: l = /* @__PURE__ */ new Set(),
771
+ participantLabel: a = "participants",
1034
772
  searchPlaceholder: m = "Search participants...",
1035
- className: u
773
+ className: d
1036
774
  }) => {
1037
- const { debug: r } = K(), [s, w] = A(""), [N, g] = A([]), [i, C] = A(!1), [x, p] = A(null), [Z, V] = A(null), R = $(!1);
775
+ const { debug: r } = Z(), [o, b] = w(""), [x, g] = w([]), [c, C] = w(!1), [v, y] = w(null), [I, P] = w(
776
+ null
777
+ ), p = A(!1);
1038
778
  B(() => {
1039
- if (n.loading) {
1040
- r && console.log("[ParticipantPicker] Waiting for participant source to finish loading...");
779
+ if (t.loading) {
780
+ r && console.log(
781
+ "[ParticipantPicker] Waiting for participant source to finish loading..."
782
+ );
1041
783
  return;
1042
784
  }
1043
- if (R.current) return;
785
+ if (p.current) return;
1044
786
  (async () => {
1045
- r && console.log("[ParticipantPicker] Loading initial participants..."), C(!0), p(null);
787
+ r && console.log("[ParticipantPicker] Loading initial participants..."), C(!0), y(null);
1046
788
  try {
1047
- const h = await n.loadParticipants({
789
+ const f = await t.loadParticipants({
1048
790
  search: "",
1049
791
  // Load all participants initially
1050
792
  limit: 100
1051
793
  });
1052
- g(h.participants), R.current = !0, r && console.log("[ParticipantPicker] Participants loaded successfully:", h.participants.length);
1053
- } catch (h) {
1054
- const b = h instanceof Error ? h.message : "Failed to load participants";
1055
- p(b), console.error("[ParticipantPicker] Failed to load participants:", h);
794
+ g(f.participants), p.current = !0, r && console.log(
795
+ "[ParticipantPicker] Participants loaded successfully:",
796
+ f.participants.length
797
+ );
798
+ } catch (f) {
799
+ const N = f instanceof Error ? f.message : "Failed to load participants";
800
+ y(N), console.error("[ParticipantPicker] Failed to load participants:", f);
1056
801
  } finally {
1057
802
  C(!1);
1058
803
  }
1059
804
  })();
1060
- }, [n.loading, r]);
1061
- const v = N.filter((f) => !o.has(f.id)).filter((f) => {
1062
- var b;
1063
- if (!s) return !0;
1064
- const h = s.toLowerCase();
1065
- return f.name.toLowerCase().includes(h) || ((b = f.email) == null ? void 0 : b.toLowerCase().includes(h)) || !1;
1066
- }), y = H(async (f) => {
1067
- if (!Z) {
1068
- V(f.id);
1069
- try {
1070
- await a(f);
1071
- } catch (h) {
1072
- console.error("[ParticipantPicker] Failed to start chat:", h), V(null);
805
+ }, [t.loading, r]);
806
+ const E = x.filter((u) => !l.has(u.id)).filter((u) => {
807
+ var N;
808
+ if (!o) return !0;
809
+ const f = o.toLowerCase();
810
+ return u.name.toLowerCase().includes(f) || ((N = u.email) == null ? void 0 : N.toLowerCase().includes(f)) || !1;
811
+ }), R = U(
812
+ async (u) => {
813
+ if (!I) {
814
+ P(u.id);
815
+ try {
816
+ await s(u);
817
+ } catch (f) {
818
+ console.error("[ParticipantPicker] Failed to start chat:", f), P(null);
819
+ }
1073
820
  }
1074
- }
1075
- }, [a, Z]), F = (f, h) => {
1076
- (f.key === "Enter" || f.key === " ") && (f.preventDefault(), y(h));
821
+ },
822
+ [s, I]
823
+ ), T = (u, f) => {
824
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), R(f));
1077
825
  };
1078
- return /* @__PURE__ */ d("div", { className: L("flex flex-col h-full", u), children: [
1079
- /* @__PURE__ */ d("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
1080
- /* @__PURE__ */ d("div", { className: "flex items-center justify-between mb-3", children: [
1081
- /* @__PURE__ */ t("h2", { className: "text-lg font-semibold text-charcoal", children: "Start a new Conversation" }),
1082
- /* @__PURE__ */ t(xe, { onClick: l })
826
+ return /* @__PURE__ */ i("div", { className: L("flex flex-col h-full", d), children: [
827
+ /* @__PURE__ */ i("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
828
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
829
+ /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Start a new Conversation" }),
830
+ /* @__PURE__ */ e(ie, { onClick: n })
1083
831
  ] }),
1084
- /* @__PURE__ */ d("p", { className: "text-xs text-stone mb-3", children: [
832
+ /* @__PURE__ */ i("p", { className: "text-xs text-stone mb-3", children: [
1085
833
  "Select a ",
1086
- c.slice(0, -1),
834
+ a.slice(0, -1),
1087
835
  " to start messaging (",
1088
- v.length,
836
+ E.length,
1089
837
  " available)",
1090
- n.totalCount !== void 0 && ` • ${n.totalCount} ${c} total`
838
+ t.totalCount !== void 0 && ` • ${t.totalCount} ${a} total`
1091
839
  ] }),
1092
- /* @__PURE__ */ t(
1093
- Qe,
840
+ /* @__PURE__ */ e(
841
+ Me,
1094
842
  {
1095
- searchQuery: s,
1096
- setSearchQuery: w,
843
+ searchQuery: o,
844
+ setSearchQuery: b,
1097
845
  placeholder: m
1098
846
  }
1099
847
  )
1100
848
  ] }),
1101
- x && /* @__PURE__ */ d("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
849
+ v && /* @__PURE__ */ i("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
1102
850
  "Error loading ",
1103
- c,
851
+ a,
1104
852
  ": ",
1105
- x
853
+ v
1106
854
  ] }),
1107
- /* @__PURE__ */ t("div", { className: "flex-1 overflow-auto", children: i && v.length === 0 ? /* @__PURE__ */ t("div", { className: "h-32 flex items-center justify-center", children: /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
1108
- /* @__PURE__ */ t("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
1109
- /* @__PURE__ */ d("span", { className: "text-sm text-stone", children: [
855
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children: c && E.length === 0 ? /* @__PURE__ */ e("div", { className: "h-32 flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
856
+ /* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
857
+ /* @__PURE__ */ i("span", { className: "text-sm text-stone", children: [
1110
858
  "Loading ",
1111
- c,
859
+ a,
1112
860
  "..."
1113
861
  ] })
1114
- ] }) }) : v.length === 0 ? /* @__PURE__ */ d("div", { className: "p-6 text-center", children: [
1115
- /* @__PURE__ */ t("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ t(le, { className: "h-8 w-8 text-charcoal" }) }),
1116
- /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: s ? `No ${c} found` : N.length > 0 ? `Already chatting with all ${c}` : `No ${c} yet` }),
1117
- /* @__PURE__ */ t("p", { className: "text-xs text-stone", children: s ? "Try a different search term" : N.length > 0 ? `You have existing conversations with all your ${c}` : `${c.charAt(0).toUpperCase() + c.slice(1)} will appear here` })
1118
- ] }) : /* @__PURE__ */ d("ul", { className: "space-y-0", children: [
1119
- v.map((f) => {
1120
- const h = f.name || f.email || f.id, b = f.email && f.name ? f.email : f.phone;
1121
- return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
862
+ ] }) }) : E.length === 0 ? /* @__PURE__ */ i("div", { className: "p-6 text-center", children: [
863
+ /* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(ne, { className: "h-8 w-8 text-charcoal" }) }),
864
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: o ? `No ${a} found` : x.length > 0 ? `Already chatting with all ${a}` : `No ${a} yet` }),
865
+ /* @__PURE__ */ e("p", { className: "text-xs text-stone", children: o ? "Try a different search term" : x.length > 0 ? `You have existing conversations with all your ${a}` : `${a.charAt(0).toUpperCase() + a.slice(1)} will appear here` })
866
+ ] }) : /* @__PURE__ */ i("ul", { className: "space-y-0", children: [
867
+ E.map((u) => {
868
+ const f = u.name || u.email || u.id, N = u.email && u.name ? u.email : u.phone;
869
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
1122
870
  "button",
1123
871
  {
1124
872
  type: "button",
1125
- onClick: () => y(f),
1126
- onKeyDown: (M) => F(M, f),
873
+ onClick: () => R(u),
874
+ onKeyDown: (S) => T(S, u),
1127
875
  className: "w-full px-4 py-3 hover:bg-sand transition-colors border-b border-sand text-left focus:outline-none focus:ring-2 focus:ring-black",
1128
- children: /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
1129
- /* @__PURE__ */ d("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
1130
- /* @__PURE__ */ t(
1131
- ee,
876
+ children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
877
+ /* @__PURE__ */ i("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
878
+ /* @__PURE__ */ e(
879
+ Y,
1132
880
  {
1133
- id: f.id,
1134
- name: h,
1135
- image: f.image,
881
+ id: u.id,
882
+ name: f,
883
+ image: u.image,
1136
884
  size: 40
1137
885
  }
1138
886
  ),
1139
- /* @__PURE__ */ d("div", { className: "flex-1 min-w-0", children: [
1140
- /* @__PURE__ */ t("h4", { className: "text-sm font-medium text-charcoal truncate", children: h }),
1141
- b && /* @__PURE__ */ t("p", { className: "text-xs text-stone truncate", children: b })
887
+ /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
888
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-charcoal truncate", children: f }),
889
+ N && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: N })
1142
890
  ] })
1143
891
  ] }),
1144
- /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: Z === f.id ? /* @__PURE__ */ t(W, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ t(le, { className: "h-5 w-5 text-stone" }) })
892
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: I === u.id ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(ne, { className: "h-5 w-5 text-stone" }) })
1145
893
  ] })
1146
894
  }
1147
- ) }, f.id);
895
+ ) }, u.id);
1148
896
  }),
1149
- i && /* @__PURE__ */ t("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
1150
- /* @__PURE__ */ t("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
1151
- /* @__PURE__ */ t("span", { className: "text-sm text-stone", children: "Loading more..." })
897
+ c && /* @__PURE__ */ e("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
898
+ /* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
899
+ /* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading more..." })
1152
900
  ] }) })
1153
901
  ] }) })
1154
902
  ] });
1155
- }, Ye = () => K(), Je = ({ hasChannels: n, onStartConversation: a, participantLabel: l }) => /* @__PURE__ */ t("div", { className: "flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ d("div", { className: "text-center max-w-sm", children: [
1156
- /* @__PURE__ */ t("div", { className: "w-24 h-24 bg-primary-alt bg-opacity-10 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ t("span", { className: "text-4xl", children: "💬" }) }),
1157
- /* @__PURE__ */ t("h2", { className: "font-semibold text-charcoal", children: "Welcome to Messages" }),
1158
- /* @__PURE__ */ t("p", { className: "text-stone text-sm mb-6", children: n ? /* @__PURE__ */ d(oe, { children: [
903
+ }, Ae = ({ hasChannels: t, onStartConversation: s, participantLabel: n }) => /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ i("div", { className: "text-center max-w-sm", children: [
904
+ /* @__PURE__ */ e("div", { className: "w-24 h-24 bg-primary-alt/10 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "💬" }) }),
905
+ /* @__PURE__ */ e("h2", { className: "font-semibold text-charcoal", children: "Welcome to Messages" }),
906
+ /* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t ? /* @__PURE__ */ i(se, { children: [
1159
907
  "Choose a conversation from the list or",
1160
908
  " ",
1161
- a && /* @__PURE__ */ d(ce, { onClick: a, children: [
909
+ s && /* @__PURE__ */ i(re, { onClick: s, children: [
1162
910
  "start a new conversation with a ",
1163
- l.slice(0, -1),
911
+ n.slice(0, -1),
1164
912
  "."
1165
913
  ] })
1166
- ] }) : a && /* @__PURE__ */ d(oe, { children: [
1167
- /* @__PURE__ */ d(ce, { onClick: a, children: [
914
+ ] }) : s && /* @__PURE__ */ i(se, { children: [
915
+ /* @__PURE__ */ i(re, { onClick: s, children: [
1168
916
  "Start a new conversation with one of your ",
1169
- l
917
+ n
1170
918
  ] }),
1171
919
  " ",
1172
920
  "to begin messaging."
1173
921
  ] }) })
1174
- ] }) }), ce = ({ onClick: n, children: a }) => /* @__PURE__ */ t(
922
+ ] }) }), re = ({
923
+ onClick: t,
924
+ children: s
925
+ }) => /* @__PURE__ */ e(
1175
926
  "button",
1176
927
  {
1177
928
  type: "button",
1178
- onClick: n,
929
+ onClick: t,
1179
930
  className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:text-primary-alt focus:outline-none focus:ring-2 focus:ring-primary",
1180
- children: a
931
+ children: s
1181
932
  }
1182
- ), Ke = ({ className: n, message: a }) => /* @__PURE__ */ d(
933
+ ), le = ({ error: t, onRetry: s }) => /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-full p-8", children: /* @__PURE__ */ i("div", { className: "text-center max-w-md", children: [
934
+ /* @__PURE__ */ e("div", { className: "w-24 h-24 bg-danger-alt rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "⚠️" }) }),
935
+ /* @__PURE__ */ e("h2", { className: "text-xl font-semibold text-charcoal mb-3", children: "Connection Error" }),
936
+ /* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t }),
937
+ s && /* @__PURE__ */ e(
938
+ "button",
939
+ {
940
+ type: "button",
941
+ onClick: s,
942
+ className: "inline-flex items-center px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-alt focus:outline-none focus:ring-2 focus:ring-primary transition-colors",
943
+ children: "Try Again"
944
+ }
945
+ )
946
+ ] }) }), Be = ({ className: t, message: s }) => /* @__PURE__ */ i(
1183
947
  "div",
1184
948
  {
1185
- className: L("flex items-center justify-center h-full", n),
949
+ className: L("flex items-center justify-center h-full", t),
1186
950
  children: [
1187
- /* @__PURE__ */ d("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
1188
- /* @__PURE__ */ t("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ t(
951
+ /* @__PURE__ */ i("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
952
+ /* @__PURE__ */ e("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ e(
1189
953
  "animateTransform",
1190
954
  {
1191
955
  attributeName: "transform",
@@ -1196,7 +960,7 @@ const qe = ({
1196
960
  begin: "0.1"
1197
961
  }
1198
962
  ) }),
1199
- /* @__PURE__ */ t("circle", { cx: "30", cy: "50", r: "6", children: /* @__PURE__ */ t(
963
+ /* @__PURE__ */ e("circle", { cx: "30", cy: "50", r: "6", children: /* @__PURE__ */ e(
1200
964
  "animateTransform",
1201
965
  {
1202
966
  attributeName: "transform",
@@ -1207,7 +971,7 @@ const qe = ({
1207
971
  begin: "0.2"
1208
972
  }
1209
973
  ) }),
1210
- /* @__PURE__ */ t("circle", { cx: "54", cy: "50", r: "6", children: /* @__PURE__ */ t(
974
+ /* @__PURE__ */ e("circle", { cx: "54", cy: "50", r: "6", children: /* @__PURE__ */ e(
1211
975
  "animateTransform",
1212
976
  {
1213
977
  attributeName: "transform",
@@ -1219,246 +983,248 @@ const qe = ({
1219
983
  }
1220
984
  ) })
1221
985
  ] }),
1222
- a && /* @__PURE__ */ t("span", { className: "text-stone", children: a })
986
+ s && /* @__PURE__ */ e("span", { className: "text-stone", children: s })
1223
987
  ]
1224
988
  }
1225
- ), e1 = () => /* @__PURE__ */ t("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ d("div", { className: "flex items-center", children: [
1226
- /* @__PURE__ */ t(Ke, { className: "w-6 h-6" }),
1227
- /* @__PURE__ */ t("span", { className: "text-sm text-stone", children: "Loading messages" })
1228
- ] }) }), ie = ({ error: n, onRetry: a }) => /* @__PURE__ */ t("div", { className: "flex items-center justify-center h-full p-8", children: /* @__PURE__ */ d("div", { className: "text-center max-w-md", children: [
1229
- /* @__PURE__ */ t("div", { className: "w-24 h-24 bg-danger-alt rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ t("span", { className: "text-4xl", children: "⚠️" }) }),
1230
- /* @__PURE__ */ t("h2", { className: "text-xl font-semibold text-charcoal mb-3", children: "Connection Error" }),
1231
- /* @__PURE__ */ t("p", { className: "text-stone text-sm mb-6", children: n }),
1232
- a && /* @__PURE__ */ t(
1233
- "button",
1234
- {
1235
- type: "button",
1236
- onClick: a,
1237
- className: "inline-flex items-center px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-alt focus:outline-none focus:ring-2 focus:ring-primary transition-colors",
1238
- children: "Try Again"
1239
- }
1240
- )
1241
- ] }) }), o1 = ({
1242
- capabilities: n = {},
1243
- customization: a = {},
1244
- className: l,
1245
- renderMessageInputActions: o,
1246
- onChannelSelect: c,
1247
- onParticipantSelect: m
989
+ ), He = () => /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
990
+ /* @__PURE__ */ e(Be, { className: "w-6 h-6" }),
991
+ /* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
992
+ ] }) }), Qe = ({
993
+ capabilities: t = {},
994
+ className: s,
995
+ renderMessageInputActions: n,
996
+ onChannelSelect: l,
997
+ onParticipantSelect: a
1248
998
  }) => {
1249
999
  const {
1250
- service: u,
1251
- client: r,
1252
- isConnected: s,
1253
- isLoading: w,
1254
- error: N,
1255
- refreshConnection: g,
1256
- debug: i
1257
- } = Ye(), [C, x] = A(null), [p, Z] = A(!1), [V, R] = A(!1), [v, y] = A(/* @__PURE__ */ new Set()), [F, f] = A(0), h = $(null), {
1258
- showStartConversation: b = !1,
1259
- participantSource: M,
1260
- participantLabel: U = "participants"
1261
- } = n, k = $(null), P = H(async () => {
1262
- if (!r || !s) return;
1263
- const E = r.userID;
1264
- if (E)
1000
+ service: m,
1001
+ client: d,
1002
+ isConnected: r,
1003
+ isLoading: o,
1004
+ error: b,
1005
+ refreshConnection: x,
1006
+ debug: g
1007
+ } = Pe(), [c, C] = w(null), [v, y] = w(!1), [I, P] = w(!1), [p, E] = w(/* @__PURE__ */ new Set()), [R, T] = w(0), u = A(null), {
1008
+ showStartConversation: f = !1,
1009
+ participantSource: N,
1010
+ participantLabel: S = "participants"
1011
+ } = t, j = A(null), F = U(async () => {
1012
+ if (!d || !r) return;
1013
+ const h = d.userID;
1014
+ if (h)
1265
1015
  try {
1266
- i && console.log("[MessagingShell] Syncing channels for user:", E);
1267
- const O = await r.queryChannels(
1016
+ g && console.log("[MessagingShell] Syncing channels for user:", h);
1017
+ const O = await d.queryChannels(
1268
1018
  {
1269
1019
  type: "messaging",
1270
- members: { $in: [E] }
1020
+ members: { $in: [h] }
1271
1021
  },
1272
1022
  {},
1273
1023
  { limit: 100 }
1274
- ), j = /* @__PURE__ */ new Set();
1275
- O.forEach((te) => {
1276
- const Ne = te.state.members || {};
1277
- Object.values(Ne).forEach((Ce) => {
1278
- var se;
1279
- const ae = (se = Ce.user) == null ? void 0 : se.id;
1280
- ae && ae !== E && j.add(ae);
1024
+ ), M = /* @__PURE__ */ new Set();
1025
+ O.forEach((J) => {
1026
+ const ce = J.state.members;
1027
+ Object.values(ce).forEach((de) => {
1028
+ var ee;
1029
+ const K = (ee = de.user) == null ? void 0 : ee.id;
1030
+ K && K !== h && M.add(K);
1281
1031
  });
1282
- }), y(j), Z(O.length > 0), k.current = E, i && console.log("[MessagingShell] Channels synced successfully:", {
1032
+ }), E(M), y(O.length > 0), j.current = h, g && console.log("[MessagingShell] Channels synced successfully:", {
1283
1033
  channelCount: O.length,
1284
- memberCount: j.size
1034
+ memberCount: M.size
1285
1035
  });
1286
1036
  } catch (O) {
1287
1037
  console.error("[MessagingShell] Failed to sync channels:", O);
1288
1038
  }
1289
- }, [r, s, i]);
1039
+ }, [d, r, g]);
1290
1040
  B(() => {
1291
- if (!r || !s) return;
1292
- const E = r.userID;
1293
- E && k.current !== E && P();
1294
- }, [r, s, P]);
1295
- const X = H((E) => {
1296
- x(E), c == null || c(E);
1297
- }, [c]), Q = H(() => {
1298
- x(null);
1299
- }, []), z = H(() => {
1300
- var E;
1301
- M && (f((O) => O + 1), R(!0), (E = h.current) == null || E.showModal());
1302
- }, [M]), q = H(async (E) => {
1303
- var O;
1304
- if (u)
1305
- try {
1306
- i && console.log("[MessagingShell] Starting conversation with:", E.id);
1307
- const j = await u.startChannelWithFollower({
1308
- id: E.id,
1309
- name: E.name,
1310
- email: E.email,
1311
- phone: E.phone
1312
- });
1041
+ if (!d || !r) return;
1042
+ const h = d.userID;
1043
+ h && j.current !== h && F();
1044
+ }, [d, r, F]);
1045
+ const H = U(
1046
+ (h) => {
1047
+ C(h), l == null || l(h);
1048
+ },
1049
+ [l]
1050
+ ), V = U(() => {
1051
+ C(null);
1052
+ }, []), _ = U(() => {
1053
+ var h;
1054
+ N && (T((O) => O + 1), P(!0), (h = u.current) == null || h.showModal());
1055
+ }, [N]), W = U(
1056
+ async (h) => {
1057
+ var O;
1058
+ if (m)
1313
1059
  try {
1314
- await j.show();
1315
- } catch (te) {
1316
- console.warn("[MessagingShell] Failed to unhide channel:", te);
1060
+ g && console.log(
1061
+ "[MessagingShell] Starting conversation with:",
1062
+ h.id
1063
+ );
1064
+ const M = await m.startChannelWithFollower({
1065
+ id: h.id,
1066
+ name: h.name,
1067
+ email: h.email,
1068
+ phone: h.phone
1069
+ });
1070
+ try {
1071
+ await M.show();
1072
+ } catch (J) {
1073
+ console.warn("[MessagingShell] Failed to unhide channel:", J);
1074
+ }
1075
+ C(M), P(!1), (O = u.current) == null || O.close(), a == null || a(h);
1076
+ } catch (M) {
1077
+ console.error("[MessagingShell] Failed to start conversation:", M);
1317
1078
  }
1318
- x(j), R(!1), (O = h.current) == null || O.close(), m == null || m(E);
1319
- } catch (j) {
1320
- console.error("[MessagingShell] Failed to start conversation:", j);
1321
- }
1322
- }, [u, m, i]), G = H(() => {
1323
- var E;
1324
- R(!1), (E = h.current) == null || E.close();
1325
- }, []), I = H(async (E) => {
1326
- i && console.log("[MessagingShell] Leaving conversation:", E.id), x(null), k.current = null, await P();
1327
- }, [P, i]), S = H(async (E) => {
1328
- i && console.log("[MessagingShell] Blocking participant:", E), x(null), k.current = null, await P();
1329
- }, [P, i]), T = !!C;
1330
- return w ? /* @__PURE__ */ t("div", { className: L("h-full", l), children: /* @__PURE__ */ t(e1, {}) }) : N ? /* @__PURE__ */ t("div", { className: L("h-full", l), children: /* @__PURE__ */ t(ie, { error: N, onRetry: g }) }) : !s || !r ? /* @__PURE__ */ t("div", { className: L("h-full", l), children: /* @__PURE__ */ t(
1331
- ie,
1079
+ },
1080
+ [m, a, g]
1081
+ ), G = U(() => {
1082
+ var h;
1083
+ P(!1), (h = u.current) == null || h.close();
1084
+ }, []), z = U(
1085
+ async (h) => {
1086
+ g && console.log("[MessagingShell] Leaving conversation:", h.id), C(null), j.current = null, await F();
1087
+ },
1088
+ [F, g]
1089
+ ), k = U(
1090
+ async (h) => {
1091
+ g && console.log("[MessagingShell] Blocking participant:", h), C(null), j.current = null, await F();
1092
+ },
1093
+ [F, g]
1094
+ ), D = !!c;
1095
+ return o ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(He, {}) }) : b ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(le, { error: b, onRetry: x }) }) : !r || !d ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(
1096
+ le,
1332
1097
  {
1333
1098
  error: "Not connected to messaging service",
1334
- onRetry: g
1099
+ onRetry: x
1335
1100
  }
1336
- ) }) : /* @__PURE__ */ d("div", { className: L("h-full bg-white overflow-hidden", l), children: [
1337
- /* @__PURE__ */ d("div", { className: "flex h-full min-h-0", children: [
1338
- /* @__PURE__ */ t(
1101
+ ) }) : /* @__PURE__ */ i("div", { className: L("h-full bg-white overflow-hidden", s), children: [
1102
+ /* @__PURE__ */ i("div", { className: "flex h-full min-h-0", children: [
1103
+ /* @__PURE__ */ e(
1339
1104
  "div",
1340
1105
  {
1341
1106
  className: L(
1342
1107
  "min-h-0 min-w-0 bg-white lg:bg-chalk lg:flex lg:flex-col lg:border-r lg:border-sand",
1343
1108
  {
1344
- "hidden lg:flex lg:w-80 lg:min-w-[280px] lg:max-w-[360px]": T,
1345
- "flex flex-col w-full lg:flex-1 lg:max-w-2xl": !T
1109
+ "hidden lg:flex lg:w-80 lg:min-w-[280px] lg:max-w-[360px]": D,
1110
+ "flex flex-col w-full lg:flex-1 lg:max-w-2xl": !D
1346
1111
  }
1347
1112
  ),
1348
- children: /* @__PURE__ */ t(
1349
- ke,
1113
+ children: /* @__PURE__ */ e(
1114
+ pe,
1350
1115
  {
1351
- onChannelSelect: X,
1352
- selectedChannel: C || void 0,
1353
- showStartConversation: b && !!M,
1354
- onStartConversation: z,
1355
- participantLabel: U
1116
+ onChannelSelect: H,
1117
+ selectedChannel: c || void 0,
1118
+ showStartConversation: f && !!N,
1119
+ onStartConversation: _,
1120
+ participantLabel: S
1356
1121
  }
1357
1122
  )
1358
1123
  }
1359
1124
  ),
1360
- /* @__PURE__ */ t(
1125
+ /* @__PURE__ */ e(
1361
1126
  "div",
1362
1127
  {
1363
1128
  className: L("flex-1 flex-col min-w-0 min-h-0", {
1364
- "hidden lg:flex": !T,
1365
- flex: T
1129
+ "hidden lg:flex": !D,
1130
+ flex: D
1366
1131
  }),
1367
- children: C ? /* @__PURE__ */ t("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ t(
1368
- ze,
1132
+ children: c ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
1133
+ Fe,
1369
1134
  {
1370
- channel: C,
1371
- onBack: Q,
1135
+ channel: c,
1136
+ onBack: V,
1372
1137
  showBackButton: !0,
1373
- renderMessageInputActions: o,
1374
- onLeaveConversation: I,
1375
- onBlockParticipant: S
1138
+ renderMessageInputActions: n,
1139
+ onLeaveConversation: z,
1140
+ onBlockParticipant: k
1376
1141
  },
1377
- C.id
1378
- ) }) : /* @__PURE__ */ t(
1379
- Je,
1142
+ c.id
1143
+ ) }) : /* @__PURE__ */ e(
1144
+ Ae,
1380
1145
  {
1381
- hasChannels: p,
1382
- onStartConversation: b ? z : void 0,
1383
- participantLabel: U
1146
+ hasChannels: v,
1147
+ onStartConversation: f ? _ : void 0,
1148
+ participantLabel: S
1384
1149
  }
1385
1150
  )
1386
1151
  }
1387
1152
  )
1388
1153
  ] }),
1389
- M && /* @__PURE__ */ t(
1154
+ N && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
1155
+ /* @__PURE__ */ e(
1390
1156
  "dialog",
1391
1157
  {
1392
- ref: h,
1158
+ ref: u,
1393
1159
  className: "mes-dialog",
1394
- onClick: (E) => {
1395
- E.target === h.current && G();
1160
+ onClick: (h) => {
1161
+ h.target === u.current && G();
1396
1162
  },
1397
1163
  onClose: G,
1398
- children: /* @__PURE__ */ t("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ t(
1399
- qe,
1164
+ children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
1165
+ je,
1400
1166
  {
1401
- participantSource: M,
1402
- onSelectParticipant: q,
1167
+ participantSource: N,
1168
+ onSelectParticipant: W,
1403
1169
  onClose: G,
1404
- existingParticipantIds: v,
1405
- participantLabel: U,
1406
- searchPlaceholder: `Search ${U}...`
1170
+ existingParticipantIds: p,
1171
+ participantLabel: S,
1172
+ searchPlaceholder: `Search ${S}...`
1407
1173
  },
1408
- F
1174
+ R
1409
1175
  ) })
1410
1176
  }
1411
1177
  )
1412
1178
  ] });
1413
- }, c1 = (n, a = {}) => {
1414
- const { initialSearch: l = "", pageSize: o = 20 } = a, [c, m] = A([]), [u, r] = A(!1), [s, w] = A(null), [N, g] = A(l), [i, C] = A(!0), [x, p] = A(), Z = H(async (y = !1, F) => {
1415
- if (u) return;
1416
- const f = F !== void 0 ? F : N;
1417
- r(!0), w(null);
1179
+ }, Ze = (t, s = {}) => {
1180
+ const { initialSearch: n = "", pageSize: l = 20 } = s, [a, m] = w([]), [d, r] = w(!1), [o, b] = w(null), [x, g] = w(n), [c, C] = w(!0), [v, y] = w(), I = U(async (R = !1, T) => {
1181
+ if (d) return;
1182
+ const u = T !== void 0 ? T : x;
1183
+ r(!0), b(null);
1418
1184
  try {
1419
- const h = await n.loadParticipants({
1420
- search: f || void 0,
1421
- limit: o,
1422
- cursor: y ? void 0 : x
1185
+ const f = await t.loadParticipants({
1186
+ search: u || void 0,
1187
+ limit: l,
1188
+ cursor: R ? void 0 : v
1423
1189
  });
1424
1190
  m(
1425
- (b) => y ? h.participants : [...b, ...h.participants]
1426
- ), C(h.hasMore), p(h.nextCursor);
1427
- } catch (h) {
1428
- const b = h instanceof Error ? h.message : "Failed to load participants";
1429
- w(b), console.error("[useParticipants] Load error:", h);
1191
+ (N) => R ? f.participants : [...N, ...f.participants]
1192
+ ), C(f.hasMore), y(f.nextCursor);
1193
+ } catch (f) {
1194
+ const N = f instanceof Error ? f.message : "Failed to load participants";
1195
+ b(N), console.error("[useParticipants] Load error:", f);
1430
1196
  } finally {
1431
1197
  r(!1);
1432
1198
  }
1433
- }, [n, N, x, o, u]), V = H(() => {
1434
- i && !u && Z(!1);
1435
- }, [i, u, Z]), R = H((y) => {
1436
- g(y), p(void 0), Z(!0, y);
1437
- }, [Z]), v = H(() => {
1438
- p(void 0), Z(!0);
1439
- }, [Z]);
1199
+ }, [t, x, v, l, d]), P = U(() => {
1200
+ c && !d && I(!1);
1201
+ }, [c, d, I]), p = U((R) => {
1202
+ g(R), y(void 0), I(!0, R);
1203
+ }, [I]), E = U(() => {
1204
+ y(void 0), I(!0);
1205
+ }, [I]);
1440
1206
  return B(() => {
1441
- Z(!0);
1442
- }, [n.loadParticipants]), {
1443
- participants: c,
1444
- loading: u,
1445
- error: s,
1446
- searchQuery: N,
1447
- hasMore: i,
1448
- totalCount: n.totalCount,
1449
- loadMore: V,
1450
- search: R,
1451
- refresh: v
1207
+ I(!0);
1208
+ }, [t.loadParticipants]), {
1209
+ participants: a,
1210
+ loading: d,
1211
+ error: o,
1212
+ searchQuery: x,
1213
+ hasMore: c,
1214
+ totalCount: t.totalCount,
1215
+ loadMore: P,
1216
+ search: p,
1217
+ refresh: E
1452
1218
  };
1453
1219
  };
1454
1220
  export {
1455
- ee as Avatar,
1456
- ke as ChannelList,
1457
- ze as ChannelView,
1458
- s1 as MessagingProvider,
1459
- o1 as MessagingShell,
1460
- qe as ParticipantPicker,
1461
- Ye as useMessaging,
1462
- c1 as useParticipants
1221
+ Y as Avatar,
1222
+ pe as ChannelList,
1223
+ Fe as ChannelView,
1224
+ Xe as MessagingProvider,
1225
+ Qe as MessagingShell,
1226
+ je as ParticipantPicker,
1227
+ Pe as useMessaging,
1228
+ Ze as useParticipants
1463
1229
  };
1464
1230
  //# sourceMappingURL=index.js.map