@orbitconnect/react 0.1.0 → 0.1.3

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
@@ -27,29 +27,31 @@ function v() {
27
27
  return e;
28
28
  }
29
29
  function y() {
30
- let e = (0, g.c)(21), { appConfig: t } = v(), n = t?.showChatHeader ?? !0, r = t?.showQuickMessageButton ?? !0, i = t?.useRichTextEditor ?? !0, a = t?.showAttachMentButton ?? !0, o = t?.showSearchIcon ?? !0, s = t?.showAudioIcon ?? !0, c = t?.showVideoIcon ?? !0, l = t?.enableMeetingUi ?? !0, u = t?.showPoweredBy ?? !0, d = t?.attachmentIcon, f = t?.recordIcon, p = t?.QuickmessageIcon, m = t?.emojIcon, h = t?.stickerIcon, _ = t?.sendIcon, y = t?.deliveredIcon, b = t?.sentIcon, x = t?.readIcon, S = t?.callIcon, C = t?.VideoCallIcon, w;
31
- return e[0] !== n || e[1] !== r || e[2] !== f || e[3] !== p || e[4] !== m || e[5] !== h || e[6] !== _ || e[7] !== y || e[8] !== b || e[9] !== x || e[10] !== S || e[11] !== C || e[12] !== i || e[13] !== a || e[14] !== o || e[15] !== s || e[16] !== c || e[17] !== l || e[18] !== u || e[19] !== d ? (w = {
30
+ let e = (0, g.c)(23), { appConfig: t } = v(), n = t?.showChatHeader ?? !0, r = t?.showConversationHeader ?? !0, i = t?.showQuickMessageButton ?? !0, a = t?.useRichTextEditor ?? !0, o = t?.showAttachMentButton ?? !0, s = t?.showSearchIcon ?? !0, c = t?.showAudioIcon ?? !0, l = t?.showVideoIcon ?? !0, u = t?.enableMeetingUi ?? !0, d = t?.showPoweredBy ?? !0, f = t?.enableE2E ?? !1, p = t?.attachmentIcon, m = t?.recordIcon, h = t?.QuickmessageIcon, _ = t?.emojIcon, y = t?.stickerIcon, b = t?.sendIcon, x = t?.deliveredIcon, S = t?.sentIcon, C = t?.readIcon, w = t?.callIcon, T = t?.VideoCallIcon, E;
31
+ return e[0] !== n || e[1] !== r || e[2] !== f || e[3] !== p || e[4] !== m || e[5] !== h || e[6] !== _ || e[7] !== y || e[8] !== b || e[9] !== x || e[10] !== S || e[11] !== C || e[12] !== i || e[13] !== w || e[14] !== T || e[15] !== a || e[16] !== o || e[17] !== s || e[18] !== c || e[19] !== l || e[20] !== u || e[21] !== d ? (E = {
32
32
  showChatHeader: n,
33
- showQuickMessageButton: r,
34
- useRichTextEditor: i,
35
- showAttachMentButton: a,
36
- showSearchIcon: o,
37
- showAudioIcon: s,
38
- showVideoIcon: c,
39
- enableMeetingUi: l,
40
- showPoweredBy: u,
41
- attachmentIcon: d,
42
- recordIcon: f,
43
- QuickmessageIcon: p,
44
- emojIcon: m,
45
- stickerIcon: h,
46
- sendIcon: _,
47
- deliveredIcon: y,
48
- sentIcon: b,
49
- readIcon: x,
50
- callIcon: S,
51
- VideoCallIcon: C
52
- }, e[0] = n, e[1] = r, e[2] = f, e[3] = p, e[4] = m, e[5] = h, e[6] = _, e[7] = y, e[8] = b, e[9] = x, e[10] = S, e[11] = C, e[12] = i, e[13] = a, e[14] = o, e[15] = s, e[16] = c, e[17] = l, e[18] = u, e[19] = d, e[20] = w) : w = e[20], w;
33
+ showConversationHeader: r,
34
+ showQuickMessageButton: i,
35
+ useRichTextEditor: a,
36
+ showAttachMentButton: o,
37
+ showSearchIcon: s,
38
+ showAudioIcon: c,
39
+ showVideoIcon: l,
40
+ enableMeetingUi: u,
41
+ showPoweredBy: d,
42
+ enableE2E: f,
43
+ attachmentIcon: p,
44
+ recordIcon: m,
45
+ QuickmessageIcon: h,
46
+ emojIcon: _,
47
+ stickerIcon: y,
48
+ sendIcon: b,
49
+ deliveredIcon: x,
50
+ sentIcon: S,
51
+ readIcon: C,
52
+ callIcon: w,
53
+ VideoCallIcon: T
54
+ }, e[0] = n, e[1] = r, e[2] = f, e[3] = p, e[4] = m, e[5] = h, e[6] = _, e[7] = y, e[8] = b, e[9] = x, e[10] = S, e[11] = C, e[12] = i, e[13] = w, e[14] = T, e[15] = a, e[16] = o, e[17] = s, e[18] = c, e[19] = l, e[20] = u, e[21] = d, e[22] = E) : E = e[22], E;
53
55
  }
54
56
  //#endregion
55
57
  //#region src/api/client.ts
@@ -1298,52 +1300,126 @@ function $({ children: e }) {
1298
1300
  });
1299
1301
  }
1300
1302
  //#endregion
1303
+ //#region src/e2e/psalms.ts
1304
+ var ie = 3;
1305
+ function ae(e, t) {
1306
+ let n = [];
1307
+ for (let r = 0; r < t; r++) n.push(e.charCodeAt(r % e.length));
1308
+ return n;
1309
+ }
1310
+ function oe(e) {
1311
+ let t = new Uint8Array(e);
1312
+ return crypto.getRandomValues(t), Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
1313
+ }
1314
+ function se(e, t) {
1315
+ let n = oe(16), r = ae(t, e.length), i = ae(n, e.length), a = [];
1316
+ for (let t = 0; t < e.length; t++) {
1317
+ let n = e.charCodeAt(t) + r[t] - i[t];
1318
+ a.push(Math.floor(n / ie), n % ie);
1319
+ }
1320
+ return {
1321
+ cipher: btoa(JSON.stringify(a)),
1322
+ iv: n
1323
+ };
1324
+ }
1325
+ function ce(e, t, n) {
1326
+ let r = JSON.parse(atob(e)), i = r.length / 2, a = ae(n, i), o = ae(t, i), s = "";
1327
+ for (let e = 0; e < i; e++) {
1328
+ let t = r[e * 2] * ie + r[e * 2 + 1] + o[e];
1329
+ s += String.fromCharCode(t - a[e]);
1330
+ }
1331
+ return s;
1332
+ }
1333
+ //#endregion
1334
+ //#region src/e2e/index.ts
1335
+ async function le() {
1336
+ let e = await crypto.subtle.generateKey({
1337
+ name: "RSA-OAEP",
1338
+ modulusLength: 2048,
1339
+ publicExponent: new Uint8Array([
1340
+ 1,
1341
+ 0,
1342
+ 1
1343
+ ]),
1344
+ hash: "SHA-256"
1345
+ }, !0, ["encrypt", "decrypt"]), t = await crypto.subtle.exportKey("spki", e.publicKey), n = btoa(String.fromCharCode(...new Uint8Array(t)));
1346
+ return {
1347
+ publicKey: e.publicKey,
1348
+ privateKey: e.privateKey,
1349
+ publicKeyB64: n
1350
+ };
1351
+ }
1352
+ async function ue(e, t, n) {
1353
+ let { cipher: r, iv: i } = se(e, t), a = JSON.stringify({
1354
+ cipher: r,
1355
+ iv: i
1356
+ }), o = await crypto.subtle.encrypt({ name: "RSA-OAEP" }, n, new TextEncoder().encode(a));
1357
+ return btoa(String.fromCharCode(...new Uint8Array(o)));
1358
+ }
1359
+ async function de(e, t, n) {
1360
+ let r = Uint8Array.from(atob(e), (e) => e.charCodeAt(0)), i = await crypto.subtle.decrypt({ name: "RSA-OAEP" }, n, r), { cipher: a, iv: o } = JSON.parse(new TextDecoder().decode(i));
1361
+ return ce(a, o, t);
1362
+ }
1363
+ //#endregion
1301
1364
  //#region src/OrbitProvider.tsx
1302
- var ie = "https://orbitxyz.muvle.org/api/v1";
1303
- function ae(e) {
1304
- let t = (0, g.c)(23), { clientId: n, userToken: r, appUserId: i, theme: a, baseTheme: o, onTokenExpired: s, appConfig: c, children: u } = e, d = o === void 0 ? S : o, f;
1305
- t[0] !== i || t[1] !== n || t[2] !== r ? (f = new b({
1306
- baseUrl: ie,
1307
- userToken: r,
1365
+ var fe = "http://localhost:3000/api/v1";
1366
+ function pe(e) {
1367
+ let t = (0, g.c)(31), { clientId: n, userToken: i, appUserId: a, theme: o, baseTheme: c, onTokenExpired: u, appConfig: d, children: f } = e, p = c === void 0 ? S : c, m;
1368
+ t[0] !== a || t[1] !== n || t[2] !== i ? (m = new b({
1369
+ baseUrl: fe,
1370
+ userToken: i,
1308
1371
  clientId: n,
1309
- appUserId: i
1310
- }), t[0] = i, t[1] = n, t[2] = r, t[3] = f) : f = t[3];
1311
- let p = f, m;
1312
- t[4] !== p || t[5] !== c || t[6] !== i || t[7] !== n ? (m = {
1313
- apiClient: p,
1314
- appUserId: i,
1372
+ appUserId: a
1373
+ }), t[0] = a, t[1] = n, t[2] = i, t[3] = m) : m = t[3];
1374
+ let h = m, [v, y] = s(void 0), x;
1375
+ t[4] === d?.enableE2E ? x = t[5] : (x = () => d?.enableE2E ? Array.from(crypto.getRandomValues(new Uint8Array(32))).map(me).join("") : "", t[4] = d?.enableE2E, t[5] = x);
1376
+ let [C] = s(x), w;
1377
+ t[6] === d?.enableE2E ? w = t[7] : (w = () => {
1378
+ d?.enableE2E && le().then(y);
1379
+ }, t[6] = d?.enableE2E, t[7] = w);
1380
+ let T = d?.enableE2E, E;
1381
+ t[8] === T ? E = t[9] : (E = [T], t[8] = T, t[9] = E), r(w, E);
1382
+ let O;
1383
+ t[10] !== h || t[11] !== d || t[12] !== a || t[13] !== n || t[14] !== v || t[15] !== C ? (O = {
1384
+ apiClient: h,
1385
+ appUserId: a,
1315
1386
  clientId: n,
1316
- baseUrl: ie,
1317
- appConfig: c
1318
- }, t[4] = p, t[5] = c, t[6] = i, t[7] = n, t[8] = m) : m = t[8];
1319
- let h = m, v;
1320
- t[9] === u ? v = t[10] : (v = /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l($, { children: u }) }), t[9] = u, t[10] = v);
1321
- let y;
1322
- t[11] !== v || t[12] !== h ? (y = /* @__PURE__ */ l(_.Provider, {
1323
- value: h,
1324
- children: v
1325
- }), t[11] = v, t[12] = h, t[13] = y) : y = t[13];
1326
- let x;
1327
- t[14] !== n || t[15] !== s || t[16] !== y || t[17] !== r ? (x = /* @__PURE__ */ l(M, {
1387
+ baseUrl: fe,
1388
+ appConfig: d,
1389
+ e2eKeys: v,
1390
+ e2eSessionKey: C
1391
+ }, t[10] = h, t[11] = d, t[12] = a, t[13] = n, t[14] = v, t[15] = C, t[16] = O) : O = t[16];
1392
+ let k = O, A;
1393
+ t[17] === f ? A = t[18] : (A = /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l($, { children: f }) }), t[17] = f, t[18] = A);
1394
+ let j;
1395
+ t[19] !== A || t[20] !== k ? (j = /* @__PURE__ */ l(_.Provider, {
1396
+ value: k,
1397
+ children: A
1398
+ }), t[19] = A, t[20] = k, t[21] = j) : j = t[21];
1399
+ let N;
1400
+ t[22] !== n || t[23] !== u || t[24] !== j || t[25] !== i ? (N = /* @__PURE__ */ l(M, {
1328
1401
  clientId: n,
1329
- userToken: r,
1330
- baseUrl: ie,
1331
- onTokenExpired: s,
1332
- children: y
1333
- }), t[14] = n, t[15] = s, t[16] = y, t[17] = r, t[18] = x) : x = t[18];
1334
- let C;
1335
- return t[19] !== d || t[20] !== x || t[21] !== a ? (C = /* @__PURE__ */ l(D, {
1336
- theme: a,
1337
- baseTheme: d,
1338
- children: x
1339
- }), t[19] = d, t[20] = x, t[21] = a, t[22] = C) : C = t[22], C;
1402
+ userToken: i,
1403
+ baseUrl: fe,
1404
+ onTokenExpired: u,
1405
+ children: j
1406
+ }), t[22] = n, t[23] = u, t[24] = j, t[25] = i, t[26] = N) : N = t[26];
1407
+ let P;
1408
+ return t[27] !== p || t[28] !== N || t[29] !== o ? (P = /* @__PURE__ */ l(D, {
1409
+ theme: o,
1410
+ baseTheme: p,
1411
+ children: N
1412
+ }), t[27] = p, t[28] = N, t[29] = o, t[30] = P) : P = t[30], P;
1413
+ }
1414
+ function me(e) {
1415
+ return e.toString(16).padStart(2, "0");
1340
1416
  }
1341
1417
  //#endregion
1342
1418
  //#region src/hooks/useConversations.ts
1343
- function oe(e) {
1419
+ function he(e) {
1344
1420
  if (e) return e.avatar_url ?? e.avatarUrl ?? e.photo_url;
1345
1421
  }
1346
- function se(e) {
1422
+ function ge(e) {
1347
1423
  if (e.type !== "media") return e.content ?? "";
1348
1424
  let t = e.metadata ?? {}, n = t.attachment_type;
1349
1425
  if (n === "sticker") return "🎭 Sticker";
@@ -1382,8 +1458,8 @@ function se(e) {
1382
1458
  "7z"
1383
1459
  ].includes(i) ? "🗜️ Archive" : "📎 Attachment";
1384
1460
  }
1385
- function ce(e, t) {
1386
- let n = (e.allParticipants ?? []).find((e) => e.app_user_id !== t), r = e.messages?.[0], i = e.type === "group" ? "Group" : n?.appUser?.display_name ?? "Unknown", a = e.type === "direct" ? oe(n?.appUser?.metadata) : void 0, o = e.type === "direct" ? n?.appUser?.presence?.status === "online" : void 0, s = e.type === "direct" ? n?.appUser?.presence?.status ?? "offline" : void 0, c = r?.sender_id === t, l = c ? "You" : r?.sender?.display_name ?? void 0, u = c ? r?.metadata?.status ?? "sent" : void 0;
1461
+ function _e(e, t) {
1462
+ let n = (e.allParticipants ?? []).find((e) => e.app_user_id !== t), r = e.messages?.[0], i = e.type === "group" ? "Group" : n?.appUser?.display_name ?? "Unknown", a = e.type === "direct" ? he(n?.appUser?.metadata) : void 0, o = e.type === "direct" ? n?.appUser?.presence?.status === "online" : void 0, s = e.type === "direct" ? n?.appUser?.presence?.status ?? "offline" : void 0, c = r?.sender_id === t, l = c ? "You" : r?.sender?.display_name ?? void 0, u = c ? r?.metadata?.status ?? "sent" : void 0;
1387
1463
  return {
1388
1464
  id: e.id,
1389
1465
  name: i,
@@ -1392,7 +1468,7 @@ function ce(e, t) {
1392
1468
  presenceStatus: s,
1393
1469
  isGroup: e.type === "group",
1394
1470
  otherUserId: e.type === "direct" ? n?.app_user_id : void 0,
1395
- lastMessage: r ? se(r) : void 0,
1471
+ lastMessage: r ? ge(r) : void 0,
1396
1472
  senderPrefix: r ? l : void 0,
1397
1473
  lastMessageId: r?.id,
1398
1474
  lastMessageStatus: u,
@@ -1402,14 +1478,14 @@ function ce(e, t) {
1402
1478
  }) : ""
1403
1479
  };
1404
1480
  }
1405
- function le() {
1481
+ function ve() {
1406
1482
  let e = (0, g.c)(25), { apiClient: t, appUserId: n } = v(), i;
1407
1483
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = [], e[0] = i) : i = e[0];
1408
1484
  let [a, c] = s(i), [l, u] = s(!0), d;
1409
1485
  e[1] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ new Map(), e[1] = d) : d = e[1];
1410
1486
  let f = o(d), p;
1411
1487
  e[2] !== t || e[3] !== n ? (p = () => {
1412
- t.get("/conversations").then((e) => c(e.map((e) => ce(e, n)))).finally(() => u(!1));
1488
+ t.get("/conversations").then((e) => c(e.map((e) => _e(e, n)))).finally(() => u(!1));
1413
1489
  }, e[2] = t, e[3] = n, e[4] = p) : p = e[4];
1414
1490
  let m = p, h, _;
1415
1491
  e[5] === m ? (h = e[6], _ = e[7]) : (h = () => {
@@ -1419,9 +1495,9 @@ function le() {
1419
1495
  e[8] !== t || e[9] !== n ? (y = () => {
1420
1496
  t.get("/conversations").then((e) => {
1421
1497
  c((t) => {
1422
- let r = new Map(t.map(ue));
1498
+ let r = new Map(t.map(ye));
1423
1499
  return e.map((e) => {
1424
- let t = ce(e, n), i = r.get(t.id);
1500
+ let t = _e(e, n), i = r.get(t.id);
1425
1501
  return i?.isTyping ? {
1426
1502
  ...t,
1427
1503
  isTyping: !0,
@@ -1497,7 +1573,7 @@ function le() {
1497
1573
  type: "direct",
1498
1574
  participant_id: e
1499
1575
  });
1500
- return c((e) => [ce(r, n), ...e]), r.id;
1576
+ return c((e) => [_e(r, n), ...e]), r.id;
1501
1577
  }, e[17] = t, e[18] = n, e[19] = T) : T = e[19];
1502
1578
  let E = T, D;
1503
1579
  return e[20] !== a || e[21] !== E || e[22] !== l || e[23] !== m ? (D = {
@@ -1507,7 +1583,7 @@ function le() {
1507
1583
  refresh: m
1508
1584
  }, e[20] = a, e[21] = E, e[22] = l, e[23] = m, e[24] = D) : D = e[24], D;
1509
1585
  }
1510
- function ue(e) {
1586
+ function ye(e) {
1511
1587
  return [e.id, {
1512
1588
  isTyping: e.isTyping,
1513
1589
  typingName: e.typingName
@@ -1515,12 +1591,12 @@ function ue(e) {
1515
1591
  }
1516
1592
  //#endregion
1517
1593
  //#region src/hooks/useMessages.ts
1518
- function de(e) {
1594
+ function be(e) {
1519
1595
  if (!e || e.length === 0) return "sent";
1520
1596
  let t = e.map((e) => e.status);
1521
1597
  return t.every((e) => e === "read") ? "read" : t.some((e) => e === "delivered" || e === "read") ? "delivered" : "sent";
1522
1598
  }
1523
- function fe(e, t) {
1599
+ function xe(e, t) {
1524
1600
  let n, r;
1525
1601
  if (e.type === "system") {
1526
1602
  let n = e.metadata ?? {};
@@ -1578,7 +1654,7 @@ function fe(e, t) {
1578
1654
  hour: "2-digit",
1579
1655
  minute: "2-digit"
1580
1656
  }),
1581
- status: e.sender_id === t ? de(e.deliveries) : void 0,
1657
+ status: e.sender_id === t ? be(e.deliveries) : void 0,
1582
1658
  updated_at: e.updated_at,
1583
1659
  attachment: n
1584
1660
  };
@@ -1609,15 +1685,31 @@ function fe(e, t) {
1609
1685
  }
1610
1686
  return i;
1611
1687
  }
1612
- function pe(e) {
1613
- let { apiClient: n, appUserId: i } = v(), { socket: a, status: c } = A(), { play: l } = U(), [u, d] = s([]), [f, p] = s(!0), [m, h] = s([]), g = o(0), _ = o(c), y = o(/* @__PURE__ */ new Set());
1688
+ function Se(e) {
1689
+ let { apiClient: n, appUserId: i, appConfig: a, e2eKeys: c, e2eSessionKey: l } = v(), { socket: u, status: d } = A(), { play: f } = U(), p = !!(a?.enableE2E && c && l), m = t(async (e) => {
1690
+ if (!p || !e || !c || !l) return e;
1691
+ try {
1692
+ return await de(e, l, c.privateKey);
1693
+ } catch {
1694
+ return e;
1695
+ }
1696
+ }, [
1697
+ p,
1698
+ c,
1699
+ l
1700
+ ]), [h, g] = s([]), [_, y] = s(!0), [b, x] = s([]), S = o(0), C = o(d), w = o(/* @__PURE__ */ new Set());
1614
1701
  r(() => {
1615
1702
  if (!e) return;
1616
1703
  let t = !1;
1617
- return n.get(`/conversations/${e}/messages?limit=50`).then((e) => {
1618
- t || (y.current = new Set(e.map((e) => e.id)), d(e.map((e) => fe(e, i))), g.current = e[e.length - 1]?.sequence_number ?? 0, p(!1));
1704
+ return n.get(`/conversations/${e}/messages?limit=50`).then(async (e) => {
1705
+ if (t) return;
1706
+ let n = await Promise.all(e.map(async (e) => ({
1707
+ ...e,
1708
+ content: await m(e.content)
1709
+ })));
1710
+ w.current = new Set(n.map((e) => e.id)), g(n.map((e) => xe(e, i))), S.current = n[n.length - 1]?.sequence_number ?? 0, y(!1);
1619
1711
  }).catch(() => {
1620
- t || p(!1);
1712
+ t || y(!1);
1621
1713
  }), () => {
1622
1714
  t = !0;
1623
1715
  };
@@ -1627,47 +1719,53 @@ function pe(e) {
1627
1719
  i
1628
1720
  ]), r(() => {
1629
1721
  if (!e) return;
1630
- a.subscribeContext(e);
1631
- let t = b.current;
1722
+ u.subscribeContext(e);
1723
+ let t = T.current;
1632
1724
  return () => {
1633
- a.unsubscribeContext(e), t.forEach((e) => clearTimeout(e)), t.clear(), h([]);
1725
+ u.unsubscribeContext(e), t.forEach((e) => clearTimeout(e)), t.clear(), x([]);
1634
1726
  };
1635
- }, [e, a]), r(() => {
1727
+ }, [e, u]), r(() => {
1636
1728
  if (e) {
1637
- if (_.current === "reconnecting" && c === "connected") {
1638
- let t = g.current;
1729
+ if (C.current === "reconnecting" && d === "connected") {
1730
+ let t = S.current;
1639
1731
  n.get(`/conversations/${e}/messages?after_sequence=${t}`).then((e) => {
1640
- e.length && (d((t) => {
1641
- let n = new Set(t.map((e) => e.id)), r = e.filter((e) => !n.has(e.id)).map((e) => fe(e, i));
1642
- return r.length ? (r.forEach((e) => y.current.add(e.id)), [...t, ...r]) : t;
1643
- }), g.current = e.reduce((e, t) => Math.max(e, t.sequence_number), g.current));
1732
+ e.length && (g((t) => {
1733
+ let n = new Set(t.map((e) => e.id)), r = e.filter((e) => !n.has(e.id)).map((e) => xe(e, i));
1734
+ return r.length ? (r.forEach((e) => w.current.add(e.id)), [...t, ...r]) : t;
1735
+ }), S.current = e.reduce((e, t) => Math.max(e, t.sequence_number), S.current));
1644
1736
  }).catch(() => {
1645
1737
  console.warn("[useMessages] backfill request failed, will retry on next reconnect");
1646
1738
  });
1647
1739
  }
1648
- _.current = c;
1740
+ C.current = d;
1649
1741
  }
1650
1742
  }, [
1651
- c,
1743
+ d,
1652
1744
  e,
1653
1745
  n,
1654
1746
  i
1655
- ]), F("message:new", (t) => {
1747
+ ]), F("message:new", async (t) => {
1656
1748
  if (t.conversation_id !== e) return;
1657
1749
  let n = t.message;
1658
- y.current.has(n.id) || (y.current.add(n.id), d((e) => [...e, fe(n, i)]), g.current = Math.max(g.current, n.sequence_number), n.sender_id !== i && (a.sendAck(n.id), l("messageReceived")));
1750
+ if (w.current.has(n.id)) return;
1751
+ w.current.add(n.id);
1752
+ let r = {
1753
+ ...n,
1754
+ content: await m(n.content)
1755
+ };
1756
+ g((e) => [...e, xe(r, i)]), S.current = Math.max(S.current, r.sequence_number), r.sender_id !== i && (u.sendAck(r.id), f("messageReceived"));
1659
1757
  }), F("message:read", ({ message_id: e }) => {
1660
- d((t) => t.map((t) => t.id === e ? {
1758
+ g((t) => t.map((t) => t.id === e ? {
1661
1759
  ...t,
1662
1760
  status: "read"
1663
1761
  } : t));
1664
1762
  }), F("message:delivered", ({ message_id: e }) => {
1665
- d((t) => t.map((t) => t.id === e ? {
1763
+ g((t) => t.map((t) => t.id === e ? {
1666
1764
  ...t,
1667
1765
  status: "delivered"
1668
1766
  } : t));
1669
1767
  }), F("message:reaction", ({ message_id: e, app_user_id: t, reaction_type: n, action: r }) => {
1670
- d((a) => a.map((a) => {
1768
+ g((a) => a.map((a) => {
1671
1769
  if (a.id !== e) return a;
1672
1770
  let o = a.reactions ?? [];
1673
1771
  if (r === "removed") {
@@ -1700,9 +1798,9 @@ function pe(e) {
1700
1798
  own: t === i
1701
1799
  }]
1702
1800
  };
1703
- })), r === "added" && t !== i && l("messageReaction");
1801
+ })), r === "added" && t !== i && f("messageReaction");
1704
1802
  }), F("message:recalled", ({ message_id: t, conversation_id: n }) => {
1705
- n === e && d((e) => e.map((e) => e.id === t ? {
1803
+ n === e && g((e) => e.map((e) => e.id === t ? {
1706
1804
  ...e,
1707
1805
  recalled: !0,
1708
1806
  content: void 0,
@@ -1715,90 +1813,93 @@ function pe(e) {
1715
1813
  }
1716
1814
  } : e));
1717
1815
  }), F("message:edited", ({ message_id: t, conversation_id: n, content: r }) => {
1718
- n === e && d((e) => e.map((e) => e.id === t ? {
1816
+ n === e && g((e) => e.map((e) => e.id === t ? {
1719
1817
  ...e,
1720
1818
  content: r,
1721
1819
  edited: !0
1722
1820
  } : e));
1723
1821
  }), F("message:pinned", ({ message_id: t, conversation_id: n }) => {
1724
- n === e && d((e) => e.map((e) => e.id === t ? {
1822
+ n === e && g((e) => e.map((e) => e.id === t ? {
1725
1823
  ...e,
1726
1824
  pinned: !0
1727
1825
  } : e));
1728
1826
  }), F("message:unpinned", ({ message_id: t, conversation_id: n }) => {
1729
- n === e && d((e) => e.map((e) => e.id === t ? {
1827
+ n === e && g((e) => e.map((e) => e.id === t ? {
1730
1828
  ...e,
1731
1829
  pinned: !1
1732
1830
  } : e));
1733
1831
  });
1734
- let b = o(/* @__PURE__ */ new Map()), x = o(/* @__PURE__ */ new Map());
1832
+ let T = o(/* @__PURE__ */ new Map()), E = o(/* @__PURE__ */ new Map());
1735
1833
  F("chat:typing", ({ conversation_id: t, app_user_id: n }) => {
1736
1834
  if (t !== e || n === i) return;
1737
1835
  let r = n;
1738
- h((e) => e.includes(r) ? e : [...e, r]);
1739
- let a = b.current.get(r);
1836
+ x((e) => e.includes(r) ? e : [...e, r]);
1837
+ let a = T.current.get(r);
1740
1838
  a && clearTimeout(a);
1741
1839
  let o = setTimeout(() => {
1742
- h((e) => e.filter((e) => e !== r)), b.current.delete(r);
1840
+ x((e) => e.filter((e) => e !== r)), T.current.delete(r);
1743
1841
  }, 6e3);
1744
- if (b.current.set(r, o), !x.current.has(r)) {
1745
- l("typing");
1746
- let e = setTimeout(() => x.current.delete(r), 3e3);
1747
- x.current.set(r, e);
1842
+ if (T.current.set(r, o), !E.current.has(r)) {
1843
+ f("typing");
1844
+ let e = setTimeout(() => E.current.delete(r), 3e3);
1845
+ E.current.set(r, e);
1748
1846
  }
1749
1847
  }), F("chat:stopped_typing", ({ conversation_id: t, app_user_id: n }) => {
1750
1848
  if (t !== e) return;
1751
1849
  let r = n;
1752
- h((e) => e.filter((e) => e !== r));
1753
- let i = b.current.get(r);
1754
- i && (clearTimeout(i), b.current.delete(r));
1850
+ x((e) => e.filter((e) => e !== r));
1851
+ let i = T.current.get(r);
1852
+ i && (clearTimeout(i), T.current.delete(r));
1755
1853
  });
1756
- let S = t(async (t, r, i) => {
1854
+ let D = t(async (t, r, i) => {
1757
1855
  let a = { type: r || i?.attachment_type === "location" || i?.attachment_type === "sticker" ? "media" : "text" };
1758
- t && (a.content = t), r && (a.media_id = r), i && (a.metadata = i);
1856
+ t && (p && c && l ? a.content = await ue(t, l, c.publicKey) : a.content = t), r && (a.media_id = r), i && (a.metadata = i);
1759
1857
  let o = await n.post(`/conversations/${e}/messages`, a);
1760
- g.current = Math.max(g.current, o.sequence_number), l("messageSent");
1858
+ S.current = Math.max(S.current, o.sequence_number), f("messageSent");
1761
1859
  }, [
1762
1860
  e,
1763
1861
  n,
1764
- i
1765
- ]), C = o(null), w = o(null), T = t(() => {
1766
- e && (C.current || (a.sendTyping(e), C.current = setTimeout(() => {
1767
- C.current = null;
1768
- }, 300), w.current && clearTimeout(w.current), w.current = setTimeout(() => {
1769
- a.sendStoppedTyping(e), w.current = null;
1862
+ i,
1863
+ p,
1864
+ c,
1865
+ l
1866
+ ]), O = o(null), k = o(null), j = t(() => {
1867
+ e && (O.current || (u.sendTyping(e), O.current = setTimeout(() => {
1868
+ O.current = null;
1869
+ }, 300), k.current && clearTimeout(k.current), k.current = setTimeout(() => {
1870
+ u.sendStoppedTyping(e), k.current = null;
1770
1871
  }, 3e3)));
1771
- }, [e, a]), E = t((e) => {
1772
- a.sendRead(e);
1773
- }, [a]), D = t((e, t) => {
1774
- d((n) => n.map((n) => n.id === e ? {
1872
+ }, [e, u]), M = t((e) => {
1873
+ u.sendRead(e);
1874
+ }, [u]), N = t((e, t) => {
1875
+ g((n) => n.map((n) => n.id === e ? {
1775
1876
  ...n,
1776
1877
  content: t,
1777
1878
  edited: !0
1778
1879
  } : n));
1779
1880
  }, []);
1780
1881
  return {
1781
- messages: u,
1782
- loading: f,
1783
- typingUsers: m,
1784
- pinnedMessages: u.filter((e) => e.pinned),
1785
- sendMessage: S,
1786
- sendTyping: T,
1787
- markRead: E,
1788
- editMessageLocally: D
1882
+ messages: h,
1883
+ loading: _,
1884
+ typingUsers: b,
1885
+ pinnedMessages: h.filter((e) => e.pinned),
1886
+ sendMessage: D,
1887
+ sendTyping: j,
1888
+ markRead: M,
1889
+ editMessageLocally: N
1789
1890
  };
1790
1891
  }
1791
1892
  //#endregion
1792
1893
  //#region src/hooks/useCallHistory.ts
1793
- function me(e) {
1894
+ function Ce(e) {
1794
1895
  if (e?.metadata) return e.metadata.avatar_url ?? e.metadata.avatarUrl;
1795
1896
  }
1796
- function he(e, t) {
1897
+ function we(e, t) {
1797
1898
  let n = e.caller_id === t, r = n ? e.callee : e.caller, i = n ? e.callee_id : e.caller_id, a = n ? e.status === "ended" || e.status === "active" ? "outgoing" : "missed" : e.status === "ended" || e.status === "active" ? "incoming" : "missed";
1798
1899
  return {
1799
1900
  id: e.id,
1800
1901
  name: r?.display_name ?? i,
1801
- avatarSrc: me(r),
1902
+ avatarSrc: Ce(r),
1802
1903
  callType: e.type,
1803
1904
  direction: a,
1804
1905
  remoteUserId: i,
@@ -1808,12 +1909,12 @@ function he(e, t) {
1808
1909
  })
1809
1910
  };
1810
1911
  }
1811
- function ge() {
1912
+ function Te() {
1812
1913
  let e = (0, g.c)(8), { apiClient: t, appUserId: n } = v(), i;
1813
1914
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = [], e[0] = i) : i = e[0];
1814
1915
  let [a, o] = s(i), [c, l] = s(!0), u, d;
1815
1916
  e[1] !== t || e[2] !== n ? (u = () => {
1816
- t.get("/calls").then((e) => o(e.map((e) => he(e, n)))).finally(() => l(!1));
1917
+ t.get("/calls").then((e) => o(e.map((e) => we(e, n)))).finally(() => l(!1));
1817
1918
  }, d = [t, n], e[1] = t, e[2] = n, e[3] = u, e[4] = d) : (u = e[3], d = e[4]), r(u, d);
1818
1919
  let f;
1819
1920
  return e[5] !== c || e[6] !== a ? (f = {
@@ -1823,14 +1924,14 @@ function ge() {
1823
1924
  }
1824
1925
  //#endregion
1825
1926
  //#region src/components/ui/Avatar.tsx
1826
- var _e = {
1927
+ var Ee = {
1827
1928
  online: "var(--oc-success, #22c55e)",
1828
1929
  away: "#f59e0b",
1829
1930
  offline: "transparent"
1830
1931
  };
1831
- function ve(e) {
1932
+ function De(e) {
1832
1933
  let t = (0, g.c)(18), { src: n, name: r, size: i, online: a, status: o, className: s } = e, c = i === void 0 ? 40 : i, d = s === void 0 ? "" : s, f;
1833
- t[0] === r ? f = t[1] : (f = r?.split(" ").map(ye).join("").slice(0, 2).toUpperCase() ?? "?", t[0] = r, t[1] = f);
1934
+ t[0] === r ? f = t[1] : (f = r?.split(" ").map(Oe).join("").slice(0, 2).toUpperCase() ?? "?", t[0] = r, t[1] = f);
1834
1935
  let p = f, m = o ?? (a ? "online" : "offline"), h = m === "online" || m === "away", _ = `relative flex-shrink-0 ${d}`, v;
1835
1936
  t[2] === c ? v = t[3] : (v = {
1836
1937
  width: c,
@@ -1852,7 +1953,7 @@ function ve(e) {
1852
1953
  style: {
1853
1954
  width: Math.max(8, c * .22),
1854
1955
  height: Math.max(8, c * .22),
1855
- backgroundColor: _e[m]
1956
+ backgroundColor: Ee[m]
1856
1957
  }
1857
1958
  }), t[9] = m, t[10] = h, t[11] = c, t[12] = b) : b = t[12];
1858
1959
  let x;
@@ -1862,12 +1963,12 @@ function ve(e) {
1862
1963
  children: [y, b]
1863
1964
  }), t[13] = _, t[14] = v, t[15] = y, t[16] = b, t[17] = x) : x = t[17], x;
1864
1965
  }
1865
- function ye(e) {
1966
+ function Oe(e) {
1866
1967
  return e[0];
1867
1968
  }
1868
1969
  //#endregion
1869
1970
  //#region src/components/ui/BottomNav.tsx
1870
- var be = [
1971
+ var ke = [
1871
1972
  {
1872
1973
  id: "chats",
1873
1974
  label: "Chats",
@@ -1884,10 +1985,10 @@ var be = [
1884
1985
  icon: "M15 10l4.553-2.069A1 1 0 0 1 21 8.82v6.36a1 1 0 0 1-1.447.89L15 14M3 8a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
1885
1986
  }
1886
1987
  ];
1887
- function xe(e) {
1988
+ function Ae(e) {
1888
1989
  let t = (0, g.c)(13), { active: n, onChange: r, unreadChats: i } = e, { enableMeetingUi: a } = y(), o, s;
1889
1990
  if (t[0] !== n || t[1] !== a || t[2] !== r || t[3] !== i) {
1890
- let e = a ? be : be.filter(Se);
1991
+ let e = a ? ke : ke.filter(je);
1891
1992
  o = "flex-shrink-0 h-[82px] bg-secondary/95 backdrop-blur border-t border-border flex pt-2.5 pb-8";
1892
1993
  let c;
1893
1994
  t[6] !== n || t[7] !== r || t[8] !== i ? (c = (e) => {
@@ -1922,12 +2023,12 @@ function xe(e) {
1922
2023
  children: s
1923
2024
  }), t[10] = o, t[11] = s, t[12] = c) : c = t[12], c;
1924
2025
  }
1925
- function Se(e) {
2026
+ function je(e) {
1926
2027
  return e.id !== "meet";
1927
2028
  }
1928
2029
  //#endregion
1929
2030
  //#region src/hooks/useAppBrand.tsx
1930
- function Ce() {
2031
+ function Me() {
1931
2032
  let e = (0, g.c)(9), { appConfig: t } = v();
1932
2033
  if (!t) return null;
1933
2034
  let { name: n, logo: r, showNameOnly: i, showLogoOnly: a } = t;
@@ -1951,40 +2052,40 @@ function Ce() {
1951
2052
  }
1952
2053
  //#endregion
1953
2054
  //#region src/components/chat/ConversationList.tsx
1954
- function we({ conversations: e, onSelect: t, onNewChat: n, activeTab: i = "chats", onTabChange: a, globalSearchApiUrl: d, authToken: f, onNavigateToMessage: p }) {
1955
- let [m, h] = s("All"), [g, _] = s(""), [v, y] = s(null), [b, x] = s(!1), S = o(null), C = Ce();
2055
+ function Ne({ conversations: e, onSelect: t, onNewChat: n, activeTab: i = "chats", onTabChange: a, globalSearchApiUrl: d, authToken: f, onNavigateToMessage: p }) {
2056
+ let [m, h] = s("All"), [g, _] = s(""), [v, b] = s(null), [x, S] = s(!1), C = o(null), w = Me(), T = y();
1956
2057
  r(() => {
1957
2058
  if (!d || g.length < 2) {
1958
- y(null);
2059
+ b(null);
1959
2060
  return;
1960
2061
  }
1961
- return S.current && clearTimeout(S.current), S.current = setTimeout(async () => {
1962
- x(!0);
2062
+ return C.current && clearTimeout(C.current), C.current = setTimeout(async () => {
2063
+ S(!0);
1963
2064
  try {
1964
2065
  let e = { "Content-Type": "application/json" };
1965
2066
  f && (e.Authorization = `Bearer ${f}`);
1966
2067
  let t = await fetch(`${d}?q=${encodeURIComponent(g)}`, { headers: e });
1967
- t.ok && y(await t.json());
2068
+ t.ok && b(await t.json());
1968
2069
  } catch {} finally {
1969
- x(!1);
2070
+ S(!1);
1970
2071
  }
1971
2072
  }, 300), () => {
1972
- S.current && clearTimeout(S.current);
2073
+ C.current && clearTimeout(C.current);
1973
2074
  };
1974
2075
  }, [
1975
2076
  g,
1976
2077
  d,
1977
2078
  f
1978
2079
  ]);
1979
- let w = e.filter((e) => g && !e.name.toLowerCase().includes(g.toLowerCase()) ? !1 : m === "Unread" ? (e.unreadCount ?? 0) > 0 : m === "Groups" ? e.isGroup : !0);
2080
+ let E = e.filter((e) => g && !e.name.toLowerCase().includes(g.toLowerCase()) ? !1 : m === "Unread" ? (e.unreadCount ?? 0) > 0 : m === "Groups" ? e.isGroup : !0);
1980
2081
  return /* @__PURE__ */ u("div", {
1981
2082
  className: "flex flex-col h-full bg-background text-foreground font-body",
1982
2083
  children: [
1983
- /* @__PURE__ */ u("header", {
2084
+ T.showConversationHeader && /* @__PURE__ */ u("header", {
1984
2085
  className: "flex-shrink-0 h-14 flex items-center justify-between px-4 bg-background/95 backdrop-blur border-b border-border",
1985
2086
  children: [/* @__PURE__ */ l("div", {
1986
2087
  className: "flex items-center gap-1 text-lg font-bold text-foreground",
1987
- children: C ?? /* @__PURE__ */ u(c, { children: ["OrbitConnect", /* @__PURE__ */ l("span", { className: "w-1.5 h-1.5 rounded-full bg-primary ml-1" })] })
2088
+ children: w ?? /* @__PURE__ */ u(c, { children: ["OrbitConnect", /* @__PURE__ */ l("span", { className: "w-1.5 h-1.5 rounded-full bg-primary ml-1" })] })
1988
2089
  }), /* @__PURE__ */ u("div", {
1989
2090
  className: "flex gap-1",
1990
2091
  children: [/* @__PURE__ */ l("button", {
@@ -2087,7 +2188,7 @@ function we({ conversations: e, onSelect: t, onNewChat: n, activeTab: i = "chats
2087
2188
  }),
2088
2189
  /* @__PURE__ */ l("div", {
2089
2190
  className: "flex-1 overflow-y-auto",
2090
- children: v === null ? w.map((e) => /* @__PURE__ */ u("button", {
2191
+ children: v === null ? E.map((e) => /* @__PURE__ */ u("button", {
2091
2192
  onClick: () => t(e.id),
2092
2193
  className: "w-full h-[72px] flex items-center gap-3 px-4 border-none bg-transparent cursor-pointer text-left border-b",
2093
2194
  style: {
@@ -2132,7 +2233,7 @@ function we({ conversations: e, onSelect: t, onNewChat: n, activeTab: i = "chats
2132
2233
  style: { borderColor: "var(--oc-background)" },
2133
2234
  alt: ""
2134
2235
  })
2135
- ] }) : /* @__PURE__ */ l(ve, {
2236
+ ] }) : /* @__PURE__ */ l(De, {
2136
2237
  src: e.avatarSrc,
2137
2238
  name: e.name,
2138
2239
  size: 52,
@@ -2205,11 +2306,11 @@ function we({ conversations: e, onSelect: t, onNewChat: n, activeTab: i = "chats
2205
2306
  })]
2206
2307
  })]
2207
2308
  }, e.id)) : /* @__PURE__ */ u(c, { children: [
2208
- b && /* @__PURE__ */ l("div", {
2309
+ x && /* @__PURE__ */ l("div", {
2209
2310
  className: "px-4 py-3 text-sm text-muted-foreground",
2210
2311
  children: "Searching…"
2211
2312
  }),
2212
- !b && v.length === 0 && /* @__PURE__ */ l("div", {
2313
+ !x && v.length === 0 && /* @__PURE__ */ l("div", {
2213
2314
  className: "px-4 py-3 text-sm text-muted-foreground",
2214
2315
  children: "No messages found"
2215
2316
  }),
@@ -2242,7 +2343,7 @@ function we({ conversations: e, onSelect: t, onNewChat: n, activeTab: i = "chats
2242
2343
  }, `${e.conversation_id}-${t.id}`)))] })
2243
2344
  ] })
2244
2345
  }),
2245
- /* @__PURE__ */ l(xe, {
2346
+ /* @__PURE__ */ l(Ae, {
2246
2347
  active: i,
2247
2348
  onChange: a ?? (() => {}),
2248
2349
  unreadChats: e.some((e) => (e.unreadCount ?? 0) > 0)
@@ -2252,7 +2353,7 @@ function we({ conversations: e, onSelect: t, onNewChat: n, activeTab: i = "chats
2252
2353
  }
2253
2354
  //#endregion
2254
2355
  //#region src/components/chat/AttachmentRenderer.tsx
2255
- var Te = [
2356
+ var Pe = [
2256
2357
  12,
2257
2358
  18,
2258
2359
  10,
@@ -2284,7 +2385,7 @@ var Te = [
2284
2385
  16,
2285
2386
  24
2286
2387
  ];
2287
- function Ee(e) {
2388
+ function Fe(e) {
2288
2389
  let t = (0, g.c)(9), { waveform: n, played: r, sender: i } = e, a;
2289
2390
  if (t[0] !== r || t[1] !== i || t[2] !== n) {
2290
2391
  let e;
@@ -2302,7 +2403,7 @@ function Ee(e) {
2302
2403
  children: a
2303
2404
  }), t[7] = a, t[8] = o), o;
2304
2405
  }
2305
- function De(e) {
2406
+ function Ie(e) {
2306
2407
  let t = (0, g.c)(24), { attachment: n, caption: r, borderRadius: i, onMediaOpen: a, imageSet: o } = e, [c, d] = s(!1);
2307
2408
  if (!n.url) return null;
2308
2409
  let f = n.name ?? "image", p;
@@ -2355,7 +2456,7 @@ function De(e) {
2355
2456
  ]
2356
2457
  }), t[19] = y, t[20] = b, t[21] = x, t[22] = S, t[23] = C) : C = t[23], C;
2357
2458
  }
2358
- function Oe(e) {
2459
+ function Le(e) {
2359
2460
  let t = (0, g.c)(31), { attachment: n, caption: r, borderRadius: i, onMediaOpen: a } = e, [c, d] = s(!1), f = o(null);
2360
2461
  if (!n.url) return null;
2361
2462
  let p;
@@ -2433,8 +2534,8 @@ function Oe(e) {
2433
2534
  ]
2434
2535
  }), t[24] = w, t[25] = T, t[26] = h, t[27] = x, t[28] = S, t[29] = C, t[30] = E) : E = t[30], E;
2435
2536
  }
2436
- function ke(e) {
2437
- let t = (0, g.c)(32), { attachment: n, sender: r, borderRadius: i } = e, a = o(null), [c, d] = s(!1), [f, p] = s(0), [m, h] = s("0:00"), _ = n.waveform ?? Te, v = n.duration ?? "0:00", y;
2537
+ function Re(e) {
2538
+ let t = (0, g.c)(32), { attachment: n, sender: r, borderRadius: i } = e, a = o(null), [c, d] = s(!1), [f, p] = s(0), [m, h] = s("0:00"), _ = n.waveform ?? Pe, v = n.duration ?? "0:00", y;
2438
2539
  t[0] === c ? y = t[1] : (y = () => {
2439
2540
  let e = a.current;
2440
2541
  e && (c ? e.pause() : e.play().catch(() => {
@@ -2499,7 +2600,7 @@ function ke(e) {
2499
2600
  children: O
2500
2601
  }), t[13] = E, t[14] = O, t[15] = b, t[16] = k) : k = t[16];
2501
2602
  let A;
2502
- t[17] !== f || t[18] !== r || t[19] !== _ ? (A = /* @__PURE__ */ l(Ee, {
2603
+ t[17] !== f || t[18] !== r || t[19] !== _ ? (A = /* @__PURE__ */ l(Fe, {
2503
2604
  waveform: _,
2504
2605
  played: f,
2505
2606
  sender: r
@@ -2524,7 +2625,7 @@ function ke(e) {
2524
2625
  ]
2525
2626
  }), t[26] = A, t[27] = P, t[28] = w, t[29] = T, t[30] = k, t[31] = F) : F = t[31], F;
2526
2627
  }
2527
- function Ae(e) {
2628
+ function ze(e) {
2528
2629
  let t = (0, g.c)(42), { attachment: n, sender: r, borderRadius: i, onMediaOpen: a } = e, o;
2529
2630
  t[0] === n.name ? o = t[1] : (o = n.name?.split(".").pop()?.toLowerCase() ?? "", t[0] = n.name, t[1] = o);
2530
2631
  let s = o, d = s === "pdf" ? "#ef4444" : ["doc", "docx"].includes(s) ? "#3b82f6" : ["xls", "xlsx"].includes(s) ? "#22c55e" : ["ppt", "pptx"].includes(s) ? "#f97316" : ["zip", "rar"].includes(s) ? "#a855f7" : "var(--oc-file-icon-sender)", f = r ? "var(--oc-file-icon-bg-sender)" : "var(--oc-file-icon-bg-receiver)", p;
@@ -2639,7 +2740,7 @@ function Ae(e) {
2639
2740
  children: O
2640
2741
  }), t[37] = n.name, t[38] = n.url, t[39] = O, t[40] = k, t[41] = A) : A = t[41], A;
2641
2742
  }
2642
- function je(e) {
2743
+ function Be(e) {
2643
2744
  let t = (0, g.c)(31), { attachment: n, sender: r, borderRadius: i } = e;
2644
2745
  if (n.lat === void 0 || n.lng === void 0) return null;
2645
2746
  let { lat: a, lng: o, label: s } = n, d = `https://www.openstreetmap.org/export/embed.html?bbox=${o - .01},${a - .01},${o + .01},${a + .01}&layer=mapnik&marker=${a},${o}`, f = `https://www.openstreetmap.org/?mlat=${a}&mlon=${o}&zoom=15`, p;
@@ -2752,7 +2853,7 @@ function je(e) {
2752
2853
  children: [h, k]
2753
2854
  }), t[26] = f, t[27] = p, t[28] = k, t[29] = h, t[30] = A) : A = t[30], A;
2754
2855
  }
2755
- function Me(e) {
2856
+ function Ve(e) {
2756
2857
  let t = (0, g.c)(5), { attachment: n } = e;
2757
2858
  if (!n.url) return null;
2758
2859
  let r;
@@ -2771,46 +2872,46 @@ function Me(e) {
2771
2872
  })
2772
2873
  }), t[2] = n.url, t[3] = i, t[4] = o) : o = t[4], o;
2773
2874
  }
2774
- function Ne(e) {
2875
+ function He(e) {
2775
2876
  let t = (0, g.c)(12);
2776
2877
  switch (e.attachment.type) {
2777
2878
  case "image": {
2778
2879
  let n;
2779
- return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ l(De, { ...e }), t[0] = e, t[1] = n), n;
2880
+ return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ l(Ie, { ...e }), t[0] = e, t[1] = n), n;
2780
2881
  }
2781
2882
  case "video": {
2782
2883
  let n;
2783
- return t[2] === e ? n = t[3] : (n = /* @__PURE__ */ l(Oe, { ...e }), t[2] = e, t[3] = n), n;
2884
+ return t[2] === e ? n = t[3] : (n = /* @__PURE__ */ l(Le, { ...e }), t[2] = e, t[3] = n), n;
2784
2885
  }
2785
2886
  case "audio": {
2786
2887
  let n;
2787
- return t[4] === e ? n = t[5] : (n = /* @__PURE__ */ l(ke, { ...e }), t[4] = e, t[5] = n), n;
2888
+ return t[4] === e ? n = t[5] : (n = /* @__PURE__ */ l(Re, { ...e }), t[4] = e, t[5] = n), n;
2788
2889
  }
2789
2890
  case "file": {
2790
2891
  let n;
2791
- return t[6] === e ? n = t[7] : (n = /* @__PURE__ */ l(Ae, { ...e }), t[6] = e, t[7] = n), n;
2892
+ return t[6] === e ? n = t[7] : (n = /* @__PURE__ */ l(ze, { ...e }), t[6] = e, t[7] = n), n;
2792
2893
  }
2793
2894
  case "location": {
2794
2895
  let n;
2795
- return t[8] === e ? n = t[9] : (n = /* @__PURE__ */ l(je, { ...e }), t[8] = e, t[9] = n), n;
2896
+ return t[8] === e ? n = t[9] : (n = /* @__PURE__ */ l(Be, { ...e }), t[8] = e, t[9] = n), n;
2796
2897
  }
2797
2898
  case "sticker": {
2798
2899
  let n;
2799
- return t[10] === e ? n = t[11] : (n = /* @__PURE__ */ l(Me, { ...e }), t[10] = e, t[11] = n), n;
2900
+ return t[10] === e ? n = t[11] : (n = /* @__PURE__ */ l(Ve, { ...e }), t[10] = e, t[11] = n), n;
2800
2901
  }
2801
2902
  default: return null;
2802
2903
  }
2803
2904
  }
2804
2905
  //#endregion
2805
2906
  //#region src/components/chat/CallBanner.tsx
2806
- function Pe(e) {
2907
+ function Ue(e) {
2807
2908
  if (e <= 0) return "";
2808
2909
  let t = Math.floor(e / 60), n = (e % 60).toString().padStart(2, "0");
2809
2910
  return t > 0 ? `${t}m ${n}s` : `${n}s`;
2810
2911
  }
2811
- function Fe(e) {
2912
+ function We(e) {
2812
2913
  let t = (0, g.c)(30), { data: n, sender: r, time: i, onCallBack: a } = e, { callType: o, callStatus: s, durationSeconds: c } = n, d = s === "missed", f = d ? "#ef4444" : "var(--oc-success)", p;
2813
- t[0] === c ? p = t[1] : (p = Pe(c), t[0] = c, t[1] = p);
2914
+ t[0] === c ? p = t[1] : (p = Ue(c), t[0] = c, t[1] = p);
2814
2915
  let m = p, h = r ? "var(--oc-bubble-sender)" : "var(--oc-bubble-receiver)", _ = r ? "var(--oc-bubble-sender-fg)" : "var(--oc-bubble-receiver-fg)", v;
2815
2916
  t[2] !== h || t[3] !== _ ? (v = {
2816
2917
  backgroundColor: h,
@@ -2922,7 +3023,7 @@ function Fe(e) {
2922
3023
  }
2923
3024
  //#endregion
2924
3025
  //#region src/components/chat/MessageActionMenu.tsx
2925
- function Ie() {
3026
+ function Ge() {
2926
3027
  let e = (0, g.c)(1), t;
2927
3028
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
2928
3029
  width: "16",
@@ -2936,7 +3037,7 @@ function Ie() {
2936
3037
  children: [/* @__PURE__ */ l("polyline", { points: "9 17 4 12 9 7" }), /* @__PURE__ */ l("path", { d: "M20 18v-2a4 4 0 0 0-4-4H4" })]
2937
3038
  }), e[0] = t) : t = e[0], t;
2938
3039
  }
2939
- function Le() {
3040
+ function Ke() {
2940
3041
  let e = (0, g.c)(1), t;
2941
3042
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
2942
3043
  width: "16",
@@ -2969,7 +3070,7 @@ function Le() {
2969
3070
  ]
2970
3071
  }), e[0] = t) : t = e[0], t;
2971
3072
  }
2972
- function Re() {
3073
+ function qe() {
2973
3074
  let e = (0, g.c)(1), t;
2974
3075
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
2975
3076
  width: "16",
@@ -2983,7 +3084,7 @@ function Re() {
2983
3084
  children: [/* @__PURE__ */ l("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), /* @__PURE__ */ l("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })]
2984
3085
  }), e[0] = t) : t = e[0], t;
2985
3086
  }
2986
- function ze() {
3087
+ function Je() {
2987
3088
  let e = (0, g.c)(1), t;
2988
3089
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
2989
3090
  width: "16",
@@ -2997,7 +3098,7 @@ function ze() {
2997
3098
  children: [/* @__PURE__ */ l("polyline", { points: "15 17 20 12 15 7" }), /* @__PURE__ */ l("path", { d: "M4 18v-2a4 4 0 0 1 4-4h12" })]
2998
3099
  }), e[0] = t) : t = e[0], t;
2999
3100
  }
3000
- function Be() {
3101
+ function Ye() {
3001
3102
  let e = (0, g.c)(1), t;
3002
3103
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
3003
3104
  width: "16",
@@ -3017,7 +3118,7 @@ function Be() {
3017
3118
  ]
3018
3119
  }), e[0] = t) : t = e[0], t;
3019
3120
  }
3020
- function Ve() {
3121
+ function Xe() {
3021
3122
  let e = (0, g.c)(1), t;
3022
3123
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
3023
3124
  width: "16",
@@ -3036,7 +3137,7 @@ function Ve() {
3036
3137
  ]
3037
3138
  }), e[0] = t) : t = e[0], t;
3038
3139
  }
3039
- function He() {
3140
+ function Ze() {
3040
3141
  let e = (0, g.c)(1), t;
3041
3142
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
3042
3143
  width: "16",
@@ -3068,7 +3169,7 @@ function He() {
3068
3169
  ]
3069
3170
  }), e[0] = t) : t = e[0], t;
3070
3171
  }
3071
- function Ue() {
3172
+ function Qe() {
3072
3173
  let e = (0, g.c)(1), t;
3073
3174
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
3074
3175
  width: "16",
@@ -3082,7 +3183,7 @@ function Ue() {
3082
3183
  children: [/* @__PURE__ */ l("polyline", { points: "9 11 12 14 22 4" }), /* @__PURE__ */ l("path", { d: "M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" })]
3083
3184
  }), e[0] = t) : t = e[0], t;
3084
3185
  }
3085
- function We(e) {
3186
+ function $e(e) {
3086
3187
  let t = (0, g.c)(4), { pinned: n } = e, r = n ? "currentColor" : "none", i, a;
3087
3188
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ l("line", {
3088
3189
  x1: "12",
@@ -3103,7 +3204,7 @@ function We(e) {
3103
3204
  children: [i, a]
3104
3205
  }), t[2] = r, t[3] = o), o;
3105
3206
  }
3106
- function Ge(e) {
3207
+ function et(e) {
3107
3208
  let t = (0, g.c)(58), { isSender: n, isPinned: i, onReply: a, onReact: s, onEdit: c, onForward: d, onDelete: f, onRecall: p, onInfo: m, onSelect: h, onPin: _, onClose: v } = e, y = o(null), b, x;
3108
3209
  t[0] === v ? (b = t[1], x = t[2]) : (b = () => {
3109
3210
  let e = (e) => {
@@ -3123,7 +3224,7 @@ function Ge(e) {
3123
3224
  e(), v();
3124
3225
  }, t[6] = v, t[7] = w);
3125
3226
  let T = w, E;
3126
- t[8] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(Ie, {}), t[8] = E) : E = t[8];
3227
+ t[8] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(Ge, {}), t[8] = E) : E = t[8];
3127
3228
  let D;
3128
3229
  t[9] === a ? D = t[10] : (D = {
3129
3230
  label: "Reply",
@@ -3132,7 +3233,7 @@ function Ge(e) {
3132
3233
  show: !0
3133
3234
  }, t[9] = a, t[10] = D);
3134
3235
  let O;
3135
- t[11] === Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ l(Le, {}), t[11] = O) : O = t[11];
3236
+ t[11] === Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ l(Ke, {}), t[11] = O) : O = t[11];
3136
3237
  let k;
3137
3238
  t[12] === s ? k = t[13] : (k = {
3138
3239
  label: "React",
@@ -3141,7 +3242,7 @@ function Ge(e) {
3141
3242
  show: !0
3142
3243
  }, t[12] = s, t[13] = k);
3143
3244
  let A = i ? "Unpin" : "Pin", j;
3144
- t[14] === i ? j = t[15] : (j = /* @__PURE__ */ l(We, { pinned: i }), t[14] = i, t[15] = j);
3245
+ t[14] === i ? j = t[15] : (j = /* @__PURE__ */ l($e, { pinned: i }), t[14] = i, t[15] = j);
3145
3246
  let M = !!_, N;
3146
3247
  t[16] !== _ || t[17] !== A || t[18] !== j || t[19] !== M ? (N = {
3147
3248
  label: A,
@@ -3150,7 +3251,7 @@ function Ge(e) {
3150
3251
  show: M
3151
3252
  }, t[16] = _, t[17] = A, t[18] = j, t[19] = M, t[20] = N) : N = t[20];
3152
3253
  let P;
3153
- t[21] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ l(Re, {}), t[21] = P) : P = t[21];
3254
+ t[21] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ l(qe, {}), t[21] = P) : P = t[21];
3154
3255
  let F = n && !!c, I;
3155
3256
  t[22] !== c || t[23] !== F ? (I = {
3156
3257
  label: "Edit",
@@ -3159,7 +3260,7 @@ function Ge(e) {
3159
3260
  show: F
3160
3261
  }, t[22] = c, t[23] = F, t[24] = I) : I = t[24];
3161
3262
  let L;
3162
- t[25] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ l(ze, {}), t[25] = L) : L = t[25];
3263
+ t[25] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ l(Je, {}), t[25] = L) : L = t[25];
3163
3264
  let R;
3164
3265
  t[26] === d ? R = t[27] : (R = {
3165
3266
  label: "Forward",
@@ -3168,7 +3269,7 @@ function Ge(e) {
3168
3269
  show: !0
3169
3270
  }, t[26] = d, t[27] = R);
3170
3271
  let z;
3171
- t[28] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ l(Be, {}), t[28] = z) : z = t[28];
3272
+ t[28] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ l(Ye, {}), t[28] = z) : z = t[28];
3172
3273
  let B;
3173
3274
  t[29] === f ? B = t[30] : (B = {
3174
3275
  label: "Delete",
@@ -3177,7 +3278,7 @@ function Ge(e) {
3177
3278
  show: !0
3178
3279
  }, t[29] = f, t[30] = B);
3179
3280
  let V;
3180
- t[31] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ l(Ve, {}), t[31] = V) : V = t[31];
3281
+ t[31] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ l(Xe, {}), t[31] = V) : V = t[31];
3181
3282
  let H = n && !!p, U;
3182
3283
  t[32] !== p || t[33] !== H ? (U = {
3183
3284
  label: "Recall",
@@ -3186,7 +3287,7 @@ function Ge(e) {
3186
3287
  show: H
3187
3288
  }, t[32] = p, t[33] = H, t[34] = U) : U = t[34];
3188
3289
  let W;
3189
- t[35] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ l(He, {}), t[35] = W) : W = t[35];
3290
+ t[35] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ l(Ze, {}), t[35] = W) : W = t[35];
3190
3291
  let G = n && !!m, K;
3191
3292
  t[36] !== m || t[37] !== G ? (K = {
3192
3293
  label: "Info",
@@ -3195,7 +3296,7 @@ function Ge(e) {
3195
3296
  show: G
3196
3297
  }, t[36] = m, t[37] = G, t[38] = K) : K = t[38];
3197
3298
  let q;
3198
- t[39] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ l(Ue, {}), t[39] = q) : q = t[39];
3299
+ t[39] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ l(Qe, {}), t[39] = q) : q = t[39];
3199
3300
  let J;
3200
3301
  t[40] === h ? J = t[41] : (J = {
3201
3302
  label: "Select",
@@ -3225,7 +3326,7 @@ function Ge(e) {
3225
3326
  marginTop: 4
3226
3327
  }, t[52] = Z) : Z = t[52];
3227
3328
  let ee;
3228
- t[53] === X ? ee = t[54] : (ee = X.filter(Je), t[53] = X, t[54] = ee);
3329
+ t[53] === X ? ee = t[54] : (ee = X.filter(rt), t[53] = X, t[54] = ee);
3229
3330
  let Q;
3230
3331
  return t[55] !== T || t[56] !== ee ? (Q = /* @__PURE__ */ l("div", {
3231
3332
  ref: y,
@@ -3240,8 +3341,8 @@ function Ge(e) {
3240
3341
  backgroundColor: "transparent",
3241
3342
  color: e.label === "Delete" || e.label === "Recall" ? "var(--oc-destructive, #ef4444)" : "var(--oc-foreground)"
3242
3343
  },
3243
- onMouseEnter: qe,
3244
- onMouseLeave: Ke,
3344
+ onMouseEnter: nt,
3345
+ onMouseLeave: tt,
3245
3346
  children: [/* @__PURE__ */ l("span", {
3246
3347
  style: { opacity: .7 },
3247
3348
  children: e.icon
@@ -3249,18 +3350,18 @@ function Ge(e) {
3249
3350
  }, e.label))
3250
3351
  }), t[55] = T, t[56] = ee, t[57] = Q) : Q = t[57], Q;
3251
3352
  }
3252
- function Ke(e) {
3353
+ function tt(e) {
3253
3354
  e.currentTarget.style.backgroundColor = "transparent";
3254
3355
  }
3255
- function qe(e) {
3356
+ function nt(e) {
3256
3357
  e.currentTarget.style.backgroundColor = "var(--oc-secondary)";
3257
3358
  }
3258
- function Je(e) {
3359
+ function rt(e) {
3259
3360
  return e.show;
3260
3361
  }
3261
3362
  //#endregion
3262
3363
  //#region src/components/chat/emojiData.ts
3263
- var Ye = [
3364
+ var it = [
3264
3365
  {
3265
3366
  id: "recent",
3266
3367
  label: "Recently Used",
@@ -3309,23 +3410,23 @@ var Ye = [
3309
3410
  icon: "❤️",
3310
3411
  emojis: /* @__PURE__ */ "❤️.🧡.💛.💚.💙.💜.🖤.🤍.🤎.💔.❣️.💕.💞.💓.💗.💖.💘.💝.💟.☮️.✝️.☪️.🕉.☸️.✡️.🔯.🕎.☯️.☦️.🛐.⛎.♈.♉.♊.♋.♌.♍.♎.♏.♐.♑.♒.♓.🆔.⚛️.🉑.☢️.☣️.📴.📳.🈶.🈚.🈸.🈺.🈷️.✴️.🆚.💮.🉐.㊙️.㊗️.🈴.🈵.🈹.🈲.🅰️.🅱️.🆎.🆑.🅾️.🆘.❌.⭕.🛑.⛔.📛.🚫.💯.💢.♨️.🚷.🚯.🚳.🚱.🔞.📵.🚭.❗.❕.❓.❔.‼️.⁉️.🔅.🔆.〽️.⚠️.🔱.⚜️.🔰.♻️.✅.🈯.💹.❎.🌐.💠.Ⓜ️.🌀.💤.🏧.🚾.♿.🅿️.🛗.🈳.🈹.🚺.🚹.🚼.⚧.🚻.🚮.🎦.📶.🈁.🔣.ℹ️.🔤".split(".")
3311
3412
  }
3312
- ], Xe = "oc_recent_emojis", Ze = 30;
3313
- function Qe() {
3413
+ ], at = "oc_recent_emojis", ot = 30;
3414
+ function st() {
3314
3415
  try {
3315
- return JSON.parse(localStorage.getItem(Xe) ?? "[]");
3416
+ return JSON.parse(localStorage.getItem(at) ?? "[]");
3316
3417
  } catch {
3317
3418
  return [];
3318
3419
  }
3319
3420
  }
3320
- function $e(e) {
3321
- let t = [e, ...Qe().filter((t) => t !== e)].slice(0, Ze);
3322
- localStorage.setItem(Xe, JSON.stringify(t));
3421
+ function ct(e) {
3422
+ let t = [e, ...st().filter((t) => t !== e)].slice(0, ot);
3423
+ localStorage.setItem(at, JSON.stringify(t));
3323
3424
  }
3324
3425
  //#endregion
3325
3426
  //#region src/components/chat/ReactionDialog.tsx
3326
- function et(e) {
3427
+ function lt(e) {
3327
3428
  let t = (0, g.c)(32), { onSelect: n, onClose: i } = e, [a, c] = s(!1), [d, f] = s("smileys"), p = o(null), m = o(null), h = o({}), _;
3328
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = Qe().slice(0, 6), t[0] = _) : _ = t[0];
3429
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = st().slice(0, 6), t[0] = _) : _ = t[0];
3329
3430
  let v = _, y, b;
3330
3431
  t[1] === i ? (y = t[2], b = t[3]) : (y = () => {
3331
3432
  let e = (e) => {
@@ -3334,10 +3435,10 @@ function et(e) {
3334
3435
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
3335
3436
  }, b = [i], t[1] = i, t[2] = y, t[3] = b), r(y, b);
3336
3437
  let x;
3337
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (x = Ye.filter(tt), t[4] = x) : x = t[4];
3438
+ t[4] === Symbol.for("react.memo_cache_sentinel") ? (x = it.filter(ut), t[4] = x) : x = t[4];
3338
3439
  let S = x, C;
3339
3440
  t[5] !== i || t[6] !== n ? (C = function(e) {
3340
- $e(e), n(e), i();
3441
+ ct(e), n(e), i();
3341
3442
  }, t[5] = i, t[6] = n, t[7] = C) : C = t[7];
3342
3443
  let w = C, T = function(e) {
3343
3444
  f(e), h.current[e]?.scrollIntoView({
@@ -3471,18 +3572,18 @@ function et(e) {
3471
3572
  children: [A, N]
3472
3573
  }), t[28] = A, t[29] = N, t[30] = D, t[31] = P) : P = t[31], P;
3473
3574
  }
3474
- function tt(e) {
3575
+ function ut(e) {
3475
3576
  return e.id !== "recent";
3476
3577
  }
3477
3578
  //#endregion
3478
3579
  //#region src/components/chat/urlUtils.ts
3479
- var nt = /https?:\/\/[^\s<>"{}|\\^`[\]]+/gi;
3480
- function rt(e) {
3481
- return Array.from(new Set(e.match(nt) ?? []));
3580
+ var dt = /https?:\/\/[^\s<>"{}|\\^`[\]]+/gi;
3581
+ function ft(e) {
3582
+ return Array.from(new Set(e.match(dt) ?? []));
3482
3583
  }
3483
3584
  //#endregion
3484
3585
  //#region src/components/chat/LinkPreview.tsx
3485
- function it(e) {
3586
+ function pt(e) {
3486
3587
  let t = (0, g.c)(30), { url: n, onConfirm: r, onCancel: i } = e, a;
3487
3588
  try {
3488
3589
  let e;
@@ -3608,7 +3709,7 @@ function it(e) {
3608
3709
  t[24] !== y || t[25] !== w ? (T = /* @__PURE__ */ u("div", {
3609
3710
  className: "rounded-2xl overflow-hidden flex flex-col",
3610
3711
  style: c,
3611
- onClick: at,
3712
+ onClick: mt,
3612
3713
  children: [
3613
3714
  f,
3614
3715
  y,
@@ -3623,10 +3724,10 @@ function it(e) {
3623
3724
  children: T
3624
3725
  }), t[27] = i, t[28] = T, t[29] = E) : E = t[29], E;
3625
3726
  }
3626
- function at(e) {
3727
+ function mt(e) {
3627
3728
  return e.stopPropagation();
3628
3729
  }
3629
- function ot(e) {
3730
+ function ht(e) {
3630
3731
  let t = (0, g.c)(52), { url: n, sender: i } = e, { apiClient: a } = v(), [o, d] = s(null), [f, p] = s(!0), [m, h] = s(!1), [_, y] = s(!1), b, x;
3631
3732
  if (t[0] !== a || t[1] !== n ? (b = () => {
3632
3733
  let e = !1;
@@ -3652,14 +3753,14 @@ function ot(e) {
3652
3753
  alt: o.title ?? "",
3653
3754
  className: "w-full object-cover",
3654
3755
  style: { maxHeight: 160 },
3655
- onError: ct
3756
+ onError: _t
3656
3757
  }), t[7] = o, t[8] = O);
3657
3758
  let k;
3658
3759
  t[9] === o ? k = t[10] : (k = o?.favicon && /* @__PURE__ */ l("img", {
3659
3760
  src: o.favicon,
3660
3761
  alt: "",
3661
3762
  className: "w-3.5 h-3.5 rounded-sm flex-shrink-0 object-contain",
3662
- onError: st
3763
+ onError: gt
3663
3764
  }), t[9] = o, t[10] = k);
3664
3765
  let A;
3665
3766
  t[11] === o ? A = t[12] : (A = o?.siteName && /* @__PURE__ */ l("span", {
@@ -3750,7 +3851,7 @@ function ot(e) {
3750
3851
  children: R
3751
3852
  }), t[41] = R, t[42] = B, t[43] = V, t[44] = H) : H = t[44];
3752
3853
  let U;
3753
- t[45] !== D || t[46] !== _ || t[47] !== n ? (U = _ && /* @__PURE__ */ l(it, {
3854
+ t[45] !== D || t[46] !== _ || t[47] !== n ? (U = _ && /* @__PURE__ */ l(pt, {
3754
3855
  url: n,
3755
3856
  onConfirm: D,
3756
3857
  onCancel: () => y(!1)
@@ -3758,15 +3859,15 @@ function ot(e) {
3758
3859
  let W;
3759
3860
  return t[49] !== H || t[50] !== U ? (W = /* @__PURE__ */ u(c, { children: [H, U] }), t[49] = H, t[50] = U, t[51] = W) : W = t[51], W;
3760
3861
  }
3761
- function st(e) {
3862
+ function gt(e) {
3762
3863
  e.currentTarget.style.display = "none";
3763
3864
  }
3764
- function ct(e) {
3865
+ function _t(e) {
3765
3866
  e.currentTarget.style.display = "none";
3766
3867
  }
3767
3868
  //#endregion
3768
3869
  //#region src/components/chat/MessageBubble.tsx
3769
- function lt(e) {
3870
+ function vt(e) {
3770
3871
  let t = (0, g.c)(11), { status: n } = e, r = y();
3771
3872
  if (n === "sent" && r.sentIcon) {
3772
3873
  let e;
@@ -3789,7 +3890,7 @@ function lt(e) {
3789
3890
  children: o
3790
3891
  }), t[8] = a, t[9] = o, t[10] = s) : s = t[10], s;
3791
3892
  }
3792
- function ut(e) {
3893
+ function yt(e) {
3793
3894
  let t = (0, g.c)(21), { time: n, sender: r, status: i, overlay: a, edited: o } = e, s = a === void 0 ? !1 : a, c = o === void 0 ? !1 : o;
3794
3895
  if (s) {
3795
3896
  let e;
@@ -3803,7 +3904,7 @@ function ut(e) {
3803
3904
  children: "edited"
3804
3905
  }), t[1] = c, t[2] = a);
3805
3906
  let o;
3806
- t[3] !== r || t[4] !== i ? (o = r && i && /* @__PURE__ */ l(lt, { status: i }), t[3] = r, t[4] = i, t[5] = o) : o = t[5];
3907
+ t[3] !== r || t[4] !== i ? (o = r && i && /* @__PURE__ */ l(vt, { status: i }), t[3] = r, t[4] = i, t[5] = o) : o = t[5];
3807
3908
  let s;
3808
3909
  return t[6] !== a || t[7] !== o || t[8] !== n ? (s = /* @__PURE__ */ u("div", {
3809
3910
  className: "absolute bottom-1.5 right-2.5 flex items-center gap-1 text-[11px] font-medium px-1.5 py-0.5 rounded-md",
@@ -3823,7 +3924,7 @@ function ut(e) {
3823
3924
  children: "edited"
3824
3925
  }), t[11] = c, t[12] = p);
3825
3926
  let m;
3826
- t[13] !== r || t[14] !== i ? (m = r && i && /* @__PURE__ */ l(lt, { status: i }), t[13] = r, t[14] = i, t[15] = m) : m = t[15];
3927
+ t[13] !== r || t[14] !== i ? (m = r && i && /* @__PURE__ */ l(vt, { status: i }), t[13] = r, t[14] = i, t[15] = m) : m = t[15];
3827
3928
  let h;
3828
3929
  return t[16] !== d || t[17] !== p || t[18] !== m || t[19] !== n ? (h = /* @__PURE__ */ u("div", {
3829
3930
  className: d,
@@ -3835,7 +3936,7 @@ function ut(e) {
3835
3936
  ]
3836
3937
  }), t[16] = d, t[17] = p, t[18] = m, t[19] = n, t[20] = h) : h = t[20], h;
3837
3938
  }
3838
- function dt() {
3939
+ function bt() {
3839
3940
  let e = (0, g.c)(2), t;
3840
3941
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
3841
3942
  color: "var(--oc-muted-foreground, #888)",
@@ -3858,20 +3959,20 @@ function dt() {
3858
3959
  }), /* @__PURE__ */ l("span", { children: "Forwarded" })]
3859
3960
  }), e[1] = n) : n = e[1], n;
3860
3961
  }
3861
- function ft(e) {
3962
+ function xt(e) {
3862
3963
  let t = (0, g.c)(101), { id: n, content: r, sender: i, time: a, status: d, avatarSrc: f, senderName: p, attachment: m, callBanner: h, onCallBack: _, reply: v, reactions: y, isGrouped: b, recalled: x, forwarded: S, edited: C, selectable: w, selected: T, onSelect: E, onReplyClick: D, onReply: O, onReact: k, onEdit: A, onForward: j, onDelete: M, onRecall: N, onInfo: P, highlighted: F, pinned: I, onPin: L, onMediaOpen: R, imageSet: z } = e, [B, V] = s(!1), [H, U] = s(!1), [W, G] = s(!1), K = o(null);
3863
3964
  if (h) {
3864
3965
  let e = `flex flex-col gap-0.5 max-w-full ${i ? "items-end" : "items-start"}`, n = `flex items-end gap-2 max-w-[85%] ${i ? "flex-row-reverse" : ""}`, r;
3865
3966
  t[0] !== f || t[1] !== b || t[2] !== i || t[3] !== p ? (r = !i && /* @__PURE__ */ l("div", {
3866
3967
  style: { opacity: +!b },
3867
- children: /* @__PURE__ */ l(ve, {
3968
+ children: /* @__PURE__ */ l(De, {
3868
3969
  src: f,
3869
3970
  name: p,
3870
3971
  size: 28
3871
3972
  })
3872
3973
  }), t[0] = f, t[1] = b, t[2] = i, t[3] = p, t[4] = r) : r = t[4];
3873
3974
  let o;
3874
- t[5] !== h || t[6] !== _ || t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ l(Fe, {
3975
+ t[5] !== h || t[6] !== _ || t[7] !== i || t[8] !== a ? (o = /* @__PURE__ */ l(We, {
3875
3976
  data: h,
3876
3977
  sender: i,
3877
3978
  time: a,
@@ -3930,7 +4031,7 @@ function ft(e) {
3930
4031
  let se;
3931
4032
  t[31] !== f || t[32] !== b || t[33] !== i || t[34] !== p ? (se = !i && /* @__PURE__ */ l("div", {
3932
4033
  style: { opacity: +!b },
3933
- children: /* @__PURE__ */ l(ve, {
4034
+ children: /* @__PURE__ */ l(De, {
3934
4035
  src: f,
3935
4036
  name: p,
3936
4037
  size: 28
@@ -3948,7 +4049,7 @@ function ft(e) {
3948
4049
  style: { color: "var(--oc-muted-foreground, #fff)" },
3949
4050
  children: "This message was recalled"
3950
4051
  }) : /* @__PURE__ */ u(c, { children: [
3951
- S && /* @__PURE__ */ l(dt, {}),
4052
+ S && /* @__PURE__ */ l(bt, {}),
3952
4053
  I && /* @__PURE__ */ u("div", {
3953
4054
  className: "flex items-center gap-1 px-3.5 pt-1.5 pb-0 text-[10px]",
3954
4055
  style: {
@@ -3992,7 +4093,7 @@ function ft(e) {
3992
4093
  src: v.attachmentUrl,
3993
4094
  alt: "",
3994
4095
  className: "w-9 h-9 rounded-md object-cover flex-shrink-0",
3995
- onError: yt
4096
+ onError: Ot
3996
4097
  }),
3997
4098
  v.attachmentUrl && v.attachmentType === "video" && /* @__PURE__ */ l("div", {
3998
4099
  className: "w-9 h-9 rounded-md flex items-center justify-center flex-shrink-0",
@@ -4048,7 +4149,7 @@ function ft(e) {
4048
4149
  })
4049
4150
  ]
4050
4151
  }),
4051
- m && /* @__PURE__ */ l(Ne, {
4152
+ m && /* @__PURE__ */ l(He, {
4052
4153
  attachment: m,
4053
4154
  sender: i,
4054
4155
  borderRadius: Y,
@@ -4065,13 +4166,13 @@ function ft(e) {
4065
4166
  })]
4066
4167
  }),
4067
4168
  r && !X && !x && (() => {
4068
- let e = rt(r);
4069
- return e.length ? /* @__PURE__ */ l(ot, {
4169
+ let e = ft(r);
4170
+ return e.length ? /* @__PURE__ */ l(ht, {
4070
4171
  url: e[0],
4071
4172
  sender: i
4072
4173
  }, e[0]) : null;
4073
4174
  })(),
4074
- ee && !b && /* @__PURE__ */ l(ut, {
4175
+ ee && !b && /* @__PURE__ */ l(yt, {
4075
4176
  time: a,
4076
4177
  sender: i,
4077
4178
  status: d,
@@ -4091,7 +4192,7 @@ function ft(e) {
4091
4192
  style: { order: i ? -1 : 1 },
4092
4193
  children: [
4093
4194
  /* @__PURE__ */ l("button", {
4094
- onClick: () => U(vt),
4195
+ onClick: () => U(Dt),
4095
4196
  className: "flex items-center justify-center w-6 h-6 rounded-full border-none cursor-pointer text-base leading-none",
4096
4197
  style: {
4097
4198
  backgroundColor: "var(--oc-secondary, rgba(128,128,128,0.15))",
@@ -4102,26 +4203,26 @@ function ft(e) {
4102
4203
  "aria-expanded": H,
4103
4204
  children: "›"
4104
4205
  }),
4105
- H && /* @__PURE__ */ l(Ge, {
4206
+ H && /* @__PURE__ */ l(et, {
4106
4207
  messageId: n,
4107
4208
  isSender: i,
4108
4209
  isPinned: I,
4109
- onReply: O ?? _t,
4210
+ onReply: O ?? Et,
4110
4211
  onReact: () => {
4111
4212
  U(!1), G(!0);
4112
4213
  },
4113
4214
  onEdit: A,
4114
- onForward: j ?? gt,
4115
- onDelete: M ?? ht,
4215
+ onForward: j ?? Tt,
4216
+ onDelete: M ?? wt,
4116
4217
  onRecall: N,
4117
4218
  onInfo: P,
4118
- onSelect: E ?? mt,
4219
+ onSelect: E ?? Ct,
4119
4220
  onPin: L,
4120
4221
  onClose: () => {
4121
4222
  U(!1), V(!1);
4122
4223
  }
4123
4224
  }),
4124
- W && /* @__PURE__ */ l(et, {
4225
+ W && /* @__PURE__ */ l(lt, {
4125
4226
  messageId: n,
4126
4227
  onSelect: (e) => {
4127
4228
  k?.(e), G(!1), V(!1);
@@ -4146,10 +4247,10 @@ function ft(e) {
4146
4247
  let me;
4147
4248
  t[84] !== y || t[85] !== i ? (me = y && y.length > 0 && /* @__PURE__ */ l("div", {
4148
4249
  className: `flex flex-wrap gap-1 mt-2 ${i ? "pr-1" : "pl-9"}`,
4149
- children: y.map(pt)
4250
+ children: y.map(St)
4150
4251
  }), t[84] = y, t[85] = i, t[86] = me) : me = t[86];
4151
4252
  let he;
4152
- t[87] !== C || t[88] !== b || t[89] !== ee || t[90] !== i || t[91] !== d || t[92] !== a ? (he = (!b || C) && !ee && /* @__PURE__ */ l(ut, {
4253
+ t[87] !== C || t[88] !== b || t[89] !== ee || t[90] !== i || t[91] !== d || t[92] !== a ? (he = (!b || C) && !ee && /* @__PURE__ */ l(yt, {
4153
4254
  time: a,
4154
4255
  sender: i,
4155
4256
  status: d,
@@ -4168,7 +4269,7 @@ function ft(e) {
4168
4269
  ]
4169
4270
  }), t[94] = pe, t[95] = me, t[96] = he, t[97] = ne, t[98] = $, t[99] = ie, t[100] = ge) : ge = t[100], ge;
4170
4271
  }
4171
- function pt(e, t) {
4272
+ function St(e, t) {
4172
4273
  return /* @__PURE__ */ u("span", {
4173
4274
  className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-xl text-md font-semibold border",
4174
4275
  style: {
@@ -4183,20 +4284,20 @@ function pt(e, t) {
4183
4284
  ]
4184
4285
  }, t);
4185
4286
  }
4186
- function mt() {}
4187
- function ht() {}
4188
- function gt() {}
4189
- function _t() {}
4190
- function vt(e) {
4287
+ function Ct() {}
4288
+ function wt() {}
4289
+ function Tt() {}
4290
+ function Et() {}
4291
+ function Dt(e) {
4191
4292
  return !e;
4192
4293
  }
4193
- function yt(e) {
4294
+ function Ot(e) {
4194
4295
  e.currentTarget.style.display = "none";
4195
4296
  }
4196
4297
  //#endregion
4197
4298
  //#region src/components/chat/EmojiPicker.tsx
4198
- function bt(e) {
4199
- let t = (0, g.c)(36), { onSelect: n, onClose: i } = e, [a, c] = s(""), [d, f] = s("smileys"), [p, m] = s(Qe), h = o(null), _ = o(null), v = o(null), y = o({}), b, x;
4299
+ function kt(e) {
4300
+ let t = (0, g.c)(36), { onSelect: n, onClose: i } = e, [a, c] = s(""), [d, f] = s("smileys"), [p, m] = s(st), h = o(null), _ = o(null), v = o(null), y = o({}), b, x;
4200
4301
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (b = () => {
4201
4302
  _.current?.focus();
4202
4303
  }, x = [], t[0] = b, t[1] = x) : (b = t[0], x = t[1]), r(b, x);
@@ -4208,10 +4309,10 @@ function bt(e) {
4208
4309
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
4209
4310
  }, C = [i], t[2] = i, t[3] = S, t[4] = C), r(S, C);
4210
4311
  let w;
4211
- t[5] === p ? w = t[6] : (w = Ye.map((e) => e.id === "recent" ? {
4312
+ t[5] === p ? w = t[6] : (w = it.map((e) => e.id === "recent" ? {
4212
4313
  ...e,
4213
4314
  emojis: p
4214
- } : e).filter(St), t[5] = p, t[6] = w);
4315
+ } : e).filter(jt), t[5] = p, t[6] = w);
4215
4316
  let T = w, E;
4216
4317
  bb0: {
4217
4318
  if (!a.trim()) {
@@ -4221,13 +4322,13 @@ function bt(e) {
4221
4322
  let e;
4222
4323
  if (t[7] !== a) {
4223
4324
  let n = a.trim().toLowerCase();
4224
- e = Ye.flatMap(xt).filter((e, t, r) => r.indexOf(e) === t ? e.includes(n) || e.codePointAt(0)?.toString(16).includes(n) : !1), t[7] = a, t[8] = e;
4325
+ e = it.flatMap(At).filter((e, t, r) => r.indexOf(e) === t ? e.includes(n) || e.codePointAt(0)?.toString(16).includes(n) : !1), t[7] = a, t[8] = e;
4225
4326
  } else e = t[8];
4226
4327
  E = e;
4227
4328
  }
4228
4329
  let D = E, O;
4229
4330
  t[9] === n ? O = t[10] : (O = function(e) {
4230
- $e(e), m(Qe()), n(e);
4331
+ ct(e), m(st()), n(e);
4231
4332
  }, t[9] = n, t[10] = O);
4232
4333
  let k = O, A = function(e) {
4233
4334
  f(e);
@@ -4416,19 +4517,19 @@ function bt(e) {
4416
4517
  ]
4417
4518
  }), t[31] = B, t[32] = V, t[33] = G, t[34] = N, t[35] = K) : K = t[35], K;
4418
4519
  }
4419
- function xt(e) {
4520
+ function At(e) {
4420
4521
  return e.emojis;
4421
4522
  }
4422
- function St(e) {
4523
+ function jt(e) {
4423
4524
  return e.id !== "recent" || e.emojis.length > 0;
4424
4525
  }
4425
4526
  //#endregion
4426
4527
  //#region src/hooks/useMedia.ts
4427
- var Ct = new Set(["video/", "audio/"]);
4428
- function wt(e) {
4429
- return [...Ct].some((t) => e.startsWith(t));
4528
+ var Mt = new Set(["video/", "audio/"]);
4529
+ function Nt(e) {
4530
+ return [...Mt].some((t) => e.startsWith(t));
4430
4531
  }
4431
- function Tt() {
4532
+ function Pt() {
4432
4533
  let { apiClient: e } = v(), { socket: n } = A(), [r, i] = s(!1), [a, c] = s(!1), [l, u] = s(null), d = o(/* @__PURE__ */ new Map()), f = o(n);
4433
4534
  f.current = n;
4434
4535
  let p = t((t, n = 3e4) => new Promise((r, i) => {
@@ -4506,7 +4607,7 @@ function Tt() {
4506
4607
  }, [e]),
4507
4608
  uploadAndWait: t(async (e) => {
4508
4609
  let t = await m(e);
4509
- if (!wt(e.type)) return t;
4610
+ if (!Nt(e.type)) return t;
4510
4611
  c(!0);
4511
4612
  try {
4512
4613
  try {
@@ -4534,7 +4635,7 @@ function Tt() {
4534
4635
  }
4535
4636
  //#endregion
4536
4637
  //#region src/components/chat/AttachmentPicker.tsx
4537
- var Et = [
4638
+ var Ft = [
4538
4639
  {
4539
4640
  id: "image",
4540
4641
  label: "Image",
@@ -4668,14 +4769,14 @@ var Et = [
4668
4769
  })
4669
4770
  }
4670
4771
  ];
4671
- function Dt(e) {
4772
+ function It(e) {
4672
4773
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
4673
4774
  }
4674
- function Ot(e) {
4775
+ function Lt(e) {
4675
4776
  return e.type.startsWith("image/") || e.type.startsWith("video/") ? URL.createObjectURL(e) : null;
4676
4777
  }
4677
- function kt({ onSelect: e, onClose: n, allow: i }) {
4678
- let { upload: a, uploadAndWait: d, isUploading: f, isProcessing: p } = Tt(), m = o(null), h = o(null), g = i ? Et.filter((e) => i.includes(e.id)) : Et, [_, v] = s(g[0]?.id ?? "image"), [y, b] = s(!1), [x, S] = s(null), [C, w] = s(null), [T, E] = s(null), [D, O] = s(""), [k, A] = s(null), [j, M] = s(!1), [N, P] = s(null), F = g.find((e) => e.id === _);
4778
+ function Rt({ onSelect: e, onClose: n, allow: i }) {
4779
+ let { upload: a, uploadAndWait: d, isUploading: f, isProcessing: p } = Pt(), m = o(null), h = o(null), g = i ? Ft.filter((e) => i.includes(e.id)) : Ft, [_, v] = s(g[0]?.id ?? "image"), [y, b] = s(!1), [x, S] = s(null), [C, w] = s(null), [T, E] = s(null), [D, O] = s(""), [k, A] = s(null), [j, M] = s(!1), [N, P] = s(null), F = g.find((e) => e.id === _);
4679
4780
  r(() => {
4680
4781
  let e = (e) => {
4681
4782
  m.current && !m.current.contains(e.target) && n?.();
@@ -4692,7 +4793,7 @@ function kt({ onSelect: e, onClose: n, allow: i }) {
4692
4793
  let I = t(async (t) => {
4693
4794
  w(null), E(0), S({
4694
4795
  file: t,
4695
- objectUrl: Ot(t)
4796
+ objectUrl: Lt(t)
4696
4797
  });
4697
4798
  let n = t.type.startsWith("video/") || t.type.startsWith("audio/"), r = setInterval(() => {
4698
4799
  E((e) => e !== null && e < (n ? 60 : 85) ? e + 15 : e);
@@ -4867,7 +4968,7 @@ function kt({ onSelect: e, onClose: n, allow: i }) {
4867
4968
  }), /* @__PURE__ */ l("p", {
4868
4969
  className: "text-xs",
4869
4970
  style: { color: "var(--oc-muted-foreground)" },
4870
- children: Dt(x.file.size)
4971
+ children: It(x.file.size)
4871
4972
  })]
4872
4973
  })]
4873
4974
  }),
@@ -4986,7 +5087,7 @@ function kt({ onSelect: e, onClose: n, allow: i }) {
4986
5087
  }
4987
5088
  //#endregion
4988
5089
  //#region src/hooks/useRecording.ts
4989
- function At() {
5090
+ function zt() {
4990
5091
  return [
4991
5092
  "audio/webm;codecs=opus",
4992
5093
  "audio/webm",
@@ -4994,7 +5095,7 @@ function At() {
4994
5095
  "audio/mp4"
4995
5096
  ].find((e) => MediaRecorder.isTypeSupported(e)) ?? "";
4996
5097
  }
4997
- function jt() {
5098
+ function Bt() {
4998
5099
  let [e, n] = s("idle"), [i, a] = s(0), [c, l] = s([]), [u, d] = s(null), f = o(null), p = o([]), m = o(null), h = o(null), g = o(null), _ = o(0), v = o(null), y = o(null), b = o([]), x = o(0), S = o(() => {});
4999
5100
  r(() => {
5000
5101
  S.current = (e) => {
@@ -5030,7 +5131,7 @@ function jt() {
5030
5131
  h.current = t;
5031
5132
  let r = t.createAnalyser();
5032
5133
  r.fftSize = 256, r.smoothingTimeConstant = .6, t.createMediaStreamSource(e).connect(r), g.current = r;
5033
- let i = At(), o = new MediaRecorder(e, i ? { mimeType: i } : void 0);
5134
+ let i = zt(), o = new MediaRecorder(e, i ? { mimeType: i } : void 0);
5034
5135
  f.current = o, p.current = [], o.ondataavailable = (e) => {
5035
5136
  e.data.size > 0 && p.current.push(e.data);
5036
5137
  }, o.start(), _.current = Date.now(), n("recording"), v.current = setInterval(() => a(Date.now() - _.current), 100), x.current = 0, y.current = requestAnimationFrame((e) => S.current(e));
@@ -5064,11 +5165,11 @@ function jt() {
5064
5165
  }
5065
5166
  //#endregion
5066
5167
  //#region src/components/chat/AudioRecorder.tsx
5067
- function Mt(e) {
5168
+ function Vt(e) {
5068
5169
  let t = Math.floor(e / 1e3);
5069
5170
  return `${Math.floor(t / 60)}:${(t % 60).toString().padStart(2, "0")}`;
5070
5171
  }
5071
- function Nt(e) {
5172
+ function Ht(e) {
5072
5173
  let t = (0, g.c)(9), { samples: n, active: r } = e, i;
5073
5174
  t[0] === n ? i = t[1] : (i = n.length ? n : Array(30).fill(4), t[0] = n, t[1] = i);
5074
5175
  let a = i, o;
@@ -5089,8 +5190,8 @@ function Nt(e) {
5089
5190
  children: o
5090
5191
  }), t[7] = o, t[8] = s), s;
5091
5192
  }
5092
- function Pt({ onSend: e, onCancel: t }) {
5093
- let { durationMs: n, waveform: i, error: a, start: d, stop: f, cancel: p } = jt(), { uploadRecording: m, isUploading: h } = Tt(), [g, _] = s("recording"), [v, y] = s(null), [b, x] = s([]), [S, C] = s(0), [w, T] = s(null), [E, D] = s(!1), [O, k] = s(null), A = o(null), j = o(null);
5193
+ function Ut({ onSend: e, onCancel: t }) {
5194
+ let { durationMs: n, waveform: i, error: a, start: d, stop: f, cancel: p } = Bt(), { uploadRecording: m, isUploading: h } = Pt(), [g, _] = s("recording"), [v, y] = s(null), [b, x] = s([]), [S, C] = s(0), [w, T] = s(null), [E, D] = s(!1), [O, k] = s(null), A = o(null), j = o(null);
5094
5195
  r(() => (d(), () => {
5095
5196
  p(), j.current && URL.revokeObjectURL(j.current);
5096
5197
  }), []), r(() => {
@@ -5181,7 +5282,7 @@ function Pt({ onSend: e, onCancel: t }) {
5181
5282
  })]
5182
5283
  })
5183
5284
  }), g === "recording" ? /* @__PURE__ */ u(c, { children: [
5184
- /* @__PURE__ */ l(Nt, {
5285
+ /* @__PURE__ */ l(Ht, {
5185
5286
  samples: i,
5186
5287
  active: !0
5187
5288
  }),
@@ -5191,7 +5292,7 @@ function Pt({ onSend: e, onCancel: t }) {
5191
5292
  color: "#ef4444",
5192
5293
  minWidth: 36
5193
5294
  },
5194
- children: Mt(n)
5295
+ children: Vt(n)
5195
5296
  }),
5196
5297
  /* @__PURE__ */ l("div", {
5197
5298
  className: "w-2 h-2 rounded-full flex-shrink-0 animate-pulse",
@@ -5251,7 +5352,7 @@ function Pt({ onSend: e, onCancel: t }) {
5251
5352
  children: /* @__PURE__ */ l("polygon", { points: "5,3 19,12 5,21" })
5252
5353
  })
5253
5354
  }),
5254
- /* @__PURE__ */ l(Nt, {
5355
+ /* @__PURE__ */ l(Ht, {
5255
5356
  samples: b,
5256
5357
  active: E
5257
5358
  }),
@@ -5261,7 +5362,7 @@ function Pt({ onSend: e, onCancel: t }) {
5261
5362
  color: "var(--oc-muted-foreground)",
5262
5363
  minWidth: 36
5263
5364
  },
5264
- children: Mt(S)
5365
+ children: Vt(S)
5265
5366
  }),
5266
5367
  I && /* @__PURE__ */ l("span", {
5267
5368
  className: "text-xs flex-shrink-0",
@@ -5305,8 +5406,8 @@ function Pt({ onSend: e, onCancel: t }) {
5305
5406
  }
5306
5407
  //#endregion
5307
5408
  //#region src/components/chat/StickerPicker.tsx
5308
- var Ft = "LIVDSRZULELA", It = "https://g.tenor.com/v1";
5309
- async function Lt(e, t, n) {
5409
+ var Wt = "LIVDSRZULELA", Gt = "https://g.tenor.com/v1";
5410
+ async function Kt(e, t, n) {
5310
5411
  let r = new URLSearchParams({
5311
5412
  q: e || "sticker",
5312
5413
  key: t,
@@ -5314,7 +5415,7 @@ async function Lt(e, t, n) {
5314
5415
  contentfilter: "medium",
5315
5416
  media_filter: "minimal",
5316
5417
  ...n ? { pos: n } : {}
5317
- }), i = await (await fetch(`${It}/search?${r}`)).json();
5418
+ }), i = await (await fetch(`${Gt}/search?${r}`)).json();
5318
5419
  return {
5319
5420
  items: (i.results ?? []).map((e) => {
5320
5421
  let t = e.media?.[0] ?? {};
@@ -5328,14 +5429,14 @@ async function Lt(e, t, n) {
5328
5429
  next: i.next ?? ""
5329
5430
  };
5330
5431
  }
5331
- async function Rt(e) {
5432
+ async function qt(e) {
5332
5433
  let t = new URLSearchParams({
5333
5434
  key: e,
5334
5435
  limit: "24",
5335
5436
  contentfilter: "medium",
5336
5437
  media_filter: "minimal"
5337
5438
  });
5338
- return ((await (await fetch(`${It}/trending?${t}`)).json()).results ?? []).map((e) => {
5439
+ return ((await (await fetch(`${Gt}/trending?${t}`)).json()).results ?? []).map((e) => {
5339
5440
  let t = e.media?.[0] ?? {};
5340
5441
  return {
5341
5442
  id: e.id,
@@ -5345,7 +5446,7 @@ async function Rt(e) {
5345
5446
  };
5346
5447
  });
5347
5448
  }
5348
- function zt(e) {
5449
+ function Jt(e) {
5349
5450
  let t = (0, g.c)(9), { stickers: n, onSelect: r } = e;
5350
5451
  if (!n.length) {
5351
5452
  let e;
@@ -5380,16 +5481,16 @@ function zt(e) {
5380
5481
  children: a
5381
5482
  }), t[7] = a, t[8] = o), o;
5382
5483
  }
5383
- function Bt(e) {
5484
+ function Yt(e) {
5384
5485
  let t = (0, g.c)(66), { onSelect: n, onClose: i, customPacks: a, tenorApiKey: c } = e, d;
5385
5486
  t[0] === a ? d = t[1] : (d = a === void 0 ? [] : a, t[0] = a, t[1] = d);
5386
- let f = d, p = c ?? Ft, m = o(null), [h, _] = s("featured"), v;
5487
+ let f = d, p = c ?? Wt, m = o(null), [h, _] = s("featured"), v;
5387
5488
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (v = [], t[2] = v) : v = t[2];
5388
5489
  let [y, b] = s(v), [x, S] = s(""), C;
5389
5490
  t[3] === Symbol.for("react.memo_cache_sentinel") ? (C = [], t[3] = C) : C = t[3];
5390
5491
  let [w, T] = s(C), [E, D] = s(!1), O = o(null), k, A;
5391
5492
  t[4] === p ? (k = t[5], A = t[6]) : (k = () => {
5392
- D(!0), Rt(p).then((e) => {
5493
+ D(!0), qt(p).then((e) => {
5393
5494
  b(e), D(!1);
5394
5495
  }).catch(() => D(!1));
5395
5496
  }, A = [p], t[4] = p, t[5] = k, t[6] = A), r(k, A);
@@ -5401,7 +5502,7 @@ function Bt(e) {
5401
5502
  return;
5402
5503
  }
5403
5504
  return O.current = setTimeout(() => {
5404
- D(!0), Lt(x, p).then((e) => {
5505
+ D(!0), Kt(x, p).then((e) => {
5405
5506
  let { items: t } = e;
5406
5507
  T(t), D(!1);
5407
5508
  }).catch(() => D(!1));
@@ -5548,17 +5649,17 @@ function Bt(e) {
5548
5649
  className: "flex items-center justify-center h-full text-sm",
5549
5650
  style: { color: "var(--oc-muted-foreground)" },
5550
5651
  children: "Loading…"
5551
- }) : h === "featured" ? /* @__PURE__ */ l(zt, {
5652
+ }) : h === "featured" ? /* @__PURE__ */ l(Jt, {
5552
5653
  stickers: y,
5553
5654
  onSelect: R
5554
- }) : h === "search" ? x.trim() ? /* @__PURE__ */ l(zt, {
5655
+ }) : h === "search" ? x.trim() ? /* @__PURE__ */ l(Jt, {
5555
5656
  stickers: w,
5556
5657
  onSelect: R
5557
5658
  }) : /* @__PURE__ */ l("div", {
5558
5659
  className: "flex items-center justify-center h-full text-sm",
5559
5660
  style: { color: "var(--oc-muted-foreground)" },
5560
5661
  children: "Type to search stickers"
5561
- }) : B ? /* @__PURE__ */ l(zt, {
5662
+ }) : B ? /* @__PURE__ */ l(Jt, {
5562
5663
  stickers: B.stickers,
5563
5664
  onSelect: R
5564
5665
  }) : null, t[49] = B, t[50] = y, t[51] = R, t[52] = E, t[53] = x, t[54] = w, t[55] = h, t[56] = ne) : ne = t[56];
@@ -5596,23 +5697,23 @@ function Bt(e) {
5596
5697
  }
5597
5698
  //#endregion
5598
5699
  //#region src/components/chat/QuickMessages.tsx
5599
- var Vt = "oc_quick_messages";
5600
- function Ht() {
5700
+ var Xt = "oc_quick_messages";
5701
+ function Zt() {
5601
5702
  try {
5602
- let e = localStorage.getItem(Vt);
5703
+ let e = localStorage.getItem(Xt);
5603
5704
  return e ? JSON.parse(e) : [];
5604
5705
  } catch {
5605
5706
  return [];
5606
5707
  }
5607
5708
  }
5608
- function Ut(e) {
5609
- localStorage.setItem(Vt, JSON.stringify(e));
5709
+ function Qt(e) {
5710
+ localStorage.setItem(Xt, JSON.stringify(e));
5610
5711
  }
5611
- function Wt() {
5712
+ function $t() {
5612
5713
  return Math.random().toString(36).slice(2, 10);
5613
5714
  }
5614
- function Gt(e) {
5615
- let t = (0, g.c)(41), { onSelect: n, onClose: i, onManage: a } = e, c = s(Ht)[0], [d, f] = s(""), p = o(null), m, h;
5715
+ function en(e) {
5716
+ let t = (0, g.c)(41), { onSelect: n, onClose: i, onManage: a } = e, c = s(Zt)[0], [d, f] = s(""), p = o(null), m, h;
5616
5717
  t[0] === i ? (m = t[1], h = t[2]) : (m = () => {
5617
5718
  let e = (e) => {
5618
5719
  let t = e.target;
@@ -5687,8 +5788,8 @@ function Gt(e) {
5687
5788
  },
5688
5789
  className: "w-full flex flex-col gap-0.5 px-4 py-2.5 text-left border-none cursor-pointer transition-colors",
5689
5790
  style: { backgroundColor: "transparent" },
5690
- onMouseEnter: qt,
5691
- onMouseLeave: Kt,
5791
+ onMouseEnter: nn,
5792
+ onMouseLeave: tn,
5692
5793
  children: [/* @__PURE__ */ l("span", {
5693
5794
  className: "text-xs font-semibold",
5694
5795
  style: { color: "var(--oc-primary)" },
@@ -5716,21 +5817,21 @@ function Gt(e) {
5716
5817
  ]
5717
5818
  }), t[34] = y, t[35] = b, t[36] = E, t[37] = C, t[38] = w, t[39] = T, t[40] = D) : D = t[40], D;
5718
5819
  }
5719
- function Kt(e) {
5820
+ function tn(e) {
5720
5821
  e.currentTarget.style.backgroundColor = "transparent";
5721
5822
  }
5722
- function qt(e) {
5823
+ function nn(e) {
5723
5824
  e.currentTarget.style.backgroundColor = "var(--oc-secondary)";
5724
5825
  }
5725
- function Jt(e) {
5826
+ function rn(e) {
5726
5827
  let t = (0, g.c)(35), { defaultMessages: n, onClose: r } = e, i;
5727
5828
  t[0] === n ? i = t[1] : (i = () => {
5728
- let e = Ht();
5729
- return e.length === 0 && n?.length ? (Ut(n), n) : e;
5829
+ let e = Zt();
5830
+ return e.length === 0 && n?.length ? (Qt(n), n) : e;
5730
5831
  }, t[0] = n, t[1] = i);
5731
5832
  let [a, o] = s(i), [c, d] = s(null), [f, p] = s(""), [m, h] = s(""), _;
5732
5833
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (_ = (e) => {
5733
- o(e), Ut(e);
5834
+ o(e), Qt(e);
5734
5835
  }, t[2] = _) : _ = t[2];
5735
5836
  let v = _, y;
5736
5837
  t[3] === Symbol.for("react.memo_cache_sentinel") ? (y = () => {
@@ -5743,7 +5844,7 @@ function Jt(e) {
5743
5844
  let S = x, C;
5744
5845
  t[5] !== c || t[6] !== f || t[7] !== a || t[8] !== m ? (C = () => {
5745
5846
  !f.trim() || !m.trim() || (v(c === "__new__" ? [...a, {
5746
- id: Wt(),
5847
+ id: $t(),
5747
5848
  label: f.trim(),
5748
5849
  text: m.trim()
5749
5850
  }] : a.map((e) => e.id === c ? {
@@ -5975,7 +6076,7 @@ function Jt(e) {
5975
6076
  }
5976
6077
  //#endregion
5977
6078
  //#region src/components/chat/Composer.tsx
5978
- function Yt(e) {
6079
+ function an(e) {
5979
6080
  let t = (0, g.c)(12), { onFormat: n, position: r } = e, i = r.top - 44, a;
5980
6081
  t[0] !== r.left || t[1] !== i ? (a = {
5981
6082
  top: i,
@@ -6030,8 +6131,8 @@ function Yt(e) {
6030
6131
  backgroundColor: "transparent",
6031
6132
  color: "var(--oc-foreground)"
6032
6133
  },
6033
- onMouseEnter: Zt,
6034
- onMouseLeave: Xt,
6134
+ onMouseEnter: sn,
6135
+ onMouseLeave: on,
6035
6136
  children: r
6036
6137
  }, t);
6037
6138
  }), t[7] = n, t[8] = d);
@@ -6042,13 +6143,13 @@ function Yt(e) {
6042
6143
  children: d
6043
6144
  }), t[9] = a, t[10] = d, t[11] = f) : f = t[11], f;
6044
6145
  }
6045
- function Xt(e) {
6146
+ function on(e) {
6046
6147
  e.currentTarget.style.backgroundColor = "transparent";
6047
6148
  }
6048
- function Zt(e) {
6149
+ function sn(e) {
6049
6150
  e.currentTarget.style.backgroundColor = "var(--oc-secondary)";
6050
6151
  }
6051
- var Qt = () => {
6152
+ var cn = () => {
6052
6153
  let e = (0, g.c)(1), t;
6053
6154
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
6054
6155
  width: "18",
@@ -6066,7 +6167,7 @@ var Qt = () => {
6066
6167
  y2: "13"
6067
6168
  }), /* @__PURE__ */ l("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })]
6068
6169
  }), e[0] = t) : t = e[0], t;
6069
- }, $t = () => {
6170
+ }, ln = () => {
6070
6171
  let e = (0, g.c)(1), t;
6071
6172
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ u("svg", {
6072
6173
  width: "16",
@@ -6095,7 +6196,7 @@ var Qt = () => {
6095
6196
  ]
6096
6197
  }), e[0] = t) : t = e[0], t;
6097
6198
  };
6098
- function en(e) {
6199
+ function un(e) {
6099
6200
  let t = (0, g.c)(109), { onSend: n, onAttach: i, onTyping: a, placeholder: d, stickerPacks: f, tenorApiKey: p, defaultQuickMessages: m } = e, h = d === void 0 ? "Message…" : d, _ = y(), v = o(null), [b, x] = s(!1), [S, C] = s(!1), [w, T] = s(!1), [E, D] = s(!1), [O, k] = s(!1), [A, j] = s(!1), [M, N] = s(!1), [P, F] = s(0), [I, L] = s(null), R;
6100
6201
  t[0] === n ? R = t[1] : (R = () => {
6101
6202
  let e = v.current;
@@ -6188,7 +6289,7 @@ function en(e) {
6188
6289
  filename: e.title ?? "sticker"
6189
6290
  }), D(!1);
6190
6291
  }, t[15] = i, t[16] = $);
6191
- let ie = $, ae = cn, oe, se;
6292
+ let ie = $, ae = _n, oe, se;
6192
6293
  if (t[17] === Symbol.for("react.memo_cache_sentinel") ? (oe = () => {
6193
6294
  let e = (e) => {
6194
6295
  e.key === "Escape" && (x(!1), C(!1), D(!1), k(!1), L(null));
@@ -6207,14 +6308,14 @@ function en(e) {
6207
6308
  return t[23] === n ? a = t[24] : (a = /* @__PURE__ */ l("footer", {
6208
6309
  className: "flex-shrink-0 flex items-end gap-2 px-3 py-2.5 border-t border-border",
6209
6310
  style: e,
6210
- children: /* @__PURE__ */ l(Pt, {
6311
+ children: /* @__PURE__ */ l(Ut, {
6211
6312
  onSend: n,
6212
6313
  onCancel: r
6213
6314
  })
6214
6315
  }), t[23] = n, t[24] = a), a;
6215
6316
  }
6216
6317
  let ce;
6217
- t[25] === I ? ce = t[26] : (ce = I && /* @__PURE__ */ l(Yt, {
6318
+ t[25] === I ? ce = t[26] : (ce = I && /* @__PURE__ */ l(an, {
6218
6319
  onFormat: Y,
6219
6320
  position: I
6220
6321
  }), t[25] = I, t[26] = ce);
@@ -6260,8 +6361,8 @@ function en(e) {
6260
6361
  backgroundColor: "transparent",
6261
6362
  color: "var(--oc-muted-foreground)"
6262
6363
  },
6263
- onMouseEnter: sn,
6264
- onMouseLeave: on,
6364
+ onMouseEnter: gn,
6365
+ onMouseLeave: hn,
6265
6366
  children: n
6266
6367
  }, t);
6267
6368
  }), t[31] = pe) : pe = t[31];
@@ -6290,7 +6391,7 @@ function en(e) {
6290
6391
  let _e;
6291
6392
  t[37] !== _.attachmentIcon || t[38] !== _.showAttachMentButton || t[39] !== S ? (_e = _.showAttachMentButton && /* @__PURE__ */ l("button", {
6292
6393
  onClick: () => {
6293
- C(an), x(!1), D(!1), k(!1);
6394
+ C(mn), x(!1), D(!1), k(!1);
6294
6395
  },
6295
6396
  className: "w-9 h-9 flex items-center justify-center rounded-xl border-none bg-transparent cursor-pointer flex-shrink-0 mb-0.5",
6296
6397
  style: { color: S ? "var(--oc-primary)" : "var(--oc-composer-icon)" },
@@ -6330,7 +6431,7 @@ function en(e) {
6330
6431
  className: "relative flex-shrink-0 mb-0.5",
6331
6432
  children: [/* @__PURE__ */ l("button", {
6332
6433
  onMouseDown: (e) => {
6333
- e.preventDefault(), k(rn), x(!1), C(!1), D(!1);
6434
+ e.preventDefault(), k(pn), x(!1), C(!1), D(!1);
6334
6435
  },
6335
6436
  className: "w-9 h-9 flex items-center justify-center rounded-xl border-none bg-transparent cursor-pointer",
6336
6437
  style: { color: O ? "var(--oc-primary)" : "var(--oc-composer-icon)" },
@@ -6363,7 +6464,7 @@ function en(e) {
6363
6464
  })
6364
6465
  ]
6365
6466
  })
6366
- }), O && /* @__PURE__ */ l(Gt, {
6467
+ }), O && /* @__PURE__ */ l(en, {
6367
6468
  onSelect: re,
6368
6469
  onClose: () => k(!1),
6369
6470
  onManage: () => {
@@ -6412,7 +6513,7 @@ function en(e) {
6412
6513
  }), t[46] = _.useRichTextEditor, t[47] = U, t[48] = V, t[49] = n, t[50] = a, t[51] = h, t[52] = be) : be = t[52];
6413
6514
  let xe;
6414
6515
  t[53] === Symbol.for("react.memo_cache_sentinel") ? (xe = (e) => {
6415
- e.preventDefault(), x(nn), C(!1), D(!1);
6516
+ e.preventDefault(), x(fn), C(!1), D(!1);
6416
6517
  }, t[53] = xe) : xe = t[53];
6417
6518
  let Se = b ? "var(--oc-primary)" : "var(--oc-composer-placeholder)", Ce = b ? 1 : .65, we;
6418
6519
  t[54] !== Se || t[55] !== Ce ? (we = {
@@ -6466,7 +6567,7 @@ function en(e) {
6466
6567
  }), t[62] = be, t[63] = Ee, t[64] = De) : De = t[64];
6467
6568
  let Oe;
6468
6569
  t[65] === Symbol.for("react.memo_cache_sentinel") ? (Oe = () => {
6469
- D(tn), x(!1), C(!1);
6570
+ D(dn), x(!1), C(!1);
6470
6571
  }, t[65] = Oe) : Oe = t[65];
6471
6572
  let ke = E ? "var(--oc-primary)" : "var(--oc-composer-input-border)", Ae = E ? "var(--oc-primary)" : "var(--oc-composer-icon)", je;
6472
6573
  t[66] !== ke || t[67] !== Ae ? (je = {
@@ -6498,7 +6599,7 @@ function en(e) {
6498
6599
  color: "#fff"
6499
6600
  },
6500
6601
  "aria-label": "Send",
6501
- children: _.sendIcon ?? /* @__PURE__ */ l(Qt, {})
6602
+ children: _.sendIcon ?? /* @__PURE__ */ l(cn, {})
6502
6603
  }) : /* @__PURE__ */ l("button", {
6503
6604
  onClick: () => {
6504
6605
  T(!0), x(!1), C(!1), D(!1);
@@ -6509,7 +6610,7 @@ function en(e) {
6509
6610
  color: "var(--oc-composer-icon)"
6510
6611
  },
6511
6612
  "aria-label": "Record voice message",
6512
- children: _.recordIcon ?? /* @__PURE__ */ l($t, {})
6613
+ children: _.recordIcon ?? /* @__PURE__ */ l(ln, {})
6513
6614
  }), t[74] = _.recordIcon, t[75] = _.sendIcon, t[76] = z, t[77] = M, t[78] = Pe) : Pe = t[78];
6514
6615
  let Fe;
6515
6616
  t[79] !== _e || t[80] !== ve || t[81] !== De || t[82] !== Ne || t[83] !== Pe ? (Fe = /* @__PURE__ */ u("div", {
@@ -6525,7 +6626,7 @@ function en(e) {
6525
6626
  let Ie;
6526
6627
  t[85] !== te || t[86] !== b ? (Ie = b && /* @__PURE__ */ l("div", {
6527
6628
  className: "absolute bottom-full right-0 mb-2 z-50",
6528
- children: /* @__PURE__ */ l(bt, {
6629
+ children: /* @__PURE__ */ l(kt, {
6529
6630
  onSelect: (e) => {
6530
6631
  te(e), v.current?.focus();
6531
6632
  },
@@ -6535,7 +6636,7 @@ function en(e) {
6535
6636
  let Le;
6536
6637
  t[88] !== i || t[89] !== S ? (Le = S && /* @__PURE__ */ l("div", {
6537
6638
  className: "absolute bottom-full left-0 mb-2 z-50",
6538
- children: /* @__PURE__ */ l(kt, {
6639
+ children: /* @__PURE__ */ l(Rt, {
6539
6640
  onSelect: (e) => {
6540
6641
  C(!1), i?.(e);
6541
6642
  },
@@ -6545,7 +6646,7 @@ function en(e) {
6545
6646
  let Re;
6546
6647
  t[91] !== ie || t[92] !== E || t[93] !== f || t[94] !== p ? (Re = E && /* @__PURE__ */ l("div", {
6547
6648
  className: "absolute bottom-full right-0 mb-2 z-50",
6548
- children: /* @__PURE__ */ l(Bt, {
6649
+ children: /* @__PURE__ */ l(Yt, {
6549
6650
  onSelect: ie,
6550
6651
  onClose: () => D(!1),
6551
6652
  customPacks: f,
@@ -6565,7 +6666,7 @@ function en(e) {
6565
6666
  ]
6566
6667
  }), t[96] = ge, t[97] = Fe, t[98] = Ie, t[99] = Le, t[100] = Re, t[101] = ze) : ze = t[101];
6567
6668
  let Be;
6568
- t[102] !== m || t[103] !== A ? (Be = A && /* @__PURE__ */ l(Jt, {
6669
+ t[102] !== m || t[103] !== A ? (Be = A && /* @__PURE__ */ l(rn, {
6569
6670
  defaultMessages: m,
6570
6671
  onClose: () => j(!1)
6571
6672
  }), t[102] = m, t[103] = A, t[104] = Be) : Be = t[104];
@@ -6576,36 +6677,36 @@ function en(e) {
6576
6677
  Be
6577
6678
  ] }), t[105] = ce, t[106] = ze, t[107] = Be, t[108] = Ve) : Ve = t[108], Ve;
6578
6679
  }
6579
- function tn(e) {
6680
+ function dn(e) {
6580
6681
  return !e;
6581
6682
  }
6582
- function nn(e) {
6683
+ function fn(e) {
6583
6684
  return !e;
6584
6685
  }
6585
- function rn(e) {
6686
+ function pn(e) {
6586
6687
  return !e;
6587
6688
  }
6588
- function an(e) {
6689
+ function mn(e) {
6589
6690
  return !e;
6590
6691
  }
6591
- function on(e) {
6692
+ function hn(e) {
6592
6693
  e.currentTarget.style.backgroundColor = "transparent", e.currentTarget.style.opacity = "";
6593
6694
  }
6594
- function sn(e) {
6695
+ function gn(e) {
6595
6696
  e.currentTarget.style.backgroundColor = "var(--oc-secondary)", e.currentTarget.style.opacity = "1";
6596
6697
  }
6597
- function cn(e) {
6698
+ function _n(e) {
6598
6699
  e.preventDefault();
6599
6700
  let t = e.clipboardData.getData("text/plain");
6600
6701
  document.execCommand("insertText", !1, t);
6601
6702
  }
6602
6703
  //#endregion
6603
6704
  //#region src/components/chat/MessageInput.tsx
6604
- function ln(e) {
6705
+ function vn(e) {
6605
6706
  let t = (0, g.c)(10), { onSend: n, onTyping: r, placeholder: i, stickerPacks: a, tenorApiKey: o, defaultQuickMessages: s } = e, c;
6606
6707
  t[0] === n ? c = t[1] : (c = (e) => n("", e), t[0] = n, t[1] = c);
6607
6708
  let u;
6608
- return t[2] !== s || t[3] !== n || t[4] !== r || t[5] !== i || t[6] !== a || t[7] !== c || t[8] !== o ? (u = /* @__PURE__ */ l(en, {
6709
+ return t[2] !== s || t[3] !== n || t[4] !== r || t[5] !== i || t[6] !== a || t[7] !== c || t[8] !== o ? (u = /* @__PURE__ */ l(un, {
6609
6710
  onSend: n,
6610
6711
  onAttach: c,
6611
6712
  onTyping: r,
@@ -6617,7 +6718,7 @@ function ln(e) {
6617
6718
  }
6618
6719
  //#endregion
6619
6720
  //#region src/components/chat/ReplyComposer.tsx
6620
- function un(e) {
6721
+ function yn(e) {
6621
6722
  let t = (0, g.c)(8), { url: n, type: r } = e;
6622
6723
  if (r === "image" || r === "sticker") {
6623
6724
  let e;
@@ -6625,7 +6726,7 @@ function un(e) {
6625
6726
  src: n,
6626
6727
  alt: "",
6627
6728
  className: "w-10 h-10 rounded-lg object-cover flex-shrink-0",
6628
- onError: dn
6729
+ onError: bn
6629
6730
  }), t[0] = n, t[1] = e), e;
6630
6731
  }
6631
6732
  if (r === "video") {
@@ -6694,10 +6795,10 @@ function un(e) {
6694
6795
  })
6695
6796
  }), t[7] = a) : a = t[7], a;
6696
6797
  }
6697
- function dn(e) {
6798
+ function bn(e) {
6698
6799
  e.currentTarget.style.display = "none";
6699
6800
  }
6700
- function fn(e) {
6801
+ function xn(e) {
6701
6802
  let t = (0, g.c)(23), { senderName: n, content: r, onDismiss: i, attachmentUrl: a, attachmentType: o } = e, s = r.length > 60 ? r.slice(0, 60) + "…" : r, c;
6702
6803
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = { backgroundColor: "var(--oc-background, #0d1117)" }, t[0] = c) : c = t[0];
6703
6804
  let d;
@@ -6724,7 +6825,7 @@ function fn(e) {
6724
6825
  children: [p, _]
6725
6826
  }), t[8] = p, t[9] = _, t[10] = v) : v = t[10];
6726
6827
  let y;
6727
- t[11] !== o || t[12] !== a ? (y = a && /* @__PURE__ */ l(un, {
6828
+ t[11] !== o || t[12] !== a ? (y = a && /* @__PURE__ */ l(yn, {
6728
6829
  url: a,
6729
6830
  type: o
6730
6831
  }), t[11] = o, t[12] = a, t[13] = y) : y = t[13];
@@ -6756,7 +6857,7 @@ function fn(e) {
6756
6857
  }
6757
6858
  //#endregion
6758
6859
  //#region src/components/chat/BatchToolbar.tsx
6759
- function pn(e) {
6860
+ function Sn(e) {
6760
6861
  let t = (0, g.c)(26), { selectedCount: n, onDelete: r, onRecall: i, onForward: a, onCancel: o } = e, s;
6761
6862
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = { backgroundColor: "var(--oc-background, #0d1117)" }, t[0] = s) : s = t[0];
6762
6863
  let c;
@@ -6898,13 +6999,13 @@ function pn(e) {
6898
6999
  }
6899
7000
  //#endregion
6900
7001
  //#region src/components/chat/ConversationProfile.tsx
6901
- function mn(e, t) {
7002
+ function Cn(e, t) {
6902
7003
  return e.filter((e) => {
6903
7004
  let n = e.attachment;
6904
7005
  return n ? t === "images" ? n.type === "image" : t === "videos" ? n.type === "video" : t === "files" ? n.type === "file" : !1 : !1;
6905
7006
  }).map((e) => e.attachment);
6906
7007
  }
6907
- function hn(e) {
7008
+ function wn(e) {
6908
7009
  let t = /https?:\/\/[^\s]+/g, n = [];
6909
7010
  for (let r of e) {
6910
7011
  if (!r.content) continue;
@@ -6916,7 +7017,7 @@ function hn(e) {
6916
7017
  }
6917
7018
  return n;
6918
7019
  }
6919
- function gn(e) {
7020
+ function Tn(e) {
6920
7021
  let t = (0, g.c)(3), { title: n } = e, r;
6921
7022
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { color: "var(--oc-muted-foreground)" }, t[0] = r) : r = t[0];
6922
7023
  let i;
@@ -6929,7 +7030,7 @@ function gn(e) {
6929
7030
  })
6930
7031
  }), t[1] = n, t[2] = i), i;
6931
7032
  }
6932
- function _n(e) {
7033
+ function En(e) {
6933
7034
  let t = (0, g.c)(88), { name: n, avatarSrc: i, isOnline: a, otherUserId: o, messages: d, pinnedMessages: f, onClose: p, onUnpin: m } = e, [h, _] = s("images"), { socket: y } = A(), { apiClient: b } = v(), [x, S] = s("online"), C;
6934
7035
  t[0] === a ? C = t[1] : (C = () => a, t[0] = a, t[1] = C);
6935
7036
  let [w, T] = s(C), [E, D] = s("offline"), O, k;
@@ -6937,7 +7038,7 @@ function _n(e) {
6937
7038
  o && b.get(`/app-users/${o}/presence`).then((e) => {
6938
7039
  let t = e.status;
6939
7040
  D(t), T(t === "online");
6940
- }).catch(Cn);
7041
+ }).catch(Mn);
6941
7042
  }, k = [o, b], t[2] = b, t[3] = o, t[4] = O, t[5] = k) : (O = t[4], k = t[5]), r(O, k);
6942
7043
  let j;
6943
7044
  t[6] === o ? j = t[7] : (j = (e) => {
@@ -6953,7 +7054,7 @@ function _n(e) {
6953
7054
  }, t[8] = y, t[9] = M);
6954
7055
  let N = M, P, I, L, R, z, B, V, H, U, W, G, K, q, J;
6955
7056
  if (t[10] !== i || t[11] !== N || t[12] !== h || t[13] !== d || t[14] !== x || t[15] !== n || t[16] !== p || t[17] !== m || t[18] !== f || t[19] !== w || t[20] !== E) {
6956
- let e = mn(d, "images"), r = mn(d, "videos"), a = mn(d, "files"), o = hn(d), s = {
7057
+ let e = Cn(d, "images"), r = Cn(d, "videos"), a = Cn(d, "files"), o = wn(d), s = {
6957
7058
  images: e.length,
6958
7059
  videos: r.length,
6959
7060
  files: a.length,
@@ -7011,7 +7112,7 @@ function _n(e) {
7011
7112
  children: [b, S]
7012
7113
  }), t[40] = b, t[41] = W), G = "flex-1 overflow-y-auto";
7013
7114
  let C;
7014
- t[42] !== i || t[43] !== n || t[44] !== w ? (C = /* @__PURE__ */ l(ve, {
7115
+ t[42] !== i || t[43] !== n || t[44] !== w ? (C = /* @__PURE__ */ l(De, {
7015
7116
  src: i,
7016
7117
  name: n,
7017
7118
  size: 88,
@@ -7058,8 +7159,8 @@ function _n(e) {
7058
7159
  label: "Files",
7059
7160
  count: a.length
7060
7161
  }
7061
- ].map(Sn)
7062
- }), t[60] === Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ l(gn, { title: "My status" }), t[60] = J) : J = t[60];
7162
+ ].map(jn)
7163
+ }), t[60] === Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ l(Tn, { title: "My status" }), t[60] = J) : J = t[60];
7063
7164
  let M;
7064
7165
  t[61] === Symbol.for("react.memo_cache_sentinel") ? (M = [
7065
7166
  "online",
@@ -7087,7 +7188,7 @@ function _n(e) {
7087
7188
  }), e]
7088
7189
  }, e);
7089
7190
  })
7090
- }), t[62] = N, t[63] = x, t[64] = P) : P = t[64], t[65] !== m || t[66] !== f ? (I = f.length > 0 && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(gn, { title: `Pinned messages (${f.length})` }), /* @__PURE__ */ l("div", {
7191
+ }), t[62] = N, t[63] = x, t[64] = P) : P = t[64], t[65] !== m || t[66] !== f ? (I = f.length > 0 && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Tn, { title: `Pinned messages (${f.length})` }), /* @__PURE__ */ l("div", {
7091
7192
  className: "px-4 flex flex-col gap-2",
7092
7193
  children: f.map((e) => /* @__PURE__ */ u("div", {
7093
7194
  className: "flex items-start gap-3 rounded-xl px-3 py-2.5",
@@ -7122,7 +7223,7 @@ function _n(e) {
7122
7223
  })
7123
7224
  ]
7124
7225
  }, e.id))
7125
- })] }), t[65] = m, t[66] = f, t[67] = I) : I = t[67], t[68] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ l(gn, { title: "Shared media" }), t[68] = L) : L = t[68];
7226
+ })] }), t[65] = m, t[66] = f, t[67] = I) : I = t[67], t[68] === Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ l(Tn, { title: "Shared media" }), t[68] = L) : L = t[68];
7126
7227
  let F = g.map((e) => /* @__PURE__ */ u("button", {
7127
7228
  onClick: () => _(e.id),
7128
7229
  className: "h-8 px-3.5 rounded-2xl text-[13px] font-medium flex-shrink-0 border-none cursor-pointer",
@@ -7141,22 +7242,22 @@ function _n(e) {
7141
7242
  children: F
7142
7243
  }), t[69] = F, t[70] = R), z = h === "images" && /* @__PURE__ */ l("div", {
7143
7244
  className: "px-4 pb-6",
7144
- children: e.length === 0 ? /* @__PURE__ */ l(wn, { label: "No images shared yet" }) : /* @__PURE__ */ l("div", {
7245
+ children: e.length === 0 ? /* @__PURE__ */ l(Nn, { label: "No images shared yet" }) : /* @__PURE__ */ l("div", {
7145
7246
  className: "grid grid-cols-3 gap-1",
7146
- children: e.map(xn)
7247
+ children: e.map(An)
7147
7248
  })
7148
7249
  }), B = h === "videos" && /* @__PURE__ */ l("div", {
7149
7250
  className: "px-4 pb-6",
7150
- children: r.length === 0 ? /* @__PURE__ */ l(wn, { label: "No videos shared yet" }) : /* @__PURE__ */ l("div", {
7251
+ children: r.length === 0 ? /* @__PURE__ */ l(Nn, { label: "No videos shared yet" }) : /* @__PURE__ */ l("div", {
7151
7252
  className: "grid grid-cols-2 gap-2",
7152
- children: r.map(bn)
7253
+ children: r.map(kn)
7153
7254
  })
7154
7255
  }), V = h === "files" && /* @__PURE__ */ l("div", {
7155
7256
  className: "px-4 pb-6 flex flex-col gap-2",
7156
- children: a.length === 0 ? /* @__PURE__ */ l(wn, { label: "No files shared yet" }) : a.map(yn)
7257
+ children: a.length === 0 ? /* @__PURE__ */ l(Nn, { label: "No files shared yet" }) : a.map(On)
7157
7258
  }), H = h === "links" && /* @__PURE__ */ l("div", {
7158
7259
  className: "px-4 pb-6 flex flex-col gap-2",
7159
- children: o.length === 0 ? /* @__PURE__ */ l(wn, { label: "No links shared yet" }) : o.map(vn)
7260
+ children: o.length === 0 ? /* @__PURE__ */ l(Nn, { label: "No links shared yet" }) : o.map(Dn)
7160
7261
  }), t[10] = i, t[11] = N, t[12] = h, t[13] = d, t[14] = x, t[15] = n, t[16] = p, t[17] = m, t[18] = f, t[19] = w, t[20] = E, t[21] = P, t[22] = I, t[23] = L, t[24] = R, t[25] = z, t[26] = B, t[27] = V, t[28] = H, t[29] = U, t[30] = W, t[31] = G, t[32] = K, t[33] = q, t[34] = J;
7161
7262
  } else P = t[21], I = t[22], L = t[23], R = t[24], z = t[25], B = t[26], V = t[27], H = t[28], U = t[29], W = t[30], G = t[31], K = t[32], q = t[33], J = t[34];
7162
7263
  let Y;
@@ -7182,7 +7283,7 @@ function _n(e) {
7182
7283
  children: [W, Y]
7183
7284
  }), t[84] = U, t[85] = W, t[86] = Y, t[87] = X) : X = t[87], X;
7184
7285
  }
7185
- function vn(e, t) {
7286
+ function Dn(e, t) {
7186
7287
  return /* @__PURE__ */ u("a", {
7187
7288
  href: e.url,
7188
7289
  target: "_blank",
@@ -7213,7 +7314,7 @@ function vn(e, t) {
7213
7314
  })]
7214
7315
  }, t);
7215
7316
  }
7216
- function yn(e, t) {
7317
+ function On(e, t) {
7217
7318
  let n = e.name?.split(".").pop()?.toLowerCase() ?? "";
7218
7319
  return /* @__PURE__ */ u("a", {
7219
7320
  href: e.url,
@@ -7279,7 +7380,7 @@ function yn(e, t) {
7279
7380
  ]
7280
7381
  }, t);
7281
7382
  }
7282
- function bn(e, t) {
7383
+ function kn(e, t) {
7283
7384
  return /* @__PURE__ */ u("div", {
7284
7385
  className: "aspect-video rounded-lg overflow-hidden bg-secondary relative",
7285
7386
  children: [
@@ -7309,7 +7410,7 @@ function bn(e, t) {
7309
7410
  ]
7310
7411
  }, t);
7311
7412
  }
7312
- function xn(e, t) {
7413
+ function An(e, t) {
7313
7414
  return /* @__PURE__ */ l("div", {
7314
7415
  className: "aspect-square rounded-lg overflow-hidden bg-secondary",
7315
7416
  children: /* @__PURE__ */ l("img", {
@@ -7319,7 +7420,7 @@ function xn(e, t) {
7319
7420
  })
7320
7421
  }, t);
7321
7422
  }
7322
- function Sn(e) {
7423
+ function jn(e) {
7323
7424
  return /* @__PURE__ */ u("div", {
7324
7425
  className: "flex flex-col items-center py-3 gap-0.5",
7325
7426
  children: [/* @__PURE__ */ l("span", {
@@ -7332,8 +7433,8 @@ function Sn(e) {
7332
7433
  })]
7333
7434
  }, e.label);
7334
7435
  }
7335
- function Cn() {}
7336
- function wn(e) {
7436
+ function Mn() {}
7437
+ function Nn(e) {
7337
7438
  let t = (0, g.c)(3), { label: n } = e, r;
7338
7439
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (r = { color: "var(--oc-muted-foreground)" }, t[0] = r) : r = t[0];
7339
7440
  let i;
@@ -7345,7 +7446,7 @@ function wn(e) {
7345
7446
  }
7346
7447
  //#endregion
7347
7448
  //#region src/components/chat/ChatBox.tsx
7348
- function Tn(e) {
7449
+ function Pn(e) {
7349
7450
  if (!e) return "";
7350
7451
  let t = new Date(e), n = /* @__PURE__ */ new Date(), r = new Date(n.getFullYear(), n.getMonth(), n.getDate()), i = new Date(t.getFullYear(), t.getMonth(), t.getDate()), a = Math.round((r.getTime() - i.getTime()) / 864e5);
7351
7452
  return a === 0 ? "Today" : a === 1 ? "Yesterday" : a < 7 ? t.toLocaleDateString("en-US", { weekday: "long" }) : t.toLocaleDateString("en-US", {
@@ -7354,7 +7455,7 @@ function Tn(e) {
7354
7455
  year: a > 365 ? "numeric" : void 0
7355
7456
  });
7356
7457
  }
7357
- function En(e) {
7458
+ function Fn(e) {
7358
7459
  let t = e.updated_at ?? e.time;
7359
7460
  if (!t) return "";
7360
7461
  if (t.includes("T") || t.includes("-")) {
@@ -7364,7 +7465,7 @@ function En(e) {
7364
7465
  let n = /* @__PURE__ */ new Date();
7365
7466
  return `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}`;
7366
7467
  }
7367
- function Dn({ label: e }) {
7468
+ function In({ label: e }) {
7368
7469
  return /* @__PURE__ */ u("div", {
7369
7470
  className: "flex items-center gap-3 py-1 select-none",
7370
7471
  children: [
@@ -7387,7 +7488,7 @@ function Dn({ label: e }) {
7387
7488
  ]
7388
7489
  });
7389
7490
  }
7390
- function On({ pinnedMessages: e, onUnpin: t }) {
7491
+ function Ln({ pinnedMessages: e, onUnpin: t }) {
7391
7492
  let [n, r] = s(!1), i = n ? e : e.slice(0, 1);
7392
7493
  return /* @__PURE__ */ u("div", {
7393
7494
  className: "flex-shrink-0 border-b",
@@ -7446,7 +7547,7 @@ function On({ pinnedMessages: e, onUnpin: t }) {
7446
7547
  }, e.id))]
7447
7548
  });
7448
7549
  }
7449
- function kn({ onViewProfile: e, onClose: t }) {
7550
+ function Rn({ onViewProfile: e, onClose: t }) {
7450
7551
  let n = o(null);
7451
7552
  return r(() => {
7452
7553
  let e = (e) => {
@@ -7493,7 +7594,7 @@ function kn({ onViewProfile: e, onClose: t }) {
7493
7594
  })
7494
7595
  });
7495
7596
  }
7496
- function An({ conversationName: e, avatarSrc: t, isOnline: n, presenceStatus: i, renderHeader: a, chatBanner: d, messages: f, typingUsers: p, onBack: m, onCall: h, onVideoCall: g, onSend: _, onTyping: v, onCallBack: b, replyingTo: x, onDismissReply: S, onReplyMessage: C, batchMode: w, batchSelectedCount: T = 0, batchSelectedIds: E, onToggleBatchSelect: D, onBatchDelete: O, onBatchRecall: k, onBatchForward: A, onBatchCancel: j, searchActive: M, searchQuery: N = "", onSearchToggle: P, onSearchChange: F, searchResultIds: I, searchCurrentIndex: L = 0, onSearchNext: R, onSearchPrev: z, onForwardMessage: B, onRecallMessage: V, onDeleteMessage: H, onInfoMessage: U, onEditMessage: W, onReactMessage: G, onPinMessage: K, pinnedMessages: q, isGroup: J, otherUserId: Y, stickerPacks: X, tenorApiKey: Z, defaultQuickMessages: ee, onMediaOpen: Q, imageSet: te }) {
7597
+ function zn({ conversationName: e, avatarSrc: t, isOnline: n, presenceStatus: i, renderHeader: a, chatBanner: d, messages: f, typingUsers: p, onBack: m, onCall: h, onVideoCall: g, onSend: _, onTyping: v, onCallBack: b, replyingTo: x, onDismissReply: S, onReplyMessage: C, batchMode: w, batchSelectedCount: T = 0, batchSelectedIds: E, onToggleBatchSelect: D, onBatchDelete: O, onBatchRecall: k, onBatchForward: A, onBatchCancel: j, searchActive: M, searchQuery: N = "", onSearchToggle: P, onSearchChange: F, searchResultIds: I, searchCurrentIndex: L = 0, onSearchNext: R, onSearchPrev: z, onForwardMessage: B, onRecallMessage: V, onDeleteMessage: H, onInfoMessage: U, onEditMessage: W, onReactMessage: G, onPinMessage: K, pinnedMessages: q, isGroup: J, otherUserId: Y, stickerPacks: X, tenorApiKey: Z, defaultQuickMessages: ee, onMediaOpen: Q, imageSet: te }) {
7497
7598
  let ne = y(), re = o(null), $ = o(null), ie = o(null), ae = o(/* @__PURE__ */ new Map()), [oe, se] = s(!1), [ce, le] = s(0), [ue, de] = s(null), [fe, pe] = s(!1), [me, he] = s(!1), ge = o(null), _e = o(!0), ve = o(f.length);
7498
7599
  function ye(e) {
7499
7600
  let t = ae.current.get(e);
@@ -7533,17 +7634,17 @@ function An({ conversationName: e, avatarSrc: t, isOnline: n, presenceStatus: i,
7533
7634
  }, [L, I]);
7534
7635
  let Se = [], Ce = "";
7535
7636
  return f.forEach((e, t) => {
7536
- let n = En(e);
7637
+ let n = Fn(e);
7537
7638
  if (n && n !== Ce) {
7538
7639
  Ce = n;
7539
- let t = Tn(e.updated_at ?? "");
7540
- t && Se.push(/* @__PURE__ */ l(Dn, { label: t }, `date-${n}`));
7640
+ let t = Pn(e.updated_at ?? "");
7641
+ t && Se.push(/* @__PURE__ */ l(In, { label: t }, `date-${n}`));
7541
7642
  }
7542
7643
  Se.push(/* @__PURE__ */ l("div", {
7543
7644
  ref: (t) => {
7544
7645
  t ? ae.current.set(e.id, t) : ae.current.delete(e.id);
7545
7646
  },
7546
- children: /* @__PURE__ */ l(ft, {
7647
+ children: /* @__PURE__ */ l(xt, {
7547
7648
  ...e,
7548
7649
  onCallBack: b,
7549
7650
  isGrouped: t < f.length - 1 && f[t + 1]?.sender === e.sender,
@@ -7718,7 +7819,7 @@ function An({ conversationName: e, avatarSrc: t, isOnline: n, presenceStatus: i,
7718
7819
  })
7719
7820
  ]
7720
7821
  })
7721
- }), me && /* @__PURE__ */ l(kn, {
7822
+ }), me && /* @__PURE__ */ l(Rn, {
7722
7823
  onViewProfile: () => {
7723
7824
  he(!1), pe(!0);
7724
7825
  },
@@ -7826,7 +7927,7 @@ function An({ conversationName: e, avatarSrc: t, isOnline: n, presenceStatus: i,
7826
7927
  })
7827
7928
  ]
7828
7929
  }),
7829
- q && q.length > 0 && /* @__PURE__ */ l(On, {
7930
+ q && q.length > 0 && /* @__PURE__ */ l(Ln, {
7830
7931
  pinnedMessages: q,
7831
7932
  onUnpin: K ? (e) => K(e, !0) : void 0
7832
7933
  }),
@@ -7899,27 +8000,27 @@ function An({ conversationName: e, avatarSrc: t, isOnline: n, presenceStatus: i,
7899
8000
  })]
7900
8001
  })
7901
8002
  }),
7902
- x && /* @__PURE__ */ l(fn, {
8003
+ x && /* @__PURE__ */ l(xn, {
7903
8004
  senderName: x.senderName,
7904
8005
  content: x.content,
7905
8006
  attachmentUrl: x.attachmentUrl,
7906
8007
  attachmentType: x.attachmentType,
7907
8008
  onDismiss: S ?? (() => {})
7908
8009
  }),
7909
- w ? /* @__PURE__ */ l(pn, {
8010
+ w ? /* @__PURE__ */ l(Sn, {
7910
8011
  selectedCount: T,
7911
8012
  onDelete: O ?? (() => {}),
7912
8013
  onRecall: k ?? (() => {}),
7913
8014
  onForward: A ?? (() => {}),
7914
8015
  onCancel: j ?? (() => {})
7915
- }) : /* @__PURE__ */ l(ln, {
8016
+ }) : /* @__PURE__ */ l(vn, {
7916
8017
  onSend: _,
7917
8018
  onTyping: v,
7918
8019
  stickerPacks: X,
7919
8020
  tenorApiKey: Z,
7920
8021
  defaultQuickMessages: ee
7921
8022
  }),
7922
- fe && /* @__PURE__ */ l(_n, {
8023
+ fe && /* @__PURE__ */ l(En, {
7923
8024
  name: e,
7924
8025
  avatarSrc: t,
7925
8026
  isOnline: n,
@@ -7935,7 +8036,7 @@ function An({ conversationName: e, avatarSrc: t, isOnline: n, presenceStatus: i,
7935
8036
  }
7936
8037
  //#endregion
7937
8038
  //#region src/components/call/CallHistory.tsx
7938
- var jn = {
8039
+ var Bn = {
7939
8040
  missed: {
7940
8041
  path: "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 3.88 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 9.91M23 1 1 23",
7941
8042
  color: "#ef4444",
@@ -7952,8 +8053,8 @@ var jn = {
7952
8053
  label: "Outgoing"
7953
8054
  }
7954
8055
  };
7955
- function Mn(e) {
7956
- let t = (0, g.c)(44), { records: n, onCall: r, activeTab: i, onTabChange: a } = e, o = i === void 0 ? "calls" : i, [d, f] = s("All"), [p, m] = s(""), h = Ce(), _, v, y, b, x, S;
8056
+ function Vn(e) {
8057
+ let t = (0, g.c)(44), { records: n, onCall: r, activeTab: i, onTabChange: a } = e, o = i === void 0 ? "calls" : i, [d, f] = s("All"), [p, m] = s(""), h = Me(), _, v, y, b, x, S;
7957
8058
  if (t[0] !== h || t[1] !== d || t[2] !== r || t[3] !== n || t[4] !== p) {
7958
8059
  let e;
7959
8060
  t[11] !== d || t[12] !== p ? (e = (e) => p && !e.name.toLowerCase().includes(p.toLowerCase()) ? !1 : d === "Missed" ? e.direction === "missed" : !0, t[11] = d, t[12] = p, t[13] = e) : e = t[13];
@@ -8062,7 +8163,7 @@ function Mn(e) {
8062
8163
  }), t[27] = d, t[28] = S), _ = "flex-1 overflow-y-auto";
8063
8164
  let E;
8064
8165
  t[29] === r ? E = t[30] : (E = (e) => {
8065
- let t = jn[e.direction];
8166
+ let t = Bn[e.direction];
8066
8167
  return /* @__PURE__ */ u("div", {
8067
8168
  className: "h-[72px] flex items-center gap-3 px-4 border-b",
8068
8169
  style: { borderBottomColor: "rgba(48,54,61,0.6)" },
@@ -8105,7 +8206,7 @@ function Mn(e) {
8105
8206
  style: { borderColor: "var(--oc-background)" },
8106
8207
  alt: ""
8107
8208
  })
8108
- ] }) : /* @__PURE__ */ l(ve, {
8209
+ ] }) : /* @__PURE__ */ l(De, {
8109
8210
  src: e.avatarSrc,
8110
8211
  name: e.name,
8111
8212
  size: 52
@@ -8170,8 +8271,8 @@ function Mn(e) {
8170
8271
  className: _,
8171
8272
  children: v
8172
8273
  }), t[31] = _, t[32] = v, t[33] = C) : C = t[33];
8173
- let w = a ?? Nn, T;
8174
- t[34] !== o || t[35] !== w ? (T = /* @__PURE__ */ l(xe, {
8274
+ let w = a ?? Hn, T;
8275
+ t[34] !== o || t[35] !== w ? (T = /* @__PURE__ */ l(Ae, {
8175
8276
  active: o,
8176
8277
  onChange: w
8177
8278
  }), t[34] = o, t[35] = w, t[36] = T) : T = t[36];
@@ -8187,10 +8288,10 @@ function Mn(e) {
8187
8288
  ]
8188
8289
  }), t[37] = T, t[38] = y, t[39] = b, t[40] = x, t[41] = S, t[42] = C, t[43] = E) : E = t[43], E;
8189
8290
  }
8190
- function Nn() {}
8291
+ function Hn() {}
8191
8292
  //#endregion
8192
8293
  //#region src/components/chat/ConversationPicker.tsx
8193
- function Pn(e) {
8294
+ function Un(e) {
8194
8295
  let t = (0, g.c)(69), { conversations: n, onConfirm: i, onClose: a } = e, [c, d] = s(""), f;
8195
8296
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ new Set(), t[0] = f) : f = t[0];
8196
8297
  let [p, m] = s(f), h = o(null), _, v;
@@ -8221,7 +8322,7 @@ function Pn(e) {
8221
8322
  }, t[23] = i, t[24] = p, t[25] = _) : _ = t[25], y = _;
8222
8323
  let v;
8223
8324
  t[26] === Symbol.for("react.memo_cache_sentinel") ? (v = function(e) {
8224
- return e.split(" ").slice(0, 2).map(Fn).join("");
8325
+ return e.split(" ").slice(0, 2).map(Wn).join("");
8225
8326
  }, t[26] = v) : v = t[26];
8226
8327
  let O = v;
8227
8328
  D = h, b = g;
@@ -8508,12 +8609,12 @@ function Pn(e) {
8508
8609
  children: R
8509
8610
  }), t[64] = b, t[65] = x, t[66] = R, t[67] = D, t[68] = z) : z = t[68], z;
8510
8611
  }
8511
- function Fn(e) {
8612
+ function Wn(e) {
8512
8613
  return e[0]?.toUpperCase() ?? "";
8513
8614
  }
8514
8615
  //#endregion
8515
8616
  //#region src/components/chat/MessageInfoSheet.tsx
8516
- function In(e) {
8617
+ function Gn(e) {
8517
8618
  return e ? new Date(e).toLocaleString("en-US", {
8518
8619
  month: "short",
8519
8620
  day: "numeric",
@@ -8522,7 +8623,7 @@ function In(e) {
8522
8623
  hour12: !0
8523
8624
  }) : "—";
8524
8625
  }
8525
- function Ln({ status: e }) {
8626
+ function Kn({ status: e }) {
8526
8627
  return e === "sent" ? /* @__PURE__ */ l("span", {
8527
8628
  className: "text-sm font-bold",
8528
8629
  style: { color: "var(--oc-muted-foreground, #888)" },
@@ -8533,7 +8634,7 @@ function Ln({ status: e }) {
8533
8634
  children: "✓✓"
8534
8635
  });
8535
8636
  }
8536
- function Rn({ messageId: e, apiBaseUrl: t, authToken: n, onClose: i }) {
8637
+ function qn({ messageId: e, apiBaseUrl: t, authToken: n, onClose: i }) {
8537
8638
  let [a, c] = s([]), [d, f] = s(!0), { apiClient: p } = v(), [m, h] = s(null), g = o(null);
8538
8639
  r(() => {
8539
8640
  let t = !1;
@@ -8627,7 +8728,7 @@ function Rn({ messageId: e, apiBaseUrl: t, authToken: n, onClose: i }) {
8627
8728
  className: "flex items-center gap-3 px-4 py-3",
8628
8729
  children: [/* @__PURE__ */ l("div", {
8629
8730
  className: "flex-shrink-0 w-8 flex justify-center",
8630
- children: /* @__PURE__ */ l(Ln, { status: e.status })
8731
+ children: /* @__PURE__ */ l(Kn, { status: e.status })
8631
8732
  }), /* @__PURE__ */ u("div", {
8632
8733
  className: "flex-1 min-w-0",
8633
8734
  children: [/* @__PURE__ */ l("p", {
@@ -8637,7 +8738,7 @@ function Rn({ messageId: e, apiBaseUrl: t, authToken: n, onClose: i }) {
8637
8738
  }), /* @__PURE__ */ u("div", {
8638
8739
  className: "flex gap-3 mt-0.5 text-xs",
8639
8740
  style: { color: "var(--oc-muted-foreground, #888)" },
8640
- children: [/* @__PURE__ */ u("span", { children: ["Delivered: ", In(e.delivered_at)] }), /* @__PURE__ */ u("span", { children: ["Read: ", In(e.read_at)] })]
8741
+ children: [/* @__PURE__ */ u("span", { children: ["Delivered: ", Gn(e.delivered_at)] }), /* @__PURE__ */ u("span", { children: ["Read: ", Gn(e.read_at)] })]
8641
8742
  })]
8642
8743
  })]
8643
8744
  }, e.app_user_id))
@@ -8650,11 +8751,11 @@ function Rn({ messageId: e, apiBaseUrl: t, authToken: n, onClose: i }) {
8650
8751
  }
8651
8752
  //#endregion
8652
8753
  //#region src/components/chat/mediaViewerRegistry.ts
8653
- var zn = {}, Bn = .5, Vn = 5, Hn = .5, Un = .25;
8654
- function Wn(e) {
8655
- return Math.min(Vn, Math.max(Bn, e));
8754
+ var Jn = {}, Yn = .5, Xn = 5, Zn = .5, Qn = .25;
8755
+ function $n(e) {
8756
+ return Math.min(Xn, Math.max(Yn, e));
8656
8757
  }
8657
- var Gn = {
8758
+ var er = {
8658
8759
  background: "rgba(255,255,255,0.15)",
8659
8760
  border: "none",
8660
8761
  borderRadius: 6,
@@ -8664,12 +8765,12 @@ var Gn = {
8664
8765
  lineHeight: 1,
8665
8766
  padding: "8px 12px",
8666
8767
  backdropFilter: "blur(4px)"
8667
- }, Kn = {
8668
- ...Gn,
8768
+ }, tr = {
8769
+ ...er,
8669
8770
  opacity: .3,
8670
8771
  cursor: "not-allowed"
8671
8772
  };
8672
- function qn(e) {
8773
+ function nr(e) {
8673
8774
  let t = (0, g.c)(81), { attachment: n, imageSet: i, onClose: a } = e, c;
8674
8775
  if (t[0] !== n || t[1] !== i) {
8675
8776
  let e;
@@ -8715,9 +8816,9 @@ function qn(e) {
8715
8816
  });
8716
8817
  break bb12;
8717
8818
  case "+":
8718
- m(Zn);
8819
+ m(or);
8719
8820
  break bb12;
8720
- case "-": m(Xn);
8821
+ case "-": m(ar);
8721
8822
  }
8722
8823
  }, t[8] = i.length, t[9] = a, t[10] = N) : N = t[10];
8723
8824
  let P = N, F, I;
@@ -8732,8 +8833,8 @@ function qn(e) {
8732
8833
  let R = L, z;
8733
8834
  t[15] === Symbol.for("react.memo_cache_sentinel") ? (z = (e) => {
8734
8835
  e.preventDefault();
8735
- let t = e.deltaY > 0 ? -Un : Un;
8736
- m((e) => Wn(e + t));
8836
+ let t = e.deltaY > 0 ? -Qn : Qn;
8837
+ m((e) => $n(e + t));
8737
8838
  }, t[15] = z) : z = t[15];
8738
8839
  let B = z, V;
8739
8840
  t[16] !== _ || t[17] !== p ? (V = (e) => {
@@ -8769,7 +8870,7 @@ function qn(e) {
8769
8870
  t[25] === p ? Y = t[26] : (Y = (e) => {
8770
8871
  if (e.touches.length === 2 && A.current !== null) {
8771
8872
  let t = e.touches[0].clientX - e.touches[1].clientX, n = e.touches[0].clientY - e.touches[1].clientY, r = Math.hypot(t, n);
8772
- m(Wn(j.current * (r / A.current)));
8873
+ m($n(j.current * (r / A.current)));
8773
8874
  } else if (e.touches.length === 1 && T.current) {
8774
8875
  let t = (e.touches[0].clientX - D.current.x) / p, n = (e.touches[0].clientY - D.current.y) / p;
8775
8876
  v({
@@ -8790,7 +8891,7 @@ function qn(e) {
8790
8891
  }, t[28] = te) : te = t[28];
8791
8892
  let ne;
8792
8893
  t[29] === Symbol.for("react.memo_cache_sentinel") ? (ne = {
8793
- ...Gn,
8894
+ ...er,
8794
8895
  position: "absolute",
8795
8896
  top: 16,
8796
8897
  right: 16,
@@ -8891,14 +8992,14 @@ function qn(e) {
8891
8992
  "aria-label": "Previous image",
8892
8993
  disabled: d === 0,
8893
8994
  onClick: () => R(Math.max(0, d - 1)),
8894
- style: d === 0 ? Kn : Gn,
8995
+ style: d === 0 ? tr : er,
8895
8996
  children: "‹"
8896
8997
  }), t[59] = d, t[60] = Q, t[61] = _e) : _e = t[61];
8897
8998
  let ve, ye;
8898
8999
  t[62] === Symbol.for("react.memo_cache_sentinel") ? (ve = /* @__PURE__ */ l("button", {
8899
9000
  "aria-label": "Zoom out",
8900
- onClick: () => m(Yn),
8901
- style: Gn,
9001
+ onClick: () => m(ir),
9002
+ style: er,
8902
9003
  children: "−"
8903
9004
  }), ye = {
8904
9005
  color: "#fff",
@@ -8916,8 +9017,8 @@ function qn(e) {
8916
9017
  let Se;
8917
9018
  t[68] === Symbol.for("react.memo_cache_sentinel") ? (Se = /* @__PURE__ */ l("button", {
8918
9019
  "aria-label": "Zoom in",
8919
- onClick: () => m(Jn),
8920
- style: Gn,
9020
+ onClick: () => m(rr),
9021
+ style: er,
8921
9022
  children: "+"
8922
9023
  }), t[68] = Se) : Se = t[68];
8923
9024
  let Ce;
@@ -8925,7 +9026,7 @@ function qn(e) {
8925
9026
  "aria-label": "Next image",
8926
9027
  disabled: d === i.length - 1,
8927
9028
  onClick: () => R(Math.min(i.length - 1, d + 1)),
8928
- style: d === i.length - 1 ? Kn : Gn,
9029
+ style: d === i.length - 1 ? tr : er,
8929
9030
  children: "›"
8930
9031
  }), t[69] = d, t[70] = i.length, t[71] = Q, t[72] = Ce) : Ce = t[72];
8931
9032
  let we;
@@ -8949,22 +9050,22 @@ function qn(e) {
8949
9050
  ]
8950
9051
  }), t[77] = re, t[78] = he, t[79] = we, t[80] = Te) : Te = t[80], Te;
8951
9052
  }
8952
- function Jn(e) {
8953
- return Wn(e + Hn);
9053
+ function rr(e) {
9054
+ return $n(e + Zn);
8954
9055
  }
8955
- function Yn(e) {
8956
- return Wn(e - Hn);
9056
+ function ir(e) {
9057
+ return $n(e - Zn);
8957
9058
  }
8958
- function Xn(e) {
8959
- return Wn(e - Hn);
9059
+ function ar(e) {
9060
+ return $n(e - Zn);
8960
9061
  }
8961
- function Zn(e) {
8962
- return Wn(e + Hn);
9062
+ function or(e) {
9063
+ return $n(e + Zn);
8963
9064
  }
8964
- zn.ImageViewer = qn;
9065
+ Jn.ImageViewer = nr;
8965
9066
  //#endregion
8966
9067
  //#region src/components/chat/VideoViewer.tsx
8967
- var Qn = {
9068
+ var sr = {
8968
9069
  background: "rgba(255,255,255,0.15)",
8969
9070
  border: "none",
8970
9071
  borderRadius: 6,
@@ -8975,7 +9076,7 @@ var Qn = {
8975
9076
  padding: "8px 12px",
8976
9077
  backdropFilter: "blur(4px)"
8977
9078
  };
8978
- function $n(e) {
9079
+ function cr(e) {
8979
9080
  let t = (0, g.c)(16), { attachment: n, onClose: i } = e, a = o(null), s;
8980
9081
  t[0] === i ? s = t[1] : (s = () => {
8981
9082
  a.current && a.current.pause(), i();
@@ -8995,7 +9096,7 @@ function $n(e) {
8995
9096
  }, t[5] = p) : p = t[5];
8996
9097
  let m;
8997
9098
  t[6] === Symbol.for("react.memo_cache_sentinel") ? (m = {
8998
- ...Qn,
9099
+ ...sr,
8999
9100
  position: "absolute",
9000
9101
  top: 16,
9001
9102
  right: 16,
@@ -9038,26 +9139,26 @@ function $n(e) {
9038
9139
  children: [h, y]
9039
9140
  }), t[13] = h, t[14] = y, t[15] = b) : b = t[15], b;
9040
9141
  }
9041
- zn.VideoViewer = $n;
9142
+ Jn.VideoViewer = cr;
9042
9143
  //#endregion
9043
9144
  //#region src/components/chat/DocumentViewer.tsx
9044
- var er = "oc-doc-viewer-styles";
9045
- function tr() {
9046
- if (typeof document > "u" || document.getElementById(er)) return;
9145
+ var lr = "oc-doc-viewer-styles";
9146
+ function ur() {
9147
+ if (typeof document > "u" || document.getElementById(lr)) return;
9047
9148
  let e = document.createElement("style");
9048
- e.id = er, e.textContent = "@keyframes oc-spin { to { transform: rotate(360deg); } }", document.head.appendChild(e);
9149
+ e.id = lr, e.textContent = "@keyframes oc-spin { to { transform: rotate(360deg); } }", document.head.appendChild(e);
9049
9150
  }
9050
- function nr(e) {
9151
+ function dr(e) {
9051
9152
  if (!e) return "";
9052
9153
  let t = e.lastIndexOf(".");
9053
9154
  return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
9054
9155
  }
9055
- function rr(e) {
9156
+ function fr(e) {
9056
9157
  if (!e) return "";
9057
9158
  let t = Number(e);
9058
9159
  return Number.isNaN(t) ? e : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
9059
9160
  }
9060
- var ir = {
9161
+ var pr = {
9061
9162
  background: "rgba(255,255,255,0.15)",
9062
9163
  border: "none",
9063
9164
  borderRadius: 6,
@@ -9066,7 +9167,7 @@ var ir = {
9066
9167
  fontSize: 14,
9067
9168
  padding: "8px 16px",
9068
9169
  backdropFilter: "blur(4px)"
9069
- }, ar = {
9170
+ }, mr = {
9070
9171
  display: "inline-block",
9071
9172
  background: "rgba(255,255,255,0.15)",
9072
9173
  border: "none",
@@ -9077,7 +9178,7 @@ var ir = {
9077
9178
  padding: "8px 16px",
9078
9179
  textDecoration: "none",
9079
9180
  backdropFilter: "blur(4px)"
9080
- }, or = {
9181
+ }, hr = {
9081
9182
  display: "inline-block",
9082
9183
  background: "#4a90e2",
9083
9184
  border: "none",
@@ -9088,7 +9189,7 @@ var ir = {
9088
9189
  fontWeight: 600,
9089
9190
  padding: "12px 28px",
9090
9191
  textDecoration: "none"
9091
- }, sr = {
9192
+ }, gr = {
9092
9193
  width: 36,
9093
9194
  height: 36,
9094
9195
  border: "3px solid rgba(255,255,255,0.2)",
@@ -9096,7 +9197,7 @@ var ir = {
9096
9197
  borderRadius: "50%",
9097
9198
  animation: "oc-spin 0.8s linear infinite"
9098
9199
  };
9099
- function cr(e) {
9200
+ function _r(e) {
9100
9201
  let t = e.split("\n"), n = [], r = [], i = [], a = 0, o = () => {
9101
9202
  r.length > 0 && (n.push(/* @__PURE__ */ l("ul", {
9102
9203
  style: {
@@ -9105,7 +9206,7 @@ function cr(e) {
9105
9206
  },
9106
9207
  children: r.map((e, t) => /* @__PURE__ */ l("li", {
9107
9208
  style: { marginBottom: 4 },
9108
- children: lr(e)
9209
+ children: vr(e)
9109
9210
  }, t))
9110
9211
  }, a++)), r = []), i.length > 0 && (n.push(/* @__PURE__ */ l("ol", {
9111
9212
  style: {
@@ -9114,7 +9215,7 @@ function cr(e) {
9114
9215
  },
9115
9216
  children: i.map((e, t) => /* @__PURE__ */ l("li", {
9116
9217
  style: { marginBottom: 4 },
9117
- children: lr(e)
9218
+ children: vr(e)
9118
9219
  }, t))
9119
9220
  }, a++)), i = []);
9120
9221
  };
@@ -9136,7 +9237,7 @@ function cr(e) {
9136
9237
  fontWeight: 700,
9137
9238
  margin: "12px 0 6px"
9138
9239
  },
9139
- children: lr(t[2])
9240
+ children: vr(t[2])
9140
9241
  }, a++));
9141
9242
  continue;
9142
9243
  }
@@ -9156,12 +9257,12 @@ function cr(e) {
9156
9257
  }
9157
9258
  n.push(/* @__PURE__ */ l("div", {
9158
9259
  style: { margin: "4px 0" },
9159
- children: lr(e)
9260
+ children: vr(e)
9160
9261
  }, a++));
9161
9262
  }
9162
9263
  return o(), n;
9163
9264
  }
9164
- function lr(e) {
9265
+ function vr(e) {
9165
9266
  let t = [], n = e, r = 0;
9166
9267
  for (; n.length > 0;) {
9167
9268
  let e = n.match(/^(.*?)\*\*(.+?)\*\*(.*)$/), i = n.match(/^(.*?)\*(.+?)\*(.*)$/), a = n.match(/^(.*?)`(.+?)`(.*)$/), o = n.match(/^(.*?)\[(.+?)\]\((.+?)\)(.*)$/), s = [];
@@ -9205,7 +9306,7 @@ function lr(e) {
9205
9306
  }
9206
9307
  return t.length === 1 ? t[0] : /* @__PURE__ */ l(c, { children: t });
9207
9308
  }
9208
- function ur(e) {
9309
+ function yr(e) {
9209
9310
  let t = e.trim().split("\n").map((e) => e.split(",").map((e) => e.trim()));
9210
9311
  if (t.length === 0) return /* @__PURE__ */ l("div", {
9211
9312
  style: { color: "#fff" },
@@ -9246,7 +9347,7 @@ function ur(e) {
9246
9347
  })
9247
9348
  });
9248
9349
  }
9249
- function dr(e) {
9350
+ function br(e) {
9250
9351
  let t = (0, g.c)(21), { url: n, name: r } = e, [i, a] = s(!0), o, c;
9251
9352
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = {
9252
9353
  display: "flex",
@@ -9265,7 +9366,7 @@ function dr(e) {
9265
9366
  children: /* @__PURE__ */ l("a", {
9266
9367
  href: n,
9267
9368
  download: r,
9268
- style: ar,
9369
+ style: mr,
9269
9370
  children: "⬇ Download"
9270
9371
  })
9271
9372
  }), t[2] = r, t[3] = n, t[4] = d) : d = t[4];
@@ -9283,7 +9384,7 @@ function dr(e) {
9283
9384
  alignItems: "center",
9284
9385
  justifyContent: "center"
9285
9386
  },
9286
- children: /* @__PURE__ */ l("div", { style: sr })
9387
+ children: /* @__PURE__ */ l("div", { style: gr })
9287
9388
  }), t[6] = i, t[7] = p);
9288
9389
  let m = i ? "none" : "block", h;
9289
9390
  t[8] === m ? h = t[9] : (h = {
@@ -9312,13 +9413,13 @@ function dr(e) {
9312
9413
  children: [d, y]
9313
9414
  }), t[18] = y, t[19] = d, t[20] = b) : b = t[20], b;
9314
9415
  }
9315
- function fr(e) {
9416
+ function xr(e) {
9316
9417
  let t = (0, g.c)(37), { url: n, name: i, ext: a } = e, o;
9317
9418
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = { status: "loading" }, t[0] = o) : o = t[0];
9318
9419
  let [c, d] = s(o), f, p;
9319
9420
  t[1] === n ? (f = t[2], p = t[3]) : (f = () => {
9320
9421
  let e = !1;
9321
- return fetch(n).then(pr).then((t) => {
9422
+ return fetch(n).then(Sr).then((t) => {
9322
9423
  e || d({
9323
9424
  status: "success",
9324
9425
  content: t
@@ -9347,7 +9448,7 @@ function fr(e) {
9347
9448
  children: /* @__PURE__ */ l("a", {
9348
9449
  href: n,
9349
9450
  download: i,
9350
- style: ar,
9451
+ style: mr,
9351
9452
  children: "⬇ Download"
9352
9453
  })
9353
9454
  }), t[6] = i, t[7] = n, t[8] = _) : _ = t[8];
@@ -9365,7 +9466,7 @@ function fr(e) {
9365
9466
  justifyContent: "center",
9366
9467
  height: "100%"
9367
9468
  },
9368
- children: /* @__PURE__ */ l("div", { style: sr })
9469
+ children: /* @__PURE__ */ l("div", { style: gr })
9369
9470
  }), t[10] = c.status, t[11] = y);
9370
9471
  let b;
9371
9472
  t[12] !== i || t[13] !== c.status || t[14] !== n ? (b = c.status === "error" && /* @__PURE__ */ u("div", {
@@ -9386,7 +9487,7 @@ function fr(e) {
9386
9487
  }), /* @__PURE__ */ l("a", {
9387
9488
  href: n,
9388
9489
  download: i,
9389
- style: or,
9490
+ style: hr,
9390
9491
  children: "⬇ Download"
9391
9492
  })]
9392
9493
  }), t[12] = i, t[13] = c.status, t[14] = n, t[15] = b) : b = t[15];
@@ -9409,10 +9510,10 @@ function fr(e) {
9409
9510
  fontSize: 14,
9410
9511
  lineHeight: 1.6
9411
9512
  },
9412
- children: cr(c.content)
9513
+ children: _r(c.content)
9413
9514
  }), t[20] = a, t[21] = c.content, t[22] = c.status, t[23] = S) : S = t[23];
9414
9515
  let C;
9415
- t[24] !== a || t[25] !== c.content || t[26] !== c.status ? (C = c.status === "success" && a === "csv" && ur(c.content), t[24] = a, t[25] = c.content, t[26] = c.status, t[27] = C) : C = t[27];
9516
+ t[24] !== a || t[25] !== c.content || t[26] !== c.status ? (C = c.status === "success" && a === "csv" && yr(c.content), t[24] = a, t[25] = c.content, t[26] = c.status, t[27] = C) : C = t[27];
9416
9517
  let w;
9417
9518
  t[28] !== x || t[29] !== S || t[30] !== C || t[31] !== y || t[32] !== b ? (w = /* @__PURE__ */ u("div", {
9418
9519
  style: v,
@@ -9430,11 +9531,11 @@ function fr(e) {
9430
9531
  children: [_, w]
9431
9532
  }), t[34] = w, t[35] = _, t[36] = T) : T = t[36], T;
9432
9533
  }
9433
- function pr(e) {
9534
+ function Sr(e) {
9434
9535
  if (!e.ok) throw Error("fetch failed");
9435
9536
  return e.text();
9436
9537
  }
9437
- function mr(e) {
9538
+ function Cr(e) {
9438
9539
  let t = (0, g.c)(20), { attachment: n, url: r, name: i, ext: a } = e, o, s, c;
9439
9540
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = {
9440
9541
  display: "flex",
@@ -9480,7 +9581,7 @@ function mr(e) {
9480
9581
  children: a
9481
9582
  }), t[6] = a, t[7] = p);
9482
9583
  let m;
9483
- t[8] === n.size ? m = t[9] : (m = n.size && /* @__PURE__ */ l("span", { children: rr(n.size) }), t[8] = n.size, t[9] = m);
9584
+ t[8] === n.size ? m = t[9] : (m = n.size && /* @__PURE__ */ l("span", { children: fr(n.size) }), t[8] = n.size, t[9] = m);
9484
9585
  let h;
9485
9586
  t[10] !== p || t[11] !== m ? (h = /* @__PURE__ */ u("div", {
9486
9587
  style: f,
@@ -9490,7 +9591,7 @@ function mr(e) {
9490
9591
  t[13] !== i || t[14] !== r ? (_ = /* @__PURE__ */ l("a", {
9491
9592
  href: r,
9492
9593
  download: i,
9493
- style: or,
9594
+ style: hr,
9494
9595
  children: "⬇ Download"
9495
9596
  }), t[13] = i, t[14] = r, t[15] = _) : _ = t[15];
9496
9597
  let v;
@@ -9504,11 +9605,11 @@ function mr(e) {
9504
9605
  ]
9505
9606
  }), t[16] = d, t[17] = h, t[18] = _, t[19] = v) : v = t[19], v;
9506
9607
  }
9507
- function hr(e) {
9608
+ function wr(e) {
9508
9609
  let t = (0, g.c)(35), { attachment: n, onClose: i } = e, a = n.url ?? "", o = n.name ?? "file", s;
9509
- t[0] === o ? s = t[1] : (s = nr(o), t[0] = o, t[1] = s);
9610
+ t[0] === o ? s = t[1] : (s = dr(o), t[0] = o, t[1] = s);
9510
9611
  let c = s, d;
9511
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = [], t[2] = d) : d = t[2], r(gr, d);
9612
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = [], t[2] = d) : d = t[2], r(Tr, d);
9512
9613
  let f;
9513
9614
  t[3] === i ? f = t[4] : (f = (e) => {
9514
9615
  e.key === "Escape" && i();
@@ -9516,14 +9617,14 @@ function hr(e) {
9516
9617
  let p = f, m, h;
9517
9618
  t[5] === p ? (m = t[6], h = t[7]) : (m = () => (window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p)), h = [p], t[5] = p, t[6] = m, t[7] = h), r(m, h);
9518
9619
  let _;
9519
- t[8] !== n || t[9] !== c || t[10] !== o || t[11] !== a ? (_ = () => c === "pdf" ? /* @__PURE__ */ l(dr, {
9620
+ t[8] !== n || t[9] !== c || t[10] !== o || t[11] !== a ? (_ = () => c === "pdf" ? /* @__PURE__ */ l(br, {
9520
9621
  url: a,
9521
9622
  name: o
9522
- }) : c === "txt" || c === "md" || c === "csv" ? /* @__PURE__ */ l(fr, {
9623
+ }) : c === "txt" || c === "md" || c === "csv" ? /* @__PURE__ */ l(xr, {
9523
9624
  url: a,
9524
9625
  name: o,
9525
9626
  ext: c
9526
- }) : /* @__PURE__ */ l(mr, {
9627
+ }) : /* @__PURE__ */ l(Cr, {
9527
9628
  attachment: n,
9528
9629
  url: a,
9529
9630
  name: o,
@@ -9558,7 +9659,7 @@ function hr(e) {
9558
9659
  }), t[16] = o, t[17] = S);
9559
9660
  let C;
9560
9661
  t[18] === Symbol.for("react.memo_cache_sentinel") ? (C = {
9561
- ...ir,
9662
+ ...pr,
9562
9663
  fontSize: 20,
9563
9664
  padding: "6px 12px"
9564
9665
  }, t[18] = C) : C = t[18];
@@ -9596,21 +9697,21 @@ function hr(e) {
9596
9697
  children: [T, A]
9597
9698
  }), t[32] = T, t[33] = A, t[34] = j) : j = t[34], j;
9598
9699
  }
9599
- function gr() {
9600
- tr();
9700
+ function Tr() {
9701
+ ur();
9601
9702
  }
9602
- zn.DocumentViewer = hr;
9703
+ Jn.DocumentViewer = wr;
9603
9704
  //#endregion
9604
9705
  //#region src/components/chat/MediaViewer.tsx
9605
- var _r = "oc-media-viewer-styles";
9606
- function vr() {
9607
- if (typeof document > "u" || document.getElementById(_r)) return;
9706
+ var Er = "oc-media-viewer-styles";
9707
+ function Dr() {
9708
+ if (typeof document > "u" || document.getElementById(Er)) return;
9608
9709
  let e = document.createElement("style");
9609
- e.id = _r, e.textContent = "\n @keyframes oc-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n .oc-viewer-backdrop {\n animation: oc-fade-in 200ms ease forwards;\n }\n ", document.head.appendChild(e);
9710
+ e.id = Er, e.textContent = "\n @keyframes oc-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n .oc-viewer-backdrop {\n animation: oc-fade-in 200ms ease forwards;\n }\n ", document.head.appendChild(e);
9610
9711
  }
9611
- function yr(e) {
9712
+ function Or(e) {
9612
9713
  let t = (0, g.c)(14), { active: n, onClose: i } = e, a = o(""), s;
9613
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], t[0] = s) : s = t[0], r(br, s);
9714
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], t[0] = s) : s = t[0], r(kr, s);
9614
9715
  let c, u;
9615
9716
  if (t[1] === n ? (c = t[2], u = t[3]) : (c = () => {
9616
9717
  if (n) return a.current = document.body.style.overflow, document.body.style.overflow = "hidden", () => {
@@ -9628,14 +9729,14 @@ function yr(e) {
9628
9729
  justifyContent: "center"
9629
9730
  }, t[4] = f) : f = t[4];
9630
9731
  let p = f, m;
9631
- t[5] !== n.attachment || t[6] !== n.imageSet || t[7] !== n.type || t[8] !== i ? (m = () => n.type === "image" ? /* @__PURE__ */ l(qn, {
9732
+ t[5] !== n.attachment || t[6] !== n.imageSet || t[7] !== n.type || t[8] !== i ? (m = () => n.type === "image" ? /* @__PURE__ */ l(nr, {
9632
9733
  attachment: n.attachment,
9633
9734
  imageSet: n.imageSet ?? [n.attachment],
9634
9735
  onClose: i
9635
- }) : n.type === "video" ? /* @__PURE__ */ l($n, {
9736
+ }) : n.type === "video" ? /* @__PURE__ */ l(cr, {
9636
9737
  attachment: n.attachment,
9637
9738
  onClose: i
9638
- }) : n.type === "document" ? /* @__PURE__ */ l(hr, {
9739
+ }) : n.type === "document" ? /* @__PURE__ */ l(wr, {
9639
9740
  attachment: n.attachment,
9640
9741
  onClose: i
9641
9742
  }) : null, t[5] = n.attachment, t[6] = n.imageSet, t[7] = n.type, t[8] = i, t[9] = m) : m = t[9];
@@ -9649,12 +9750,12 @@ function yr(e) {
9649
9750
  children: _
9650
9751
  }), document.body), t[12] = _, t[13] = v), v;
9651
9752
  }
9652
- function br() {
9653
- vr();
9753
+ function kr() {
9754
+ Dr();
9654
9755
  }
9655
9756
  //#endregion
9656
9757
  //#region src/components/ui/PoweredBy.tsx
9657
- function xr() {
9758
+ function Ar() {
9658
9759
  let e = (0, g.c)(3), { showPoweredBy: t } = y();
9659
9760
  if (!t) return null;
9660
9761
  let n;
@@ -9691,30 +9792,34 @@ function xr() {
9691
9792
  }
9692
9793
  //#endregion
9693
9794
  //#region src/widgets/Chat.tsx
9694
- function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner: i, defaultQuickMessages: d }) {
9695
- let { apiClient: f, baseUrl: p } = v(), { initiateCall: m } = P(), { conversations: h, loading: g, createDirect: _ } = le(), { records: y } = ge(), [b, x] = s(e ?? null), [S, C] = s("chats"), [w, T] = s(!1), [E, D] = s([]), [O, k] = s(!1), [A, j] = s(null), [M, N] = s(!1), [I, L] = s([]), [R, z] = s(null), [B, V] = s(null), [H, U] = s(null), [W, G] = s(!1), [K, q] = s(""), [J, Y] = s([]), [X, Z] = s(0), [ee, Q] = s(null), [te, ne] = s("offline");
9795
+ function jr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner: i, defaultQuickMessages: d }) {
9796
+ let { apiClient: f, baseUrl: p } = v(), { initiateCall: m } = P(), { conversations: h, loading: g, createDirect: _ } = ve(), { records: y } = Te(), [b, x] = s(e ?? null), [S, C] = s("chats"), [w, T] = s(!1), [E, D] = s([]), [O, k] = s(!1);
9797
+ r(() => {
9798
+ e && x(e);
9799
+ }, [e]);
9800
+ let [A, j] = s(null), [M, N] = s(!1), [I, L] = s([]), [R, z] = s(null), [B, V] = s(null), [H, U] = s(null), [W, G] = s(!1), [K, q] = s(""), [J, Y] = s([]), [X, Z] = s(0), [ee, Q] = s(null), [te, ne] = s("offline");
9696
9801
  r(() => {
9697
9802
  b && ne(h.find((e) => e.id === b)?.presenceStatus ?? "offline");
9698
9803
  }, [b, h]), F("presence:changed", ({ app_user_id: e, status: t }) => {
9699
9804
  b && h.find((e) => e.id === b)?.otherUserId === e && ne(t);
9700
9805
  });
9701
- let { messages: re, typingUsers: $, pinnedMessages: ie, sendMessage: ae, sendTyping: oe, markRead: se, editMessageLocally: ce } = pe(b ?? ""), ue = a(() => re.flatMap((e) => e.attachment?.type === "image" ? [e.attachment] : []), [re]), de = o(/* @__PURE__ */ new Set());
9806
+ let { messages: re, typingUsers: $, pinnedMessages: ie, sendMessage: ae, sendTyping: oe, markRead: se, editMessageLocally: ce } = Se(b ?? ""), le = a(() => re.flatMap((e) => e.attachment?.type === "image" ? [e.attachment] : []), [re]), ue = o(/* @__PURE__ */ new Set());
9702
9807
  r(() => {
9703
- de.current = /* @__PURE__ */ new Set(), Q(null);
9808
+ ue.current = /* @__PURE__ */ new Set(), Q(null);
9704
9809
  }, [b]), r(() => {
9705
9810
  b && re.forEach((e) => {
9706
- !e.sender && e.id && !de.current.has(e.id) && (de.current.add(e.id), se(e.id));
9811
+ !e.sender && e.id && !ue.current.has(e.id) && (ue.current.add(e.id), se(e.id));
9707
9812
  });
9708
9813
  }, [
9709
9814
  re,
9710
9815
  b,
9711
9816
  se
9712
9817
  ]);
9713
- function fe(e, t) {
9818
+ function de(e, t) {
9714
9819
  e.type === "image" ? Q({
9715
9820
  type: "image",
9716
9821
  attachment: e,
9717
- imageSet: t ?? ue
9822
+ imageSet: t ?? le
9718
9823
  }) : e.type === "video" ? Q({
9719
9824
  type: "video",
9720
9825
  attachment: e
@@ -9723,10 +9828,10 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9723
9828
  attachment: e
9724
9829
  });
9725
9830
  }
9726
- function me() {
9831
+ function fe() {
9727
9832
  Q(null);
9728
9833
  }
9729
- function he(e) {
9834
+ function pe(e) {
9730
9835
  j({
9731
9836
  messageId: e.id,
9732
9837
  senderName: e.sender ? "You" : e.senderName ?? "Unknown",
@@ -9735,24 +9840,24 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9735
9840
  attachmentType: e.attachment?.type
9736
9841
  });
9737
9842
  }
9738
- async function _e(e) {
9843
+ async function me(e) {
9739
9844
  if (b) try {
9740
9845
  await f.delete(`/messages/${e}`);
9741
9846
  } catch (e) {
9742
9847
  console.error("[Chat] delete failed", e);
9743
9848
  }
9744
9849
  }
9745
- async function ve(e) {
9850
+ async function he(e) {
9746
9851
  if (b && confirm("Recall this message for everyone?")) try {
9747
9852
  await f.patch(`/messages/${e}/recall`, {});
9748
9853
  } catch (e) {
9749
9854
  console.error("[Chat] recall failed", e);
9750
9855
  }
9751
9856
  }
9752
- async function ye(e) {
9857
+ async function ge(e) {
9753
9858
  z(e);
9754
9859
  }
9755
- async function be(e) {
9860
+ async function _e(e) {
9756
9861
  try {
9757
9862
  B ? await f.post("/messages/batch", {
9758
9863
  action: "forward",
@@ -9765,21 +9870,21 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9765
9870
  z(null), V(null);
9766
9871
  }
9767
9872
  }
9768
- async function xe(e, t) {
9873
+ async function ye(e, t) {
9769
9874
  try {
9770
9875
  await f.post(`/messages/${e}/reactions`, { reaction_type: t });
9771
9876
  } catch (e) {
9772
9877
  console.error("[Chat] react failed", e);
9773
9878
  }
9774
9879
  }
9775
- async function Se(e, t) {
9880
+ async function be(e, t) {
9776
9881
  try {
9777
9882
  t ? await f.delete(`/messages/${e}/pin`) : await f.post(`/messages/${e}/pin`, {});
9778
9883
  } catch (e) {
9779
9884
  console.error("[Chat] pin failed", e);
9780
9885
  }
9781
9886
  }
9782
- async function Ce(e) {
9887
+ async function xe(e) {
9783
9888
  let t = re.find((t) => t.id === e);
9784
9889
  if (!t) return;
9785
9890
  let n = window.prompt("Edit message:", t.content ?? "");
@@ -9789,7 +9894,7 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9789
9894
  console.error("[Chat] edit failed", e);
9790
9895
  }
9791
9896
  }
9792
- async function Te() {
9897
+ async function Ce() {
9793
9898
  if (I.length) try {
9794
9899
  await f.post("/messages/batch", {
9795
9900
  action: "delete",
@@ -9801,7 +9906,7 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9801
9906
  N(!1), L([]);
9802
9907
  }
9803
9908
  }
9804
- async function Ee() {
9909
+ async function we() {
9805
9910
  if (I.length && confirm(`Recall ${I.length} message(s) for everyone?`)) try {
9806
9911
  await f.post("/messages/batch", {
9807
9912
  action: "recall",
@@ -9813,10 +9918,10 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9813
9918
  N(!1), L([]);
9814
9919
  }
9815
9920
  }
9816
- function De() {
9921
+ function Ee() {
9817
9922
  V([...I]), N(!1), L([]);
9818
9923
  }
9819
- function Oe(e) {
9924
+ function De(e) {
9820
9925
  if (q(e), Z(0), !e.trim()) {
9821
9926
  Y([]);
9822
9927
  return;
@@ -9824,16 +9929,16 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9824
9929
  let t = e.toLowerCase();
9825
9930
  Y(re.filter((e) => e.content?.toLowerCase().includes(t)).map((e) => e.id));
9826
9931
  }
9827
- function ke() {
9932
+ function Oe() {
9828
9933
  G((e) => (e && (q(""), Y([]), Z(0)), !e));
9829
9934
  }
9830
- function Ae() {
9935
+ function ke() {
9831
9936
  J.length && Z((e) => (e + 1) % J.length);
9832
9937
  }
9833
- function je() {
9938
+ function Ae() {
9834
9939
  J.length && Z((e) => (e - 1 + J.length) % J.length);
9835
9940
  }
9836
- async function Me() {
9941
+ async function je() {
9837
9942
  T(!0), k(!0);
9838
9943
  try {
9839
9944
  D(await f.get("/app-users"));
@@ -9843,34 +9948,36 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9843
9948
  k(!1);
9844
9949
  }
9845
9950
  }
9846
- async function Ne(e) {
9951
+ async function Me(e) {
9847
9952
  T(!1), x(await _(e));
9848
9953
  }
9849
9954
  if (b) {
9850
- let e = h.find((e) => e.id === b), r = e?.otherUserId ?? e?.id ?? "", a = h.map((e) => ({
9955
+ let r = h.find((e) => e.id === b), a = r?.otherUserId ?? r?.id ?? "", o = h.map((e) => ({
9851
9956
  id: e.id,
9852
9957
  name: e.name,
9853
9958
  avatarSrc: e.avatarSrc
9854
9959
  }));
9855
9960
  return /* @__PURE__ */ u(c, { children: [
9856
- /* @__PURE__ */ l(An, {
9857
- conversationName: e?.name ?? "…",
9858
- avatarSrc: e?.avatarSrc,
9859
- isOnline: e?.online,
9860
- isGroup: e?.isGroup,
9861
- otherUserId: r,
9961
+ /* @__PURE__ */ l(zn, {
9962
+ conversationName: r?.name ?? "…",
9963
+ avatarSrc: r?.avatarSrc,
9964
+ isOnline: r?.online,
9965
+ isGroup: r?.isGroup,
9966
+ otherUserId: a,
9862
9967
  presenceStatus: te,
9863
9968
  renderHeader: n,
9864
9969
  chatBanner: i,
9865
9970
  defaultQuickMessages: d,
9866
9971
  messages: re,
9867
9972
  typingUsers: $,
9868
- onBack: () => x(null),
9973
+ onBack: () => {
9974
+ e || x(null);
9975
+ },
9869
9976
  onCall: t || m ? () => {
9870
- r ? m(r, "voice", b ?? void 0) : t?.(r, "voice");
9977
+ a ? m(a, "voice", b ?? void 0) : t?.(a, "voice");
9871
9978
  } : void 0,
9872
9979
  onVideoCall: t || m ? () => {
9873
- r ? m(r, "video", b ?? void 0) : t?.(r, "video");
9980
+ a ? m(a, "video", b ?? void 0) : t?.(a, "video");
9874
9981
  } : void 0,
9875
9982
  onSend: (e, t) => {
9876
9983
  A ? (f.post(`/conversations/${b}/messages/reply`, {
@@ -9904,56 +10011,56 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9904
10011
  },
9905
10012
  replyingTo: A,
9906
10013
  onDismissReply: () => j(null),
9907
- onReplyMessage: he,
10014
+ onReplyMessage: pe,
9908
10015
  batchMode: M,
9909
10016
  batchSelectedIds: I,
9910
10017
  batchSelectedCount: I.length,
9911
10018
  onToggleBatchSelect: (e) => {
9912
10019
  M || N(!0), L((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
9913
10020
  },
9914
- onBatchDelete: Te,
9915
- onBatchRecall: Ee,
9916
- onBatchForward: De,
10021
+ onBatchDelete: Ce,
10022
+ onBatchRecall: we,
10023
+ onBatchForward: Ee,
9917
10024
  onBatchCancel: () => {
9918
10025
  N(!1), L([]);
9919
10026
  },
9920
10027
  searchActive: W,
9921
10028
  searchQuery: K,
9922
- onSearchToggle: ke,
9923
- onSearchChange: Oe,
10029
+ onSearchToggle: Oe,
10030
+ onSearchChange: De,
9924
10031
  searchResultIds: J,
9925
10032
  searchCurrentIndex: X,
9926
- onSearchNext: Ae,
9927
- onSearchPrev: je,
9928
- onDeleteMessage: _e,
9929
- onRecallMessage: ve,
9930
- onForwardMessage: ye,
10033
+ onSearchNext: ke,
10034
+ onSearchPrev: Ae,
10035
+ onDeleteMessage: me,
10036
+ onRecallMessage: he,
10037
+ onForwardMessage: ge,
9931
10038
  onInfoMessage: (e) => U(e),
9932
- onEditMessage: Ce,
9933
- onReactMessage: xe,
9934
- onPinMessage: Se,
10039
+ onEditMessage: xe,
10040
+ onReactMessage: ye,
10041
+ onPinMessage: be,
9935
10042
  pinnedMessages: ie,
9936
- onMediaOpen: fe,
9937
- imageSet: ue
10043
+ onMediaOpen: de,
10044
+ imageSet: le
9938
10045
  }),
9939
- /* @__PURE__ */ l(yr, {
10046
+ /* @__PURE__ */ l(Or, {
9940
10047
  active: ee,
9941
- onClose: me
10048
+ onClose: fe
9942
10049
  }),
9943
- (R || B) && /* @__PURE__ */ l(Pn, {
9944
- conversations: a,
9945
- onConfirm: be,
10050
+ (R || B) && /* @__PURE__ */ l(Un, {
10051
+ conversations: o,
10052
+ onConfirm: _e,
9946
10053
  onClose: () => {
9947
10054
  z(null), V(null);
9948
10055
  }
9949
10056
  }),
9950
- H && /* @__PURE__ */ l(Rn, {
10057
+ H && /* @__PURE__ */ l(qn, {
9951
10058
  messageId: H,
9952
10059
  apiBaseUrl: p,
9953
10060
  authToken: f.userToken,
9954
10061
  onClose: () => U(null)
9955
10062
  }),
9956
- /* @__PURE__ */ l(xr, {})
10063
+ /* @__PURE__ */ l(Ar, {})
9957
10064
  ] });
9958
10065
  }
9959
10066
  return w ? /* @__PURE__ */ u("div", {
@@ -9989,7 +10096,7 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
9989
10096
  className: "flex items-center justify-center h-24 text-sm text-muted-foreground",
9990
10097
  children: "No users found"
9991
10098
  }) : E.map((e) => /* @__PURE__ */ u("button", {
9992
- onClick: () => Ne(e.id),
10099
+ onClick: () => Me(e.id),
9993
10100
  className: "w-full h-16 flex items-center gap-3 px-4 border-none bg-transparent cursor-pointer text-left border-b",
9994
10101
  style: { borderBottomColor: "rgba(48,54,61,0.6)" },
9995
10102
  children: [/* @__PURE__ */ l("div", {
@@ -10001,27 +10108,27 @@ function Sr({ conversationId: e, onCallRequest: t, renderHeader: n, chatBanner:
10001
10108
  })]
10002
10109
  }, e.id))
10003
10110
  }),
10004
- /* @__PURE__ */ l(xr, {})
10111
+ /* @__PURE__ */ l(Ar, {})
10005
10112
  ]
10006
- }) : S === "calls" ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Mn, {
10113
+ }) : S === "calls" ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Vn, {
10007
10114
  records: y,
10008
10115
  onCall: (e, n) => t?.(e, n),
10009
10116
  activeTab: S,
10010
10117
  onTabChange: C
10011
- }), /* @__PURE__ */ l(xr, {})] }) : g ? /* @__PURE__ */ l("div", {
10118
+ }), /* @__PURE__ */ l(Ar, {})] }) : g ? /* @__PURE__ */ l("div", {
10012
10119
  className: "flex-1 flex items-center justify-center bg-background text-muted-foreground text-sm",
10013
10120
  children: "Loading…"
10014
- }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(we, {
10121
+ }) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ne, {
10015
10122
  conversations: h,
10016
10123
  onSelect: x,
10017
- onNewChat: Me,
10124
+ onNewChat: je,
10018
10125
  activeTab: S,
10019
10126
  onTabChange: C
10020
- }), /* @__PURE__ */ l(xr, {})] });
10127
+ }), /* @__PURE__ */ l(Ar, {})] });
10021
10128
  }
10022
10129
  //#endregion
10023
10130
  //#region src/components/call/CallControls.tsx
10024
- function Cr(e) {
10131
+ function Mr(e) {
10025
10132
  let t = (0, g.c)(28), { icon: n, label: r, active: i, danger: a, badge: o, onClick: s, size: c } = e, d = c === void 0 ? "sm" : c, f = d === "lg" ? 64 : 52, p = d === "lg" ? 26 : 22, m = a ? "linear-gradient(135deg, #ef4444, #dc2626)" : i ? "rgba(233,30,99,0.12)" : "rgba(255,255,255,0.1)", h = i ? "1px solid rgba(233,30,99,0.3)" : a ? "none" : "1px solid transparent", _ = a ? "0 4px 20px rgba(239,68,68,0.5)" : "none", v;
10026
10133
  t[0] === f ? v = t[1] : (v = { minWidth: f }, t[0] = f, t[1] = v);
10027
10134
  let y;
@@ -10071,57 +10178,57 @@ function Cr(e) {
10071
10178
  children: [w, T]
10072
10179
  }), t[23] = s, t[24] = v, t[25] = w, t[26] = T, t[27] = E) : E = t[27], E;
10073
10180
  }
10074
- var wr = "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3zM19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8", Tr = "M1 1l22 22M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23M12 19v4M8 23h8", Er = "M15 10l4.553-2.069A1 1 0 0 1 21 8.82v6.36a1 1 0 0 1-1.447.89L15 14M3 8a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", Dr = "M11 5L6 9H2v6h4l5 4V5zM19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07", Or = "M2 3h20v14H2zM8 21h8M12 17v4", kr = "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75", Ar = "M5 12h.01M12 12h.01M19 12h.01", jr = "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 3.88 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 9.91M23 1 1 23", Mr = "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z";
10075
- function Nr(e) {
10181
+ var Nr = "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3zM19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8", Pr = "M1 1l22 22M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23M12 19v4M8 23h8", Fr = "M15 10l4.553-2.069A1 1 0 0 1 21 8.82v6.36a1 1 0 0 1-1.447.89L15 14M3 8a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", Ir = "M11 5L6 9H2v6h4l5 4V5zM19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07", Lr = "M2 3h20v14H2zM8 21h8M12 17v4", Rr = "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75", zr = "M5 12h.01M12 12h.01M19 12h.01", Br = "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 3.88 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 9.91M23 1 1 23", Vr = "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z";
10182
+ function Hr(e) {
10076
10183
  let t = (0, g.c)(36), { muted: n, cameraOff: r, speakerOn: i, participantCount: a, onMute: o, onCamera: s, onSpeaker: c, onScreen: d, onParticipants: f, onMore: p, onChat: m, onEnd: h, showCamera: _, showScreen: v } = e, y = _ === void 0 ? !0 : _, b = v === void 0 ? !0 : v, x;
10077
10184
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (x = {
10078
10185
  backgroundColor: "rgba(13,17,23,0.85)",
10079
10186
  backdropFilter: "blur(20px)",
10080
10187
  borderColor: "rgba(255,255,255,0.08)"
10081
10188
  }, t[0] = x) : x = t[0];
10082
- let S = n ? Tr : wr, C = n ? "Unmute" : "Mute", w;
10083
- t[1] !== n || t[2] !== o || t[3] !== S || t[4] !== C ? (w = /* @__PURE__ */ l(Cr, {
10189
+ let S = n ? Pr : Nr, C = n ? "Unmute" : "Mute", w;
10190
+ t[1] !== n || t[2] !== o || t[3] !== S || t[4] !== C ? (w = /* @__PURE__ */ l(Mr, {
10084
10191
  icon: S,
10085
10192
  label: C,
10086
10193
  danger: n,
10087
10194
  onClick: o
10088
10195
  }), t[1] = n, t[2] = o, t[3] = S, t[4] = C, t[5] = w) : w = t[5];
10089
10196
  let T;
10090
- t[6] !== r || t[7] !== s || t[8] !== y ? (T = y && /* @__PURE__ */ l(Cr, {
10091
- icon: Er,
10197
+ t[6] !== r || t[7] !== s || t[8] !== y ? (T = y && /* @__PURE__ */ l(Mr, {
10198
+ icon: Fr,
10092
10199
  label: "Camera",
10093
10200
  active: !r,
10094
10201
  onClick: s
10095
10202
  }), t[6] = r, t[7] = s, t[8] = y, t[9] = T) : T = t[9];
10096
10203
  let E;
10097
- t[10] !== c || t[11] !== i ? (E = c && /* @__PURE__ */ l(Cr, {
10098
- icon: Dr,
10204
+ t[10] !== c || t[11] !== i ? (E = c && /* @__PURE__ */ l(Mr, {
10205
+ icon: Ir,
10099
10206
  label: "Speaker",
10100
10207
  active: i,
10101
10208
  onClick: c
10102
10209
  }), t[10] = c, t[11] = i, t[12] = E) : E = t[12];
10103
10210
  let D;
10104
- t[13] !== d || t[14] !== b ? (D = b && d && /* @__PURE__ */ l(Cr, {
10105
- icon: Or,
10211
+ t[13] !== d || t[14] !== b ? (D = b && d && /* @__PURE__ */ l(Mr, {
10212
+ icon: Lr,
10106
10213
  label: "Screen",
10107
10214
  onClick: d
10108
10215
  }), t[13] = d, t[14] = b, t[15] = D) : D = t[15];
10109
10216
  let O;
10110
- t[16] !== f || t[17] !== a ? (O = f && /* @__PURE__ */ l(Cr, {
10111
- icon: kr,
10217
+ t[16] !== f || t[17] !== a ? (O = f && /* @__PURE__ */ l(Mr, {
10218
+ icon: Rr,
10112
10219
  label: "People",
10113
10220
  badge: a,
10114
10221
  onClick: f
10115
10222
  }), t[16] = f, t[17] = a, t[18] = O) : O = t[18];
10116
10223
  let k;
10117
- t[19] === m ? k = t[20] : (k = m && /* @__PURE__ */ l(Cr, {
10118
- icon: Mr,
10224
+ t[19] === m ? k = t[20] : (k = m && /* @__PURE__ */ l(Mr, {
10225
+ icon: Vr,
10119
10226
  label: "Chat",
10120
10227
  onClick: m
10121
10228
  }), t[19] = m, t[20] = k);
10122
10229
  let A;
10123
- t[21] === p ? A = t[22] : (A = p && /* @__PURE__ */ l(Cr, {
10124
- icon: Ar,
10230
+ t[21] === p ? A = t[22] : (A = p && /* @__PURE__ */ l(Mr, {
10231
+ icon: zr,
10125
10232
  label: "More",
10126
10233
  onClick: p
10127
10234
  }), t[21] = p, t[22] = A);
@@ -10141,8 +10248,8 @@ function Nr(e) {
10141
10248
  let M;
10142
10249
  t[31] === h ? M = t[32] : (M = /* @__PURE__ */ l("div", {
10143
10250
  className: "flex justify-center mt-4 mb-10",
10144
- children: /* @__PURE__ */ l(Cr, {
10145
- icon: jr,
10251
+ children: /* @__PURE__ */ l(Mr, {
10252
+ icon: Br,
10146
10253
  label: "End",
10147
10254
  danger: !0,
10148
10255
  onClick: h,
@@ -10158,15 +10265,15 @@ function Nr(e) {
10158
10265
  }
10159
10266
  //#endregion
10160
10267
  //#region src/components/call/InCallChatPanel.tsx
10161
- function Pr(e) {
10162
- let t = (0, g.c)(19), { conversationId: n } = e, { messages: i, typingUsers: a, sendMessage: s, sendTyping: c } = pe(n), d = o(null), f;
10268
+ function Ur(e) {
10269
+ let t = (0, g.c)(19), { conversationId: n } = e, { messages: i, typingUsers: a, sendMessage: s, sendTyping: c } = Se(n), d = o(null), f;
10163
10270
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
10164
10271
  d.current?.scrollIntoView({ behavior: "smooth" });
10165
10272
  }, t[0] = f) : f = t[0];
10166
10273
  let p;
10167
10274
  t[1] === i.length ? p = t[2] : (p = [i.length], t[1] = i.length, t[2] = p), r(f, p);
10168
10275
  let m;
10169
- t[3] === i ? m = t[4] : (m = i.map((e, t) => /* @__PURE__ */ l(ft, {
10276
+ t[3] === i ? m = t[4] : (m = i.map((e, t) => /* @__PURE__ */ l(xt, {
10170
10277
  ...e,
10171
10278
  isGrouped: t < i.length - 1 && i[t + 1]?.sender === e.sender
10172
10279
  }, e.id)), t[3] = i, t[4] = m);
@@ -10179,7 +10286,7 @@ function Pr(e) {
10179
10286
  0,
10180
10287
  1,
10181
10288
  2
10182
- ].map(Fr)
10289
+ ].map(Wr)
10183
10290
  })
10184
10291
  }), t[5] = a.length, t[6] = h);
10185
10292
  let _;
@@ -10199,7 +10306,7 @@ function Pr(e) {
10199
10306
  let y;
10200
10307
  t[11] === s ? y = t[12] : (y = (e) => s(e), t[11] = s, t[12] = y);
10201
10308
  let b;
10202
- t[13] !== c || t[14] !== y ? (b = /* @__PURE__ */ l(en, {
10309
+ t[13] !== c || t[14] !== y ? (b = /* @__PURE__ */ l(un, {
10203
10310
  onSend: y,
10204
10311
  onTyping: c
10205
10312
  }), t[13] = c, t[14] = y, t[15] = b) : b = t[15];
@@ -10209,7 +10316,7 @@ function Pr(e) {
10209
10316
  children: [v, b]
10210
10317
  }), t[16] = v, t[17] = b, t[18] = x) : x = t[18], x;
10211
10318
  }
10212
- function Fr(e) {
10319
+ function Wr(e) {
10213
10320
  return /* @__PURE__ */ l("span", {
10214
10321
  className: "w-1.5 h-1.5 rounded-full block",
10215
10322
  style: {
@@ -10219,7 +10326,7 @@ function Fr(e) {
10219
10326
  }
10220
10327
  }, e);
10221
10328
  }
10222
- function Ir(e) {
10329
+ function Gr(e) {
10223
10330
  let t = (0, g.c)(22), { open: n, conversationId: r, onClose: i } = e, a;
10224
10331
  t[0] !== i || t[1] !== n ? (a = n && /* @__PURE__ */ l("div", {
10225
10332
  className: "fixed inset-0 z-[55] md:hidden",
@@ -10302,7 +10409,7 @@ function Ir(e) {
10302
10409
  let y;
10303
10410
  t[13] === r ? y = t[14] : (y = /* @__PURE__ */ l("div", {
10304
10411
  className: "flex-1 min-h-0",
10305
- children: r ? /* @__PURE__ */ l(Pr, { conversationId: r }) : /* @__PURE__ */ l("div", {
10412
+ children: r ? /* @__PURE__ */ l(Ur, { conversationId: r }) : /* @__PURE__ */ l("div", {
10306
10413
  className: "flex items-center justify-center h-full",
10307
10414
  children: /* @__PURE__ */ l("p", {
10308
10415
  className: "text-sm",
@@ -10322,10 +10429,10 @@ function Ir(e) {
10322
10429
  }
10323
10430
  //#endregion
10324
10431
  //#region src/components/call/CallScreen.tsx
10325
- function Lr() {
10432
+ function Kr() {
10326
10433
  let e = (0, g.c)(6), [t, n] = s(0), i, a;
10327
10434
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
10328
- let e = setInterval(() => n(Rr), 1e3);
10435
+ let e = setInterval(() => n(qr), 1e3);
10329
10436
  return () => clearInterval(e);
10330
10437
  }, a = [], e[0] = i, e[1] = a) : (i = e[0], a = e[1]), r(i, a);
10331
10438
  let o = String(Math.floor(t / 60)), c;
@@ -10333,10 +10440,10 @@ function Lr() {
10333
10440
  let l = c, u = String(t % 60), d;
10334
10441
  return e[4] === u ? d = e[5] : (d = u.padStart(2, "0"), e[4] = u, e[5] = d), `${l}:${d}`;
10335
10442
  }
10336
- function Rr(e) {
10443
+ function qr(e) {
10337
10444
  return e + 1;
10338
10445
  }
10339
- var zr = [
10446
+ var Jr = [
10340
10447
  12,
10341
10448
  18,
10342
10449
  10,
@@ -10348,8 +10455,8 @@ var zr = [
10348
10455
  14,
10349
10456
  22
10350
10457
  ];
10351
- function Br({ callerName: e, callerAvatar: t, remoteStream: n, conversationId: i, onEnd: a, onMute: d }) {
10352
- let [f, p] = s(!1), [m, h] = s(!0), [g, _] = s(!1), v = Lr(), y = o(null);
10458
+ function Yr({ callerName: e, callerAvatar: t, remoteStream: n, conversationId: i, onEnd: a, onMute: d }) {
10459
+ let [f, p] = s(!1), [m, h] = s(!0), [g, _] = s(!1), v = Kr(), y = o(null);
10353
10460
  return r(() => {
10354
10461
  let e = y.current;
10355
10462
  !e || !n || e.srcObject !== n && (e.srcObject = n, e.play().catch(() => {}));
@@ -10376,7 +10483,7 @@ function Br({ callerName: e, callerAvatar: t, remoteStream: n, conversationId: i
10376
10483
  className: "absolute inset-0 rounded-full",
10377
10484
  style: { boxShadow: "0 0 0 8px rgba(233,30,99,0.15), 0 0 0 16px rgba(233,30,99,0.08)" }
10378
10485
  }),
10379
- /* @__PURE__ */ l(ve, {
10486
+ /* @__PURE__ */ l(De, {
10380
10487
  src: t,
10381
10488
  name: e,
10382
10489
  size: 120
@@ -10468,7 +10575,7 @@ function Br({ callerName: e, callerAvatar: t, remoteStream: n, conversationId: i
10468
10575
  }),
10469
10576
  /* @__PURE__ */ l("div", {
10470
10577
  className: "flex items-center justify-center gap-0.5 mt-8 w-48 h-12",
10471
- children: zr.map((e, t) => /* @__PURE__ */ l("div", {
10578
+ children: Jr.map((e, t) => /* @__PURE__ */ l("div", {
10472
10579
  className: "w-0.5 rounded-sm",
10473
10580
  style: {
10474
10581
  height: f ? 3 : e,
@@ -10479,7 +10586,7 @@ function Br({ callerName: e, callerAvatar: t, remoteStream: n, conversationId: i
10479
10586
  })
10480
10587
  ]
10481
10588
  }),
10482
- /* @__PURE__ */ l(Nr, {
10589
+ /* @__PURE__ */ l(Hr, {
10483
10590
  muted: f,
10484
10591
  cameraOff: !1,
10485
10592
  speakerOn: m,
@@ -10501,7 +10608,7 @@ function Br({ callerName: e, callerAvatar: t, remoteStream: n, conversationId: i
10501
10608
  showCamera: !1,
10502
10609
  showScreen: !1
10503
10610
  }),
10504
- /* @__PURE__ */ l(Ir, {
10611
+ /* @__PURE__ */ l(Gr, {
10505
10612
  open: g,
10506
10613
  conversationId: i,
10507
10614
  onClose: () => _(!1)
@@ -10511,10 +10618,10 @@ function Br({ callerName: e, callerAvatar: t, remoteStream: n, conversationId: i
10511
10618
  }
10512
10619
  //#endregion
10513
10620
  //#region src/components/call/VideoCallScreen.tsx
10514
- function Vr() {
10621
+ function Xr() {
10515
10622
  let e = (0, g.c)(6), [t, n] = s(0), i, a;
10516
10623
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
10517
- let e = setInterval(() => n(Hr), 1e3);
10624
+ let e = setInterval(() => n(Zr), 1e3);
10518
10625
  return () => clearInterval(e);
10519
10626
  }, a = [], e[0] = i, e[1] = a) : (i = e[0], a = e[1]), r(i, a);
10520
10627
  let o = String(Math.floor(t / 60)), c;
@@ -10522,14 +10629,14 @@ function Vr() {
10522
10629
  let l = String(t % 60), u;
10523
10630
  return e[4] === l ? u = e[5] : (u = l.padStart(2, "00"), e[4] = l, e[5] = u), `${c}:${u}`;
10524
10631
  }
10525
- function Hr(e) {
10632
+ function Zr(e) {
10526
10633
  return e + 1;
10527
10634
  }
10528
- function Ur(e) {
10635
+ function Qr(e) {
10529
10636
  let t = (0, g.c)(14), { participant: n, isLocal: i } = e, a = o(null), s, c;
10530
10637
  t[0] === n.videoStream ? (s = t[1], c = t[2]) : (s = () => {
10531
10638
  let e = a.current;
10532
- !e || !n.videoStream || (e.srcObject = n.videoStream, e.play().catch(Wr));
10639
+ !e || !n.videoStream || (e.srcObject = n.videoStream, e.play().catch($r));
10533
10640
  }, c = [n.videoStream], t[0] = n.videoStream, t[1] = s, t[2] = c), r(s, c);
10534
10641
  let d;
10535
10642
  t[3] !== i || t[4] !== n.avatarSrc || t[5] !== n.name || t[6] !== n.videoStream ? (d = n.videoStream ? /* @__PURE__ */ l("video", {
@@ -10566,9 +10673,9 @@ function Ur(e) {
10566
10673
  children: [d, m]
10567
10674
  }), t[11] = d, t[12] = m, t[13] = h) : h = t[13], h;
10568
10675
  }
10569
- function Wr() {}
10570
- var Gr = 110, Kr = 160;
10571
- function qr(e) {
10676
+ function $r() {}
10677
+ var ei = 110, ti = 160;
10678
+ function ni(e) {
10572
10679
  let t = (0, g.c)(31), { participant: n, isLocal: i, position: a, onPositionChange: s, onClick: c } = e, d = o(null), f = o(!1), p;
10573
10680
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (p = {
10574
10681
  x: 0,
@@ -10577,9 +10684,9 @@ function qr(e) {
10577
10684
  let m = o(p), h = o(!1), _, v;
10578
10685
  t[1] === n.videoStream ? (_ = t[2], v = t[3]) : (_ = () => {
10579
10686
  let e = d.current;
10580
- !e || !n.videoStream || (e.srcObject = n.videoStream, e.play().catch(Yr));
10687
+ !e || !n.videoStream || (e.srcObject = n.videoStream, e.play().catch(ii));
10581
10688
  }, v = [n.videoStream], t[1] = n.videoStream, t[2] = _, t[3] = v), r(_, v);
10582
- let y = Jr, b;
10689
+ let y = ri, b;
10583
10690
  t[4] !== a.x || t[5] !== a.y ? (b = (e) => {
10584
10691
  f.current = !0, h.current = !1, m.current = {
10585
10692
  x: e.clientX - a.x,
@@ -10602,8 +10709,8 @@ function qr(e) {
10602
10709
  position: "fixed",
10603
10710
  left: a.x,
10604
10711
  top: a.y,
10605
- width: Gr,
10606
- height: Kr,
10712
+ width: ei,
10713
+ height: ti,
10607
10714
  borderRadius: 14,
10608
10715
  overflow: "hidden",
10609
10716
  boxShadow: "0 4px 24px rgba(0,0,0,0.6)",
@@ -10710,18 +10817,18 @@ function qr(e) {
10710
10817
  ]
10711
10818
  }), t[24] = x, t[25] = C, t[26] = T, t[27] = A, t[28] = E, t[29] = D, t[30] = N) : N = t[30], N;
10712
10819
  }
10713
- function Jr(e) {
10820
+ function ri(e) {
10714
10821
  return {
10715
- x: Math.max(8, Math.min(window.innerWidth - Gr - 8, e.x)),
10716
- y: Math.max(8, Math.min(window.innerHeight - Kr - 8, e.y))
10822
+ x: Math.max(8, Math.min(window.innerWidth - ei - 8, e.x)),
10823
+ y: Math.max(8, Math.min(window.innerHeight - ti - 8, e.y))
10717
10824
  };
10718
10825
  }
10719
- function Yr() {}
10720
- function Xr(e) {
10721
- let t = (0, g.c)(63), { title: n, participants: i, localParticipant: a, remoteStream: c, conversationId: d, onEnd: f, onMute: p, onCamera: m, onParticipants: h, onMore: _, onMinimize: v } = e, [y, b] = s(!1), [x, S] = s(!1), [C, w] = s(!1), T = Vr(), E = o(null), [D, O] = s(!0), [k, A] = s(ei), j, M;
10826
+ function ii() {}
10827
+ function ai(e) {
10828
+ let t = (0, g.c)(63), { title: n, participants: i, localParticipant: a, remoteStream: c, conversationId: d, onEnd: f, onMute: p, onCamera: m, onParticipants: h, onMore: _, onMinimize: v } = e, [y, b] = s(!1), [x, S] = s(!1), [C, w] = s(!1), T = Xr(), E = o(null), [D, O] = s(!0), [k, A] = s(li), j, M;
10722
10829
  t[0] === c ? (j = t[1], M = t[2]) : (j = () => {
10723
10830
  let e = E.current;
10724
- !e || !c || e.srcObject !== c && (e.srcObject = c, e.play().catch($r));
10831
+ !e || !c || e.srcObject !== c && (e.srcObject = c, e.play().catch(ci));
10725
10832
  }, M = [c], t[0] = c, t[1] = j, t[2] = M), r(j, M);
10726
10833
  let N;
10727
10834
  t[3] !== i[0] || t[4] !== c || t[5] !== n ? (N = i[0] ?? {
@@ -10735,7 +10842,7 @@ function Xr(e) {
10735
10842
  videoStream: F
10736
10843
  }, t[7] = P, t[8] = F, t[9] = I) : I = t[9];
10737
10844
  let L = I, R = D ? L : a, z = D ? a : L, B = !D, V = D, H;
10738
- t[10] === Symbol.for("react.memo_cache_sentinel") ? (H = () => O(Qr), t[10] = H) : H = t[10];
10845
+ t[10] === Symbol.for("react.memo_cache_sentinel") ? (H = () => O(si), t[10] = H) : H = t[10];
10739
10846
  let U = H, W;
10740
10847
  t[11] === Symbol.for("react.memo_cache_sentinel") ? (W = { background: "#000" }, t[11] = W) : W = t[11];
10741
10848
  let G;
@@ -10746,7 +10853,7 @@ function Xr(e) {
10746
10853
  style: { display: "none" }
10747
10854
  }), t[12] = G) : G = t[12];
10748
10855
  let K;
10749
- t[13] !== B || t[14] !== R ? (K = /* @__PURE__ */ l(Ur, {
10856
+ t[13] !== B || t[14] !== R ? (K = /* @__PURE__ */ l(Qr, {
10750
10857
  participant: R,
10751
10858
  isLocal: B
10752
10859
  }), t[13] = B, t[14] = R, t[15] = K) : K = t[15];
@@ -10812,7 +10919,7 @@ function Xr(e) {
10812
10919
  children: [ee, Q]
10813
10920
  }), t[28] = ee, t[29] = Q, t[30] = te) : te = t[30];
10814
10921
  let ne;
10815
- t[31] !== V || t[32] !== z || t[33] !== k ? (ne = /* @__PURE__ */ l(qr, {
10922
+ t[31] !== V || t[32] !== z || t[33] !== k ? (ne = /* @__PURE__ */ l(ni, {
10816
10923
  participant: z,
10817
10924
  isLocal: V,
10818
10925
  position: k,
@@ -10830,11 +10937,11 @@ function Xr(e) {
10830
10937
  S(e), m?.(e);
10831
10938
  }, t[38] = x, t[39] = m, t[40] = ie) : ie = t[40];
10832
10939
  let ae;
10833
- t[41] === d ? ae = t[42] : (ae = d ? () => w(Zr) : void 0, t[41] = d, t[42] = ae);
10940
+ t[41] === d ? ae = t[42] : (ae = d ? () => w(oi) : void 0, t[41] = d, t[42] = ae);
10834
10941
  let oe;
10835
10942
  t[43] !== x || t[44] !== y || t[45] !== f || t[46] !== _ || t[47] !== h || t[48] !== re || t[49] !== $ || t[50] !== ie || t[51] !== ae ? (oe = /* @__PURE__ */ l("div", {
10836
10943
  className: "absolute bottom-0 left-0 right-0 z-20",
10837
- children: /* @__PURE__ */ l(Nr, {
10944
+ children: /* @__PURE__ */ l(Hr, {
10838
10945
  muted: y,
10839
10946
  cameraOff: x,
10840
10947
  speakerOn: !1,
@@ -10851,7 +10958,7 @@ function Xr(e) {
10851
10958
  let se;
10852
10959
  t[53] === Symbol.for("react.memo_cache_sentinel") ? (se = () => w(!1), t[53] = se) : se = t[53];
10853
10960
  let ce;
10854
- t[54] !== C || t[55] !== d ? (ce = /* @__PURE__ */ l(Ir, {
10961
+ t[54] !== C || t[55] !== d ? (ce = /* @__PURE__ */ l(Gr, {
10855
10962
  open: C,
10856
10963
  conversationId: d,
10857
10964
  onClose: se
@@ -10870,22 +10977,22 @@ function Xr(e) {
10870
10977
  ]
10871
10978
  }), t[57] = te, t[58] = ne, t[59] = oe, t[60] = ce, t[61] = K, t[62] = le) : le = t[62], le;
10872
10979
  }
10873
- function Zr(e) {
10980
+ function oi(e) {
10874
10981
  return !e;
10875
10982
  }
10876
- function Qr(e) {
10983
+ function si(e) {
10877
10984
  return !e;
10878
10985
  }
10879
- function $r() {}
10880
- function ei() {
10986
+ function ci() {}
10987
+ function li() {
10881
10988
  return {
10882
- x: typeof window < "u" ? window.innerWidth - Gr - 16 : 200,
10989
+ x: typeof window < "u" ? window.innerWidth - ei - 16 : 200,
10883
10990
  y: 80
10884
10991
  };
10885
10992
  }
10886
10993
  //#endregion
10887
10994
  //#region src/components/call/IncomingCallModal.tsx
10888
- function ti(e) {
10995
+ function ui(e) {
10889
10996
  let t = (0, g.c)(33), { callerName: n, callerAvatar: r, callType: i, onAccept: a, onReject: o } = e, s;
10890
10997
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
10891
10998
  background: "rgba(0,0,0,0.6)",
@@ -10894,7 +11001,7 @@ function ti(e) {
10894
11001
  let d, f;
10895
11002
  t[1] === Symbol.for("react.memo_cache_sentinel") ? (d = { backgroundColor: "var(--oc-card)" }, f = /* @__PURE__ */ l("div", { className: "w-10 h-1 rounded-full bg-border" }), t[1] = d, t[2] = f) : (d = t[1], f = t[2]);
10896
11003
  let p;
10897
- t[3] !== r || t[4] !== n ? (p = /* @__PURE__ */ l(ve, {
11004
+ t[3] !== r || t[4] !== n ? (p = /* @__PURE__ */ l(De, {
10898
11005
  src: r,
10899
11006
  name: n,
10900
11007
  size: 80,
@@ -11018,14 +11125,14 @@ function ti(e) {
11018
11125
  }
11019
11126
  //#endregion
11020
11127
  //#region src/components/call/OutgoingCallScreen.tsx
11021
- var ni = {
11128
+ var di = {
11022
11129
  ringing: "Ringing…",
11023
11130
  active: "Connected"
11024
11131
  };
11025
- function ri(e) {
11132
+ function fi(e) {
11026
11133
  let t = (0, g.c)(38), { calleeName: n, calleeAvatar: i, callType: a, state: o, onCancel: c } = e, [d, f] = s(0), p, m;
11027
11134
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (p = () => {
11028
- let e = setInterval(() => f(ii), 1200);
11135
+ let e = setInterval(() => f(pi), 1200);
11029
11136
  return () => clearInterval(e);
11030
11137
  }, m = [], t[0] = p, t[1] = m) : (p = t[0], m = t[1]), r(p, m);
11031
11138
  let h;
@@ -11043,7 +11150,7 @@ function ri(e) {
11043
11150
  color: "var(--oc-primary)",
11044
11151
  opacity: y
11045
11152
  }, t[5] = y, t[6] = b);
11046
- let x = ni[o] ?? "Calling…", S;
11153
+ let x = di[o] ?? "Calling…", S;
11047
11154
  t[7] !== b || t[8] !== x ? (S = /* @__PURE__ */ l("span", {
11048
11155
  className: "text-base font-semibold",
11049
11156
  style: b,
@@ -11071,7 +11178,7 @@ function ri(e) {
11071
11178
  }
11072
11179
  }, e)), t[13] = d, t[14] = o, t[15] = w) : w = t[15];
11073
11180
  let T;
11074
- t[16] !== i || t[17] !== n ? (T = /* @__PURE__ */ l(ve, {
11181
+ t[16] !== i || t[17] !== n ? (T = /* @__PURE__ */ l(De, {
11075
11182
  src: i,
11076
11183
  name: n,
11077
11184
  size: 120
@@ -11135,12 +11242,12 @@ function ri(e) {
11135
11242
  ]
11136
11243
  }), t[33] = C, t[34] = E, t[35] = A, t[36] = N, t[37] = P) : P = t[37], P;
11137
11244
  }
11138
- function ii(e) {
11245
+ function pi(e) {
11139
11246
  return e + 1;
11140
11247
  }
11141
11248
  //#endregion
11142
11249
  //#region src/widgets/VideoCall.tsx
11143
- function ai() {
11250
+ function mi() {
11144
11251
  let e = (0, g.c)(42), { call: t, localStream: n, remoteStream: r, acceptCall: i, rejectCall: a, endCall: o, toggleMute: s, toggleCamera: c, dismissEnded: d } = P();
11145
11252
  if (!t || t.state === "idle") return null;
11146
11253
  if (t.state === "ended") {
@@ -11173,7 +11280,7 @@ function ai() {
11173
11280
  }
11174
11281
  if (t.state === "incoming") {
11175
11282
  let n = t.remoteUserName ?? t.remoteUserId, r;
11176
- return e[5] !== i || e[6] !== t.callType || e[7] !== t.remoteAvatarSrc || e[8] !== a || e[9] !== n ? (r = /* @__PURE__ */ l(ti, {
11283
+ return e[5] !== i || e[6] !== t.callType || e[7] !== t.remoteAvatarSrc || e[8] !== a || e[9] !== n ? (r = /* @__PURE__ */ l(ui, {
11177
11284
  callerName: n,
11178
11285
  callerAvatar: t.remoteAvatarSrc,
11179
11286
  callType: t.callType,
@@ -11183,7 +11290,7 @@ function ai() {
11183
11290
  }
11184
11291
  if (t.state === "ringing") {
11185
11292
  let n = t.remoteUserName ?? t.remoteUserId, r;
11186
- return e[11] !== t.callType || e[12] !== t.remoteAvatarSrc || e[13] !== o || e[14] !== n ? (r = /* @__PURE__ */ l(ri, {
11293
+ return e[11] !== t.callType || e[12] !== t.remoteAvatarSrc || e[13] !== o || e[14] !== n ? (r = /* @__PURE__ */ l(fi, {
11187
11294
  calleeName: n,
11188
11295
  calleeAvatar: t.remoteAvatarSrc,
11189
11296
  callType: t.callType,
@@ -11196,7 +11303,7 @@ function ai() {
11196
11303
  let p = f;
11197
11304
  if (t.callType === "voice") {
11198
11305
  let n = t.remoteUserName ?? t.remoteUserId, i;
11199
- return e[18] !== t.conversationId || e[19] !== t.remoteAvatarSrc || e[20] !== o || e[21] !== p || e[22] !== r || e[23] !== n ? (i = /* @__PURE__ */ l(Br, {
11306
+ return e[18] !== t.conversationId || e[19] !== t.remoteAvatarSrc || e[20] !== o || e[21] !== p || e[22] !== r || e[23] !== n ? (i = /* @__PURE__ */ l(Yr, {
11200
11307
  callerName: n,
11201
11308
  callerAvatar: t.remoteAvatarSrc,
11202
11309
  callType: "voice",
@@ -11221,7 +11328,7 @@ function ai() {
11221
11328
  videoStream: y
11222
11329
  }, e[31] = y, e[32] = b);
11223
11330
  let x;
11224
- return e[33] !== t.conversationId || e[34] !== o || e[35] !== r || e[36] !== m || e[37] !== v || e[38] !== b || e[39] !== c || e[40] !== s ? (x = /* @__PURE__ */ l(Xr, {
11331
+ return e[33] !== t.conversationId || e[34] !== o || e[35] !== r || e[36] !== m || e[37] !== v || e[38] !== b || e[39] !== c || e[40] !== s ? (x = /* @__PURE__ */ l(ai, {
11225
11332
  title: m,
11226
11333
  participants: v,
11227
11334
  localParticipant: b,
@@ -11234,17 +11341,17 @@ function ai() {
11234
11341
  }
11235
11342
  //#endregion
11236
11343
  //#region src/components/meeting/ParticipantGrid.tsx
11237
- function oi(e) {
11344
+ function hi(e) {
11238
11345
  let t = (0, g.c)(26), { p: n, isLocal: i } = e, a = o(null), s = o(null), c, d;
11239
11346
  t[0] === n.videoStream ? (c = t[1], d = t[2]) : (c = () => {
11240
11347
  let e = a.current;
11241
- !e || !n.videoStream || e.srcObject !== n.videoStream && (e.srcObject = n.videoStream, e.play().catch(ci));
11348
+ !e || !n.videoStream || e.srcObject !== n.videoStream && (e.srcObject = n.videoStream, e.play().catch(_i));
11242
11349
  }, d = [n.videoStream], t[0] = n.videoStream, t[1] = c, t[2] = d), r(c, d);
11243
11350
  let f, p;
11244
11351
  t[3] !== i || t[4] !== n.videoStream ? (f = () => {
11245
11352
  if (i) return;
11246
11353
  let e = s.current;
11247
- !e || !n.videoStream || e.srcObject !== n.videoStream && (e.srcObject = n.videoStream, e.play().catch(si));
11354
+ !e || !n.videoStream || e.srcObject !== n.videoStream && (e.srcObject = n.videoStream, e.play().catch(gi));
11248
11355
  }, p = [n.videoStream, i], t[3] = i, t[4] = n.videoStream, t[5] = f, t[6] = p) : (f = t[5], p = t[6]), r(f, p);
11249
11356
  let m = n.isActiveSpeaker ? "2px solid var(--oc-success)" : "2px solid transparent", h;
11250
11357
  t[7] === m ? h = t[8] : (h = { border: m }, t[7] = m, t[8] = h);
@@ -11312,26 +11419,26 @@ function oi(e) {
11312
11419
  ]
11313
11420
  }), t[20] = b, t[21] = x, t[22] = h, t[23] = _, t[24] = v, t[25] = S) : S = t[25], S;
11314
11421
  }
11315
- function si() {}
11316
- function ci() {}
11317
- function li(e) {
11318
- let t = (0, g.c)(13), { participants: n, localParticipant: r } = e, i;
11422
+ function gi() {}
11423
+ function _i() {}
11424
+ function vi(e) {
11425
+ let t = (0, g.c)(14), { participants: n, localParticipant: r } = e, i;
11319
11426
  t[0] !== r || t[1] !== n ? (i = [r, ...n], t[0] = r, t[1] = n, t[2] = i) : i = t[2];
11320
11427
  let a = i, o;
11321
- t[3] === a ? o = t[4] : (o = a.slice(0, 4), t[3] = a, t[4] = o);
11322
- let s = o, c = a.length - 4, d = a.length === 1 ? "1fr" : "1fr 1fr", f;
11323
- t[5] === d ? f = t[6] : (f = {
11324
- gridTemplateColumns: d,
11325
- gridTemplateRows: "1fr 1fr",
11428
+ t[3] === a ? o = t[4] : (o = a.slice(0, 9), t[3] = a, t[4] = o);
11429
+ let s = o, c = a.length - 9, d = a.length === 1 ? 1 : a.length <= 4 ? 2 : 3, f = Math.ceil(s.length / d), p = `repeat(${d}, 1fr)`, m = `repeat(${f}, 1fr)`, h;
11430
+ t[5] !== p || t[6] !== m ? (h = {
11431
+ gridTemplateColumns: p,
11432
+ gridTemplateRows: m,
11326
11433
  background: "var(--oc-background)"
11327
- }, t[5] = d, t[6] = f);
11328
- let p;
11329
- t[7] !== c || t[8] !== s ? (p = s.map((e, t) => /* @__PURE__ */ u("div", {
11434
+ }, t[5] = p, t[6] = m, t[7] = h) : h = t[7];
11435
+ let _;
11436
+ t[8] !== c || t[9] !== s ? (_ = s.map((e, t) => /* @__PURE__ */ u("div", {
11330
11437
  className: "relative",
11331
- children: [/* @__PURE__ */ l(oi, {
11438
+ children: [/* @__PURE__ */ l(hi, {
11332
11439
  p: e,
11333
11440
  isLocal: t === 0
11334
- }), t === 3 && c > 0 && /* @__PURE__ */ u("div", {
11441
+ }), t === s.length - 1 && c > 0 && /* @__PURE__ */ u("div", {
11335
11442
  className: "absolute inset-0 flex items-center justify-center bg-black/60 text-white text-sm font-semibold",
11336
11443
  children: [
11337
11444
  "+",
@@ -11339,17 +11446,17 @@ function li(e) {
11339
11446
  " more"
11340
11447
  ]
11341
11448
  })]
11342
- }, e.id)), t[7] = c, t[8] = s, t[9] = p) : p = t[9];
11343
- let m;
11344
- return t[10] !== f || t[11] !== p ? (m = /* @__PURE__ */ l("div", {
11449
+ }, e.id)), t[8] = c, t[9] = s, t[10] = _) : _ = t[10];
11450
+ let v;
11451
+ return t[11] !== h || t[12] !== _ ? (v = /* @__PURE__ */ l("div", {
11345
11452
  className: "flex-1 grid gap-0.5",
11346
- style: f,
11347
- children: p
11348
- }), t[10] = f, t[11] = p, t[12] = m) : m = t[12], m;
11453
+ style: h,
11454
+ children: _
11455
+ }), t[11] = h, t[12] = _, t[13] = v) : v = t[13], v;
11349
11456
  }
11350
11457
  //#endregion
11351
11458
  //#region src/components/meeting/MeetingControls.tsx
11352
- var ui = "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3zM19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8", di = "M1 1l22 22M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23M12 19v4M8 23h8", fi = "M15 10l4.553-2.069A1 1 0 0 1 21 8.82v6.36a1 1 0 0 1-1.447.89L15 14M3 8a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", pi = "M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10M1 1l22 22", mi = "M2 3h20v14H2zM8 21h8M12 17v4", hi = "M18 11V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v0M14 10V4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v2M10 10.5V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v8M6 14v0a4 4 0 0 0 4 4h4a4 4 0 0 0 4-4v-2.5", gi = "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75", _i = "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zM8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01", vi = "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 3.88 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 9.91M23 1 1 23", yi = [
11459
+ var yi = "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3zM19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8", bi = "M1 1l22 22M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23M12 19v4M8 23h8", xi = "M15 10l4.553-2.069A1 1 0 0 1 21 8.82v6.36a1 1 0 0 1-1.447.89L15 14M3 8a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", Si = "M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10M1 1l22 22", Ci = "M2 3h20v14H2zM8 21h8M12 17v4", wi = "M18 11V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v0M14 10V4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v2M10 10.5V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v8M6 14v0a4 4 0 0 0 4 4h4a4 4 0 0 0 4-4v-2.5", Ti = "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75", Ei = "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zM8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01", Di = "M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 3.88 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 9.91M23 1 1 23", Oi = [
11353
11460
  "👍",
11354
11461
  "❤️",
11355
11462
  "😂",
@@ -11357,7 +11464,7 @@ var ui = "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3zM19 10v2a7 7 0 0 1
11357
11464
  "👏",
11358
11465
  "🎉"
11359
11466
  ];
11360
- function bi(e) {
11467
+ function ki(e) {
11361
11468
  let t = (0, g.c)(31), { icon: n, label: r, active: i, danger: a, badge: o, onClick: s, size: c, disabled: d } = e, f = c === void 0 ? "sm" : c, p = f === "lg" ? 60 : 50, m = f === "lg" ? 24 : 20, h = a ? "linear-gradient(135deg, #ef4444, #dc2626)" : i ? "rgba(233,30,99,0.18)" : "rgba(255,255,255,0.1)", _ = i ? "1px solid rgba(233,30,99,0.35)" : a ? "none" : "1px solid transparent", v = a ? "0 4px 20px rgba(239,68,68,0.45)" : "none", y = d ? .4 : 1, b;
11362
11469
  t[0] !== p || t[1] !== y ? (b = {
11363
11470
  minWidth: p,
@@ -11413,7 +11520,7 @@ function bi(e) {
11413
11520
  children: [E, k]
11414
11521
  }), t[25] = d, t[26] = s, t[27] = k, t[28] = b, t[29] = E, t[30] = A) : A = t[30], A;
11415
11522
  }
11416
- function xi(e) {
11523
+ function Ai(e) {
11417
11524
  let t = (0, g.c)(53), { muted: n, cameraOff: r, screenSharing: i, handRaised: a, participantCount: o, onMute: c, onCamera: d, onScreenShare: f, onHandRaise: p, onReaction: m, onParticipants: h, onEnd: _ } = e, [v, y] = s(!1), b;
11418
11525
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (b = {
11419
11526
  backgroundColor: "rgba(13,17,23,0.9)",
@@ -11429,7 +11536,7 @@ function xi(e) {
11429
11536
  border: "1px solid rgba(255,255,255,0.1)",
11430
11537
  boxShadow: "0 8px 32px rgba(0,0,0,0.5)"
11431
11538
  },
11432
- children: yi.map((e) => /* @__PURE__ */ l("button", {
11539
+ children: Oi.map((e) => /* @__PURE__ */ l("button", {
11433
11540
  onClick: () => {
11434
11541
  m(e), y(!1);
11435
11542
  },
@@ -11438,19 +11545,19 @@ function xi(e) {
11438
11545
  children: e
11439
11546
  }, e))
11440
11547
  }), t[1] = m, t[2] = v, t[3] = x) : x = t[3];
11441
- let S = n ? di : ui, C = n ? "Unmute" : "Mute", w;
11548
+ let S = n ? bi : yi, C = n ? "Unmute" : "Mute", w;
11442
11549
  t[4] !== n || t[5] !== c ? (w = () => c(!n), t[4] = n, t[5] = c, t[6] = w) : w = t[6];
11443
11550
  let T;
11444
- t[7] !== n || t[8] !== S || t[9] !== C || t[10] !== w ? (T = /* @__PURE__ */ l(bi, {
11551
+ t[7] !== n || t[8] !== S || t[9] !== C || t[10] !== w ? (T = /* @__PURE__ */ l(ki, {
11445
11552
  icon: S,
11446
11553
  label: C,
11447
11554
  danger: n,
11448
11555
  onClick: w
11449
11556
  }), t[7] = n, t[8] = S, t[9] = C, t[10] = w, t[11] = T) : T = t[11];
11450
- let E = r ? pi : fi, D = r ? "Start video" : "Stop video", O = !r, k;
11557
+ let E = r ? Si : xi, D = r ? "Start video" : "Stop video", O = !r, k;
11451
11558
  t[12] !== r || t[13] !== d ? (k = () => d(!r), t[12] = r, t[13] = d, t[14] = k) : k = t[14];
11452
11559
  let A;
11453
- t[15] !== k || t[16] !== E || t[17] !== D || t[18] !== O ? (A = /* @__PURE__ */ l(bi, {
11560
+ t[15] !== k || t[16] !== E || t[17] !== D || t[18] !== O ? (A = /* @__PURE__ */ l(ki, {
11454
11561
  icon: E,
11455
11562
  label: D,
11456
11563
  active: O,
@@ -11459,8 +11566,8 @@ function xi(e) {
11459
11566
  let j = i ? "Stop share" : "Share", M;
11460
11567
  t[20] !== f || t[21] !== i ? (M = () => f(!i), t[20] = f, t[21] = i, t[22] = M) : M = t[22];
11461
11568
  let N;
11462
- t[23] !== i || t[24] !== j || t[25] !== M ? (N = /* @__PURE__ */ l(bi, {
11463
- icon: mi,
11569
+ t[23] !== i || t[24] !== j || t[25] !== M ? (N = /* @__PURE__ */ l(ki, {
11570
+ icon: Ci,
11464
11571
  label: j,
11465
11572
  active: i,
11466
11573
  onClick: M
@@ -11468,24 +11575,24 @@ function xi(e) {
11468
11575
  let P = a ? "Lower hand" : "Raise hand", F;
11469
11576
  t[27] !== a || t[28] !== p ? (F = () => p(!a), t[27] = a, t[28] = p, t[29] = F) : F = t[29];
11470
11577
  let I;
11471
- t[30] !== a || t[31] !== P || t[32] !== F ? (I = /* @__PURE__ */ l(bi, {
11472
- icon: hi,
11578
+ t[30] !== a || t[31] !== P || t[32] !== F ? (I = /* @__PURE__ */ l(ki, {
11579
+ icon: wi,
11473
11580
  label: P,
11474
11581
  active: a,
11475
11582
  onClick: F
11476
11583
  }), t[30] = a, t[31] = P, t[32] = F, t[33] = I) : I = t[33];
11477
11584
  let L;
11478
- t[34] === Symbol.for("react.memo_cache_sentinel") ? (L = () => y(Si), t[34] = L) : L = t[34];
11585
+ t[34] === Symbol.for("react.memo_cache_sentinel") ? (L = () => y(ji), t[34] = L) : L = t[34];
11479
11586
  let R;
11480
- t[35] === v ? R = t[36] : (R = /* @__PURE__ */ l(bi, {
11481
- icon: _i,
11587
+ t[35] === v ? R = t[36] : (R = /* @__PURE__ */ l(ki, {
11588
+ icon: Ei,
11482
11589
  label: "React",
11483
11590
  active: v,
11484
11591
  onClick: L
11485
11592
  }), t[35] = v, t[36] = R);
11486
11593
  let z;
11487
- t[37] !== h || t[38] !== o ? (z = /* @__PURE__ */ l(bi, {
11488
- icon: gi,
11594
+ t[37] !== h || t[38] !== o ? (z = /* @__PURE__ */ l(ki, {
11595
+ icon: Ti,
11489
11596
  label: "People",
11490
11597
  badge: o,
11491
11598
  onClick: h
@@ -11505,8 +11612,8 @@ function xi(e) {
11505
11612
  let V;
11506
11613
  t[47] === _ ? V = t[48] : (V = /* @__PURE__ */ l("div", {
11507
11614
  className: "flex justify-center mt-3 mb-8",
11508
- children: /* @__PURE__ */ l(bi, {
11509
- icon: vi,
11615
+ children: /* @__PURE__ */ l(ki, {
11616
+ icon: Di,
11510
11617
  label: "Leave",
11511
11618
  danger: !0,
11512
11619
  onClick: _,
@@ -11524,12 +11631,12 @@ function xi(e) {
11524
11631
  ]
11525
11632
  }), t[49] = x, t[50] = B, t[51] = V, t[52] = H) : H = t[52], H;
11526
11633
  }
11527
- function Si(e) {
11634
+ function ji(e) {
11528
11635
  return !e;
11529
11636
  }
11530
11637
  //#endregion
11531
11638
  //#region src/components/meeting/ParticipantsPanel.tsx
11532
- function Ci(e) {
11639
+ function Mi(e) {
11533
11640
  let t = (0, g.c)(35), { participants: n, localParticipant: r, handRaisedIds: i, onClose: a } = e, o, s, d, f, p, m, h;
11534
11641
  if (t[0] !== i || t[1] !== r || t[2] !== a || t[3] !== n) {
11535
11642
  let e = [r, ...n], c;
@@ -11659,22 +11766,22 @@ function Ci(e) {
11659
11766
  }
11660
11767
  //#endregion
11661
11768
  //#region src/components/meeting/ReactionBurst.tsx
11662
- function wi(e) {
11769
+ function Ni(e) {
11663
11770
  let t = (0, g.c)(4), { reactions: n } = e, r;
11664
- t[0] === n ? r = t[1] : (r = n.map(Ti), t[0] = n, t[1] = r);
11771
+ t[0] === n ? r = t[1] : (r = n.map(Pi), t[0] = n, t[1] = r);
11665
11772
  let i;
11666
11773
  return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ l("div", {
11667
11774
  className: "absolute inset-0 pointer-events-none z-30 overflow-hidden",
11668
11775
  children: r
11669
11776
  }), t[2] = r, t[3] = i), i;
11670
11777
  }
11671
- function Ti(e) {
11672
- return /* @__PURE__ */ l(Ei, {
11778
+ function Pi(e) {
11779
+ return /* @__PURE__ */ l(Fi, {
11673
11780
  emoji: e.emoji,
11674
11781
  name: e.name
11675
11782
  }, e.id);
11676
11783
  }
11677
- function Ei(e) {
11784
+ function Fi(e) {
11678
11785
  let t = (0, g.c)(13), { emoji: n, name: i } = e, [a, o] = s(!0), c = 10 + Math.random() * 70, d, f;
11679
11786
  if (t[0] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
11680
11787
  let e = setTimeout(() => o(!1), 3e3);
@@ -11728,10 +11835,10 @@ function Ei(e) {
11728
11835
  }
11729
11836
  //#endregion
11730
11837
  //#region src/components/meeting/MeetingRoom.tsx
11731
- function Di() {
11838
+ function Ii() {
11732
11839
  let e = (0, g.c)(6), [t, n] = s(0), i, a;
11733
11840
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
11734
- let e = setInterval(() => n(Oi), 1e3);
11841
+ let e = setInterval(() => n(Li), 1e3);
11735
11842
  return () => clearInterval(e);
11736
11843
  }, a = [], e[0] = i, e[1] = a) : (i = e[0], a = e[1]), r(i, a);
11737
11844
  let o = String(Math.floor(t / 60)), c;
@@ -11739,15 +11846,15 @@ function Di() {
11739
11846
  let l = String(t % 60), u;
11740
11847
  return e[4] === l ? u = e[5] : (u = l.padStart(2, "0"), e[4] = l, e[5] = u), `${c}:${u}`;
11741
11848
  }
11742
- function Oi(e) {
11849
+ function Li(e) {
11743
11850
  return e + 1;
11744
11851
  }
11745
- function ki(e) {
11852
+ function Ri(e) {
11746
11853
  let t = (0, g.c)(74), { title: n, participants: r, localParticipant: i, activeSpeakerId: a, handRaisedIds: o, reactionEvents: c, onEnd: d, onMute: f, onCamera: p, onScreenShare: m, onHandRaise: h, onReaction: _, onMinimize: v } = e, y;
11747
11854
  t[0] === o ? y = t[1] : (y = o === void 0 ? [] : o, t[0] = o, t[1] = y);
11748
11855
  let b = y, x;
11749
11856
  t[2] === c ? x = t[3] : (x = c === void 0 ? [] : c, t[2] = c, t[3] = x);
11750
- let S = x, [C, w] = s(!1), [T, E] = s(!1), [D, O] = s(!1), [k, A] = s(!1), [j, M] = s(!1), N = Di(), P = r.length + 1, F;
11857
+ let S = x, [C, w] = s(!1), [T, E] = s(!1), [D, O] = s(!1), [k, A] = s(!1), [j, M] = s(!1), N = Ii(), P = r.length + 1, F;
11751
11858
  if (t[4] !== a || t[5] !== r) {
11752
11859
  let e;
11753
11860
  t[7] === a ? e = t[8] : (e = (e) => ({
@@ -11761,7 +11868,7 @@ function ki(e) {
11761
11868
  isActiveSpeaker: L
11762
11869
  }, t[9] = i, t[10] = L, t[11] = R) : R = t[11];
11763
11870
  let z = R, B;
11764
- t[12] === r ? B = t[13] : (B = r.find(Ai), t[12] = r, t[13] = B);
11871
+ t[12] === r ? B = t[13] : (B = r.find(zi), t[12] = r, t[13] = B);
11765
11872
  let V = B, H;
11766
11873
  t[14] === f ? H = t[15] : (H = (e) => {
11767
11874
  w(e), f(e);
@@ -11779,12 +11886,12 @@ function ki(e) {
11779
11886
  A(e), h(e);
11780
11887
  }, t[20] = h, t[21] = J);
11781
11888
  let Y = J, X;
11782
- t[22] !== z || t[23] !== I ? (X = /* @__PURE__ */ l(li, {
11889
+ t[22] !== z || t[23] !== I ? (X = /* @__PURE__ */ l(vi, {
11783
11890
  participants: I,
11784
11891
  localParticipant: z
11785
11892
  }), t[22] = z, t[23] = I, t[24] = X) : X = t[24];
11786
11893
  let Z;
11787
- t[25] === S ? Z = t[26] : (Z = /* @__PURE__ */ l(wi, { reactions: S }), t[25] = S, t[26] = Z);
11894
+ t[25] === S ? Z = t[26] : (Z = /* @__PURE__ */ l(Ni, { reactions: S }), t[25] = S, t[26] = Z);
11788
11895
  let ee;
11789
11896
  t[27] === Symbol.for("react.memo_cache_sentinel") ? (ee = { background: "linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%)" }, t[27] = ee) : ee = t[27];
11790
11897
  let Q;
@@ -11883,7 +11990,7 @@ function ki(e) {
11883
11990
  let le;
11884
11991
  t[50] === Symbol.for("react.memo_cache_sentinel") ? (le = () => M(!0), t[50] = le) : le = t[50];
11885
11992
  let ue;
11886
- t[51] !== T || t[52] !== k || t[53] !== G || t[54] !== Y || t[55] !== U || t[56] !== q || t[57] !== C || t[58] !== d || t[59] !== _ || t[60] !== D || t[61] !== P ? (ue = /* @__PURE__ */ l(xi, {
11993
+ t[51] !== T || t[52] !== k || t[53] !== G || t[54] !== Y || t[55] !== U || t[56] !== q || t[57] !== C || t[58] !== d || t[59] !== _ || t[60] !== D || t[61] !== P ? (ue = /* @__PURE__ */ l(Ai, {
11887
11994
  muted: C,
11888
11995
  cameraOff: T,
11889
11996
  screenSharing: D,
@@ -11898,7 +12005,7 @@ function ki(e) {
11898
12005
  onEnd: d
11899
12006
  }), t[51] = T, t[52] = k, t[53] = G, t[54] = Y, t[55] = U, t[56] = q, t[57] = C, t[58] = d, t[59] = _, t[60] = D, t[61] = P, t[62] = ue) : ue = t[62];
11900
12007
  let de;
11901
- t[63] !== z || t[64] !== I || t[65] !== b || t[66] !== j ? (de = j && /* @__PURE__ */ l(Ci, {
12008
+ t[63] !== z || t[64] !== I || t[65] !== b || t[66] !== j ? (de = j && /* @__PURE__ */ l(Mi, {
11902
12009
  participants: I,
11903
12010
  localParticipant: z,
11904
12011
  handRaisedIds: b,
@@ -11916,15 +12023,15 @@ function ki(e) {
11916
12023
  ]
11917
12024
  }), t[68] = X, t[69] = Z, t[70] = ce, t[71] = ue, t[72] = de, t[73] = fe) : fe = t[73], fe;
11918
12025
  }
11919
- function Ai(e) {
12026
+ function zi(e) {
11920
12027
  return e.isScreenSharing;
11921
12028
  }
11922
12029
  //#endregion
11923
12030
  //#region src/components/meeting/WaitingRoom.tsx
11924
- function ji() {
12031
+ function Bi() {
11925
12032
  let e = (0, g.c)(6), [t, n] = s(0), i, a;
11926
12033
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
11927
- let e = setInterval(() => n(Mi), 1e3);
12034
+ let e = setInterval(() => n(Vi), 1e3);
11928
12035
  return () => clearInterval(e);
11929
12036
  }, a = [], e[0] = i, e[1] = a) : (i = e[0], a = e[1]), r(i, a);
11930
12037
  let o = String(Math.floor(t / 60)), c;
@@ -11932,14 +12039,14 @@ function ji() {
11932
12039
  let l = String(t % 60), u;
11933
12040
  return e[4] === l ? u = e[5] : (u = l.padStart(2, "0"), e[4] = l, e[5] = u), `${c}:${u}`;
11934
12041
  }
11935
- function Mi(e) {
12042
+ function Vi(e) {
11936
12043
  return e + 1;
11937
12044
  }
11938
- function Ni(e) {
11939
- let t = (0, g.c)(33), { title: n, localStream: i, onEnd: a, onMinimize: c } = e, [d, f] = s(!1), [p, m] = s(!1), h = ji(), _ = o(null), v, y;
12045
+ function Hi(e) {
12046
+ let t = (0, g.c)(33), { title: n, localStream: i, onEnd: a, onMinimize: c } = e, [d, f] = s(!1), [p, m] = s(!1), h = Bi(), _ = o(null), v, y;
11940
12047
  t[0] === i ? (v = t[1], y = t[2]) : (v = () => {
11941
12048
  let e = _.current;
11942
- !e || !i || (e.srcObject = i, e.play().catch(Li));
12049
+ !e || !i || (e.srcObject = i, e.play().catch(Ki));
11943
12050
  }, y = [i], t[0] = i, t[1] = v, t[2] = y), r(v, y);
11944
12051
  let b;
11945
12052
  t[3] === i ? b = t[4] : (b = i ? /* @__PURE__ */ l("video", {
@@ -11972,7 +12079,7 @@ function Ni(e) {
11972
12079
  6,
11973
12080
  10,
11974
12081
  14
11975
- ].map(Ii)
12082
+ ].map(Gi)
11976
12083
  }), t[13] = T) : T = t[13];
11977
12084
  let E;
11978
12085
  t[14] === c ? E = t[15] : (E = c && /* @__PURE__ */ l("button", {
@@ -12030,11 +12137,11 @@ function Ni(e) {
12030
12137
  children: [/* @__PURE__ */ l("span", { className: "w-1.5 h-1.5 rounded-full bg-primary flex-shrink-0" }), "Waiting for others to join…"]
12031
12138
  }), A = /* @__PURE__ */ l("div", { className: "flex-1" }), t[21] = k, t[22] = A) : (k = t[21], A = t[22]);
12032
12139
  let j, M;
12033
- t[23] === Symbol.for("react.memo_cache_sentinel") ? (j = () => f(Fi), M = () => m(Pi), t[23] = j, t[24] = M) : (j = t[23], M = t[24]);
12140
+ t[23] === Symbol.for("react.memo_cache_sentinel") ? (j = () => f(Wi), M = () => m(Ui), t[23] = j, t[24] = M) : (j = t[23], M = t[24]);
12034
12141
  let N;
12035
12142
  t[25] !== p || t[26] !== d || t[27] !== a ? (N = /* @__PURE__ */ l("div", {
12036
12143
  className: "relative z-10",
12037
- children: /* @__PURE__ */ l(Nr, {
12144
+ children: /* @__PURE__ */ l(Hr, {
12038
12145
  muted: d,
12039
12146
  cameraOff: p,
12040
12147
  speakerOn: !1,
@@ -12057,13 +12164,13 @@ function Ni(e) {
12057
12164
  ]
12058
12165
  }), t[29] = O, t[30] = N, t[31] = b, t[32] = P) : P = t[32], P;
12059
12166
  }
12060
- function Pi(e) {
12167
+ function Ui(e) {
12061
12168
  return !e;
12062
12169
  }
12063
- function Fi(e) {
12170
+ function Wi(e) {
12064
12171
  return !e;
12065
12172
  }
12066
- function Ii(e, t) {
12173
+ function Gi(e, t) {
12067
12174
  return /* @__PURE__ */ l("div", {
12068
12175
  className: "w-0.5 rounded-sm",
12069
12176
  style: {
@@ -12072,10 +12179,10 @@ function Ii(e, t) {
12072
12179
  }
12073
12180
  }, t);
12074
12181
  }
12075
- function Li() {}
12182
+ function Ki() {}
12076
12183
  //#endregion
12077
12184
  //#region src/widgets/MeetingWidget.tsx
12078
- function Ri({ meetingId: e, title: t = "Meeting", onEnd: n }) {
12185
+ function qi({ meetingId: e, title: t = "Meeting", onEnd: n }) {
12079
12186
  let { appUserId: i } = v(), { meeting: a, localStream: o, localDisplayStream: d, reactionEvents: f, joinMeeting: p, leaveMeeting: m, muteSelf: h, toggleCamera: g, startScreenShare: _, stopScreenShare: y, raiseHand: b, lowerHand: x, sendReaction: S } = J(), [C, w] = s(null);
12080
12187
  r(() => (w(null), p(e, t).catch((e) => {
12081
12188
  w(e instanceof Error ? e.message : "Failed to join meeting");
@@ -12103,23 +12210,23 @@ function Ri({ meetingId: e, title: t = "Meeting", onEnd: n }) {
12103
12210
  },
12104
12211
  children: "Back"
12105
12212
  }),
12106
- /* @__PURE__ */ l(xr, {})
12213
+ /* @__PURE__ */ l(Ar, {})
12107
12214
  ]
12108
12215
  }) : /* @__PURE__ */ u("div", {
12109
12216
  className: "flex-1 flex flex-col items-center justify-center bg-background text-muted-foreground text-sm",
12110
- children: ["Joining…", /* @__PURE__ */ l(xr, {})]
12217
+ children: ["Joining…", /* @__PURE__ */ l(Ar, {})]
12111
12218
  });
12112
- if (a.state === "waiting") return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ni, {
12219
+ if (a.state === "waiting") return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Hi, {
12113
12220
  title: a.title,
12114
12221
  localStream: o ?? void 0,
12115
12222
  onEnd: T
12116
- }), /* @__PURE__ */ l(xr, {})] });
12223
+ }), /* @__PURE__ */ l(Ar, {})] });
12117
12224
  let E = {
12118
12225
  id: i,
12119
12226
  name: "You",
12120
12227
  videoStream: d ?? void 0
12121
12228
  }, D = a.participants.filter((e) => e.id !== i);
12122
- return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(ki, {
12229
+ return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ri, {
12123
12230
  title: a.title,
12124
12231
  participants: D,
12125
12232
  localParticipant: E,
@@ -12132,39 +12239,39 @@ function Ri({ meetingId: e, title: t = "Meeting", onEnd: n }) {
12132
12239
  onScreenShare: (e) => e ? _() : y(),
12133
12240
  onHandRaise: (e) => e ? b() : x(),
12134
12241
  onReaction: S
12135
- }), /* @__PURE__ */ l(xr, {})] });
12242
+ }), /* @__PURE__ */ l(Ar, {})] });
12136
12243
  }
12137
12244
  //#endregion
12138
12245
  //#region src/hooks/usePresence.ts
12139
- var zi = /* @__PURE__ */ new Map(), Bi = /* @__PURE__ */ new Set();
12140
- function Vi() {
12141
- for (let e of Bi) e();
12246
+ var Ji = /* @__PURE__ */ new Map(), Yi = /* @__PURE__ */ new Set();
12247
+ function Xi() {
12248
+ for (let e of Yi) e();
12142
12249
  }
12143
- function Hi(e) {
12250
+ function Zi(e) {
12144
12251
  let t = (0, g.c)(7), [, n] = s(0), i;
12145
12252
  t[0] === n ? i = t[1] : (i = () => {
12146
- let e = () => n(Wi);
12147
- return Bi.add(e), () => {
12148
- Bi.delete(e);
12253
+ let e = () => n($i);
12254
+ return Yi.add(e), () => {
12255
+ Yi.delete(e);
12149
12256
  };
12150
12257
  }, t[0] = n, t[1] = i);
12151
12258
  let a;
12152
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = [], t[2] = a) : a = t[2], r(i, a), F("presence:changed", Ui);
12259
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = [], t[2] = a) : a = t[2], r(i, a), F("presence:changed", Qi);
12153
12260
  let o;
12154
- t[3] === e ? o = t[4] : (o = zi.get(e) ?? "offline", t[3] = e, t[4] = o);
12261
+ t[3] === e ? o = t[4] : (o = Ji.get(e) ?? "offline", t[3] = e, t[4] = o);
12155
12262
  let c;
12156
12263
  return t[5] === o ? c = t[6] : (c = { status: o }, t[5] = o, t[6] = c), c;
12157
12264
  }
12158
- function Ui(e) {
12265
+ function Qi(e) {
12159
12266
  let t = e.app_user_id, n = e.status;
12160
- t && n && (zi.set(t, n), Vi());
12267
+ t && n && (Ji.set(t, n), Xi());
12161
12268
  }
12162
- function Wi(e) {
12269
+ function $i(e) {
12163
12270
  return e + 1;
12164
12271
  }
12165
12272
  //#endregion
12166
12273
  //#region src/hooks/useRealtime.ts
12167
- function Gi() {
12274
+ function ea() {
12168
12275
  let { apiClient: e } = v(), [n, r] = s(null), [i, a] = s(!1), [o, c] = s(null), l = t(async (t) => {
12169
12276
  a(!0), c(null);
12170
12277
  try {
@@ -12222,7 +12329,7 @@ function Gi() {
12222
12329
  }
12223
12330
  //#endregion
12224
12331
  //#region src/hooks/useNotifications.ts
12225
- function Ki() {
12332
+ function ta() {
12226
12333
  let e = (0, g.c)(10), t;
12227
12334
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = [], e[0] = t) : t = e[0];
12228
12335
  let [n, r] = s(t), i;
@@ -12244,14 +12351,14 @@ function Ki() {
12244
12351
  }, e[2] = a) : a = e[2];
12245
12352
  let o = a, c;
12246
12353
  e[3] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
12247
- r(Ji);
12354
+ r(ra);
12248
12355
  }, e[3] = c) : c = e[3];
12249
12356
  let l = c, u;
12250
12357
  e[4] === Symbol.for("react.memo_cache_sentinel") ? (u = () => {
12251
12358
  r([]);
12252
12359
  }, e[4] = u) : u = e[4];
12253
12360
  let d = u, f;
12254
- e[5] === n ? f = e[6] : (f = n.filter(qi), e[5] = n, e[6] = f);
12361
+ e[5] === n ? f = e[6] : (f = n.filter(na), e[5] = n, e[6] = f);
12255
12362
  let p = f.length, m;
12256
12363
  return e[7] !== n || e[8] !== p ? (m = {
12257
12364
  notifications: n,
@@ -12261,13 +12368,13 @@ function Ki() {
12261
12368
  clearAll: d
12262
12369
  }, e[7] = n, e[8] = p, e[9] = m) : m = e[9], m;
12263
12370
  }
12264
- function qi(e) {
12371
+ function na(e) {
12265
12372
  return !e.read;
12266
12373
  }
12267
- function Ji(e) {
12268
- return e.map(Yi);
12374
+ function ra(e) {
12375
+ return e.map(ia);
12269
12376
  }
12270
- function Yi(e) {
12377
+ function ia(e) {
12271
12378
  return {
12272
12379
  ...e,
12273
12380
  read: !0
@@ -12275,7 +12382,7 @@ function Yi(e) {
12275
12382
  }
12276
12383
  //#endregion
12277
12384
  //#region src/components/ui/IconBtn.tsx
12278
- function Xi(e) {
12385
+ function aa(e) {
12279
12386
  let t = (0, g.c)(14), n, r, i, a, o;
12280
12387
  t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5]) : ({children: n, variant: i, size: a, className: o, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o);
12281
12388
  let s = i === void 0 ? "ghost" : i, c = a === void 0 ? 40 : a, u = o === void 0 ? "" : o, d;
@@ -12299,8 +12406,8 @@ function Xi(e) {
12299
12406
  }
12300
12407
  //#endregion
12301
12408
  //#region src/components/ui/EscalationButton.tsx
12302
- function Zi(e) {
12303
- let t = (0, g.c)(9), { transitionType: n, contextId: r, label: i, className: a } = e, { transition: o, isLoading: s, session: c } = Gi(), u = s || !c, d;
12409
+ function oa(e) {
12410
+ let t = (0, g.c)(9), { transitionType: n, contextId: r, label: i, className: a } = e, { transition: o, isLoading: s, session: c } = ea(), u = s || !c, d;
12304
12411
  t[0] !== r || t[1] !== o || t[2] !== n ? (d = () => o(n, r), t[0] = r, t[1] = o, t[2] = n, t[3] = d) : d = t[3];
12305
12412
  let f = i ?? n, p;
12306
12413
  return t[4] !== a || t[5] !== u || t[6] !== d || t[7] !== f ? (p = /* @__PURE__ */ l("button", {
@@ -12312,9 +12419,9 @@ function Zi(e) {
12312
12419
  }
12313
12420
  //#endregion
12314
12421
  //#region src/components/chat/MessageList.tsx
12315
- function Qi(e) {
12422
+ function sa(e) {
12316
12423
  let t = (0, g.c)(8), { messages: n, typingUsers: r, onCallBack: i } = e, a;
12317
- t[0] !== n || t[1] !== i ? (a = n.map((e, t) => /* @__PURE__ */ l(ft, {
12424
+ t[0] !== n || t[1] !== i ? (a = n.map((e, t) => /* @__PURE__ */ l(xt, {
12318
12425
  ...e,
12319
12426
  onCallBack: i,
12320
12427
  isGrouped: t < n.length - 1 && n[t + 1]?.sender === e.sender
@@ -12329,7 +12436,7 @@ function Qi(e) {
12329
12436
  0,
12330
12437
  1,
12331
12438
  2
12332
- ].map($i)
12439
+ ].map(ca)
12333
12440
  })]
12334
12441
  }), t[3] = r, t[4] = o);
12335
12442
  let s;
@@ -12338,7 +12445,7 @@ function Qi(e) {
12338
12445
  children: [a, o]
12339
12446
  }), t[5] = a, t[6] = o, t[7] = s) : s = t[7], s;
12340
12447
  }
12341
- function $i(e) {
12448
+ function ca(e) {
12342
12449
  return /* @__PURE__ */ l("span", {
12343
12450
  className: "w-1.5 h-1.5 rounded-full block",
12344
12451
  style: {
@@ -12350,10 +12457,10 @@ function $i(e) {
12350
12457
  }
12351
12458
  //#endregion
12352
12459
  //#region src/components/chat/MediaMessage.tsx
12353
- function ea(e) {
12354
- let t = (0, g.c)(18), { mediaId: n, type: i } = e, { getMedia: a } = Tt(), [o, c] = s(null), d, f;
12460
+ function la(e) {
12461
+ let t = (0, g.c)(18), { mediaId: n, type: i } = e, { getMedia: a } = Pt(), [o, c] = s(null), d, f;
12355
12462
  if (t[0] !== a || t[1] !== n ? (d = () => {
12356
- a(n).then((e) => c(e.url)).catch(ta);
12463
+ a(n).then((e) => c(e.url)).catch(ua);
12357
12464
  }, f = [n, a], t[0] = a, t[1] = n, t[2] = d, t[3] = f) : (d = t[2], f = t[3]), r(d, f), !o) {
12358
12465
  let e;
12359
12466
  return t[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ l("div", {
@@ -12393,10 +12500,10 @@ function ea(e) {
12393
12500
  ]
12394
12501
  }), t[14] = p, t[15] = m, t[16] = h, t[17] = _) : _ = t[17], _;
12395
12502
  }
12396
- function ta() {}
12503
+ function ua() {}
12397
12504
  //#endregion
12398
12505
  //#region src/components/meeting/ScreenShareView.tsx
12399
- function na(e) {
12506
+ function da(e) {
12400
12507
  let t = (0, g.c)(8), { stream: n, presenterName: i } = e, a = o(null), s, c;
12401
12508
  t[0] === n ? (s = t[1], c = t[2]) : (s = () => {
12402
12509
  a.current && (a.current.srcObject = n);
@@ -12438,4 +12545,4 @@ function na(e) {
12438
12545
  }), t[6] = i, t[7] = m), m;
12439
12546
  }
12440
12547
  //#endregion
12441
- export { kt as AttachmentPicker, Ne as AttachmentRenderer, Pt as AudioRecorder, ve as Avatar, pn as BatchToolbar, xe as BottomNav, Fe as CallBanner, Nr as CallControls, Mn as CallHistory, Br as CallScreen, Sr as Chat, An as ChatBox, en as Composer, we as ConversationList, Pn as ConversationPicker, hr as DocumentViewer, bt as EmojiPicker, Zi as EscalationButton, Xi as IconBtn, qn as ImageViewer, Ir as InCallChatPanel, ti as IncomingCallModal, ot as LinkPreview, ea as MediaMessage, yr as MediaViewer, q as MeetingContext, $ as MeetingProvider, ki as MeetingRoom, Ri as MeetingWidget, Ge as MessageActionMenu, ft as MessageBubble, Rn as MessageInfoSheet, ln as MessageInput, Qi as MessageList, ae as OrbitProvider, li as ParticipantGrid, et as ReactionDialog, fn as ReplyComposer, na as ScreenShareView, Bt as StickerPicker, D as ThemeProvider, ai as VideoCall, Xr as VideoCallScreen, $n as VideoViewer, Ni as WaitingRoom, S as darkTheme, rt as extractUrls, C as lightTheme, y as useAppConfig, P as useCall, ge as useCallHistory, le as useConversations, Tt as useMedia, Y as useMeeting, J as useMeetingContext, pe as useMessages, Ki as useNotifications, v as useOrbit, F as useOrbitEvent, A as useOrbitListener, Hi as usePresence, Gi as useRealtime, T as useTheme };
12548
+ export { Rt as AttachmentPicker, He as AttachmentRenderer, Ut as AudioRecorder, De as Avatar, Sn as BatchToolbar, Ae as BottomNav, We as CallBanner, Hr as CallControls, Vn as CallHistory, Yr as CallScreen, jr as Chat, zn as ChatBox, un as Composer, Ne as ConversationList, Un as ConversationPicker, wr as DocumentViewer, kt as EmojiPicker, oa as EscalationButton, aa as IconBtn, nr as ImageViewer, Gr as InCallChatPanel, ui as IncomingCallModal, ht as LinkPreview, la as MediaMessage, Or as MediaViewer, q as MeetingContext, $ as MeetingProvider, Ri as MeetingRoom, qi as MeetingWidget, et as MessageActionMenu, xt as MessageBubble, qn as MessageInfoSheet, vn as MessageInput, sa as MessageList, pe as OrbitProvider, vi as ParticipantGrid, lt as ReactionDialog, xn as ReplyComposer, da as ScreenShareView, Yt as StickerPicker, D as ThemeProvider, mi as VideoCall, ai as VideoCallScreen, cr as VideoViewer, Hi as WaitingRoom, S as darkTheme, ft as extractUrls, C as lightTheme, y as useAppConfig, P as useCall, Te as useCallHistory, ve as useConversations, Pt as useMedia, Y as useMeeting, J as useMeetingContext, Se as useMessages, ta as useNotifications, v as useOrbit, F as useOrbitEvent, A as useOrbitListener, Zi as usePresence, ea as useRealtime, T as useTheme };