@azure/communication-react 1.3.2-alpha-202207190020.0 → 1.3.2-alpha-202207220024.0

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 (96) hide show
  1. package/dist/communication-react.d.ts +45 -0
  2. package/dist/dist-cjs/communication-react/index.js +460 -357
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
  6. package/dist/dist-esm/communication-react/src/index.d.ts.map +1 -1
  7. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.d.ts.map +1 -1
  9. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +7 -13
  10. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts.map +1 -1
  12. package/dist/dist-esm/react-components/src/components/DevicesButton.js +2 -12
  13. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +2 -12
  16. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +3 -13
  19. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/utils/common.d.ts +13 -0
  21. package/dist/dist-esm/react-components/src/components/utils/common.d.ts.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/utils/common.js +15 -0
  23. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/index.d.ts +2 -0
  25. package/dist/dist-esm/react-components/src/index.d.ts.map +1 -1
  26. package/dist/dist-esm/react-components/src/index.js +2 -0
  27. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  28. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +55 -0
  29. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts.map +1 -0
  30. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +61 -0
  31. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -0
  32. package/dist/dist-esm/react-components/src/permissions/index.d.ts +2 -0
  33. package/dist/dist-esm/react-components/src/permissions/index.d.ts.map +1 -0
  34. package/dist/dist-esm/react-components/src/permissions/index.js +4 -0
  35. package/dist/dist-esm/react-components/src/permissions/index.js.map +1 -0
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +5 -0
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts.map +1 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +30 -9
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +36 -0
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts.map +1 -1
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +3 -0
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts.map +1 -1
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +13 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts.map +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +30 -54
  48. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ModalLocalAndRemotePIP.d.ts +1 -7
  50. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts.map +1 -0
  51. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ModalLocalAndRemotePIP.js +1 -21
  52. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -0
  53. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/PeoplePaneContent.d.ts +4 -6
  54. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts.map +1 -0
  55. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/PeoplePaneContent.js +7 -15
  56. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -0
  57. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +12 -0
  58. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts.map +1 -0
  59. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/SidePaneHeader.js +1 -3
  60. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -0
  61. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/TabHeader.d.ts +3 -0
  62. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts.map +1 -0
  63. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/TabHeader.js +6 -7
  64. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -0
  65. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.d.ts +35 -0
  66. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.d.ts.map +1 -0
  67. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +58 -0
  68. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -0
  69. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/styles/MobilePane.styles.d.ts → common/styles/Pane.styles.d.ts} +18 -2
  70. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.d.ts.map +1 -0
  71. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/styles/MobilePane.styles.js → common/styles/Pane.styles.js} +29 -1
  72. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -0
  73. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/PeoplePaneContent.styles.d.ts +0 -0
  74. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.d.ts.map +1 -0
  75. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/PeoplePaneContent.styles.js +0 -0
  76. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.js.map +1 -0
  77. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +14 -0
  78. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts.map +1 -0
  79. package/dist/dist-esm/react-composites/src/composites/common/utils.js +32 -0
  80. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -0
  81. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +22 -13
  82. package/dist/tsdoc-metadata.json +1 -1
  83. package/package.json +8 -8
  84. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ModalLocalAndRemotePIP.d.ts.map +0 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ModalLocalAndRemotePIP.js.map +0 -1
  86. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeoplePaneContent.d.ts.map +0 -1
  87. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeoplePaneContent.js.map +0 -1
  88. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/SidePaneHeader.d.ts +0 -9
  89. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/SidePaneHeader.d.ts.map +0 -1
  90. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/SidePaneHeader.js.map +0 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/TabHeader.d.ts.map +0 -1
  92. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/TabHeader.js.map +0 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/MobilePane.styles.d.ts.map +0 -1
  94. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/MobilePane.styles.js.map +0 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/PeoplePaneContent.styles.d.ts.map +0 -1
  96. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/PeoplePaneContent.styles.js.map +0 -1
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
191
191
  // Copyright (c) Microsoft Corporation.
192
192
  // Licensed under the MIT license.
193
193
  // GENERATED FILE. DO NOT EDIT MANUALLY.
194
- var telemetryVersion = '1.3.2-alpha-202207190020.0';
194
+ var telemetryVersion = '1.3.2-alpha-202207220024.0';
195
195
 
196
196
  // Copyright (c) Microsoft Corporation.
197
197
  /**
@@ -364,7 +364,7 @@ const getCallState = (state, props) => { var _a; return (_a = state.calls[props.
364
364
 
365
365
  // Copyright (c) Microsoft Corporation.
366
366
  // Licensed under the MIT license.
367
- var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
367
+ var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
368
368
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
369
369
  return new (P || (P = Promise))(function (resolve, reject) {
370
370
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -402,7 +402,7 @@ const _isPreviewOn = (deviceManager) => {
402
402
  *
403
403
  * @private
404
404
  */
405
- const disposeAllLocalPreviewViews = (callClient) => __awaiter$s(void 0, void 0, void 0, function* () {
405
+ const disposeAllLocalPreviewViews = (callClient) => __awaiter$t(void 0, void 0, void 0, function* () {
406
406
  const unparentedViews = callClient.getState().deviceManager.unparentedViews;
407
407
  for (const view of unparentedViews) {
408
408
  yield callClient.disposeView(undefined, undefined, view);
@@ -509,7 +509,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
509
509
 
510
510
  // Copyright (c) Microsoft Corporation.
511
511
  // Licensed under the MIT license.
512
- var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
512
+ var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
513
513
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
514
514
  return new (P || (P = Promise))(function (resolve, reject) {
515
515
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -533,7 +533,7 @@ const areStreamsEqual = (prevStream, newStream) => {
533
533
  * @public
534
534
  */
535
535
  const createDefaultCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
536
- const onStartLocalVideo = () => __awaiter$r(void 0, void 0, void 0, function* () {
536
+ const onStartLocalVideo = () => __awaiter$s(void 0, void 0, void 0, function* () {
537
537
  // Before the call object creates a stream, dispose of any local preview streams.
538
538
  // @TODO: is there any way to parent the unparented view to the call object instead
539
539
  // of disposing and creating a new stream?
@@ -553,7 +553,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
553
553
  yield call.startVideo(stream);
554
554
  }
555
555
  });
556
- const onStopLocalVideo = (stream) => __awaiter$r(void 0, void 0, void 0, function* () {
556
+ const onStopLocalVideo = (stream) => __awaiter$s(void 0, void 0, void 0, function* () {
557
557
  const callId = call === null || call === void 0 ? void 0 : call.id;
558
558
  if (!callId) {
559
559
  return;
@@ -566,7 +566,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
566
566
  });
567
567
  }
568
568
  });
569
- const onToggleCamera = (options) => __awaiter$r(void 0, void 0, void 0, function* () {
569
+ const onToggleCamera = (options) => __awaiter$s(void 0, void 0, void 0, function* () {
570
570
  if (call && _isInCall(call.state)) {
571
571
  const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
572
572
  if (stream) {
@@ -596,19 +596,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
596
596
  const onStartCall = (participants, options) => {
597
597
  return callAgent ? callAgent.startCall(participants, options) : undefined;
598
598
  };
599
- const onSelectMicrophone = (device) => __awaiter$r(void 0, void 0, void 0, function* () {
599
+ const onSelectMicrophone = (device) => __awaiter$s(void 0, void 0, void 0, function* () {
600
600
  if (!deviceManager) {
601
601
  return;
602
602
  }
603
603
  return deviceManager.selectMicrophone(device);
604
604
  });
605
- const onSelectSpeaker = (device) => __awaiter$r(void 0, void 0, void 0, function* () {
605
+ const onSelectSpeaker = (device) => __awaiter$s(void 0, void 0, void 0, function* () {
606
606
  if (!deviceManager) {
607
607
  return;
608
608
  }
609
609
  return deviceManager.selectSpeaker(device);
610
610
  });
611
- const onSelectCamera = (device, options) => __awaiter$r(void 0, void 0, void 0, function* () {
611
+ const onSelectCamera = (device, options) => __awaiter$s(void 0, void 0, void 0, function* () {
612
612
  if (!deviceManager) {
613
613
  return;
614
614
  }
@@ -631,19 +631,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
631
631
  }, options);
632
632
  }
633
633
  });
634
- const onToggleMicrophone = () => __awaiter$r(void 0, void 0, void 0, function* () {
634
+ const onToggleMicrophone = () => __awaiter$s(void 0, void 0, void 0, function* () {
635
635
  if (!call || !_isInCall(call.state)) {
636
636
  throw new Error(`Please invoke onToggleMicrophone after call is started`);
637
637
  }
638
638
  return call.isMuted ? yield call.unmute() : yield call.mute();
639
639
  });
640
- const onStartScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
641
- const onStopScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
642
- const onToggleScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
643
- const onHangUp = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
640
+ const onStartScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
641
+ const onStopScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
642
+ const onToggleScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
643
+ const onHangUp = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
644
644
  /* @conditional-compile-remove(PSTN-calls) */
645
- const onToggleHold = () => __awaiter$r(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
646
- const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$r(void 0, void 0, void 0, function* () {
645
+ const onToggleHold = () => __awaiter$s(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
646
+ const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$s(void 0, void 0, void 0, function* () {
647
647
  var _a;
648
648
  if (!call || call.localVideoStreams.length === 0) {
649
649
  return;
@@ -659,7 +659,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
659
659
  const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
660
660
  return view ? { view } : undefined;
661
661
  });
662
- const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$r(void 0, void 0, void 0, function* () {
662
+ const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$s(void 0, void 0, void 0, function* () {
663
663
  if (!call) {
664
664
  return;
665
665
  }
@@ -687,7 +687,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
687
687
  }
688
688
  return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
689
689
  });
690
- const onDisposeRemoteStreamView = (userId) => __awaiter$r(void 0, void 0, void 0, function* () {
690
+ const onDisposeRemoteStreamView = (userId) => __awaiter$s(void 0, void 0, void 0, function* () {
691
691
  if (!call) {
692
692
  return;
693
693
  }
@@ -708,7 +708,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
708
708
  callClient.disposeView(call.id, participant.identifier, screenShareStream);
709
709
  }
710
710
  });
711
- const onDisposeLocalStreamView = () => __awaiter$r(void 0, void 0, void 0, function* () {
711
+ const onDisposeLocalStreamView = () => __awaiter$s(void 0, void 0, void 0, function* () {
712
712
  // If the user is currently in a call, dispose of the local stream view attached to that call.
713
713
  const callState = call && callClient.getState().calls[call.id];
714
714
  const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
@@ -720,11 +720,11 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
720
720
  // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
721
721
  yield disposeAllLocalPreviewViews(callClient);
722
722
  });
723
- const onRemoveParticipant = (userId) => __awaiter$r(void 0, void 0, void 0, function* () {
723
+ const onRemoveParticipant = (userId) => __awaiter$s(void 0, void 0, void 0, function* () {
724
724
  yield (call === null || call === void 0 ? void 0 : call.removeParticipant(fromFlatCommunicationIdentifier(userId)));
725
725
  });
726
726
  /* @conditional-compile-remove(PSTN-calls) */
727
- const onAddParticipant = (participant, options) => __awaiter$r(void 0, void 0, void 0, function* () {
727
+ const onAddParticipant = (participant, options) => __awaiter$s(void 0, void 0, void 0, function* () {
728
728
  if (communicationCommon.isPhoneNumberIdentifier(participant)) {
729
729
  yield (call === null || call === void 0 ? void 0 : call.addParticipant(participant, options));
730
730
  }
@@ -733,7 +733,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
733
733
  }
734
734
  });
735
735
  /* @conditional-compile-remove(dialpad) */
736
- const onSendDtmfTone = (dtmfTone) => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
736
+ const onSendDtmfTone = (dtmfTone) => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
737
737
  return {
738
738
  onHangUp,
739
739
  /* @conditional-compile-remove(PSTN-calls) */
@@ -3280,21 +3280,15 @@ const ChatMessageActionFlyout = (props) => {
3280
3280
  messageReadByList
3281
3281
  ]);
3282
3282
  // gap space uses pixels
3283
- return (React__default['default'].createElement(react.ContextualMenu, { id: "chat-composite-message-contextual-menu", alignTargetEdge: true, gapSpace: 5 /*px*/, isBeakVisible: false, items: menuItems, hidden: props.hidden, target: props.target, onDismiss: props.onDismiss, directionalHint: react.DirectionalHint.topRightEdge, className: chatMessageMenuStyle }));
3283
+ return (React__default['default'].createElement(react.ContextualMenu, { id: "chat-composite-message-contextual-menu", alignTargetEdge: true, gapSpace: 5 /*px*/, isBeakVisible: false, items: menuItems, hidden: props.hidden, target: props.target, onDismiss: props.onDismiss, directionalHint: react.DirectionalHint.topRightEdge, className: chatMessageMenuStyle, calloutProps: preventUnwantedDismissProps }));
3284
3284
  };
3285
+ /**
3286
+ * Similar to {@link preventDismissOnEvent}, but not prevent dismissing from scrolling, since it is causing bugs in chat thread.
3287
+ */
3285
3288
  const preventUnwantedDismissProps = {
3286
- // Disable dismiss on resize to work around a couple Fluent UI bugs
3287
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
3288
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
3289
- // by the headless SDK.
3290
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
3291
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
3292
- // deterministically avoid dismissal.
3293
- //
3294
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
3295
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
3296
- // The Callout (frequently) gets dismissed automatically.
3297
- preventDismissOnResize: true
3289
+ preventDismissOnEvent: (ev) => {
3290
+ return ev.type === 'resize';
3291
+ }
3298
3292
  };
3299
3293
 
3300
3294
  // Copyright (c) Microsoft Corporation.
@@ -3378,7 +3372,7 @@ const chatMessageActionMenuProps = (menuProps) => {
3378
3372
  return actionMenuProps;
3379
3373
  };
3380
3374
 
3381
- var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3375
+ var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3382
3376
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3383
3377
  return new (P || (P = Promise))(function (resolve, reject) {
3384
3378
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3409,7 +3403,7 @@ const _FileDownloadCards = (props) => {
3409
3403
  /* @conditional-compile-remove(file-sharing) */
3410
3404
  localeStrings.downloadFile
3411
3405
  ]);
3412
- const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$q(void 0, void 0, void 0, function* () {
3406
+ const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$r(void 0, void 0, void 0, function* () {
3413
3407
  if (!props.downloadHandler) {
3414
3408
  window.open(file.url, '_blank', 'noopener,noreferrer');
3415
3409
  }
@@ -3547,7 +3541,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
3547
3541
 
3548
3542
  // Copyright (c) Microsoft Corporation.
3549
3543
  // Licensed under the MIT license.
3550
- var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3544
+ var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3551
3545
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3552
3546
  return new (P || (P = Promise))(function (resolve, reject) {
3553
3547
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3581,7 +3575,7 @@ const ChatMessageComponent = (props) => {
3581
3575
  return React__default['default'].createElement(React__default['default'].Fragment, null);
3582
3576
  }
3583
3577
  else if (isEditing) {
3584
- return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$p(void 0, void 0, void 0, function* () {
3578
+ return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
3585
3579
  props.onUpdateMessage &&
3586
3580
  props.message.messageId &&
3587
3581
  (yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
@@ -3607,6 +3601,21 @@ const ChatMessageComponent = (props) => {
3607
3601
  const convertRemToPx = (rem) => {
3608
3602
  return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
3609
3603
  };
3604
+ /**
3605
+ * Converts units of rem to units of pixels
3606
+ * @private
3607
+ * Disable dismiss on resize to work around a couple Fluent UI bugs
3608
+ * - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
3609
+ * happens when we change the VideoGallery layout, or even when the video stream element is internally resized
3610
+ * by the headless SDK.
3611
+ * - We also want to prevent dismiss when chat pane is scrolling especially a new message is added.
3612
+ * A side effect of this workaround is that the context menu stays open when window is resized, and may
3613
+ * get detached from original target visually. That bug is preferable to the bug when this value is not set -
3614
+ * The Callout (frequently) gets dismissed automatically.
3615
+ */
3616
+ const preventDismissOnEvent = (ev) => {
3617
+ return ev.type === 'resize' || ev.type === 'scroll';
3618
+ };
3610
3619
 
3611
3620
  // Copyright (c) Microsoft Corporation.
3612
3621
  /**
@@ -3691,7 +3700,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
3691
3700
 
3692
3701
  // Copyright (c) Microsoft Corporation.
3693
3702
  // Licensed under the MIT license.
3694
- var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3703
+ var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
3695
3704
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3696
3705
  return new (P || (P = Promise))(function (resolve, reject) {
3697
3706
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -3918,7 +3927,7 @@ const MessageThread = (props) => {
3918
3927
  setChatMessagesInitialized(chatMessagesInitialized);
3919
3928
  };
3920
3929
  // we try to only send those message status if user is scrolled to the bottom.
3921
- const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
3930
+ const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
3922
3931
  if (!isAtBottomOfScrollRef.current ||
3923
3932
  !document.hasFocus() ||
3924
3933
  !messagesRef.current ||
@@ -3969,7 +3978,7 @@ const MessageThread = (props) => {
3969
3978
  setIsAtBottomOfScrollRef(atBottom);
3970
3979
  }, [scrollToBottom, sendMessageStatusIfAtBottom]);
3971
3980
  // Infinite scrolling + threadInitialize function
3972
- const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
3981
+ const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
3973
3982
  if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
3974
3983
  if (onLoadPreviousChatMessages) {
3975
3984
  isLoadingChatMessagesRef.current = true;
@@ -4415,18 +4424,7 @@ const ParticipantItem = (props) => {
4415
4424
  menuItems && menuItems.length > 0 && (React__default['default'].createElement(React__default['default'].Fragment, null,
4416
4425
  menuButton,
4417
4426
  React__default['default'].createElement(react.ContextualMenu, { items: menuItems, hidden: menuHidden, target: containerRef, onItemClick: onDismissMenu, onDismiss: onDismissMenu, directionalHint: react.DirectionalHint.bottomRightEdge, className: contextualMenuStyle, calloutProps: {
4418
- // Disable dismiss on resize to work around a couple Fluent UI bugs
4419
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
4420
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
4421
- // by the headless SDK.
4422
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
4423
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
4424
- // deterministically avoid dismissal.
4425
- //
4426
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
4427
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
4428
- // The Callout (frequently) gets dismissed automatically.
4429
- preventDismissOnResize: true
4427
+ preventDismissOnEvent
4430
4428
  } })))));
4431
4429
  };
4432
4430
 
@@ -6466,18 +6464,7 @@ const generateDefaultDeviceMenuProps = (props, strings) => {
6466
6464
  maxWidth: '95%'
6467
6465
  }
6468
6466
  },
6469
- // Disable dismiss on resize to work around a couple Fluent UI bugs
6470
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
6471
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
6472
- // by the headless SDK.
6473
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
6474
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
6475
- // deterministically avoid dismissal.
6476
- //
6477
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
6478
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
6479
- // The Callout (frequently) gets dismissed automatically.
6480
- preventDismissOnResize: true
6467
+ preventDismissOnEvent
6481
6468
  }
6482
6469
  };
6483
6470
  const menuItemStyles = react.merge(buttonFlyoutItemStyles, (_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.menuItemStyles) !== null && _b !== void 0 ? _b : {});
@@ -6590,7 +6577,7 @@ const DevicesButton = (props) => {
6590
6577
 
6591
6578
  // Copyright (c) Microsoft Corporation.
6592
6579
  // Licensed under the MIT license.
6593
- var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6580
+ var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6594
6581
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6595
6582
  return new (P || (P = Promise))(function (resolve, reject) {
6596
6583
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6627,7 +6614,7 @@ const CameraButton = (props) => {
6627
6614
  const toggleAnnouncerString = React.useCallback((isCameraOn) => {
6628
6615
  setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
6629
6616
  }, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
6630
- const onToggleClick = React.useCallback(() => __awaiter$n(void 0, void 0, void 0, function* () {
6617
+ const onToggleClick = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
6631
6618
  // Throttle click on camera, need to await onToggleCamera then allow another click
6632
6619
  if (onToggleCamera) {
6633
6620
  setWaitForCamera(true);
@@ -6759,7 +6746,7 @@ const lightThemeCallButtonStyles = {
6759
6746
 
6760
6747
  // Copyright (c) Microsoft Corporation.
6761
6748
  // Licensed under the MIT license.
6762
- var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6749
+ var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
6763
6750
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6764
6751
  return new (P || (P = Promise))(function (resolve, reject) {
6765
6752
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -6800,7 +6787,7 @@ const MicrophoneButton = (props) => {
6800
6787
  const toggleAnnouncerString = React.useCallback((isMicOn) => {
6801
6788
  setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
6802
6789
  }, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
6803
- const onToggleClick = React.useCallback(() => __awaiter$m(void 0, void 0, void 0, function* () {
6790
+ const onToggleClick = React.useCallback(() => __awaiter$n(void 0, void 0, void 0, function* () {
6804
6791
  if (onToggleMicrophone) {
6805
6792
  try {
6806
6793
  yield onToggleMicrophone();
@@ -6901,18 +6888,7 @@ const ParticipantsButton = (props) => {
6901
6888
  styles: react.merge(participantsButtonMenuPropsStyle, styles === null || styles === void 0 ? void 0 : styles.menuStyles),
6902
6889
  items: [],
6903
6890
  calloutProps: {
6904
- // Disable dismiss on resize to work around a couple Fluent UI bugs
6905
- // - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
6906
- // happens when we change the VideoGallery layout, or even when the video stream element is internally resized
6907
- // by the headless SDK.
6908
- // - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
6909
- // of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
6910
- // deterministically avoid dismissal.
6911
- //
6912
- // A side effect of this workaround is that the context menu stays open when window is resized, and may
6913
- // get detached from original target visually. That bug is preferable to the bug when this value is not set -
6914
- // The Callout (frequently) gets dismissed automatically.
6915
- preventDismissOnResize: true
6891
+ preventDismissOnEvent
6916
6892
  }
6917
6893
  };
6918
6894
  if (participantCount > 0) {
@@ -6941,7 +6917,7 @@ const ParticipantsButton = (props) => {
6941
6917
  },
6942
6918
  // Disable dismiss on resize to work around a couple Fluent UI bugs
6943
6919
  // See reasoning in the props for the parent menu.
6944
- preventDismissOnResize: true
6920
+ preventDismissOnEvent
6945
6921
  }
6946
6922
  },
6947
6923
  'data-ui-id': ids.participantButtonPeopleMenuItem
@@ -7776,6 +7752,60 @@ const HoldButton = (props) => {
7776
7752
  return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { strings: strings, onClick: onToggleHold !== null && onToggleHold !== void 0 ? onToggleHold : props.onClick, onRenderOnIcon: onRenderResumeIcon, onRenderOffIcon: onRenderHoldIcon })));
7777
7753
  };
7778
7754
 
7755
+ // Copyright (c) Microsoft Corporation.
7756
+ /**
7757
+ * @internal
7758
+ */
7759
+ const presenterPermissions = {
7760
+ cameraButton: true,
7761
+ microphoneButton: true,
7762
+ screenShare: true,
7763
+ participantList: true
7764
+ };
7765
+ /**
7766
+ * @internal
7767
+ */
7768
+ const consumerPermissions = {
7769
+ cameraButton: false,
7770
+ microphoneButton: false,
7771
+ screenShare: false,
7772
+ participantList: false
7773
+ };
7774
+ /**
7775
+ * @internal
7776
+ */
7777
+ const attendeePermissions = {
7778
+ cameraButton: true,
7779
+ microphoneButton: true,
7780
+ screenShare: false,
7781
+ participantList: true
7782
+ };
7783
+ /**
7784
+ * @internal
7785
+ */
7786
+ const PermissionsContext = React.createContext(presenterPermissions);
7787
+ /**
7788
+ * @internal
7789
+ */
7790
+ const _PermissionsProvider = (props) => {
7791
+ const { permissions, children } = props;
7792
+ return React__default['default'].createElement(PermissionsContext.Provider, { value: permissions }, children);
7793
+ };
7794
+ /**
7795
+ * @internal
7796
+ */
7797
+ const _getPermissions = (role) => {
7798
+ if (role === 'Consumer') {
7799
+ return consumerPermissions;
7800
+ }
7801
+ else if (role === 'Attendee') {
7802
+ return attendeePermissions;
7803
+ }
7804
+ else {
7805
+ return presenterPermissions;
7806
+ }
7807
+ };
7808
+
7779
7809
  // Copyright (c) Microsoft Corporation.
7780
7810
  // Licensed under the MIT license.
7781
7811
  /**
@@ -8215,7 +8245,7 @@ const findConditionalCompiledSelector = (component) => {
8215
8245
 
8216
8246
  // Copyright (c) Microsoft Corporation.
8217
8247
  // Licensed under the MIT license.
8218
- var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8248
+ var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8219
8249
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8220
8250
  return new (P || (P = Promise))(function (resolve, reject) {
8221
8251
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -8238,35 +8268,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
8238
8268
  let messageIterator = undefined;
8239
8269
  let readReceiptIterator = undefined;
8240
8270
  return {
8241
- onSendMessage: (content, options) => __awaiter$l(void 0, void 0, void 0, function* () {
8271
+ onSendMessage: (content, options) => __awaiter$m(void 0, void 0, void 0, function* () {
8242
8272
  const sendMessageRequest = {
8243
8273
  content,
8244
8274
  senderDisplayName: chatClient.getState().displayName
8245
8275
  };
8246
8276
  yield chatThreadClient.sendMessage(sendMessageRequest, options);
8247
8277
  }),
8248
- onUpdateMessage: (messageId, content, metadata, options) => __awaiter$l(void 0, void 0, void 0, function* () {
8278
+ onUpdateMessage: (messageId, content, metadata, options) => __awaiter$m(void 0, void 0, void 0, function* () {
8249
8279
  const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
8250
8280
  updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
8251
8281
  yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
8252
8282
  }),
8253
- onDeleteMessage: (messageId) => __awaiter$l(void 0, void 0, void 0, function* () {
8283
+ onDeleteMessage: (messageId) => __awaiter$m(void 0, void 0, void 0, function* () {
8254
8284
  yield chatThreadClient.deleteMessage(messageId);
8255
8285
  }),
8256
8286
  // This handler is designed for chatThread to consume
8257
- onMessageSeen: (chatMessageId) => __awaiter$l(void 0, void 0, void 0, function* () {
8287
+ onMessageSeen: (chatMessageId) => __awaiter$m(void 0, void 0, void 0, function* () {
8258
8288
  yield chatThreadClient.sendReadReceipt({ chatMessageId });
8259
8289
  }),
8260
- onTyping: () => __awaiter$l(void 0, void 0, void 0, function* () {
8290
+ onTyping: () => __awaiter$m(void 0, void 0, void 0, function* () {
8261
8291
  yield chatThreadClient.sendTypingNotification();
8262
8292
  }),
8263
- onRemoveParticipant: (userId) => __awaiter$l(void 0, void 0, void 0, function* () {
8293
+ onRemoveParticipant: (userId) => __awaiter$m(void 0, void 0, void 0, function* () {
8264
8294
  yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
8265
8295
  }),
8266
- updateThreadTopicName: (topicName) => __awaiter$l(void 0, void 0, void 0, function* () {
8296
+ updateThreadTopicName: (topicName) => __awaiter$m(void 0, void 0, void 0, function* () {
8267
8297
  yield chatThreadClient.updateTopic(topicName);
8268
8298
  }),
8269
- onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$l(void 0, void 0, void 0, function* () {
8299
+ onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$m(void 0, void 0, void 0, function* () {
8270
8300
  var _a, _b, _c;
8271
8301
  if (messageIterator === undefined) {
8272
8302
  // Lazy definition so that errors in the method call are reported correctly.
@@ -8957,7 +8987,7 @@ const findSelector = (component) => {
8957
8987
 
8958
8988
  // Copyright (c) Microsoft Corporation.
8959
8989
  // Licensed under the MIT license.
8960
- var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8990
+ var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
8961
8991
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8962
8992
  return new (P || (P = Promise))(function (resolve, reject) {
8963
8993
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9006,10 +9036,10 @@ class ProxyDeviceManager {
9006
9036
  this.selectCamera = (videoDeviceInfo) => {
9007
9037
  this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
9008
9038
  };
9009
- this.videoDevicesUpdated = () => __awaiter$k(this, void 0, void 0, function* () {
9039
+ this.videoDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
9010
9040
  this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
9011
9041
  });
9012
- this.audioDevicesUpdated = () => __awaiter$k(this, void 0, void 0, function* () {
9042
+ this.audioDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
9013
9043
  this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
9014
9044
  this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
9015
9045
  });
@@ -9206,7 +9236,7 @@ class CallIdHistory {
9206
9236
 
9207
9237
  // Copyright (c) Microsoft Corporation.
9208
9238
  // Licensed under the MIT license.
9209
- var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9239
+ var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9210
9240
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9211
9241
  return new (P || (P = Promise))(function (resolve, reject) {
9212
9242
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9691,7 +9721,7 @@ class CallContext$1 {
9691
9721
  * @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
9692
9722
  */
9693
9723
  withAsyncErrorTeedToState(action, target) {
9694
- return (...args) => __awaiter$j(this, void 0, void 0, function* () {
9724
+ return (...args) => __awaiter$k(this, void 0, void 0, function* () {
9695
9725
  try {
9696
9726
  return yield action(...args);
9697
9727
  }
@@ -9755,7 +9785,7 @@ const findOldestCallEnded = (calls) => {
9755
9785
 
9756
9786
  // Copyright (c) Microsoft Corporation.
9757
9787
  // Licensed under the MIT license.
9758
- var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9788
+ var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
9759
9789
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9760
9790
  return new (P || (P = Promise))(function (resolve, reject) {
9761
9791
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -9775,63 +9805,63 @@ class ProxyCall {
9775
9805
  switch (prop) {
9776
9806
  case 'mute': {
9777
9807
  return this._context.withAsyncErrorTeedToState(function (...args) {
9778
- return __awaiter$i(this, void 0, void 0, function* () {
9808
+ return __awaiter$j(this, void 0, void 0, function* () {
9779
9809
  return yield target.mute(...args);
9780
9810
  });
9781
9811
  }, 'Call.mute');
9782
9812
  }
9783
9813
  case 'unmute': {
9784
9814
  return this._context.withAsyncErrorTeedToState(function (...args) {
9785
- return __awaiter$i(this, void 0, void 0, function* () {
9815
+ return __awaiter$j(this, void 0, void 0, function* () {
9786
9816
  return yield target.unmute(...args);
9787
9817
  });
9788
9818
  }, 'Call.unmute');
9789
9819
  }
9790
9820
  case 'startVideo': {
9791
9821
  return this._context.withAsyncErrorTeedToState(function (...args) {
9792
- return __awaiter$i(this, void 0, void 0, function* () {
9822
+ return __awaiter$j(this, void 0, void 0, function* () {
9793
9823
  return yield target.startVideo(...args);
9794
9824
  });
9795
9825
  }, 'Call.startVideo');
9796
9826
  }
9797
9827
  case 'stopVideo': {
9798
9828
  return this._context.withAsyncErrorTeedToState(function (...args) {
9799
- return __awaiter$i(this, void 0, void 0, function* () {
9829
+ return __awaiter$j(this, void 0, void 0, function* () {
9800
9830
  return yield target.stopVideo(...args);
9801
9831
  });
9802
9832
  }, 'Call.stopVideo');
9803
9833
  }
9804
9834
  case 'startScreenSharing': {
9805
9835
  return this._context.withAsyncErrorTeedToState(function (...args) {
9806
- return __awaiter$i(this, void 0, void 0, function* () {
9836
+ return __awaiter$j(this, void 0, void 0, function* () {
9807
9837
  return yield target.startScreenSharing(...args);
9808
9838
  });
9809
9839
  }, 'Call.startScreenSharing');
9810
9840
  }
9811
9841
  case 'stopScreenSharing': {
9812
9842
  return this._context.withAsyncErrorTeedToState(function (...args) {
9813
- return __awaiter$i(this, void 0, void 0, function* () {
9843
+ return __awaiter$j(this, void 0, void 0, function* () {
9814
9844
  return yield target.stopScreenSharing(...args);
9815
9845
  });
9816
9846
  }, 'Call.stopScreenSharing');
9817
9847
  }
9818
9848
  case 'hold': {
9819
9849
  return this._context.withAsyncErrorTeedToState(function (...args) {
9820
- return __awaiter$i(this, void 0, void 0, function* () {
9850
+ return __awaiter$j(this, void 0, void 0, function* () {
9821
9851
  return yield target.hold(...args);
9822
9852
  });
9823
9853
  }, 'Call.hold');
9824
9854
  }
9825
9855
  case 'resume': {
9826
9856
  return this._context.withAsyncErrorTeedToState(function (...args) {
9827
- return __awaiter$i(this, void 0, void 0, function* () {
9857
+ return __awaiter$j(this, void 0, void 0, function* () {
9828
9858
  return yield target.resume(...args);
9829
9859
  });
9830
9860
  }, 'Call.resume');
9831
9861
  }
9832
9862
  case 'addParticipant': {
9833
9863
  return this._context.withAsyncErrorTeedToState(function (...args) {
9834
- return __awaiter$i(this, void 0, void 0, function* () {
9864
+ return __awaiter$j(this, void 0, void 0, function* () {
9835
9865
  return yield target.addParticipant(...args);
9836
9866
  });
9837
9867
  }, 'Call.addParticipant');
@@ -10039,7 +10069,7 @@ class RemoteVideoStreamSubscriber {
10039
10069
 
10040
10070
  // Copyright (c) Microsoft Corporation.
10041
10071
  // Licensed under the MIT license.
10042
- var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10072
+ var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10043
10073
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10044
10074
  return new (P || (P = Promise))(function (resolve, reject) {
10045
10075
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10049,7 +10079,7 @@ var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments,
10049
10079
  });
10050
10080
  };
10051
10081
  function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
10052
- return __awaiter$h(this, void 0, void 0, function* () {
10082
+ return __awaiter$i(this, void 0, void 0, function* () {
10053
10083
  // Render RemoteVideoStream that is part of a Call
10054
10084
  const streamId = stream.id;
10055
10085
  let participantKey;
@@ -10157,7 +10187,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
10157
10187
  });
10158
10188
  }
10159
10189
  function createViewLocalVideo(context, internalContext, callId, options) {
10160
- return __awaiter$h(this, void 0, void 0, function* () {
10190
+ return __awaiter$i(this, void 0, void 0, function* () {
10161
10191
  _logEvent(callingStatefulLogger, {
10162
10192
  name: EventNames.START_LOCAL_STREAM_RENDERING,
10163
10193
  level: 'info',
@@ -10273,7 +10303,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
10273
10303
  });
10274
10304
  }
10275
10305
  function createViewUnparentedVideo(context, internalContext, stream, options) {
10276
- return __awaiter$h(this, void 0, void 0, function* () {
10306
+ return __awaiter$i(this, void 0, void 0, function* () {
10277
10307
  const renderInfo = internalContext.getUnparentedRenderInfo(stream);
10278
10308
  if (renderInfo && renderInfo.status === 'Rendered') {
10279
10309
  console.warn('Unparented LocalVideoStream is already rendered');
@@ -10833,7 +10863,7 @@ class CallSubscriber {
10833
10863
 
10834
10864
  // Copyright (c) Microsoft Corporation.
10835
10865
  // Licensed under the MIT license.
10836
- var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10866
+ var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
10837
10867
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10838
10868
  return new (P || (P = Promise))(function (resolve, reject) {
10839
10869
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -10853,14 +10883,14 @@ class ProxyIncomingCall {
10853
10883
  switch (prop) {
10854
10884
  case 'accept': {
10855
10885
  return this._context.withAsyncErrorTeedToState(function (...args) {
10856
- return __awaiter$g(this, void 0, void 0, function* () {
10886
+ return __awaiter$h(this, void 0, void 0, function* () {
10857
10887
  return yield target.accept(...args);
10858
10888
  });
10859
10889
  }, 'IncomingCall.accept');
10860
10890
  }
10861
10891
  case 'reject': {
10862
10892
  return this._context.withAsyncErrorTeedToState(function (...args) {
10863
- return __awaiter$g(this, void 0, void 0, function* () {
10893
+ return __awaiter$h(this, void 0, void 0, function* () {
10864
10894
  return yield target.reject(...args);
10865
10895
  });
10866
10896
  }, 'IncomingCall.reject');
@@ -11198,7 +11228,7 @@ class InternalCallContext {
11198
11228
 
11199
11229
  // Copyright (c) Microsoft Corporation.
11200
11230
  // Licensed under the MIT license.
11201
- var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11231
+ var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11202
11232
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11203
11233
  return new (P || (P = Promise))(function (resolve, reject) {
11204
11234
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11220,7 +11250,7 @@ class ProxyCallClient {
11220
11250
  get(target, prop) {
11221
11251
  switch (prop) {
11222
11252
  case 'createCallAgent': {
11223
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$f(this, void 0, void 0, function* () {
11253
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
11224
11254
  // createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
11225
11255
  // callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
11226
11256
  // callAgent if the createCallAgent succeeds.
@@ -11233,7 +11263,7 @@ class ProxyCallClient {
11233
11263
  }), 'CallClient.createCallAgent');
11234
11264
  }
11235
11265
  case 'getDeviceManager': {
11236
- return this._context.withAsyncErrorTeedToState(() => __awaiter$f(this, void 0, void 0, function* () {
11266
+ return this._context.withAsyncErrorTeedToState(() => __awaiter$g(this, void 0, void 0, function* () {
11237
11267
  // As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
11238
11268
  // DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
11239
11269
  // throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
@@ -11356,7 +11386,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
11356
11386
 
11357
11387
  // Copyright (c) Microsoft Corporation.
11358
11388
  // Licensed under the MIT license.
11359
- var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11389
+ var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11360
11390
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11361
11391
  return new (P || (P = Promise))(function (resolve, reject) {
11362
11392
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11631,7 +11661,7 @@ class ChatContext$1 {
11631
11661
  * @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
11632
11662
  */
11633
11663
  withAsyncErrorTeedToState(f, target) {
11634
- return (...args) => __awaiter$e(this, void 0, void 0, function* () {
11664
+ return (...args) => __awaiter$f(this, void 0, void 0, function* () {
11635
11665
  try {
11636
11666
  return yield f(...args);
11637
11667
  }
@@ -11738,7 +11768,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
11738
11768
 
11739
11769
  // Copyright (c) Microsoft Corporation.
11740
11770
  // Licensed under the MIT license.
11741
- var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11771
+ var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11742
11772
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11743
11773
  return new (P || (P = Promise))(function (resolve, reject) {
11744
11774
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11822,7 +11852,7 @@ class EventSubscriber {
11822
11852
  this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
11823
11853
  };
11824
11854
  // This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
11825
- this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$d(this, void 0, void 0, function* () {
11855
+ this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$e(this, void 0, void 0, function* () {
11826
11856
  var e_1, _a;
11827
11857
  try {
11828
11858
  for (var _b = __asyncValues$1(this.chatClient
@@ -11908,7 +11938,7 @@ class EventSubscriber {
11908
11938
 
11909
11939
  // Copyright (c) Microsoft Corporation.
11910
11940
  // Licensed under the MIT license.
11911
- var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11941
+ var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
11912
11942
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11913
11943
  return new (P || (P = Promise))(function (resolve, reject) {
11914
11944
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -11930,7 +11960,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
11930
11960
  const threadsIterator = iteratorCreator(...args);
11931
11961
  return {
11932
11962
  next() {
11933
- return __awaiter$c(this, void 0, void 0, function* () {
11963
+ return __awaiter$d(this, void 0, void 0, function* () {
11934
11964
  const result = yield threadsIterator.next();
11935
11965
  if (!result.done && result.value) {
11936
11966
  decorateFn(result.value, context);
@@ -11945,7 +11975,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
11945
11975
  const pages = threadsIterator.byPage(settings);
11946
11976
  return {
11947
11977
  next() {
11948
- return __awaiter$c(this, void 0, void 0, function* () {
11978
+ return __awaiter$d(this, void 0, void 0, function* () {
11949
11979
  const result = yield pages.next();
11950
11980
  const page = result.value;
11951
11981
  if (!result.done && result.value) {
@@ -12029,7 +12059,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
12029
12059
 
12030
12060
  // Copyright (c) Microsoft Corporation.
12031
12061
  // Licensed under the MIT license.
12032
- var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12062
+ var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12033
12063
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12034
12064
  return new (P || (P = Promise))(function (resolve, reject) {
12035
12065
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12048,14 +12078,14 @@ class ProxyChatThreadClient {
12048
12078
  return createDecoratedListMessages(chatThreadClient, this._context);
12049
12079
  }
12050
12080
  case 'getMessage': {
12051
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12081
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12052
12082
  const message = yield chatThreadClient.getMessage(...args);
12053
12083
  this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
12054
12084
  return message;
12055
12085
  }), 'ChatThreadClient.getMessage');
12056
12086
  }
12057
12087
  case 'sendMessage': {
12058
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12088
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12059
12089
  // Retry logic?
12060
12090
  const [request, options] = args;
12061
12091
  const { content } = request;
@@ -12095,7 +12125,7 @@ class ProxyChatThreadClient {
12095
12125
  }), 'ChatThreadClient.sendMessage');
12096
12126
  }
12097
12127
  case 'addParticipants': {
12098
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12128
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12099
12129
  const result = yield chatThreadClient.addParticipants(...args);
12100
12130
  const [addRequest] = args;
12101
12131
  const participantsToAdd = addRequest.participants;
@@ -12104,7 +12134,7 @@ class ProxyChatThreadClient {
12104
12134
  }), 'ChatThreadClient.addParticipants');
12105
12135
  }
12106
12136
  case 'deleteMessage': {
12107
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12137
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12108
12138
  // DeleteMessage is able to either delete local one(for failed message) or synced message
12109
12139
  const [messageId] = args;
12110
12140
  if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
@@ -12122,7 +12152,7 @@ class ProxyChatThreadClient {
12122
12152
  return createDecoratedListReadReceipts(chatThreadClient, this._context);
12123
12153
  }
12124
12154
  case 'removeParticipant': {
12125
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12155
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12126
12156
  const result = yield chatThreadClient.removeParticipant(...args);
12127
12157
  const [removeIdentifier] = args;
12128
12158
  this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
@@ -12130,7 +12160,7 @@ class ProxyChatThreadClient {
12130
12160
  }), 'ChatThreadClient.removeParticipant');
12131
12161
  }
12132
12162
  case 'updateMessage': {
12133
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12163
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12134
12164
  const result = yield chatThreadClient.updateMessage(...args);
12135
12165
  const [messageId, updateOption] = args;
12136
12166
  this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
@@ -12138,7 +12168,7 @@ class ProxyChatThreadClient {
12138
12168
  }), 'ChatThreadClient.updateMessage');
12139
12169
  }
12140
12170
  case 'updateTopic': {
12141
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12171
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12142
12172
  const result = yield chatThreadClient.updateTopic(...args);
12143
12173
  const [topic] = args;
12144
12174
  this._context.updateThreadTopic(chatThreadClient.threadId, topic);
@@ -12146,7 +12176,7 @@ class ProxyChatThreadClient {
12146
12176
  }), 'ChatThreadClient.updateTopic');
12147
12177
  }
12148
12178
  case 'getProperties': {
12149
- return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
12179
+ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
12150
12180
  const result = yield chatThreadClient.getProperties(...args);
12151
12181
  this._context.updateThread(chatThreadClient.threadId, result);
12152
12182
  return result;
@@ -12183,7 +12213,7 @@ const createDecoratedListThreads = (chatClient, context) => {
12183
12213
 
12184
12214
  // Copyright (c) Microsoft Corporation.
12185
12215
  // Licensed under the MIT license.
12186
- var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12216
+ var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12187
12217
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12188
12218
  return new (P || (P = Promise))(function (resolve, reject) {
12189
12219
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12202,7 +12232,7 @@ const proxyChatClient = {
12202
12232
  switch (prop) {
12203
12233
  case 'createChatThread': {
12204
12234
  return context.withAsyncErrorTeedToState(function (...args) {
12205
- return __awaiter$a(this, void 0, void 0, function* () {
12235
+ return __awaiter$b(this, void 0, void 0, function* () {
12206
12236
  const result = yield chatClient.createChatThread(...args);
12207
12237
  const thread = result.chatThread;
12208
12238
  if (thread) {
@@ -12215,7 +12245,7 @@ const proxyChatClient = {
12215
12245
  }
12216
12246
  case 'deleteChatThread': {
12217
12247
  return context.withAsyncErrorTeedToState(function (...args) {
12218
- return __awaiter$a(this, void 0, void 0, function* () {
12248
+ return __awaiter$b(this, void 0, void 0, function* () {
12219
12249
  const result = yield chatClient.deleteChatThread(...args);
12220
12250
  context.deleteThread(args[0]);
12221
12251
  return result;
@@ -12235,7 +12265,7 @@ const proxyChatClient = {
12235
12265
  }
12236
12266
  case 'startRealtimeNotifications': {
12237
12267
  return context.withAsyncErrorTeedToState(function (...args) {
12238
- return __awaiter$a(this, void 0, void 0, function* () {
12268
+ return __awaiter$b(this, void 0, void 0, function* () {
12239
12269
  const ret = yield chatClient.startRealtimeNotifications(...args);
12240
12270
  if (!receiver.eventSubscriber) {
12241
12271
  receiver.eventSubscriber = new EventSubscriber(chatClient, context);
@@ -12246,7 +12276,7 @@ const proxyChatClient = {
12246
12276
  }
12247
12277
  case 'stopRealtimeNotifications': {
12248
12278
  return context.withAsyncErrorTeedToState(function (...args) {
12249
- return __awaiter$a(this, void 0, void 0, function* () {
12279
+ return __awaiter$b(this, void 0, void 0, function* () {
12250
12280
  const ret = yield chatClient.stopRealtimeNotifications(...args);
12251
12281
  if (receiver.eventSubscriber) {
12252
12282
  receiver.eventSubscriber.unsubscribe();
@@ -12427,7 +12457,7 @@ const CallCompositeIcon = (props) => (React__default['default'].createElement(re
12427
12457
  */
12428
12458
  const CallWithChatCompositeIcon = (props) => (React__default['default'].createElement(react.FontIcon, Object.assign({}, props)));
12429
12459
 
12430
- var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",defaultPlaceHolder:"Select an option",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",soundLabel:"Sound",startCallButtonLabel:"Start call",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby."};var chat$d={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$d={peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",chatButtonLabel:"Chat",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipOpen:"Show chat",chatButtonTooltipClose:"Hide chat",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",chatPaneTitle:"Chat",chatButtonNewMessageNotificationLabel:"New Message",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButtonLabel:"Close",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
12460
+ var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",peopleButtonLabel:"People",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",soundLabel:"Sound",startCallButtonLabel:"Start call"};var chat$d={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$d={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
12431
12461
 
12432
12462
  var call$c={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",defaultPlaceHolder:"Select an option",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",soundLabel:"Sound",startCallButtonLabel:"Start call",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby."};var chat$c={chatListHeader:"In this chat"};var callWithChat$c={peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",chatButtonLabel:"Chat",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipOpen:"Show chat",chatButtonTooltipClose:"Hide chat",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",chatPaneTitle:"Chat",chatButtonNewMessageNotificationLabel:"New Message",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButton:"Close",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_GB = {call:call$c,chat:chat$c,callWithChat:callWithChat$c};
12433
12463
 
@@ -12830,7 +12860,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
12830
12860
 
12831
12861
  // Copyright (c) Microsoft Corporation.
12832
12862
  // Licensed under the MIT license.
12833
- var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12863
+ var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
12834
12864
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12835
12865
  return new (P || (P = Promise))(function (resolve, reject) {
12836
12866
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -12956,9 +12986,9 @@ class AzureCommunicationChatAdapter {
12956
12986
  this.unsubscribeAllEvents();
12957
12987
  }
12958
12988
  fetchInitialData() {
12959
- return __awaiter$9(this, void 0, void 0, function* () {
12989
+ return __awaiter$a(this, void 0, void 0, function* () {
12960
12990
  // If get properties fails we dont want to try to get the participants after.
12961
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
12991
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
12962
12992
  var e_1, _a;
12963
12993
  yield this.chatThreadClient.getProperties();
12964
12994
  try {
@@ -12992,8 +13022,8 @@ class AzureCommunicationChatAdapter {
12992
13022
  this.context.offStateChange(handler);
12993
13023
  }
12994
13024
  sendMessage(content, options = {}) {
12995
- return __awaiter$9(this, void 0, void 0, function* () {
12996
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13025
+ return __awaiter$a(this, void 0, void 0, function* () {
13026
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
12997
13027
  /* @conditional-compile-remove(file-sharing) */
12998
13028
  options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
12999
13029
  /* @conditional-compile-remove(file-sharing) */
@@ -13010,49 +13040,49 @@ class AzureCommunicationChatAdapter {
13010
13040
  });
13011
13041
  }
13012
13042
  sendReadReceipt(chatMessageId) {
13013
- return __awaiter$9(this, void 0, void 0, function* () {
13014
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13043
+ return __awaiter$a(this, void 0, void 0, function* () {
13044
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13015
13045
  yield this.handlers.onMessageSeen(chatMessageId);
13016
13046
  }));
13017
13047
  });
13018
13048
  }
13019
13049
  sendTypingIndicator() {
13020
- return __awaiter$9(this, void 0, void 0, function* () {
13050
+ return __awaiter$a(this, void 0, void 0, function* () {
13021
13051
  yield this.handlers.onTyping();
13022
13052
  });
13023
13053
  }
13024
13054
  removeParticipant(userId) {
13025
- return __awaiter$9(this, void 0, void 0, function* () {
13026
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13055
+ return __awaiter$a(this, void 0, void 0, function* () {
13056
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13027
13057
  yield this.handlers.onRemoveParticipant(userId);
13028
13058
  }));
13029
13059
  });
13030
13060
  }
13031
13061
  setTopic(topicName) {
13032
- return __awaiter$9(this, void 0, void 0, function* () {
13033
- yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13062
+ return __awaiter$a(this, void 0, void 0, function* () {
13063
+ yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13034
13064
  yield this.handlers.updateThreadTopicName(topicName);
13035
13065
  }));
13036
13066
  });
13037
13067
  }
13038
13068
  loadPreviousChatMessages(messagesToLoad) {
13039
- return __awaiter$9(this, void 0, void 0, function* () {
13040
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13069
+ return __awaiter$a(this, void 0, void 0, function* () {
13070
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13041
13071
  return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
13042
13072
  }));
13043
13073
  });
13044
13074
  }
13045
13075
  updateMessage(messageId, content, metadata, options) {
13046
- return __awaiter$9(this, void 0, void 0, function* () {
13047
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13076
+ return __awaiter$a(this, void 0, void 0, function* () {
13077
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13048
13078
  /* @conditional-compile-remove(file-sharing) */
13049
13079
  return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
13050
13080
  }));
13051
13081
  });
13052
13082
  }
13053
13083
  deleteMessage(messageId) {
13054
- return __awaiter$9(this, void 0, void 0, function* () {
13055
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
13084
+ return __awaiter$a(this, void 0, void 0, function* () {
13085
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
13056
13086
  return yield this.handlers.onDeleteMessage(messageId);
13057
13087
  }));
13058
13088
  });
@@ -13133,7 +13163,7 @@ class AzureCommunicationChatAdapter {
13133
13163
  this.emitter.off(event, listener);
13134
13164
  }
13135
13165
  asyncTeeErrorToEventEmitter(f) {
13136
- return __awaiter$9(this, void 0, void 0, function* () {
13166
+ return __awaiter$a(this, void 0, void 0, function* () {
13137
13167
  try {
13138
13168
  return yield f();
13139
13169
  }
@@ -13175,7 +13205,7 @@ const convertEventType = (type) => {
13175
13205
  *
13176
13206
  * @public
13177
13207
  */
13178
- const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$9(void 0, void 0, void 0, function* () {
13208
+ const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$a(void 0, void 0, void 0, function* () {
13179
13209
  const chatClient = createStatefulChatClient({
13180
13210
  userId,
13181
13211
  displayName,
@@ -13238,7 +13268,7 @@ beforeDispose) => {
13238
13268
  if (!credential || !displayName || !endpoint || !threadId || !userId) {
13239
13269
  return;
13240
13270
  }
13241
- (() => __awaiter$9(void 0, void 0, void 0, function* () {
13271
+ (() => __awaiter$a(void 0, void 0, void 0, function* () {
13242
13272
  if (adapterRef.current) {
13243
13273
  // Dispose the old adapter when a new one is created.
13244
13274
  //
@@ -13270,7 +13300,7 @@ beforeDispose) => {
13270
13300
  // Dispose any existing adapter when the component unmounts.
13271
13301
  React.useEffect(() => {
13272
13302
  return () => {
13273
- (() => __awaiter$9(void 0, void 0, void 0, function* () {
13303
+ (() => __awaiter$a(void 0, void 0, void 0, function* () {
13274
13304
  if (adapterRef.current) {
13275
13305
  if (beforeDisposeRef.current) {
13276
13306
  yield beforeDisposeRef.current(adapterRef.current);
@@ -13291,7 +13321,7 @@ beforeDispose) => {
13291
13321
  *
13292
13322
  * @public
13293
13323
  */
13294
- const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$9(void 0, void 0, void 0, function* () {
13324
+ const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$a(void 0, void 0, void 0, function* () {
13295
13325
  return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
13296
13326
  });
13297
13327
  const isChatError = (e) => {
@@ -13472,7 +13502,7 @@ const sendboxContainerStyles = {
13472
13502
 
13473
13503
  // Copyright (c) Microsoft Corporation.
13474
13504
  // Licensed under the MIT license.
13475
- var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
13505
+ var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
13476
13506
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13477
13507
  return new (P || (P = Promise))(function (resolve, reject) {
13478
13508
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -13493,7 +13523,7 @@ const AvatarPersona = (props) => {
13493
13523
  const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
13494
13524
  const [data, setData] = React.useState();
13495
13525
  React.useEffect(() => {
13496
- (() => __awaiter$8(void 0, void 0, void 0, function* () {
13526
+ (() => __awaiter$9(void 0, void 0, void 0, function* () {
13497
13527
  if (dataProvider && userId) {
13498
13528
  const newData = yield dataProvider(userId);
13499
13529
  if (avatarDeepDifferenceCheck(data, newData)) {
@@ -14168,7 +14198,7 @@ const getCallCompositePage = (call, previousCall) => {
14168
14198
 
14169
14199
  // Copyright (c) Microsoft Corporation.
14170
14200
  // Licensed under the MIT license.
14171
- var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
14201
+ var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
14172
14202
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14173
14203
  return new (P || (P = Promise))(function (resolve, reject) {
14174
14204
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -14187,68 +14217,68 @@ _component) => {
14187
14217
  return createCompositeHandlers(useAdapter());
14188
14218
  };
14189
14219
  const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
14190
- onCreateLocalStreamView: (options) => __awaiter$7(void 0, void 0, void 0, function* () {
14220
+ onCreateLocalStreamView: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
14191
14221
  return yield adapter.createStreamView(undefined, options);
14192
14222
  }),
14193
- onCreateRemoteStreamView: (userId, options) => __awaiter$7(void 0, void 0, void 0, function* () {
14223
+ onCreateRemoteStreamView: (userId, options) => __awaiter$8(void 0, void 0, void 0, function* () {
14194
14224
  return yield adapter.createStreamView(userId, options);
14195
14225
  }),
14196
- onHangUp: () => __awaiter$7(void 0, void 0, void 0, function* () {
14226
+ onHangUp: () => __awaiter$8(void 0, void 0, void 0, function* () {
14197
14227
  yield adapter.leaveCall();
14198
14228
  }),
14199
14229
  /* @conditional-compile-remove(PSTN-calls) */
14200
- onToggleHold: () => __awaiter$7(void 0, void 0, void 0, function* () {
14230
+ onToggleHold: () => __awaiter$8(void 0, void 0, void 0, function* () {
14201
14231
  var _a;
14202
14232
  return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
14203
14233
  }),
14204
14234
  /* @conditional-compile-remove(PSTN-calls) */
14205
- onAddParticipant: (participant, options) => __awaiter$7(void 0, void 0, void 0, function* () {
14235
+ onAddParticipant: (participant, options) => __awaiter$8(void 0, void 0, void 0, function* () {
14206
14236
  return yield adapter.addParticipant(participant, options);
14207
14237
  }),
14208
- onRemoveParticipant: (userId) => __awaiter$7(void 0, void 0, void 0, function* () {
14238
+ onRemoveParticipant: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
14209
14239
  yield adapter.removeParticipant(userId);
14210
14240
  }),
14211
- onSelectCamera: (deviceInfo, options) => __awaiter$7(void 0, void 0, void 0, function* () {
14241
+ onSelectCamera: (deviceInfo, options) => __awaiter$8(void 0, void 0, void 0, function* () {
14212
14242
  yield adapter.setCamera(deviceInfo, options);
14213
14243
  }),
14214
- onSelectMicrophone: (deviceInfo) => __awaiter$7(void 0, void 0, void 0, function* () {
14244
+ onSelectMicrophone: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
14215
14245
  yield adapter.setMicrophone(deviceInfo);
14216
14246
  }),
14217
- onSelectSpeaker: (deviceInfo) => __awaiter$7(void 0, void 0, void 0, function* () {
14247
+ onSelectSpeaker: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
14218
14248
  yield adapter.setSpeaker(deviceInfo);
14219
14249
  }),
14220
14250
  onStartCall: (participants, options) => {
14221
14251
  const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
14222
14252
  return adapter.startCall(rawIds, options);
14223
14253
  },
14224
- onStartScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
14254
+ onStartScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
14225
14255
  yield adapter.startScreenShare();
14226
14256
  }),
14227
- onStopScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
14257
+ onStopScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
14228
14258
  yield adapter.stopScreenShare();
14229
14259
  }),
14230
- onToggleCamera: (options) => __awaiter$7(void 0, void 0, void 0, function* () {
14260
+ onToggleCamera: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
14231
14261
  isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
14232
14262
  }),
14233
- onToggleMicrophone: () => __awaiter$7(void 0, void 0, void 0, function* () {
14263
+ onToggleMicrophone: () => __awaiter$8(void 0, void 0, void 0, function* () {
14234
14264
  var _b;
14235
14265
  return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
14236
14266
  }),
14237
- onToggleScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
14267
+ onToggleScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
14238
14268
  var _c;
14239
14269
  return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
14240
14270
  ? yield adapter.stopScreenShare()
14241
14271
  : yield adapter.startScreenShare();
14242
14272
  }),
14243
- onStartLocalVideo: () => __awaiter$7(void 0, void 0, void 0, function* () {
14273
+ onStartLocalVideo: () => __awaiter$8(void 0, void 0, void 0, function* () {
14244
14274
  if (adapter.getState().call) {
14245
14275
  return adapter.startCamera();
14246
14276
  }
14247
14277
  }),
14248
- onDisposeLocalStreamView: () => __awaiter$7(void 0, void 0, void 0, function* () {
14278
+ onDisposeLocalStreamView: () => __awaiter$8(void 0, void 0, void 0, function* () {
14249
14279
  return adapter.disposeStreamView();
14250
14280
  }),
14251
- onDisposeRemoteStreamView: (userId) => __awaiter$7(void 0, void 0, void 0, function* () {
14281
+ onDisposeRemoteStreamView: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
14252
14282
  return adapter.disposeStreamView(userId);
14253
14283
  })
14254
14284
  }));
@@ -15288,7 +15318,7 @@ const localPreviewTileStyle = {
15288
15318
 
15289
15319
  // Copyright (c) Microsoft Corporation.
15290
15320
  // Licensed under the MIT license.
15291
- var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15321
+ var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15292
15322
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15293
15323
  return new (P || (P = Promise))(function (resolve, reject) {
15294
15324
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -15308,7 +15338,7 @@ const LocalPreview = (props) => {
15308
15338
  const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
15309
15339
  const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
15310
15340
  const adapter = useAdapter();
15311
- const onToggleMic = React.useCallback(() => __awaiter$6(void 0, void 0, void 0, function* () {
15341
+ const onToggleMic = React.useCallback(() => __awaiter$7(void 0, void 0, void 0, function* () {
15312
15342
  isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
15313
15343
  }), [adapter, isLocalMicrophoneEnabled]);
15314
15344
  const theme = useTheme();
@@ -15639,7 +15669,7 @@ const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.as
15639
15669
 
15640
15670
  // Copyright (c) Microsoft Corporation.
15641
15671
  // Licensed under the MIT license.
15642
- var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15672
+ var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15643
15673
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15644
15674
  return new (P || (P = Promise))(function (resolve, reject) {
15645
15675
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -15653,26 +15683,41 @@ const MainScreen = (props) => {
15653
15683
  const page = useSelector$1(getPage);
15654
15684
  const adapter = useAdapter();
15655
15685
  const locale = useLocale();
15686
+ let pageElement;
15656
15687
  switch (page) {
15657
15688
  case 'configuration':
15658
- return (React__default['default'].createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {
15689
+ pageElement = (React__default['default'].createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {
15659
15690
  adapter.joinCall();
15660
15691
  } }));
15692
+ break;
15661
15693
  case 'accessDeniedTeamsMeeting':
15662
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
15694
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
15695
+ break;
15663
15696
  case 'removedFromCall':
15664
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageRemovedFromCall", title: locale.strings.call.removedFromCallTitle, moreDetails: locale.strings.call.removedFromCallMoreDetails, dataUiId: 'removed-from-call-page' }));
15697
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageRemovedFromCall", title: locale.strings.call.removedFromCallTitle, moreDetails: locale.strings.call.removedFromCallMoreDetails, dataUiId: 'removed-from-call-page' }));
15698
+ break;
15665
15699
  case 'joinCallFailedDueToNoNetwork':
15666
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageJoinCallFailedDueToNoNetwork", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' }));
15700
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageJoinCallFailedDueToNoNetwork", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' }));
15701
+ break;
15667
15702
  case 'leftCall':
15668
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageLeftCall", title: locale.strings.call.leftCallTitle, moreDetails: locale.strings.call.leftCallMoreDetails, dataUiId: 'left-call-page' }));
15703
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageLeftCall", title: locale.strings.call.leftCallTitle, moreDetails: locale.strings.call.leftCallMoreDetails, dataUiId: 'left-call-page' }));
15704
+ break;
15669
15705
  case 'lobby':
15670
- return React__default['default'].createElement(LobbyPage, { mobileView: props.mobileView, options: props.options });
15706
+ pageElement = React__default['default'].createElement(LobbyPage, { mobileView: props.mobileView, options: props.options });
15707
+ break;
15671
15708
  case 'call':
15672
- return (React__default['default'].createElement(CallPage, { onRenderAvatar: onRenderAvatar, callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, options: props.options }));
15709
+ pageElement = (React__default['default'].createElement(CallPage, { onRenderAvatar: onRenderAvatar, callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, options: props.options }));
15710
+ break;
15673
15711
  default:
15674
15712
  throw new Error('Invalid call composite page');
15675
15713
  }
15714
+ /* @conditional-compile-remove(rooms) */
15715
+ const permissions = _getPermissions(props.role);
15716
+ // default retElement for stable version
15717
+ let retElement = pageElement;
15718
+ /* @conditional-compile-remove(rooms) */
15719
+ retElement = React__default['default'].createElement(_PermissionsProvider, { permissions: permissions }, pageElement);
15720
+ return retElement;
15676
15721
  };
15677
15722
  /**
15678
15723
  * A customizable UI composite for calling experience.
@@ -15684,9 +15729,11 @@ const MainScreen = (props) => {
15684
15729
  * @public
15685
15730
  */
15686
15731
  const CallComposite = (props) => {
15687
- const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
15732
+ const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop',
15733
+ /* @conditional-compile-remove(rooms) */
15734
+ role } = props;
15688
15735
  React.useEffect(() => {
15689
- (() => __awaiter$5(void 0, void 0, void 0, function* () {
15736
+ (() => __awaiter$6(void 0, void 0, void 0, function* () {
15690
15737
  yield adapter.askDevicePermission({ video: true, audio: true });
15691
15738
  adapter.queryCameras();
15692
15739
  adapter.queryMicrophones();
@@ -15700,7 +15747,9 @@ const CallComposite = (props) => {
15700
15747
  return (React__default['default'].createElement("div", { className: mainScreenContainerClassName },
15701
15748
  React__default['default'].createElement(BaseProvider, Object.assign({}, props),
15702
15749
  React__default['default'].createElement(CallAdapterProvider, { adapter: adapter },
15703
- React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, options: options })))));
15750
+ React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, options: options,
15751
+ /* @conditional-compile-remove(rooms) */
15752
+ role: role })))));
15704
15753
  };
15705
15754
 
15706
15755
  /**
@@ -15777,7 +15826,7 @@ class DiagnosticsForwarder {
15777
15826
 
15778
15827
  // Copyright (c) Microsoft Corporation.
15779
15828
  // Licensed under the MIT license.
15780
- var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15829
+ var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
15781
15830
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15782
15831
  return new (P || (P = Promise))(function (resolve, reject) {
15783
15832
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -15942,29 +15991,29 @@ class AzureCommunicationCallAdapter {
15942
15991
  this.callAgent.dispose();
15943
15992
  }
15944
15993
  queryCameras() {
15945
- return __awaiter$4(this, void 0, void 0, function* () {
15946
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
15994
+ return __awaiter$5(this, void 0, void 0, function* () {
15995
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15947
15996
  return this.deviceManager.getCameras();
15948
15997
  }));
15949
15998
  });
15950
15999
  }
15951
16000
  queryMicrophones() {
15952
- return __awaiter$4(this, void 0, void 0, function* () {
15953
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16001
+ return __awaiter$5(this, void 0, void 0, function* () {
16002
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15954
16003
  return this.deviceManager.getMicrophones();
15955
16004
  }));
15956
16005
  });
15957
16006
  }
15958
16007
  querySpeakers() {
15959
- return __awaiter$4(this, void 0, void 0, function* () {
15960
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16008
+ return __awaiter$5(this, void 0, void 0, function* () {
16009
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15961
16010
  return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];
15962
16011
  }));
15963
16012
  });
15964
16013
  }
15965
16014
  askDevicePermission(constrain) {
15966
- return __awaiter$4(this, void 0, void 0, function* () {
15967
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16015
+ return __awaiter$5(this, void 0, void 0, function* () {
16016
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
15968
16017
  yield this.deviceManager.askDevicePermission(constrain);
15969
16018
  }));
15970
16019
  });
@@ -16014,7 +16063,7 @@ class AzureCommunicationCallAdapter {
16014
16063
  });
16015
16064
  }
16016
16065
  createStreamView(remoteUserId, options) {
16017
- return __awaiter$4(this, void 0, void 0, function* () {
16066
+ return __awaiter$5(this, void 0, void 0, function* () {
16018
16067
  if (remoteUserId === undefined) {
16019
16068
  return yield this.handlers.onCreateLocalStreamView(options);
16020
16069
  }
@@ -16024,7 +16073,7 @@ class AzureCommunicationCallAdapter {
16024
16073
  });
16025
16074
  }
16026
16075
  disposeStreamView(remoteUserId) {
16027
- return __awaiter$4(this, void 0, void 0, function* () {
16076
+ return __awaiter$5(this, void 0, void 0, function* () {
16028
16077
  if (remoteUserId === undefined) {
16029
16078
  yield this.handlers.onDisposeLocalStreamView();
16030
16079
  }
@@ -16035,7 +16084,7 @@ class AzureCommunicationCallAdapter {
16035
16084
  }
16036
16085
  leaveCall() {
16037
16086
  var _a;
16038
- return __awaiter$4(this, void 0, void 0, function* () {
16087
+ return __awaiter$5(this, void 0, void 0, function* () {
16039
16088
  const callId = (_a = this.call) === null || _a === void 0 ? void 0 : _a.id;
16040
16089
  yield this.handlers.onHangUp();
16041
16090
  this.unsubscribeCallEvents();
@@ -16050,29 +16099,29 @@ class AzureCommunicationCallAdapter {
16050
16099
  });
16051
16100
  }
16052
16101
  setCamera(device, options) {
16053
- return __awaiter$4(this, void 0, void 0, function* () {
16054
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16102
+ return __awaiter$5(this, void 0, void 0, function* () {
16103
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16055
16104
  yield this.handlers.onSelectCamera(device, options);
16056
16105
  }));
16057
16106
  });
16058
16107
  }
16059
16108
  setMicrophone(device) {
16060
- return __awaiter$4(this, void 0, void 0, function* () {
16061
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16109
+ return __awaiter$5(this, void 0, void 0, function* () {
16110
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16062
16111
  yield this.handlers.onSelectMicrophone(device);
16063
16112
  }));
16064
16113
  });
16065
16114
  }
16066
16115
  setSpeaker(device) {
16067
- return __awaiter$4(this, void 0, void 0, function* () {
16068
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16116
+ return __awaiter$5(this, void 0, void 0, function* () {
16117
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16069
16118
  yield this.handlers.onSelectSpeaker(device);
16070
16119
  }));
16071
16120
  });
16072
16121
  }
16073
16122
  startCamera(options) {
16074
- return __awaiter$4(this, void 0, void 0, function* () {
16075
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16123
+ return __awaiter$5(this, void 0, void 0, function* () {
16124
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16076
16125
  if (!isCameraOn(this.getState())) {
16077
16126
  yield this.handlers.onToggleCamera(options);
16078
16127
  }
@@ -16080,8 +16129,8 @@ class AzureCommunicationCallAdapter {
16080
16129
  });
16081
16130
  }
16082
16131
  stopCamera() {
16083
- return __awaiter$4(this, void 0, void 0, function* () {
16084
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16132
+ return __awaiter$5(this, void 0, void 0, function* () {
16133
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16085
16134
  if (isCameraOn(this.getState())) {
16086
16135
  yield this.handlers.onToggleCamera();
16087
16136
  }
@@ -16089,8 +16138,8 @@ class AzureCommunicationCallAdapter {
16089
16138
  });
16090
16139
  }
16091
16140
  mute() {
16092
- return __awaiter$4(this, void 0, void 0, function* () {
16093
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16141
+ return __awaiter$5(this, void 0, void 0, function* () {
16142
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16094
16143
  var _a, _b;
16095
16144
  this.context.setIsLocalMicrophoneEnabled(false);
16096
16145
  if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
@@ -16100,8 +16149,8 @@ class AzureCommunicationCallAdapter {
16100
16149
  });
16101
16150
  }
16102
16151
  unmute() {
16103
- return __awaiter$4(this, void 0, void 0, function* () {
16104
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16152
+ return __awaiter$5(this, void 0, void 0, function* () {
16153
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16105
16154
  var _a, _b;
16106
16155
  this.context.setIsLocalMicrophoneEnabled(true);
16107
16156
  if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
@@ -16111,8 +16160,8 @@ class AzureCommunicationCallAdapter {
16111
16160
  });
16112
16161
  }
16113
16162
  startScreenShare() {
16114
- return __awaiter$4(this, void 0, void 0, function* () {
16115
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16163
+ return __awaiter$5(this, void 0, void 0, function* () {
16164
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16116
16165
  var _a;
16117
16166
  if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
16118
16167
  yield this.handlers.onToggleScreenShare();
@@ -16121,8 +16170,8 @@ class AzureCommunicationCallAdapter {
16121
16170
  });
16122
16171
  }
16123
16172
  stopScreenShare() {
16124
- return __awaiter$4(this, void 0, void 0, function* () {
16125
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
16173
+ return __awaiter$5(this, void 0, void 0, function* () {
16174
+ return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
16126
16175
  var _a;
16127
16176
  if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
16128
16177
  yield this.handlers.onToggleScreenShare();
@@ -16166,20 +16215,20 @@ class AzureCommunicationCallAdapter {
16166
16215
  this.subscribeCallEvents();
16167
16216
  }
16168
16217
  removeParticipant(userId) {
16169
- return __awaiter$4(this, void 0, void 0, function* () {
16218
+ return __awaiter$5(this, void 0, void 0, function* () {
16170
16219
  this.handlers.onRemoveParticipant(userId);
16171
16220
  });
16172
16221
  }
16173
16222
  /* @conditional-compile-remove(PSTN-calls) */
16174
16223
  addParticipant(participant, options) {
16175
- return __awaiter$4(this, void 0, void 0, function* () {
16224
+ return __awaiter$5(this, void 0, void 0, function* () {
16176
16225
  this.handlers.onAddParticipant(participant, options);
16177
16226
  });
16178
16227
  }
16179
16228
  /* @conditional-compile-remove(PSTN-calls) */
16180
16229
  holdCall() {
16181
16230
  var _a;
16182
- return __awaiter$4(this, void 0, void 0, function* () {
16231
+ return __awaiter$5(this, void 0, void 0, function* () {
16183
16232
  if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
16184
16233
  this.handlers.onToggleHold();
16185
16234
  }
@@ -16188,7 +16237,7 @@ class AzureCommunicationCallAdapter {
16188
16237
  /* @conditional-compile-remove(PSTN-calls) */
16189
16238
  resumeCall() {
16190
16239
  var _a;
16191
- return __awaiter$4(this, void 0, void 0, function* () {
16240
+ return __awaiter$5(this, void 0, void 0, function* () {
16192
16241
  if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
16193
16242
  this.handlers.onToggleHold();
16194
16243
  }
@@ -16262,7 +16311,7 @@ class AzureCommunicationCallAdapter {
16262
16311
  this.emitter.off(event, listener);
16263
16312
  }
16264
16313
  asyncTeeErrorToEventEmitter(f) {
16265
- return __awaiter$4(this, void 0, void 0, function* () {
16314
+ return __awaiter$5(this, void 0, void 0, function* () {
16266
16315
  try {
16267
16316
  return yield f();
16268
16317
  }
@@ -16296,7 +16345,7 @@ class AzureCommunicationCallAdapter {
16296
16345
  * @public
16297
16346
  */
16298
16347
  const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
16299
- /* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$4(void 0, void 0, void 0, function* () {
16348
+ /* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$5(void 0, void 0, void 0, function* () {
16300
16349
  const callClient = createStatefulCallClient({
16301
16350
  userId,
16302
16351
  /* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId
@@ -16358,7 +16407,7 @@ beforeDispose) => {
16358
16407
  if (!credential || !displayName || !locator || !userId) {
16359
16408
  return;
16360
16409
  }
16361
- (() => __awaiter$4(void 0, void 0, void 0, function* () {
16410
+ (() => __awaiter$5(void 0, void 0, void 0, function* () {
16362
16411
  if (adapterRef.current) {
16363
16412
  // Dispose the old adapter when a new one is created.
16364
16413
  //
@@ -16389,7 +16438,7 @@ beforeDispose) => {
16389
16438
  // Dispose any existing adapter when the component unmounts.
16390
16439
  React.useEffect(() => {
16391
16440
  return () => {
16392
- (() => __awaiter$4(void 0, void 0, void 0, function* () {
16441
+ (() => __awaiter$5(void 0, void 0, void 0, function* () {
16393
16442
  if (adapterRef.current) {
16394
16443
  if (beforeDisposeRef.current) {
16395
16444
  yield beforeDisposeRef.current(adapterRef.current);
@@ -16410,7 +16459,7 @@ beforeDispose) => {
16410
16459
  *
16411
16460
  * @public
16412
16461
  */
16413
- const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$4(void 0, void 0, void 0, function* () {
16462
+ const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$5(void 0, void 0, void 0, function* () {
16414
16463
  const deviceManager = (yield callClient.getDeviceManager());
16415
16464
  return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);
16416
16465
  });
@@ -16856,7 +16905,7 @@ const modalLayerHostStyle = {
16856
16905
 
16857
16906
  // Copyright (c) Microsoft Corporation.
16858
16907
  // Licensed under the MIT license.
16859
- var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16908
+ var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16860
16909
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16861
16910
  return new (P || (P = Promise))(function (resolve, reject) {
16862
16911
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -16917,36 +16966,36 @@ class CallWithChatBackedCallAdapter {
16917
16966
  this.joinCall = (microphoneOn) => {
16918
16967
  return this.callWithChatAdapter.joinCall(microphoneOn);
16919
16968
  };
16920
- this.leaveCall = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
16969
+ this.leaveCall = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
16921
16970
  this.startCall = (participants, options) => {
16922
16971
  return this.callWithChatAdapter.startCall(participants, options);
16923
16972
  };
16924
- this.setCamera = (sourceId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
16925
- this.setMicrophone = (sourceId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
16926
- this.setSpeaker = (sourceId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
16927
- this.askDevicePermission = (constraints) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
16928
- this.queryCameras = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
16929
- this.queryMicrophones = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
16930
- this.querySpeakers = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
16931
- this.startCamera = (options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
16932
- this.stopCamera = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
16933
- this.mute = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
16934
- this.unmute = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
16935
- this.startScreenShare = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
16936
- this.stopScreenShare = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
16937
- this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
16938
- this.createStreamView = (remoteUserId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
16939
- this.disposeStreamView = (remoteUserId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
16973
+ this.setCamera = (sourceId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
16974
+ this.setMicrophone = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
16975
+ this.setSpeaker = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
16976
+ this.askDevicePermission = (constraints) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
16977
+ this.queryCameras = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
16978
+ this.queryMicrophones = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
16979
+ this.querySpeakers = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
16980
+ this.startCamera = (options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
16981
+ this.stopCamera = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
16982
+ this.mute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
16983
+ this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
16984
+ this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
16985
+ this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
16986
+ this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
16987
+ this.createStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
16988
+ this.disposeStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
16940
16989
  /* @conditional-compile-remove(PSTN-calls) */
16941
- this.holdCall = () => __awaiter$3(this, void 0, void 0, function* () {
16990
+ this.holdCall = () => __awaiter$4(this, void 0, void 0, function* () {
16942
16991
  yield this.callWithChatAdapter.holdCall();
16943
16992
  });
16944
16993
  /* @conditional-compile-remove(PSTN-calls) */
16945
- this.resumeCall = () => __awaiter$3(this, void 0, void 0, function* () {
16994
+ this.resumeCall = () => __awaiter$4(this, void 0, void 0, function* () {
16946
16995
  yield this.callWithChatAdapter.resumeCall();
16947
16996
  });
16948
16997
  /* @conditional-compile-remove(PSTN-calls) */
16949
- this.addParticipant = (participant, options) => __awaiter$3(this, void 0, void 0, function* () {
16998
+ this.addParticipant = (participant, options) => __awaiter$4(this, void 0, void 0, function* () {
16950
16999
  yield this.callWithChatAdapter.addParticipant(participant, options);
16951
17000
  });
16952
17001
  this.callWithChatAdapter = callWithChatAdapter;
@@ -16967,7 +17016,7 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
16967
17016
 
16968
17017
  // Copyright (c) Microsoft Corporation.
16969
17018
  // Licensed under the MIT license.
16970
- var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17019
+ var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
16971
17020
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16972
17021
  return new (P || (P = Promise))(function (resolve, reject) {
16973
17022
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -16988,12 +17037,12 @@ class CallWithChatBackedChatAdapter {
16988
17037
  // For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.
16989
17038
  // In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
16990
17039
  this.eventStore = new Map();
16991
- this.fetchInitialData = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
16992
- this.sendMessage = (content) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
16993
- this.sendReadReceipt = (chatMessageId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
16994
- this.sendTypingIndicator = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
16995
- this.removeParticipant = (userId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
16996
- this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
17040
+ this.fetchInitialData = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
17041
+ this.sendMessage = (content) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
17042
+ this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
17043
+ this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
17044
+ this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
17045
+ this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
16997
17046
  this.dispose = () => this.callWithChatAdapter.dispose();
16998
17047
  this.onStateChange = (handler) => {
16999
17048
  const convertedHandler = (state) => {
@@ -17032,12 +17081,12 @@ class CallWithChatBackedChatAdapter {
17032
17081
  return this.callWithChatAdapter.off(event, listener);
17033
17082
  }
17034
17083
  };
17035
- this.updateMessage = (messageId, content, metadata) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
17036
- this.deleteMessage = (messageId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
17084
+ this.updateMessage = (messageId, content, metadata) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
17085
+ this.deleteMessage = (messageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
17037
17086
  this.clearErrors = (errorTypes) => {
17038
17087
  throw new Error(`Method not supported in CallWithChatComposite.`);
17039
17088
  };
17040
- this.setTopic = (topicName) => __awaiter$2(this, void 0, void 0, function* () {
17089
+ this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
17041
17090
  throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
17042
17091
  });
17043
17092
  /* @conditional-compile-remove(file-sharing) */
@@ -17225,10 +17274,9 @@ const SidePaneHeader = (props) => {
17225
17274
  iconHovered: { color: theme.palette.neutralSecondary },
17226
17275
  iconPressed: { color: theme.palette.neutralSecondary }
17227
17276
  }), [theme.palette.neutralSecondary]);
17228
- const callWithChatStrings = useCallWithChatCompositeStrings();
17229
17277
  return (React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: sidePaneHeaderContainerStyles },
17230
17278
  React__default['default'].createElement(react.Stack.Item, { styles: sidePaneHeaderStyles }, props.headingText),
17231
- React__default['default'].createElement(react.CommandBarButton, { ariaLabel: callWithChatStrings.dismissSidePaneButtonLabel, styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose })));
17279
+ React__default['default'].createElement(react.CommandBarButton, { ariaLabel: props.strings.dismissSidePaneButtonLabel, styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose })));
17232
17280
  };
17233
17281
 
17234
17282
  // Copyright (c) Microsoft Corporation.
@@ -17352,6 +17400,61 @@ const localAndRemotePIPSelector = reselect__namespace.createSelector([getDisplay
17352
17400
  };
17353
17401
  });
17354
17402
 
17403
+ // Copyright (c) Microsoft Corporation.
17404
+ /**
17405
+ * Default Modal PIP related pixel measurements used for ModalLocalAndremotePIP and common/utils.
17406
+ *
17407
+ * @private
17408
+ */
17409
+ const MODAL_PIP_DEFAULT_PX = {
17410
+ rightPositionPx: 16,
17411
+ topPositionPx: 52,
17412
+ widthPx: 88,
17413
+ heightPx: 128
17414
+ };
17415
+ /**
17416
+ * @private
17417
+ */
17418
+ const getPipStyles = (theme) => ({
17419
+ modal: {
17420
+ main: Object.assign(Object.assign({ borderRadius: theme.effects.roundedCorner4, boxShadow: theme.effects.elevation8,
17421
+ // Above the message thread / people pane.
17422
+ zIndex: 2 }, (theme.rtl
17423
+ ? { left: _pxToRem(MODAL_PIP_DEFAULT_PX.rightPositionPx) }
17424
+ : { right: _pxToRem(MODAL_PIP_DEFAULT_PX.rightPositionPx) })), { top: _pxToRem(MODAL_PIP_DEFAULT_PX.topPositionPx) })
17425
+ }
17426
+ });
17427
+ /**
17428
+ * @private
17429
+ */
17430
+ const PIPContainerStyle = {
17431
+ root: { position: 'absolute', width: '100%', height: '100%', pointerEvents: 'none' }
17432
+ };
17433
+ /**
17434
+ * @private
17435
+ */
17436
+ const hiddenStyle = react.concatStyleSets(PIPContainerStyle, { root: { display: 'none' } });
17437
+ /**
17438
+ * @private
17439
+ */
17440
+ const modalStyle = {
17441
+ main: {
17442
+ minWidth: 'min-content',
17443
+ minHeight: 'min-content',
17444
+ position: 'absolute',
17445
+ overflow: 'hidden',
17446
+ // pointer events for root Modal div set to auto to make LocalAndRemotePIP interactive
17447
+ pointerEvents: 'auto',
17448
+ touchAction: 'none'
17449
+ },
17450
+ root: {
17451
+ width: '100%',
17452
+ height: '100%',
17453
+ // pointer events for root Modal div set to none to make descendants interactive
17454
+ pointerEvents: 'none'
17455
+ }
17456
+ };
17457
+
17355
17458
  // Copyright (c) Microsoft Corporation.
17356
17459
  /**
17357
17460
  * Drag options for Modal in {@link ModalLocalAndRemotePIP} component
@@ -17384,27 +17487,6 @@ const ModalLocalAndRemotePIP = (props) => {
17384
17487
  return (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
17385
17488
  React__default['default'].createElement(_ModalLocalAndRemotePIP, Object.assign({}, props), props.children)));
17386
17489
  };
17387
- const PIPContainerStyle = {
17388
- root: { position: 'absolute', width: '100%', height: '100%', pointerEvents: 'none' }
17389
- };
17390
- const hiddenStyle = react.concatStyleSets(PIPContainerStyle, { root: { display: 'none' } });
17391
- const modalStyle = {
17392
- main: {
17393
- minWidth: 'min-content',
17394
- minHeight: 'min-content',
17395
- position: 'absolute',
17396
- overflow: 'hidden',
17397
- // pointer events for root Modal div set to auto to make LocalAndRemotePIP interactive
17398
- pointerEvents: 'auto',
17399
- touchAction: 'none'
17400
- },
17401
- root: {
17402
- width: '100%',
17403
- height: '100%',
17404
- // pointer events for root Modal div set to none to make descendants interactive
17405
- pointerEvents: 'none'
17406
- }
17407
- };
17408
17490
 
17409
17491
  // Copyright (c) Microsoft Corporation.
17410
17492
  /**
@@ -17446,7 +17528,7 @@ const copyLinkButtonStyles = {
17446
17528
  */
17447
17529
  const linkIconStyles = { marginRight: '0.5rem' };
17448
17530
 
17449
- var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17531
+ var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17450
17532
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17451
17533
  return new (P || (P = Promise))(function (resolve, reject) {
17452
17534
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -17459,7 +17541,7 @@ var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments,
17459
17541
  * @private
17460
17542
  */
17461
17543
  const PeoplePaneContent = (props) => {
17462
- const { callAdapter, chatAdapter, inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings } = props;
17544
+ const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings, onRemoveParticipant } = props;
17463
17545
  const participantListDefaultProps = usePropsFor$1(ParticipantList);
17464
17546
  const setDrawerMenuItemsForParticipant = React.useMemo(() => {
17465
17547
  return (participant) => {
@@ -17480,13 +17562,13 @@ const PeoplePaneContent = (props) => {
17480
17562
  setDrawerMenuItems
17481
17563
  ]);
17482
17564
  const participantListProps = React.useMemo(() => {
17483
- const onRemoveParticipant = (participantId) => __awaiter$1(void 0, void 0, void 0, function* () { return removeParticipantFromCallWithChat(callAdapter, chatAdapter, participantId); });
17565
+ const onRemoveAParticipant = (participantId) => __awaiter$2(void 0, void 0, void 0, function* () { return onRemoveParticipant(participantId); });
17484
17566
  return Object.assign(Object.assign({}, participantListDefaultProps), {
17485
17567
  // Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
17486
- onRemoveParticipant: props.mobileView ? undefined : onRemoveParticipant,
17568
+ onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
17487
17569
  // We want the drawer menu items to appear when participants in ParticipantList are clicked
17488
17570
  onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined });
17489
- }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, callAdapter, chatAdapter]);
17571
+ }, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, onRemoveParticipant]);
17490
17572
  const participantList = (React__default['default'].createElement(ParticipantListWithHeading, { isMobile: props.mobileView, participantListProps: participantListProps, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, title: props.strings.peoplePaneSubTitle }));
17491
17573
  const theme = react.useTheme();
17492
17574
  const copyLinkButtonStylesThemed = React.useMemo(() => react.concatStyleSets(copyLinkButtonStyles, {
@@ -17506,28 +17588,20 @@ const PeoplePaneContent = (props) => {
17506
17588
  React__default['default'].createElement(react.DefaultButton, { text: strings.copyInviteLinkButtonLabel, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "Link", style: linkIconStyles }), onClick: () => copy__default['default'](inviteLink), styles: copyLinkButtonStylesThemed }))),
17507
17589
  participantList));
17508
17590
  };
17509
- /**
17510
- * In a CallWithChat when a participant is removed, we must remove them from both
17511
- * the call and the chat thread.
17512
- */
17513
- const removeParticipantFromCallWithChat = (callAdapter, chatAdapter, participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
17514
- yield callAdapter.removeParticipant(participantId);
17515
- yield chatAdapter.removeParticipant(participantId);
17516
- });
17517
17591
  /**
17518
17592
  * Create default contextual menu items for particant
17519
17593
  * @param participant - participant to create contextual menu items for
17520
- * @param callWithChatStrings - localized strings for menu item text
17594
+ * @param strings - localized strings for menu item text
17521
17595
  * @param onRemoveParticipant - callback to remove participant
17522
17596
  * @param localParticipantUserId - Local participant user id
17523
17597
  * @returns - IContextualMenuItem[]
17524
17598
  */
17525
- const createDefaultContextualMenuItems = (participant, callWithChatStrings, onRemoveParticipant, localParticipantUserId) => {
17599
+ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId) => {
17526
17600
  const menuItems = [];
17527
17601
  if ((participant === null || participant === void 0 ? void 0 : participant.userId) !== localParticipantUserId) {
17528
17602
  menuItems.push({
17529
17603
  key: 'remove',
17530
- text: callWithChatStrings.removeMenuLabel,
17604
+ text: strings.removeMenuLabel,
17531
17605
  onClick: () => {
17532
17606
  if (participant === null || participant === void 0 ? void 0 : participant.userId) {
17533
17607
  onRemoveParticipant === null || onRemoveParticipant === void 0 ? void 0 : onRemoveParticipant(participant === null || participant === void 0 ? void 0 : participant.userId);
@@ -17613,14 +17687,43 @@ const mobilePaneButtonStyles = {
17613
17687
  },
17614
17688
  labelChecked: { fontWeight: 600 }
17615
17689
  };
17690
+ /**
17691
+ * @private
17692
+ */
17693
+ const hiddenStyles = {
17694
+ root: {
17695
+ display: 'none'
17696
+ }
17697
+ };
17698
+ /**
17699
+ * @private
17700
+ */
17701
+ const sidePaneStyles = {
17702
+ root: {
17703
+ height: '100%',
17704
+ padding: '0.5rem 0.25rem',
17705
+ maxWidth: '21.5rem'
17706
+ }
17707
+ };
17708
+ /**
17709
+ * @private
17710
+ */
17711
+ const availableSpaceStyles = { root: { width: '100%', height: '100%' } };
17712
+ /**
17713
+ * @private
17714
+ */
17715
+ const sidePaneTokens = {
17716
+ childrenGap: '0.5rem'
17717
+ };
17616
17718
 
17617
17719
  // Copyright (c) Microsoft Corporation.
17618
17720
  /**
17619
17721
  * @private
17620
17722
  */
17621
17723
  const TabHeader = (props) => {
17724
+ const { onClose, onChatButtonClicked, onPeopleButtonClicked, activeTab, strings } = props;
17622
17725
  const theme = useTheme();
17623
- const haveMultipleTabs = props.onChatButtonClicked && props.onPeopleButtonClicked;
17726
+ const haveMultipleTabs = onChatButtonClicked && onPeopleButtonClicked;
17624
17727
  const mobilePaneButtonStylesThemed = React.useMemo(() => {
17625
17728
  return react.concatStyleSets(mobilePaneButtonStyles, {
17626
17729
  root: {
@@ -17638,15 +17741,50 @@ const TabHeader = (props) => {
17638
17741
  }
17639
17742
  : {});
17640
17743
  }, [theme, haveMultipleTabs]);
17641
- const strings = useCallWithChatCompositeStrings();
17642
17744
  return (React__default['default'].createElement(react.Stack, { horizontal: true, grow: true, styles: mobilePaneControlBarStyle },
17643
- React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick: props.onClose, styles: mobilePaneBackButtonStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }), autoFocus: true }),
17644
- React__default['default'].createElement(react.Stack.Item, { grow: true }, props.onChatButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: props.onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: props.activeTab === 'chat', role: 'tab' }, strings.chatButtonLabel))),
17645
- React__default['default'].createElement(react.Stack.Item, { grow: true }, props.onPeopleButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: props.onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: props.activeTab === 'people', role: 'tab' }, strings.peopleButtonLabel))),
17745
+ React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick: onClose, styles: mobilePaneBackButtonStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }), autoFocus: true }),
17746
+ React__default['default'].createElement(react.Stack.Item, { grow: true }, onChatButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'chat', role: 'tab' }, strings.chatButtonLabel))),
17747
+ React__default['default'].createElement(react.Stack.Item, { grow: true }, onPeopleButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'people', role: 'tab' }, strings.peopleButtonLabel))),
17646
17748
  React__default['default'].createElement(react.DefaultButton, { styles: mobilePaneHiddenIconStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }) })));
17647
17749
  };
17648
17750
 
17649
17751
  // Copyright (c) Microsoft Corporation.
17752
+ /**
17753
+ * @private
17754
+ */
17755
+ // Use document.getElementById until Fluent's Stack supports componentRef property: https://github.com/microsoft/fluentui/issues/20410
17756
+ const useMinMaxDragPosition = (modalLayerHostId, rtl) => {
17757
+ const modalHostRef = React.useRef(document.getElementById(modalLayerHostId));
17758
+ const modalHostWidth = _useContainerWidth(modalHostRef);
17759
+ const modalHostHeight = _useContainerHeight(modalHostRef);
17760
+ const minDragPosition = React.useMemo(() => modalHostWidth === undefined
17761
+ ? undefined
17762
+ : {
17763
+ x: rtl
17764
+ ? -1 * MODAL_PIP_DEFAULT_PX.rightPositionPx
17765
+ : MODAL_PIP_DEFAULT_PX.rightPositionPx - modalHostWidth + MODAL_PIP_DEFAULT_PX.widthPx,
17766
+ y: -1 * MODAL_PIP_DEFAULT_PX.topPositionPx
17767
+ }, [modalHostWidth, rtl]);
17768
+ const maxDragPosition = React.useMemo(() => modalHostWidth === undefined || modalHostHeight === undefined
17769
+ ? undefined
17770
+ : {
17771
+ x: rtl
17772
+ ? modalHostWidth - MODAL_PIP_DEFAULT_PX.rightPositionPx - MODAL_PIP_DEFAULT_PX.widthPx
17773
+ : MODAL_PIP_DEFAULT_PX.rightPositionPx,
17774
+ y: modalHostHeight - MODAL_PIP_DEFAULT_PX.topPositionPx - MODAL_PIP_DEFAULT_PX.heightPx
17775
+ }, [modalHostHeight, modalHostWidth, rtl]);
17776
+ return { minDragPosition: minDragPosition, maxDragPosition: maxDragPosition };
17777
+ };
17778
+
17779
+ var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17780
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17781
+ return new (P || (P = Promise))(function (resolve, reject) {
17782
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17783
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17784
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17785
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17786
+ });
17787
+ };
17650
17788
  /**
17651
17789
  * Pane that is used to store chat and people for CallWithChat composite
17652
17790
  * @private
@@ -17657,7 +17795,7 @@ const CallWithChatPane = (props) => {
17657
17795
  const paneStyles = hidden ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
17658
17796
  const callWithChatStrings = useCallWithChatCompositeStrings();
17659
17797
  const theme = useTheme();
17660
- const header = props.activePane === 'none' ? null : props.mobileView ? (React__default['default'].createElement(TabHeader, Object.assign({}, props, { activeTab: props.activePane }))) : (React__default['default'].createElement(SidePaneHeader, Object.assign({}, props, { headingText: props.activePane === 'chat'
17798
+ const header = props.activePane === 'none' ? null : props.mobileView ? (React__default['default'].createElement(TabHeader, Object.assign({}, props, { strings: callWithChatStrings, activeTab: props.activePane }))) : (React__default['default'].createElement(SidePaneHeader, Object.assign({}, props, { strings: callWithChatStrings, headingText: props.activePane === 'chat'
17661
17799
  ? callWithChatStrings.chatPaneTitle
17662
17800
  : props.activePane === 'people'
17663
17801
  ? callWithChatStrings.peoplePaneTitle
@@ -17669,25 +17807,17 @@ const CallWithChatPane = (props) => {
17669
17807
  /* @conditional-compile-remove(file-sharing) */
17670
17808
  fileSharing: props.fileSharing
17671
17809
  }, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })));
17810
+ /**
17811
+ * In a CallWithChat when a participant is removed, we must remove them from both
17812
+ * the call and the chat thread.
17813
+ */
17814
+ const removeParticipantFromCallWithChat = (participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
17815
+ yield props.callAdapter.removeParticipant(participantId);
17816
+ yield props.chatAdapter.removeParticipant(participantId);
17817
+ });
17672
17818
  const peopleContent = (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
17673
- React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
17674
- // Use document.getElementById until Fluent's Stack supports componentRef property: https://github.com/microsoft/fluentui/issues/20410
17675
- const modalLayerHostElement = document.getElementById(props.modalLayerHostId);
17676
- const modalHostRef = React.useRef(modalLayerHostElement);
17677
- const modalHostWidth = _useContainerWidth(modalHostRef);
17678
- const modalHostHeight = _useContainerHeight(modalHostRef);
17679
- const minDragPosition = React.useMemo(() => modalHostWidth === undefined
17680
- ? undefined
17681
- : {
17682
- x: props.rtl ? -1 * modalPipRightPositionPx : modalPipRightPositionPx - modalHostWidth + modalPipWidthPx,
17683
- y: -1 * modalPipTopPositionPx
17684
- }, [modalHostWidth, props.rtl]);
17685
- const maxDragPosition = React.useMemo(() => modalHostWidth === undefined || modalHostHeight === undefined
17686
- ? undefined
17687
- : {
17688
- x: props.rtl ? modalHostWidth - modalPipRightPositionPx - modalPipWidthPx : modalPipRightPositionPx,
17689
- y: modalHostHeight - modalPipTopPositionPx - modalPipHeightPx
17690
- }, [modalHostHeight, modalHostWidth, props.rtl]);
17819
+ React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { onRemoveParticipant: removeParticipantFromCallWithChat, setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
17820
+ const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);
17691
17821
  const pipStyles = React.useMemo(() => getPipStyles(theme), [theme]);
17692
17822
  const dataUiId = props.activePane === 'chat'
17693
17823
  ? 'call-with-chat-composite-chat-pane'
@@ -17701,37 +17831,10 @@ const CallWithChatPane = (props) => {
17701
17831
  React__default['default'].createElement(react.Stack.Item, { verticalFill: true, styles: scrollableContainerContents },
17702
17832
  React__default['default'].createElement(react.Stack, { styles: props.activePane === 'chat' ? availableSpaceStyles : hiddenStyles }, chatContent),
17703
17833
  React__default['default'].createElement(react.Stack, { styles: props.activePane === 'people' ? availableSpaceStyles : hiddenStyles }, peopleContent)))),
17704
- props.mobileView && (React__default['default'].createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minDragPosition, maxDragPosition: maxDragPosition })),
17834
+ props.mobileView && (React__default['default'].createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition })),
17705
17835
  drawerMenuItems.length > 0 && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles },
17706
17836
  React__default['default'].createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
17707
17837
  };
17708
- const hiddenStyles = {
17709
- root: {
17710
- display: 'none'
17711
- }
17712
- };
17713
- const sidePaneStyles = {
17714
- root: {
17715
- height: '100%',
17716
- padding: '0.5rem 0.25rem',
17717
- maxWidth: '21.5rem'
17718
- }
17719
- };
17720
- const availableSpaceStyles = { root: { width: '100%', height: '100%' } };
17721
- const sidePaneTokens = {
17722
- childrenGap: '0.5rem'
17723
- };
17724
- const modalPipRightPositionPx = 16;
17725
- const modalPipTopPositionPx = 52;
17726
- const modalPipWidthPx = 88;
17727
- const modalPipHeightPx = 128;
17728
- const getPipStyles = (theme) => ({
17729
- modal: {
17730
- main: Object.assign(Object.assign({ borderRadius: theme.effects.roundedCorner4, boxShadow: theme.effects.elevation8,
17731
- // Above the message thread / people pane.
17732
- zIndex: 2 }, (theme.rtl ? { left: _pxToRem(modalPipRightPositionPx) } : { right: _pxToRem(modalPipRightPositionPx) })), { top: _pxToRem(modalPipTopPositionPx) })
17733
- }
17734
- });
17735
17838
 
17736
17839
  // Copyright (c) Microsoft Corporation.
17737
17840
  const CallWithChatScreen = (props) => {