@azure/communication-react 1.19.0-alpha-202408010015 → 1.19.0-alpha-202408030014

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 (105) hide show
  1. package/dist/communication-react.d.ts +39 -32
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-B0zbyF6Z.js → ChatMessageComponentAsRichTextEditBox-BBTJIosO.js} +52 -33
  3. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BBTJIosO.js.map +1 -0
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BVOysnsq.js → RichTextSendBoxWrapper-C1Ev6MKx.js} +3 -3
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BVOysnsq.js.map → RichTextSendBoxWrapper-C1Ev6MKx.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-YIP5Cyt3.js → index-B74o7NiP.js} +587 -280
  7. package/dist/dist-cjs/communication-react/index-B74o7NiP.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +2 -2
  9. package/dist/dist-esm/acs-ui-common/src/constants.d.ts +5 -0
  10. package/dist/dist-esm/acs-ui-common/src/constants.js +6 -0
  11. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/index.d.ts +1 -0
  13. package/dist/dist-esm/acs-ui-common/src/index.js +2 -0
  14. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  15. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  16. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -0
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +31 -9
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +5 -1
  21. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +6 -2
  22. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  23. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -1
  24. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  25. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +6 -1
  26. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  27. package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
  28. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +3 -3
  30. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +3 -3
  32. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +3 -3
  34. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +53 -32
  35. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  36. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +3 -3
  37. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +2 -2
  38. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +6 -6
  40. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +18 -6
  42. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -3
  43. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  44. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +2 -2
  45. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +18 -34
  46. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +14 -0
  48. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +56 -0
  49. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +1 -0
  50. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +1 -1
  51. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +10 -16
  52. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +2 -2
  54. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +85 -8
  55. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +2 -2
  57. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +16 -27
  59. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +33 -35
  60. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  61. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +5 -1
  62. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js +15 -12
  63. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js.map +1 -1
  64. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +9 -0
  65. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +7 -1
  66. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  67. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +4 -0
  68. package/dist/dist-esm/react-components/src/components/VideoGallery.js +4 -4
  69. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  70. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -1
  71. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +3 -1
  73. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +34 -0
  75. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +121 -0
  76. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -1
  77. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +15 -13
  78. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +42 -32
  79. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -0
  81. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +2 -0
  82. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +6 -1
  84. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +3 -0
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js +19 -6
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +21 -12
  90. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +5 -5
  92. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +61 -31
  93. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -1
  94. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +32 -2
  95. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +3 -3
  96. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +5 -0
  98. package/dist/dist-esm/react-composites/src/composites/common/constants.js +6 -0
  99. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  100. package/package.json +6 -6
  101. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-B0zbyF6Z.js.map +0 -1
  102. package/dist/dist-cjs/communication-react/index-YIP5Cyt3.js.map +0 -1
  103. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.d.ts +0 -22
  104. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.js +0 -44
  105. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.js.map +0 -1
@@ -16,12 +16,12 @@ var textareaCaretTs = require('textarea-caret-ts');
16
16
  var useDebounce = require('use-debounce');
17
17
  var reactFileTypeIcons = require('@fluentui/react-file-type-icons');
18
18
  var react$1 = require('@griffel/react');
19
+ var uuid = require('uuid');
19
20
  var roosterjsContentModelCore = require('roosterjs-content-model-core');
20
21
  var roosterjsContentModelDom = require('roosterjs-content-model-dom');
21
22
  var roosterjsContentModelPlugins = require('roosterjs-content-model-plugins');
22
23
  var roosterjsContentModelApi = require('roosterjs-content-model-api');
23
24
  var reactChat = require('@fluentui-contrib/react-chat');
24
- var uuid = require('uuid');
25
25
  var parse = require('html-react-parser');
26
26
  var Linkify = require('react-linkify');
27
27
  var DOMPurify = require('dompurify');
@@ -189,7 +189,7 @@ function getDefaultExportFromCjs (x) {
189
189
  // Copyright (c) Microsoft Corporation.
190
190
  // Licensed under the MIT License.
191
191
  // GENERATED FILE. DO NOT EDIT MANUALLY.
192
- var telemetryVersion = '1.19.0-alpha-202408010015';
192
+ var telemetryVersion = '1.19.0-alpha-202408030014';
193
193
 
194
194
 
195
195
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -400,6 +400,19 @@ const removeImageTags = (event) => {
400
400
  });
401
401
  };
402
402
 
403
+ // Copyright (c) Microsoft Corporation.
404
+ // Licensed under the MIT License.
405
+ /**
406
+ * Default max listeners for use with {@link EventEmitter.setMaxListeners} function
407
+ * @internal
408
+ */
409
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
410
+ /**
411
+ * The key for the rich text editor inline image file name attribute
412
+ * @internal
413
+ */
414
+ const _IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY = 'data-image-file-name';
415
+
403
416
  // Copyright (c) Microsoft Corporation.
404
417
  // Licensed under the MIT License.
405
418
  /**
@@ -1817,7 +1830,12 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
1817
1830
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
1818
1831
  onDeleteImage: function (imageId) {
1819
1832
  return __awaiter$T(this, void 0, void 0, function* () {
1820
- yield chatThreadClient.deleteImage(imageId);
1833
+ try {
1834
+ yield chatThreadClient.deleteImage(imageId);
1835
+ }
1836
+ catch (e) {
1837
+ console.log(`Error deleting image message: ${e}`);
1838
+ }
1821
1839
  return;
1822
1840
  });
1823
1841
  },
@@ -1990,7 +2008,7 @@ const typingIndicatorStringStyle = react.mergeStyles({
1990
2008
  wordBreak: 'break-word'
1991
2009
  });
1992
2010
 
1993
- var participantItem$k={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed participant",participantStateRinging:"Calling...",participantStateHold:"On hold",attendeeRole:"Attendee"};var ParticipantList$l={overflowParticipantCount:"+{overflowCount} more"};var typingIndicator$k={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"File is uploading, please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",attachmentMoreMenu:"More Options"};var richTextSendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"File is uploading, please wait.",imageUploadsPendingError:"Image is uploading, please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options",attachmentMoreMenu:"More Options",richTextNewBulletedListItemAnnouncement:"Bullet, new line",richTextNewNumberedListItemAnnouncement:"{0}, new line",richTextBulletedListAppliedAnnouncement:"Bulleted list applied",richTextNumberedListAppliedAnnouncement:"Numbered list applied"};var mentionPopover$k={mentionPopoverHeader:"Suggestions"};var imageOverlay$k={downloadButtonLabel:"Download",dismissButtonAriaLabel:"Close"};var messageStatusIndicator$k={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$k={label:"Leave",tooltipContent:"Leave call",leaveOption:"Leave",endCallOption:"End call for everyone"};var cameraButton$k={onLabel:"Camera",offLabel:"Camera",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off",onSplitButtonPrimaryActionCamera:"Turn off camera",offSplitButtonPrimaryActionCamera:"Turn on camera",cameraPrimaryActionSplitButtonTitle:"Use camera",videoEffectsMenuItemTitle:"Effects"};var microphoneButton$k={onLabel:"Mic",offLabel:"Mic",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off",offSplitButtonMicrophonePrimaryAction:"Unmute microphone",onSplitButtonMicrophonePrimaryAction:"Mute microphone",microphonePrimaryActionSplitButtonTitle:"Use microphone"};var devicesButton$k={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose audio device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker"};var participantsButton$k={label:"People",tooltipContent:"Show participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied"};var screenShareButton$k={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var raiseHandButton$k={offLabel:"Raise",onLabel:"Lower",tooltipDisabledContent:"Raise Hand action is disabled",tooltipOnContent:"Lower Hand",tooltipOffContent:"Raise Hand"};var reactionButton$k={label:"React",ariaLabel:"React Button, Send a reaction",tooltipDisabledContent:"Reaction action is disabled",tooltipContent:"Send a reaction",likeReactionTooltipContent:"Like",heartReactionTooltipContent:"Love",laughReactionTooltipContent:"Laugh",applauseReactionTooltipContent:"Applause",surprisedReactionTooltipContent:"Surprised"};var messageThread$k={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{status} {author} said {message}",messageContentMineAriaText:"{status} You said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Done",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadAttachment:"Download file",openAttachment:"Open file",blockedWarningText:"This message was deleted due to organizational policy.",blockedWarningLinkText:"Details",attachmentCardGroupMessage:"The message has {attachmentCount} attachment",messageDeletedAnnouncementAriaLabel:"The message is deleted",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options",attachmentUploadsPendingError:"File is uploading, please wait.",imageUploadsPendingError:"Image is uploading, please wait.",richTextNewBulletedListItemAnnouncement:"Bullet, new line",richTextNewNumberedListItemAnnouncement:"{0}, new line",richTextBulletedListAppliedAnnouncement:"Bulleted list applied",richTextNumberedListAppliedAnnouncement:"Numbered list applied"};var errorBar$k={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"There was an issue starting screen share.",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",teamsMeetingCallNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneAccessDeniedSafari:"Unable to access microphone. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAccessDeniedSafari:"Unable to access camera. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link.",cameraFrozenForRemoteParticipants:"Users in the call are having issues seeing your video. Please check your devices and network.",unableToStartVideoEffect:"Unable to apply video effect.",startSpotlightWhileMaxParticipantsAreSpotlighted:"Cannot start spotlight on participant(s) because the maximum number of participants are already spotlighted.",mutedByRemoteParticipant:"You were muted by another participant."};var notificationStack$k={callingNetworkFailure:{title:"Troubling connecting call",message:"You seem to be offline. Please check your network connection and try again.",dismissButtonAriaLabel:"Close"},startVideoGeneric:{title:"Failed to start video.",dismissButtonAriaLabel:"Close"},stopVideoGeneric:{title:"Failed to stop video.",dismissButtonAriaLabel:"Close"},muteGeneric:{title:"Failed to mute microphone.",dismissButtonAriaLabel:"Close"},unmuteGeneric:{title:"Failed to unmute microphone.",dismissButtonAriaLabel:"Close"},speakingWhileMuted:{title:"You're muted.",dismissButtonAriaLabel:"Close"},startScreenShareGeneric:{title:"There was an issue starting screen share.",dismissButtonAriaLabel:"Close"},stopScreenShareGeneric:{title:"Failed to stop screen sharing.",dismissButtonAriaLabel:"Close"},callNetworkQualityLow:{title:"Network quality is low.",dismissButtonAriaLabel:"Close"},teamsMeetingCallNetworkQualityLow:{title:"Network quality is low.",dismissButtonAriaLabel:"Close",message:"Join this call from your phone for better sound. You can continue viewing the meeting on this device.",primaryButtonLabel:"Join by Phone"},callNoSpeakerFound:{title:"No speakers or headphones found",message:"Connect an audio device to hear the call.",dismissButtonAriaLabel:"Close"},callNoMicrophoneFound:{title:"No microphones found",message:"Connect an audio input device.",dismissButtonAriaLabel:"Close"},callMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Click the lock in the address bar to grant permission to this webpage.",dismissButtonAriaLabel:"Close"},callMicrophoneAccessDeniedSafari:{title:"Unable to access microphone",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",dismissButtonAriaLabel:"Close"},callMicrophoneMutedBySystem:{title:"You are muted by your system.",dismissButtonAriaLabel:"Close"},callMicrophoneUnmutedBySystem:{title:"Your microphone recovered and you were unmuted by your system.",dismissButtonAriaLabel:"Close"},callMacOsMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Grant microphone permission in your macOS privacy settings.",dismissButtonAriaLabel:"Close"},callLocalVideoFreeze:{title:"Network bandwidth is poor",message:"Your video may appear paused for others on the call.",dismissButtonAriaLabel:"Close"},callCameraAccessDenied:{title:"Unable to access camera",message:"Click the lock in the address bar to grant permission to this webpage.",dismissButtonAriaLabel:"Close"},callCameraAccessDeniedSafari:{title:"Unable to access camera",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",dismissButtonAriaLabel:"Close"},callCameraAlreadyInUse:{title:"Unable to access camera",message:"It may already be in use by another application.",dismissButtonAriaLabel:"Close"},callVideoStoppedBySystem:{title:"Your video has been stopped by your system.",dismissButtonAriaLabel:"Close"},callVideoRecoveredBySystem:{title:"Your video has resumed.",dismissButtonAriaLabel:"Close"},callMacOsCameraAccessDenied:{title:"MacOS is blocking access to your camera",message:"Update your privacy settings to allow this browser to access your camera.",dismissButtonAriaLabel:"Close"},callMacOsScreenShareAccessDenied:{title:"MacOS is blocking screen sharing",message:"Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close"},failedToJoinCallGeneric:{title:"Failed to join call.",dismissButtonAriaLabel:"Close"},failedToJoinCallInvalidMeetingLink:{title:"Unable to join Meeting. Invalid Link.",dismissButtonAriaLabel:"Close"},cameraFrozenForRemoteParticipants:{title:"Users in the call are having issues seeing your video",message:"Please check your devices and network.",dismissButtonAriaLabel:"Close"},unableToStartVideoEffect:{title:"Unable to apply video effect.",dismissButtonAriaLabel:"Close"},startSpotlightWhileMaxParticipantsAreSpotlighted:{title:"Cannot start spotlight on participant(s)",message:"The maximum number of participants are already spotlighted.",dismissButtonAriaLabel:"Close"},mutedByRemoteParticipant:{title:"You were muted by another participant.",dismissButtonAriaLabel:"Close"},recordingStarted:{title:"Recording has started.",message:"By joining, you are giving consent for this meeting to be transcribed.",dismissButtonAriaLabel:"Close"},transcriptionStarted:{title:"Transcription has started.",message:"By joining, you are giving consent for this meeting to be transcribed.",dismissButtonAriaLabel:"Close"},recordingStopped:{title:"Recording is being saved.",message:"Recording has stopped.",dismissButtonAriaLabel:"Close"},transcriptionStopped:{title:"Transcription is being saved.",message:"Transcription has stopped.",dismissButtonAriaLabel:"Close"},recordingAndTranscriptionStarted:{title:"Recording and transcription have started.",message:"By joining, you are giving consent for this meeting to be transcribed.",dismissButtonAriaLabel:"Close"},recordingAndTranscriptionStopped:{title:"Recording and transcription are being saved.",message:"Recording and transcription have stopped.",dismissButtonAriaLabel:"Close"},recordingStoppedStillTranscribing:{title:"Recording has stopped.",message:"You are now only transcribing this meeting.",dismissButtonAriaLabel:"Close"},transcriptionStoppedStillRecording:{title:"Transcription has stopped.",message:"You are now only recording this meeting.",dismissButtonAriaLabel:"Close"}};var videoGallery$k={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoMovementAriaLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed participant",fitRemoteParticipantToFrame:"Fit to frame",fillRemoteParticipantFrame:"Fill frame",pinParticipantForMe:"Pin for me",pinParticipantForMeLimitReached:"Pin (limit reached)",unpinParticipantForMe:"Unpin",pinParticipantMenuItemAriaLabel:"Pin {participantName}",unpinParticipantMenuItemAriaLabel:"Unpin {participantName}",pinnedParticipantAnnouncementAriaLabel:"Pinned {participantName}",unpinnedParticipantAnnouncementAriaLabel:"Unpinned {participantName}",startSpotlightVideoTileMenuLabel:"Spotlight for everyone",addSpotlightVideoTileMenuLabel:"Add spotlight",spotlightLimitReachedMenuTitle:"Spotlight limit reached",stopSpotlightVideoTileMenuLabel:"Stop spotlighting",stopSpotlightOnSelfVideoTileMenuLabel:"Exit spotlight",attendeeRole:"Attendee",muteParticipantMenuItemLabel:"Mute"};var dialpad$k={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton$k={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile$k={participantStateRinging:"Calling...",participantStateHold:"On hold",moreOptionsButtonAriaLabel:"More Options"};var CameraAndMicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera and microphone",secondaryText:"This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Allow camera and microphone access"};var CameraSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera",secondaryText:"This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Allow camera access"};var MicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your microphone",secondaryText:"This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Allow microphone access"};var CameraAndMicrophoneSitePermissionsCheck$k={primaryText:"Checking for camera and microphone access",secondaryText:"Allow access if prompted. This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Checking for camera and microphone access. Allow access if prompted."};var CameraSitePermissionsCheck$k={primaryText:"Checking for camera access",secondaryText:"Allow access if prompted. This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Checking for camera access. Allow access if prompted."};var MicrophoneSitePermissionsCheck$k={primaryText:"Checking for microphone access",secondaryText:"Allow access if prompted. This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Checking for microphone access. Allow access if prompted."};var CameraAndMicrophoneSitePermissionsDenied$k={primaryText:"Unable to access camera and microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraAndMicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera and microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDenied$k={primaryText:"Unable to access camera",secondaryText:"Click the lock icon in the address bar to grant camera permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDenied$k={primaryText:"Unable to access microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var UnsupportedBrowser$l={primaryText:"Browser not supported",secondaryText:"Please join this call using a compatible browser.",moreHelpLinkText:"See compatibility requirements"};var UnsupportedBrowserVersion$l={primaryText:"Browser update needed",secondaryText:"To ensure the best call possible, please update your browser and then try joining the call again.",moreHelpLinkText:"See compatibility requirements",continueAnywayButtonText:"Start call without updating"};var UnsupportedOperatingSystem$l={primaryText:"Operating system not supported",secondaryText:"Please join this call using a device with a compatible operating system.",moreHelpLinkText:"See compatibility requirements"};var BrowserPermissionDenied$k={primaryText:"Can't use your camera or microphone",secondaryText:"Your browser might not have access to your camera or microphone. To fix this, open System Preferences.",primaryButtonText:"Try again",linkText:"Need help? Get troubleshooting help"};var BrowserPermissionDeniedIOS$k={primaryText:"Allow microphone access to continue",secondaryText:"So other participants can hear you.",primaryButtonText:"Try again",imageAltText:"Microphone and camera device permission location for iOS",linkText:"Need help? Get troubleshooting help",step1Text:"Go to the Settings app",step2Text:"Scroll down to settings for this browser",step3Text:"Turn on Microphone (Camera optional)",step4Text:"Try joining the call again",step1DigitText:"1",step2DigitText:"2",step3DigitText:"3",step4DigitText:"4"};var verticalGallery$k={leftNavButtonAriaLabel:"previous page",rightNavButtonAriaLabel:"next page"};var meetingConferencePhoneInfo$k={meetingConferencePhoneInfoModalTitle:"Join call from your phone",meetingConferencePhoneInfoModalDialIn:"Dial number",meetingConferencePhoneInfoModalMeetingId:"Enter meeting ID",meetingConferencePhoneInfoModalWait:"Wait to be admitted by organizer",meetingConferencePhoneInfoModalNoPhoneAvailable:"No phone available",meetingConferencePhoneInfoModalTollGeoData:"{country}, {city}",meetingConferencePhoneInfoModalTollFree:"(Toll-free)",meetingConferencePhoneInfoModalToll:"(Toll)"};var IncomingCallNotification$l={incomingCallNotificationPlaceholderId:"Unknown User",incomingCallNotificationPlaceholderAlert:"{callerName} is calling",incomingCallNoticicationAcceptWithAudioAriaLabel:"Accept with audio",incomingCallNoticicationAcceptWithVideoAriaLabel:"Accept with video",incomingCallNoticicationRejectAriaLabel:"Reject",incomingCallNotificationAcceptButtonLabel:"Accept",incomingCallNotificationRejectButtonLabel:"Decline",incomingCallNotificationAccceptWithVideoButtonLabel:"Accept with Video"};var en_US$1 = {participantItem:participantItem$k,ParticipantList:ParticipantList$l,typingIndicator:typingIndicator$k,sendBox:sendBox$k,richTextSendBox:richTextSendBox$k,mentionPopover:mentionPopover$k,imageOverlay:imageOverlay$k,messageStatusIndicator:messageStatusIndicator$k,endCallButton:endCallButton$k,cameraButton:cameraButton$k,microphoneButton:microphoneButton$k,devicesButton:devicesButton$k,participantsButton:participantsButton$k,screenShareButton:screenShareButton$k,raiseHandButton:raiseHandButton$k,reactionButton:reactionButton$k,messageThread:messageThread$k,errorBar:errorBar$k,notificationStack:notificationStack$k,videoGallery:videoGallery$k,dialpad:dialpad$k,holdButton:holdButton$k,videoTile:videoTile$k,CameraAndMicrophoneSitePermissionsRequest:CameraAndMicrophoneSitePermissionsRequest$k,CameraSitePermissionsRequest:CameraSitePermissionsRequest$k,MicrophoneSitePermissionsRequest:MicrophoneSitePermissionsRequest$k,CameraAndMicrophoneSitePermissionsCheck:CameraAndMicrophoneSitePermissionsCheck$k,CameraSitePermissionsCheck:CameraSitePermissionsCheck$k,MicrophoneSitePermissionsCheck:MicrophoneSitePermissionsCheck$k,CameraAndMicrophoneSitePermissionsDenied:CameraAndMicrophoneSitePermissionsDenied$k,CameraAndMicrophoneSitePermissionsDeniedSafari:CameraAndMicrophoneSitePermissionsDeniedSafari$k,CameraSitePermissionsDenied:CameraSitePermissionsDenied$k,MicrophoneSitePermissionsDenied:MicrophoneSitePermissionsDenied$k,CameraSitePermissionsDeniedSafari:CameraSitePermissionsDeniedSafari$k,MicrophoneSitePermissionsDeniedSafari:MicrophoneSitePermissionsDeniedSafari$k,UnsupportedBrowser:UnsupportedBrowser$l,UnsupportedBrowserVersion:UnsupportedBrowserVersion$l,UnsupportedOperatingSystem:UnsupportedOperatingSystem$l,BrowserPermissionDenied:BrowserPermissionDenied$k,BrowserPermissionDeniedIOS:BrowserPermissionDeniedIOS$k,verticalGallery:verticalGallery$k,meetingConferencePhoneInfo:meetingConferencePhoneInfo$k,IncomingCallNotification:IncomingCallNotification$l};
2011
+ var participantItem$k={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed participant",participantStateRinging:"Calling...",participantStateHold:"On hold",attendeeRole:"Attendee"};var ParticipantList$l={overflowParticipantCount:"+{overflowCount} more"};var typingIndicator$k={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"File is uploading, please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",attachmentMoreMenu:"More Options"};var richTextSendBox$k={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",attachmentUploadsPendingError:"File is uploading, please wait.",imageUploadsPendingError:"Image is uploading, please wait.",removeAttachment:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options",attachmentMoreMenu:"More Options",richTextNewBulletedListItemAnnouncement:"Bullet, new line",richTextNewNumberedListItemAnnouncement:"{0}, new line",richTextBulletedListAppliedAnnouncement:"Bulleted list applied",richTextNumberedListAppliedAnnouncement:"Numbered list applied"};var mentionPopover$k={mentionPopoverHeader:"Suggestions"};var imageOverlay$k={downloadButtonLabel:"Download",dismissButtonAriaLabel:"Close"};var messageStatusIndicator$k={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$k={label:"Leave",tooltipContent:"Leave call",leaveOption:"Leave",endCallOption:"End call for everyone"};var cameraButton$k={onLabel:"Camera",offLabel:"Camera",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off",onSplitButtonPrimaryActionCamera:"Turn off camera",offSplitButtonPrimaryActionCamera:"Turn on camera",cameraPrimaryActionSplitButtonTitle:"Use camera",videoEffectsMenuItemTitle:"Effects"};var microphoneButton$k={onLabel:"Mic",offLabel:"Mic",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off",offSplitButtonMicrophonePrimaryAction:"Unmute microphone",onSplitButtonMicrophonePrimaryAction:"Mute microphone",microphonePrimaryActionSplitButtonTitle:"Use microphone"};var devicesButton$k={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose audio device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker"};var participantsButton$k={label:"People",tooltipContent:"Show participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied"};var screenShareButton$k={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var raiseHandButton$k={offLabel:"Raise",onLabel:"Lower",tooltipDisabledContent:"Raise Hand action is disabled",tooltipOnContent:"Lower Hand",tooltipOffContent:"Raise Hand"};var reactionButton$k={label:"React",ariaLabel:"React Button, Send a reaction",tooltipDisabledContent:"Reaction action is disabled",tooltipContent:"Send a reaction",likeReactionTooltipContent:"Like",heartReactionTooltipContent:"Love",laughReactionTooltipContent:"Laugh",applauseReactionTooltipContent:"Applause",surprisedReactionTooltipContent:"Surprised"};var messageThread$k={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{status} {author} said {message}",messageContentMineAriaText:"{status} You said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Done",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadAttachment:"Download file",openAttachment:"Open file",blockedWarningText:"This message was deleted due to organizational policy.",blockedWarningLinkText:"Details",attachmentCardGroupMessage:"The message has {attachmentCount} attachment",messageDeletedAnnouncementAriaLabel:"The message is deleted",richTextBoldTooltip:"Bold",richTextItalicTooltip:"Italic",richTextUnderlineTooltip:"Underline",richTextBulletListTooltip:"Bulleted list",richTextNumberListTooltip:"Numbered list",richTextIncreaseIndentTooltip:"Increase indent",richTextDecreaseIndentTooltip:"Decrease indent",richTextInsertTableTooltip:"Insert table",richTextFormatButtonTooltip:"Format",richTextInsertRowOrColumnMenu:"Insert",richTextInsertTableMenuTitle:"Insert {column} x {row} table",richTextInsertRowAboveMenu:"Insert above",richTextInsertRowBelowMenu:"Insert below",richTextInsertColumnLeftMenu:"Insert left",richTextInsertColumnRightMenu:"Insert right",richTextDeleteRowOrColumnMenu:"Delete",richTextDeleteColumnMenu:"Delete column",richTextDeleteRowMenu:"Delete row",richTextDeleteTableMenu:"Delete table",richTextToolbarMoreButtonAriaLabel:"More options",attachmentUploadsPendingError:"File is uploading, please wait.",imageUploadsPendingError:"Image is uploading, please wait.",richTextNewBulletedListItemAnnouncement:"Bullet, new line",richTextNewNumberedListItemAnnouncement:"{0}, new line",richTextBulletedListAppliedAnnouncement:"Bulleted list applied",richTextNumberedListAppliedAnnouncement:"Numbered list applied"};var errorBar$k={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"There was an issue starting screen share.",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",teamsMeetingCallNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneAccessDeniedSafari:"Unable to access microphone. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAccessDeniedSafari:"Unable to access camera. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link.",cameraFrozenForRemoteParticipants:"Users in the call are having issues seeing your video. Please check your devices and network.",unableToStartVideoEffect:"Unable to apply video effect.",startSpotlightWhileMaxParticipantsAreSpotlighted:"Cannot start spotlight on participant(s) because the maximum number of participants are already spotlighted.",mutedByRemoteParticipant:"You were muted by another participant."};var notificationStack$k={callingNetworkFailure:{title:"Troubling connecting call",message:"You seem to be offline. Please check your network connection and try again.",dismissButtonAriaLabel:"Close"},startVideoGeneric:{title:"Failed to start video.",dismissButtonAriaLabel:"Close"},stopVideoGeneric:{title:"Failed to stop video.",dismissButtonAriaLabel:"Close"},muteGeneric:{title:"Failed to mute microphone.",dismissButtonAriaLabel:"Close"},unmuteGeneric:{title:"Failed to unmute microphone.",dismissButtonAriaLabel:"Close"},speakingWhileMuted:{title:"You're muted.",dismissButtonAriaLabel:"Close"},startScreenShareGeneric:{title:"There was an issue starting screen share.",dismissButtonAriaLabel:"Close"},stopScreenShareGeneric:{title:"Failed to stop screen sharing.",dismissButtonAriaLabel:"Close"},callNetworkQualityLow:{title:"Network quality is low.",dismissButtonAriaLabel:"Close"},teamsMeetingCallNetworkQualityLow:{title:"Network quality is low.",dismissButtonAriaLabel:"Close",message:"Join this call from your phone for better sound. You can continue viewing the meeting on this device.",primaryButtonLabel:"Join by Phone"},callNoSpeakerFound:{title:"No speakers or headphones found",message:"Connect an audio device to hear the call.",dismissButtonAriaLabel:"Close"},callNoMicrophoneFound:{title:"No microphones found",message:"Connect an audio input device.",dismissButtonAriaLabel:"Close"},callMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Click the lock in the address bar to grant permission to this webpage.",dismissButtonAriaLabel:"Close"},callMicrophoneAccessDeniedSafari:{title:"Unable to access microphone",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",dismissButtonAriaLabel:"Close"},callMicrophoneMutedBySystem:{title:"You are muted by your system.",dismissButtonAriaLabel:"Close"},callMicrophoneUnmutedBySystem:{title:"Your microphone recovered and you were unmuted by your system.",dismissButtonAriaLabel:"Close"},callMacOsMicrophoneAccessDenied:{title:"Unable to access microphone",message:"Grant microphone permission in your macOS privacy settings.",dismissButtonAriaLabel:"Close"},callLocalVideoFreeze:{title:"Network bandwidth is poor",message:"Your video may appear paused for others on the call.",dismissButtonAriaLabel:"Close"},callCameraAccessDenied:{title:"Unable to access camera",message:"Click the lock in the address bar to grant permission to this webpage.",dismissButtonAriaLabel:"Close"},callCameraAccessDeniedSafari:{title:"Unable to access camera",message:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",dismissButtonAriaLabel:"Close"},callCameraAlreadyInUse:{title:"Unable to access camera",message:"It may already be in use by another application.",dismissButtonAriaLabel:"Close"},callVideoStoppedBySystem:{title:"Your video has been stopped by your system.",dismissButtonAriaLabel:"Close"},callVideoRecoveredBySystem:{title:"Your video has resumed.",dismissButtonAriaLabel:"Close"},callMacOsCameraAccessDenied:{title:"MacOS is blocking access to your camera",message:"Update your privacy settings to allow this browser to access your camera.",dismissButtonAriaLabel:"Close"},callMacOsScreenShareAccessDenied:{title:"MacOS is blocking screen sharing",message:"Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close"},failedToJoinCallGeneric:{title:"Failed to join call.",dismissButtonAriaLabel:"Close"},failedToJoinCallInvalidMeetingLink:{title:"Unable to join Meeting. Invalid Link.",dismissButtonAriaLabel:"Close"},cameraFrozenForRemoteParticipants:{title:"Users in the call are having issues seeing your video",message:"Please check your devices and network.",dismissButtonAriaLabel:"Close"},unableToStartVideoEffect:{title:"Unable to apply video effect.",dismissButtonAriaLabel:"Close"},startSpotlightWhileMaxParticipantsAreSpotlighted:{title:"Cannot start spotlight on participant(s)",message:"The maximum number of participants are already spotlighted.",dismissButtonAriaLabel:"Close"},mutedByRemoteParticipant:{title:"You were muted by another participant.",dismissButtonAriaLabel:"Close"},recordingStarted:{title:"Recording has started.",message:"By joining, you are giving consent for this meeting to be transcribed.",dismissButtonAriaLabel:"Close"},transcriptionStarted:{title:"Transcription has started.",message:"By joining, you are giving consent for this meeting to be transcribed.",dismissButtonAriaLabel:"Close"},recordingStopped:{title:"Recording is being saved.",message:"Recording has stopped.",dismissButtonAriaLabel:"Close"},transcriptionStopped:{title:"Transcription is being saved.",message:"Transcription has stopped.",dismissButtonAriaLabel:"Close"},recordingAndTranscriptionStarted:{title:"Recording and transcription have started.",message:"By joining, you are giving consent for this meeting to be transcribed.",dismissButtonAriaLabel:"Close"},recordingAndTranscriptionStopped:{title:"Recording and transcription are being saved.",message:"Recording and transcription have stopped.",dismissButtonAriaLabel:"Close"},recordingStoppedStillTranscribing:{title:"Recording has stopped.",message:"You are now only transcribing this meeting.",dismissButtonAriaLabel:"Close"},transcriptionStoppedStillRecording:{title:"Transcription has stopped.",message:"You are now only recording this meeting.",dismissButtonAriaLabel:"Close"}};var videoGallery$k={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localScreenShareLoadingMessage:"Loading your screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoMovementAriaLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed participant",fitRemoteParticipantToFrame:"Fit to frame",fillRemoteParticipantFrame:"Fill frame",pinParticipantForMe:"Pin for me",pinParticipantForMeLimitReached:"Pin (limit reached)",unpinParticipantForMe:"Unpin",pinParticipantMenuItemAriaLabel:"Pin {participantName}",unpinParticipantMenuItemAriaLabel:"Unpin {participantName}",pinnedParticipantAnnouncementAriaLabel:"Pinned {participantName}",unpinnedParticipantAnnouncementAriaLabel:"Unpinned {participantName}",startSpotlightVideoTileMenuLabel:"Spotlight for everyone",addSpotlightVideoTileMenuLabel:"Add spotlight",spotlightLimitReachedMenuTitle:"Spotlight limit reached",stopSpotlightVideoTileMenuLabel:"Stop spotlighting",stopSpotlightOnSelfVideoTileMenuLabel:"Exit spotlight",attendeeRole:"Attendee",muteParticipantMenuItemLabel:"Mute"};var dialpad$k={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton$k={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile$k={participantStateRinging:"Calling...",participantStateHold:"On hold",moreOptionsButtonAriaLabel:"More Options"};var CameraAndMicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera and microphone",secondaryText:"This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Allow camera and microphone access"};var CameraSitePermissionsRequest$k={primaryText:"Allow {appName} to use your camera",secondaryText:"This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Allow camera access"};var MicrophoneSitePermissionsRequest$k={primaryText:"Allow {appName} to use your microphone",secondaryText:"This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Allow microphone access"};var CameraAndMicrophoneSitePermissionsCheck$k={primaryText:"Checking for camera and microphone access",secondaryText:"Allow access if prompted. This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Checking for camera and microphone access. Allow access if prompted."};var CameraSitePermissionsCheck$k={primaryText:"Checking for camera access",secondaryText:"Allow access if prompted. This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Checking for camera access. Allow access if prompted."};var MicrophoneSitePermissionsCheck$k={primaryText:"Checking for microphone access",secondaryText:"Allow access if prompted. This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Checking for microphone access. Allow access if prompted."};var CameraAndMicrophoneSitePermissionsDenied$k={primaryText:"Unable to access camera and microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraAndMicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera and microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDenied$k={primaryText:"Unable to access camera",secondaryText:"Click the lock icon in the address bar to grant camera permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDenied$k={primaryText:"Unable to access microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDeniedSafari$k={primaryText:"Unable to access camera",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDeniedSafari$k={primaryText:"Unable to access microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var UnsupportedBrowser$l={primaryText:"Browser not supported",secondaryText:"Please join this call using a compatible browser.",moreHelpLinkText:"See compatibility requirements"};var UnsupportedBrowserVersion$l={primaryText:"Browser update needed",secondaryText:"To ensure the best call possible, please update your browser and then try joining the call again.",moreHelpLinkText:"See compatibility requirements",continueAnywayButtonText:"Start call without updating"};var UnsupportedOperatingSystem$l={primaryText:"Operating system not supported",secondaryText:"Please join this call using a device with a compatible operating system.",moreHelpLinkText:"See compatibility requirements"};var BrowserPermissionDenied$k={primaryText:"Can't use your camera or microphone",secondaryText:"Your browser might not have access to your camera or microphone. To fix this, open System Preferences.",primaryButtonText:"Try again",linkText:"Need help? Get troubleshooting help"};var BrowserPermissionDeniedIOS$k={primaryText:"Allow microphone access to continue",secondaryText:"So other participants can hear you.",primaryButtonText:"Try again",imageAltText:"Microphone and camera device permission location for iOS",linkText:"Need help? Get troubleshooting help",step1Text:"Go to the Settings app",step2Text:"Scroll down to settings for this browser",step3Text:"Turn on Microphone (Camera optional)",step4Text:"Try joining the call again",step1DigitText:"1",step2DigitText:"2",step3DigitText:"3",step4DigitText:"4"};var verticalGallery$k={leftNavButtonAriaLabel:"previous page",rightNavButtonAriaLabel:"next page"};var meetingConferencePhoneInfo$k={meetingConferencePhoneInfoModalTitle:"Join call from your phone",meetingConferencePhoneInfoModalDialIn:"Dial number",meetingConferencePhoneInfoModalMeetingId:"Enter meeting ID",meetingConferencePhoneInfoModalWait:"Wait to be admitted by organizer",meetingConferencePhoneInfoModalNoPhoneAvailable:"No phone available",meetingConferencePhoneInfoModalTollGeoData:"{country}, {city}",meetingConferencePhoneInfoModalTollFree:"(Toll-free)",meetingConferencePhoneInfoModalToll:"(Toll)"};var IncomingCallNotification$l={incomingCallNotificationPlaceholderId:"Unknown User",incomingCallNotificationPlaceholderAlert:"{callerName} is calling",incomingCallNoticicationAcceptWithAudioAriaLabel:"Accept with audio",incomingCallNoticicationAcceptWithVideoAriaLabel:"Accept with video",incomingCallNoticicationRejectAriaLabel:"Reject",incomingCallNotificationAcceptButtonLabel:"Accept",incomingCallNotificationRejectButtonLabel:"Decline",incomingCallNotificationAccceptWithVideoButtonLabel:"Accept with Video"};var en_US$1 = {participantItem:participantItem$k,ParticipantList:ParticipantList$l,typingIndicator:typingIndicator$k,sendBox:sendBox$k,richTextSendBox:richTextSendBox$k,mentionPopover:mentionPopover$k,imageOverlay:imageOverlay$k,messageStatusIndicator:messageStatusIndicator$k,endCallButton:endCallButton$k,cameraButton:cameraButton$k,microphoneButton:microphoneButton$k,devicesButton:devicesButton$k,participantsButton:participantsButton$k,screenShareButton:screenShareButton$k,raiseHandButton:raiseHandButton$k,reactionButton:reactionButton$k,messageThread:messageThread$k,errorBar:errorBar$k,notificationStack:notificationStack$k,videoGallery:videoGallery$k,dialpad:dialpad$k,holdButton:holdButton$k,videoTile:videoTile$k,CameraAndMicrophoneSitePermissionsRequest:CameraAndMicrophoneSitePermissionsRequest$k,CameraSitePermissionsRequest:CameraSitePermissionsRequest$k,MicrophoneSitePermissionsRequest:MicrophoneSitePermissionsRequest$k,CameraAndMicrophoneSitePermissionsCheck:CameraAndMicrophoneSitePermissionsCheck$k,CameraSitePermissionsCheck:CameraSitePermissionsCheck$k,MicrophoneSitePermissionsCheck:MicrophoneSitePermissionsCheck$k,CameraAndMicrophoneSitePermissionsDenied:CameraAndMicrophoneSitePermissionsDenied$k,CameraAndMicrophoneSitePermissionsDeniedSafari:CameraAndMicrophoneSitePermissionsDeniedSafari$k,CameraSitePermissionsDenied:CameraSitePermissionsDenied$k,MicrophoneSitePermissionsDenied:MicrophoneSitePermissionsDenied$k,CameraSitePermissionsDeniedSafari:CameraSitePermissionsDeniedSafari$k,MicrophoneSitePermissionsDeniedSafari:MicrophoneSitePermissionsDeniedSafari$k,UnsupportedBrowser:UnsupportedBrowser$l,UnsupportedBrowserVersion:UnsupportedBrowserVersion$l,UnsupportedOperatingSystem:UnsupportedOperatingSystem$l,BrowserPermissionDenied:BrowserPermissionDenied$k,BrowserPermissionDeniedIOS:BrowserPermissionDeniedIOS$k,verticalGallery:verticalGallery$k,meetingConferencePhoneInfo:meetingConferencePhoneInfo$k,IncomingCallNotification:IncomingCallNotification$l};
1994
2012
 
1995
2013
  // Copyright (c) Microsoft Corporation.
1996
2014
  // Licensed under the MIT License.
@@ -5634,33 +5652,41 @@ const isAttachmentUploadCompleted = (attachmentsWithProgress) => {
5634
5652
  return !!(attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.find((attachment) => !attachment.error));
5635
5653
  };
5636
5654
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
5655
+ /**
5656
+ * Check if the content has inline image.
5657
+ * @internal
5658
+ */
5659
+ const hasInlineImageContent = (content) => {
5660
+ const document = new DOMParser().parseFromString(content, 'text/html');
5661
+ return !!document.querySelector('img');
5662
+ };
5663
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
5637
5664
  /**
5638
5665
  * @internal
5666
+ *
5667
+ * @param message - The message content to update.
5668
+ * @param initialInlineImages - The initial inline images that comes with the message before editing.
5669
+ *
5670
+ * @returns The updated message content.
5639
5671
  */
5640
- // Before sending the image, we need to add the image id we get back after uploading the images to the message content.
5641
- const addUploadedImagesToMessage = (message, inlineImages) => __awaiter$Q(void 0, void 0, void 0, function* () {
5672
+ const updateStylesOfInlineImages = (message, initialInlineImages) => __awaiter$Q(void 0, void 0, void 0, function* () {
5642
5673
  if (message === '') {
5643
5674
  return message;
5644
5675
  }
5676
+ const initialInlineImagesIds = initialInlineImages.map((initialInlineImage) => initialInlineImage.id);
5645
5677
  const document = new DOMParser().parseFromString(message !== null && message !== void 0 ? message : '', 'text/html');
5646
5678
  const imagesPromise = Array.from(document.querySelectorAll('img')).map((img) => {
5647
5679
  return new Promise((resolve, rejects) => {
5648
- const uploadInlineImage = inlineImages.find((inlineImage) => !inlineImage.error && (inlineImage.url === img.src || inlineImage.id === img.id));
5649
- // The message might content images that comes with the message before editing, those images are not in the uploadInlineImages array.
5650
- // This function should only modify the message content for images in the uploadInlineImages array.
5651
- if (!uploadInlineImage) {
5680
+ // The message might content images that comes with the message before editing.
5681
+ // This function should only modify the message content for images that are newly added.
5682
+ if (initialInlineImagesIds.includes(img.id)) {
5652
5683
  resolve();
5653
5684
  return;
5654
5685
  }
5655
5686
  const imageElement = new Image();
5656
5687
  imageElement.src = img.src;
5657
5688
  imageElement.onload = () => {
5658
- var _a;
5659
5689
  // imageElement is a copy of original img element, so changes need to be made to the original img element
5660
- img.id = (_a = uploadInlineImage === null || uploadInlineImage === void 0 ? void 0 : uploadInlineImage.id) !== null && _a !== void 0 ? _a : '';
5661
- if (uploadInlineImage === null || uploadInlineImage === void 0 ? void 0 : uploadInlineImage.url) {
5662
- img.src = uploadInlineImage.url;
5663
- }
5664
5690
  img.width = imageElement.width;
5665
5691
  img.height = imageElement.height;
5666
5692
  img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;
@@ -5716,21 +5742,6 @@ hasCompletedAttachmentUploads, hasError, disabled }) => {
5716
5742
  hasError ||
5717
5743
  disabled);
5718
5744
  };
5719
- /* @conditional-compile-remove(rich-text-editor-image-upload) */
5720
- /**
5721
- * @internal
5722
- */
5723
- const cancelInlineImageUpload$1 = (props) => {
5724
- const { imageSrcArray, inlineImages, messageId, editBoxOnCancelInlineImageUpload, sendBoxOnCancelInlineImageUpload } = props;
5725
- if (imageSrcArray && inlineImages && (inlineImages === null || inlineImages === void 0 ? void 0 : inlineImages.length) > 0) {
5726
- inlineImages === null || inlineImages === void 0 ? void 0 : inlineImages.map((inlineImage) => {
5727
- if (inlineImage.url && !(imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.includes(inlineImage.url))) {
5728
- sendBoxOnCancelInlineImageUpload && sendBoxOnCancelInlineImageUpload(inlineImage.id);
5729
- editBoxOnCancelInlineImageUpload && editBoxOnCancelInlineImageUpload(inlineImage.id, messageId || '');
5730
- }
5731
- });
5732
- }
5733
- };
5734
5745
  /* @conditional-compile-remove(file-sharing-acs) */
5735
5746
  /**
5736
5747
  * @internal
@@ -5748,15 +5759,13 @@ const toAttachmentMetadata = (attachmentsWithProgress) => {
5748
5759
  };
5749
5760
  });
5750
5761
  };
5751
- /* @conditional-compile-remove(rich-text-editor-image-upload) */
5752
5762
  /**
5753
5763
  * @internal
5754
5764
  */
5755
- const insertImagesToContentString = (content, inlineImages, onCompleted) => __awaiter$Q(void 0, void 0, void 0, function* () {
5756
- if (!inlineImages || inlineImages.length <= 0) {
5757
- onCompleted === null || onCompleted === void 0 ? void 0 : onCompleted(content);
5758
- }
5759
- const newContent = yield addUploadedImagesToMessage(content, inlineImages !== null && inlineImages !== void 0 ? inlineImages : []);
5765
+ const modifyInlineImagesInContentString = (content, initialInlineImages, onCompleted) => __awaiter$Q(void 0, void 0, void 0, function* () {
5766
+ let newContent = content;
5767
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
5768
+ newContent = yield updateStylesOfInlineImages(content, initialInlineImages);
5760
5769
  onCompleted === null || onCompleted === void 0 ? void 0 : onCompleted(newContent);
5761
5770
  });
5762
5771
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -5785,6 +5794,25 @@ const removeBrokenImageContentAndClearImageSizeStyles = (content) => {
5785
5794
  });
5786
5795
  return document.body.innerHTML;
5787
5796
  };
5797
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
5798
+ /**
5799
+ * @internal
5800
+ */
5801
+ const getContentWithUpdatedInlineImagesInfo = (content, inlineImageWithProgress) => {
5802
+ if (!inlineImageWithProgress || inlineImageWithProgress.length <= 0) {
5803
+ return content;
5804
+ }
5805
+ const document = new DOMParser().parseFromString(content, 'text/html');
5806
+ document.querySelectorAll('img').forEach((img) => {
5807
+ const imageId = img.id;
5808
+ const inlineImage = inlineImageWithProgress.find((image) => !image.error && image.progress === 1 && image.id === imageId);
5809
+ if (inlineImage) {
5810
+ img.id = inlineImage.id;
5811
+ img.src = inlineImage.url || img.src;
5812
+ }
5813
+ });
5814
+ return document.body.innerHTML;
5815
+ };
5788
5816
 
5789
5817
  // Copyright (c) Microsoft Corporation.
5790
5818
  // Licensed under the MIT License.
@@ -6574,7 +6602,9 @@ const richTextEditorWrapperStyle = (theme) => {
6574
6602
  maxWidth: '100%',
6575
6603
  color: theme.palette.neutralPrimary,
6576
6604
  '& img': {
6577
- margin: '0.2rem'
6605
+ margin: '0.2rem',
6606
+ maxWidth: '100% !important', // Remove !important when resolving issue where rooster sets width/height in style attribute incorrectly
6607
+ height: 'auto !important' // Remove !important when resolving issue where rooster sets width/height in style attribute incorrectly
6578
6608
  },
6579
6609
  '& table': {
6580
6610
  background: 'transparent',
@@ -6850,6 +6880,7 @@ var PluginEventType;
6850
6880
  PluginEventType["EditorReady"] = "editorReady";
6851
6881
  PluginEventType["BeforeDispose"] = "beforeDispose";
6852
6882
  PluginEventType["ContentChanged"] = "contentChanged";
6883
+ PluginEventType["BeforeSetContent"] = "beforeSetContent";
6853
6884
  PluginEventType["Input"] = "input";
6854
6885
  PluginEventType["KeyDown"] = "keyDown";
6855
6886
  PluginEventType["BeforePaste"] = "beforePaste";
@@ -6890,7 +6921,128 @@ const dataSetApplier = (format, element, context) => {
6890
6921
  context.defaultFormatAppliers.dataset(format, element, context);
6891
6922
  }
6892
6923
  };
6924
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
6925
+ /**
6926
+ * @internal
6927
+ */
6928
+ const getPreviousInlineImages = (content) => {
6929
+ if (!content) {
6930
+ return [];
6931
+ }
6932
+ const previousInlineImages = [];
6933
+ const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
6934
+ document.querySelectorAll('img').forEach((img) => {
6935
+ const imageAttributes = getInlineImageAttributes(img);
6936
+ previousInlineImages.push(imageAttributes);
6937
+ });
6938
+ return previousInlineImages;
6939
+ };
6940
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
6941
+ /**
6942
+ * @internal
6943
+ */
6944
+ const getRemovedInlineImages = (content, previousInlineImages) => {
6945
+ const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
6946
+ const currentContentIds = Array.from(document.querySelectorAll('img')).map((img) => img.id);
6947
+ previousInlineImages = previousInlineImages === null || previousInlineImages === void 0 ? void 0 : previousInlineImages.filter((img) => !(currentContentIds === null || currentContentIds === void 0 ? void 0 : currentContentIds.includes(img.id)));
6948
+ const removedInlineImages = [...previousInlineImages];
6949
+ return removedInlineImages;
6950
+ };
6951
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
6952
+ /**
6953
+ * @internal
6954
+ */
6955
+ const getInsertedInlineImages = (content, previousInlineImages) => {
6956
+ const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
6957
+ const currentContentInlineImages = Array.from(document.querySelectorAll('img'));
6958
+ const previousContentIds = Array.from(previousInlineImages).map((img) => img.id);
6959
+ // if check is updated, also update getRemovedInlineImages
6960
+ const insertedInlineImages = currentContentInlineImages.filter((img) => !previousContentIds.includes(img.id));
6961
+ return insertedInlineImages;
6962
+ };
6963
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
6964
+ /**
6965
+ * @internal
6966
+ */
6967
+ const getInlineImageAttributes = (image) => {
6968
+ const imageAttributes = {};
6969
+ image.getAttributeNames().forEach((attrName) => {
6970
+ const attrValue = image.getAttribute(attrName);
6971
+ if (attrValue) {
6972
+ imageAttributes[attrName] = attrValue;
6973
+ }
6974
+ });
6975
+ return imageAttributes;
6976
+ };
6977
+ /* @conditional-compile-remove(rich-text-editor) */
6978
+ /**
6979
+ * @internal
6980
+ */
6981
+ /**
6982
+ * Update the scroll position of the editor to ensure the content is visible.
6983
+ */
6984
+ const scrollToBottomRichTextEditor = () => {
6985
+ // Get the current selection in the document
6986
+ const selection = document.getSelection();
6987
+ // Check if a selection exists and it has at least one range
6988
+ if (!selection || selection.rangeCount <= 0) {
6989
+ // If no selection or range, exit the function
6990
+ return;
6991
+ }
6992
+ // Get the first range of the selection
6993
+ // A user can normally only select one range at a time, so the rangeCount will usually be 1
6994
+ const range = selection.getRangeAt(0);
6995
+ // If the common ancestor container of the range is the document itself,
6996
+ // it might mean that the editable element is getting removed from the DOM
6997
+ // In such cases, especially in Safari, trying to modify the range might throw a HierarchyRequest error
6998
+ if (range.commonAncestorContainer === document) {
6999
+ return;
7000
+ }
7001
+ // Create a temporary span element to use as an anchor for scrolling
7002
+ // We can't use the anchor node directly because if it's a Text node, calling scrollIntoView() on it will throw an error
7003
+ const tempElement = document.createElement('span');
7004
+ // Collapse the range to its end point
7005
+ // This means the start and end points of the range will be the same, and it will not contain any content
7006
+ range.collapse(false);
7007
+ // Insert the temporary element at the cursor's position at the end of the range
7008
+ range.insertNode(tempElement);
7009
+ // Scroll the temporary element into view
7010
+ // the element will be aligned at the center of the scroll container, otherwise, text and images may be positioned incorrectly
7011
+ tempElement.scrollIntoView({
7012
+ block: 'center'
7013
+ });
7014
+ tempElement.remove();
7015
+ };
7016
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7017
+ /**
7018
+ * Revoke the blob urls in the removedInlineImages and remove them from the currentLocalBlobMap
7019
+ * @internal
7020
+ */
7021
+ const removeLocalBlobs = (currentLocalBlobMap, removedInlineImages) => {
7022
+ removedInlineImages.forEach((image) => {
7023
+ removeSingleLocalBlob(currentLocalBlobMap, image.id);
7024
+ });
7025
+ };
7026
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7027
+ /**
7028
+ * Revoke all the blob urls in the currentLocalBlobMap and clean up the currentLocalBlobMap
7029
+ * @internal
7030
+ */
7031
+ const cleanAllLocalBlobs = (currentLocalBlobMap) => {
7032
+ Object.keys(currentLocalBlobMap).forEach((imageId) => {
7033
+ removeSingleLocalBlob(currentLocalBlobMap, imageId);
7034
+ });
7035
+ };
7036
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7037
+ const removeSingleLocalBlob = (currentLocalBlobMap, imageId) => {
7038
+ const blobUrl = currentLocalBlobMap[imageId];
7039
+ if (blobUrl) {
7040
+ URL.revokeObjectURL(blobUrl);
7041
+ delete currentLocalBlobMap[imageId];
7042
+ }
7043
+ };
6893
7044
 
7045
+ /* @conditional-compile-remove(rich-text-editor) */
6894
7046
  /**
6895
7047
  * CopyPastePlugin is a plugin for handling copy and paste events in the editor.
6896
7048
  */
@@ -6945,16 +7097,24 @@ const handleInlineImage = (event, onInsertInlineImage) => {
6945
7097
  if (event.eventType === PluginEventType.BeforePaste && event.pasteType === 'normal' && onInsertInlineImage) {
6946
7098
  event.fragment.querySelectorAll('img').forEach((image) => {
6947
7099
  const clipboardImage = event.clipboardData.image;
6948
- const fileName = (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.name) || (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.type.replace('/', '.')) || 'image.png';
7100
+ const fileName = (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.name) ||
7101
+ (clipboardImage === null || clipboardImage === void 0 ? void 0 : clipboardImage.type.replace('/', '.')) ||
7102
+ image.getAttribute(_IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY) ||
7103
+ '';
6949
7104
  // If the image src is an external url, call the onInsertInlineImage callback with the url.
6950
7105
  let imageUrl = image.src;
6951
7106
  if (image.src.startsWith('data:image/')) {
6952
7107
  const blobImage = _base64ToBlob(image.src);
6953
7108
  imageUrl = URL.createObjectURL(blobImage);
6954
7109
  }
6955
- onInsertInlineImage(imageUrl, fileName);
6956
7110
  image.src = imageUrl;
6957
7111
  image.alt = image.alt || 'image';
7112
+ // Assign a unique id to the image element so Contosos can identify the image element.
7113
+ // We also use it internally such as in getRemovedInlineImages to compare images in the content with previous images
7114
+ image.id = uuid.v1();
7115
+ image.dataset.imageFileName = fileName;
7116
+ const imageAttributes = getInlineImageAttributes(image);
7117
+ onInsertInlineImage(imageAttributes);
6958
7118
  });
6959
7119
  }
6960
7120
  };
@@ -6964,36 +7124,8 @@ const handleInlineImage = (event, onInsertInlineImage) => {
6964
7124
  */
6965
7125
  const scrollToBottomAfterContentPaste = (event) => {
6966
7126
  if (event.eventType === PluginEventType.ContentChanged && event.source === ContentChangedEventSource.Paste) {
6967
- // Get the current selection in the document
6968
- const selection = document.getSelection();
6969
- // Check if a selection exists and it has at least one range
6970
- if (!selection || selection.rangeCount <= 0) {
6971
- // If no selection or range, exit the function
6972
- return;
6973
- }
6974
- // Get the first range of the selection
6975
- // A user can normally only select one range at a time, so the rangeCount will usually be 1
6976
- const range = selection.getRangeAt(0);
6977
- // If the common ancestor container of the range is the document itself,
6978
- // it might mean that the editable element is getting removed from the DOM
6979
- // In such cases, especially in Safari, trying to modify the range might throw a HierarchyRequest error
6980
- if (range.commonAncestorContainer === document) {
6981
- return;
6982
- }
6983
- // Create a temporary span element to use as an anchor for scrolling
6984
- // We can't use the anchor node directly because if it's a Text node, calling scrollIntoView() on it will throw an error
6985
- const tempElement = document.createElement('span');
6986
- // Collapse the range to its end point
6987
- // This means the start and end points of the range will be the same, and it will not contain any content
6988
- range.collapse(false);
6989
- // Insert the temporary element at the cursor's position at the end of the range
6990
- range.insertNode(tempElement);
6991
- // Scroll the temporary element into view
6992
- // the element will be aligned at the center of the scroll container, otherwise, text and images may be positioned incorrectly
6993
- tempElement.scrollIntoView({
6994
- block: 'center'
6995
- });
6996
- tempElement.remove();
7127
+ /* @conditional-compile-remove(rich-text-editor) */
7128
+ scrollToBottomRichTextEditor();
6997
7129
  }
6998
7130
  };
6999
7131
 
@@ -7074,11 +7206,9 @@ class UpdateContentPlugin {
7074
7206
  }
7075
7207
  }
7076
7208
  onPluginEvent(event) {
7077
- var _a;
7078
7209
  if (this.onUpdate === null) {
7079
7210
  return;
7080
7211
  }
7081
- let imageSrcArray;
7082
7212
  switch (event.eventType) {
7083
7213
  case PluginEventType.EditorReady:
7084
7214
  this.onUpdate(UpdateEvent.Init);
@@ -7087,21 +7217,16 @@ class UpdateContentPlugin {
7087
7217
  this.onUpdate(UpdateEvent.Dispose);
7088
7218
  break;
7089
7219
  case PluginEventType.ContentChanged:
7090
- if (event.source.toLowerCase() === 'cut' ||
7091
- (event.source.toLowerCase() === 'keyboard' && (event.data === Keys.BACKSPACE || event.data === Keys.DELETE))) {
7092
- imageSrcArray = [];
7093
- (_a = event.contentModel) === null || _a === void 0 ? void 0 : _a.blocks.map((block) => {
7094
- if (block.blockType === 'Paragraph') {
7095
- const segments = block.segments;
7096
- segments.map((segment) => {
7097
- if (segment.segmentType === 'Image') {
7098
- imageSrcArray === null || imageSrcArray === void 0 ? void 0 : imageSrcArray.push(segment.src);
7099
- }
7100
- });
7101
- }
7102
- });
7220
+ if (event.source === roosterjsContentModelDom.ChangeSource.Cut ||
7221
+ // We need to add the paste source here for an edge case:
7222
+ // when user select an image that's already in the editor, then paste in an image to replace the selected one,
7223
+ // we will only get a paste event.
7224
+ // In this case, we need to update the removedInlineImage array to include the replaced image.
7225
+ event.source === roosterjsContentModelDom.ChangeSource.Paste ||
7226
+ (event.source === roosterjsContentModelDom.ChangeSource.Keyboard && (event.data === Keys.BACKSPACE || event.data === Keys.DELETE))) {
7227
+ this.onUpdate(UpdateEvent.ContentChanged, true);
7103
7228
  }
7104
- this.onUpdate(UpdateEvent.ContentChanged, imageSrcArray);
7229
+ this.onUpdate(UpdateEvent.ContentChanged);
7105
7230
  break;
7106
7231
  case PluginEventType.Input:
7107
7232
  this.onUpdate(UpdateEvent.UserInput);
@@ -7750,6 +7875,57 @@ class PlaceholderPlugin extends roosterjsContentModelPlugins.WatermarkPlugin {
7750
7875
  }
7751
7876
  }
7752
7877
 
7878
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7879
+ /**
7880
+ * UndoRedoPlugin is a plugin for additional handling undo and redo events in the editor.
7881
+ */
7882
+ class UndoRedoPlugin {
7883
+ constructor() {
7884
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7885
+ this.editor = null;
7886
+ this.onUpdateContent = null;
7887
+ }
7888
+ getName() {
7889
+ return 'CustomUndoRedoPlugin';
7890
+ }
7891
+ initialize(editor) {
7892
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7893
+ this.editor = editor;
7894
+ }
7895
+ dispose() { }
7896
+ onPluginEvent(event) {
7897
+ // handle when new images are added to the editor because of undo/redo
7898
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7899
+ if (this.editor && event.eventType === PluginEventType.BeforeSetContent && this.onInsertInlineImage) {
7900
+ handleBeforeSetEvent(event, this.editor, this.onInsertInlineImage);
7901
+ }
7902
+ // handle deleted images and updated content
7903
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7904
+ if (this.onUpdateContent &&
7905
+ event.eventType === PluginEventType.ContentChanged &&
7906
+ event.source === roosterjsContentModelDom.ChangeSource.SetContent) {
7907
+ this.onUpdateContent();
7908
+ }
7909
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7910
+ if (this.editor &&
7911
+ !this.editor.isDisposed() &&
7912
+ event.eventType === PluginEventType.ContentChanged &&
7913
+ event.source === roosterjsContentModelDom.ChangeSource.SetContent) {
7914
+ // scroll the editor to the correct position after undo/redo actions
7915
+ scrollToBottomRichTextEditor();
7916
+ }
7917
+ }
7918
+ }
7919
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7920
+ const handleBeforeSetEvent = (event, editor, onInsertInlineImage) => {
7921
+ const currentImagesList = editor.getDocument().querySelectorAll('img');
7922
+ const insertedImages = getInsertedInlineImages(event.newContent, currentImagesList);
7923
+ insertedImages.forEach((image) => {
7924
+ const imageAttributes = getInlineImageAttributes(image);
7925
+ onInsertInlineImage(imageAttributes);
7926
+ });
7927
+ };
7928
+
7753
7929
  // Copyright (c) Microsoft Corporation.
7754
7930
  // Licensed under the MIT License.
7755
7931
  /**
@@ -7768,6 +7944,20 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7768
7944
  const theme = useTheme();
7769
7945
  const [contextMenuProps, setContextMenuProps] = React.useState(null);
7770
7946
  const previousThemeDirection = React.useRef(themeDirection(theme));
7947
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7948
+ // This will be set when the editor is initialized and when the content is updated.
7949
+ const [previousInlineImages, setPreviousInlineImages] = React.useState([]);
7950
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7951
+ const [inlineImageLocalBlobs, setInlineImageLocalBlobs] = React.useState({});
7952
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7953
+ React.useEffect(() => {
7954
+ return () => {
7955
+ // Cleanup Local Blob URLs when the component is unmounted
7956
+ cleanAllLocalBlobs(inlineImageLocalBlobs);
7957
+ };
7958
+ // This effect should only run once when the component is unmounted, so we don't need to add any dependencies
7959
+ // eslint-disable-next-line react-hooks/exhaustive-deps
7960
+ }, []);
7771
7961
  React.useImperativeHandle(ref, () => {
7772
7962
  return {
7773
7963
  focus() {
@@ -7776,6 +7966,10 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7776
7966
  }
7777
7967
  },
7778
7968
  setEmptyContent() {
7969
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7970
+ setPreviousInlineImages([]);
7971
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
7972
+ cleanAllLocalBlobs(inlineImageLocalBlobs);
7779
7973
  if (editor.current) {
7780
7974
  // remove all content from the editor and update the model
7781
7975
  // ContentChanged event will be sent by RoosterJS automatically
@@ -7799,7 +7993,7 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7799
7993
  }
7800
7994
  }
7801
7995
  };
7802
- }, [onContentModelUpdate]);
7996
+ }, [/* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImageLocalBlobs, onContentModelUpdate]);
7803
7997
  const toolbarPlugin = React.useMemo(() => {
7804
7998
  return new RichTextToolbarPlugin();
7805
7999
  }, []);
@@ -7826,9 +8020,27 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7826
8020
  const copyPastePlugin = React.useMemo(() => {
7827
8021
  return new CopyPastePlugin();
7828
8022
  }, []);
8023
+ const onChangeContent = React.useCallback((/* @conditional-compile-remove(rich-text-editor-image-upload) */ shouldUpdateInlineImages) => {
8024
+ if (editor.current === null) {
8025
+ return;
8026
+ }
8027
+ const content = roosterjsContentModelCore.exportContent(editor.current);
8028
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8029
+ let removedInlineImages = [];
8030
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8031
+ if (shouldUpdateInlineImages) {
8032
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8033
+ removedInlineImages = getRemovedInlineImages(content, previousInlineImages);
8034
+ }
8035
+ onChange &&
8036
+ onChange(content, /* @conditional-compile-remove(rich-text-editor-image-upload) */ removedInlineImages);
8037
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8038
+ setPreviousInlineImages(getPreviousInlineImages(content));
8039
+ }, [onChange, /* @conditional-compile-remove(rich-text-editor-image-upload) */ previousInlineImages]);
7829
8040
  React.useEffect(() => {
7830
8041
  // don't set callback in plugin constructor to update callback without plugin recreation
7831
- updatePlugin.onUpdate = (event, imageSrcArray) => {
8042
+ updatePlugin.onUpdate = (event,
8043
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ shouldRemoveInlineImages) => {
7832
8044
  if (editor.current === null) {
7833
8045
  return;
7834
8046
  }
@@ -7836,14 +8048,46 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7836
8048
  onContentModelUpdate && onContentModelUpdate(editor.current.getContentModelCopy('disconnected'));
7837
8049
  }
7838
8050
  else {
7839
- onChange && onChange(roosterjsContentModelCore.exportContent(editor.current), imageSrcArray);
8051
+ const content = roosterjsContentModelCore.exportContent(editor.current);
8052
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8053
+ let removedInlineImages = [];
8054
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8055
+ if (shouldRemoveInlineImages) {
8056
+ removedInlineImages = getRemovedInlineImages(content, previousInlineImages);
8057
+ if (removedInlineImages.length > 0) {
8058
+ removeLocalBlobs(inlineImageLocalBlobs, removedInlineImages);
8059
+ }
8060
+ }
8061
+ onChange &&
8062
+ onChange(content, /* @conditional-compile-remove(rich-text-editor-image-upload) */ removedInlineImages);
8063
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8064
+ setPreviousInlineImages(getPreviousInlineImages(content));
7840
8065
  }
7841
8066
  };
7842
- }, [onChange, onContentModelUpdate, updatePlugin]);
8067
+ }, [
8068
+ onChange,
8069
+ onContentModelUpdate,
8070
+ updatePlugin,
8071
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ previousInlineImages,
8072
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImageLocalBlobs
8073
+ ]);
8074
+ const undoRedoPlugin = React.useMemo(() => {
8075
+ return new UndoRedoPlugin();
8076
+ }, []);
7843
8077
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
7844
8078
  React.useEffect(() => {
7845
- copyPastePlugin.onInsertInlineImage = onInsertInlineImage;
7846
- }, [copyPastePlugin, onInsertInlineImage]);
8079
+ copyPastePlugin.onInsertInlineImage = (imageAttributes) => {
8080
+ const { id, src } = imageAttributes;
8081
+ setInlineImageLocalBlobs(Object.assign(Object.assign({}, inlineImageLocalBlobs), { [id]: src }));
8082
+ onInsertInlineImage && onInsertInlineImage(imageAttributes);
8083
+ };
8084
+ undoRedoPlugin.onInsertInlineImage = onInsertInlineImage;
8085
+ }, [copyPastePlugin, inlineImageLocalBlobs, onInsertInlineImage, undoRedoPlugin]);
8086
+ React.useEffect(() => {
8087
+ undoRedoPlugin.onUpdateContent = () => {
8088
+ onChangeContent(/* @conditional-compile-remove(rich-text-editor-image-upload) */ true);
8089
+ };
8090
+ }, [onChangeContent, undoRedoPlugin]);
7847
8091
  const keyboardInputPlugin = React.useMemo(() => {
7848
8092
  return new KeyboardInputPlugin();
7849
8093
  }, []);
@@ -7895,7 +8139,8 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7895
8139
  shortcutPlugin,
7896
8140
  // contextPlugin and tableEditMenuProvider allow to show insert/delete menu for the table
7897
8141
  contextMenuPlugin,
7898
- tableContextMenuPlugin
8142
+ tableContextMenuPlugin,
8143
+ undoRedoPlugin
7899
8144
  ];
7900
8145
  }, [
7901
8146
  onContextMenuRender,
@@ -7905,7 +8150,8 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7905
8150
  updatePlugin,
7906
8151
  copyPastePlugin,
7907
8152
  toolbarPlugin,
7908
- tableContextMenuPlugin
8153
+ tableContextMenuPlugin,
8154
+ undoRedoPlugin
7909
8155
  ]);
7910
8156
  const announcerStringGetter = React.useCallback((key) => {
7911
8157
  var _a, _b;
@@ -7920,6 +8166,10 @@ const RichTextEditor = React.forwardRef((props, ref) => {
7920
8166
  }, [strings.richTextNewBulletedListItemAnnouncement, strings.richTextNewNumberedListItemAnnouncement]);
7921
8167
  React.useEffect(() => {
7922
8168
  var _a;
8169
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8170
+ const prevInlineImage = getPreviousInlineImages(initialContent);
8171
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8172
+ setPreviousInlineImages(prevInlineImage);
7923
8173
  const initialModel = createEditorInitialModel(initialContent, contentModel);
7924
8174
  if (editorDiv.current) {
7925
8175
  editor.current = new roosterjsContentModelCore.Editor(editorDiv.current, {
@@ -8228,9 +8478,9 @@ const RichTextSendBox = (props) => {
8228
8478
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8229
8479
  onInsertInlineImage,
8230
8480
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8231
- inlineImages,
8481
+ inlineImagesWithProgress,
8232
8482
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8233
- onCancelInlineImageUpload } = props;
8483
+ onRemoveInlineImage } = props;
8234
8484
  const theme = useTheme();
8235
8485
  const locale = useLocale$1();
8236
8486
  const localeStrings = React.useMemo(() => {
@@ -8256,29 +8506,34 @@ const RichTextSendBox = (props) => {
8256
8506
  setContentValue(newValue);
8257
8507
  }, []);
8258
8508
  const onChangeHandler = React.useCallback((newValue,
8259
- /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageSrcArray) => {
8509
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ removedInlineImages) => {
8260
8510
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8261
- cancelInlineImageUpload$1({
8262
- imageSrcArray,
8263
- inlineImages,
8264
- messageId: undefined,
8265
- editBoxOnCancelInlineImageUpload: undefined,
8266
- sendBoxOnCancelInlineImageUpload: onCancelInlineImageUpload
8267
- });
8511
+ removedInlineImages === null || removedInlineImages === void 0 ? void 0 : removedInlineImages.forEach((removedInlineImage) => onRemoveInlineImage && onRemoveInlineImage(removedInlineImage));
8268
8512
  setContent(newValue);
8269
- }, [
8270
- setContent,
8271
- /* @conditional-compile-remove(rich-text-editor-image-upload) */ onCancelInlineImageUpload,
8272
- /* @conditional-compile-remove(rich-text-editor-image-upload) */ inlineImages
8273
- ]);
8513
+ }, [setContent, /* @conditional-compile-remove(rich-text-editor-image-upload) */ onRemoveInlineImage]);
8274
8514
  const hasContent = React.useMemo(() => {
8275
8515
  var _a;
8276
8516
  // get plain text content from the editor to check if the message is empty
8277
8517
  // as the content may contain tags even when the content is empty
8278
8518
  const plainTextContent = (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent();
8279
- return sanitizeText(contentValue !== null && contentValue !== void 0 ? contentValue : '').length > 0 && sanitizeText(plainTextContent !== null && plainTextContent !== void 0 ? plainTextContent : '').length > 0;
8519
+ const hasPlainText = sanitizeText(contentValue !== null && contentValue !== void 0 ? contentValue : '').length > 0 && sanitizeText(plainTextContent !== null && plainTextContent !== void 0 ? plainTextContent : '').length > 0;
8520
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8521
+ const hasInlineImages = hasInlineImageContent(contentValue);
8522
+ return hasPlainText || /* @conditional-compile-remove(rich-text-editor-image-upload) */ hasInlineImages;
8280
8523
  }, [contentValue]);
8281
8524
  const sendMessageOnClick = React.useCallback(() => {
8525
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
8526
+ if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {
8527
+ const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(contentValue, inlineImagesWithProgress);
8528
+ const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);
8529
+ // Set contentValueOverflow state to display the error bar
8530
+ setContentValueOverflow(messageTooLong);
8531
+ // The change from the setContentValueOverflow in the previous line will not kick in yet.
8532
+ // We need to relay on the local value of messageTooLong to return early if the message is too long.
8533
+ if (messageTooLong) {
8534
+ return;
8535
+ }
8536
+ }
8282
8537
  if (disabled || contentValueOverflow) {
8283
8538
  return;
8284
8539
  }
@@ -8286,7 +8541,7 @@ const RichTextSendBox = (props) => {
8286
8541
  /* @conditional-compile-remove(file-sharing-acs) */
8287
8542
  setAttachmentUploadsPendingError(undefined);
8288
8543
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8289
- const hasIncompleteImageUploads = hasIncompleteAttachmentUploads(inlineImages);
8544
+ const hasIncompleteImageUploads = hasIncompleteAttachmentUploads(inlineImagesWithProgress);
8290
8545
  /* @conditional-compile-remove(file-sharing-acs) */
8291
8546
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8292
8547
  if (
@@ -8308,9 +8563,7 @@ const RichTextSendBox = (props) => {
8308
8563
  }
8309
8564
  // we don't want to send empty messages including spaces, newlines, tabs
8310
8565
  // Message can be empty if there is a valid attachment upload
8311
- if (hasContent ||
8312
- /* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments) ||
8313
- /* @conditional-compile-remove(rich-text-editor-image-upload) */ isAttachmentUploadCompleted(inlineImages)) {
8566
+ if (hasContent || /* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments)) {
8314
8567
  const sendMessage = (content) => {
8315
8568
  var _a, _b;
8316
8569
  onSendMessage(content,
@@ -8325,14 +8578,9 @@ const RichTextSendBox = (props) => {
8325
8578
  (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.setEmptyContent();
8326
8579
  (_b = editorComponentRef.current) === null || _b === void 0 ? void 0 : _b.focus();
8327
8580
  };
8328
- /* @conditional-compile-remove(rich-text-editor-image-upload) */
8329
- if (isAttachmentUploadCompleted(inlineImages)) {
8330
- insertImagesToContentString(contentValue, inlineImages, (content) => {
8331
- sendMessage(content);
8332
- });
8333
- return;
8334
- }
8335
- sendMessage(contentValue);
8581
+ modifyInlineImagesInContentString(contentValue, [], (content) => {
8582
+ sendMessage(content);
8583
+ });
8336
8584
  }
8337
8585
  }, [
8338
8586
  disabled,
@@ -8340,7 +8588,7 @@ const RichTextSendBox = (props) => {
8340
8588
  /* @conditional-compile-remove(file-sharing-acs) */
8341
8589
  attachments,
8342
8590
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8343
- inlineImages,
8591
+ inlineImagesWithProgress,
8344
8592
  contentValue,
8345
8593
  hasContent,
8346
8594
  /* @conditional-compile-remove(file-sharing-acs) */
@@ -8358,7 +8606,7 @@ const RichTextSendBox = (props) => {
8358
8606
  /* @conditional-compile-remove(file-sharing-acs) */
8359
8607
  !!((_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error) ||
8360
8608
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8361
- !!((_b = inlineImages === null || inlineImages === void 0 ? void 0 : inlineImages.filter((image) => image.error).pop()) === null || _b === void 0 ? void 0 : _b.error));
8609
+ !!((_b = inlineImagesWithProgress === null || inlineImagesWithProgress === void 0 ? void 0 : inlineImagesWithProgress.filter((image) => image.error).pop()) === null || _b === void 0 ? void 0 : _b.error));
8362
8610
  }, [
8363
8611
  /* @conditional-compile-remove(file-sharing-acs) */
8364
8612
  attachments,
@@ -8367,7 +8615,7 @@ const RichTextSendBox = (props) => {
8367
8615
  attachmentUploadsPendingError,
8368
8616
  systemMessage,
8369
8617
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8370
- inlineImages
8618
+ inlineImagesWithProgress
8371
8619
  ]);
8372
8620
  const onRenderSendIcon = React.useCallback((isHover) => {
8373
8621
  return (React.createElement(react.Icon, { iconName: isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend', className: sendIconStyle({
@@ -8385,7 +8633,7 @@ const RichTextSendBox = (props) => {
8385
8633
  /* @conditional-compile-remove(file-sharing-acs) */
8386
8634
  const uploadErrorMessage = (_b = (_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message;
8387
8635
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8388
- const imageUploadErrorMessage = (_d = (_c = inlineImages === null || inlineImages === void 0 ? void 0 : inlineImages.filter((image) => image.error).pop()) === null || _c === void 0 ? void 0 : _c.error) === null || _d === void 0 ? void 0 : _d.message;
8636
+ const imageUploadErrorMessage = (_d = (_c = inlineImagesWithProgress === null || inlineImagesWithProgress === void 0 ? void 0 : inlineImagesWithProgress.filter((image) => image.error).pop()) === null || _c === void 0 ? void 0 : _c.error) === null || _d === void 0 ? void 0 : _d.message;
8389
8637
  /* @conditional-compile-remove(file-sharing-acs) */
8390
8638
  const errorMessage = uploadErrorMessage || /* @conditional-compile-remove(rich-text-editor-image-upload) */ imageUploadErrorMessage;
8391
8639
  return {
@@ -8410,7 +8658,7 @@ const RichTextSendBox = (props) => {
8410
8658
  /* @conditional-compile-remove(file-sharing-acs) */
8411
8659
  attachmentUploadsPendingError,
8412
8660
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
8413
- inlineImages,
8661
+ inlineImagesWithProgress,
8414
8662
  systemMessage
8415
8663
  ]);
8416
8664
  /* @conditional-compile-remove(file-sharing-acs) */
@@ -10473,7 +10721,7 @@ class _ErrorBoundary extends React.Component {
10473
10721
  // Copyright (c) Microsoft Corporation.
10474
10722
  // Licensed under the MIT License.
10475
10723
  /* @conditional-compile-remove(rich-text-editor) */
10476
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-B0zbyF6Z.js'); }));
10724
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-BBTJIosO.js'); }));
10477
10725
  /**
10478
10726
  * @private
10479
10727
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -10481,7 +10729,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
10481
10729
  *
10482
10730
  * @conditional-compile-remove(rich-text-editor)
10483
10731
  */
10484
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-B0zbyF6Z.js'); });
10732
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-BBTJIosO.js'); });
10485
10733
  /**
10486
10734
  * @private
10487
10735
  */
@@ -10583,9 +10831,9 @@ const ChatMyMessageComponent = (props) => {
10583
10831
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10584
10832
  onInsertInlineImage: props.onInsertInlineImage,
10585
10833
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10586
- inlineImages: props.inlineImages,
10834
+ inlineImagesWithProgress: props.inlineImagesWithProgress,
10587
10835
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10588
- onCancelInlineImageUpload: props.onCancelInlineImageUpload }));
10836
+ onRemoveInlineImage: props.onRemoveInlineImage }));
10589
10837
  }
10590
10838
  else {
10591
10839
  return (React.createElement(ChatMyMessageComponentAsMessageBubble, Object.assign({}, props, { onRemoveClick: onRemoveClick, onEditClick: onEditClick, onResendClick: onResendClick, onRenderAvatar: props.onRenderAvatar,
@@ -10621,9 +10869,9 @@ const FluentChatMyMessageComponent = (props) => {
10621
10869
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10622
10870
  onPaste,
10623
10871
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10624
- inlineImages,
10872
+ inlineImagesWithProgress,
10625
10873
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10626
- onCancelInlineImageUpload,
10874
+ onRemoveInlineImage,
10627
10875
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10628
10876
  onInsertInlineImage } = props;
10629
10877
  const chatMessageRenderStyles = useChatMessageRenderStyles();
@@ -10655,11 +10903,11 @@ const FluentChatMyMessageComponent = (props) => {
10655
10903
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10656
10904
  onPaste: onPaste,
10657
10905
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10658
- onCancelInlineImageUpload: onCancelInlineImageUpload,
10906
+ onRemoveInlineImage: onRemoveInlineImage,
10659
10907
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10660
10908
  onInsertInlineImage: onInsertInlineImage,
10661
10909
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10662
- inlineImages: inlineImages })));
10910
+ inlineImagesWithProgress: inlineImagesWithProgress })));
10663
10911
  }
10664
10912
  return React.createElement(React.Fragment, null);
10665
10913
  }, [
@@ -10685,11 +10933,11 @@ const FluentChatMyMessageComponent = (props) => {
10685
10933
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10686
10934
  onPaste,
10687
10935
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10688
- onCancelInlineImageUpload,
10936
+ onRemoveInlineImage,
10689
10937
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10690
10938
  onInsertInlineImage,
10691
10939
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
10692
- inlineImages
10940
+ inlineImagesWithProgress
10693
10941
  ]);
10694
10942
  const messageRenderer = React.useCallback((messageProps) => {
10695
10943
  return onRenderMessage === undefined
@@ -11515,10 +11763,10 @@ const MessageThreadWrapper = (props) => {
11515
11763
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
11516
11764
  onInsertInlineImage: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onInsertInlineImage,
11517
11765
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
11518
- inlineImages: (richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.messagesInlineImages) &&
11519
- (richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.messagesInlineImages[message.message.messageId]),
11766
+ inlineImagesWithProgress: (richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.messagesInlineImagesWithProgress) &&
11767
+ (richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.messagesInlineImagesWithProgress[message.message.messageId]),
11520
11768
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
11521
- onCancelInlineImageUpload: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onCancelInlineImageUpload })));
11769
+ onRemoveInlineImage: richTextEditorOptions === null || richTextEditorOptions === void 0 ? void 0 : richTextEditorOptions.onRemoveInlineImage })));
11522
11770
  }))))));
11523
11771
  };
11524
11772
  const MemoChatMessageComponentWrapper = React.memo((obj) => {
@@ -14190,74 +14438,6 @@ const convertContextualMenuItemsToDrawerMenuItemProps$1 = (contextualMenuProps,
14190
14438
  });
14191
14439
  };
14192
14440
 
14193
- // Copyright (c) Microsoft Corporation.
14194
- // Licensed under the MIT License.
14195
- /**
14196
- * @private
14197
- */
14198
- const screenSharingContainerStyle = react.mergeStyles({
14199
- width: '100%',
14200
- height: '100%'
14201
- });
14202
- /**
14203
- * @private
14204
- */
14205
- const screenSharingNotificationContainerStyle = (theme) => react.mergeStyles({
14206
- backgroundColor: 'inherit',
14207
- padding: '1rem',
14208
- maxWidth: '95%',
14209
- borderRadius: theme.effects.roundedCorner4,
14210
- color: theme.palette.neutralSecondary
14211
- });
14212
- /**
14213
- * @private
14214
- */
14215
- const screenSharingNotificationIconContainerStyle = react.mergeStyles({
14216
- height: '2rem',
14217
- lineHeight: 0
14218
- });
14219
- /**
14220
- * @private
14221
- */
14222
- const screenSharingNotificationIconStyle = (theme) => react.mergeStyles({
14223
- // svg is (20px x 20px) but path is only (16px x 12px), so need to scale at 2.5 to get 40px
14224
- transform: 'scale(2.5)',
14225
- color: theme.palette.neutralTertiary
14226
- });
14227
- /**
14228
- * @private
14229
- */
14230
- const screenSharingNotificationTextStyle = react.mergeStyles({
14231
- fontSize: '1rem',
14232
- // Text component will take body color by default (white in Dark Mode), so forcing it to be parent container color
14233
- color: 'inherit'
14234
- });
14235
-
14236
- // Copyright (c) Microsoft Corporation.
14237
- // Licensed under the MIT License.
14238
- /**
14239
- * A memoized version of local screen share component. React.memo is used for a performance
14240
- * boost by memoizing the same rendered component to avoid rerendering this when the parent component rerenders.
14241
- * https://reactjs.org/docs/react-api.html#reactmemo
14242
- */
14243
- const LocalScreenShare = React.memo((props) => {
14244
- const { localParticipant } = props;
14245
- const theme = useTheme();
14246
- const locale = useLocale$1();
14247
- if (!localParticipant || !localParticipant.isScreenSharingOn) {
14248
- return null;
14249
- }
14250
- const localScreenSharingNotification = (React.createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", className: screenSharingContainerStyle },
14251
- React.createElement(react.Stack, { horizontalAlign: "center", verticalAlign: "center", className: screenSharingNotificationContainerStyle(theme), tokens: { childrenGap: '1rem' } },
14252
- React.createElement(react.Stack, { horizontal: true, verticalAlign: "center", className: screenSharingNotificationIconContainerStyle },
14253
- React.createElement(react.Icon, { iconName: "ControlButtonScreenShareStart", className: screenSharingNotificationIconStyle(theme) })),
14254
- React.createElement(react.Text, { className: screenSharingNotificationTextStyle, "aria-live": "polite" }, locale.strings.videoGallery.screenIsBeingSharedMessage))));
14255
- const displayName = !(localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.displayName)
14256
- ? locale.strings.videoGallery.displayNamePlaceholder
14257
- : localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.displayName;
14258
- return (React.createElement(VideoTile, { displayName: displayName, isMuted: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.isMuted, onRenderPlaceholder: () => React.createElement(React.Fragment, null) }, localScreenSharingNotification));
14259
- });
14260
-
14261
14441
  // Copyright (c) Microsoft Corporation.
14262
14442
  // Licensed under the MIT License.
14263
14443
  /**
@@ -14305,11 +14485,46 @@ const RemoteScreenShare = React.memo((props) => {
14305
14485
  }
14306
14486
  return (React.createElement(VideoTile, { displayName: displayName, isMuted: isMuted, renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }), overlay: reactionResources && (React.createElement(MeetingReactionOverlay, { reactionResources: reactionResources, localParticipant: localParticipant, remoteParticipants: remoteParticipants, overlayMode: "screen-share" })) }));
14307
14487
  });
14488
+ /**
14489
+ * LoadingSpinner component for displaying a loading spinner.
14490
+ *
14491
+ * @param {string} props.loadingMessage - The loading message to display.
14492
+ * @returns {JSX.Element} The JSX element representing the loading spinner.
14493
+ */
14308
14494
  const LoadingSpinner = (props) => {
14309
14495
  return (React.createElement(react.Stack, { verticalAlign: "center", className: loadingStyle },
14310
14496
  React.createElement(react.Spinner, { label: props.loadingMessage, size: react.SpinnerSize.xSmall, "aria-live": 'assertive' })));
14311
14497
  };
14312
14498
 
14499
+ // Copyright (c) Microsoft Corporation.
14500
+ // Licensed under the MIT License.
14501
+ /**
14502
+ * A memoized version of local screen share component. React.memo is used for a performance
14503
+ * boost by memoizing the same rendered component to avoid rerendering this when the parent component rerenders.
14504
+ * https://reactjs.org/docs/react-api.html#reactmemo
14505
+ */
14506
+ const LocalScreenShare = React.memo((props) => {
14507
+ const { localParticipant, renderElement, isAvailable, onCreateLocalStreamView, onDisposeLocalScreenShareStreamView } = props;
14508
+ const locale = useLocale$1();
14509
+ if (!renderElement) {
14510
+ onCreateLocalStreamView && onCreateLocalStreamView();
14511
+ }
14512
+ React.useEffect(() => {
14513
+ return () => {
14514
+ // TODO: Isolate disposing behaviors for screenShare and videoStream
14515
+ onDisposeLocalScreenShareStreamView && onDisposeLocalScreenShareStreamView();
14516
+ };
14517
+ }, [onDisposeLocalScreenShareStreamView]);
14518
+ if (!localParticipant || !localParticipant.isScreenSharingOn) {
14519
+ return null;
14520
+ }
14521
+ const displayName = !(localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.displayName)
14522
+ ? locale.strings.videoGallery.displayNamePlaceholder
14523
+ : localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.displayName;
14524
+ const loadingMessage = locale.strings.videoGallery.localScreenShareLoadingMessage;
14525
+ return (React.createElement(VideoTile, { displayName: displayName, isMuted: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.isMuted, renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isAvailable === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }) }));
14526
+ });
14527
+
14313
14528
  // Copyright (c) Microsoft Corporation.
14314
14529
  // Licensed under the MIT License.
14315
14530
  /**
@@ -16510,8 +16725,8 @@ const MAX_PINNED_REMOTE_VIDEO_TILES$1 = 4;
16510
16725
  * @public
16511
16726
  */
16512
16727
  const VideoGallery = (props) => {
16513
- var _a, _b, _c;
16514
- const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteScreenShareStreamView, onDisposeRemoteVideoStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, onPinParticipant: onPinParticipantHandler, onUnpinParticipant: onUnpinParticipantHandler, remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS, overflowGalleryPosition = 'horizontalBottom', localVideoTileSize = 'followDeviceOrientation', spotlightedParticipants, onStartLocalSpotlight, onStartRemoteSpotlight, onStopLocalSpotlight, onStopRemoteSpotlight, maxParticipantsToSpotlight, reactionResources, videoTilesOptions,
16728
+ var _a, _b, _c, _d, _e;
16729
+ const { localParticipant, remoteParticipants = [], localVideoViewOptions, remoteVideoViewOptions, dominantSpeakers, onRenderLocalVideoTile, onRenderRemoteVideoTile, onCreateLocalStreamView, onDisposeLocalStreamView, onCreateRemoteStreamView, onDisposeRemoteScreenShareStreamView, onDisposeLocalScreenShareStreamView, onDisposeRemoteVideoStreamView, styles, layout, onRenderAvatar, showMuteIndicator, maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, onPinParticipant: onPinParticipantHandler, onUnpinParticipant: onUnpinParticipantHandler, remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS, overflowGalleryPosition = 'horizontalBottom', localVideoTileSize = 'followDeviceOrientation', spotlightedParticipants, onStartLocalSpotlight, onStartRemoteSpotlight, onStopLocalSpotlight, onStopRemoteSpotlight, maxParticipantsToSpotlight, reactionResources, videoTilesOptions,
16515
16730
  /* @conditional-compile-remove(soft-mute) */
16516
16731
  onMuteParticipant } = props;
16517
16732
  const ids = useIdentifiers();
@@ -16680,8 +16895,8 @@ const VideoGallery = (props) => {
16680
16895
  videoTilesOptions
16681
16896
  ]);
16682
16897
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
16683
- const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
16684
- const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_a = screenShareParticipant.screenShareStream) === null || _a === void 0 ? void 0 : _a.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId], localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources, isPPTLive: !((_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.id) })));
16898
+ const localScreenShareStreamComponent = (React.createElement(LocalScreenShare, { localParticipant: localParticipant, renderElement: (_a = localParticipant.screenShareStream) === null || _a === void 0 ? void 0 : _a.renderElement, isAvailable: (_b = localParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.isAvailable, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalScreenShareStreamView: onDisposeLocalScreenShareStreamView }));
16899
+ const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_d = screenShareParticipant.screenShareStream) === null || _d === void 0 ? void 0 : _d.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId], localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources, isPPTLive: !((_e = screenShareParticipant.screenShareStream) === null || _e === void 0 ? void 0 : _e.id) })));
16685
16900
  const screenShareComponent = remoteScreenShareComponent
16686
16901
  ? remoteScreenShareComponent
16687
16902
  : localParticipant.isScreenSharingOn
@@ -21223,6 +21438,12 @@ const CHAT_CONTAINER_MIN_WIDTH_REM = 17.5;
21223
21438
  * @private
21224
21439
  */
21225
21440
  const SEND_BOX_UPLOADS_KEY_VALUE = 'send-box';
21441
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
21442
+ /**
21443
+ * Default rich text editor inline image file name
21444
+ * @internal
21445
+ */
21446
+ const _DEFAULT_INLINE_IMAGE_FILE_NAME = 'image.png';
21226
21447
 
21227
21448
  // Copyright (c) Microsoft Corporation.
21228
21449
  // Licensed under the MIT License.
@@ -22722,7 +22943,7 @@ const AttachmentDownloadErrorBar = (props) => {
22722
22943
  /**
22723
22944
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
22724
22945
  */
22725
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BVOysnsq.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
22946
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-C1Ev6MKx.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
22726
22947
  /**
22727
22948
  * @private
22728
22949
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -22730,7 +22951,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
22730
22951
  *
22731
22952
  /* @conditional-compile-remove(rich-text-editor-composite-support)
22732
22953
  */
22733
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-BVOysnsq.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
22954
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-C1Ev6MKx.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
22734
22955
  /**
22735
22956
  * @private
22736
22957
  */
@@ -22738,7 +22959,7 @@ const SendBoxPicker = (props) => {
22738
22959
  /* @conditional-compile-remove(rich-text-editor-composite-support) */
22739
22960
  const { richTextEditorOptions } = props;
22740
22961
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22741
- const { onPaste, onInsertInlineImage, inlineImages, onCancelInlineImageUpload } = richTextEditorOptions || {};
22962
+ const { onPaste, onInsertInlineImage, inlineImagesWithProgress, onRemoveInlineImage } = richTextEditorOptions || {};
22742
22963
  const sendBoxProps = usePropsFor$2(SendBox);
22743
22964
  /* @conditional-compile-remove(rich-text-editor-composite-support) */
22744
22965
  const isRichTextEditorEnabled = React.useMemo(() => {
@@ -22755,9 +22976,9 @@ const SendBoxPicker = (props) => {
22755
22976
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22756
22977
  onInsertInlineImage: onInsertInlineImage,
22757
22978
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22758
- inlineImages: inlineImages,
22979
+ inlineImagesWithProgress: inlineImagesWithProgress,
22759
22980
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22760
- onCancelInlineImageUpload: onCancelInlineImageUpload })))));
22981
+ onRemoveInlineImage: onRemoveInlineImage })))));
22761
22982
  }
22762
22983
  return sendBox;
22763
22984
  };
@@ -22813,14 +23034,14 @@ const getEditBoxMessagesInlineImages = (editBoxInlineImageUploads) => {
22813
23034
  return;
22814
23035
  }
22815
23036
  const messageIds = Object.keys(editBoxInlineImageUploads || {});
22816
- const messagesInlineImages = {};
23037
+ const messagesInlineImagesWithProgress = {};
22817
23038
  messageIds.map((messageId) => {
22818
23039
  const messageUploads = editBoxInlineImageUploads[messageId].map((upload) => {
22819
23040
  return upload.metadata;
22820
23041
  });
22821
- messagesInlineImages[messageId] = messageUploads;
23042
+ messagesInlineImagesWithProgress[messageId] = messageUploads;
22822
23043
  });
22823
- return messagesInlineImages;
23044
+ return messagesInlineImagesWithProgress;
22824
23045
  };
22825
23046
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22826
23047
  /**
@@ -22855,7 +23076,10 @@ const inlineImageUploadHandler = (uploadTasks, adapter, strings) => __awaiter$G(
22855
23076
  }
22856
23077
  try {
22857
23078
  const response = yield adapter.uploadImage(image, (_c = task.metadata) === null || _c === void 0 ? void 0 : _c.name);
22858
- uploadTask.notifyUploadCompleted(response.id, task.metadata.url || '');
23079
+ // Use response id as the image src because we need to keep the original image id as a reference to find the image.
23080
+ // Also the html content we send to ChatSDK does not need image src,
23081
+ // it only need the response id to match the uploaded image, url is not needed.
23082
+ uploadTask.notifyUploadCompleted(task.metadata.id, response.id);
22859
23083
  }
22860
23084
  catch (error) {
22861
23085
  console.error(error);
@@ -22864,8 +23088,8 @@ const inlineImageUploadHandler = (uploadTasks, adapter, strings) => __awaiter$G(
22864
23088
  }
22865
23089
  });
22866
23090
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22867
- const generateUploadTask = (image, fileName, messageId, inlineImageUploadActionHandler) => __awaiter$G(void 0, void 0, void 0, function* () {
22868
- const imageData = yield getInlineImageData(image);
23091
+ const generateUploadTask = (imageAttributes, fileName, messageId, inlineImageUploadActionHandler) => __awaiter$G(void 0, void 0, void 0, function* () {
23092
+ const imageData = yield getInlineImageData(imageAttributes.src);
22869
23093
  if (!imageData) {
22870
23094
  return;
22871
23095
  }
@@ -22874,9 +23098,9 @@ const generateUploadTask = (image, fileName, messageId, inlineImageUploadActionH
22874
23098
  image: imageData,
22875
23099
  taskId,
22876
23100
  metadata: {
22877
- id: taskId,
23101
+ id: imageAttributes.id,
22878
23102
  name: fileName,
22879
- url: image,
23103
+ url: imageAttributes.src,
22880
23104
  progress: 0
22881
23105
  },
22882
23106
  notifyUploadProgressChanged: (value) => {
@@ -22911,8 +23135,8 @@ const generateUploadTask = (image, fileName, messageId, inlineImageUploadActionH
22911
23135
  /**
22912
23136
  * @internal
22913
23137
  */
22914
- const onInsertInlineImageForEditBox = (image, fileName, messageId, adapter, handleEditBoxInlineImageUploadAction, chatCompositeStrings) => __awaiter$G(void 0, void 0, void 0, function* () {
22915
- const uploadTask = yield generateUploadTask(image, fileName, messageId, handleEditBoxInlineImageUploadAction);
23138
+ const onInsertInlineImageForEditBox = (imageAttributes, fileName, messageId, adapter, handleEditBoxInlineImageUploadAction, chatCompositeStrings) => __awaiter$G(void 0, void 0, void 0, function* () {
23139
+ const uploadTask = yield generateUploadTask(imageAttributes, fileName, messageId, handleEditBoxInlineImageUploadAction);
22916
23140
  if (!uploadTask) {
22917
23141
  return;
22918
23142
  }
@@ -22927,8 +23151,8 @@ const onInsertInlineImageForEditBox = (image, fileName, messageId, adapter, hand
22927
23151
  /**
22928
23152
  * @internal
22929
23153
  */
22930
- const onInsertInlineImageForSendBox = (image, fileName, adapter, handleSendBoxInlineImageUploadAction, chatCompositeStrings) => __awaiter$G(void 0, void 0, void 0, function* () {
22931
- const uploadTask = yield generateUploadTask(image, fileName, SEND_BOX_UPLOADS_KEY_VALUE, handleSendBoxInlineImageUploadAction);
23154
+ const onInsertInlineImageForSendBox = (imageAttributes, fileName, adapter, handleSendBoxInlineImageUploadAction, chatCompositeStrings) => __awaiter$G(void 0, void 0, void 0, function* () {
23155
+ const uploadTask = yield generateUploadTask(imageAttributes, fileName, SEND_BOX_UPLOADS_KEY_VALUE, handleSendBoxInlineImageUploadAction);
22932
23156
  if (!uploadTask) {
22933
23157
  return;
22934
23158
  }
@@ -22943,8 +23167,14 @@ const onInsertInlineImageForSendBox = (image, fileName, adapter, handleSendBoxIn
22943
23167
  /**
22944
23168
  * @internal
22945
23169
  */
22946
- const cancelInlineImageUpload = (imageId, imageUpload, messageId, inlineImageUploadActionHandler, adapter) => {
23170
+ const cancelInlineImageUpload = (imageAttributes, imageUploads, messageId, inlineImageUploadActionHandler, adapter) => {
23171
+ if (!imageUploads || !imageUploads[messageId]) {
23172
+ deleteExistingInlineImageForEditBox(imageAttributes.id, messageId, adapter);
23173
+ return;
23174
+ }
23175
+ const imageUpload = imageUploads[messageId].find((upload) => upload.metadata.id === imageAttributes.id);
22947
23176
  if (!imageUpload || !(imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.id)) {
23177
+ deleteExistingInlineImageForEditBox(imageAttributes.id, messageId, adapter);
22948
23178
  return;
22949
23179
  }
22950
23180
  inlineImageUploadActionHandler({
@@ -22952,37 +23182,56 @@ const cancelInlineImageUpload = (imageId, imageUpload, messageId, inlineImageUpl
22952
23182
  id: imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.id,
22953
23183
  messageId
22954
23184
  });
22955
- // TODO: remove local blob
22956
23185
  if ((imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.progress) === 1) {
22957
- try {
22958
- adapter.deleteImage(imageId);
22959
- }
22960
- catch (error) {
22961
- console.error(error);
22962
- }
23186
+ deleteInlineImageFromServer(imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.id, adapter);
22963
23187
  }
22964
23188
  };
22965
23189
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
23190
+ const deleteInlineImageFromServer = (imageId, adapter) => {
23191
+ try {
23192
+ adapter.deleteImage(imageId);
23193
+ }
23194
+ catch (error) {
23195
+ console.error(error);
23196
+ }
23197
+ };
23198
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
23199
+ // This function is used to delete the inline image that existed before editing starts
23200
+ const deleteExistingInlineImageForEditBox = (imageId, messageId, adapter) => {
23201
+ messageId !== SEND_BOX_UPLOADS_KEY_VALUE && deleteInlineImageFromServer(imageId, adapter);
23202
+ };
23203
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
22966
23204
  /**
22967
23205
  * @internal
22968
23206
  */
22969
- const onCancelInlineImageUploadHandlerForEditBox = (imageId, messageId, editBoxInlineImageUploads, adapter, handleEditBoxInlineImageUploadAction) => {
22970
- if (!editBoxInlineImageUploads) {
22971
- return;
23207
+ const updateContentStringWithUploadedInlineImages = (content, imageUploads, messageId = SEND_BOX_UPLOADS_KEY_VALUE) => {
23208
+ if (!imageUploads || !imageUploads[messageId]) {
23209
+ return content;
22972
23210
  }
22973
- const imageUpload = editBoxInlineImageUploads[messageId].find((upload) => upload.metadata.id === imageId);
22974
- cancelInlineImageUpload(imageId, imageUpload, messageId, handleEditBoxInlineImageUploadAction, adapter);
23211
+ const messageUploads = imageUploads[messageId];
23212
+ const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
23213
+ document.querySelectorAll('img').forEach((img) => {
23214
+ var _a;
23215
+ const uploadInlineImage = messageUploads.find((upload) => !upload.metadata.error && upload.metadata.progress === 1 && upload.metadata.id === img.id);
23216
+ if (uploadInlineImage) {
23217
+ // ChatSDK uses the respond id provided by the upload response. We store the response id in the image src attribute previously.
23218
+ img.id = (_a = uploadInlineImage.metadata.url) !== null && _a !== void 0 ? _a : img.id;
23219
+ img.src = '';
23220
+ }
23221
+ });
23222
+ content = document.body.innerHTML;
23223
+ return content;
22975
23224
  };
22976
23225
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
22977
23226
  /**
22978
23227
  * @internal
22979
23228
  */
22980
- const onCancelInlineImageUploadHandlerForSendBox = (imageId, sendBoxInlineImageUploads, adapter, handleSendBoxInlineImageUploadAction) => {
22981
- if (!sendBoxInlineImageUploads) {
22982
- return;
23229
+ const getImageFileNameFromAttributes = (imageAttributes) => {
23230
+ const fileName = imageAttributes[_IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY];
23231
+ if (!fileName || fileName === '' || fileName === 'undefined' || fileName === 'null') {
23232
+ return _DEFAULT_INLINE_IMAGE_FILE_NAME;
22983
23233
  }
22984
- const imageUpload = sendBoxInlineImageUploads[SEND_BOX_UPLOADS_KEY_VALUE].find((upload) => upload.metadata.id === imageId);
22985
- cancelInlineImageUpload(imageId, imageUpload, SEND_BOX_UPLOADS_KEY_VALUE, handleSendBoxInlineImageUploadAction, adapter);
23234
+ return fileName;
22986
23235
  };
22987
23236
 
22988
23237
  // Copyright (c) Microsoft Corporation.
@@ -23327,6 +23576,8 @@ const ChatScreen = (props) => {
23327
23576
  /* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options) {
23328
23577
  return __awaiter$F(this, void 0, void 0, function* () {
23329
23578
  var _a;
23579
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
23580
+ content = updateContentStringWithUploadedInlineImages(content, sendBoxInlineImageUploads);
23330
23581
  /* @conditional-compile-remove(file-sharing-acs) */
23331
23582
  const attachments = (_a = options === null || options === void 0 ? void 0 : options.attachments) !== null && _a !== void 0 ? _a : [];
23332
23583
  /* @conditional-compile-remove(file-sharing-acs) */
@@ -23345,10 +23596,16 @@ const ChatScreen = (props) => {
23345
23596
  /* @conditional-compile-remove(file-sharing-acs) */
23346
23597
  return;
23347
23598
  });
23348
- }, [adapter, /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleSendBoxInlineImageUploadAction]);
23599
+ }, [
23600
+ adapter,
23601
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleSendBoxInlineImageUploadAction,
23602
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ sendBoxInlineImageUploads
23603
+ ]);
23349
23604
  const onUpdateMessageHandler = React.useCallback(function (messageId, content,
23350
23605
  /* @conditional-compile-remove(file-sharing-acs) */ options) {
23351
23606
  return __awaiter$F(this, void 0, void 0, function* () {
23607
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */
23608
+ content = updateContentStringWithUploadedInlineImages(content, editBoxInlineImageUploads, messageId);
23352
23609
  yield messageThreadProps.onUpdateMessage(messageId, content,
23353
23610
  /* @conditional-compile-remove(file-sharing-acs) */ options);
23354
23611
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -23356,6 +23613,7 @@ const ChatScreen = (props) => {
23356
23613
  });
23357
23614
  }, [
23358
23615
  /* @conditional-compile-remove(rich-text-editor-image-upload) */ handleEditBoxInlineImageUploadAction,
23616
+ /* @conditional-compile-remove(rich-text-editor-image-upload) */ editBoxInlineImageUploads,
23359
23617
  messageThreadProps
23360
23618
  ]);
23361
23619
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -23389,14 +23647,14 @@ const ChatScreen = (props) => {
23389
23647
  return (options === null || options === void 0 ? void 0 : options.richTextEditor)
23390
23648
  ? Object.assign(Object.assign({}, richTextEditorOptions), {
23391
23649
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
23392
- onInsertInlineImage: (imageUrl, imageFileName, messageId) => {
23393
- onInsertInlineImageForEditBox(imageUrl, imageFileName, messageId, adapter, handleEditBoxInlineImageUploadAction, localeStrings.chat);
23650
+ onInsertInlineImage: (imageAttributes, messageId) => {
23651
+ onInsertInlineImageForEditBox(imageAttributes, getImageFileNameFromAttributes(imageAttributes), messageId, adapter, handleEditBoxInlineImageUploadAction, localeStrings.chat);
23394
23652
  },
23395
23653
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
23396
- messagesInlineImages: getEditBoxMessagesInlineImages(editBoxInlineImageUploads),
23654
+ messagesInlineImagesWithProgress: getEditBoxMessagesInlineImages(editBoxInlineImageUploads),
23397
23655
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
23398
- onCancelInlineImageUpload: (imageId, messageId) => {
23399
- onCancelInlineImageUploadHandlerForEditBox(imageId, messageId, editBoxInlineImageUploads, adapter, handleEditBoxInlineImageUploadAction);
23656
+ onRemoveInlineImage: (imageAttributes, messageId) => {
23657
+ cancelInlineImageUpload(imageAttributes, editBoxInlineImageUploads, messageId, handleEditBoxInlineImageUploadAction, adapter);
23400
23658
  } }) : undefined;
23401
23659
  }, [
23402
23660
  options === null || options === void 0 ? void 0 : options.richTextEditor,
@@ -23410,14 +23668,14 @@ const ChatScreen = (props) => {
23410
23668
  return (options === null || options === void 0 ? void 0 : options.richTextEditor)
23411
23669
  ? Object.assign(Object.assign({}, richTextEditorOptions), {
23412
23670
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
23413
- onInsertInlineImage: (imageUrl, imageFileName) => {
23414
- onInsertInlineImageForSendBox(imageUrl, imageFileName, adapter, handleSendBoxInlineImageUploadAction, localeStrings.chat);
23671
+ onInsertInlineImage: (imageAttributes) => {
23672
+ onInsertInlineImageForSendBox(imageAttributes, getImageFileNameFromAttributes(imageAttributes), adapter, handleSendBoxInlineImageUploadAction, localeStrings.chat);
23415
23673
  },
23416
23674
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
23417
- inlineImages: getSendBoxInlineImages(sendBoxInlineImageUploads),
23675
+ inlineImagesWithProgress: getSendBoxInlineImages(sendBoxInlineImageUploads),
23418
23676
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
23419
- onCancelInlineImageUpload: (imageId) => {
23420
- onCancelInlineImageUploadHandlerForSendBox(imageId, sendBoxInlineImageUploads, adapter, handleSendBoxInlineImageUploadAction);
23677
+ onRemoveInlineImage: (imageAttributes) => {
23678
+ cancelInlineImageUpload(imageAttributes, sendBoxInlineImageUploads, SEND_BOX_UPLOADS_KEY_VALUE, handleSendBoxInlineImageUploadAction, adapter);
23421
23679
  } }) : undefined;
23422
23680
  }, [
23423
23681
  options === null || options === void 0 ? void 0 : options.richTextEditor,
@@ -24109,7 +24367,6 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
24109
24367
  /* @conditional-compile-remove(PSTN-calls) */
24110
24368
  const onToggleHold = () => __awaiter$D(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()); });
24111
24369
  const onCreateLocalStreamView = (...args_1) => __awaiter$D(void 0, [...args_1], void 0, function* (options = { scalingMode: 'Crop', isMirrored: true }) {
24112
- var _d;
24113
24370
  if (!call || call.localVideoStreams.length === 0) {
24114
24371
  return;
24115
24372
  }
@@ -24118,11 +24375,20 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
24118
24375
  return;
24119
24376
  }
24120
24377
  const localStream = callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
24121
- if (!localStream) {
24122
- return;
24378
+ const localScreenSharingStream = callState.localVideoStreams.find((item) => item.mediaStreamType === 'ScreenSharing');
24379
+ let createViewResult = undefined;
24380
+ if (localStream && !localStream.view) {
24381
+ createViewResult = yield callClient.createView(call.id, undefined, localStream, options);
24123
24382
  }
24124
- const { view } = (_d = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _d !== void 0 ? _d : {};
24125
- return view ? { view } : undefined;
24383
+ if (localScreenSharingStream && !localScreenSharingStream.view && call.isScreenSharingOn) {
24384
+ // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.
24385
+ // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.
24386
+ // `Fit` is the only mode that maintains the integrity of the screen being shared.
24387
+ createViewResult = yield callClient.createView(call.id, undefined, localScreenSharingStream, {
24388
+ scalingMode: 'Fit'
24389
+ });
24390
+ }
24391
+ return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
24126
24392
  });
24127
24393
  const onCreateRemoteStreamView = (userId_1, ...args_2) => __awaiter$D(void 0, [userId_1, ...args_2], void 0, function* (userId, options = { scalingMode: 'Crop' }) {
24128
24394
  if (!call) {
@@ -24216,6 +24482,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
24216
24482
  callClient.disposeView(call.id, participant.identifier, screenShareStream);
24217
24483
  }
24218
24484
  });
24485
+ const onDisposeLocalScreenShareStreamView = () => __awaiter$D(void 0, void 0, void 0, function* () {
24486
+ if (!call) {
24487
+ return;
24488
+ }
24489
+ const callState = callClient.getState().calls[call.id];
24490
+ if (!callState) {
24491
+ throw new Error(`Call Not Found: ${call.id}`);
24492
+ }
24493
+ const screenShareStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'ScreenSharing');
24494
+ if (screenShareStream && screenShareStream.view) {
24495
+ callClient.disposeView(call.id, undefined, screenShareStream);
24496
+ }
24497
+ });
24219
24498
  const onDisposeLocalStreamView = () => __awaiter$D(void 0, void 0, void 0, function* () {
24220
24499
  // If the user is currently in a call, dispose of the local stream view attached to that call.
24221
24500
  const callState = call && callClient.getState().calls[call.id];
@@ -24251,7 +24530,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
24251
24530
  }
24252
24531
  });
24253
24532
  const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$D(void 0, void 0, void 0, function* () {
24254
- var _e;
24533
+ var _d;
24255
24534
  const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
24256
24535
  (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
24257
24536
  if (stream) {
@@ -24259,12 +24538,12 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
24259
24538
  throw new Error(`Video background effects dependency not resolved`);
24260
24539
  }
24261
24540
  const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) &&
24262
- ((_e = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _e === void 0 ? void 0 : _e.createBackgroundBlurEffect);
24541
+ ((_d = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _d === void 0 ? void 0 : _d.createBackgroundBlurEffect);
24263
24542
  return createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));
24264
24543
  }
24265
24544
  });
24266
24545
  const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$D(void 0, void 0, void 0, function* () {
24267
- var _f;
24546
+ var _e;
24268
24547
  const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
24269
24548
  (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
24270
24549
  if (stream) {
@@ -24272,7 +24551,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
24272
24551
  throw new Error(`Video background effects dependency not resolved`);
24273
24552
  }
24274
24553
  const createEffect = (options === null || options === void 0 ? void 0 : options.onResolveVideoBackgroundEffectsDependency) &&
24275
- ((_f = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _f === void 0 ? void 0 : _f.createBackgroundReplacementEffect);
24554
+ ((_e = (yield options.onResolveVideoBackgroundEffectsDependency())) === null || _e === void 0 ? void 0 : _e.createBackgroundReplacementEffect);
24276
24555
  return (createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig)));
24277
24556
  }
24278
24557
  });
@@ -24360,6 +24639,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
24360
24639
  onDisposeRemoteStreamView,
24361
24640
  onDisposeLocalStreamView,
24362
24641
  onDisposeRemoteScreenShareStreamView,
24642
+ onDisposeLocalScreenShareStreamView,
24363
24643
  onDisposeRemoteVideoStreamView,
24364
24644
  onRaiseHand,
24365
24645
  onLowerHand,
@@ -29470,8 +29750,8 @@ const convertRemoteContentSharingStreamToVideoGalleryStream = (stream) => {
29470
29750
  };
29471
29751
  };
29472
29752
  /** @private */
29473
- const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, role, raisedHand, reaction, localSpotlight, capabilities) => {
29474
- var _a, _b;
29753
+ const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, localScreenSharingStream, role, raisedHand, reaction, localSpotlight, capabilities) => {
29754
+ var _a, _b, _c;
29475
29755
  return ({
29476
29756
  userId: identifier,
29477
29757
  displayName: displayName !== null && displayName !== void 0 ? displayName : '',
@@ -29482,6 +29762,10 @@ const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, is
29482
29762
  isMirrored: (_a = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
29483
29763
  renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target
29484
29764
  },
29765
+ screenShareStream: {
29766
+ isAvailable: !!localScreenSharingStream,
29767
+ renderElement: (_c = localScreenSharingStream === null || localScreenSharingStream === void 0 ? void 0 : localScreenSharingStream.view) === null || _c === void 0 ? void 0 : _c.target
29768
+ },
29485
29769
  role,
29486
29770
  raisedHand: raisedHand,
29487
29771
  reaction,
@@ -29539,6 +29823,7 @@ isHideAttendeeNamesEnabled, localParticipantReaction, spotlightCallFeature, capa
29539
29823
  ? remoteParticipants[screenShareRemoteParticipantId]
29540
29824
  : undefined;
29541
29825
  const localVideoStream = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((i) => i.mediaStreamType === 'Video');
29826
+ const localScreenSharingStream = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((i) => i.mediaStreamType === 'ScreenSharing');
29542
29827
  const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);
29543
29828
  dominantSpeakerIds === null || dominantSpeakerIds === void 0 ? void 0 : dominantSpeakerIds.forEach((speaker, idx) => (idx));
29544
29829
  const noRemoteParticipants = [];
@@ -29548,7 +29833,7 @@ isHideAttendeeNamesEnabled, localParticipantReaction, spotlightCallFeature, capa
29548
29833
  screenShareParticipant: screenShareRemoteParticipant
29549
29834
  ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand, screenShareRemoteParticipant.contentSharingStream, undefined, screenShareRemoteParticipant.spotlight)
29550
29835
  : undefined,
29551
- localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, role, raisedHand, localParticipantReactionState, spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.localParticipantSpotlight, capabilities),
29836
+ localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, localScreenSharingStream, role, raisedHand, localParticipantReactionState, spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.localParticipantSpotlight, capabilities),
29552
29837
  remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline$2(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants),
29553
29838
  /* @conditional-compile-remove(hide-attendee-name) */
29554
29839
  isHideAttendeeNamesEnabled,
@@ -30859,6 +31144,9 @@ const createCompositeHandlers = memoizeOne((adapter, capabilities) => {
30859
31144
  onDisposeRemoteScreenShareStreamView: (userId) => __awaiter$o(void 0, void 0, void 0, function* () {
30860
31145
  return adapter.disposeScreenShareStreamView(userId);
30861
31146
  }),
31147
+ onDisposeLocalScreenShareStreamView: () => __awaiter$o(void 0, void 0, void 0, function* () {
31148
+ return adapter.disposeScreenShareStreamView('');
31149
+ }),
30862
31150
  onDisposeRemoteVideoStreamView: (userId) => __awaiter$o(void 0, void 0, void 0, function* () {
30863
31151
  return adapter.disposeRemoteVideoStreamView(userId);
30864
31152
  }),
@@ -38367,12 +38655,7 @@ const capabilitiesChangedInfoAndRoleSelector = reselect__namespace.createSelecto
38367
38655
  */
38368
38656
  const useTrackedCapabilityChangedNotifications = (capabilitiesChangedAndRoleInfo) => {
38369
38657
  const [trackedCapabilityChangedNotifications, setTrackedCapabilityChangedNotifications] = React.useState({});
38370
- // Initialize a share screen capability changed notification with 'RoleChanged' reason so that the initial
38371
- // share screen capability changed info from the Calling SDK when joining Teams interop will be ignored because
38372
- // being able to share screen is assumed by default. This is inline with what Teams is doing.
38373
- const activeNotifications = React.useRef({
38374
- shareScreen: { capabilityName: 'shareScreen', isPresent: true, changedReason: 'RoleChanged' }
38375
- });
38658
+ const activeNotifications = React.useRef({});
38376
38659
  React.useEffect(() => {
38377
38660
  activeNotifications.current = updateLatestCapabilityChangedNotificationMap(capabilitiesChangedAndRoleInfo, activeNotifications.current);
38378
38661
  setTrackedCapabilityChangedNotifications((prev) => updateTrackedCapabilityChangedNotificationsWithActiveNotifications(prev, Object.values(activeNotifications.current)));
@@ -38446,6 +38729,24 @@ const updateLatestCapabilityChangedNotificationMap = (capabilitiesChangedInfoAnd
38446
38729
  ((_b = activeNotifications[capabilityName]) === null || _b === void 0 ? void 0 : _b.changedReason)) {
38447
38730
  continue;
38448
38731
  }
38732
+ // All initial values of capabilities are not present with reason 'FeatureNotSupported'. So we should not show a
38733
+ // notification for them when they initially become present at the start of the call
38734
+ const oldCapabilityValue = capabilitiesChangedInfoAndRole.capabilitiesChangeInfo.oldValue[capabilityName];
38735
+ if (newCapabilityValue.isPresent === true &&
38736
+ (oldCapabilityValue === null || oldCapabilityValue === void 0 ? void 0 : oldCapabilityValue.isPresent) === false &&
38737
+ (oldCapabilityValue === null || oldCapabilityValue === void 0 ? void 0 : oldCapabilityValue.reason) === 'FeatureNotSupported' &&
38738
+ capabilitiesChangedInfoAndRole.capabilitiesChangeInfo.reason === 'MeetingOptionOrOrganizerPolicyChanged') {
38739
+ continue;
38740
+ }
38741
+ // Do not show the first time the screenshare capability is present when the user's role is resolved to mirror
38742
+ // Teams behaviour
38743
+ if (capabilityName === 'shareScreen' &&
38744
+ activeNotifications['shareScreen'] === undefined &&
38745
+ newCapabilityValue.isPresent === true &&
38746
+ (oldCapabilityValue === null || oldCapabilityValue === void 0 ? void 0 : oldCapabilityValue.isPresent) === false &&
38747
+ capabilitiesChangedInfoAndRole.capabilitiesChangeInfo.reason === 'RoleChanged') {
38748
+ continue;
38749
+ }
38449
38750
  const newCapabilityChangeNotification = {
38450
38751
  capabilityName: capabilityName,
38451
38752
  isPresent: newCapabilityValue.isPresent,
@@ -39745,7 +40046,12 @@ class AzureCommunicationCallAdapter {
39745
40046
  }
39746
40047
  disposeScreenShareStreamView(remoteUserId) {
39747
40048
  return __awaiter$9(this, void 0, void 0, function* () {
39748
- yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
40049
+ if (remoteUserId !== '') {
40050
+ yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);
40051
+ }
40052
+ else {
40053
+ yield this.handlers.onDisposeLocalScreenShareStreamView();
40054
+ }
39749
40055
  });
39750
40056
  }
39751
40057
  disposeRemoteVideoStreamView(remoteUserId) {
@@ -43227,7 +43533,6 @@ exports._IdentifierProvider = _IdentifierProvider;
43227
43533
  exports._formatString = _formatString;
43228
43534
  exports.attachmentMetadataReducer = attachmentMetadataReducer;
43229
43535
  exports.attachmentUploadCardsStyles = attachmentUploadCardsStyles;
43230
- exports.cancelInlineImageUpload = cancelInlineImageUpload$1;
43231
43536
  exports.createAzureCommunicationCallAdapter = createAzureCommunicationCallAdapter;
43232
43537
  exports.createAzureCommunicationCallAdapterFromClient = createAzureCommunicationCallAdapterFromClient;
43233
43538
  exports.createAzureCommunicationCallWithChatAdapter = createAzureCommunicationCallWithChatAdapter;
@@ -43247,19 +43552,21 @@ exports.doesMessageContainMultipleAttachments = doesMessageContainMultipleAttach
43247
43552
  exports.editBoxRichTextEditorStyle = editBoxRichTextEditorStyle;
43248
43553
  exports.editBoxWidthStyles = editBoxWidthStyles;
43249
43554
  exports.fromFlatCommunicationIdentifier = fromFlatCommunicationIdentifier;
43555
+ exports.getContentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo;
43250
43556
  exports.getMessageState = getMessageState;
43251
43557
  exports.getMessageWithAttachmentMetadata = getMessageWithAttachmentMetadata;
43558
+ exports.getPreviousInlineImages = getPreviousInlineImages;
43252
43559
  exports.getSelector = getSelector;
43253
43560
  exports.getSelector$1 = getSelector$1;
43254
43561
  exports.hasIncompleteAttachmentUploads = hasIncompleteAttachmentUploads;
43255
43562
  exports.imageOverlayTheme = imageOverlayTheme;
43256
- exports.insertImagesToContentString = insertImagesToContentString;
43257
- exports.isAttachmentUploadCompleted = isAttachmentUploadCompleted;
43563
+ exports.isMessageTooLong = isMessageTooLong;
43258
43564
  exports.lightTheme = lightTheme;
43259
43565
  exports.loadCallComposite = loadCallComposite;
43260
43566
  exports.loadCallWithChatComposite = loadCallWithChatComposite;
43261
43567
  exports.loadChatComposite = loadChatComposite;
43262
43568
  exports.loadOutboundCallComposite = loadOutboundCallComposite;
43569
+ exports.modifyInlineImagesInContentString = modifyInlineImagesInContentString;
43263
43570
  exports.onRenderCancelIcon = onRenderCancelIcon;
43264
43571
  exports.onRenderSubmitIcon = onRenderSubmitIcon;
43265
43572
  exports.onResolveVideoEffectDependency = onResolveVideoEffectDependency;
@@ -43287,4 +43594,4 @@ exports.useTeamsCall = useTeamsCall;
43287
43594
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
43288
43595
  exports.useTeamsCallAgent = useTeamsCallAgent;
43289
43596
  exports.useTheme = useTheme;
43290
- //# sourceMappingURL=index-YIP5Cyt3.js.map
43597
+ //# sourceMappingURL=index-B74o7NiP.js.map