@linktr.ee/messaging-react 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ const Ge = at({
15
15
  refreshConnection: async () => {
16
16
  },
17
17
  debug: !1
18
- }), ve = () => rt(Ge), js = ({
18
+ }), ve = () => rt(Ge), Gs = ({
19
19
  children: t,
20
20
  user: s,
21
21
  serviceConfig: n,
@@ -35,7 +35,7 @@ const Ge = at({
35
35
  serviceConfig: !!n,
36
36
  capabilities: Object.keys(l)
37
37
  });
38
- const [u, g] = S(null), [x, v] = S(null), [b, y] = S(!1), [o, w] = S(!1), [I, p] = S(null), M = Z(!1), C = Z({
38
+ const [u, f] = S(null), [g, v] = S(null), [b, y] = S(!1), [o, w] = S(!1), [I, p] = S(null), M = Z(!1), C = Z({
39
39
  userId: s == null ? void 0 : s.id,
40
40
  apiKey: a,
41
41
  serviceConfig: n,
@@ -84,7 +84,7 @@ const Ge = at({
84
84
  apiKey: a,
85
85
  debug: d
86
86
  });
87
- return g(i), r("✅ SERVICE SET", {
87
+ return f(i), r("✅ SERVICE SET", {
88
88
  renderCount: m,
89
89
  serviceInstance: !!i
90
90
  }), () => {
@@ -94,7 +94,7 @@ const Ge = at({
94
94
  }), i.disconnectUser().catch(console.error);
95
95
  };
96
96
  }, [a, n, d, r]);
97
- const f = Z(null);
97
+ const x = Z(null);
98
98
  J(() => {
99
99
  var i, E;
100
100
  if (r("🔗 USER CONNECTION EFFECT TRIGGERED", {
@@ -112,7 +112,7 @@ const Ge = at({
112
112
  r("⚠️ USER CONNECTION SKIPPED", "Already connecting");
113
113
  return;
114
114
  }
115
- if (((i = f.current) == null ? void 0 : i.serviceId) === u && ((E = f.current) == null ? void 0 : E.userId) === s.id) {
115
+ if (((i = x.current) == null ? void 0 : i.serviceId) === u && ((E = x.current) == null ? void 0 : E.userId) === s.id) {
116
116
  r(
117
117
  "⚠️ USER CONNECTION SKIPPED",
118
118
  "Already connected this user with this service"
@@ -124,7 +124,7 @@ const Ge = at({
124
124
  try {
125
125
  r("📞 CALLING SERVICE.CONNECTUSER", { userId: s.id });
126
126
  const D = await u.connectUser(s);
127
- v(D), y(!0), f.current = { serviceId: u, userId: s.id }, r("✅ USER CONNECTION SUCCESS", {
127
+ v(D), y(!0), x.current = { serviceId: u, userId: s.id }, r("✅ USER CONNECTION SUCCESS", {
128
128
  userId: s.id,
129
129
  clientId: D.userID
130
130
  });
@@ -148,7 +148,7 @@ const Ge = at({
148
148
  u && b ? (r(
149
149
  "🧹 CLEANUP EFFECT TRIGGERED",
150
150
  "Cleaning up connection on unmount"
151
- ), f.current = null, u.disconnectUser().catch(console.error)) : r("🔇 CLEANUP EFFECT SKIPPED", {
151
+ ), x.current = null, u.disconnectUser().catch(console.error)) : r("🔇 CLEANUP EFFECT SKIPPED", {
152
152
  hasService: !!u,
153
153
  isConnected: b
154
154
  });
@@ -177,14 +177,14 @@ const Ge = at({
177
177
  }
178
178
  }, [u, s, r]), h = A.useMemo(() => (r("💫 CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!u,
180
- hasClient: !!x,
180
+ hasClient: !!g,
181
181
  isConnected: b,
182
182
  isLoading: o,
183
183
  hasError: !!I,
184
184
  capabilitiesKeys: Object.keys(l)
185
185
  }), {
186
186
  service: u,
187
- client: x,
187
+ client: g,
188
188
  isConnected: b,
189
189
  isLoading: o,
190
190
  error: I,
@@ -193,7 +193,7 @@ const Ge = at({
193
193
  debug: d
194
194
  }), [
195
195
  u,
196
- x,
196
+ g,
197
197
  b,
198
198
  o,
199
199
  I,
@@ -204,12 +204,12 @@ const Ge = at({
204
204
  ]);
205
205
  return r("🔄 RENDER END", {
206
206
  renderCount: N.current,
207
- willRenderChat: !!(x && b),
207
+ willRenderChat: !!(g && b),
208
208
  contextValueReady: !!h
209
- }), /* @__PURE__ */ e(Ge.Provider, { value: h, children: x && b ? /* @__PURE__ */ e(
209
+ }), /* @__PURE__ */ e(Ge.Provider, { value: h, children: g && b ? /* @__PURE__ */ e(
210
210
  lt,
211
211
  {
212
- client: x,
212
+ client: g,
213
213
  customClasses: {
214
214
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
215
215
  },
@@ -290,7 +290,7 @@ const ee = ({
290
290
  className: a,
291
291
  shape: l = "squircle"
292
292
  }) => {
293
- const d = ss(t), u = n < 32 ? "text-xs" : n < 56 ? "text-sm" : n < 120 ? "text-lg" : "text-4xl", g = l === "circle" ? { borderRadius: "50%" } : {
293
+ const d = ss(t), u = n < 32 ? "text-xs" : n < 56 ? "text-sm" : n < 120 ? "text-lg" : "text-4xl", f = l === "circle" ? { borderRadius: "50%" } : {
294
294
  borderRadius: "33%",
295
295
  "corner-shape": "superellipse(1.3)"
296
296
  };
@@ -301,7 +301,7 @@ const ee = ({
301
301
  style: {
302
302
  width: `${n}px`,
303
303
  height: `${n}px`,
304
- ...g
304
+ ...f
305
305
  },
306
306
  children: s ? /* @__PURE__ */ e(
307
307
  "img",
@@ -371,27 +371,27 @@ const ee = ({
371
371
  /* @__PURE__ */ e("span", { children: w })
372
372
  ] });
373
373
  }
374
- const r = n && a, u = r ? "Sent with AI" : "Sent with DM Agent", g = [
374
+ const r = n && a, u = r ? "Sent with AI" : "Sent with DM Agent", f = [
375
375
  "message-chatbot-indicator",
376
376
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
377
377
  r ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
378
- ].join(" "), x = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: u }), v = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ e(ns, { size: r ? 12 : 15 }) });
379
- return /* @__PURE__ */ e("div", { className: g, "data-testid": "message-chatbot-indicator", children: n && !r ? /* @__PURE__ */ c(de, { children: [
380
- x,
378
+ ].join(" "), g = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: u }), v = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ e(ns, { size: r ? 12 : 15 }) });
379
+ return /* @__PURE__ */ e("div", { className: f, "data-testid": "message-chatbot-indicator", children: n && !r ? /* @__PURE__ */ c(de, { children: [
380
+ g,
381
381
  v
382
382
  ] }) : /* @__PURE__ */ c(de, { children: [
383
383
  v,
384
- x
384
+ g
385
385
  ] }) });
386
386
  }, ze = A.memo(
387
387
  ({ channel: t, unread: s }) => {
388
- var f, k, h, m;
388
+ var x, k, h, m;
389
389
  const { selectedChannel: n, onChannelSelect: a, debug: l, renderMessagePreview: d } = Xt(), r = (n == null ? void 0 : n.id) === (t == null ? void 0 : t.id), u = () => {
390
390
  t && a(t);
391
- }, g = (i) => {
391
+ }, f = (i) => {
392
392
  const E = i.key === "Enter" || i.key === " ", D = i.repeat;
393
393
  !E || D || (i.preventDefault(), u());
394
- }, v = Object.values(((f = t == null ? void 0 : t.state) == null ? void 0 : f.members) || {}).find(
394
+ }, v = Object.values(((x = t == null ? void 0 : t.state) == null ? void 0 : x.members) || {}).find(
395
395
  (i) => {
396
396
  var E, D;
397
397
  return ((E = i.user) == null ? void 0 : E.id) && i.user.id !== ((D = t == null ? void 0 : t._client) == null ? void 0 : D.userID);
@@ -421,7 +421,7 @@ const ee = ({
421
421
  role: "button",
422
422
  tabIndex: 0,
423
423
  onClick: u,
424
- onKeyDown: g,
424
+ onKeyDown: f,
425
425
  className: R(
426
426
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring",
427
427
  {
@@ -465,20 +465,21 @@ const ee = ({
465
465
  }
466
466
  );
467
467
  ze.displayName = "CustomChannelPreview";
468
- const We = A.memo(
468
+ const ls = { last_message_at: -1 }, We = A.memo(
469
469
  ({
470
470
  onChannelSelect: t,
471
471
  selectedChannel: s,
472
472
  filters: n,
473
- className: a,
474
- customEmptyStateIndicator: l,
475
- renderMessagePreview: d
473
+ sort: a = ls,
474
+ className: l,
475
+ customEmptyStateIndicator: d,
476
+ renderMessagePreview: r
476
477
  }) => {
477
- const r = A.useRef(0);
478
- r.current++;
479
- const { debug: u = !1 } = ve();
480
- u && console.log("📺 [ChannelList] 🔄 RENDER START", {
481
- renderCount: r.current,
478
+ const u = A.useRef(0);
479
+ u.current++;
480
+ const { debug: f = !1 } = ve();
481
+ f && console.log("📺 [ChannelList] 🔄 RENDER START", {
482
+ renderCount: u.current,
482
483
  selectedChannelId: s == null ? void 0 : s.id,
483
484
  filters: n
484
485
  });
@@ -486,28 +487,28 @@ const We = A.memo(
486
487
  () => ({
487
488
  selectedChannel: s,
488
489
  onChannelSelect: t,
489
- debug: u,
490
- renderMessagePreview: d
490
+ debug: f,
491
+ renderMessagePreview: r
491
492
  }),
492
- [s, t, u, d]
493
+ [s, t, f, r]
493
494
  );
494
495
  return /* @__PURE__ */ e(
495
496
  "div",
496
497
  {
497
498
  className: R(
498
499
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
499
- a
500
+ l
500
501
  ),
501
502
  children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(Qt, { value: g, children: /* @__PURE__ */ e(
502
503
  it,
503
504
  {
504
505
  filters: n,
505
- sort: { last_message_at: -1 },
506
+ sort: a,
506
507
  options: { limit: 30 },
507
508
  Preview: ze,
508
- EmptyStateIndicator: l
509
+ EmptyStateIndicator: d
509
510
  },
510
- JSON.stringify(n)
511
+ `${JSON.stringify(n)}:${JSON.stringify(a)}`
511
512
  ) }) })
512
513
  }
513
514
  );
@@ -556,13 +557,13 @@ function qe({ label: t, className: s, children: n, ...a }) {
556
557
  function Ye({ onClick: t }) {
557
558
  return /* @__PURE__ */ e(qe, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(Me, { className: "h-5 w-5 text-stone", weight: "bold" }) });
558
559
  }
559
- const ls = (t) => /* @__PURE__ */ e(ct, { ...t, position: "center" }), _e = "vote_up", Ie = "vote_down";
560
- function is(t) {
560
+ const is = (t) => /* @__PURE__ */ e(ct, { ...t, position: "center" }), _e = "vote_up", Ie = "vote_down";
561
+ function cs(t) {
561
562
  return t != null && t.length ? t.some((s) => s.type === Ie) ? "down" : t.some((s) => s.type === _e) ? "up" : null : null;
562
563
  }
563
- function cs(t) {
564
+ function ds(t) {
564
565
  const { channel: s } = Se(), { client: n } = $e("useMessageVote"), a = Ee(
565
- () => is(t.own_reactions),
566
+ () => cs(t.own_reactions),
566
567
  [t.own_reactions]
567
568
  ), l = L(async () => {
568
569
  if (n != null && n.userID)
@@ -587,7 +588,7 @@ function cs(t) {
587
588
  }, [s, n == null ? void 0 : n.userID, t.id, a]);
588
589
  return { selected: a, voteUp: l, voteDown: d };
589
590
  }
590
- const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
591
+ const us = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
591
592
  "path",
592
593
  {
593
594
  d: "M4.667 7.333l2.666-6A1.333 1.333 0 018.667 2v2.667a.667.667 0 00.666.666h3.764a1.334 1.334 0 011.192 1.93l-2.333 4.666a1.333 1.333 0 01-1.193.738H4.667m0-5.334v5.334m0-5.334H2.667a1.333 1.333 0 00-1.334 1.334v2.666a1.333 1.333 0 001.334 1.334h2",
@@ -597,7 +598,7 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
597
598
  strokeLinejoin: "round",
598
599
  fill: t ? "currentColor" : "none"
599
600
  }
600
- ) }), us = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
601
+ ) }), ms = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
601
602
  "path",
602
603
  {
603
604
  d: "M11.333 8.667l-2.666 6A1.333 1.333 0 017.333 14v-2.667a.667.667 0 00-.666-.666H2.903a1.334 1.334 0 01-1.192-1.93l2.333-4.666a1.333 1.333 0 011.193-.738h6.096m0 5.334V3.333m0 5.334h2a1.333 1.333 0 001.334-1.334V4.667a1.333 1.333 0 00-1.334-1.334h-2",
@@ -607,7 +608,7 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
607
608
  strokeLinejoin: "round",
608
609
  fill: t ? "currentColor" : "none"
609
610
  }
610
- ) }), ms = ({
611
+ ) }), hs = ({
611
612
  selected: t,
612
613
  onVoteUp: s,
613
614
  onVoteDown: n
@@ -620,7 +621,7 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
620
621
  onClick: s,
621
622
  "aria-label": "Helpful",
622
623
  "aria-pressed": t === "up",
623
- children: /* @__PURE__ */ e(ds, { filled: t === "up" })
624
+ children: /* @__PURE__ */ e(us, { filled: t === "up" })
624
625
  }
625
626
  ),
626
627
  /* @__PURE__ */ e(
@@ -631,10 +632,10 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
631
632
  onClick: n,
632
633
  "aria-label": "Not helpful",
633
634
  "aria-pressed": t === "down",
634
- children: /* @__PURE__ */ e(us, { filled: t === "down" })
635
+ children: /* @__PURE__ */ e(ms, { filled: t === "down" })
635
636
  }
636
637
  )
637
- ] }), hs = (t) => {
638
+ ] }), fs = (t) => {
638
639
  var ue, me;
639
640
  const {
640
641
  additionalMessageInputProps: s,
@@ -644,15 +645,15 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
644
645
  firstOfGroup: d,
645
646
  groupedByUser: r,
646
647
  handleAction: u,
647
- handleOpenThread: g,
648
- handleRetry: x,
648
+ handleOpenThread: f,
649
+ handleRetry: g,
649
650
  highlighted: v,
650
651
  isMessageAIGenerated: b,
651
652
  isMyMessage: y,
652
653
  message: o,
653
654
  renderText: w,
654
655
  threadList: I
655
- } = t, { client: p } = $e("CustomMessage"), [M, C] = S(!1), N = ut(o.id), { selected: f, voteUp: k, voteDown: h } = cs(o), {
656
+ } = t, { client: p } = $e("CustomMessage"), [M, C] = S(!1), N = ut(o.id), { selected: x, voteUp: k, voteDown: h } = ds(o), {
656
657
  Attachment: m = ht,
657
658
  EditMessageModal: i = ft,
658
659
  MessageBlocked: E = gt,
@@ -678,7 +679,7 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
678
679
  return /* @__PURE__ */ e(E, {});
679
680
  const Q = !I && !!o.reply_count, P = !I && o.show_in_channel && o.parent_id, U = o.status === "failed" && ((ue = o.error) == null ? void 0 : ue.status) !== 403, V = It(o);
680
681
  let B;
681
- U ? B = () => x(o) : V && (B = () => C(!0));
682
+ U ? B = () => g(o) : V && (B = () => C(!0));
682
683
  const O = y(), ae = R(
683
684
  "str-chat__message str-chat__message-simple",
684
685
  `str-chat__message--${o.type}`,
@@ -780,9 +781,9 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
780
781
  }
781
782
  ),
782
783
  n && Y && /* @__PURE__ */ e(
783
- ms,
784
+ hs,
784
785
  {
785
- selected: f,
786
+ selected: x,
786
787
  onVoteUp: k,
787
788
  onVoteDown: h
788
789
  }
@@ -793,24 +794,24 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
793
794
  Q && /* @__PURE__ */ e(
794
795
  T,
795
796
  {
796
- onClick: g,
797
+ onClick: f,
797
798
  reply_count: o.reply_count
798
799
  }
799
800
  ),
800
801
  P && /* @__PURE__ */ e(W, {})
801
802
  ] }, o.id)
802
803
  ] });
803
- }, fs = A.memo(
804
- hs,
804
+ }, gs = A.memo(
805
+ fs,
805
806
  dt
806
- ), gs = (t) => {
807
+ ), xs = (t) => {
807
808
  const s = je("CustomMessage");
808
- return /* @__PURE__ */ e(fs, { ...s, ...t });
809
- }, xs = (t) => ({
809
+ return /* @__PURE__ */ e(gs, { ...s, ...t });
810
+ }, bs = (t) => ({
810
811
  linkPreviews: Array.from(t.previews.values()).filter(
811
812
  (s) => Oe.previewIsLoaded(s) || Oe.previewIsLoading(s)
812
813
  )
813
- }), bs = ({
814
+ }), Cs = ({
814
815
  link: t,
815
816
  onDismiss: s
816
817
  }) => {
@@ -850,28 +851,28 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
850
851
  ]
851
852
  }
852
853
  );
853
- }, Cs = () => {
854
+ }, Ns = () => {
854
855
  const { linkPreviewsManager: t } = Tt(), { linkPreviews: s } = Rt(
855
856
  t.state,
856
- xs
857
+ bs
857
858
  ), n = (l) => {
858
859
  t.dismissPreview(l);
859
860
  };
860
861
  return s.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: s.map((l) => /* @__PURE__ */ e(
861
- bs,
862
+ Cs,
862
863
  {
863
864
  link: l,
864
865
  onDismiss: n
865
866
  },
866
867
  l.og_scrape_url
867
868
  )) }) : null;
868
- }, Ns = () => {
869
+ }, vs = () => {
869
870
  const { handleSubmit: t } = Pt(), s = Ut();
870
871
  return /* @__PURE__ */ c(de, { children: [
871
872
  /* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(Ft, {}) }),
872
873
  /* @__PURE__ */ c("div", { className: "central-container min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
873
874
  /* @__PURE__ */ e(Ot, {}),
874
- /* @__PURE__ */ e(Cs, {}),
875
+ /* @__PURE__ */ e(Ns, {}),
875
876
  /* @__PURE__ */ e(At, {}),
876
877
  /* @__PURE__ */ c("div", { className: "flex", children: [
877
878
  /* @__PURE__ */ e("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ e(
@@ -897,18 +898,18 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
897
898
  ] })
898
899
  ] })
899
900
  ] });
900
- }, vs = ({
901
+ }, ws = ({
901
902
  renderActions: t
902
903
  }) => /* @__PURE__ */ c("div", { className: "message-input flex items-center gap-2 p-4", children: [
903
904
  t && (t == null ? void 0 : t()),
904
- /* @__PURE__ */ e(Lt, { Input: Ns })
905
- ] }), ws = [
905
+ /* @__PURE__ */ e(Lt, { Input: vs })
906
+ ] }), ps = [
906
907
  "SYSTEM_DM_AGENT_PAUSED",
907
908
  "SYSTEM_DM_AGENT_RESUMED"
908
- ], ps = {
909
+ ], ys = {
909
910
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
910
911
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
911
- }, Be = (t) => ws.includes(t), ys = (t) => {
912
+ }, Be = (t) => ps.includes(t), Es = (t) => {
912
913
  var a;
913
914
  const s = (a = t.metadata) == null ? void 0 : a.custom_type;
914
915
  if (Be(s))
@@ -916,11 +917,11 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
916
917
  const n = t.dm_agent_system_type;
917
918
  if (Be(n))
918
919
  return n;
919
- }, Es = (t) => {
920
+ }, _s = (t) => {
920
921
  var a;
921
- const s = t.message.hide_date === !0, n = ys(t.message);
922
+ const s = t.message.hide_date === !0, n = Es(t.message);
922
923
  if (n) {
923
- const l = ((a = t.message.text) == null ? void 0 : a.trim()) || ps[n];
924
+ const l = ((a = t.message.text) == null ? void 0 : a.trim()) || ys[n];
924
925
  return /* @__PURE__ */ c("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
925
926
  /* @__PURE__ */ c(
926
927
  "div",
@@ -953,7 +954,7 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
953
954
  ] }),
954
955
  !s && /* @__PURE__ */ e(Te, { message: t.message })
955
956
  ] });
956
- }, _s = () => null, Is = ({ className: t, message: s }) => /* @__PURE__ */ c(
957
+ }, Is = () => null, Ss = ({ className: t, message: s }) => /* @__PURE__ */ c(
957
958
  "div",
958
959
  {
959
960
  className: R("flex items-center justify-center h-full", t),
@@ -997,11 +998,11 @@ const ds = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
997
998
  ]
998
999
  }
999
1000
  ), Ne = A.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ c("div", { className: "flex items-center", children: [
1000
- /* @__PURE__ */ e(Is, { className: "w-6 h-6" }),
1001
+ /* @__PURE__ */ e(Ss, { className: "w-6 h-6" }),
1001
1002
  /* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
1002
1003
  ] }) }));
1003
1004
  Ne.displayName = "LoadingState";
1004
- const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150", Ss = ({
1005
+ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150", Ms = ({
1005
1006
  onBack: t,
1006
1007
  showBackButton: s,
1007
1008
  onShowInfo: n,
@@ -1011,17 +1012,17 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1011
1012
  var y, o, w, I, p, M;
1012
1013
  const { channel: d } = Se(), r = A.useMemo(() => Object.values(d.state.members || {}).find(
1013
1014
  (N) => {
1014
- var f;
1015
- return ((f = N.user) == null ? void 0 : f.id) && N.user.id !== d._client.userID;
1015
+ var x;
1016
+ return ((x = N.user) == null ? void 0 : x.id) && N.user.id !== d._client.userID;
1016
1017
  }
1017
- ), [d._client.userID, d.state.members]), u = ((y = r == null ? void 0 : r.user) == null ? void 0 : y.name) || ((o = r == null ? void 0 : r.user) == null ? void 0 : o.id) || "Unknown member", g = (w = r == null ? void 0 : r.user) == null ? void 0 : w.image, [x, v] = S(
1018
+ ), [d._client.userID, d.state.members]), u = ((y = r == null ? void 0 : r.user) == null ? void 0 : y.name) || ((o = r == null ? void 0 : r.user) == null ? void 0 : o.id) || "Unknown member", f = (w = r == null ? void 0 : r.user) == null ? void 0 : w.image, [g, v] = S(
1018
1019
  !!((I = d.state.membership) != null && I.pinned_at)
1019
1020
  );
1020
1021
  J(() => {
1021
1022
  const C = (N) => {
1022
- var f;
1023
+ var x;
1023
1024
  v(
1024
- N != null && N.member ? !!N.member.pinned_at : !!((f = d.state.membership) != null && f.pinned_at)
1025
+ N != null && N.member ? !!N.member.pinned_at : !!((x = d.state.membership) != null && x.pinned_at)
1025
1026
  );
1026
1027
  };
1027
1028
  return d.on("member.updated", C), () => {
@@ -1030,7 +1031,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1030
1031
  }, [d]);
1031
1032
  const b = async () => {
1032
1033
  try {
1033
- x ? await d.unpin() : await d.pin();
1034
+ g ? await d.unpin() : await d.pin();
1034
1035
  } catch (C) {
1035
1036
  console.error(
1036
1037
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -1057,7 +1058,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1057
1058
  {
1058
1059
  id: ((p = r == null ? void 0 : r.user) == null ? void 0 : p.id) || d.id || "unknown",
1059
1060
  name: u,
1060
- image: g,
1061
+ image: f,
1061
1062
  size: 40
1062
1063
  }
1063
1064
  ),
@@ -1070,15 +1071,15 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1070
1071
  className: le,
1071
1072
  onClick: b,
1072
1073
  type: "button",
1073
- "aria-label": x ? "Unstar conversation" : "Star conversation",
1074
+ "aria-label": g ? "Unstar conversation" : "Star conversation",
1074
1075
  children: /* @__PURE__ */ e(
1075
1076
  Le,
1076
1077
  {
1077
1078
  className: R("size-5", {
1078
- "text-yellow-600": x,
1079
- "text-black/90": !x
1079
+ "text-yellow-600": g,
1080
+ "text-black/90": !g
1080
1081
  }),
1081
- weight: x ? "duotone" : "regular"
1082
+ weight: g ? "duotone" : "regular"
1082
1083
  }
1083
1084
  )
1084
1085
  }
@@ -1112,7 +1113,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1112
1113
  {
1113
1114
  id: ((M = r == null ? void 0 : r.user) == null ? void 0 : M.id) || d.id || "unknown",
1114
1115
  name: u,
1115
- image: g,
1116
+ image: f,
1116
1117
  size: 40
1117
1118
  }
1118
1119
  ),
@@ -1125,15 +1126,15 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1125
1126
  className: le,
1126
1127
  onClick: b,
1127
1128
  type: "button",
1128
- "aria-label": x ? "Unstar conversation" : "Star conversation",
1129
+ "aria-label": g ? "Unstar conversation" : "Star conversation",
1129
1130
  children: /* @__PURE__ */ e(
1130
1131
  Le,
1131
1132
  {
1132
1133
  className: R("size-5", {
1133
- "text-yellow-600": x,
1134
- "text-black/90": !x
1134
+ "text-yellow-600": g,
1135
+ "text-black/90": !g
1135
1136
  }),
1136
- weight: x ? "duotone" : "regular"
1137
+ weight: g ? "duotone" : "regular"
1137
1138
  }
1138
1139
  )
1139
1140
  }
@@ -1151,7 +1152,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1151
1152
  ] })
1152
1153
  ] })
1153
1154
  ] });
1154
- }, Ms = ({
1155
+ }, ks = ({
1155
1156
  dialogRef: t,
1156
1157
  onClose: s,
1157
1158
  participant: n,
@@ -1160,13 +1161,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1160
1161
  onLeaveConversation: d,
1161
1162
  onBlockParticipant: r,
1162
1163
  showDeleteConversation: u = !0,
1163
- onDeleteConversationClick: g,
1164
- onBlockParticipantClick: x,
1164
+ onDeleteConversationClick: f,
1165
+ onBlockParticipantClick: g,
1165
1166
  onReportParticipantClick: v,
1166
1167
  customChannelActions: b
1167
1168
  }) => {
1168
1169
  var G, X, te, se, ne, z, Q;
1169
- const { service: y, debug: o } = ve(), [w, I] = S(!1), [p, M] = S(!1), [C, N] = S(!1), f = L(async () => {
1170
+ const { service: y, debug: o } = ve(), [w, I] = S(!1), [p, M] = S(!1), [C, N] = S(!1), x = L(async () => {
1170
1171
  var P;
1171
1172
  if (!(!y || !((P = n == null ? void 0 : n.user) != null && P.id)))
1172
1173
  try {
@@ -1185,12 +1186,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1185
1186
  }
1186
1187
  }, [y, (G = n == null ? void 0 : n.user) == null ? void 0 : G.id]);
1187
1188
  J(() => {
1188
- f();
1189
- }, [f]);
1189
+ x();
1190
+ }, [x]);
1190
1191
  const k = async () => {
1191
1192
  var P;
1192
1193
  if (!p) {
1193
- g == null || g(), o && console.log("[ChannelInfoDialog] Leave conversation", a.cid), M(!0);
1194
+ f == null || f(), o && console.log("[ChannelInfoDialog] Leave conversation", a.cid), M(!0);
1194
1195
  try {
1195
1196
  const U = ((P = a._client) == null ? void 0 : P.userID) ?? null;
1196
1197
  await a.hide(U, !1), d && await d(a), s();
@@ -1203,7 +1204,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1203
1204
  }, h = async () => {
1204
1205
  var P, U, V;
1205
1206
  if (!(C || !y)) {
1206
- x == null || x(), o && console.log("[ChannelInfoDialog] Block member", (P = n == null ? void 0 : n.user) == null ? void 0 : P.id), N(!0);
1207
+ g == null || g(), o && console.log("[ChannelInfoDialog] Block member", (P = n == null ? void 0 : n.user) == null ? void 0 : P.id), N(!0);
1207
1208
  try {
1208
1209
  await y.blockUser((U = n == null ? void 0 : n.user) == null ? void 0 : U.id), r && await r((V = n == null ? void 0 : n.user) == null ? void 0 : V.id), s();
1209
1210
  } catch (B) {
@@ -1215,7 +1216,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1215
1216
  }, m = async () => {
1216
1217
  var P, U, V;
1217
1218
  if (!(C || !y)) {
1218
- x == null || x(), o && console.log("[ChannelInfoDialog] Unblock member", (P = n == null ? void 0 : n.user) == null ? void 0 : P.id), N(!0);
1219
+ g == null || g(), o && console.log("[ChannelInfoDialog] Unblock member", (P = n == null ? void 0 : n.user) == null ? void 0 : P.id), N(!0);
1219
1220
  try {
1220
1221
  await y.unBlockUser((U = n == null ? void 0 : n.user) == null ? void 0 : U.id), r && await r((V = n == null ? void 0 : n.user) == null ? void 0 : V.id), s();
1221
1222
  } catch (B) {
@@ -1334,7 +1335,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1334
1335
  }
1335
1336
  )
1336
1337
  );
1337
- }, ks = ({
1338
+ }, Ds = ({
1338
1339
  onBack: t,
1339
1340
  showBackButton: s,
1340
1341
  renderMessageInputActions: n,
@@ -1343,8 +1344,8 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1343
1344
  showDeleteConversation: d = !0,
1344
1345
  onDeleteConversationClick: r,
1345
1346
  onBlockParticipantClick: u,
1346
- onReportParticipantClick: g,
1347
- showStarButton: x = !1,
1347
+ onReportParticipantClick: f,
1348
+ showStarButton: g = !1,
1348
1349
  chatbotVotingEnabled: v = !1,
1349
1350
  renderChannelBanner: b,
1350
1351
  customChannelActions: y,
@@ -1356,28 +1357,28 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1356
1357
  return ((h = k.user) == null ? void 0 : h.id) && k.user.id !== w._client.userID;
1357
1358
  }
1358
1359
  ), [w._client.userID, w.state.members]), M = A.useMemo(() => {
1359
- const f = w.data ?? {};
1360
- if (f.followerStatus)
1361
- return String(f.followerStatus);
1362
- if (f.isFollower !== void 0)
1363
- return f.isFollower ? "Subscribed to you" : "Not subscribed";
1360
+ const x = w.data ?? {};
1361
+ if (x.followerStatus)
1362
+ return String(x.followerStatus);
1363
+ if (x.isFollower !== void 0)
1364
+ return x.isFollower ? "Subscribed to you" : "Not subscribed";
1364
1365
  }, [w.data]), C = L(() => {
1365
- var f;
1366
- (f = I.current) == null || f.showModal();
1366
+ var x;
1367
+ (x = I.current) == null || x.showModal();
1367
1368
  }, []), N = L(() => {
1368
- var f;
1369
- (f = I.current) == null || f.close();
1369
+ var x;
1370
+ (x = I.current) == null || x.close();
1370
1371
  }, []);
1371
1372
  return /* @__PURE__ */ c(de, { children: [
1372
1373
  /* @__PURE__ */ e(
1373
1374
  jt,
1374
1375
  {
1375
1376
  overrides: {
1376
- Message: (f) => {
1377
+ Message: (x) => {
1377
1378
  const { message: k } = je("ChannelView"), h = /* @__PURE__ */ e(
1378
- gs,
1379
+ xs,
1379
1380
  {
1380
- ...f,
1381
+ ...x,
1381
1382
  chatbotVotingEnabled: v
1382
1383
  }
1383
1384
  );
@@ -1386,13 +1387,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1386
1387
  },
1387
1388
  children: /* @__PURE__ */ c(Gt, { children: [
1388
1389
  /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
1389
- Ss,
1390
+ Ms,
1390
1391
  {
1391
1392
  onBack: t,
1392
1393
  showBackButton: s,
1393
1394
  onShowInfo: C,
1394
1395
  canShowInfo: !!p,
1395
- showStarButton: x
1396
+ showStarButton: g
1396
1397
  }
1397
1398
  ) }),
1398
1399
  b == null ? void 0 : b(),
@@ -1405,7 +1406,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1405
1406
  }
1406
1407
  ) }),
1407
1408
  /* @__PURE__ */ e(
1408
- vs,
1409
+ ws,
1409
1410
  {
1410
1411
  renderActions: () => n == null ? void 0 : n(w)
1411
1412
  }
@@ -1414,7 +1415,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1414
1415
  }
1415
1416
  ),
1416
1417
  /* @__PURE__ */ e(
1417
- Ms,
1418
+ ks,
1418
1419
  {
1419
1420
  dialogRef: I,
1420
1421
  onClose: N,
@@ -1426,7 +1427,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1426
1427
  showDeleteConversation: d,
1427
1428
  onDeleteConversationClick: r,
1428
1429
  onBlockParticipantClick: u,
1429
- onReportParticipantClick: g,
1430
+ onReportParticipantClick: f,
1430
1431
  customChannelActions: y
1431
1432
  }
1432
1433
  )
@@ -1440,9 +1441,9 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1440
1441
  onLeaveConversation: l,
1441
1442
  onBlockParticipant: d,
1442
1443
  className: r,
1443
- CustomChannelEmptyState: u = _s,
1444
- showDeleteConversation: g = !0,
1445
- onDeleteConversationClick: x,
1444
+ CustomChannelEmptyState: u = Is,
1445
+ showDeleteConversation: f = !0,
1446
+ onDeleteConversationClick: g,
1446
1447
  onBlockParticipantClick: v,
1447
1448
  onReportParticipantClick: b,
1448
1449
  dmAgentEnabled: y,
@@ -1454,7 +1455,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1454
1455
  customChannelActions: C,
1455
1456
  renderMessage: N
1456
1457
  }) => {
1457
- const f = L(
1458
+ const x = L(
1458
1459
  async (k, h, m) => {
1459
1460
  var T;
1460
1461
  const i = ((T = t.data) == null ? void 0 : T.chatbot_paused) === !0, E = y && !i, D = {
@@ -1485,13 +1486,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1485
1486
  $t,
1486
1487
  {
1487
1488
  channel: t,
1488
- MessageSystem: Es,
1489
+ MessageSystem: _s,
1489
1490
  EmptyStateIndicator: u,
1490
1491
  LoadingIndicator: Ne,
1491
- DateSeparator: ls,
1492
- doSendMessageRequest: f,
1492
+ DateSeparator: is,
1493
+ doSendMessageRequest: x,
1493
1494
  children: /* @__PURE__ */ e(
1494
- ks,
1495
+ Ds,
1495
1496
  {
1496
1497
  onBack: s,
1497
1498
  showBackButton: n,
@@ -1499,8 +1500,8 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1499
1500
  onLeaveConversation: l,
1500
1501
  onBlockParticipant: d,
1501
1502
  CustomChannelEmptyState: u,
1502
- showDeleteConversation: g,
1503
- onDeleteConversationClick: x,
1503
+ showDeleteConversation: f,
1504
+ onDeleteConversationClick: g,
1504
1505
  onBlockParticipantClick: v,
1505
1506
  onReportParticipantClick: b,
1506
1507
  showStarButton: I,
@@ -1517,7 +1518,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
1517
1518
  }
1518
1519
  );
1519
1520
  Ze.displayName = "ChannelView";
1520
- function Ds({
1521
+ function Ts({
1521
1522
  searchQuery: t,
1522
1523
  setSearchQuery: s,
1523
1524
  placeholder: n
@@ -1556,7 +1557,7 @@ function Ds({
1556
1557
  )
1557
1558
  ] });
1558
1559
  }
1559
- const Ts = ({
1560
+ const Rs = ({
1560
1561
  participantSource: t,
1561
1562
  onSelectParticipant: s,
1562
1563
  onClose: n,
@@ -1565,7 +1566,7 @@ const Ts = ({
1565
1566
  searchPlaceholder: d = "Search participants...",
1566
1567
  className: r
1567
1568
  }) => {
1568
- const { debug: u } = ve(), [g, x] = S(""), [v, b] = S([]), [y, o] = S(!1), [w, I] = S(null), [p, M] = S(
1569
+ const { debug: u } = ve(), [f, g] = S(""), [v, b] = S([]), [y, o] = S(!1), [w, I] = S(null), [p, M] = S(
1569
1570
  null
1570
1571
  ), C = Z(!1);
1571
1572
  J(() => {
@@ -1598,10 +1599,10 @@ const Ts = ({
1598
1599
  }, [t.loading, u]);
1599
1600
  const N = v.filter((h) => !a.has(h.id)).filter((h) => {
1600
1601
  var i;
1601
- if (!g) return !0;
1602
- const m = g.toLowerCase();
1602
+ if (!f) return !0;
1603
+ const m = f.toLowerCase();
1603
1604
  return h.name.toLowerCase().includes(m) || ((i = h.email) == null ? void 0 : i.toLowerCase().includes(m)) || !1;
1604
- }), f = L(
1605
+ }), x = L(
1605
1606
  async (h) => {
1606
1607
  if (!p) {
1607
1608
  M(h.id);
@@ -1614,7 +1615,7 @@ const Ts = ({
1614
1615
  },
1615
1616
  [s, p]
1616
1617
  ), k = (h, m) => {
1617
- (h.key === "Enter" || h.key === " ") && (h.preventDefault(), f(m));
1618
+ (h.key === "Enter" || h.key === " ") && (h.preventDefault(), x(m));
1618
1619
  };
1619
1620
  return /* @__PURE__ */ c("div", { className: R("flex flex-col h-full", r), children: [
1620
1621
  /* @__PURE__ */ c("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
@@ -1631,10 +1632,10 @@ const Ts = ({
1631
1632
  t.totalCount !== void 0 && ` • ${t.totalCount} ${l} total`
1632
1633
  ] }),
1633
1634
  /* @__PURE__ */ e(
1634
- Ds,
1635
+ Ts,
1635
1636
  {
1636
- searchQuery: g,
1637
- setSearchQuery: x,
1637
+ searchQuery: f,
1638
+ setSearchQuery: g,
1638
1639
  placeholder: d
1639
1640
  }
1640
1641
  )
@@ -1654,8 +1655,8 @@ const Ts = ({
1654
1655
  ] })
1655
1656
  ] }) }) : N.length === 0 ? /* @__PURE__ */ c("div", { className: "p-6 text-center", children: [
1656
1657
  /* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(Fe, { className: "h-8 w-8 text-charcoal" }) }),
1657
- /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: g ? `No ${l} found` : v.length > 0 ? `Already chatting with all ${l}` : `No ${l} yet` }),
1658
- /* @__PURE__ */ e("p", { className: "text-xs text-stone", children: g ? "Try a different search term" : v.length > 0 ? `You have existing conversations with all your ${l}` : `${l.charAt(0).toUpperCase() + l.slice(1)} will appear here` })
1658
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: f ? `No ${l} found` : v.length > 0 ? `Already chatting with all ${l}` : `No ${l} yet` }),
1659
+ /* @__PURE__ */ e("p", { className: "text-xs text-stone", children: f ? "Try a different search term" : v.length > 0 ? `You have existing conversations with all your ${l}` : `${l.charAt(0).toUpperCase() + l.slice(1)} will appear here` })
1659
1660
  ] }) : /* @__PURE__ */ c("ul", { className: "space-y-0", children: [
1660
1661
  N.map((h) => {
1661
1662
  const m = h.name || h.email || h.id, i = h.email && h.name ? h.email : h.phone;
@@ -1663,7 +1664,7 @@ const Ts = ({
1663
1664
  "button",
1664
1665
  {
1665
1666
  type: "button",
1666
- onClick: () => f(h),
1667
+ onClick: () => x(h),
1667
1668
  onKeyDown: (E) => k(E, h),
1668
1669
  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",
1669
1670
  children: /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
@@ -1693,7 +1694,7 @@ const Ts = ({
1693
1694
  ] }) })
1694
1695
  ] }) })
1695
1696
  ] });
1696
- }, Rs = ({ className: t }) => /* @__PURE__ */ c(
1697
+ }, Ls = ({ className: t }) => /* @__PURE__ */ c(
1697
1698
  "svg",
1698
1699
  {
1699
1700
  width: "140",
@@ -1829,7 +1830,7 @@ const Ts = ({
1829
1830
  }
1830
1831
  ), Je = A.memo(
1831
1832
  ({ hasChannels: t, channelsLoaded: s }) => /* @__PURE__ */ e("div", { className: "messaging-empty-state flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center max-w-sm text-center", children: [
1832
- /* @__PURE__ */ e(Rs, {}),
1833
+ /* @__PURE__ */ e(Ls, {}),
1833
1834
  s && !t && /* @__PURE__ */ c("div", { className: "mt-8", children: [
1834
1835
  /* @__PURE__ */ e("h2", { className: "font-medium text-black text-[18px] mb-2", children: "Your inbox is empty" }),
1835
1836
  /* @__PURE__ */ e("p", { className: "text-[#676B5F] text-sm mb-6", children: "Share with your followers to start receiving messages" })
@@ -1852,7 +1853,7 @@ const Ce = A.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { clas
1852
1853
  )
1853
1854
  ] }) }));
1854
1855
  Ce.displayName = "ErrorState";
1855
- const Gs = ({
1856
+ const Vs = ({
1856
1857
  capabilities: t = {},
1857
1858
  className: s,
1858
1859
  renderMessageInputActions: n,
@@ -1861,8 +1862,8 @@ const Gs = ({
1861
1862
  initialParticipantFilter: d,
1862
1863
  initialParticipantData: r,
1863
1864
  CustomChannelEmptyState: u,
1864
- showChannelList: g = !0,
1865
- filters: x,
1865
+ showChannelList: f = !0,
1866
+ filters: g,
1866
1867
  channelListCustomEmptyStateIndicator: v,
1867
1868
  onDeleteConversationClick: b,
1868
1869
  onBlockParticipantClick: y,
@@ -1873,7 +1874,7 @@ const Gs = ({
1873
1874
  showStarButton: M = !1,
1874
1875
  chatbotVotingEnabled: C = !1,
1875
1876
  renderMessagePreview: N,
1876
- renderChannelBanner: f,
1877
+ renderChannelBanner: x,
1877
1878
  customChannelActions: k,
1878
1879
  renderMessage: h
1879
1880
  }) => {
@@ -1900,9 +1901,9 @@ const Gs = ({
1900
1901
  hidden: !1
1901
1902
  }
1902
1903
  },
1903
- ...x
1904
+ ...g
1904
1905
  };
1905
- }, [x, i == null ? void 0 : i.userID]), he = Z(null), oe = L(async () => {
1906
+ }, [g, i == null ? void 0 : i.userID]), he = Z(null), oe = L(async () => {
1906
1907
  if (!i || !E) return;
1907
1908
  const _ = i.userID;
1908
1909
  if (_)
@@ -2076,11 +2077,11 @@ const Gs = ({
2076
2077
  className: R(
2077
2078
  "messaging-channel-list-sidebar min-h-0 min-w-0 lg:flex lg:flex-col",
2078
2079
  {
2079
- "!hidden": g === !1 || O,
2080
+ "!hidden": f === !1 || O,
2080
2081
  // Hide on mobile when channel selected, show on desktop with consistent wide width
2081
- "hidden lg:flex lg:flex-1 lg:max-w-2xl": g !== !1 && !O && ge,
2082
+ "hidden lg:flex lg:flex-1 lg:max-w-2xl": f !== !1 && !O && ge,
2082
2083
  // Show on mobile when no channel selected, use same wide width on desktop
2083
- "flex flex-col w-full lg:flex-1 lg:max-w-2xl": g !== !1 && !O && !ge
2084
+ "flex flex-col w-full lg:flex-1 lg:max-w-2xl": f !== !1 && !O && !ge
2084
2085
  }
2085
2086
  ),
2086
2087
  children: /* @__PURE__ */ e(
@@ -2114,7 +2115,7 @@ const Gs = ({
2114
2115
  onBack: Xe,
2115
2116
  showBackButton: !O,
2116
2117
  renderMessageInputActions: n,
2117
- renderChannelBanner: f,
2118
+ renderChannelBanner: x,
2118
2119
  onLeaveConversation: tt,
2119
2120
  onBlockParticipant: st,
2120
2121
  CustomChannelEmptyState: u,
@@ -2153,7 +2154,7 @@ const Gs = ({
2153
2154
  onClick: et,
2154
2155
  onClose: fe,
2155
2156
  children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
2156
- Ts,
2157
+ Rs,
2157
2158
  {
2158
2159
  participantSource: re,
2159
2160
  onSelectParticipant: Ke,
@@ -2169,7 +2170,7 @@ const Gs = ({
2169
2170
  ]
2170
2171
  }
2171
2172
  );
2172
- }, Ls = ({
2173
+ }, Ps = ({
2173
2174
  question: t,
2174
2175
  onClick: s,
2175
2176
  loading: n = !1,
@@ -2191,7 +2192,7 @@ const Gs = ({
2191
2192
  ),
2192
2193
  children: t
2193
2194
  }
2194
- ), Vs = ({
2195
+ ), Hs = ({
2195
2196
  faqs: t,
2196
2197
  onFaqClick: s,
2197
2198
  loadingFaqId: n,
@@ -2200,7 +2201,7 @@ const Gs = ({
2200
2201
  avatarImage: d,
2201
2202
  avatarName: r
2202
2203
  }) => {
2203
- const u = t.filter((g) => g.enabled).sort((g, x) => (g.order ?? 0) - (x.order ?? 0));
2204
+ const u = t.filter((f) => f.enabled).sort((f, g) => (f.order ?? 0) - (g.order ?? 0));
2204
2205
  return u.length === 0 ? null : /* @__PURE__ */ e("div", { className: l, children: /* @__PURE__ */ c("div", { className: "flex gap-3 items-end", children: [
2205
2206
  (d || r) && /* @__PURE__ */ e("div", { className: "flex-none", children: /* @__PURE__ */ e(
2206
2207
  ee,
@@ -2219,43 +2220,43 @@ const Gs = ({
2219
2220
  style: { backgroundColor: "#F1F0EE" },
2220
2221
  children: [
2221
2222
  a && /* @__PURE__ */ e("p", { className: "text-md text-charcoal mb-4", children: a }),
2222
- u.map((g) => /* @__PURE__ */ e(
2223
- Ls,
2223
+ u.map((f) => /* @__PURE__ */ e(
2224
+ Ps,
2224
2225
  {
2225
- question: g.question,
2226
- onClick: () => s(g.id),
2227
- loading: n === g.id
2226
+ question: f.question,
2227
+ onClick: () => s(f.id),
2228
+ loading: n === f.id
2228
2229
  },
2229
- g.id
2230
+ f.id
2230
2231
  ))
2231
2232
  ]
2232
2233
  }
2233
2234
  )
2234
2235
  ] }) });
2235
- }, Hs = (t, s = {}) => {
2236
- const { initialSearch: n = "", pageSize: a = 20 } = s, [l, d] = S([]), [r, u] = S(!1), [g, x] = S(null), [v, b] = S(n), [y, o] = S(!0), [w, I] = S(), p = L(async (f = !1, k) => {
2236
+ }, zs = (t, s = {}) => {
2237
+ const { initialSearch: n = "", pageSize: a = 20 } = s, [l, d] = S([]), [r, u] = S(!1), [f, g] = S(null), [v, b] = S(n), [y, o] = S(!0), [w, I] = S(), p = L(async (x = !1, k) => {
2237
2238
  if (r) return;
2238
2239
  const h = k !== void 0 ? k : v;
2239
- u(!0), x(null);
2240
+ u(!0), g(null);
2240
2241
  try {
2241
2242
  const m = await t.loadParticipants({
2242
2243
  search: h || void 0,
2243
2244
  limit: a,
2244
- cursor: f ? void 0 : w
2245
+ cursor: x ? void 0 : w
2245
2246
  });
2246
2247
  d(
2247
- (i) => f ? m.participants : [...i, ...m.participants]
2248
+ (i) => x ? m.participants : [...i, ...m.participants]
2248
2249
  ), o(m.hasMore), I(m.nextCursor);
2249
2250
  } catch (m) {
2250
2251
  const i = m instanceof Error ? m.message : "Failed to load participants";
2251
- x(i), console.error("[useParticipants] Load error:", m);
2252
+ g(i), console.error("[useParticipants] Load error:", m);
2252
2253
  } finally {
2253
2254
  u(!1);
2254
2255
  }
2255
2256
  }, [t, v, w, a, r]), M = L(() => {
2256
2257
  y && !r && p(!1);
2257
- }, [y, r, p]), C = L((f) => {
2258
- b(f), I(void 0), p(!0, f);
2258
+ }, [y, r, p]), C = L((x) => {
2259
+ b(x), I(void 0), p(!0, x);
2259
2260
  }, [p]), N = L(() => {
2260
2261
  I(void 0), p(!0);
2261
2262
  }, [p]);
@@ -2264,7 +2265,7 @@ const Gs = ({
2264
2265
  }, [t.loadParticipants]), {
2265
2266
  participants: l,
2266
2267
  loading: r,
2267
- error: g,
2268
+ error: f,
2268
2269
  searchQuery: v,
2269
2270
  hasMore: y,
2270
2271
  totalCount: t.totalCount,
@@ -2276,18 +2277,18 @@ const Gs = ({
2276
2277
  export {
2277
2278
  xe as ActionButton,
2278
2279
  ee as Avatar,
2279
- _s as ChannelEmptyState,
2280
+ Is as ChannelEmptyState,
2280
2281
  We as ChannelList,
2281
2282
  Ze as ChannelView,
2282
- Vs as FaqList,
2283
- Ls as FaqListItem,
2284
- ms as MessageVoteButtons,
2285
- js as MessagingProvider,
2286
- Gs as MessagingShell,
2287
- Ts as ParticipantPicker,
2283
+ Hs as FaqList,
2284
+ Ps as FaqListItem,
2285
+ hs as MessageVoteButtons,
2286
+ Gs as MessagingProvider,
2287
+ Vs as MessagingShell,
2288
+ Rs as ParticipantPicker,
2288
2289
  es as formatRelativeTime,
2289
- cs as useMessageVote,
2290
+ ds as useMessageVote,
2290
2291
  Jt as useMessaging,
2291
- Hs as useParticipants
2292
+ zs as useParticipants
2292
2293
  };
2293
2294
  //# sourceMappingURL=index.js.map