@arbidocs/react 0.5.183 → 0.5.184

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.
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ7BGWKHP_cjs = require('../chunk-Q7BGWKHP.cjs');
3
+ var chunkKAMOFYV2_cjs = require('../chunk-KAMOFYV2.cjs');
4
4
  var chunkEM6DP62E_cjs = require('../chunk-EM6DP62E.cjs');
5
- var chunkNBES77PB_cjs = require('../chunk-NBES77PB.cjs');
5
+ var chunkBEOHXA2Z_cjs = require('../chunk-BEOHXA2Z.cjs');
6
6
  var chunk3AADNIOK_cjs = require('../chunk-3AADNIOK.cjs');
7
- var chunk5QOZLKAY_cjs = require('../chunk-5QOZLKAY.cjs');
7
+ var chunkSJZRVX7T_cjs = require('../chunk-SJZRVX7T.cjs');
8
8
  require('../chunk-N73IMVFF.cjs');
9
9
  var chunkDQODLWFX_cjs = require('../chunk-DQODLWFX.cjs');
10
10
  require('../chunk-5NOZDH3F.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 = chunk5QOZLKAY_cjs.useArbi();
273
+ const arbi = chunkSJZRVX7T_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) && chunkDQODLWFX_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: [...chunk5QOZLKAY_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
281
+ queryKey: [...chunkSJZRVX7T_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
282
282
  queryFn: async () => {
283
283
  const { docId: plainId, version } = chunkDQODLWFX_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 ? chunkDQODLWFX_cjs.parseVersionRef(docId).docId : null;
329
- const { data: documents } = chunkQ7BGWKHP_cjs.useDocuments(workspaceId);
329
+ const { data: documents } = chunkKAMOFYV2_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 } = chunkNBES77PB_cjs.useDocumentVersionList(plainId, {
334
+ const { data: history } = chunkBEOHXA2Z_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 = chunk5QOZLKAY_cjs.useArbi();
343
+ const arbi = chunkSJZRVX7T_cjs.useArbi();
344
344
  const queryClient = reactQuery.useQueryClient();
345
345
  return reactQuery.useMutation({
346
346
  mutationFn: async ({ title, content, versionOf, configId, wpType, autosave }) => {
@@ -356,10 +356,10 @@ function useSaveArtifactVersion() {
356
356
  }
357
357
  );
358
358
  const docId = result.doc_ext_ids?.[0];
359
- if (docId) await chunkQ7BGWKHP_cjs.refreshDocuments(queryClient, arbi, [docId]);
360
- await queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.allDocumentVersions() });
359
+ if (docId) await chunkKAMOFYV2_cjs.refreshDocuments(queryClient, arbi, [docId]);
360
+ await queryClient.invalidateQueries({ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.allDocumentVersions() });
361
361
  if (docId)
362
- await queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.parsedDocument(docId) });
362
+ await queryClient.invalidateQueries({ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.parsedDocument(docId) });
363
363
  return { docId, version: result.version ?? void 0 };
364
364
  }
365
365
  });
@@ -457,7 +457,7 @@ function useArtifactSession(options) {
457
457
  ]);
458
458
  react.useEffect(() => {
459
459
  if (!docId) return;
460
- return chunkQ7BGWKHP_cjs.registerDocumentTurnFlush(docId, async () => {
460
+ return chunkKAMOFYV2_cjs.registerDocumentTurnFlush(docId, async () => {
461
461
  if (session.hasChanges && !await session.save())
462
462
  throw new Error("Save the document before sending your message.");
463
463
  });
@@ -518,9 +518,9 @@ function useArtifactSession(options) {
518
518
  );
519
519
  }
520
520
  function useArtifactSource(documentId, enabled = true) {
521
- const arbi = chunk5QOZLKAY_cjs.useArbi();
521
+ const arbi = chunkSJZRVX7T_cjs.useArbi();
522
522
  return reactQuery.useQuery({
523
- queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.artifactSource(documentId ?? ""),
523
+ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.artifactSource(documentId ?? ""),
524
524
  queryFn: async () => (await arbi.documents.download(documentId)).text(),
525
525
  enabled: enabled && !!documentId && arbi.isLoggedIn,
526
526
  staleTime: 5 * 60 * 1e3
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkVCYRQZ3R_cjs = require('../../chunk-VCYRQZ3R.cjs');
3
+ var chunkKQY2LP76_cjs = require('../../chunk-KQY2LP76.cjs');
4
4
  require('../../chunk-EEIYXVM4.cjs');
5
- require('../../chunk-NBES77PB.cjs');
6
- var chunk5QOZLKAY_cjs = require('../../chunk-5QOZLKAY.cjs');
5
+ require('../../chunk-BEOHXA2Z.cjs');
6
+ var chunkSJZRVX7T_cjs = require('../../chunk-SJZRVX7T.cjs');
7
7
  var chunk5ECKSF6H_cjs = require('../../chunk-5ECKSF6H.cjs');
8
8
  require('../../chunk-N73IMVFF.cjs');
9
9
  require('../../chunk-DQODLWFX.cjs');
@@ -121,11 +121,11 @@ function useCallTranscriber({
121
121
  const room = componentsReact.useRoomContext();
122
122
  const { localParticipant } = componentsReact.useLocalParticipant();
123
123
  const myIdentity = localParticipant.identity;
124
- const arbi = chunk5QOZLKAY_cjs.useArbi();
124
+ const arbi = chunkSJZRVX7T_cjs.useArbi();
125
125
  const queryClient = reactQuery.useQueryClient();
126
126
  const profile = arbi.isLoggedIn ? arbi.user.profile() : null;
127
- const myProfileName = profile && chunkVCYRQZ3R_cjs.toProfileView(profile).fullName || null;
128
- const deploymentAvailable = chunkVCYRQZ3R_cjs.useCallTranscriptionAvailable();
127
+ const myProfileName = profile && chunkKQY2LP76_cjs.toProfileView(profile).fullName || null;
128
+ const deploymentAvailable = chunkKQY2LP76_cjs.useCallTranscriptionAvailable();
129
129
  const available = deploymentAvailable && !!callKey;
130
130
  const [state, setState] = react.useState(null);
131
131
  const [creatorExtId, setCreatorExtId] = react.useState(null);
@@ -168,7 +168,7 @@ function useCallTranscriber({
168
168
  };
169
169
  }, [available, callExtId]);
170
170
  react.useEffect(
171
- () => chunkVCYRQZ3R_cjs.onCallEvent("call.transcription", (message) => {
171
+ () => chunkKQY2LP76_cjs.onCallEvent("call.transcription", (message) => {
172
172
  if (message.call_ext_id === callExtId) applyState(message);
173
173
  }),
174
174
  [callExtId, applyState]
@@ -184,7 +184,7 @@ function useCallTranscriber({
184
184
  const persist = react.useCallback(
185
185
  (segment, speakerNeedsProxy) => {
186
186
  if (!callKey || persisted.current.has(segment.segmentId)) return;
187
- const role = chunkVCYRQZ3R_cjs.transcriptPersistRole({
187
+ const role = chunkKQY2LP76_cjs.transcriptPersistRole({
188
188
  myIdentity,
189
189
  canPost: canPost && (segment.speakerIdentity !== myIdentity || selfPosts.current),
190
190
  hasCallKey: true,
@@ -193,7 +193,7 @@ function useCallTranscriber({
193
193
  });
194
194
  if (!role) return;
195
195
  persisted.current.add(segment.segmentId);
196
- chunkVCYRQZ3R_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
196
+ chunkKQY2LP76_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
197
197
  (err) => {
198
198
  persisted.current.delete(segment.segmentId);
199
199
  if (role === "own" && err?.status === 403) {
@@ -213,7 +213,7 @@ function useCallTranscriber({
213
213
  );
214
214
  react.useEffect(() => {
215
215
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
216
- if (topic === chunkVCYRQZ3R_cjs.CALL_TRANSCRIPTION_TOPIC) {
216
+ if (topic === chunkKQY2LP76_cjs.CALL_TRANSCRIPTION_TOPIC) {
217
217
  if (participant || participantIdentity) return;
218
218
  try {
219
219
  const next = browser.calls.transcriptionStateFrom(JSON.parse(new TextDecoder().decode(payload)));
@@ -222,10 +222,10 @@ function useCallTranscriber({
222
222
  }
223
223
  return;
224
224
  }
225
- if (topic !== chunkVCYRQZ3R_cjs.CALL_CAPTION_TOPIC || !callKey) return;
225
+ if (topic !== chunkKQY2LP76_cjs.CALL_CAPTION_TOPIC || !callKey) return;
226
226
  const identity = participant?.identity ?? participantIdentity;
227
227
  if (!identity || identity === myIdentity) return;
228
- void chunkVCYRQZ3R_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
228
+ void chunkKQY2LP76_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
229
229
  if (!packet || packet.identity !== identity) return;
230
230
  const name = participant?.name || packet.name || identity;
231
231
  const t = Math.min(packet.t, Date.now());
@@ -265,7 +265,7 @@ function useCallTranscriber({
265
265
  })) {
266
266
  return;
267
267
  }
268
- const segmentId = chunkVCYRQZ3R_cjs.newSegmentId();
268
+ const segmentId = chunkKQY2LP76_cjs.newSegmentId();
269
269
  const startedAt = new Date(segment.startedAt).toISOString();
270
270
  let text;
271
271
  try {
@@ -299,7 +299,7 @@ function useCallTranscriber({
299
299
  });
300
300
  try {
301
301
  await localParticipant.publishData(
302
- await chunkVCYRQZ3R_cjs.encodeCaptionPacket(
302
+ await chunkKQY2LP76_cjs.encodeCaptionPacket(
303
303
  {
304
304
  v: 1,
305
305
  segment_id: segmentId,
@@ -311,7 +311,7 @@ function useCallTranscriber({
311
311
  },
312
312
  callKey
313
313
  ),
314
- { reliable: true, topic: chunkVCYRQZ3R_cjs.CALL_CAPTION_TOPIC }
314
+ { reliable: true, topic: chunkKQY2LP76_cjs.CALL_CAPTION_TOPIC }
315
315
  );
316
316
  } catch (err) {
317
317
  console.warn("[calls] could not broadcast a caption", err);
@@ -392,7 +392,7 @@ function useCallRecorder({
392
392
  isCreator,
393
393
  linkVersion = null
394
394
  }) {
395
- const arbi = chunk5QOZLKAY_cjs.useArbi();
395
+ const arbi = chunkSJZRVX7T_cjs.useArbi();
396
396
  const queryClient = reactQuery.useQueryClient();
397
397
  const room = componentsReact.useRoomContext();
398
398
  const { localParticipant } = componentsReact.useLocalParticipant();
@@ -426,14 +426,14 @@ function useCallRecorder({
426
426
  };
427
427
  }, [callExtId]);
428
428
  react.useEffect(
429
- () => chunkVCYRQZ3R_cjs.onCallEvent("call.recording", (message) => {
429
+ () => chunkKQY2LP76_cjs.onCallEvent("call.recording", (message) => {
430
430
  if (message.call_ext_id === callExtId) applyState(message);
431
431
  }),
432
432
  [callExtId, applyState]
433
433
  );
434
434
  react.useEffect(() => {
435
435
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
436
- if (topic !== chunkVCYRQZ3R_cjs.CALL_RECORDING_TOPIC) return;
436
+ if (topic !== chunkKQY2LP76_cjs.CALL_RECORDING_TOPIC) return;
437
437
  if (participant || participantIdentity) return;
438
438
  try {
439
439
  const next = browser.calls.recordingStateFrom(JSON.parse(new TextDecoder().decode(payload)));
@@ -454,7 +454,7 @@ function useCallRecorder({
454
454
  try {
455
455
  const row = call ?? await arbi.calls.get(callExtId);
456
456
  if (!row.workspace_locked && !row.chat_ext_id && callKey) {
457
- const ref = await chunkVCYRQZ3R_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
457
+ const ref = await chunkKQY2LP76_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
458
458
  if (ref.kind === "chat") setCall({ ...row, chat_ext_id: ref.chatExtId });
459
459
  }
460
460
  const answer = await arbi.calls.recording.start(callExtId, mode);
@@ -552,11 +552,11 @@ function useCallRecorder({
552
552
  }
553
553
  function useTrackUploader(recording, callKey, kind, mimeType) {
554
554
  const { recordingExtId, call, startedAt, shouldCapture, markStopped, linkVersion } = recording;
555
- const arbi = chunk5QOZLKAY_cjs.useArbi();
555
+ const arbi = chunkSJZRVX7T_cjs.useArbi();
556
556
  const queryClient = reactQuery.useQueryClient();
557
557
  return react.useMemo(() => {
558
558
  if (!shouldCapture || !recordingExtId || !call) return null;
559
- return chunkVCYRQZ3R_cjs.trackUploaderFor({
559
+ return chunkKQY2LP76_cjs.trackUploaderFor({
560
560
  arbi,
561
561
  callExtId: call.external_id,
562
562
  recordingExtId,
@@ -564,7 +564,7 @@ function useTrackUploader(recording, callKey, kind, mimeType) {
564
564
  mimeType,
565
565
  recordingStartedAt: startedAt,
566
566
  linkVersion,
567
- conversationKey: () => chunkVCYRQZ3R_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
567
+ conversationKey: () => chunkKQY2LP76_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
568
568
  // The server stopped the recording at the quota (its state event says so too).
569
569
  onStopped: () => markStopped()
570
570
  });
@@ -592,9 +592,9 @@ function useInCallChat({
592
592
  const room = componentsReact.useRoomContext();
593
593
  const { localParticipant } = componentsReact.useLocalParticipant();
594
594
  const myIdentity = localParticipant.identity;
595
- const arbi = chunk5QOZLKAY_cjs.useArbi();
595
+ const arbi = chunkSJZRVX7T_cjs.useArbi();
596
596
  const queryClient = reactQuery.useQueryClient();
597
- const openMeetingChat = chunk5QOZLKAY_cjs.useArbiHost().calls?.openMeetingChat;
597
+ const openMeetingChat = chunkSJZRVX7T_cjs.useArbiHost().calls?.openMeetingChat;
598
598
  const signedIn = arbi.isLoggedIn;
599
599
  const persists = !!callKey && signedIn && !readOnly && persist;
600
600
  const [live, setLive] = react.useState([]);
@@ -613,10 +613,10 @@ function useInCallChat({
613
613
  react.useEffect(() => {
614
614
  if (!callKey) return;
615
615
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
616
- if (topic !== chunkVCYRQZ3R_cjs.CALL_CHAT_TOPIC) return;
616
+ if (topic !== chunkKQY2LP76_cjs.CALL_CHAT_TOPIC) return;
617
617
  const identity = participant?.identity ?? participantIdentity;
618
618
  if (!identity || identity === myIdentity) return;
619
- void chunkVCYRQZ3R_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
619
+ void chunkKQY2LP76_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
620
620
  if (!packet) return;
621
621
  const key = `${identity}:${packet.id}`;
622
622
  if (seen.current.has(key)) return;
@@ -646,7 +646,7 @@ function useInCallChat({
646
646
  if (!open || !canRead || historyRequested.current) return;
647
647
  historyRequested.current = true;
648
648
  setHistoryLoading(true);
649
- chunkVCYRQZ3R_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
649
+ chunkKQY2LP76_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
650
650
  if (!result) return;
651
651
  setMeetingChat(result.ref);
652
652
  setHistory(result.messages);
@@ -657,13 +657,13 @@ function useInCallChat({
657
657
  }, [open, canRead, callExtId]);
658
658
  const send = react.useCallback(
659
659
  async (raw) => {
660
- const text = raw.trim().slice(0, chunkVCYRQZ3R_cjs.CALL_CHAT_MAX_CHARS);
660
+ const text = raw.trim().slice(0, chunkKQY2LP76_cjs.CALL_CHAT_MAX_CHARS);
661
661
  if (!text || !callKey || readOnly) return;
662
- const id = chunkVCYRQZ3R_cjs.newPacketId();
662
+ const id = chunkKQY2LP76_cjs.newPacketId();
663
663
  const at = Date.now();
664
664
  await localParticipant.publishData(
665
- await chunkVCYRQZ3R_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
666
- { reliable: true, topic: chunkVCYRQZ3R_cjs.CALL_CHAT_TOPIC }
665
+ await chunkKQY2LP76_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
666
+ { reliable: true, topic: chunkKQY2LP76_cjs.CALL_CHAT_TOPIC }
667
667
  );
668
668
  setLive((prev) => [
669
669
  ...prev,
@@ -682,7 +682,7 @@ function useInCallChat({
682
682
  (prev) => prev.map((l) => l.id === id && l.senderIdentity === myIdentity ? { ...l, status } : l)
683
683
  );
684
684
  try {
685
- setMeetingChat(await chunkVCYRQZ3R_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
685
+ setMeetingChat(await chunkKQY2LP76_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
686
686
  mark("saved");
687
687
  } catch (err) {
688
688
  console.warn("[calls] could not keep the message in the meeting chat", err);
@@ -694,7 +694,7 @@ function useInCallChat({
694
694
  const openMeeting = react.useCallback(async () => {
695
695
  if (!callKey) return;
696
696
  try {
697
- const ref = meetingChat ?? await chunkVCYRQZ3R_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
697
+ const ref = meetingChat ?? await chunkKQY2LP76_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
698
698
  setMeetingChat(ref);
699
699
  openMeetingChat?.(ref);
700
700
  } catch (err) {
@@ -702,7 +702,7 @@ function useInCallChat({
702
702
  }
703
703
  }, [callExtId, callKey, meetingChat]);
704
704
  const lines = react.useMemo(
705
- () => chunkVCYRQZ3R_cjs.mergeChatLines(history, live, {
705
+ () => chunkKQY2LP76_cjs.mergeChatLines(history, live, {
706
706
  myIdentity,
707
707
  nameOf: (identity) => identity === myIdentity ? localParticipant.name || "You" : room.remoteParticipants.get(identity)?.name || null
708
708
  }),
@@ -734,7 +734,7 @@ function useWebinar({
734
734
  linkVersion = null,
735
735
  callKey
736
736
  }) {
737
- const arbi = chunk5QOZLKAY_cjs.useArbi();
737
+ const arbi = chunkSJZRVX7T_cjs.useArbi();
738
738
  const webinarApi = react.useCallback(() => arbi.calls.webinar, [arbi]);
739
739
  const enabled = !!roleHint;
740
740
  const room = componentsReact.useRoomContext();
@@ -761,7 +761,7 @@ function useWebinar({
761
761
  const n = ++questionsRead.current;
762
762
  try {
763
763
  const rows = await webinarApi().questions.list(callExtId, linkVersion);
764
- const opened = await Promise.all(rows.map((q) => chunkVCYRQZ3R_cjs.openQuestion(q, callKey)));
764
+ const opened = await Promise.all(rows.map((q) => chunkKQY2LP76_cjs.openQuestion(q, callKey)));
765
765
  if (n === questionsRead.current) setQuestions(opened);
766
766
  } catch (err) {
767
767
  console.warn("[calls] could not load the questions", err);
@@ -773,7 +773,7 @@ function useWebinar({
773
773
  }, [refresh, refreshQuestions]);
774
774
  react.useEffect(() => {
775
775
  if (!enabled) return;
776
- return chunkVCYRQZ3R_cjs.onCallEvent("call.webinar", (m) => {
776
+ return chunkKQY2LP76_cjs.onCallEvent("call.webinar", (m) => {
777
777
  if (m.call_ext_id !== callExtId) return;
778
778
  setState((s) => s ? { ...s, live: m.live, chat: m.chat } : s);
779
779
  });
@@ -782,8 +782,8 @@ function useWebinar({
782
782
  react.useEffect(() => {
783
783
  if (!enabled) return;
784
784
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
785
- if (topic !== chunkVCYRQZ3R_cjs.CALL_WEBINAR_TOPIC) return;
786
- const packet = chunkVCYRQZ3R_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
785
+ if (topic !== chunkKQY2LP76_cjs.CALL_WEBINAR_TOPIC) return;
786
+ const packet = chunkKQY2LP76_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
787
787
  if (!packet) return;
788
788
  switch (packet.type) {
789
789
  case "state":
@@ -804,7 +804,7 @@ function useWebinar({
804
804
  return;
805
805
  case "demoted":
806
806
  setStageCheck(false);
807
- chunkVCYRQZ3R_cjs.markRejoining(callExtId);
807
+ chunkKQY2LP76_cjs.markRejoining(callExtId);
808
808
  if (fallback.current) clearTimeout(fallback.current);
809
809
  fallback.current = setTimeout(() => void room.disconnect(), DEMOTE_REJOIN_FALLBACK_MS);
810
810
  return;
@@ -831,12 +831,12 @@ function useWebinar({
831
831
  [callExtId, linkVersion]
832
832
  );
833
833
  const stepDown = react.useCallback(async () => {
834
- chunkVCYRQZ3R_cjs.markRejoining(callExtId);
834
+ chunkKQY2LP76_cjs.markRejoining(callExtId);
835
835
  setStageCheck(false);
836
836
  try {
837
837
  await webinarApi().demote(callExtId, myIdentity, linkVersion);
838
838
  } catch (err) {
839
- chunkVCYRQZ3R_cjs.markRejoining(callExtId, false);
839
+ chunkKQY2LP76_cjs.markRejoining(callExtId, false);
840
840
  failed("leave the stage")(err);
841
841
  }
842
842
  }, [callExtId, myIdentity, linkVersion]);
@@ -896,7 +896,7 @@ function useWebinar({
896
896
  if (!callKey) throw new Error("This call has no key.");
897
897
  await webinarApi().questions.ask(
898
898
  callExtId,
899
- await chunkVCYRQZ3R_cjs.sealQuestionText(text, callKey),
899
+ await chunkKQY2LP76_cjs.sealQuestionText(text, callKey),
900
900
  linkVersion
901
901
  );
902
902
  }, "ask the question"),
@@ -910,7 +910,7 @@ function useWebinar({
910
910
  await webinarApi().questions.update(
911
911
  callExtId,
912
912
  id,
913
- { answer: await chunkVCYRQZ3R_cjs.sealQuestionText(text, callKey) },
913
+ { answer: await chunkKQY2LP76_cjs.sealQuestionText(text, callKey) },
914
914
  linkVersion
915
915
  );
916
916
  }, "answer the question"),
@@ -940,15 +940,15 @@ function useWebinar({
940
940
  function useHostMuteNotice(callExtId) {
941
941
  const room = componentsReact.useRoomContext();
942
942
  react.useEffect(() => {
943
- const notifyMuted = chunkVCYRQZ3R_cjs.createMutedNotifier((text) => chunk5ECKSF6H_cjs.notify.info(text));
943
+ const notifyMuted = chunkKQY2LP76_cjs.createMutedNotifier((text) => chunk5ECKSF6H_cjs.notify.info(text));
944
944
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
945
- if (topic !== chunkVCYRQZ3R_cjs.CALL_MODERATION_TOPIC) return;
945
+ if (topic !== chunkKQY2LP76_cjs.CALL_MODERATION_TOPIC) return;
946
946
  if (participant || participantIdentity) return;
947
- const notice = chunkVCYRQZ3R_cjs.mutedNoticeFromPacket(payload);
947
+ const notice = chunkKQY2LP76_cjs.mutedNoticeFromPacket(payload);
948
948
  if (notice) notifyMuted(notice);
949
949
  };
950
950
  room.on(livekitClient.RoomEvent.DataReceived, onData);
951
- const offWs = chunkVCYRQZ3R_cjs.onCallEvent("call.muted", (message) => {
951
+ const offWs = chunkKQY2LP76_cjs.onCallEvent("call.muted", (message) => {
952
952
  if (message.callExtId === callExtId) notifyMuted(message);
953
953
  });
954
954
  return () => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk5QOZLKAY_cjs = require('./chunk-5QOZLKAY.cjs');
3
+ var chunkSJZRVX7T_cjs = require('./chunk-SJZRVX7T.cjs');
4
4
  var chunkDQODLWFX_cjs = require('./chunk-DQODLWFX.cjs');
5
5
  var react = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -49,7 +49,7 @@ function certificateLink(signature, certificateUrl) {
49
49
  }
50
50
  var DocumentToolsContext = react.createContext(null);
51
51
  function DocumentToolsProvider({ children, ...env }) {
52
- const arbiDeploymentDomain = chunk5QOZLKAY_cjs.useDeploymentDomain();
52
+ const arbiDeploymentDomain = chunkSJZRVX7T_cjs.useDeploymentDomain();
53
53
  const guards = react.useRef(/* @__PURE__ */ new Map());
54
54
  const pendingFlushes = react.useRef(/* @__PURE__ */ new Map());
55
55
  const registerBeforeFileShare = react.useCallback((id, flush) => {
@@ -275,7 +275,7 @@ function useDocumentSignatures(documentId, enabled = true) {
275
275
  const { client } = useDocumentTools();
276
276
  const { docId, version } = chunkDQODLWFX_cjs.parseVersionRef(documentId);
277
277
  return reactQuery.useQuery({
278
- queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.documentSignatures(docId ?? "", version),
278
+ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.documentSignatures(docId ?? "", version),
279
279
  queryFn: () => fetchDocumentSignatures(client, documentId),
280
280
  enabled: enabled && !!docId,
281
281
  staleTime: 6e4
@@ -349,7 +349,7 @@ function useSignDocument() {
349
349
  },
350
350
  onSuccess: async (result) => {
351
351
  await env.onDocumentsChanged?.([result.doc_ext_id], "signed");
352
- await queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.documentSignatures() });
352
+ await queryClient.invalidateQueries({ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.documentSignatures() });
353
353
  }
354
354
  });
355
355
  }
@@ -427,14 +427,14 @@ async function signFileShare(client$1, domain, vars) {
427
427
  }
428
428
  function useFileShare(client, shareId, signing) {
429
429
  return reactQuery.useQuery({
430
- queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.fileShare(shareId),
430
+ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.fileShare(shareId),
431
431
  queryFn: () => getFileShare(client, shareId),
432
432
  refetchInterval: signing ? false : 5e3
433
433
  });
434
434
  }
435
435
  function useFileSharePdf(client, shareId, share) {
436
436
  return reactQuery.useQuery({
437
- queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.fileSharePdf(shareId, share?.status),
437
+ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.fileSharePdf(shareId, share?.status),
438
438
  queryFn: () => fileShareBytes(client, shareId, share?.status === "completed" ? "signed" : "view"),
439
439
  enabled: !!share?.can_preview,
440
440
  staleTime: Infinity
@@ -442,7 +442,7 @@ function useFileSharePdf(client, shareId, share) {
442
442
  }
443
443
  function useFileShares(client) {
444
444
  return reactQuery.useQuery({
445
- queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.fileShares(),
445
+ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.fileShares(),
446
446
  queryFn: async () => {
447
447
  const result = await client?.GET("/v1/file-shares");
448
448
  if (!result?.data) throw new Error("Could not load shared files");
@@ -454,7 +454,7 @@ function useFileShares(client) {
454
454
  function useRefreshFileShares() {
455
455
  const queryClient = reactQuery.useQueryClient();
456
456
  return react.useCallback(
457
- () => queryClient.invalidateQueries({ queryKey: chunk5QOZLKAY_cjs.arbiQueryKeys.fileShares() }),
457
+ () => queryClient.invalidateQueries({ queryKey: chunkSJZRVX7T_cjs.arbiQueryKeys.fileShares() }),
458
458
  [queryClient]
459
459
  );
460
460
  }
@@ -503,5 +503,5 @@ exports.useFileShares = useFileShares;
503
503
  exports.useOptionalDocumentTools = useOptionalDocumentTools;
504
504
  exports.useRefreshFileShares = useRefreshFileShares;
505
505
  exports.useSignDocument = useSignDocument;
506
- //# sourceMappingURL=chunk-K6MO6YML.cjs.map
507
- //# sourceMappingURL=chunk-K6MO6YML.cjs.map
506
+ //# sourceMappingURL=chunk-4LFADBRL.cjs.map
507
+ //# sourceMappingURL=chunk-4LFADBRL.cjs.map