@arbidocs/react 0.5.97 → 0.5.99

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 (50) hide show
  1. package/README.md +6 -1
  2. package/dist/artifacts/index.cjs +13 -13
  3. package/dist/artifacts/index.js +3 -3
  4. package/dist/calls/livekit/index.cjs +48 -48
  5. package/dist/calls/livekit/index.js +3 -3
  6. package/dist/{chunk-IIOOXKOB.js → chunk-4SH5INC3.js} +4 -4
  7. package/dist/{chunk-IIOOXKOB.js.map → chunk-4SH5INC3.js.map} +1 -1
  8. package/dist/{chunk-NJDVQIJR.cjs → chunk-5EELSW26.cjs} +4 -4
  9. package/dist/{chunk-NJDVQIJR.cjs.map → chunk-5EELSW26.cjs.map} +1 -1
  10. package/dist/{chunk-HGLS3IC6.js → chunk-5X3JANHT.js} +3 -3
  11. package/dist/{chunk-HGLS3IC6.js.map → chunk-5X3JANHT.js.map} +1 -1
  12. package/dist/{chunk-7PMNITKA.js → chunk-6SG2OGDR.js} +11 -2
  13. package/dist/chunk-6SG2OGDR.js.map +1 -0
  14. package/dist/{chunk-5RRWRTY3.js → chunk-ALT6ETIE.js} +39 -6
  15. package/dist/chunk-ALT6ETIE.js.map +1 -0
  16. package/dist/{chunk-BRFRQWAY.cjs → chunk-HAGC67GL.cjs} +11 -2
  17. package/dist/chunk-HAGC67GL.cjs.map +1 -0
  18. package/dist/{chunk-6BXRZYL2.cjs → chunk-ORBUPHMV.cjs} +38 -38
  19. package/dist/{chunk-6BXRZYL2.cjs.map → chunk-ORBUPHMV.cjs.map} +1 -1
  20. package/dist/{chunk-7RUVJZZG.cjs → chunk-Q65QCWNI.cjs} +57 -57
  21. package/dist/{chunk-7RUVJZZG.cjs.map → chunk-Q65QCWNI.cjs.map} +1 -1
  22. package/dist/{chunk-NR6PUE5O.cjs → chunk-VIOW22Q4.cjs} +44 -44
  23. package/dist/{chunk-NR6PUE5O.cjs.map → chunk-VIOW22Q4.cjs.map} +1 -1
  24. package/dist/{chunk-CSYZ3YI4.cjs → chunk-WJME7DI4.cjs} +99 -65
  25. package/dist/chunk-WJME7DI4.cjs.map +1 -0
  26. package/dist/{chunk-KZBYWXPS.js → chunk-YIZH5RVW.js} +3 -3
  27. package/dist/{chunk-KZBYWXPS.js.map → chunk-YIZH5RVW.js.map} +1 -1
  28. package/dist/{chunk-N3SFVZ7H.js → chunk-ZEGCZATR.js} +3 -3
  29. package/dist/{chunk-N3SFVZ7H.js.map → chunk-ZEGCZATR.js.map} +1 -1
  30. package/dist/document-tools/core.cjs +98 -98
  31. package/dist/document-tools/core.d.cts +2 -2
  32. package/dist/document-tools/core.d.ts +2 -2
  33. package/dist/document-tools/core.js +3 -3
  34. package/dist/document-tools/index.cjs +100 -100
  35. package/dist/document-tools/index.d.cts +1 -1
  36. package/dist/document-tools/index.d.ts +1 -1
  37. package/dist/document-tools/index.js +4 -4
  38. package/dist/index.cjs +1693 -1553
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +222 -92
  41. package/dist/index.d.ts +222 -92
  42. package/dist/index.js +407 -281
  43. package/dist/index.js.map +1 -1
  44. package/dist/{query-keys.d-D6SAUl7S.d.ts → query-keys.d-O3lHn6rp.d.cts} +9 -0
  45. package/dist/{query-keys.d-D6SAUl7S.d.cts → query-keys.d-O3lHn6rp.d.ts} +9 -0
  46. package/package.json +3 -3
  47. package/dist/chunk-5RRWRTY3.js.map +0 -1
  48. package/dist/chunk-7PMNITKA.js.map +0 -1
  49. package/dist/chunk-BRFRQWAY.cjs.map +0 -1
  50. package/dist/chunk-CSYZ3YI4.cjs.map +0 -1
package/README.md CHANGED
@@ -262,7 +262,8 @@ Mail is kept on the device, sealed at rest to the signed-in user's key, bound to
262
262
  and readable only by them: reading and searching recent mail offline (the last 7 days by default;
263
263
  per device, Off / 1 / 7 / 30 / 90 days, `useOfflineMailSettings`), an Outbox whose sends go out
264
264
  exactly once and in order on reconnect (each keeps its `request_id`), drafts written offline, and
265
- changes made offline (read, moved, Trash, deleted: `queueMailChange`, `usePendingMailChanges`),
265
+ changes made offline (read, flagged, moved, Trash, deleted: `queueMailChange`,
266
+ `usePendingMailChanges`),
266
267
  applied in order on reconnect. Nothing goes out under "Work offline". The default mail client (no
267
268
  host `mail`) already reads through `offlineMailReads`, and `defaultHost` in `@arbidocs/blocks`
268
269
  mounts the runtime and wipes the mail at sign-out. A host with its own client and session adds
@@ -278,6 +279,10 @@ useOfflineMailRuntime({ openOutbox }) // mounted once: sends the Outbox, applies
278
279
  await wipeOfflineMail() // at sign-out
279
280
  ```
280
281
 
282
+ Conversations (`useMailConversations`, `useMailThread`) group by thread on the device exactly as
283
+ the server does (`groupMailConversations`, `mailConversationKey`); `useNativeThreadKeys` keys older
284
+ native mail into conversations in the background.
285
+
281
286
  The mail kits use `offlineMailSupport` (`@arbidocs/blocks/connect`) as their device storage by
282
287
  default; the per-device settings are `ConnectedMailOfflineSettings`.
283
288
 
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkNR6PUE5O_cjs = require('../chunk-NR6PUE5O.cjs');
4
- var chunk7RUVJZZG_cjs = require('../chunk-7RUVJZZG.cjs');
3
+ var chunkVIOW22Q4_cjs = require('../chunk-VIOW22Q4.cjs');
4
+ var chunkQ65QCWNI_cjs = require('../chunk-Q65QCWNI.cjs');
5
5
  var chunk3AADNIOK_cjs = require('../chunk-3AADNIOK.cjs');
6
- var chunkBRFRQWAY_cjs = require('../chunk-BRFRQWAY.cjs');
6
+ var chunkHAGC67GL_cjs = require('../chunk-HAGC67GL.cjs');
7
7
  require('../chunk-N73IMVFF.cjs');
8
8
  var chunkNDIKMOBJ_cjs = require('../chunk-NDIKMOBJ.cjs');
9
9
  var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
@@ -270,7 +270,7 @@ var isRefusal = (error) => {
270
270
  return code === 401 || code === 403;
271
271
  };
272
272
  function useArtifactText(docId, options) {
273
- const arbi = chunkBRFRQWAY_cjs.useArbi();
273
+ const arbi = chunkHAGC67GL_cjs.useArbi();
274
274
  const { attempts, baseDelayMs, maxDelayMs } = {
275
275
  ...DEFAULT_ARTIFACT_TEXT_RETRY,
276
276
  ...options?.retry
@@ -278,7 +278,7 @@ function useArtifactText(docId, options) {
278
278
  const enabled = (options?.enabled ?? true) && chunkNDIKMOBJ_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
- queryKey: [...chunkBRFRQWAY_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
281
+ queryKey: [...chunkHAGC67GL_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
282
282
  queryFn: async () => {
283
283
  const { docId: plainId, version } = chunkNDIKMOBJ_cjs.parseVersionRef(docId);
284
284
  const parsed = await arbi.documents.getParsedContent(
@@ -326,12 +326,12 @@ function useArtifactText(docId, options) {
326
326
  // src/artifacts/useArtifactSession.ts
327
327
  function useArtifactVersions(workspaceId, docId) {
328
328
  const plainId = docId ? chunkNDIKMOBJ_cjs.parseVersionRef(docId).docId : null;
329
- const { data: documents } = chunkNR6PUE5O_cjs.useDocuments(workspaceId);
329
+ const { data: documents } = chunkVIOW22Q4_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 } = chunk7RUVJZZG_cjs.useDocumentVersionList(plainId, {
334
+ const { data: history } = chunkQ65QCWNI_cjs.useDocumentVersionList(plainId, {
335
335
  enabled: !!plainId && documents !== void 0 && !listed
336
336
  });
337
337
  return react.useMemo(
@@ -340,7 +340,7 @@ function useArtifactVersions(workspaceId, docId) {
340
340
  );
341
341
  }
342
342
  function useSaveArtifactVersion() {
343
- const arbi = chunkBRFRQWAY_cjs.useArbi();
343
+ const arbi = chunkHAGC67GL_cjs.useArbi();
344
344
  const queryClient = reactQuery.useQueryClient();
345
345
  return reactQuery.useMutation({
346
346
  mutationFn: async ({ title, content, versionOf, configId, wpType }) => {
@@ -355,10 +355,10 @@ function useSaveArtifactVersion() {
355
355
  }
356
356
  );
357
357
  const docId = result.doc_ext_ids?.[0];
358
- if (docId) await chunkNR6PUE5O_cjs.refreshDocuments(queryClient, arbi, [docId]);
359
- await queryClient.invalidateQueries({ queryKey: chunkBRFRQWAY_cjs.arbiQueryKeys.allDocumentVersions() });
358
+ if (docId) await chunkVIOW22Q4_cjs.refreshDocuments(queryClient, arbi, [docId]);
359
+ await queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.allDocumentVersions() });
360
360
  if (docId)
361
- await queryClient.invalidateQueries({ queryKey: chunkBRFRQWAY_cjs.arbiQueryKeys.parsedDocument(docId) });
361
+ await queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.parsedDocument(docId) });
362
362
  return { docId, version: result.version ?? void 0 };
363
363
  }
364
364
  });
@@ -475,9 +475,9 @@ function useArtifactSession(options) {
475
475
  );
476
476
  }
477
477
  function useArtifactSource(documentId, enabled = true) {
478
- const arbi = chunkBRFRQWAY_cjs.useArbi();
478
+ const arbi = chunkHAGC67GL_cjs.useArbi();
479
479
  return reactQuery.useQuery({
480
- queryKey: chunkBRFRQWAY_cjs.arbiQueryKeys.artifactSource(documentId ?? ""),
480
+ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.artifactSource(documentId ?? ""),
481
481
  queryFn: async () => (await arbi.documents.download(documentId)).text(),
482
482
  enabled: enabled && !!documentId && arbi.isLoggedIn,
483
483
  staleTime: 5 * 60 * 1e3
@@ -1,8 +1,8 @@
1
- import { useDocuments, refreshDocuments } from '../chunk-KZBYWXPS.js';
2
- import { useDocumentVersionList } from '../chunk-N3SFVZ7H.js';
1
+ import { useDocuments, refreshDocuments } from '../chunk-YIZH5RVW.js';
2
+ import { useDocumentVersionList } from '../chunk-ZEGCZATR.js';
3
3
  import { revertRedlineRegion, buildHybridRedlineWithRegions, buildHybridRedlineMarkdown } from '../chunk-74N436VK.js';
4
4
  export { buildHybridRedlineMarkdown, buildHybridRedlineWithRegions, revertRedlineRegion } from '../chunk-74N436VK.js';
5
- import { useArbi, arbiQueryKeys } from '../chunk-7PMNITKA.js';
5
+ import { useArbi, arbiQueryKeys } from '../chunk-6SG2OGDR.js';
6
6
  import '../chunk-DPYBZDJB.js';
7
7
  import { isDocumentId, parseVersionRef, flattenChunks, documentVersions, toArtifactVersions, findVersion, versionLabel, cleanDraftWithReport } from '../chunk-UW2SGTI5.js';
8
8
  export { cleanDraftMarkdown, cleanDraftWithReport, documentVersions, findVersion, flattenChunks, isDocumentId, parseVersionRef, promoteBoldTitle, repairParsedStructure, repairParsedTitle, savedFromId, stripAgentPreamble, toArtifactVersions, unescapeMarkdown, unwrapCitationLinks, versionLabel, versionRef } from '../chunk-UW2SGTI5.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkCSYZ3YI4_cjs = require('../../chunk-CSYZ3YI4.cjs');
4
- require('../../chunk-7RUVJZZG.cjs');
5
- var chunkBRFRQWAY_cjs = require('../../chunk-BRFRQWAY.cjs');
3
+ var chunkWJME7DI4_cjs = require('../../chunk-WJME7DI4.cjs');
4
+ require('../../chunk-Q65QCWNI.cjs');
5
+ var chunkHAGC67GL_cjs = require('../../chunk-HAGC67GL.cjs');
6
6
  var chunkRLSBRZ6Z_cjs = require('../../chunk-RLSBRZ6Z.cjs');
7
7
  require('../../chunk-N73IMVFF.cjs');
8
8
  require('../../chunk-NDIKMOBJ.cjs');
@@ -120,11 +120,11 @@ function useCallTranscriber({
120
120
  const room = componentsReact.useRoomContext();
121
121
  const { localParticipant } = componentsReact.useLocalParticipant();
122
122
  const myIdentity = localParticipant.identity;
123
- const arbi = chunkBRFRQWAY_cjs.useArbi();
123
+ const arbi = chunkHAGC67GL_cjs.useArbi();
124
124
  const queryClient = reactQuery.useQueryClient();
125
125
  const profile = arbi.isLoggedIn ? arbi.user.profile() : null;
126
- const myProfileName = profile && chunkCSYZ3YI4_cjs.toProfileView(profile).fullName || null;
127
- const deploymentAvailable = chunkCSYZ3YI4_cjs.useCallTranscriptionAvailable();
126
+ const myProfileName = profile && chunkWJME7DI4_cjs.toProfileView(profile).fullName || null;
127
+ const deploymentAvailable = chunkWJME7DI4_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
- () => chunkCSYZ3YI4_cjs.onCallEvent("call.transcription", (message) => {
170
+ () => chunkWJME7DI4_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 = chunkCSYZ3YI4_cjs.transcriptPersistRole({
186
+ const role = chunkWJME7DI4_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
- chunkCSYZ3YI4_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
195
+ chunkWJME7DI4_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 === chunkCSYZ3YI4_cjs.CALL_TRANSCRIPTION_TOPIC) {
215
+ if (topic === chunkWJME7DI4_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 !== chunkCSYZ3YI4_cjs.CALL_CAPTION_TOPIC || !callKey) return;
224
+ if (topic !== chunkWJME7DI4_cjs.CALL_CAPTION_TOPIC || !callKey) return;
225
225
  const identity = participant?.identity ?? participantIdentity;
226
226
  if (!identity || identity === myIdentity) return;
227
- void chunkCSYZ3YI4_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
227
+ void chunkWJME7DI4_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 = chunkCSYZ3YI4_cjs.newSegmentId();
267
+ const segmentId = chunkWJME7DI4_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 chunkCSYZ3YI4_cjs.encodeCaptionPacket(
301
+ await chunkWJME7DI4_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: chunkCSYZ3YI4_cjs.CALL_CAPTION_TOPIC }
313
+ { reliable: true, topic: chunkWJME7DI4_cjs.CALL_CAPTION_TOPIC }
314
314
  );
315
315
  } catch (err) {
316
316
  console.warn("[calls] could not broadcast a caption", err);
@@ -391,7 +391,7 @@ function useCallRecorder({
391
391
  isCreator,
392
392
  linkVersion = null
393
393
  }) {
394
- const arbi = chunkBRFRQWAY_cjs.useArbi();
394
+ const arbi = chunkHAGC67GL_cjs.useArbi();
395
395
  const queryClient = reactQuery.useQueryClient();
396
396
  const room = componentsReact.useRoomContext();
397
397
  const { localParticipant } = componentsReact.useLocalParticipant();
@@ -425,14 +425,14 @@ function useCallRecorder({
425
425
  };
426
426
  }, [callExtId]);
427
427
  react.useEffect(
428
- () => chunkCSYZ3YI4_cjs.onCallEvent("call.recording", (message) => {
428
+ () => chunkWJME7DI4_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 !== chunkCSYZ3YI4_cjs.CALL_RECORDING_TOPIC) return;
435
+ if (topic !== chunkWJME7DI4_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 chunkCSYZ3YI4_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
456
+ const ref = await chunkWJME7DI4_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);
@@ -551,11 +551,11 @@ function useCallRecorder({
551
551
  }
552
552
  function useTrackUploader(recording, callKey, kind, mimeType) {
553
553
  const { recordingExtId, call, startedAt, shouldCapture, markStopped, linkVersion } = recording;
554
- const arbi = chunkBRFRQWAY_cjs.useArbi();
554
+ const arbi = chunkHAGC67GL_cjs.useArbi();
555
555
  const queryClient = reactQuery.useQueryClient();
556
556
  return react.useMemo(() => {
557
557
  if (!shouldCapture || !recordingExtId || !call) return null;
558
- return chunkCSYZ3YI4_cjs.trackUploaderFor({
558
+ return chunkWJME7DI4_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: () => chunkCSYZ3YI4_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
566
+ conversationKey: () => chunkWJME7DI4_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
  });
@@ -591,9 +591,9 @@ function useInCallChat({
591
591
  const room = componentsReact.useRoomContext();
592
592
  const { localParticipant } = componentsReact.useLocalParticipant();
593
593
  const myIdentity = localParticipant.identity;
594
- const arbi = chunkBRFRQWAY_cjs.useArbi();
594
+ const arbi = chunkHAGC67GL_cjs.useArbi();
595
595
  const queryClient = reactQuery.useQueryClient();
596
- const openMeetingChat = chunkBRFRQWAY_cjs.useArbiHost().calls?.openMeetingChat;
596
+ const openMeetingChat = chunkHAGC67GL_cjs.useArbiHost().calls?.openMeetingChat;
597
597
  const signedIn = arbi.isLoggedIn;
598
598
  const persists = !!callKey && signedIn && !readOnly && persist;
599
599
  const [live, setLive] = react.useState([]);
@@ -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 !== chunkCSYZ3YI4_cjs.CALL_CHAT_TOPIC) return;
615
+ if (topic !== chunkWJME7DI4_cjs.CALL_CHAT_TOPIC) return;
616
616
  const identity = participant?.identity ?? participantIdentity;
617
617
  if (!identity || identity === myIdentity) return;
618
- void chunkCSYZ3YI4_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
618
+ void chunkWJME7DI4_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
- chunkCSYZ3YI4_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
648
+ chunkWJME7DI4_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, chunkCSYZ3YI4_cjs.CALL_CHAT_MAX_CHARS);
659
+ const text = raw.trim().slice(0, chunkWJME7DI4_cjs.CALL_CHAT_MAX_CHARS);
660
660
  if (!text || !callKey || readOnly) return;
661
- const id = chunkCSYZ3YI4_cjs.newPacketId();
661
+ const id = chunkWJME7DI4_cjs.newPacketId();
662
662
  const at = Date.now();
663
663
  await localParticipant.publishData(
664
- await chunkCSYZ3YI4_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
665
- { reliable: true, topic: chunkCSYZ3YI4_cjs.CALL_CHAT_TOPIC }
664
+ await chunkWJME7DI4_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
665
+ { reliable: true, topic: chunkWJME7DI4_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 chunkCSYZ3YI4_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
684
+ setMeetingChat(await chunkWJME7DI4_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 chunkCSYZ3YI4_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
696
+ const ref = meetingChat ?? await chunkWJME7DI4_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
- () => chunkCSYZ3YI4_cjs.mergeChatLines(history, live, {
704
+ () => chunkWJME7DI4_cjs.mergeChatLines(history, live, {
705
705
  myIdentity,
706
706
  nameOf: (identity) => identity === myIdentity ? localParticipant.name || "You" : room.remoteParticipants.get(identity)?.name || null
707
707
  }),
@@ -733,7 +733,7 @@ function useWebinar({
733
733
  linkVersion = null,
734
734
  callKey
735
735
  }) {
736
- const arbi = chunkBRFRQWAY_cjs.useArbi();
736
+ const arbi = chunkHAGC67GL_cjs.useArbi();
737
737
  const webinarApi = react.useCallback(() => arbi.calls.webinar, [arbi]);
738
738
  const enabled = !!roleHint;
739
739
  const room = componentsReact.useRoomContext();
@@ -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) => chunkCSYZ3YI4_cjs.openQuestion(q, callKey)));
763
+ const opened = await Promise.all(rows.map((q) => chunkWJME7DI4_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 chunkCSYZ3YI4_cjs.onCallEvent("call.webinar", (m) => {
775
+ return chunkWJME7DI4_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 !== chunkCSYZ3YI4_cjs.CALL_WEBINAR_TOPIC) return;
785
- const packet = chunkCSYZ3YI4_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
784
+ if (topic !== chunkWJME7DI4_cjs.CALL_WEBINAR_TOPIC) return;
785
+ const packet = chunkWJME7DI4_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
- chunkCSYZ3YI4_cjs.markRejoining(callExtId);
806
+ chunkWJME7DI4_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
- chunkCSYZ3YI4_cjs.markRejoining(callExtId);
833
+ chunkWJME7DI4_cjs.markRejoining(callExtId);
834
834
  setStageCheck(false);
835
835
  try {
836
836
  await webinarApi().demote(callExtId, myIdentity, linkVersion);
837
837
  } catch (err) {
838
- chunkCSYZ3YI4_cjs.markRejoining(callExtId, false);
838
+ chunkWJME7DI4_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 chunkCSYZ3YI4_cjs.sealQuestionText(text, callKey),
898
+ await chunkWJME7DI4_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 chunkCSYZ3YI4_cjs.sealQuestionText(text, callKey) },
912
+ { answer: await chunkWJME7DI4_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 = chunkCSYZ3YI4_cjs.createMutedNotifier((text) => chunkRLSBRZ6Z_cjs.notify.info(text));
942
+ const notifyMuted = chunkWJME7DI4_cjs.createMutedNotifier((text) => chunkRLSBRZ6Z_cjs.notify.info(text));
943
943
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
944
- if (topic !== chunkCSYZ3YI4_cjs.CALL_MODERATION_TOPIC) return;
944
+ if (topic !== chunkWJME7DI4_cjs.CALL_MODERATION_TOPIC) return;
945
945
  if (participant || participantIdentity) return;
946
- const notice = chunkCSYZ3YI4_cjs.mutedNoticeFromPacket(payload);
946
+ const notice = chunkWJME7DI4_cjs.mutedNoticeFromPacket(payload);
947
947
  if (notice) notifyMuted(notice);
948
948
  };
949
949
  room.on(livekitClient.RoomEvent.DataReceived, onData);
950
- const offWs = chunkCSYZ3YI4_cjs.onCallEvent("call.muted", (message) => {
950
+ const offWs = chunkWJME7DI4_cjs.onCallEvent("call.muted", (message) => {
951
951
  if (message.callExtId === callExtId) notifyMuted(message);
952
952
  });
953
953
  return () => {
@@ -1,6 +1,6 @@
1
- import { toProfileView, useCallTranscriptionAvailable, onCallEvent, transcriptPersistRole, persistTranscriptSegment, newSegmentId, encodeCaptionPacket, CALL_CAPTION_TOPIC, ensureMeetingChat, trackUploaderFor, conversationKeyForCall, loadMeetingHistory, CALL_CHAT_MAX_CHARS, newPacketId, encodeCallChatPacket, CALL_CHAT_TOPIC, persistMeetingMessage, mergeChatLines, openQuestion, markRejoining, sealQuestionText, createMutedNotifier, CALL_RECORDING_TOPIC, CALL_TRANSCRIPTION_TOPIC, decodeCaptionPacket, CALL_MODERATION_TOPIC, mutedNoticeFromPacket, decodeCallChatPacket, CALL_WEBINAR_TOPIC, parseWebinarPacket } from '../../chunk-5RRWRTY3.js';
2
- import '../../chunk-N3SFVZ7H.js';
3
- import { useArbi, useArbiHost } from '../../chunk-7PMNITKA.js';
1
+ import { toProfileView, useCallTranscriptionAvailable, onCallEvent, transcriptPersistRole, persistTranscriptSegment, newSegmentId, encodeCaptionPacket, CALL_CAPTION_TOPIC, ensureMeetingChat, trackUploaderFor, conversationKeyForCall, loadMeetingHistory, CALL_CHAT_MAX_CHARS, newPacketId, encodeCallChatPacket, CALL_CHAT_TOPIC, persistMeetingMessage, mergeChatLines, openQuestion, markRejoining, sealQuestionText, createMutedNotifier, CALL_RECORDING_TOPIC, CALL_TRANSCRIPTION_TOPIC, decodeCaptionPacket, CALL_MODERATION_TOPIC, mutedNoticeFromPacket, decodeCallChatPacket, CALL_WEBINAR_TOPIC, parseWebinarPacket } from '../../chunk-ALT6ETIE.js';
2
+ import '../../chunk-ZEGCZATR.js';
3
+ import { useArbi, useArbiHost } from '../../chunk-6SG2OGDR.js';
4
4
  import { notify } from '../../chunk-BF5KW5ZI.js';
5
5
  import '../../chunk-DPYBZDJB.js';
6
6
  import '../../chunk-UW2SGTI5.js';
@@ -1,7 +1,7 @@
1
- import { useDocumentTools, SIGNED_LOCKED_REASON, fetchMarkupPdf, fetchDocumentFile, fetchDocumentPdf } from './chunk-HGLS3IC6.js';
1
+ import { useDocumentTools, SIGNED_LOCKED_REASON, fetchMarkupPdf, fetchDocumentFile, fetchDocumentPdf } from './chunk-5X3JANHT.js';
2
2
  import { mergeLayers, AnnotationStoreOfflineError } from './chunk-T4CLW3DN.js';
3
3
  import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from './chunk-T3USOSVN.js';
4
- import { documentBytesKey, arbiQueryKeys, useArbiHost } from './chunk-7PMNITKA.js';
4
+ import { documentBytesKey, arbiQueryKeys, useArbiHost } from './chunk-6SG2OGDR.js';
5
5
  import { parseVersionRef } from './chunk-UW2SGTI5.js';
6
6
  import { useMemo, useState, useCallback, useEffect, useSyncExternalStore } from 'react';
7
7
  import { onlineManager, useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
@@ -1007,5 +1007,5 @@ function useFileShares(client) {
1007
1007
  }
1008
1008
 
1009
1009
  export { DEFAULT_FIELD_SIZE, FIELD_TYPE_LABELS, INFORMAL_SIGNATURE_NOTE, LEGACY_LAYER_PREFIX, MARK_FIELD_TYPES, MAX_MERGE_ATTEMPTS, MarkupStoreError, SIGNATURE_FIELD_TYPES, SIGNED_UNCHANGED, SIGNER_PROGRESS_LABELS, SignatureVerificationError, SigningError, VERIFY_PATH, addToMarkup, canAnnotate, copyOpenThreads, createFileShare, createMarkupStore, deleteSavedSignature, fetchDocumentSignatureRequests, fetchDocumentSignatures, fetchSavedSignature, fetchSignatureVerification, fieldsFromSuggestions, fieldsInSigningOrder, fileShareBytes, fileShareSigningRequest, forgetLegacyLayer, frozenCopyName, getFileShare, initialsOf, intentText, inviteSigners, isEmailSigner, isLegibleSignatureBox, isSignatureReference, marksByVersion, matchSignedCopy, migrateLegacyLayer, newFieldId, openThreadsOf, pngBytes, pngSize, readLegacyLayer, redactionLogName, saveSignatureRequest, sendBlocker, sha256Hex, signDocument, signFileShare, signSignatureRequest, signatureFieldSuggestions, splitSuggestions, storeSavedSignature, suggestSignatureFields, toAppearance, uploadFrozenCopy, useDeclineSignatureRequest, useDeleteSavedSignature, useDocumentBytes, useDocumentMarkup, useDocumentSignatureRequests, useDocumentSignatures, useFileShare, useFileSharePdf, useFileShares, useInviteSigners, useIsOnline, useSaveSignatureRequest, useSavedSignature, useSignDocument, useSignSignatureRequest, useSignatureVerification, useSignerCandidates, useStoreSavedSignature, useVoidSignatureRequest, versionsWithMarkup };
1010
- //# sourceMappingURL=chunk-IIOOXKOB.js.map
1011
- //# sourceMappingURL=chunk-IIOOXKOB.js.map
1010
+ //# sourceMappingURL=chunk-4SH5INC3.js.map
1011
+ //# sourceMappingURL=chunk-4SH5INC3.js.map