@arbidocs/react 0.5.142 → 0.5.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/artifacts/index.cjs +34 -34
  2. package/dist/calls/livekit/index.cjs +44 -44
  3. package/dist/{chunk-44YADVU6.cjs → chunk-26SZ3DS4.cjs} +6 -6
  4. package/dist/{chunk-44YADVU6.cjs.map → chunk-26SZ3DS4.cjs.map} +1 -1
  5. package/dist/{chunk-PDY2Z25V.cjs → chunk-2F24LLVZ.cjs} +25 -25
  6. package/dist/{chunk-PDY2Z25V.cjs.map → chunk-2F24LLVZ.cjs.map} +1 -1
  7. package/dist/{chunk-DBWW6DXJ.cjs → chunk-6RRKO4ZK.cjs} +5 -5
  8. package/dist/{chunk-DBWW6DXJ.cjs.map → chunk-6RRKO4ZK.cjs.map} +1 -1
  9. package/dist/{chunk-G3SZWU7R.cjs → chunk-FDYZA6NO.cjs} +4 -4
  10. package/dist/{chunk-G3SZWU7R.cjs.map → chunk-FDYZA6NO.cjs.map} +1 -1
  11. package/dist/{chunk-DQODLWFX.cjs → chunk-KULS4YWP.cjs} +3 -3
  12. package/dist/{chunk-DQODLWFX.cjs.map → chunk-KULS4YWP.cjs.map} +1 -1
  13. package/dist/{chunk-IWNWPUAS.cjs → chunk-ZZZYVNFW.cjs} +5 -5
  14. package/dist/{chunk-IWNWPUAS.cjs.map → chunk-ZZZYVNFW.cjs.map} +1 -1
  15. package/dist/databases.js +18 -2
  16. package/dist/databases.js.map +2 -2
  17. package/dist/document-tools/core.cjs +99 -99
  18. package/dist/document-tools/index.cjs +101 -101
  19. package/dist/index.cjs +1613 -1571
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.ts +152 -22
  22. package/dist/notifications/notification-types.js +5 -0
  23. package/dist/notifications/notification-types.js.map +2 -2
  24. package/dist/notifications/server-notifications.js +21 -0
  25. package/dist/notifications/server-notifications.js.map +2 -2
  26. package/dist/offline.js +2 -1
  27. package/dist/offline.js.map +2 -2
  28. package/dist/shell/index.cjs +40 -40
  29. package/dist/ui/index.cjs +13 -13
  30. package/dist/viewers/index.cjs +9 -9
  31. package/package.json +3 -3
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkVO7OWQP6_cjs = require('../chunk-VO7OWQP6.cjs');
4
- var chunkEM6DP62E_cjs = require('../chunk-EM6DP62E.cjs');
5
- var chunkIWNWPUAS_cjs = require('../chunk-IWNWPUAS.cjs');
4
+ var chunkZZZYVNFW_cjs = require('../chunk-ZZZYVNFW.cjs');
6
5
  var chunk3AADNIOK_cjs = require('../chunk-3AADNIOK.cjs');
7
6
  var chunkFE6ZSNZE_cjs = require('../chunk-FE6ZSNZE.cjs');
8
7
  require('../chunk-N73IMVFF.cjs');
9
- var chunkDQODLWFX_cjs = require('../chunk-DQODLWFX.cjs');
8
+ var chunkKULS4YWP_cjs = require('../chunk-KULS4YWP.cjs');
9
+ var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
10
+ var chunkEM6DP62E_cjs = require('../chunk-EM6DP62E.cjs');
10
11
  require('../chunk-5NOZDH3F.cjs');
11
12
  require('../chunk-S6A6FSG7.cjs');
12
- var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
13
13
  var react = require('react');
14
14
  var reactQuery = require('@tanstack/react-query');
15
15
  var jsxRuntime = require('react/jsx-runtime');
@@ -275,19 +275,19 @@ function useArtifactText(docId, options) {
275
275
  ...DEFAULT_ARTIFACT_TEXT_RETRY,
276
276
  ...options?.retry
277
277
  };
278
- const enabled = (options?.enabled ?? true) && chunkDQODLWFX_cjs.isDocumentId(docId) && arbi.hasWorkspace;
278
+ const enabled = (options?.enabled ?? true) && chunkKULS4YWP_cjs.isDocumentId(docId) && arbi.hasWorkspace;
279
279
  const query = reactQuery.useQuery({
280
280
  // Under the shared `parsedDoc` key, so a document's invalidation reaches it too.
281
281
  queryKey: [...chunkFE6ZSNZE_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
282
282
  queryFn: async () => {
283
- const { docId: plainId, version } = chunkDQODLWFX_cjs.parseVersionRef(docId);
283
+ const { docId: plainId, version } = chunkKULS4YWP_cjs.parseVersionRef(docId);
284
284
  const parsed = await arbi.documents.getParsedContent(
285
285
  plainId,
286
286
  "marker",
287
287
  version ?? void 0
288
288
  );
289
289
  if (!parsed.chunks?.some((c) => c.content?.trim())) throw new NotParsedYetError();
290
- return chunkDQODLWFX_cjs.flattenChunks(parsed.chunks, { unescape: true });
290
+ return chunkKULS4YWP_cjs.flattenChunks(parsed.chunks, { unescape: true });
291
291
  },
292
292
  enabled,
293
293
  retry: (failureCount, error) => !isRefusal(error) && failureCount < attempts,
@@ -325,17 +325,17 @@ function useArtifactText(docId, options) {
325
325
 
326
326
  // src/artifacts/useArtifactSession.ts
327
327
  function useArtifactVersions(workspaceId, docId) {
328
- const plainId = docId ? chunkDQODLWFX_cjs.parseVersionRef(docId).docId : null;
328
+ const plainId = docId ? chunkKULS4YWP_cjs.parseVersionRef(docId).docId : null;
329
329
  const { data: documents } = chunkVO7OWQP6_cjs.useDocuments(workspaceId);
330
330
  const listed = react.useMemo(
331
331
  () => (documents ?? []).find((d) => d.external_id === plainId),
332
332
  [documents, plainId]
333
333
  );
334
- const { data: history } = chunkIWNWPUAS_cjs.useDocumentVersionList(plainId, {
334
+ const { data: history } = chunkZZZYVNFW_cjs.useDocumentVersionList(plainId, {
335
335
  enabled: !!plainId && documents !== void 0 && !listed
336
336
  });
337
337
  return react.useMemo(
338
- () => listed ? chunkDQODLWFX_cjs.documentVersions(listed) : chunkDQODLWFX_cjs.toArtifactVersions(plainId, history),
338
+ () => listed ? chunkKULS4YWP_cjs.documentVersions(listed) : chunkKULS4YWP_cjs.toArtifactVersions(plainId, history),
339
339
  [listed, history, plainId]
340
340
  );
341
341
  }
@@ -351,7 +351,7 @@ function useSaveArtifactVersion() {
351
351
  {
352
352
  wpType: wpType ?? "artifact",
353
353
  autosave,
354
- versionOf: versionOf ? chunkDQODLWFX_cjs.parseVersionRef(versionOf).docId : void 0,
354
+ versionOf: versionOf ? chunkKULS4YWP_cjs.parseVersionRef(versionOf).docId : void 0,
355
355
  configExtId: configId ?? void 0
356
356
  }
357
357
  );
@@ -379,7 +379,7 @@ function useArtifactSession(options) {
379
379
  const [saved, setSaved] = react.useState(null);
380
380
  const adopted = saved && saved.forId === hostDocId ? saved : null;
381
381
  const docId = adopted?.id ?? hostDocId;
382
- const isLocal = !chunkDQODLWFX_cjs.isDocumentId(docId);
382
+ const isLocal = !chunkKULS4YWP_cjs.isDocumentId(docId);
383
383
  const [ownCompareId, setOwnCompareId] = react.useState(null);
384
384
  const activeCompareId = compareId === void 0 ? ownCompareId : compareId;
385
385
  const changeCompare = react.useCallback(
@@ -396,7 +396,7 @@ function useArtifactSession(options) {
396
396
  });
397
397
  const saveVersion = useSaveArtifactVersion();
398
398
  const autosaveVersion = saveVersion.mutateAsync;
399
- const current = chunkDQODLWFX_cjs.findVersion(versions, docId);
399
+ const current = chunkKULS4YWP_cjs.findVersion(versions, docId);
400
400
  const save = react.useCallback(
401
401
  async (content) => {
402
402
  const result = await saveVersion.mutateAsync({
@@ -412,7 +412,7 @@ function useArtifactSession(options) {
412
412
  );
413
413
  const handleSaved = react.useCallback(
414
414
  (result, content) => {
415
- if (!chunkDQODLWFX_cjs.isDocumentId(hostDocId) && result.docId)
415
+ if (!chunkKULS4YWP_cjs.isDocumentId(hostDocId) && result.docId)
416
416
  setSaved({ forId: hostDocId, id: result.docId, text: content });
417
417
  onSaved?.(result, content);
418
418
  },
@@ -471,7 +471,7 @@ function useArtifactSession(options) {
471
471
  isLoading,
472
472
  status,
473
473
  versions,
474
- labelOf: (id) => chunkDQODLWFX_cjs.versionLabel(versions, id),
474
+ labelOf: (id) => chunkKULS4YWP_cjs.versionLabel(versions, id),
475
475
  view: {
476
476
  content: session.baseline,
477
477
  isEditing: session.isEditing,
@@ -547,7 +547,7 @@ function useStreamedArtifact({
547
547
  const started = react.useRef(null);
548
548
  const content = artifact?.content ?? "";
549
549
  const title = artifact?.title ?? "Draft";
550
- const passThrough = !!artifact && chunkDQODLWFX_cjs.isDocumentId(artifact.doc_ext_id);
550
+ const passThrough = !!artifact && chunkKULS4YWP_cjs.isDocumentId(artifact.doc_ext_id);
551
551
  const needsSave = settled && !!artifact && !passThrough && !!content.trim() && !!workspaceId;
552
552
  react.useEffect(() => {
553
553
  const key = `${attempt}:${content}`;
@@ -557,7 +557,7 @@ function useStreamedArtifact({
557
557
  let stored;
558
558
  if (clean) stored = clean(content);
559
559
  else {
560
- const report = chunkDQODLWFX_cjs.cleanDraftWithReport(content);
560
+ const report = chunkKULS4YWP_cjs.cleanDraftWithReport(content);
561
561
  stored = report.text;
562
562
  setCleaned(report);
563
563
  onCleaned?.(report);
@@ -625,71 +625,71 @@ Object.defineProperty(exports, "revertRedlineRegion", {
625
625
  });
626
626
  Object.defineProperty(exports, "cleanDraftMarkdown", {
627
627
  enumerable: true,
628
- get: function () { return chunkDQODLWFX_cjs.cleanDraftMarkdown; }
628
+ get: function () { return chunkKULS4YWP_cjs.cleanDraftMarkdown; }
629
629
  });
630
630
  Object.defineProperty(exports, "cleanDraftWithReport", {
631
631
  enumerable: true,
632
- get: function () { return chunkDQODLWFX_cjs.cleanDraftWithReport; }
632
+ get: function () { return chunkKULS4YWP_cjs.cleanDraftWithReport; }
633
633
  });
634
634
  Object.defineProperty(exports, "documentVersions", {
635
635
  enumerable: true,
636
- get: function () { return chunkDQODLWFX_cjs.documentVersions; }
636
+ get: function () { return chunkKULS4YWP_cjs.documentVersions; }
637
637
  });
638
638
  Object.defineProperty(exports, "findVersion", {
639
639
  enumerable: true,
640
- get: function () { return chunkDQODLWFX_cjs.findVersion; }
640
+ get: function () { return chunkKULS4YWP_cjs.findVersion; }
641
641
  });
642
642
  Object.defineProperty(exports, "flattenChunks", {
643
643
  enumerable: true,
644
- get: function () { return chunkDQODLWFX_cjs.flattenChunks; }
644
+ get: function () { return chunkKULS4YWP_cjs.flattenChunks; }
645
645
  });
646
646
  Object.defineProperty(exports, "isDocumentId", {
647
647
  enumerable: true,
648
- get: function () { return chunkDQODLWFX_cjs.isDocumentId; }
648
+ get: function () { return chunkKULS4YWP_cjs.isDocumentId; }
649
649
  });
650
650
  Object.defineProperty(exports, "parseVersionRef", {
651
651
  enumerable: true,
652
- get: function () { return chunkDQODLWFX_cjs.parseVersionRef; }
652
+ get: function () { return chunkKULS4YWP_cjs.parseVersionRef; }
653
653
  });
654
654
  Object.defineProperty(exports, "promoteBoldTitle", {
655
655
  enumerable: true,
656
- get: function () { return chunkDQODLWFX_cjs.promoteBoldTitle; }
656
+ get: function () { return chunkKULS4YWP_cjs.promoteBoldTitle; }
657
657
  });
658
658
  Object.defineProperty(exports, "repairParsedStructure", {
659
659
  enumerable: true,
660
- get: function () { return chunkDQODLWFX_cjs.repairParsedStructure; }
660
+ get: function () { return chunkKULS4YWP_cjs.repairParsedStructure; }
661
661
  });
662
662
  Object.defineProperty(exports, "repairParsedTitle", {
663
663
  enumerable: true,
664
- get: function () { return chunkDQODLWFX_cjs.repairParsedTitle; }
664
+ get: function () { return chunkKULS4YWP_cjs.repairParsedTitle; }
665
665
  });
666
666
  Object.defineProperty(exports, "savedFromId", {
667
667
  enumerable: true,
668
- get: function () { return chunkDQODLWFX_cjs.savedFromId; }
668
+ get: function () { return chunkKULS4YWP_cjs.savedFromId; }
669
669
  });
670
670
  Object.defineProperty(exports, "stripAgentPreamble", {
671
671
  enumerable: true,
672
- get: function () { return chunkDQODLWFX_cjs.stripAgentPreamble; }
672
+ get: function () { return chunkKULS4YWP_cjs.stripAgentPreamble; }
673
673
  });
674
674
  Object.defineProperty(exports, "toArtifactVersions", {
675
675
  enumerable: true,
676
- get: function () { return chunkDQODLWFX_cjs.toArtifactVersions; }
676
+ get: function () { return chunkKULS4YWP_cjs.toArtifactVersions; }
677
677
  });
678
678
  Object.defineProperty(exports, "unescapeMarkdown", {
679
679
  enumerable: true,
680
- get: function () { return chunkDQODLWFX_cjs.unescapeMarkdown; }
680
+ get: function () { return chunkKULS4YWP_cjs.unescapeMarkdown; }
681
681
  });
682
682
  Object.defineProperty(exports, "unwrapCitationLinks", {
683
683
  enumerable: true,
684
- get: function () { return chunkDQODLWFX_cjs.unwrapCitationLinks; }
684
+ get: function () { return chunkKULS4YWP_cjs.unwrapCitationLinks; }
685
685
  });
686
686
  Object.defineProperty(exports, "versionLabel", {
687
687
  enumerable: true,
688
- get: function () { return chunkDQODLWFX_cjs.versionLabel; }
688
+ get: function () { return chunkKULS4YWP_cjs.versionLabel; }
689
689
  });
690
690
  Object.defineProperty(exports, "versionRef", {
691
691
  enumerable: true,
692
- get: function () { return chunkDQODLWFX_cjs.versionRef; }
692
+ get: function () { return chunkKULS4YWP_cjs.versionRef; }
693
693
  });
694
694
  Object.defineProperty(exports, "normalizeMarkdown", {
695
695
  enumerable: true,
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunk44YADVU6_cjs = require('../../chunk-44YADVU6.cjs');
4
- require('../../chunk-EEIYXVM4.cjs');
5
- require('../../chunk-IWNWPUAS.cjs');
3
+ var chunk26SZ3DS4_cjs = require('../../chunk-26SZ3DS4.cjs');
4
+ require('../../chunk-ZZZYVNFW.cjs');
6
5
  var chunkFE6ZSNZE_cjs = require('../../chunk-FE6ZSNZE.cjs');
7
6
  var chunkIX4HOS5Z_cjs = require('../../chunk-IX4HOS5Z.cjs');
8
7
  require('../../chunk-N73IMVFF.cjs');
9
- require('../../chunk-DQODLWFX.cjs');
8
+ require('../../chunk-KULS4YWP.cjs');
9
+ require('../../chunk-VOFNX4P6.cjs');
10
+ require('../../chunk-EEIYXVM4.cjs');
10
11
  require('../../chunk-5NOZDH3F.cjs');
11
12
  require('../../chunk-S6A6FSG7.cjs');
12
- require('../../chunk-VOFNX4P6.cjs');
13
13
  var react = require('react');
14
14
  var livekitClient = require('livekit-client');
15
15
  var componentsReact = require('@livekit/components-react');
@@ -123,8 +123,8 @@ function useCallTranscriber({
123
123
  const arbi = chunkFE6ZSNZE_cjs.useArbi();
124
124
  const queryClient = reactQuery.useQueryClient();
125
125
  const profile = arbi.isLoggedIn ? arbi.user.profile() : null;
126
- const myProfileName = profile && chunk44YADVU6_cjs.toProfileView(profile).fullName || null;
127
- const deploymentAvailable = chunk44YADVU6_cjs.useCallTranscriptionAvailable();
126
+ const myProfileName = profile && chunk26SZ3DS4_cjs.toProfileView(profile).fullName || null;
127
+ const deploymentAvailable = chunk26SZ3DS4_cjs.useCallTranscriptionAvailable();
128
128
  const available = deploymentAvailable && !!callKey;
129
129
  const [state, setState] = react.useState(null);
130
130
  const [creatorExtId, setCreatorExtId] = react.useState(null);
@@ -167,7 +167,7 @@ function useCallTranscriber({
167
167
  };
168
168
  }, [available, callExtId]);
169
169
  react.useEffect(
170
- () => chunk44YADVU6_cjs.onCallEvent("call.transcription", (message) => {
170
+ () => chunk26SZ3DS4_cjs.onCallEvent("call.transcription", (message) => {
171
171
  if (message.call_ext_id === callExtId) applyState(message);
172
172
  }),
173
173
  [callExtId, applyState]
@@ -183,7 +183,7 @@ function useCallTranscriber({
183
183
  const persist = react.useCallback(
184
184
  (segment, speakerNeedsProxy) => {
185
185
  if (!callKey || persisted.current.has(segment.segmentId)) return;
186
- const role = chunk44YADVU6_cjs.transcriptPersistRole({
186
+ const role = chunk26SZ3DS4_cjs.transcriptPersistRole({
187
187
  myIdentity,
188
188
  canPost: canPost && (segment.speakerIdentity !== myIdentity || selfPosts.current),
189
189
  hasCallKey: true,
@@ -192,7 +192,7 @@ function useCallTranscriber({
192
192
  });
193
193
  if (!role) return;
194
194
  persisted.current.add(segment.segmentId);
195
- chunk44YADVU6_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
195
+ chunk26SZ3DS4_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
196
196
  (err) => {
197
197
  persisted.current.delete(segment.segmentId);
198
198
  if (role === "own" && err?.status === 403) {
@@ -212,7 +212,7 @@ function useCallTranscriber({
212
212
  );
213
213
  react.useEffect(() => {
214
214
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
215
- if (topic === chunk44YADVU6_cjs.CALL_TRANSCRIPTION_TOPIC) {
215
+ if (topic === chunk26SZ3DS4_cjs.CALL_TRANSCRIPTION_TOPIC) {
216
216
  if (participant || participantIdentity) return;
217
217
  try {
218
218
  const next = browser.calls.transcriptionStateFrom(JSON.parse(new TextDecoder().decode(payload)));
@@ -221,10 +221,10 @@ function useCallTranscriber({
221
221
  }
222
222
  return;
223
223
  }
224
- if (topic !== chunk44YADVU6_cjs.CALL_CAPTION_TOPIC || !callKey) return;
224
+ if (topic !== chunk26SZ3DS4_cjs.CALL_CAPTION_TOPIC || !callKey) return;
225
225
  const identity = participant?.identity ?? participantIdentity;
226
226
  if (!identity || identity === myIdentity) return;
227
- void chunk44YADVU6_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
227
+ void chunk26SZ3DS4_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
228
228
  if (!packet || packet.identity !== identity) return;
229
229
  const name = participant?.name || packet.name || identity;
230
230
  const t = Math.min(packet.t, Date.now());
@@ -264,7 +264,7 @@ function useCallTranscriber({
264
264
  })) {
265
265
  return;
266
266
  }
267
- const segmentId = chunk44YADVU6_cjs.newSegmentId();
267
+ const segmentId = chunk26SZ3DS4_cjs.newSegmentId();
268
268
  const startedAt = new Date(segment.startedAt).toISOString();
269
269
  let text;
270
270
  try {
@@ -298,7 +298,7 @@ function useCallTranscriber({
298
298
  });
299
299
  try {
300
300
  await localParticipant.publishData(
301
- await chunk44YADVU6_cjs.encodeCaptionPacket(
301
+ await chunk26SZ3DS4_cjs.encodeCaptionPacket(
302
302
  {
303
303
  v: 1,
304
304
  segment_id: segmentId,
@@ -310,7 +310,7 @@ function useCallTranscriber({
310
310
  },
311
311
  callKey
312
312
  ),
313
- { reliable: true, topic: chunk44YADVU6_cjs.CALL_CAPTION_TOPIC }
313
+ { reliable: true, topic: chunk26SZ3DS4_cjs.CALL_CAPTION_TOPIC }
314
314
  );
315
315
  } catch (err) {
316
316
  console.warn("[calls] could not broadcast a caption", err);
@@ -425,14 +425,14 @@ function useCallRecorder({
425
425
  };
426
426
  }, [callExtId]);
427
427
  react.useEffect(
428
- () => chunk44YADVU6_cjs.onCallEvent("call.recording", (message) => {
428
+ () => chunk26SZ3DS4_cjs.onCallEvent("call.recording", (message) => {
429
429
  if (message.call_ext_id === callExtId) applyState(message);
430
430
  }),
431
431
  [callExtId, applyState]
432
432
  );
433
433
  react.useEffect(() => {
434
434
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
435
- if (topic !== chunk44YADVU6_cjs.CALL_RECORDING_TOPIC) return;
435
+ if (topic !== chunk26SZ3DS4_cjs.CALL_RECORDING_TOPIC) return;
436
436
  if (participant || participantIdentity) return;
437
437
  try {
438
438
  const next = browser.calls.recordingStateFrom(JSON.parse(new TextDecoder().decode(payload)));
@@ -453,7 +453,7 @@ function useCallRecorder({
453
453
  try {
454
454
  const row = call ?? await arbi.calls.get(callExtId);
455
455
  if (!row.workspace_locked && !row.chat_ext_id && callKey) {
456
- const ref = await chunk44YADVU6_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
456
+ const ref = await chunk26SZ3DS4_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
457
457
  if (ref.kind === "chat") setCall({ ...row, chat_ext_id: ref.chatExtId });
458
458
  }
459
459
  const answer = await arbi.calls.recording.start(callExtId, mode);
@@ -555,7 +555,7 @@ function useTrackUploader(recording, callKey, kind, mimeType) {
555
555
  const queryClient = reactQuery.useQueryClient();
556
556
  return react.useMemo(() => {
557
557
  if (!shouldCapture || !recordingExtId || !call) return null;
558
- return chunk44YADVU6_cjs.trackUploaderFor({
558
+ return chunk26SZ3DS4_cjs.trackUploaderFor({
559
559
  arbi,
560
560
  callExtId: call.external_id,
561
561
  recordingExtId,
@@ -563,7 +563,7 @@ function useTrackUploader(recording, callKey, kind, mimeType) {
563
563
  mimeType,
564
564
  recordingStartedAt: startedAt,
565
565
  linkVersion,
566
- conversationKey: () => chunk44YADVU6_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
566
+ conversationKey: () => chunk26SZ3DS4_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
567
567
  // The server stopped the recording at the quota (its state event says so too).
568
568
  onStopped: () => markStopped()
569
569
  });
@@ -612,10 +612,10 @@ function useInCallChat({
612
612
  react.useEffect(() => {
613
613
  if (!callKey) return;
614
614
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
615
- if (topic !== chunk44YADVU6_cjs.CALL_CHAT_TOPIC) return;
615
+ if (topic !== chunk26SZ3DS4_cjs.CALL_CHAT_TOPIC) return;
616
616
  const identity = participant?.identity ?? participantIdentity;
617
617
  if (!identity || identity === myIdentity) return;
618
- void chunk44YADVU6_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
618
+ void chunk26SZ3DS4_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
619
619
  if (!packet) return;
620
620
  const key = `${identity}:${packet.id}`;
621
621
  if (seen.current.has(key)) return;
@@ -645,7 +645,7 @@ function useInCallChat({
645
645
  if (!open || !canRead || historyRequested.current) return;
646
646
  historyRequested.current = true;
647
647
  setHistoryLoading(true);
648
- chunk44YADVU6_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
648
+ chunk26SZ3DS4_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
649
649
  if (!result) return;
650
650
  setMeetingChat(result.ref);
651
651
  setHistory(result.messages);
@@ -656,13 +656,13 @@ function useInCallChat({
656
656
  }, [open, canRead, callExtId]);
657
657
  const send = react.useCallback(
658
658
  async (raw) => {
659
- const text = raw.trim().slice(0, chunk44YADVU6_cjs.CALL_CHAT_MAX_CHARS);
659
+ const text = raw.trim().slice(0, chunk26SZ3DS4_cjs.CALL_CHAT_MAX_CHARS);
660
660
  if (!text || !callKey || readOnly) return;
661
- const id = chunk44YADVU6_cjs.newPacketId();
661
+ const id = chunk26SZ3DS4_cjs.newPacketId();
662
662
  const at = Date.now();
663
663
  await localParticipant.publishData(
664
- await chunk44YADVU6_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
665
- { reliable: true, topic: chunk44YADVU6_cjs.CALL_CHAT_TOPIC }
664
+ await chunk26SZ3DS4_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
665
+ { reliable: true, topic: chunk26SZ3DS4_cjs.CALL_CHAT_TOPIC }
666
666
  );
667
667
  setLive((prev) => [
668
668
  ...prev,
@@ -681,7 +681,7 @@ function useInCallChat({
681
681
  (prev) => prev.map((l) => l.id === id && l.senderIdentity === myIdentity ? { ...l, status } : l)
682
682
  );
683
683
  try {
684
- setMeetingChat(await chunk44YADVU6_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
684
+ setMeetingChat(await chunk26SZ3DS4_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
685
685
  mark("saved");
686
686
  } catch (err) {
687
687
  console.warn("[calls] could not keep the message in the meeting chat", err);
@@ -693,7 +693,7 @@ function useInCallChat({
693
693
  const openMeeting = react.useCallback(async () => {
694
694
  if (!callKey) return;
695
695
  try {
696
- const ref = meetingChat ?? await chunk44YADVU6_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
696
+ const ref = meetingChat ?? await chunk26SZ3DS4_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
697
697
  setMeetingChat(ref);
698
698
  openMeetingChat?.(ref);
699
699
  } catch (err) {
@@ -701,7 +701,7 @@ function useInCallChat({
701
701
  }
702
702
  }, [callExtId, callKey, meetingChat]);
703
703
  const lines = react.useMemo(
704
- () => chunk44YADVU6_cjs.mergeChatLines(history, live, {
704
+ () => chunk26SZ3DS4_cjs.mergeChatLines(history, live, {
705
705
  myIdentity,
706
706
  nameOf: (identity) => identity === myIdentity ? localParticipant.name || "You" : room.remoteParticipants.get(identity)?.name || null
707
707
  }),
@@ -760,7 +760,7 @@ function useWebinar({
760
760
  const n = ++questionsRead.current;
761
761
  try {
762
762
  const rows = await webinarApi().questions.list(callExtId, linkVersion);
763
- const opened = await Promise.all(rows.map((q) => chunk44YADVU6_cjs.openQuestion(q, callKey)));
763
+ const opened = await Promise.all(rows.map((q) => chunk26SZ3DS4_cjs.openQuestion(q, callKey)));
764
764
  if (n === questionsRead.current) setQuestions(opened);
765
765
  } catch (err) {
766
766
  console.warn("[calls] could not load the questions", err);
@@ -772,7 +772,7 @@ function useWebinar({
772
772
  }, [refresh, refreshQuestions]);
773
773
  react.useEffect(() => {
774
774
  if (!enabled) return;
775
- return chunk44YADVU6_cjs.onCallEvent("call.webinar", (m) => {
775
+ return chunk26SZ3DS4_cjs.onCallEvent("call.webinar", (m) => {
776
776
  if (m.call_ext_id !== callExtId) return;
777
777
  setState((s) => s ? { ...s, live: m.live, chat: m.chat } : s);
778
778
  });
@@ -781,8 +781,8 @@ function useWebinar({
781
781
  react.useEffect(() => {
782
782
  if (!enabled) return;
783
783
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
784
- if (topic !== chunk44YADVU6_cjs.CALL_WEBINAR_TOPIC) return;
785
- const packet = chunk44YADVU6_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
784
+ if (topic !== chunk26SZ3DS4_cjs.CALL_WEBINAR_TOPIC) return;
785
+ const packet = chunk26SZ3DS4_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
786
786
  if (!packet) return;
787
787
  switch (packet.type) {
788
788
  case "state":
@@ -803,7 +803,7 @@ function useWebinar({
803
803
  return;
804
804
  case "demoted":
805
805
  setStageCheck(false);
806
- chunk44YADVU6_cjs.markRejoining(callExtId);
806
+ chunk26SZ3DS4_cjs.markRejoining(callExtId);
807
807
  if (fallback.current) clearTimeout(fallback.current);
808
808
  fallback.current = setTimeout(() => void room.disconnect(), DEMOTE_REJOIN_FALLBACK_MS);
809
809
  return;
@@ -830,12 +830,12 @@ function useWebinar({
830
830
  [callExtId, linkVersion]
831
831
  );
832
832
  const stepDown = react.useCallback(async () => {
833
- chunk44YADVU6_cjs.markRejoining(callExtId);
833
+ chunk26SZ3DS4_cjs.markRejoining(callExtId);
834
834
  setStageCheck(false);
835
835
  try {
836
836
  await webinarApi().demote(callExtId, myIdentity, linkVersion);
837
837
  } catch (err) {
838
- chunk44YADVU6_cjs.markRejoining(callExtId, false);
838
+ chunk26SZ3DS4_cjs.markRejoining(callExtId, false);
839
839
  failed("leave the stage")(err);
840
840
  }
841
841
  }, [callExtId, myIdentity, linkVersion]);
@@ -895,7 +895,7 @@ function useWebinar({
895
895
  if (!callKey) throw new Error("This call has no key.");
896
896
  await webinarApi().questions.ask(
897
897
  callExtId,
898
- await chunk44YADVU6_cjs.sealQuestionText(text, callKey),
898
+ await chunk26SZ3DS4_cjs.sealQuestionText(text, callKey),
899
899
  linkVersion
900
900
  );
901
901
  }, "ask the question"),
@@ -909,7 +909,7 @@ function useWebinar({
909
909
  await webinarApi().questions.update(
910
910
  callExtId,
911
911
  id,
912
- { answer: await chunk44YADVU6_cjs.sealQuestionText(text, callKey) },
912
+ { answer: await chunk26SZ3DS4_cjs.sealQuestionText(text, callKey) },
913
913
  linkVersion
914
914
  );
915
915
  }, "answer the question"),
@@ -939,15 +939,15 @@ function useWebinar({
939
939
  function useHostMuteNotice(callExtId) {
940
940
  const room = componentsReact.useRoomContext();
941
941
  react.useEffect(() => {
942
- const notifyMuted = chunk44YADVU6_cjs.createMutedNotifier((text) => chunkIX4HOS5Z_cjs.notify.info(text));
942
+ const notifyMuted = chunk26SZ3DS4_cjs.createMutedNotifier((text) => chunkIX4HOS5Z_cjs.notify.info(text));
943
943
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
944
- if (topic !== chunk44YADVU6_cjs.CALL_MODERATION_TOPIC) return;
944
+ if (topic !== chunk26SZ3DS4_cjs.CALL_MODERATION_TOPIC) return;
945
945
  if (participant || participantIdentity) return;
946
- const notice = chunk44YADVU6_cjs.mutedNoticeFromPacket(payload);
946
+ const notice = chunk26SZ3DS4_cjs.mutedNoticeFromPacket(payload);
947
947
  if (notice) notifyMuted(notice);
948
948
  };
949
949
  room.on(livekitClient.RoomEvent.DataReceived, onData);
950
- const offWs = chunk44YADVU6_cjs.onCallEvent("call.muted", (message) => {
950
+ const offWs = chunk26SZ3DS4_cjs.onCallEvent("call.muted", (message) => {
951
951
  if (message.callExtId === callExtId) notifyMuted(message);
952
952
  });
953
953
  return () => {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
4
- var chunkIWNWPUAS_cjs = require('./chunk-IWNWPUAS.cjs');
3
+ var chunkZZZYVNFW_cjs = require('./chunk-ZZZYVNFW.cjs');
5
4
  var chunkFE6ZSNZE_cjs = require('./chunk-FE6ZSNZE.cjs');
6
5
  var chunkIX4HOS5Z_cjs = require('./chunk-IX4HOS5Z.cjs');
6
+ var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
7
7
  var reactQuery = require('@tanstack/react-query');
8
8
  var react = require('react');
9
9
  var browser = require('@arbidocs/sdk/browser');
@@ -1087,7 +1087,7 @@ function arbiAccountClient(arbi, overrides = {}) {
1087
1087
  if (everywhere) await arbi.sessions.logoutAll();
1088
1088
  else await arbi.logout();
1089
1089
  } finally {
1090
- chunkIWNWPUAS_cjs.clearSealedDrafts();
1090
+ chunkZZZYVNFW_cjs.clearSealedDrafts();
1091
1091
  chunkIX4HOS5Z_cjs.clearChatArtifacts();
1092
1092
  await wipeOfflineMail().catch(() => {
1093
1093
  });
@@ -2721,7 +2721,7 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
2721
2721
  function useMeetingReadOnly(lockedWorkspaceExtId) {
2722
2722
  const arbi = chunkFE6ZSNZE_cjs.useArbi();
2723
2723
  const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
2724
- const { data: workspaces } = chunkIWNWPUAS_cjs.useWorkspaces({
2724
+ const { data: workspaces } = chunkZZZYVNFW_cjs.useWorkspaces({
2725
2725
  enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
2726
2726
  });
2727
2727
  return isWorkspaceGuestOf(
@@ -2983,5 +2983,5 @@ exports.useUserSettings = useUserSettings;
2983
2983
  exports.wipeOfflineMail = wipeOfflineMail;
2984
2984
  exports.wrapTrackKey = wrapTrackKey;
2985
2985
  exports.writeSamples = writeSamples;
2986
- //# sourceMappingURL=chunk-44YADVU6.cjs.map
2987
- //# sourceMappingURL=chunk-44YADVU6.cjs.map
2986
+ //# sourceMappingURL=chunk-26SZ3DS4.cjs.map
2987
+ //# sourceMappingURL=chunk-26SZ3DS4.cjs.map