@ethora/chat-component 26.9.8 → 26.10.1

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 (101) hide show
  1. package/README.md +1 -1
  2. package/dist/{ChatProfileModal-3UH0H5Ec.js → ChatProfileModal-Bf5jGPBZ.js} +44 -44
  3. package/dist/FilePreviewModal-Bwx0RZZw.js +1763 -0
  4. package/dist/{ManageDataModal-BblTuE9g.js → ManageDataModal-Dhkp0LWH.js} +17 -17
  5. package/dist/{MarkdownBody-RMEx8yW2.js → MarkdownBody-_sUhW2O8.js} +1 -1
  6. package/dist/{MessageSearchModal-CrYR2EH8.js → MessageSearchModal-rwwWrILl.js} +40 -40
  7. package/dist/{PublicChatsModal-Bi5r4mrV.js → PublicChatsModal-Byso6_vt.js} +19 -19
  8. package/dist/{SideDrawer-CDAoobvX.js → SideDrawer-CQPOf0ek.js} +35 -35
  9. package/dist/{UserProfileModal-4Frgvam-.js → UserProfileModal-Vj2kICvc.js} +10 -10
  10. package/dist/{UserSettingsModal-C-mb-9cb.js → UserSettingsModal-CioX4ZIV.js} +5 -5
  11. package/dist/{VideoCallOverlay-92dFLb9U.js → VideoCallOverlay-DodAkiam.js} +3824 -3708
  12. package/dist/{VisibilityModal-zIAV6dAP.js → VisibilityModal-CIl7rkBM.js} +11 -11
  13. package/dist/assets/icons.d.ts +2 -3
  14. package/dist/components/Files/fileCategory.d.ts +4 -2
  15. package/dist/components/MainComponents/AlbumGrid.d.ts +22 -0
  16. package/dist/components/MainComponents/AttachmentList.d.ts +6 -6
  17. package/dist/components/MainComponents/ImageUnavailable.d.ts +21 -0
  18. package/dist/components/MainComponents/MediaUploadOverlay.d.ts +31 -0
  19. package/dist/components/MainComponents/MessageContainer.d.ts +3 -0
  20. package/dist/components/MessageBubble/MediaCaption.d.ts +9 -0
  21. package/dist/components/MessageBubble/MessageAvatarPhoto.d.ts +17 -0
  22. package/dist/components/MessageBubble/MessageReaction.d.ts +6 -0
  23. package/dist/components/MessageBubble/QuickReplies.d.ts +2 -0
  24. package/dist/components/Modals/FilePreviewModal/FilePreviewModal.d.ts +8 -10
  25. package/dist/components/Modals/FilePreviewModal/ImageLightbox.d.ts +4 -0
  26. package/dist/components/Modals/FilePreviewModal/PdfView.d.ts +4 -0
  27. package/dist/components/Modals/FilePreviewModal/ViewerChrome.d.ts +64 -0
  28. package/dist/components/RoomComponents/LastMessageItem.d.ts +2 -0
  29. package/dist/components/RoomComponents/styled/LastMessageMedia.d.ts +19 -0
  30. package/dist/components/RoomComponents/styled/LastTextMessage.d.ts +2 -2
  31. package/dist/components/RoomComponents/styled/StyledRoomComponents.d.ts +10 -3
  32. package/dist/components/VideoCalls/VideoCallSession.d.ts +13 -0
  33. package/dist/components/styled/FileCard.d.ts +20 -0
  34. package/dist/components/styled/MediaSurface.d.ts +50 -0
  35. package/dist/components/styled/MessageImage.d.ts +9 -10
  36. package/dist/components/styled/SendInput.d.ts +12 -2
  37. package/dist/components/styled/StyledComponents.d.ts +69 -2
  38. package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +36 -24
  39. package/dist/components/styled/UnsupportedType.d.ts +1 -0
  40. package/dist/components/styled/VideoMessage.d.ts +11 -6
  41. package/dist/e2ee/callKey.d.ts +32 -0
  42. package/dist/e2ee/fileEnvelope.d.ts +16 -5
  43. package/dist/e2ee/omemo.d.ts +18 -0
  44. package/dist/firebase-messaging-sw.js +20 -3
  45. package/dist/{handleCopyClick-BtXos0AJ.js → handleCopyClick-DGaZhy_u.js} +1 -1
  46. package/dist/helpers/albumLayout.d.ts +53 -0
  47. package/dist/helpers/attachments.d.ts +22 -1
  48. package/dist/helpers/avatarImageCache.d.ts +9 -0
  49. package/dist/helpers/caption.d.ts +63 -0
  50. package/dist/helpers/composerFocus.d.ts +22 -0
  51. package/dist/helpers/createMainMessageForThread.d.ts +1 -1
  52. package/dist/helpers/downloadFile.d.ts +19 -0
  53. package/dist/helpers/fileKind.d.ts +17 -0
  54. package/dist/helpers/lastMessagePreview.d.ts +55 -0
  55. package/dist/helpers/mapWithConcurrency.d.ts +8 -0
  56. package/dist/helpers/mediaBox.d.ts +110 -0
  57. package/dist/helpers/mediaBubble.d.ts +39 -0
  58. package/dist/helpers/mediaLabel.d.ts +10 -0
  59. package/dist/helpers/mediaSendRetry.d.ts +25 -0
  60. package/dist/helpers/messageRuns.d.ts +10 -0
  61. package/dist/helpers/repairFilenameEncoding.d.ts +11 -0
  62. package/dist/helpers/roomImageGallery.d.ts +34 -0
  63. package/dist/helpers/safeUrl.d.ts +15 -0
  64. package/dist/helpers/secureFileUrl.d.ts +4 -1
  65. package/dist/helpers/viewerSender.d.ts +47 -0
  66. package/dist/hooks/useAvatarImage.d.ts +21 -0
  67. package/dist/hooks/useIsMobileViewport.d.ts +5 -0
  68. package/dist/hooks/useMediaProbe.d.ts +40 -0
  69. package/dist/hooks/usePaneWidthVar.d.ts +11 -0
  70. package/dist/hooks/usePdfThumbnail.d.ts +0 -1
  71. package/dist/hooks/usePrefersReducedMotion.d.ts +2 -0
  72. package/dist/hooks/useSendMessage.d.ts +4 -1
  73. package/dist/{main-BnLtessp.js → main-CUB_w8AZ.js} +17712 -14488
  74. package/dist/main.js +10 -10
  75. package/dist/networking/api-requests/auth.api.d.ts +2 -0
  76. package/dist/networking/callKeyStanza.d.ts +7 -0
  77. package/dist/networking/stanzaHandlers.d.ts +4 -2
  78. package/dist/networking/xmpp/sendDisplayedMarker.xmpp.d.ts +2 -0
  79. package/dist/networking/xmpp/sendMediaMessage.xmpp.d.ts +8 -0
  80. package/dist/networking/xmpp/sendReceivedReceipt.xmpp.d.ts +2 -0
  81. package/dist/networking/xmppClient.d.ts +5 -0
  82. package/dist/roomStore/callSlice.d.ts +6 -1
  83. package/dist/roomStore/index.d.ts +10 -0
  84. package/dist/roomStore/roomsSlice.d.ts +18 -3
  85. package/dist/styles/motion.d.ts +22 -2
  86. package/dist/types/models/attachment.model.d.ts +19 -0
  87. package/dist/types/models/config.model.d.ts +28 -2
  88. package/dist/types/models/customComponents.model.d.ts +2 -0
  89. package/dist/types/models/message.model.d.ts +9 -0
  90. package/dist/types/models/modal.model.d.ts +19 -0
  91. package/dist/types/models/room.model.d.ts +16 -0
  92. package/dist/types/models/xmpp.model.d.ts +3 -0
  93. package/dist/utils/messageNotificationContent.d.ts +34 -0
  94. package/dist/version.d.ts +1 -1
  95. package/package.json +1 -1
  96. package/public/firebase-messaging-sw.js +20 -3
  97. package/dist/FilePreviewModal-Cgj1iHry.js +0 -743
  98. package/dist/components/RoomComponents/styled/LastAudioMessage.d.ts +0 -6
  99. package/dist/components/RoomComponents/styled/LastMessageFile.d.ts +0 -6
  100. package/dist/components/RoomComponents/styled/LastMessagePhoto.d.ts +0 -6
  101. package/dist/components/RoomComponents/styled/LastMessageVideo.d.ts +0 -6
@@ -1,7 +1,7 @@
1
- import { jsxs as o, Fragment as T, jsx as a } from "react/jsx-runtime";
2
- import { useState as m, useCallback as M } from "react";
3
- import { aE as I, x as t, aF as j, aG as w, B, u as E, p as F, J as z, aH as R, L as U, w as x, aI as $, aJ as A, aK as H, aL as J } from "./main-BnLtessp.js";
4
- import { S as O, D as f, a as u, b as D, e as v, f as b } from "./SideDrawer-CDAoobvX.js";
1
+ import { jsxs as o, Fragment as M, jsx as a } from "react/jsx-runtime";
2
+ import { useState as m, useCallback as T } from "react";
3
+ import { aJ as I, E as t, aK as j, aL as w, B, u as E, x as z, Q as F, aM as R, S as U, D as x, aN as O, aO as $, aP as A, aQ as P } from "./main-CUB_w8AZ.js";
4
+ import { S as Q, D as f, a as u, b as D, e as v, f as b } from "./SideDrawer-CQPOf0ek.js";
5
5
  t(j)`
6
6
  display: flex;
7
7
  box-sizing: border-box;
@@ -66,28 +66,28 @@ const y = t(B)`
66
66
  }
67
67
 
68
68
  ${I}
69
- `, G = t.div`
69
+ `, H = t.div`
70
70
  display: flex;
71
71
  align-items: flex-start;
72
72
  background-color: ${({ bgColor: r }) => r};
73
73
  padding: var(--ethora-space-4, 16px);
74
74
  border-radius: var(--ethora-radius-md, 12px);
75
75
  gap: var(--ethora-space-2, 8px);
76
- `, K = t.div`
76
+ `, J = t.div`
77
77
  font-size: var(--ethora-font-size-xs, 12px);
78
78
  line-height: var(--ethora-line-height-normal, 1.5);
79
79
  color: var(--ethora-color-text, #141414);
80
80
  display: flex;
81
81
  text-align: start;
82
- `, Q = ({
82
+ `, G = ({
83
83
  handleCloseModal: r
84
84
  }) => {
85
- const { config: l } = E((s) => s.chatSettingStore), e = F(), { showToast: d } = z(), [C, c] = m(!1), [i, g] = m(!1), S = async () => {
86
- const p = (await J()).data;
85
+ const { config: l } = E((s) => s.chatSettingStore), e = z(), { showToast: d } = F(), [C, c] = m(!1), [i, g] = m(!1), S = async () => {
86
+ const p = (await P()).data;
87
87
  x.log(p);
88
88
  const L = new Blob([p], { type: "text/plain" }), h = URL.createObjectURL(L), n = document.createElement("a");
89
89
  n.href = h, n.download = "mydata.json", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(h);
90
- }, k = M(async () => {
90
+ }, k = T(async () => {
91
91
  if (!i) {
92
92
  g(!0);
93
93
  try {
@@ -103,9 +103,9 @@ const y = t(B)`
103
103
  }
104
104
  }
105
105
  }, [i, d, e]);
106
- return /* @__PURE__ */ o(T, { children: [
106
+ return /* @__PURE__ */ o(M, { children: [
107
107
  /* @__PURE__ */ o(
108
- O,
108
+ Q,
109
109
  {
110
110
  title: e("settings.manageData.title"),
111
111
  onClose: r,
@@ -131,13 +131,13 @@ const y = t(B)`
131
131
  /* @__PURE__ */ a(D, { children: /* @__PURE__ */ o(v, { children: [
132
132
  /* @__PURE__ */ a(b, { children: e("settings.manageData.deleteDescription") }),
133
133
  /* @__PURE__ */ o(
134
- G,
134
+ H,
135
135
  {
136
136
  bgColor: l?.colors?.secondary || "var(--ethora-color-primary-soft, #E7EDF9)",
137
137
  style: { marginTop: "var(--ethora-space-2, 8px)" },
138
138
  children: [
139
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a($, { color: A(l) }) }),
140
- /* @__PURE__ */ a(K, { children: e("settings.manageData.deleteDisclosure") })
139
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(O, { color: $(l) }) }),
140
+ /* @__PURE__ */ a(J, { children: e("settings.manageData.deleteDisclosure") })
141
141
  ]
142
142
  }
143
143
  ),
@@ -159,7 +159,7 @@ const y = t(B)`
159
159
  }
160
160
  ),
161
161
  C && /* @__PURE__ */ a(
162
- H,
162
+ A,
163
163
  {
164
164
  title: e("settings.manageData.deleteConfirmTitle"),
165
165
  description: e("settings.manageData.deleteConfirmDescription"),
@@ -174,5 +174,5 @@ const y = t(B)`
174
174
  ] });
175
175
  };
176
176
  export {
177
- Q as default
177
+ G as default
178
178
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as fs, jsx as ie, Fragment as hs } from "react/jsx-runtime";
2
2
  import "react";
3
- import { o as ei } from "./main-BnLtessp.js";
3
+ import { w as ei } from "./main-CUB_w8AZ.js";
4
4
  function zr(e) {
5
5
  const t = [], n = String(e || "");
6
6
  let r = n.indexOf(","), u = 0, i = !1;
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as i, Fragment as G } from "react/jsx-runtime";
2
2
  import { useRef as J, useState as h, useMemo as I, useEffect as V } from "react";
3
- import { p as Y, a as K, aO as W, u as z, ao as X, an as Z, ap as ee, aP as re, aQ as te, aw as ae, aR as oe, aS as se, aT as ne, x as c, q as ie } from "./main-BnLtessp.js";
4
- import { S as ce, i as le, j as de, f as S } from "./SideDrawer-CDAoobvX.js";
3
+ import { x as Y, a as W, aT as X, u as z, at as K, as as Z, au as ee, aU as re, aV as te, aB as ae, aW as oe, aX as se, aY as ne, E as c, y as ie } from "./main-CUB_w8AZ.js";
4
+ import { S as ce, i as le, j as de, f as S } from "./SideDrawer-CQPOf0ek.js";
5
5
  function he(t) {
6
6
  const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t || "");
7
7
  if (!e) return;
@@ -16,7 +16,7 @@ function he(t) {
16
16
  );
17
17
  return Number.isNaN(l.getTime()) ? void 0 : l.toISOString();
18
18
  }
19
- function pe(t) {
19
+ function ue(t) {
20
20
  const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t || "");
21
21
  if (!e) return;
22
22
  const l = new Date(
@@ -30,19 +30,19 @@ function pe(t) {
30
30
  );
31
31
  return Number.isNaN(l.getTime()) ? void 0 : l.toISOString();
32
32
  }
33
- const ue = (t, e) => !!(t && e && t > e), me = (t) => `${t.firstName || ""} ${t.lastName || ""}`.trim() || t.name || "";
33
+ const pe = (t, e) => !!(t && e && t > e), me = (t) => `${t.firstName || ""} ${t.lastName || ""}`.trim() || t.name || "";
34
34
  function fe(t, e, l = 8) {
35
35
  const k = e.trim().toLowerCase();
36
36
  if (!k) return [];
37
- const p = [], u = [], n = /* @__PURE__ */ new Set();
37
+ const u = [], p = [], n = /* @__PURE__ */ new Set();
38
38
  for (const x of t) {
39
39
  const d = x._id, b = me(x);
40
40
  if (!d || !b || n.has(d)) continue;
41
41
  const s = b.toLowerCase().indexOf(k);
42
- if (s !== -1 && (n.add(d), (s === 0 ? p : u).push({ id: d, name: b }), p.length >= l))
42
+ if (s !== -1 && (n.add(d), (s === 0 ? u : p).push({ id: d, name: b }), u.length >= l))
43
43
  break;
44
44
  }
45
- return [...p, ...u].slice(0, l);
45
+ return [...u, ...p].slice(0, l);
46
46
  }
47
47
  const ge = c.div`
48
48
  display: flex;
@@ -52,7 +52,7 @@ const ge = c.div`
52
52
  `, xe = c.div`
53
53
  display: flex;
54
54
  gap: var(--ethora-space-2, 8px);
55
- `, Q = c.button`
55
+ `, E = c.button`
56
56
  flex: 1 1 0;
57
57
  height: 32px;
58
58
  border: 1px solid
@@ -94,7 +94,7 @@ const ge = c.div`
94
94
  padding: var(--ethora-space-3, 12px);
95
95
  border: 1px solid var(--ethora-color-border, #e6e8ec);
96
96
  border-radius: var(--ethora-radius-md, 12px);
97
- `, O = c.label`
97
+ `, $ = c.label`
98
98
  display: flex;
99
99
  flex-direction: column;
100
100
  gap: 4px;
@@ -175,49 +175,49 @@ const ge = c.div`
175
175
  `, Re = ({
176
176
  handleCloseModal: t
177
177
  }) => {
178
- const e = Y(), l = K(), k = W(767), p = J(null), u = z((r) => r.rooms.rooms), n = z(
178
+ const e = Y(), l = W(), k = X(767), u = J(null), p = z((r) => r.rooms.rooms), n = z(
179
179
  (r) => r.rooms.activeRoomJID
180
180
  ), x = z((r) => r.rooms.usersSet);
181
181
  z(
182
182
  (r) => r.chatSettingStore.user?.xmppUsername
183
183
  );
184
- const [d, b] = h(""), [s, $] = h(
184
+ const [d, b] = h(""), [s, O] = h(
185
185
  n ? "chat" : "all"
186
- ), F = n ? n.split("@")[0] : void 0, [C, U] = h(!1), [m, T] = h(""), [f, L] = h(""), [g, M] = h(
186
+ ), F = n ? n.split("@")[0] : void 0, [C, H] = h(!1), [m, T] = h(""), [f, B] = h(""), [g, M] = h(
187
187
  null
188
- ), [v, N] = h(""), y = ue(m, f), j = I(
188
+ ), [v, N] = h(""), y = pe(m, f), j = I(
189
189
  () => ({
190
190
  fromUserId: g?.id,
191
191
  since: y ? void 0 : he(m),
192
- until: y ? void 0 : pe(f)
192
+ until: y ? void 0 : ue(f)
193
193
  }),
194
194
  [g?.id, m, f, y]
195
- ), w = (g ? 1 : 0) + (m ? 1 : 0) + (f ? 1 : 0), E = () => {
196
- M(null), N(""), T(""), L("");
197
- }, P = n ? u[n] : void 0, { members: D } = X(
195
+ ), w = (g ? 1 : 0) + (m ? 1 : 0) + (f ? 1 : 0), Q = () => {
196
+ M(null), N(""), T(""), B("");
197
+ }, P = n ? p[n] : void 0, { members: D } = K(
198
198
  n || void 0,
199
199
  s === "chat" && Z(P) && (C || v.trim() !== "")
200
- ), A = I(() => {
200
+ ), L = I(() => {
201
201
  if (!v.trim()) return [];
202
202
  let r;
203
203
  if (s === "chat") {
204
- const H = n && u[n]?.members || [];
205
- D.length > 0 ? r = ee([...H, ...D]) : r = H;
204
+ const A = n && p[n]?.members || [];
205
+ D.length > 0 ? r = ee([...A, ...D]) : r = A;
206
206
  } else
207
207
  r = Object.values(x || {});
208
208
  return fe(r, v);
209
- }, [v, s, u, n, x, D]), o = re(
209
+ }, [v, s, p, n, x, D]), o = re(
210
210
  y ? "" : d,
211
211
  s,
212
212
  F,
213
213
  j
214
214
  );
215
215
  V(() => {
216
- p.current?.focus();
216
+ u.current?.focus();
217
217
  }, []);
218
- const { open: q } = te(), _ = (r) => {
219
- q(r) && k && l(ie(void 0));
220
- }, R = I(() => o.items, [o.items]), B = d.trim();
218
+ const { open: _ } = te(), q = (r) => {
219
+ _(r) && k && l(ie(void 0));
220
+ }, R = I(() => o.items, [o.items]), U = d.trim();
221
221
  return /* @__PURE__ */ a(
222
222
  ce,
223
223
  {
@@ -230,7 +230,7 @@ const ge = c.div`
230
230
  /* @__PURE__ */ a(
231
231
  de,
232
232
  {
233
- ref: p,
233
+ ref: u,
234
234
  "data-autofocus": !0,
235
235
  type: "search",
236
236
  value: d,
@@ -244,23 +244,23 @@ const ge = c.div`
244
244
  ] }),
245
245
  /* @__PURE__ */ i(xe, { role: "group", "aria-label": e("search.messages.scope"), children: [
246
246
  /* @__PURE__ */ a(
247
- Q,
247
+ E,
248
248
  {
249
249
  type: "button",
250
250
  $active: s === "chat",
251
251
  "aria-pressed": s === "chat",
252
252
  disabled: !F,
253
- onClick: () => $("chat"),
253
+ onClick: () => O("chat"),
254
254
  children: e("search.messages.scopeChat")
255
255
  }
256
256
  ),
257
257
  /* @__PURE__ */ a(
258
- Q,
258
+ E,
259
259
  {
260
260
  type: "button",
261
261
  $active: s === "all",
262
262
  "aria-pressed": s === "all",
263
- onClick: () => $("all"),
263
+ onClick: () => O("all"),
264
264
  children: e("search.messages.scopeAll")
265
265
  }
266
266
  )
@@ -271,7 +271,7 @@ const ge = c.div`
271
271
  type: "button",
272
272
  $active: C || w > 0,
273
273
  "aria-expanded": C,
274
- onClick: () => U((r) => !r),
274
+ onClick: () => H((r) => !r),
275
275
  children: [
276
276
  e("search.messages.filters"),
277
277
  w > 0 && /* @__PURE__ */ a("span", { children: w })
@@ -279,7 +279,7 @@ const ge = c.div`
279
279
  }
280
280
  ),
281
281
  C && /* @__PURE__ */ i(ve, { children: [
282
- /* @__PURE__ */ i(O, { children: [
282
+ /* @__PURE__ */ i($, { children: [
283
283
  e("search.messages.filterSender"),
284
284
  g ? /* @__PURE__ */ i(ke, { children: [
285
285
  g.name,
@@ -302,7 +302,7 @@ const ge = c.div`
302
302
  }
303
303
  )
304
304
  ] }),
305
- !g && A.length > 0 && /* @__PURE__ */ a(Se, { role: "listbox", children: A.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
305
+ !g && L.length > 0 && /* @__PURE__ */ a(Se, { role: "listbox", children: L.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
306
306
  "button",
307
307
  {
308
308
  type: "button",
@@ -315,7 +315,7 @@ const ge = c.div`
315
315
  }
316
316
  ) }, r.id)) }),
317
317
  /* @__PURE__ */ i(ye, { children: [
318
- /* @__PURE__ */ i(O, { children: [
318
+ /* @__PURE__ */ i($, { children: [
319
319
  e("search.messages.filterSince"),
320
320
  /* @__PURE__ */ a(
321
321
  "input",
@@ -327,7 +327,7 @@ const ge = c.div`
327
327
  }
328
328
  )
329
329
  ] }),
330
- /* @__PURE__ */ i(O, { children: [
330
+ /* @__PURE__ */ i($, { children: [
331
331
  e("search.messages.filterUntil"),
332
332
  /* @__PURE__ */ a(
333
333
  "input",
@@ -335,15 +335,15 @@ const ge = c.div`
335
335
  type: "date",
336
336
  value: f,
337
337
  min: m || void 0,
338
- onChange: (r) => L(r.target.value)
338
+ onChange: (r) => B(r.target.value)
339
339
  }
340
340
  )
341
341
  ] })
342
342
  ] }),
343
343
  y && /* @__PURE__ */ a(S, { role: "alert", children: e("search.messages.dateOrder") }),
344
- w > 0 && /* @__PURE__ */ a(Ce, { type: "button", onClick: E, children: e("search.messages.filterClearAll") })
344
+ w > 0 && /* @__PURE__ */ a(Ce, { type: "button", onClick: Q, children: e("search.messages.filterClearAll") })
345
345
  ] }),
346
- !o.searchable && /* @__PURE__ */ a(S, { children: B ? e("search.messages.tooShort", { count: oe }) : e("search.messages.hint") }),
346
+ !o.searchable && /* @__PURE__ */ a(S, { children: U ? e("search.messages.tooShort", { count: oe }) : e("search.messages.hint") }),
347
347
  o.searchable && o.status === "loading" && /* @__PURE__ */ a(S, { role: "status", children: e("search.messages.searching") }),
348
348
  o.status === "error" && /* @__PURE__ */ i(S, { role: "alert", children: [
349
349
  e("search.messages.error"),
@@ -357,9 +357,9 @@ const ge = c.div`
357
357
  se,
358
358
  {
359
359
  hits: R,
360
- query: B,
360
+ query: U,
361
361
  showRoom: s === "all",
362
- onOpen: _
362
+ onOpen: q
363
363
  }
364
364
  ),
365
365
  o.hasMore && /* @__PURE__ */ a(
@@ -1,14 +1,14 @@
1
1
  import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
- import { useState as p, useRef as N, useCallback as P, useEffect as T, useMemo as z } from "react";
3
- import { g as U, aU as E, p as _, a as q, aO as F, u as A, aw as H, x as c, a2 as J, q as G } from "./main-BnLtessp.js";
4
- import { S as V, i as Z, j as K, f as S } from "./SideDrawer-CDAoobvX.js";
2
+ import { useState as p, useRef as T, useCallback as E, useEffect as N, useMemo as z } from "react";
3
+ import { l as P, aZ as U, x as _, a as F, aT as H, u as A, aB as J, E as c, a7 as Z, y as q } from "./main-CUB_w8AZ.js";
4
+ import { S as G, i as V, j as K, f as S } from "./SideDrawer-CQPOf0ek.js";
5
5
  const I = 50;
6
6
  async function Q({
7
7
  offset: r = 0,
8
8
  limit: t = I,
9
9
  signal: u
10
10
  } = {}) {
11
- const x = U.getState().chatSettingStore.user?.token || "", s = (await E.get("/v1/chats/public", {
11
+ const x = P.getState().chatSettingStore.user?.token || "", s = (await U.get("/v1/chats/public", {
12
12
  params: { limit: Math.min(t, I), offset: r },
13
13
  headers: { Authorization: x },
14
14
  signal: u
@@ -103,26 +103,26 @@ const W = c.ul`
103
103
  `, oe = (r) => (r.title || r.name).trim().charAt(0).toUpperCase() || "#", le = ({
104
104
  handleCloseModal: r
105
105
  }) => {
106
- const t = _(), u = q(), x = F(767), b = A((e) => e.rooms.rooms), s = A(
106
+ const t = _(), u = F(), x = H(767), b = A((e) => e.rooms.rooms), s = A(
107
107
  (e) => e.chatSettingStore.config?.xmppSettings?.conference
108
- ), [l, i] = p([]), [j, O] = p(0), [v, $] = p(0), [n, w] = p("loading"), [h, D] = p(""), m = N(0), f = P(async (e) => {
108
+ ), [l, i] = p([]), [j, $] = p(0), [v, D] = p(0), [n, w] = p("loading"), [h, L] = p(""), m = T(0), f = E(async (e) => {
109
109
  const o = ++m.current;
110
110
  w(e ? "loadingMore" : "loading");
111
111
  try {
112
112
  const g = await Q({ offset: e });
113
113
  if (o !== m.current) return;
114
114
  i((k) => {
115
- const B = new Set(k.map((C) => C.name));
116
- return e ? [...k, ...g.items.filter((C) => !B.has(C.name))] : g.items;
117
- }), O(g.total), $(g.nextOffset), w("done");
115
+ const R = new Set(k.map((C) => C.name));
116
+ return e ? [...k, ...g.items.filter((C) => !R.has(C.name))] : g.items;
117
+ }), $(g.total), D(g.nextOffset), w("done");
118
118
  } catch {
119
119
  o === m.current && w("error");
120
120
  }
121
121
  }, []);
122
- T(() => (f(0), () => {
122
+ N(() => (f(0), () => {
123
123
  m.current += 1;
124
124
  }), [f]);
125
- const L = z(
125
+ const O = z(
126
126
  () => new Set(Object.keys(b).map((e) => e.split("@")[0])),
127
127
  [b]
128
128
  ), y = z(() => {
@@ -130,25 +130,25 @@ const W = c.ul`
130
130
  return e ? l.filter(
131
131
  (o) => o.title.toLowerCase().includes(e) || o.description.toLowerCase().includes(e)
132
132
  ) : l;
133
- }, [l, h]), R = (e) => {
133
+ }, [l, h]), B = (e) => {
134
134
  const o = (s || "").trim();
135
- o && (u(J({ roomJID: `${e.name}@${o}` })), x && u(G(void 0)));
135
+ o && (u(Z({ roomJID: `${e.name}@${o}` })), x && u(q(void 0)));
136
136
  }, M = v < j;
137
137
  return /* @__PURE__ */ d(
138
- V,
138
+ G,
139
139
  {
140
140
  title: t("publicChats.title"),
141
141
  onClose: r,
142
142
  backLabel: t("action.close"),
143
143
  children: [
144
- /* @__PURE__ */ d(Z, { children: [
145
- /* @__PURE__ */ a(H, {}),
144
+ /* @__PURE__ */ d(V, { children: [
145
+ /* @__PURE__ */ a(J, {}),
146
146
  /* @__PURE__ */ a(
147
147
  K,
148
148
  {
149
149
  type: "search",
150
150
  value: h,
151
- onChange: (e) => D(e.target.value),
151
+ onChange: (e) => L(e.target.value),
152
152
  placeholder: t("publicChats.filter"),
153
153
  "aria-label": t("publicChats.filter")
154
154
  }
@@ -164,7 +164,7 @@ const W = c.ul`
164
164
  ] }),
165
165
  n !== "loading" && n !== "error" && y.length === 0 && /* @__PURE__ */ a(S, { children: h.trim() && M ? t("publicChats.emptyFilterMore") : t("publicChats.empty") }),
166
166
  y.length > 0 && /* @__PURE__ */ a(W, { children: y.map((e) => {
167
- const o = L.has(e.name);
167
+ const o = O.has(e.name);
168
168
  return /* @__PURE__ */ d(X, { children: [
169
169
  /* @__PURE__ */ a(Y, { $src: e.picture, "aria-hidden": "true", children: !e.picture && oe(e) }),
170
170
  /* @__PURE__ */ d(ee, { children: [
@@ -176,7 +176,7 @@ const W = c.ul`
176
176
  {
177
177
  type: "button",
178
178
  $open: o,
179
- onClick: () => R(e),
179
+ onClick: () => B(e),
180
180
  children: t(o ? "publicChats.open" : "publicChats.join")
181
181
  }
182
182
  )
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
2
  import { useId as f, useRef as v } from "react";
3
- import { p as u, y as g, aO as m, aV as w, B as b, aW as y, x as e, aX as D, aY as k } from "./main-BnLtessp.js";
3
+ import { x as u, F as g, aT as m, a_ as w, B as b, a$ as y, E as e, b0 as D, b1 as k } from "./main-CUB_w8AZ.js";
4
4
  const c = 767, R = `${c}px`, z = e.div`
5
5
  position: relative;
6
6
  pointer-events: auto;
@@ -43,7 +43,7 @@ const c = 767, R = `${c}px`, z = e.div`
43
43
  align-items: center;
44
44
  gap: var(--ethora-space-1, 4px);
45
45
  flex: 0 0 auto;
46
- `, A = e.div`
46
+ `, T = e.div`
47
47
  flex: 1 1 auto;
48
48
  min-height: 0;
49
49
  overflow-y: auto;
@@ -58,11 +58,11 @@ const c = 767, R = `${c}px`, z = e.div`
58
58
  padding-left: var(--ethora-space-4, 16px);
59
59
  padding-right: var(--ethora-space-4, 16px);
60
60
  }
61
- `, O = e.section`
61
+ `, H = e.section`
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  gap: var(--ethora-space-2, 8px);
65
- `, W = e.h3`
65
+ `, _ = e.h3`
66
66
  margin: 0;
67
67
  padding: 0 var(--ethora-space-1, 4px);
68
68
  font-size: var(--ethora-font-size-xs, 12px);
@@ -70,7 +70,7 @@ const c = 767, R = `${c}px`, z = e.div`
70
70
  letter-spacing: 0.06em;
71
71
  text-transform: uppercase;
72
72
  color: var(--ethora-color-text-muted, #8c8c8c);
73
- `, $ = e.div`
73
+ `, O = e.div`
74
74
  display: flex;
75
75
  flex-direction: column;
76
76
  box-sizing: border-box;
@@ -79,17 +79,17 @@ const c = 767, R = `${c}px`, z = e.div`
79
79
  border-radius: var(--ethora-radius-md, 12px);
80
80
  background-color: var(--ethora-color-bg, #fff);
81
81
  overflow: hidden;
82
- `, _ = e.div`
82
+ `, W = e.div`
83
83
  display: flex;
84
84
  flex-direction: column;
85
85
  gap: var(--ethora-space-1, 4px);
86
86
  padding: var(--ethora-space-3, 12px) var(--ethora-space-4, 16px);
87
- `, K = e.div`
87
+ `, F = e.div`
88
88
  display: flex;
89
89
  align-items: baseline;
90
90
  justify-content: space-between;
91
91
  gap: var(--ethora-space-2, 8px);
92
- `, V = e.button`
92
+ `, K = e.button`
93
93
  border: none;
94
94
  background: transparent;
95
95
  padding: var(--ethora-space-2, 8px) 0;
@@ -109,11 +109,11 @@ const c = 767, R = `${c}px`, z = e.div`
109
109
  outline-offset: 2px;
110
110
  border-radius: var(--ethora-radius-sm, 8px);
111
111
  }
112
- `, X = e.div`
112
+ `, V = e.div`
113
113
  height: 1px;
114
114
  margin: 0 var(--ethora-space-4, 16px);
115
115
  background-color: var(--ethora-color-border, #e6e8ec);
116
- `, F = e.div`
116
+ `, X = e.div`
117
117
  display: flex;
118
118
  align-items: center;
119
119
  gap: var(--ethora-space-2, 8px);
@@ -135,7 +135,7 @@ const c = 767, R = `${c}px`, z = e.div`
135
135
  & > svg {
136
136
  flex: 0 0 auto;
137
137
  }
138
- `, Y = e.input`
138
+ `, q = e.input`
139
139
  flex: 1 1 auto;
140
140
  min-width: 0;
141
141
  border: none;
@@ -148,22 +148,22 @@ const c = 767, R = `${c}px`, z = e.div`
148
148
  &::placeholder {
149
149
  color: var(--ethora-color-text-muted, #8c8c8c);
150
150
  }
151
- `, q = e.div`
151
+ `, G = e.div`
152
152
  display: flex;
153
153
  flex-direction: column;
154
154
  width: 100%;
155
- `, T = e.div`
155
+ `, A = e.div`
156
156
  font-size: var(--ethora-font-size-sm, 14px);
157
157
  font-weight: var(--ethora-font-weight-medium, 500);
158
158
  color: var(--ethora-color-text, #141414);
159
159
  text-align: start;
160
- `, C = e.div`
160
+ `, E = e.div`
161
161
  font-size: var(--ethora-font-size-xs, 12px);
162
162
  font-weight: var(--ethora-font-weight-regular, 400);
163
163
  color: var(--ethora-color-text-muted, #8c8c8c);
164
164
  text-align: start;
165
165
  line-height: 1.4;
166
- `, E = e.button`
166
+ `, C = e.button`
167
167
  display: flex;
168
168
  align-items: center;
169
169
  gap: var(--ethora-space-3, 12px);
@@ -205,17 +205,17 @@ const c = 767, R = `${c}px`, z = e.div`
205
205
  strokeLinecap: "round",
206
206
  strokeLinejoin: "round"
207
207
  }
208
- ) }), G = ({
208
+ ) }), J = ({
209
209
  label: r,
210
210
  hint: a,
211
211
  onClick: t
212
- }) => /* @__PURE__ */ i(E, { type: "button", onClick: t, children: [
212
+ }) => /* @__PURE__ */ i(C, { type: "button", onClick: t, children: [
213
213
  /* @__PURE__ */ i(L, { children: [
214
- /* @__PURE__ */ o(T, { children: r }),
215
- a && /* @__PURE__ */ o(C, { children: a })
214
+ /* @__PURE__ */ o(A, { children: r }),
215
+ a && /* @__PURE__ */ o(E, { children: a })
216
216
  ] }),
217
217
  /* @__PURE__ */ o(j, { "aria-hidden": "true", children: /* @__PURE__ */ o(M, {}) })
218
- ] }), J = ({
218
+ ] }), Q = ({
219
219
  title: r,
220
220
  onClose: a,
221
221
  headerActions: t,
@@ -247,24 +247,24 @@ const c = 767, R = `${c}px`, z = e.div`
247
247
  /* @__PURE__ */ o(I, { id: n, children: r }),
248
248
  t && /* @__PURE__ */ o(S, { children: t })
249
249
  ] }),
250
- /* @__PURE__ */ o(A, { children: d })
250
+ /* @__PURE__ */ o(T, { children: d })
251
251
  ]
252
252
  }
253
253
  );
254
254
  };
255
255
  export {
256
- O as D,
257
- J as S,
258
- W as a,
259
- $ as b,
260
- X as c,
261
- G as d,
262
- _ as e,
263
- C as f,
264
- T as g,
265
- K as h,
266
- F as i,
267
- Y as j,
268
- q as k,
269
- V as l
256
+ H as D,
257
+ Q as S,
258
+ _ as a,
259
+ O as b,
260
+ V as c,
261
+ J as d,
262
+ W as e,
263
+ E as f,
264
+ A as g,
265
+ F as h,
266
+ X as i,
267
+ q as j,
268
+ G as k,
269
+ K as l
270
270
  };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as u, Fragment as $, jsx as o } from "react/jsx-runtime";
2
2
  import { forwardRef as ge, useState as I, useCallback as y, useImperativeHandle as ve, useRef as ae, useMemo as M } from "react";
3
- import { a as be, p as J, t as ye, v as xe, w as we, P as re, I as H, x as D, y as Ce, z as Se, C as Ie, D as te, E as De, F as Ne, G as ke, J as Ue, u as Q, K as Fe, L as Pe, N as Ae, O as Re, Q as Y, q as Z, R as ze, S as je, T as Be, s as $e, B as X, U as Ee, W as Oe, X as Te, Y as ee, Z as R, _ as Le, $ as Me, V as He, A as Xe, a0 as We, a1 as Je, a2 as Ke, a3 as Ve } from "./main-BnLtessp.js";
4
- import { D as E, a as W, b as Ge, e as qe, f as _e, S as Qe } from "./SideDrawer-CDAoobvX.js";
5
- import { P as ne, a as Ye, D as Ze, b as eo, h as oo } from "./handleCopyClick-BtXos0AJ.js";
3
+ import { a as be, x as J, z as ye, C as xe, D as we, P as re, I as H, E as D, F as Ce, G as Se, J as Ie, K as te, L as De, N as Ne, O as ke, Q as Ue, u as Q, R as Fe, S as Pe, T as Ae, U as Re, W as Y, y as Z, X as ze, Y as je, Z as Be, h as $e, B as X, _ as Ee, $ as Oe, a0 as Te, a1 as ee, a2 as R, a3 as Le, a4 as Me, V as He, A as Xe, a5 as We, a6 as Je, a7 as Ke, a8 as Ve } from "./main-CUB_w8AZ.js";
4
+ import { D as E, a as W, b as Ge, e as _e, f as qe, S as Qe } from "./SideDrawer-CQPOf0ek.js";
5
+ import { P as ne, a as Ye, D as Ze, b as eo, h as oo } from "./handleCopyClick-DGaZhy_u.js";
6
6
  const ao = (c, i) => {
7
7
  const l = atob(c.split(",")[1]), g = new ArrayBuffer(l.length), e = new Uint8Array(g);
8
8
  for (let r = 0; r < l.length; r++)
@@ -369,9 +369,9 @@ const to = te`
369
369
  }), null;
370
370
  }
371
371
  }
372
- const p = Y(t.id), ue = [Y(r.defaultWallet.walletAddress), p].sort().join(".").toLowerCase(), _ = [r.firstName, t.name?.split(" ")?.[0]].sort().join(" and "), A = await l.createPrivateRoomStanza(
373
- _,
374
- `Private chat ${_}`,
372
+ const p = Y(t.id), ue = [Y(r.defaultWallet.walletAddress), p].sort().join(".").toLowerCase(), q = [r.firstName, t.name?.split(" ")?.[0]].sort().join(" and "), A = await l.createPrivateRoomStanza(
373
+ q,
374
+ `Private chat ${q}`,
375
375
  ue
376
376
  );
377
377
  return A && (await l.inviteRoomRequestStanza(p, A), await l.getRoomsStanza()), A ? {
@@ -417,8 +417,8 @@ const to = te`
417
417
  try {
418
418
  await Be(h.bareName, { kind: d });
419
419
  } catch (k) {
420
- const q = k instanceof Error ? k.message : e("toast.failedToCreateCall");
421
- i($e(q));
420
+ const _ = k instanceof Error ? k.message : e("toast.failedToCreateCall");
421
+ i($e(_));
422
422
  }
423
423
  },
424
424
  [z, i, e]
@@ -481,8 +481,8 @@ const to = te`
481
481
  ] }),
482
482
  !t && n?.translates?.enabled && /* @__PURE__ */ u(E, { children: [
483
483
  /* @__PURE__ */ o(W, { children: e("modal.profile.preferences") }),
484
- /* @__PURE__ */ o(Ge, { children: /* @__PURE__ */ u(qe, { children: [
485
- /* @__PURE__ */ o(_e, { children: e("modal.profile.languageHint") }),
484
+ /* @__PURE__ */ o(Ge, { children: /* @__PURE__ */ u(_e, { children: [
485
+ /* @__PURE__ */ o(qe, { children: e("modal.profile.languageHint") }),
486
486
  /* @__PURE__ */ o(
487
487
  ho,
488
488
  {