@orbitconnect/react 0.1.0 → 0.1.1

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