@100mslive/roomkit-react 0.3.22-alpha.0 → 0.3.22-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. package/dist/Accordion/Accordion.d.ts +134 -322
  2. package/dist/Accordion/index.d.ts +134 -322
  3. package/dist/Avatar/Avatar.d.ts +47 -141
  4. package/dist/Button/Button.d.ts +47 -141
  5. package/dist/Checkbox/Checkbox.d.ts +134 -322
  6. package/dist/Collapsible/Collapsible.d.ts +201 -483
  7. package/dist/ConferenceScreen-5G5WGPIO.css +2780 -0
  8. package/dist/{HLSView-JYFTZVCM.css.map → ConferenceScreen-5G5WGPIO.css.map} +1 -1
  9. package/dist/ConferenceScreen-KS5URW6Z.js +1778 -0
  10. package/dist/ConferenceScreen-KS5URW6Z.js.map +7 -0
  11. package/dist/Divider/Divider.d.ts +134 -322
  12. package/dist/Dropdown/Dropdown.d.ts +804 -1932
  13. package/dist/EmbedView-BCRQ3GHV.js +17 -0
  14. package/dist/EmbedView-BCRQ3GHV.js.map +7 -0
  15. package/dist/EmbedView-Y24VRONT.css +2780 -0
  16. package/dist/EmbedView-Y24VRONT.css.map +7 -0
  17. package/dist/EmojiReaction-NA5F5DWN.js +11 -0
  18. package/dist/EmojiReaction-NA5F5DWN.js.map +7 -0
  19. package/dist/Fieldset/Fieldset.d.ts +47 -141
  20. package/dist/Footer/Footer.d.ts +536 -1288
  21. package/dist/{HLSView-JYFTZVCM.css → HLSView-DC43TOIW.css} +3 -3
  22. package/dist/HLSView-DC43TOIW.css.map +7 -0
  23. package/dist/{HLSView-EPPGI6XI.js → HLSView-XRGOWFRB.js} +38 -24
  24. package/dist/HLSView-XRGOWFRB.js.map +7 -0
  25. package/dist/IconButton/IconButton.d.ts +47 -141
  26. package/dist/Input/Input.d.ts +362 -926
  27. package/dist/Label/Label.d.ts +47 -141
  28. package/dist/Layout/Box.d.ts +47 -141
  29. package/dist/Layout/Flex.d.ts +47 -141
  30. package/dist/LeaveScreen-3OZN3MU3.css +2780 -0
  31. package/dist/LeaveScreen-3OZN3MU3.css.map +7 -0
  32. package/dist/LeaveScreen-PC4KB6OG.js +556 -0
  33. package/dist/LeaveScreen-PC4KB6OG.js.map +7 -0
  34. package/dist/Link/Link.d.ts +47 -141
  35. package/dist/Modal/Dialog.d.ts +329 -987
  36. package/dist/Modal/DialogContent.d.ts +469 -1127
  37. package/dist/MoreSettings-KTRYHDB2.css +2780 -0
  38. package/dist/MoreSettings-KTRYHDB2.css.map +7 -0
  39. package/dist/MoreSettings-XLNYT7PW.js +16 -0
  40. package/dist/MoreSettings-XLNYT7PW.js.map +7 -0
  41. package/dist/PDFView-LJ7I3K3H.js +84 -0
  42. package/dist/PDFView-LJ7I3K3H.js.map +7 -0
  43. package/dist/PDFView-RJK44WVO.css +2780 -0
  44. package/dist/PDFView-RJK44WVO.css.map +7 -0
  45. package/dist/Pagination/StyledPagination.d.ts +268 -644
  46. package/dist/Polls-AULCHMLW.js +1584 -0
  47. package/dist/Polls-AULCHMLW.js.map +7 -0
  48. package/dist/Polls-K4GO5ZOC.css +2780 -0
  49. package/dist/Polls-K4GO5ZOC.css.map +7 -0
  50. package/dist/Popover/index.d.ts +201 -483
  51. package/dist/Prebuilt/IconButton.d.ts +134 -322
  52. package/dist/Prebuilt/components/Chat/ChatBody.d.ts +134 -322
  53. package/dist/Prebuilt/components/Leave/LeaveAtoms.d.ts +335 -805
  54. package/dist/Prebuilt/components/Notifications/DeviceChangeNotifications.d.ts +1 -0
  55. package/dist/Prebuilt/components/Notifications/DeviceInUseError.d.ts +2 -0
  56. package/dist/Prebuilt/components/Notifications/ErrorNotifications.d.ts +1 -0
  57. package/dist/Prebuilt/components/Notifications/MessageNotifications.d.ts +1 -0
  58. package/dist/Prebuilt/components/Notifications/PollNotificationModal.d.ts +1 -0
  59. package/dist/Prebuilt/components/Settings/common.d.ts +134 -322
  60. package/dist/Progress/index.d.ts +134 -322
  61. package/dist/RadioGroup/RadioGroup.d.ts +201 -483
  62. package/dist/RaiseHand-E4OVMBW6.js +10 -0
  63. package/dist/RaiseHand-E4OVMBW6.js.map +7 -0
  64. package/dist/ReactSelect/ReactSelect.d.ts +670 -1610
  65. package/dist/RoleProminence-LHUXHLVI.css +2780 -0
  66. package/dist/RoleProminence-LHUXHLVI.css.map +7 -0
  67. package/dist/RoleProminence-RWJP2Z36.js +116 -0
  68. package/dist/RoleProminence-RWJP2Z36.js.map +7 -0
  69. package/dist/RoomDetailsPane-6BM2FPWW.css +2780 -0
  70. package/dist/RoomDetailsPane-6BM2FPWW.css.map +7 -0
  71. package/dist/RoomDetailsPane-7OP2CNJW.js +53 -0
  72. package/dist/RoomDetailsPane-7OP2CNJW.js.map +7 -0
  73. package/dist/ScreenshareLayout-RHTD2PQT.css +2780 -0
  74. package/dist/ScreenshareLayout-RHTD2PQT.css.map +7 -0
  75. package/dist/ScreenshareLayout-TM7DLYLH.js +358 -0
  76. package/dist/ScreenshareLayout-TM7DLYLH.js.map +7 -0
  77. package/dist/Select/Select.d.ts +201 -483
  78. package/dist/Sheet/Sheet.d.ts +329 -987
  79. package/dist/SidePaneTabs-T7BKZ2AT.js +1354 -0
  80. package/dist/SidePaneTabs-T7BKZ2AT.js.map +7 -0
  81. package/dist/SidePaneTabs-TBUPHNAU.css +2780 -0
  82. package/dist/SidePaneTabs-TBUPHNAU.css.map +7 -0
  83. package/dist/Slider/Slider.d.ts +47 -141
  84. package/dist/Stats/StyledStats.d.ts +402 -966
  85. package/dist/Switch/Switch.d.ts +47 -141
  86. package/dist/Tabs/Tabs.d.ts +268 -644
  87. package/dist/Text/Text.d.ts +47 -141
  88. package/dist/TextArea/TextArea.d.ts +47 -141
  89. package/dist/Theme/base.config.d.ts +26 -78
  90. package/dist/Theme/stitches.config.d.ts +1046 -1493
  91. package/dist/TileMenu/StyledMenuTile.d.ts +469 -1127
  92. package/dist/Toast/Toast.d.ts +382 -946
  93. package/dist/VBPicker-M5VYFEUB.css +2780 -0
  94. package/dist/VBPicker-M5VYFEUB.css.map +7 -0
  95. package/dist/VBPicker-TQLIL3NC.js +322 -0
  96. package/dist/VBPicker-TQLIL3NC.js.map +7 -0
  97. package/dist/Video/Video.d.ts +47 -141
  98. package/dist/VideoList/StyledVideoList.d.ts +201 -483
  99. package/dist/VideoTile/StyledVideoTile.d.ts +670 -1610
  100. package/dist/WaitingView-TLJ52XYA.js +10 -0
  101. package/dist/WaitingView-TLJ52XYA.js.map +7 -0
  102. package/dist/WhiteboardLayout-PZZTM2FW.css +2780 -0
  103. package/dist/WhiteboardLayout-PZZTM2FW.css.map +7 -0
  104. package/dist/WhiteboardLayout-YYZ5UVGG.js +96 -0
  105. package/dist/WhiteboardLayout-YYZ5UVGG.js.map +7 -0
  106. package/dist/android-perm-1.png +0 -0
  107. package/dist/audio-level.png +0 -0
  108. package/dist/chunk-42XPBCZO.js +487 -0
  109. package/dist/chunk-42XPBCZO.js.map +7 -0
  110. package/dist/chunk-4BQ3AMVG.js +16802 -0
  111. package/dist/chunk-4BQ3AMVG.js.map +7 -0
  112. package/dist/chunk-4L5OKEIV.js +90 -0
  113. package/dist/chunk-4L5OKEIV.js.map +7 -0
  114. package/dist/chunk-6BX3VCVC.js +6337 -0
  115. package/dist/chunk-6BX3VCVC.js.map +7 -0
  116. package/dist/chunk-A3COGXMF.js +114 -0
  117. package/dist/chunk-A3COGXMF.js.map +7 -0
  118. package/dist/chunk-B3HHL3ND.js +178 -0
  119. package/dist/chunk-B3HHL3ND.js.map +7 -0
  120. package/dist/chunk-B5NLX6N6.js +41 -0
  121. package/dist/chunk-B5NLX6N6.js.map +7 -0
  122. package/dist/chunk-BXBPZGSP.js +161 -0
  123. package/dist/chunk-BXBPZGSP.js.map +7 -0
  124. package/dist/chunk-DVVFWHQG.js +136 -0
  125. package/dist/chunk-DVVFWHQG.js.map +7 -0
  126. package/dist/chunk-GV2DTYSU.js +262 -0
  127. package/dist/chunk-GV2DTYSU.js.map +7 -0
  128. package/dist/chunk-KF2YEUWU.js +254 -0
  129. package/dist/chunk-KF2YEUWU.js.map +7 -0
  130. package/dist/chunk-KQXTIHI6.js +59 -0
  131. package/dist/chunk-KQXTIHI6.js.map +7 -0
  132. package/dist/chunk-MR3HE7HV.js +830 -0
  133. package/dist/chunk-MR3HE7HV.js.map +7 -0
  134. package/dist/chunk-OQBTPJPO.js +71 -0
  135. package/dist/chunk-OQBTPJPO.js.map +7 -0
  136. package/dist/chunk-P7OOTR7P.js +2595 -0
  137. package/dist/chunk-P7OOTR7P.js.map +7 -0
  138. package/dist/chunk-THDU2DKP.js +30 -0
  139. package/dist/chunk-THDU2DKP.js.map +7 -0
  140. package/dist/chunk-U4QYH2BP.js +98 -0
  141. package/dist/chunk-U4QYH2BP.js.map +7 -0
  142. package/dist/chunk-USEEH3QW.js +418 -0
  143. package/dist/chunk-USEEH3QW.js.map +7 -0
  144. package/dist/chunk-UZW3C3ML.js +171 -0
  145. package/dist/chunk-UZW3C3ML.js.map +7 -0
  146. package/dist/chunk-YDIB6WKJ.js +576 -0
  147. package/dist/chunk-YDIB6WKJ.js.map +7 -0
  148. package/dist/chunk-ZFTULCCP.js +62 -0
  149. package/dist/chunk-ZFTULCCP.js.map +7 -0
  150. package/dist/empty-chat.svg +12 -0
  151. package/dist/index.cjs.css +2 -2
  152. package/dist/index.cjs.css.map +1 -1
  153. package/dist/index.cjs.js +22737 -22481
  154. package/dist/index.cjs.js.map +4 -4
  155. package/dist/index.css +2 -2
  156. package/dist/index.css.map +1 -1
  157. package/dist/index.js +25 -15
  158. package/dist/ios-perm-0.png +0 -0
  159. package/dist/meta.cjs.json +5680 -5307
  160. package/dist/meta.esbuild.json +8824 -5953
  161. package/dist/pdf-share.png +0 -0
  162. package/dist/screen-share.png +0 -0
  163. package/dist/transaction_error.svg +12 -0
  164. package/package.json +8 -8
  165. package/src/Avatar/Avatar.tsx +1 -1
  166. package/src/Popover/Popover.stories.tsx +1 -1
  167. package/src/Prebuilt/App.tsx +6 -2
  168. package/src/Prebuilt/components/Chat/Chat.tsx +12 -8
  169. package/src/Prebuilt/components/Chat/ChatFooter.tsx +1 -1
  170. package/src/Prebuilt/components/Header/common.jsx +6 -5
  171. package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +18 -0
  172. package/src/Prebuilt/components/Notifications/DeviceInUseError.tsx +79 -0
  173. package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +56 -0
  174. package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +24 -0
  175. package/src/Prebuilt/components/Notifications/Notifications.tsx +13 -159
  176. package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +23 -2
  177. package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +71 -0
  178. package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +1 -5
  179. package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +7 -5
  180. package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +23 -1
  181. package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +13 -5
  182. package/src/Prebuilt/components/StatsForNerds.jsx +32 -3
  183. package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +43 -31
  184. package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +2 -2
  185. package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +3 -1
  186. package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +6 -0
  187. package/src/Prebuilt/layouts/HLSView.jsx +1 -0
  188. package/src/Prebuilt/layouts/PDFView.jsx +1 -0
  189. package/src/Prebuilt/layouts/SidePane.tsx +12 -6
  190. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +35 -34
  191. package/dist/HLSView-EPPGI6XI.js.map +0 -7
  192. package/dist/chunk-ZAX5VT7V.js +0 -34686
  193. package/dist/chunk-ZAX5VT7V.js.map +0 -7
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Prebuilt/components/MoreSettings/MoreSettings.tsx", "../src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx", "../src/Prebuilt/components/PIP/index.jsx", "../src/Prebuilt/components/PIP/PIPComponent.tsx", "../src/Prebuilt/components/PIP/SetupMediaSession.js", "../src/Prebuilt/components/PIP/PIPChat.tsx", "../src/Prebuilt/components/Chat/ChatBody.tsx", "../src/Prebuilt/components/Chat/ChatActions.tsx", "../src/Prebuilt/components/Chat/MwebChatOption.tsx", "../src/Prebuilt/components/hooks/useChatBlacklist.ts", "../src/Prebuilt/components/hooks/usePinnedMessages.ts", "../src/Prebuilt/components/Chat/EmptyChat.tsx", "../src/Prebuilt/components/hooks/usePinnedBy.tsx", "../src/Prebuilt/components/Chat/utils.ts", "../src/Prebuilt/components/PIP/PIPChatOption.tsx", "../src/Prebuilt/components/PIP/PIPWindow.tsx", "../src/Prebuilt/components/Settings/StartRecording.jsx", "../src/Prebuilt/components/Streaming/ResolutionInput.jsx", "../src/Prebuilt/components/StatsForNerds.jsx", "../src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx", "../src/Prebuilt/components/MoreSettings/CaptionModal.tsx", "../src/Prebuilt/components/MoreSettings/CaptionContent.tsx", "../src/Prebuilt/components/MoreSettings/FullScreenItem.tsx", "../src/Prebuilt/components/hooks/useFullscreen.ts", "../src/Prebuilt/components/MoreSettings/MuteAllModal.tsx", "../src/Prebuilt/components/MoreSettings/MuteAllContent.tsx", "../src/Prebuilt/components/PIP/usePIPChat.tsx", "../src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx", "../src/Prebuilt/components/hooks/useUnreadPollQuizPresent.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport { useMedia } from 'react-use';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\n// @ts-ignore: No implicit Any\nimport { DesktopOptions } from './SplitComponents/DesktopOptions';\n// @ts-ignore: No implicit Any\nimport { MwebOptions } from './SplitComponents/MwebOptions';\nimport { config as cssConfig } from '../../..';\nimport { useLandscapeHLSStream } from '../../common/hooks';\n\nexport const MoreSettings = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n const isLandscapeHLSStream = useLandscapeHLSStream();\n return isMobile || isLandscapeHLSStream ? (\n <MwebOptions elements={elements} screenType={screenType} />\n ) : (\n <DesktopOptions elements={elements} screenType={screenType} />\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { HMSHLSPlayer } from '@100mslive/hls-player';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\nimport { match } from 'ts-pattern';\nimport {\n HMSTranscriptionMode,\n selectAppData,\n selectIsTranscriptionAllowedByMode,\n selectIsTranscriptionEnabled,\n selectLocalPeerID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport {\n BrbIcon,\n CheckIcon,\n HamburgerMenuIcon,\n InfoIcon,\n OpenCaptionIcon,\n PipIcon,\n SettingsIcon,\n} from '@100mslive/react-icons';\nimport { Checkbox, Dropdown, Flex, Switch, Text, Tooltip } from '../../../..';\nimport IconButton from '../../../IconButton';\n// @ts-ignore: No implicit any\nimport { PIP } from '../../PIP';\nimport { PIPChat } from '../../PIP/PIPChat';\n// @ts-ignore: No implicit any\nimport { PIPChatOption } from '../../PIP/PIPChatOption';\nimport { PictureInPicture } from '../../PIP/PIPManager';\nimport { PIPWindow } from '../../PIP/PIPWindow';\n// @ts-ignore: No implicit any\nimport { RoleChangeModal } from '../../RoleChangeModal';\n// @ts-ignore: No implicit any\nimport SettingsModal from '../../Settings/SettingsModal';\n// @ts-ignore: No implicit any\nimport StartRecording from '../../Settings/StartRecording';\n// @ts-ignore: No implicit any\nimport { StatsForNerds } from '../../StatsForNerds';\n// @ts-ignore: No implicit any\nimport { BulkRoleChangeModal } from '../BulkRoleChangeModal';\nimport { CaptionModal } from '../CaptionModal';\n// @ts-ignore: No implicit any\nimport { FullScreenItem } from '../FullScreenItem';\nimport { MuteAllModal } from '../MuteAllModal';\n// @ts-ignore: No implicit any\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../../AppData/useSidepane';\n// @ts-ignore: No implicit any\nimport { useDropdownList } from '../../hooks/useDropdownList';\nimport { useMyMetadata } from '../../hooks/useMetadata';\n// @ts-ignore: No implicit any\nimport { usePIPChat } from '../../PIP/usePIPChat';\n// @ts-ignore: No implicit any\nimport { APP_DATA, isMacOS, SIDE_PANE_OPTIONS } from '../../../common/constants';\n\nconst MODALS = {\n CHANGE_NAME: 'changeName',\n SELF_ROLE_CHANGE: 'selfRoleChange',\n MORE_SETTINGS: 'moreSettings',\n START_RECORDING: 'startRecording',\n DEVICE_SETTINGS: 'deviceSettings',\n STATS_FOR_NERDS: 'statsForNerds',\n BULK_ROLE_CHANGE: 'bulkRoleChange',\n MUTE_ALL: 'muteAll',\n EMBED_URL: 'embedUrl',\n CAPTION: 'caption',\n};\n\nexport const DesktopOptions = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements & HLSLiveStreamingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const localPeerId = useHMSStore(selectLocalPeerID);\n const hmsActions = useHMSActions();\n const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));\n const [openModals, setOpenModals] = useState(new Set());\n const { isBRBOn, toggleBRB } = useMyMetadata();\n const isPipOn = PictureInPicture.isOn();\n const isBRBEnabled = !!elements?.brb;\n const isTranscriptionAllowed = useHMSStore(selectIsTranscriptionAllowedByMode(HMSTranscriptionMode.CAPTION));\n const isTranscriptionEnabled = useHMSStore(selectIsTranscriptionEnabled);\n const { isSupported, pipWindow, requestPipWindow } = usePIPChat();\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n // Hide if pip chat is already open\n const showPipChatOption = !!elements?.chat && isSupported && !pipWindow;\n\n useDropdownList({ open: openModals.size > 0, name: 'MoreSettings' });\n\n const updateState = (modalName: string, value: boolean) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n // avoiding extra set state trigger which removes currently open dialog by clearing set.\n copy.clear();\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n\n return (\n <Fragment>\n {isSupported && pipWindow ? (\n <PIPWindow pipWindow={pipWindow}>\n <PIPChat />\n </PIPWindow>\n ) : null}\n <Dropdown.Root\n open={openModals.has(MODALS.MORE_SETTINGS)}\n onOpenChange={value => updateState(MODALS.MORE_SETTINGS, value)}\n modal={false}\n >\n <Tooltip title=\"More options\">\n <Dropdown.Trigger asChild data-testid=\"more_settings_btn\">\n <IconButton>\n <HamburgerMenuIcon />\n </IconButton>\n </Dropdown.Trigger>\n </Tooltip>\n\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{\n py: '$0',\n maxHeight: 'unset',\n '@md': { w: '$64' },\n \"div[role='separator']:first-child\": {\n display: 'none',\n },\n }}\n >\n {isBRBEnabled && screenType !== 'hls_live_streaming' ? (\n <Dropdown.Item onClick={toggleBRB} data-testid=\"brb_btn\">\n <BrbIcon />\n <Text variant=\"sm\" css={{ ml: '$4', color: '$on_surface_high' }}>\n Be Right Back\n </Text>\n <Flex justify=\"end\" css={{ color: '$on_surface_high', flexGrow: '1' }}>\n {isBRBOn ? <CheckIcon /> : null}\n </Flex>\n </Dropdown.Item>\n ) : null}\n {isTranscriptionAllowed ? (\n <Dropdown.Item\n data-testid=\"closed_caption_admin\"\n onClick={() => {\n updateState(MODALS.CAPTION, true);\n }}\n >\n <OpenCaptionIcon />\n <Flex direction=\"column\" css={{ flexGrow: '1' }}>\n <Text variant=\"sm\" css={{ ml: '$4', color: '$on_surface_high' }}>\n Closed Captions\n </Text>\n <Text variant=\"caption\" css={{ ml: '$4', color: '$on_surface_medium' }}>\n {isTranscriptionEnabled ? 'Enabled' : 'Disabled'}\n </Text>\n </Flex>\n <Switch id=\"closed_caption_start_stop\" checked={isTranscriptionEnabled} disabled={false} />\n </Dropdown.Item>\n ) : null}\n {screenType !== 'hls_live_streaming' ? (\n <Dropdown.Item css={{ p: 0, '&:empty': { display: 'none' } }}>\n <PIP\n content={\n <Flex css={{ w: '100%', h: '100%', p: '$8' }}>\n <PipIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {isPipOn ? 'Disable' : 'Enable'} Picture-in-Picture\n </Text>\n </Flex>\n }\n />\n </Dropdown.Item>\n ) : null}\n\n <PIPChatOption\n showPIPChat={showPipChatOption}\n openChat={async () => {\n isChatOpen && toggleChat();\n await requestPipWindow(350, 500);\n }}\n />\n <FullScreenItem />\n <Dropdown.ItemSeparator css={{ mx: 0 }} />\n <Dropdown.Item onClick={() => updateState(MODALS.DEVICE_SETTINGS, true)} data-testid=\"device_settings_btn\">\n <SettingsIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Settings\n </Text>\n </Dropdown.Item>\n {match({ screenType, isSupported: HMSHLSPlayer.isSupported() })\n .with({ screenType: 'hls_live_streaming', isSupported: false }, () => null)\n .with({ screenType: 'hls_live_streaming', isSupported: true }, () => {\n return (\n <Dropdown.Item\n onClick={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}\n data-testid=\"hls_stats\"\n >\n <Checkbox.Root\n css={{ margin: '$2' }}\n checked={enablHlsStats}\n onCheckedChange={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n <Flex justify=\"between\" css={{ width: '100%' }}>\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Show HLS Stats\n </Text>\n\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {`${isMacOS ? '\u2318' : 'ctrl'} + ]`}\n </Text>\n </Flex>\n </Dropdown.Item>\n );\n })\n .otherwise(() => (\n <Dropdown.Item\n onClick={() => updateState(MODALS.STATS_FOR_NERDS, true)}\n data-testid=\"stats_for_nerds_btn\"\n >\n <InfoIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Stats for Nerds\n </Text>\n </Dropdown.Item>\n ))}\n </Dropdown.Content>\n </Dropdown.Root>\n {openModals.has(MODALS.BULK_ROLE_CHANGE) && (\n <BulkRoleChangeModal onOpenChange={(value: boolean) => updateState(MODALS.BULK_ROLE_CHANGE, value)} />\n )}\n {openModals.has(MODALS.MUTE_ALL) && (\n <MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} />\n )}\n\n {openModals.has(MODALS.START_RECORDING) && (\n <StartRecording open onOpenChange={(value: boolean) => updateState(MODALS.START_RECORDING, value)} />\n )}\n {openModals.has(MODALS.DEVICE_SETTINGS) && (\n <SettingsModal\n open\n onOpenChange={(value: boolean) => updateState(MODALS.DEVICE_SETTINGS, value)}\n screenType={screenType}\n />\n )}\n {openModals.has(MODALS.STATS_FOR_NERDS) && (\n <StatsForNerds open onOpenChange={(value: boolean) => updateState(MODALS.STATS_FOR_NERDS, value)} />\n )}\n {openModals.has(MODALS.SELF_ROLE_CHANGE) && (\n <RoleChangeModal\n peerId={localPeerId}\n onOpenChange={(value: boolean) => updateState(MODALS.SELF_ROLE_CHANGE, value)}\n />\n )}\n {openModals.has(MODALS.CAPTION) && (\n <CaptionModal onOpenChange={(value: boolean) => updateState(MODALS.CAPTION, value)} />\n )}\n {/* {openModals.has(MODALS.EMBED_URL) && (\n <EmbedUrlModal onOpenChange={value => updateState(MODALS.EMBED_URL, value)} />\n )} */}\n </Fragment>\n );\n};\n", "import React from 'react';\nimport PIPComponent from './PIPComponent';\n\nexport const PIP = ({ content = null }) => {\n return <PIPComponent content={content} />;\n};\n", "import React, { useCallback, useEffect, useState } from 'react';\nimport { selectPeers, selectTracksMap, useHMSActions, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { PipIcon } from '@100mslive/react-icons';\nimport { Flex, Tooltip } from '../../..';\nimport IconButton from '../../IconButton';\nimport { PictureInPicture } from './PIPManager';\n// @ts-ignore: No implicit Any\nimport { MediaSession } from './SetupMediaSession';\n// @ts-ignore: No implicit Any\nimport { usePinnedTrack } from '../AppData/useUISettings';\n\n/**\n * shows a button which when clicked shows some videos in PIP, clicking\n * again turns it off.\n */\nconst PIPComponent = ({ content = null }) => {\n const [isPipOn, setIsPipOn] = useState(PictureInPicture.isOn());\n const hmsActions = useHMSActions();\n const store = useHMSVanillaStore();\n\n const onPipToggle = useCallback(() => {\n if (!isPipOn) {\n PictureInPicture.start(hmsActions, setIsPipOn).catch(err => console.error('error in starting pip', err));\n MediaSession.setup(hmsActions, store);\n } else {\n PictureInPicture.stop().catch(err => console.error('error in stopping pip', err));\n }\n }, [hmsActions, isPipOn, store]);\n\n if (!PictureInPicture.isSupported()) {\n return null;\n }\n return (\n <>\n {content ? (\n <Flex css={{ w: '100%' }} onClick={() => onPipToggle()} data-testid=\"pip_btn\">\n {content}\n </Flex>\n ) : (\n <Tooltip title={`${isPipOn ? 'Deactivate' : 'Activate'} picture in picture view`}>\n <IconButton active={!isPipOn} key=\"pip\" onClick={() => onPipToggle()} data-testid=\"pip_btn\">\n <PipIcon />\n </IconButton>\n </Tooltip>\n )}\n </>\n );\n};\n\n/**\n * this is a separate component so it can be conditionally rendered and\n * the subscriptions to store are done only if required.\n */\nexport const ActivatedPIP = () => {\n const store = useHMSVanillaStore();\n const pinnedTrack = usePinnedTrack();\n\n useEffect(() => {\n function subscribeToStore() {\n return store.subscribe(tracksMap => {\n let pipPeers = store.getState(selectPeers);\n if (pinnedTrack) {\n pipPeers = pipPeers.filter(peer => pinnedTrack.peerId === peer.id);\n }\n PictureInPicture.updatePeersAndTracks(pipPeers, tracksMap).catch(err => {\n console.error('error in updating pip', err);\n });\n }, selectTracksMap);\n }\n let unsubscribe: (() => void) | undefined = PictureInPicture.isOn() ? subscribeToStore() : undefined;\n PictureInPicture.listenToStateChange(isOn => {\n if (isOn) {\n if (!unsubscribe) {\n unsubscribe = subscribeToStore();\n }\n } else {\n unsubscribe?.();\n unsubscribe = undefined;\n }\n });\n return () => {\n unsubscribe?.();\n unsubscribe = undefined;\n };\n }, [pinnedTrack, store]);\n\n return <></>;\n};\n\nexport default PIPComponent;\n", "import { selectIsLocalAudioEnabled, selectIsLocalVideoEnabled } from '@100mslive/react-sdk';\n\n/**\n * Media Session API allows for handling control actions on top of pip\n * https://web.dev/media-session/#video-conferencing-actions\n */\nclass SetupMediaSession {\n setup = (actions, store) => {\n this.actions = actions;\n this.store = store;\n this.initState();\n this.setUpHandlers();\n };\n\n initState = () => {\n const isMicActive = this.store.getState(selectIsLocalAudioEnabled);\n const isCamActive = this.store.getState(selectIsLocalVideoEnabled);\n navigator.mediaSession?.setMicrophoneActive?.(isMicActive);\n navigator.mediaSession?.setCameraActive?.(isCamActive);\n\n this.store.subscribe(isMicActive => {\n navigator.mediaSession?.setMicrophoneActive?.(isMicActive);\n }, selectIsLocalAudioEnabled);\n\n this.store.subscribe(isCamActive => {\n navigator.mediaSession?.setCameraActive?.(isCamActive);\n }, selectIsLocalVideoEnabled);\n };\n\n toggleMic = async () => {\n console.log('toggle mic clicked in pip');\n const current = this.store.getState(selectIsLocalAudioEnabled);\n await this.actions.setLocalAudioEnabled(!current);\n };\n\n toggleCam = async () => {\n console.log('toggle cam clicked in pip');\n const current = this.store.getState(selectIsLocalVideoEnabled);\n await this.actions.setLocalVideoEnabled(!current);\n };\n\n leave = () => {\n console.log('leave called from pip');\n this.actions.leave();\n };\n\n setUpHandlers = () => {\n if (navigator.mediaSession) {\n try {\n navigator.mediaSession.setActionHandler('togglemicrophone', this.toggleMic);\n navigator.mediaSession.setActionHandler('togglecamera', this.toggleCam);\n navigator.mediaSession.setActionHandler('hangup', this.leave);\n } catch (err) {\n console.error('error in setting media session handlers', err);\n }\n }\n };\n}\n\nexport const MediaSession = new SetupMediaSession();\n", "import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n selectHMSMessages,\n selectLocalPeerID,\n selectPeerNameByID,\n selectSessionStore,\n selectUnreadHMSMessagesCount,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { SendIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { TextArea } from '../../../TextArea';\nimport { Tooltip } from '../../../Tooltip';\nimport IconButton from '../../IconButton';\nimport { AnnotisedMessage } from '../Chat/ChatBody';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useIsPeerBlacklisted } from '../hooks/useChatBlacklist';\nimport { CHAT_MESSAGE_LIMIT, formatTime } from '../Chat/utils';\nimport { SESSION_STORE_KEY } from '../../common/constants';\n\nexport const PIPChat = () => {\n const messages = useHMSStore(selectHMSMessages);\n const localPeerID = useHMSStore(selectLocalPeerID);\n const count = useHMSStore(selectUnreadHMSMessagesCount);\n const [unreadMessageCount, setUnreadMessageCount] = useState(0);\n\n const getSenderName = useCallback(\n (senderName: string, senderID?: string) => {\n const slicedName = senderName.length > 10 ? senderName.slice(0, 10) + '...' : senderName;\n return slicedName + (senderID === localPeerID ? ' (You)' : '');\n },\n [localPeerID],\n );\n\n useEffect(() => {\n const timeoutId = setTimeout(() => {\n setUnreadMessageCount(count);\n }, 100);\n return () => clearTimeout(timeoutId);\n }, [count]);\n\n const blacklistedMessageIDs = useHMSStore(selectSessionStore(SESSION_STORE_KEY.CHAT_MESSAGE_BLACKLIST));\n const filteredMessages = useMemo(() => {\n const blacklistedMessageIDSet = new Set(blacklistedMessageIDs || []);\n return messages?.filter(message => message.type === 'chat' && !blacklistedMessageIDSet.has(message.id)) || [];\n }, [blacklistedMessageIDs, messages]);\n const { enabled: isChatEnabled = true, updatedBy: chatStateUpdatedBy = '' } =\n useHMSStore(selectSessionStore(SESSION_STORE_KEY.CHAT_STATE)) || {};\n const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });\n const { elements } = useRoomLayoutConferencingScreen();\n const message_placeholder = elements?.chat?.message_placeholder || 'Send a message';\n const canSendChatMessages =\n !!elements?.chat?.public_chat_enabled ||\n !!elements?.chat?.roles_whitelist?.length ||\n !!elements?.chat?.private_chat_enabled;\n\n const getChatStatus = useCallback(() => {\n if (isLocalPeerBlacklisted) return \"You've been blocked from sending messages\";\n if (!isChatEnabled)\n return `Chat has been paused by ${\n chatStateUpdatedBy.peerId === localPeerID ? 'you' : chatStateUpdatedBy?.userName\n }`;\n return message_placeholder;\n }, [\n chatStateUpdatedBy.peerId,\n chatStateUpdatedBy?.userName,\n isChatEnabled,\n isLocalPeerBlacklisted,\n localPeerID,\n message_placeholder,\n ]);\n\n return (\n <div style={{ height: '100%' }}>\n <Box\n id=\"chat-container\"\n css={{\n bg: '$surface_dim',\n overflowY: 'auto',\n // Subtracting height of footer\n h: canSendChatMessages ? 'calc(100% - 87px)' : '100%',\n position: 'relative',\n }}\n >\n {unreadMessageCount ? (\n <Box\n id=\"new-message-notif\"\n style={{\n position: 'fixed',\n bottom: '76px',\n right: '4px',\n }}\n >\n <Text\n variant=\"xs\"\n css={{ cursor: 'pointer' }}\n style={{ color: 'white', background: 'gray', padding: '4px', borderRadius: '4px' }}\n >\n {unreadMessageCount === 1 ? 'New message' : `${unreadMessageCount} new messages`}\n </Text>\n </Box>\n ) : (\n ''\n )}\n {filteredMessages.length === 0 ? (\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n width: '100%',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <Text variant=\"h5\" css={{ mt: '$8', c: '$on_surface_high' }}>\n {canSendChatMessages ? 'Start a conversation' : 'No messages yet'}\n </Text>\n {canSendChatMessages ? (\n <Text variant=\"sm\" style={{ maxWidth: '80%', textAlign: 'center', marginTop: '4px' }}>\n There are no messages here yet. Start a conversation by sending a message.\n </Text>\n ) : (\n ''\n )}\n </div>\n ) : (\n filteredMessages.map(message => (\n <Box className=\"pip-message\" key={message.id} id={message.id} style={{ padding: '8px 0.75rem' }}>\n <Flex style={{ width: '100%', alignItems: 'center', justifyContent: 'between' }}>\n <Text\n style={{ display: 'flex', justifyContent: 'between', width: '100%', alignItems: 'center' }}\n css={{\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n }}\n >\n <Flex style={{ flexGrow: 1, gap: '2px', alignItems: 'center' }}>\n {message.senderName === 'You' || !message.senderName ? (\n <Text as=\"span\" variant=\"sub2\" css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n {message.senderName || 'Anonymous'}\n </Text>\n ) : (\n <Tooltip title={message.senderName} side=\"top\" align=\"start\">\n <Text as=\"span\" variant=\"sub2\" css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n {getSenderName(message.senderName, message?.sender)}\n </Text>\n </Tooltip>\n )}\n <MessageTitle\n localPeerID={localPeerID}\n recipientPeer={message.recipientPeer}\n recipientRoles={message.recipientRoles}\n />\n </Flex>\n\n <Text\n variant=\"xs\"\n css={{\n color: '$on_surface_medium',\n flexShrink: 0,\n p: '$2',\n whitespace: 'nowrap',\n }}\n >\n {formatTime(message.time)}\n </Text>\n </Text>\n </Flex>\n <Text\n variant=\"sm\"\n css={{\n w: '100%',\n mt: '$2',\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n userSelect: 'all',\n color: '$on_surface_high',\n }}\n >\n <AnnotisedMessage message={message.message} />\n </Text>\n </Box>\n ))\n )}\n <div id=\"marker\" style={{ height: filteredMessages.length ? '1px' : 0 }} />\n </Box>\n {canSendChatMessages && (\n <Box css={{ bg: '$surface_dim' }}>\n <Flex css={{ px: '$4', pb: '3px', gap: '$2', alignItems: 'center' }}>\n <Text variant=\"caption\">To:</Text>\n <Flex css={{ bg: '$primary_bright', color: '$on_primary_high', r: '$2' }}>\n <select\n id=\"selector\"\n style={{\n background: 'inherit',\n color: 'inherit',\n border: 'none',\n outline: 'none',\n borderRadius: '4px',\n padding: '0 2px',\n }}\n defaultValue={elements.chat?.public_chat_enabled ? 'Everyone' : elements.chat?.roles_whitelist?.[0]}\n >\n {elements.chat?.roles_whitelist?.map(role => (\n <option key={role} value={role}>\n {role}\n </option>\n ))}\n {elements.chat?.public_chat_enabled ? <option value=\"Everyone\">Everyone</option> : ''}\n </select>\n </Flex>\n </Flex>\n <Flex\n align=\"center\"\n css={{\n bg: '$surface_default',\n minHeight: '$16',\n width: '100%',\n py: '$6',\n pl: '$4',\n boxSizing: 'border-box',\n gap: '$2',\n r: '$2',\n }}\n >\n <TextArea\n id=\"chat-input\"\n maxLength={CHAT_MESSAGE_LIMIT}\n disabled={!isChatEnabled || isLocalPeerBlacklisted}\n rows={1}\n css={{\n w: '100%',\n c: '$on_surface_high',\n p: '0.75rem 0.75rem !important',\n border: 'none',\n resize: 'none',\n }}\n placeholder={getChatStatus()}\n required\n autoComplete=\"off\"\n aria-autocomplete=\"none\"\n />\n\n <IconButton\n id=\"send-btn\"\n disabled={!isChatEnabled || isLocalPeerBlacklisted}\n title={getChatStatus()}\n css={{\n ml: 'auto',\n height: 'max-content',\n mr: '$4',\n '&:hover': { c: '$on_surface_medium' },\n }}\n data-testid=\"send_msg_btn\"\n >\n <SendIcon />\n </IconButton>\n </Flex>\n </Box>\n )}\n </div>\n );\n};\n\nconst MessageTitle = ({\n recipientPeer,\n recipientRoles,\n localPeerID,\n}: {\n recipientPeer?: string;\n recipientRoles?: string[];\n localPeerID: string;\n}) => {\n const peerName = useHMSStore(selectPeerNameByID(recipientPeer));\n\n return (\n <>\n {recipientRoles ? (\n <Text as=\"span\" variant=\"sub2\" css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n to {recipientRoles} (Group)\n </Text>\n ) : null}\n {recipientPeer ? (\n <Text as=\"span\" variant=\"sub2\" css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n to {recipientPeer === localPeerID ? 'You' : peerName} (DM)\n </Text>\n ) : null}\n </>\n );\n};\n", "import React, { Fragment, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { VariableSizeList } from 'react-window';\nimport {\n HMSMessage,\n HMSPeerID,\n HMSRoleName,\n selectHMSMessages,\n selectLocalPeerID,\n selectLocalPeerName,\n selectLocalPeerRoleName,\n selectPeerNameByID,\n selectSessionStore,\n selectUnreadHMSMessagesCount,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { SolidPinIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig, styled } from '../../../Theme';\nimport { Tooltip } from '../../../Tooltip';\nimport { ChatActions } from './ChatActions';\nimport { EmptyChat } from './EmptyChat';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { useSetSubscribedChatSelector } from '../AppData/useUISettings';\nimport { usePinnedBy } from '../hooks/usePinnedBy';\nimport { formatTime } from './utils';\nimport { CHAT_SELECTOR, SESSION_STORE_KEY } from '../../common/constants';\n\nconst rowHeights: Record<number, { size: number; id: string }> = {};\nlet listInstance: VariableSizeList | null = null; //eslint-disable-line\nfunction getRowHeight(index: number) {\n // 72 will be default row height for any message length\n return rowHeights[index]?.size || 72;\n}\n\nconst setRowHeight = (index: number, id: string, size: number) => {\n if (rowHeights[index]?.id === id && rowHeights[index]?.size === size) {\n return;\n }\n listInstance?.resetAfterIndex(Math.max(index - 1, 0));\n Object.assign(rowHeights, { [index]: { size, id } });\n};\n\nconst getMessageBackgroundColor = (\n messageType: string,\n selectedPeerID: string,\n selectedRole: string,\n isOverlay: boolean,\n) => {\n if (messageType && !(selectedPeerID || selectedRole)) {\n return isOverlay ? 'rgba(0, 0, 0, 0.64)' : '$surface_default';\n }\n return '';\n};\n\nconst MessageTypeContainer = ({ left, right }: { left?: string; right?: string }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n ml: '$2',\n mr: '$4',\n gap: '$space$2',\n flexWrap: 'nowrap',\n }}\n >\n {left && (\n <Text\n variant=\"xs\"\n as=\"span\"\n css={{\n color: '$on_surface_medium',\n textTransform: 'capitalize',\n fontWeight: '$regular',\n whiteSpace: 'nowrap',\n }}\n >\n {left}\n </Text>\n )}\n {right && (\n <Text\n as=\"span\"\n variant=\"overline\"\n css={{\n color: '$on_surface_medium',\n fontWeight: '$regular',\n whiteSpace: 'nowrap',\n }}\n >\n {right}\n </Text>\n )}\n </Flex>\n );\n};\n\nexport const MessageType = ({\n roles,\n hasCurrentUserSent,\n receiver,\n}: {\n roles?: HMSRoleName[];\n hasCurrentUserSent: boolean;\n receiver?: HMSPeerID;\n}) => {\n const peerName = useHMSStore(selectPeerNameByID(receiver));\n const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);\n if (receiver) {\n return (\n <MessageTypeContainer left={hasCurrentUserSent ? `${peerName ? `to ${peerName}` : ''}` : 'to You'} right=\"(DM)\" />\n );\n }\n\n if (roles && roles.length) {\n return <MessageTypeContainer left={`to ${hasCurrentUserSent ? roles[0] : localPeerRoleName}`} right=\"(Group)\" />;\n }\n return null;\n};\n\nconst URL_REGEX =\n /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;\n\nconst Link = styled('a', {\n color: '$primary_default',\n wordBreak: 'break-word',\n '&:hover': {\n textDecoration: 'underline',\n },\n});\n\nexport const AnnotisedMessage = ({ message, length }: { message: string; length?: number }) => {\n if (!message) {\n return <Fragment />;\n }\n\n return (\n <Fragment>\n {message\n .trim()\n .split(/(\\s)/)\n .map(part =>\n URL_REGEX.test(part) ? (\n <Link href={part} key={part} target=\"_blank\" rel=\"noopener noreferrer\">\n {part.slice(0, length)}\n </Link>\n ) : (\n part.slice(0, length)\n ),\n )}\n </Fragment>\n );\n};\n\nconst getMessageType = ({ roles, receiver }: { roles?: HMSRoleName[]; receiver?: HMSPeerID }) => {\n if (roles && roles.length > 0) {\n return 'role';\n }\n return receiver ? 'private' : '';\n};\n\nexport const SenderName = styled(Text, {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n width: '100%',\n minWidth: 0,\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n});\n\nconst ChatMessage = React.memo(\n ({ index, style = {}, message }: { message: HMSMessage; index: number; style: React.CSSProperties }) => {\n const { elements } = useRoomLayoutConferencingScreen();\n const rowRef = useRef<HTMLDivElement | null>(null);\n const isMobile = useMedia(cssConfig.media.md);\n const isPrivateChatEnabled = !!elements?.chat?.private_chat_enabled;\n const isOverlay = elements?.chat?.is_overlay && isMobile;\n const localPeerId = useHMSStore(selectLocalPeerID);\n const [selectedRole, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);\n const [selectedPeer, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER);\n const messageType = getMessageType({\n roles: message.recipientRoles,\n receiver: message.recipientPeer,\n });\n const [openSheet, setOpenSheetBare] = useState(false);\n const showPinAction = !!elements?.chat?.allow_pinning_messages;\n const showReply = message.sender !== selectedPeer.id && message.sender !== localPeerId && isPrivateChatEnabled;\n useLayoutEffect(() => {\n if (rowRef.current) {\n setRowHeight(index, message.id, rowRef.current.clientHeight);\n }\n }, [index, message.id]);\n\n const setOpenSheet = (value: boolean, e?: React.MouseEvent<HTMLElement, MouseEvent>) => {\n e?.stopPropagation();\n setOpenSheetBare(value);\n };\n\n return (\n <Box\n css={{\n mb: '$5',\n pr: '$10',\n mt: '$4',\n '&:not(:hover} .chat_actions': { display: 'none' },\n '&:hover .chat_actions': { display: 'flex', opacity: 1 },\n }}\n style={style}\n >\n <Flex\n ref={rowRef}\n align=\"center\"\n css={{\n flexWrap: 'wrap',\n position: 'relative',\n // Theme independent color, token should not be used for transparent chat\n background: getMessageBackgroundColor(messageType, selectedPeer.id, selectedRole, !!isOverlay),\n r: '$1',\n p: '$4',\n userSelect: 'none',\n '@md': {\n cursor: 'pointer',\n },\n '&:hover': {\n background: 'linear-gradient(277deg, $surface_default 0%, $surface_dim 60.87%)',\n },\n }}\n data-testid=\"chat_msg\"\n onClick={e => {\n if (isMobile) {\n setOpenSheet(true, e);\n }\n }}\n >\n <PinnedBy messageId={message.id} index={index} rowRef={rowRef} />\n <Text\n css={{\n color: isOverlay ? '#FFF' : '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'flex',\n alignItems: 'center',\n alignSelf: 'stretch',\n width: '100%',\n }}\n as=\"div\"\n >\n <Flex\n align=\"baseline\"\n css={{\n flexWrap: 'nowrap',\n maxWidth: 'calc(100% - 10ch)',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {message.senderName === 'You' || !message.senderName ? (\n <SenderName\n as=\"span\"\n variant=\"sub2\"\n css={{ color: isOverlay ? '#FFF' : '$on_surface_high', fontWeight: '$semiBold' }}\n >\n {message.senderName || 'Anonymous'}\n </SenderName>\n ) : (\n <Tooltip title={message.senderName} side=\"top\" align=\"start\" boxCss={{ zIndex: 50 }}>\n <SenderName\n as=\"span\"\n variant=\"sub2\"\n css={{ color: isOverlay ? '#FFF' : '$on_surface_high', fontWeight: '$semiBold' }}\n >\n {message.sender === localPeerId ? `${message.senderName} (You)` : message.senderName}\n </SenderName>\n </Tooltip>\n )}\n <MessageType\n hasCurrentUserSent={message.sender === localPeerId}\n receiver={message.recipientPeer}\n roles={message.recipientRoles}\n />\n </Flex>\n\n {!isOverlay ? (\n <Text\n as=\"span\"\n variant=\"caption\"\n css={{\n color: '$on_surface_medium',\n flexShrink: 0,\n position: 'absolute',\n right: 0,\n zIndex: 1,\n mr: '$4',\n p: '$2',\n }}\n >\n {formatTime(message.time)}\n </Text>\n ) : null}\n <ChatActions\n showPinAction={showPinAction}\n message={message}\n sentByLocalPeer={message.sender === localPeerId}\n onReply={() => {\n setRoleSelector('');\n setPeerSelector({ id: message.sender, name: message.senderName });\n }}\n onReplyGroup={() => {\n if (message.senderRole) {\n setRoleSelector(message.senderRole);\n setPeerSelector({});\n }\n }}\n showReply={showReply}\n isMobile={isMobile}\n openSheet={openSheet}\n setOpenSheet={setOpenSheet}\n />\n </Text>\n <Text\n variant=\"sm\"\n css={{\n w: '100%',\n mt: '$2',\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n userSelect: 'all',\n color: isOverlay ? '#FFF' : '$on_surface_high',\n }}\n onClick={e => {\n setOpenSheet(true, e);\n }}\n >\n <AnnotisedMessage message={message.message} />\n </Text>\n </Flex>\n </Box>\n );\n },\n);\n\nconst MessageWrapper = React.memo(\n ({ index, style, data }: { index: number; style: React.CSSProperties; data: HMSMessage[] }) => {\n return <ChatMessage style={style} index={index} key={data[index].id} message={data[index]} />;\n },\n);\n\nconst VirtualizedChatMessages = React.forwardRef<\n VariableSizeList,\n { messages: HMSMessage[]; scrollToBottom: (count: number) => void }\n>(({ messages, scrollToBottom }, listRef) => {\n const hmsActions = useHMSActions();\n const itemKey = useCallback((index: number, data: HMSMessage[]) => {\n return data[index].id;\n }, []);\n useEffect(() => {\n requestAnimationFrame(() => scrollToBottom(1));\n }, [scrollToBottom]);\n return (\n <Box\n css={{\n mr: '-$10',\n h: '100%',\n }}\n >\n <AutoSizer\n style={{\n width: '90%',\n }}\n >\n {({ height, width }: { height: number; width: number }) => (\n <VariableSizeList\n ref={node => {\n if (node) {\n // @ts-ignore\n listRef.current = node;\n listInstance = node;\n }\n }}\n itemCount={messages.length}\n itemSize={getRowHeight}\n itemData={messages}\n width={width}\n height={height}\n style={{\n overflowX: 'hidden',\n }}\n itemKey={itemKey}\n onItemsRendered={({ visibleStartIndex, visibleStopIndex }) => {\n for (let i = visibleStartIndex; i <= visibleStopIndex; i++) {\n if (!messages[i].read) {\n hmsActions.setMessageRead(true, messages[i].id);\n }\n }\n }}\n >\n {MessageWrapper}\n </VariableSizeList>\n )}\n </AutoSizer>\n </Box>\n );\n});\n\nexport const ChatBody = React.forwardRef<VariableSizeList, { scrollToBottom: (count: number) => void }>(\n ({ scrollToBottom }: { scrollToBottom: (count: number) => void }, listRef) => {\n const messages = useHMSStore(selectHMSMessages);\n const blacklistedMessageIDs = useHMSStore(selectSessionStore(SESSION_STORE_KEY.CHAT_MESSAGE_BLACKLIST));\n const filteredMessages = useMemo(() => {\n const blacklistedMessageIDSet = new Set(blacklistedMessageIDs || []);\n return messages?.filter(message => message.type === 'chat' && !blacklistedMessageIDSet.has(message.id)) || [];\n }, [blacklistedMessageIDs, messages]);\n\n const vanillaStore = useHMSVanillaStore();\n const rerenderOnFirstMount = useRef(false);\n\n useEffect(() => {\n const unsubscribe = vanillaStore.subscribe(() => {\n // @ts-ignore\n if (!listRef.current) {\n return;\n }\n // @ts-ignore\n const outerElement = listRef.current._outerRef;\n if (\n outerElement &&\n outerElement.clientHeight + outerElement.scrollTop + outerElement.offsetTop >= outerElement.scrollHeight\n ) {\n requestAnimationFrame(() => scrollToBottom(1));\n }\n }, selectUnreadHMSMessagesCount);\n return unsubscribe;\n }, [vanillaStore, listRef, scrollToBottom]);\n\n useEffect(() => {\n // @ts-ignore\n if (filteredMessages.length > 0 && listRef?.current && !rerenderOnFirstMount.current) {\n rerenderOnFirstMount.current = true;\n // @ts-ignore\n listRef.current.resetAfterIndex(0);\n }\n }, [listRef, filteredMessages]);\n\n return filteredMessages.length === 0 ? (\n <EmptyChat />\n ) : (\n <VirtualizedChatMessages messages={filteredMessages} ref={listRef} scrollToBottom={scrollToBottom} />\n );\n },\n);\n\nconst PinnedBy = ({\n messageId,\n index,\n rowRef,\n}: {\n messageId: string;\n index: number;\n rowRef?: React.MutableRefObject<HTMLDivElement | null>;\n}) => {\n const pinnedBy = usePinnedBy(messageId);\n const localPeerName = useHMSStore(selectLocalPeerName);\n\n useLayoutEffect(() => {\n if (rowRef?.current) {\n if (pinnedBy) {\n rowRef.current.style.background =\n 'linear-gradient(277deg, var(--hms-ui-colors-surface_default) 0%, var(--hms-ui-colors-surface_dim) 60.87%)';\n } else {\n rowRef.current.style.background = '';\n }\n setRowHeight(index, messageId, rowRef?.current.clientHeight);\n }\n }, [index, messageId, pinnedBy, rowRef]);\n\n if (!pinnedBy) {\n return null;\n }\n\n return (\n <Flex align=\"center\" css={{ gap: '$2', mb: '$2', color: '$on_surface_low' }}>\n <SolidPinIcon height={12} width={12} />\n <Text variant=\"xs\" css={{ color: 'inherit' }}>\n Pinned by {localPeerName === pinnedBy ? 'you' : pinnedBy}\n </Text>\n </Flex>\n );\n};\n", "import React, { useCallback, useState } from 'react';\nimport { HMSMessage, selectLocalPeerName, selectPermissions, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport {\n CopyIcon,\n CrossCircleIcon,\n CrossIcon,\n EyeCloseIcon,\n PeopleRemoveIcon,\n PinIcon,\n ReplyGroupIcon,\n ReplyIcon,\n VerticalMenuIcon,\n} from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { IconButton } from '../../../IconButton';\nimport { Flex } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport { Tooltip } from '../../../Tooltip';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\nimport { MwebChatOption } from './MwebChatOption';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useChatBlacklist, useIsPeerBlacklisted } from '../hooks/useChatBlacklist';\nimport { usePinnedMessages } from '../hooks/usePinnedMessages';\nimport { SESSION_STORE_KEY } from '../../common/constants';\n\nconst iconStyle = { height: '1.125rem', width: '1.125rem' };\nconst tooltipBoxCSS = {\n fontSize: '$xs',\n backgroundColor: '$surface_default',\n p: '$1 $5',\n fontWeight: '$regular',\n borderRadius: '$3',\n};\n\nexport const ChatActions = ({\n showPinAction,\n onReply,\n onReplyGroup,\n showReply,\n message,\n sentByLocalPeer,\n isMobile,\n openSheet,\n setOpenSheet,\n}: {\n showPinAction: boolean;\n onReply: () => void;\n onReplyGroup: () => void;\n showReply: boolean;\n message: HMSMessage;\n sentByLocalPeer: boolean;\n isMobile: boolean;\n openSheet: boolean;\n setOpenSheet: (value: boolean, e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n}) => {\n const { elements } = useRoomLayoutConferencingScreen();\n const { can_hide_message = false, can_block_user = false } = elements?.chat?.real_time_controls || {};\n const { roles_whitelist = [] } = elements?.chat || {};\n\n const [open, setOpen] = useState(false);\n const actions = useHMSActions();\n const canRemoveOthers = useHMSStore(selectPermissions)?.removeOthers;\n const { blacklistItem: blacklistPeer } = useChatBlacklist(SESSION_STORE_KEY.CHAT_PEER_BLACKLIST);\n const localPeerName = useHMSStore(selectLocalPeerName);\n const { setPinnedMessages, unpinBlacklistedMessages } = usePinnedMessages();\n\n const { blacklistItem: blacklistMessage, blacklistedIDs: blacklistedMessageIDs } = useChatBlacklist(\n SESSION_STORE_KEY.CHAT_MESSAGE_BLACKLIST,\n );\n\n const isSenderBlocked = useIsPeerBlacklisted({ peerCustomerUserId: message.senderUserId });\n\n const updatePinnedMessages = useCallback(\n (messageID = '') => {\n const blacklistedMessageIDSet = new Set([...(blacklistedMessageIDs || []), messageID]);\n unpinBlacklistedMessages(blacklistedMessageIDSet);\n },\n [blacklistedMessageIDs, unpinBlacklistedMessages],\n );\n\n const copyMessageContent = useCallback(() => {\n try {\n navigator?.clipboard.writeText(message.message);\n ToastManager.addToast({\n title: 'Message copied successfully',\n });\n } catch (e) {\n console.log(e);\n ToastManager.addToast({\n title: 'Could not copy message',\n });\n }\n }, [message]);\n\n const options: Record<\n string,\n {\n text: string;\n tooltipText?: string;\n icon: React.ReactNode;\n onClick: () => void | Promise<void>;\n show: boolean;\n color?: string;\n }\n > = {\n reply: {\n text: 'Reply privately',\n tooltipText: 'Reply privately',\n icon: <ReplyIcon style={iconStyle} />,\n onClick: onReply,\n show: showReply,\n },\n replyGroup: {\n text: 'Reply to group',\n tooltipText: 'Reply to group',\n icon: <ReplyGroupIcon style={iconStyle} />,\n onClick: onReplyGroup,\n show: !!message.senderRole && roles_whitelist.includes(message.senderRole),\n },\n pin: {\n text: 'Pin message',\n tooltipText: 'Pin',\n icon: <PinIcon style={iconStyle} />,\n onClick: () => setPinnedMessages(message, localPeerName || ''),\n show: showPinAction,\n },\n copy: {\n text: 'Copy text',\n tooltipText: 'Copy',\n icon: <CopyIcon style={iconStyle} />,\n onClick: copyMessageContent,\n show: true,\n },\n hide: {\n text: message.recipientPeer ? 'Hide for both' : 'Hide for everyone',\n icon: <EyeCloseIcon style={iconStyle} />,\n onClick: async () => {\n blacklistMessage(message.id);\n updatePinnedMessages(message.id);\n },\n show: !!can_hide_message,\n },\n block: {\n text: 'Block from chat',\n icon: <CrossCircleIcon style={iconStyle} />,\n onClick: async () => {\n if (message.senderUserId) {\n blacklistPeer(message.senderUserId);\n }\n },\n color: '$alert_error_default',\n show: !!can_block_user && !sentByLocalPeer && !isSenderBlocked,\n },\n remove: {\n text: 'Remove participant',\n icon: <PeopleRemoveIcon style={iconStyle} />,\n color: '$alert_error_default',\n show: !!canRemoveOthers && !sentByLocalPeer,\n onClick: async () => {\n if (!message.sender) {\n return;\n }\n try {\n await actions.removePeer(message.sender, '');\n } catch (error) {\n ToastManager.addToast({ title: (error as Error).message, variant: 'error' });\n }\n },\n },\n };\n\n if (isMobile) {\n return (\n <Sheet.Root open={openSheet} onOpenChange={setOpenSheet}>\n <Sheet.Content css={{ bg: '$surface_default', pb: '$14' }} onClick={e => setOpenSheet(false, e)}>\n <Sheet.Title\n css={{\n display: 'flex',\n color: '$on_surface_high',\n w: '100%',\n justifyContent: 'space-between',\n mt: '$8',\n fontSize: '$md',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_bright',\n alignItems: 'center',\n }}\n >\n Message options\n <Sheet.Close css={{ color: '$on_surface_high' }} onClick={e => setOpenSheet(false, e)}>\n <CrossIcon />\n </Sheet.Close>\n </Sheet.Title>\n\n {Object.keys(options).map(optionKey => {\n const option = options[optionKey];\n return option.show ? (\n <MwebChatOption\n key={optionKey}\n text={option.text}\n icon={option.icon}\n onClick={option.onClick}\n color={option?.color}\n />\n ) : null;\n })}\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dropdown.Root open={open} onOpenChange={setOpen} css={{ '@md': { display: 'none' } }}>\n <Flex\n className=\"chat_actions\"\n css={{\n background: '$surface_bright',\n borderRadius: '$1',\n p: '$2',\n opacity: open ? 1 : 0,\n position: 'absolute',\n top: 0,\n right: 0,\n zIndex: 1,\n '@md': { opacity: 1 },\n }}\n >\n {options.reply.show ? (\n <Tooltip boxCss={tooltipBoxCSS} title={options.reply.tooltipText}>\n <IconButton data-testid=\"reply_message_btn\" onClick={options.reply.onClick}>\n {options.reply.icon}\n </IconButton>\n </Tooltip>\n ) : null}\n {options.replyGroup.show ? (\n <Tooltip boxCss={tooltipBoxCSS} title={options.replyGroup.tooltipText}>\n <IconButton data-testid=\"reply_group_message_btn\" onClick={options.replyGroup.onClick}>\n {options.replyGroup.icon}\n </IconButton>\n </Tooltip>\n ) : null}\n {options.pin.show ? (\n <Tooltip boxCss={tooltipBoxCSS} title={options.pin.tooltipText}>\n <IconButton data-testid=\"pin_message_btn\" onClick={options.pin.onClick}>\n {options.pin.icon}\n </IconButton>\n </Tooltip>\n ) : null}\n\n {options.copy.show ? (\n <Tooltip boxCss={tooltipBoxCSS} title={options.copy.tooltipText}>\n <IconButton onClick={options.copy.onClick} data-testid=\"copy_message_btn\">\n <CopyIcon style={iconStyle} />\n </IconButton>\n </Tooltip>\n ) : null}\n\n {options.block.show || options.hide.show || options.remove.show ? (\n <Tooltip boxCss={tooltipBoxCSS} title=\"More actions\">\n <Dropdown.Trigger asChild>\n <IconButton>\n <VerticalMenuIcon style={iconStyle} />\n </IconButton>\n </Dropdown.Trigger>\n </Tooltip>\n ) : null}\n </Flex>\n <Dropdown.Portal>\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{ width: '$48', backgroundColor: '$surface_bright', py: '$0', border: '1px solid $border_bright' }}\n >\n {options.hide.show ? (\n <Dropdown.Item data-testid=\"hide_message_btn\" onClick={options.hide.onClick}>\n {options.hide.icon}\n <Text variant=\"sm\" css={{ ml: '$4', fontWeight: '$semiBold' }}>\n {options.hide.text}\n </Text>\n </Dropdown.Item>\n ) : null}\n\n {options.block.show ? (\n <Dropdown.Item\n data-testid=\"block_peer_btn\"\n onClick={options.block.onClick}\n css={{ color: options.block.color }}\n >\n {options.block.icon}\n <Text variant=\"sm\" css={{ ml: '$4', color: 'inherit', fontWeight: '$semiBold' }}>\n {options.block.text}\n </Text>\n </Dropdown.Item>\n ) : null}\n {options.remove.show ? (\n <Dropdown.Item\n data-testid=\"remove_peer_btn\"\n onClick={options.remove.onClick}\n css={{ color: options.remove.color }}\n >\n {options.remove.icon}\n <Text variant=\"sm\" css={{ ml: '$4', color: 'inherit', fontWeight: '$semiBold' }}>\n {options.remove.text}\n </Text>\n </Dropdown.Item>\n ) : null}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n );\n};\n", "import React from 'react';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const MwebChatOption = ({\n icon,\n text,\n onClick,\n color = '$on_surface_high',\n}: {\n icon: React.ReactNode;\n text: string;\n onClick: () => void | Promise<void>;\n color?: string;\n}) => {\n return (\n <Flex align=\"center\" css={{ w: '100%', color, cursor: 'pointer', gap: '$4', p: '$8' }} onClick={onClick}>\n {icon}\n <Text variant=\"sm\" css={{ color, fontWeight: '$semiBold' }}>\n {text}\n </Text>\n </Flex>\n );\n};\n", "import { useCallback } from 'react';\nimport { selectLocalPeer, selectSessionStore, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\nimport { SESSION_STORE_KEY } from '../../common/constants';\n\nexport const useChatBlacklist = (\n sessionStoreKey: SESSION_STORE_KEY.CHAT_MESSAGE_BLACKLIST | SESSION_STORE_KEY.CHAT_PEER_BLACKLIST,\n) => {\n const hmsActions = useHMSActions();\n const blacklistedIDs = useHMSStore(selectSessionStore(sessionStoreKey));\n\n const blacklistItem = useCallback(\n async (blacklistID: string) => {\n await hmsActions.sessionStore\n .set(sessionStoreKey, [...(blacklistedIDs || []), blacklistID])\n .catch(err => ToastManager.addToast({ title: err.description }));\n },\n [hmsActions, sessionStoreKey, blacklistedIDs],\n );\n\n return { blacklistItem, blacklistedIDs };\n};\n\nexport const useIsPeerBlacklisted = ({ local = false, peerCustomerUserId = '' }) => {\n const localPeer = useHMSStore(selectLocalPeer);\n const blacklistedPeerIDs = useHMSStore(selectSessionStore(SESSION_STORE_KEY.CHAT_PEER_BLACKLIST)) || [];\n return blacklistedPeerIDs?.includes(local ? localPeer?.customerUserId : peerCustomerUserId);\n};\n", "import { useCallback } from 'react';\nimport {\n HMSMessage,\n selectPeerNameByID,\n selectSessionStore,\n useHMSActions,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\n// @ts-ignore\nimport { SESSION_STORE_KEY } from '../../common/constants';\n\nexport type PinnedMessage = {\n text: string;\n id: string;\n pinnedBy: string;\n};\n\n/**\n * set pinned chat message by updating the session store\n */\nexport const usePinnedMessages = () => {\n const hmsActions = useHMSActions();\n const vanillaStore = useHMSVanillaStore();\n\n const setPinnedMessages = useCallback(\n async (message: HMSMessage, pinnedBy: string) => {\n const peerName = vanillaStore.getState(selectPeerNameByID(message?.sender)) || message?.senderName;\n const newPinnedMessage = { text: '', id: message.id, pinnedBy };\n\n if (message && peerName) {\n newPinnedMessage['text'] = `${peerName}: ${message.message}`;\n } else if (message) {\n newPinnedMessage['text'] = message.message;\n }\n\n const pinnedMessages = vanillaStore.getState(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGES)) || [];\n if (!pinnedMessages?.find((pinnedMessage: PinnedMessage) => pinnedMessage.id === newPinnedMessage.id)) {\n await hmsActions.sessionStore\n .set(SESSION_STORE_KEY.PINNED_MESSAGES, [...pinnedMessages, newPinnedMessage].slice(-3)) // Limiting to maximum of 3 messages - FIFO\n .catch(err => ToastManager.addToast({ title: err.description }));\n }\n },\n [hmsActions, vanillaStore],\n );\n\n const removePinnedMessage = useCallback(\n async (indexToRemove: number) => {\n const pinnedMessages = vanillaStore.getState(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGES)) || [];\n if (pinnedMessages[indexToRemove]) {\n await hmsActions.sessionStore\n .set(\n SESSION_STORE_KEY.PINNED_MESSAGES,\n pinnedMessages.filter((_: PinnedMessage, index: number) => index !== indexToRemove),\n )\n .catch(err => ToastManager.addToast({ title: err.description }));\n }\n },\n [hmsActions, vanillaStore],\n );\n\n const unpinBlacklistedMessages = useCallback(\n async (blacklistedMessageIDSet: Set<string>) => {\n const pinnedMessages = vanillaStore.getState(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGES)) || [];\n const filteredPinnedMessages = pinnedMessages?.filter(\n (pinnedMessage: PinnedMessage) => !blacklistedMessageIDSet?.has(pinnedMessage.id),\n );\n\n await hmsActions.sessionStore\n .set(SESSION_STORE_KEY.PINNED_MESSAGES, filteredPinnedMessages)\n .catch(err => ToastManager.addToast({ title: err.description }));\n },\n [hmsActions, vanillaStore],\n );\n\n return { setPinnedMessages, removePinnedMessage, unpinBlacklistedMessages };\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\n// @ts-ignore\nimport emptyChat from '../../images/empty-chat.svg';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useIsPeerBlacklisted } from '../hooks/useChatBlacklist';\nimport { useLandscapeHLSStream, useMobileHLSStream } from '../../common/hooks';\n\nexport const EmptyChat = () => {\n const { elements } = useRoomLayoutConferencingScreen();\n const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });\n const isMobile = useMedia(cssConfig.media.md);\n const canSendMessages =\n elements.chat &&\n (elements.chat.public_chat_enabled ||\n elements.chat.private_chat_enabled ||\n (elements.chat.roles_whitelist && elements.chat.roles_whitelist.length)) &&\n !isLocalPeerBlacklisted;\n const isMobileHLSStream = useMobileHLSStream();\n const isLandscapeStream = useLandscapeHLSStream();\n const streaming = isMobileHLSStream || isLandscapeStream;\n\n if (isMobile && elements?.chat?.is_overlay && !streaming) return <></>;\n\n return (\n <Flex\n css={{\n width: '100%',\n flex: '1 1 0',\n textAlign: 'center',\n px: '$4',\n }}\n align=\"center\"\n justify=\"center\"\n >\n <Box>\n <Box css={{ m: '0 auto', mt: '$4', '@media (max-height: 575px)': { display: 'none' } }}>\n <img src={emptyChat} style={{ display: 'inline' }} alt=\"Empty Chat\" height={132} width={185} />\n </Box>\n\n <Text variant=\"h5\" css={{ mt: '$8', c: '$on_surface_high' }}>\n {canSendMessages ? 'Start a conversation' : 'No messages yet'}\n </Text>\n {canSendMessages ? (\n <Text\n variant=\"sm\"\n css={{ mt: '$4', maxWidth: '80%', textAlign: 'center', mx: 'auto', c: '$on_surface_medium' }}\n >\n There are no messages here yet. Start a conversation by sending a message.\n </Text>\n ) : null}\n </Box>\n </Flex>\n );\n};\n", "import { useEffect, useState } from 'react';\nimport { selectSessionStore, useHMSStore } from '@100mslive/react-sdk';\nimport { PinnedMessage } from './usePinnedMessages';\nimport { SESSION_STORE_KEY } from '../../common/constants';\n\nexport const usePinnedBy = (messageId: string) => {\n const pinnedMessages = useHMSStore(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGES));\n const [pinnedBy, setPinnedBy] = useState('');\n\n useEffect(() => {\n let match = '';\n pinnedMessages?.forEach((pinnedMessage: PinnedMessage) => {\n if (pinnedMessage.id === messageId) {\n match = pinnedMessage.pinnedBy;\n }\n });\n\n setPinnedBy(match);\n }, [messageId, pinnedMessages]);\n\n return pinnedBy;\n};\n", "export const formatTime = (date: Date) => {\n if (!(date instanceof Date)) {\n return '';\n }\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const suffix = hours > 11 ? 'PM' : 'AM';\n return `${hours < 10 ? '0' : ''}${hours}:${minutes < 10 ? '0' : ''}${minutes} ${suffix}`;\n};\n\nexport const CHAT_MESSAGE_LIMIT = 2000;\n", "import React from 'react';\nimport { ExternalLinkIcon } from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { Text } from '../../../Text';\n\nexport const PIPChatOption = ({ openChat, showPIPChat }: { openChat: () => void; showPIPChat: boolean }) => {\n if (!showPIPChat) {\n return <></>;\n }\n return (\n <Dropdown.Item onClick={openChat} data-testid=\"pip_chat_btn\">\n <ExternalLinkIcon />\n <Text variant=\"sm\" css={{ ml: '$4', color: '$on_surface_high' }}>\n Pop out Chat\n </Text>\n </Dropdown.Item>\n );\n};\n", "import React from 'react';\nimport { createPortal } from 'react-dom';\n\ntype PIPWindowProps = {\n pipWindow: Window;\n children: React.ReactNode;\n};\n\nexport const PIPWindow = ({ pipWindow, children }: PIPWindowProps) => {\n pipWindow.document.body.style.margin = '0';\n pipWindow.document.body.style.overflow = 'clip';\n return createPortal(children, pipWindow.document.body);\n};\n", "import React, { useState } from 'react';\nimport { selectPermissions, useHMSActions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\nimport { AlertTriangleIcon } from '@100mslive/react-icons';\nimport { Button, Dialog, Flex, Text } from '../../../';\nimport { ResolutionInput } from '../Streaming/ResolutionInput';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useRecordingHandler } from '../../common/hooks';\nimport { RTMP_RECORD_DEFAULT_RESOLUTION } from '../../common/constants';\n\nconst StartRecording = ({ open, onOpenChange }) => {\n const permissions = useHMSStore(selectPermissions);\n const [resolution, setResolution] = useState(RTMP_RECORD_DEFAULT_RESOLUTION);\n const { startRecording, recordingStarted } = useRecordingHandler();\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const hmsActions = useHMSActions();\n if (!permissions?.browserRecording || isHLSRunning) {\n return null;\n }\n if (isBrowserRecordingOn) {\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Content\n css={{\n width: 'min(400px,80%)',\n p: '$10',\n bg: '#201617',\n }}\n >\n <Dialog.Title>\n <Flex gap={2} css={{ c: '$alert_error_default' }}>\n <AlertTriangleIcon />\n <Text css={{ c: 'inherit' }} variant=\"h6\">\n End Recording\n </Text>\n </Flex>\n </Dialog.Title>\n <Text variant=\"sm\" css={{ c: '$on_surface_medium', my: '$8' }}>\n Are you sure you want to end recording? You can\u2019t undo this action.\n </Text>\n <Flex justify=\"end\" css={{ mt: '$12' }}>\n <Dialog.Close asChild>\n <Button outlined css={{ borderColor: '$secondary_bright', mr: '$4' }}>\n Don't end\n </Button>\n </Dialog.Close>\n <Button\n data-testid=\"stop_recording_confirm_mobile\"\n variant=\"danger\"\n icon\n onClick={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n } catch (error) {\n ToastManager.addToast({\n title: error.message,\n variant: 'error',\n });\n }\n onOpenChange(false);\n }}\n >\n End recording\n </Button>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n }\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>\n <Dialog.Title>\n <Text variant=\"h6\">Start Recording</Text>\n </Dialog.Title>\n <ResolutionInput\n testId=\"recording_resolution_mobile\"\n css={{ flexDirection: 'column', alignItems: 'start' }}\n onResolutionChange={setResolution}\n />\n <Button\n data-testid=\"start_recording_confirm_mobile\"\n variant=\"primary\"\n icon\n css={{ ml: 'auto' }}\n type=\"submit\"\n disabled={recordingStarted || isStreamingOn}\n onClick={async () => {\n await startRecording(resolution);\n onOpenChange(false);\n }}\n >\n Start\n </Button>\n </Dialog.Content>\n </Dialog.Root>\n );\n};\n\nexport default StartRecording;\n", "import React, { useCallback, useState } from 'react';\nimport { InfoIcon } from '@100mslive/react-icons';\nimport { Flex, Input, Label, Text, Tooltip } from '../../../';\nimport { DialogRow } from '../../primitives/DialogContent';\nimport {\n RTMP_RECORD_DEFAULT_RESOLUTION,\n RTMP_RECORD_RESOLUTION_MAX,\n RTMP_RECORD_RESOLUTION_MIN,\n} from '../../common/constants';\n\nexport const ResolutionInput = ({ onResolutionChange, disabled, tooltipText, css, testId }) => {\n const [resolution, setResolution] = useState(RTMP_RECORD_DEFAULT_RESOLUTION);\n\n const resolutionChangeHandler = useCallback(\n event => {\n const { name, value } = event.target;\n let width = name === 'resWidth' ? Number(value) : resolution.width;\n let height = name === 'resHeight' ? Number(value) : resolution.height;\n\n if (width === 0) {\n width = null;\n }\n if (height === 0) {\n height = null;\n }\n const newResolution = {\n width: !isNaN(width) ? width : RTMP_RECORD_DEFAULT_RESOLUTION.width,\n height: !isNaN(height) ? height : RTMP_RECORD_DEFAULT_RESOLUTION.height,\n };\n setResolution(newResolution);\n },\n [resolution],\n );\n\n return (\n <DialogRow breakSm css={css}>\n <Flex gap={1}>\n <Label css={{ mb: '$8' }}>Resolution</Label>\n {tooltipText && (\n <Tooltip title={tooltipText}>\n <div>\n <InfoIcon color=\"#B0C3DB\" />\n </div>\n </Tooltip>\n )}\n </Flex>\n <Flex\n justify=\"between\"\n css={{ width: !tooltipText ? '100%' : '70%', '@sm': { width: '100%' } }}\n gap={2}\n direction=\"column\"\n >\n <Flex justify=\"between\" gap={2}>\n <Flex direction=\"column\" css={{ width: '50%' }}>\n <Text variant=\"xs\">Width</Text>\n <Input\n data-testid={`${testId}_width`}\n css={{ width: '100%', mt: '$4' }}\n name=\"resWidth\"\n value={resolution.width}\n onChange={resolutionChangeHandler}\n readOnly={disabled}\n min={RTMP_RECORD_RESOLUTION_MIN}\n max={RTMP_RECORD_RESOLUTION_MAX}\n onBlur={() => onResolutionChange(resolution)}\n type=\"number\"\n />\n </Flex>\n <Flex direction=\"column\" css={{ width: '50%' }}>\n <Text variant=\"xs\">Height</Text>\n <Input\n data-testid={`${testId}_height`}\n css={{ width: '100%', mt: '$4' }}\n name=\"resHeight\"\n value={resolution.height}\n onChange={resolutionChangeHandler}\n onBlur={() => onResolutionChange(resolution)}\n readOnly={disabled}\n min={RTMP_RECORD_RESOLUTION_MIN}\n max={RTMP_RECORD_RESOLUTION_MAX}\n type=\"number\"\n />\n </Flex>\n </Flex>\n </Flex>\n </DialogRow>\n );\n};\n", "import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { match, P } from 'ts-pattern';\nimport {\n selectHMSStats,\n selectLocalPeerID,\n selectPeersMap,\n selectTracksMap,\n useHMSActions,\n useHMSStatsStore,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { Accordion } from '../../Accordion';\nimport { HorizontalDivider } from '../../Divider';\nimport { Dropdown } from '../../Dropdown';\nimport { Label } from '../../Label';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { formatBytes } from '../../Stats';\nimport { Switch } from '../../Switch';\nimport { Text } from '../../Text';\nimport { DialogDropdownTrigger } from '../primitives/DropdownTrigger';\nimport { useSetUiSettings } from './AppData/useUISettings';\nimport { useDropdownSelection } from './hooks/useDropdownSelection';\nimport { UI_SETTINGS } from '../common/constants';\n\nexport const StatsForNerds = ({ onOpenChange }) => {\n const tracksWithLabels = useTracksWithLabel();\n const statsOptions = useMemo(\n () => [{ id: 'local-peer', label: 'Local Peer Stats' }, ...tracksWithLabels],\n [tracksWithLabels],\n );\n const hmsActions = useHMSActions();\n const details = hmsActions.getDebugInfo();\n const [selectedStat, setSelectedStat] = useState(statsOptions[0]);\n const [showStatsOnTiles, setShowStatsOnTiles] = useSetUiSettings(UI_SETTINGS.showStatsOnTiles);\n const [open, setOpen] = useState(false);\n const ref = useRef();\n const selectionBg = useDropdownSelection();\n\n useEffect(() => {\n if (selectedStat.id !== 'local-peer' && !tracksWithLabels.find(track => track.id === selectedStat.id)) {\n setSelectedStat('local-peer');\n }\n }, [tracksWithLabels, selectedStat]);\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n width: 'min(500px, 95%)',\n height: 'min(656px, 90%)',\n overflowY: 'auto',\n }}\n >\n {/* Title */}\n <Dialog.Title css={{ p: '$4 0' }}>\n <Flex justify=\"between\">\n <Flex align=\"center\" css={{ mb: '$1' }}>\n <Text variant=\"h6\" inline>\n Stats For Nerds\n </Text>\n </Flex>\n <Dialog.DefaultClose data-testid=\"stats_dialog_close_icon\" />\n </Flex>\n </Dialog.Title>\n <HorizontalDivider css={{ mt: '0.8rem' }} />\n {/* Switch */}\n <Flex justify=\"start\" gap={4} css={{ m: '$10 0' }}>\n <Switch checked={showStatsOnTiles} onCheckedChange={setShowStatsOnTiles} />\n <Text variant=\"body2\" css={{ fontWeight: '$semiBold' }}>\n Show Stats on Tiles\n </Text>\n </Flex>\n {/* Select */}\n\n <Flex\n direction=\"column\"\n css={{\n mb: '$12',\n position: 'relative',\n minWidth: 0,\n }}\n >\n <Label variant=\"body2\" css={{ c: '$on_surface_high' }}>\n Stats For\n </Label>\n <Dropdown.Root data-testid=\"dialog_select_Stats For\" open={open} onOpenChange={setOpen}>\n <DialogDropdownTrigger\n title={selectedStat.label || 'Select Stats'}\n css={{ mt: '$4' }}\n titleCSS={{ mx: 0 }}\n open={open}\n ref={ref}\n />\n <Dropdown.Portal>\n <Dropdown.Content align=\"start\" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1000 }}>\n {statsOptions.map(option => {\n const isSelected = option.id === selectedStat.id && option.layer === selectedStat.layer;\n return (\n <Dropdown.Item\n key={`${option.id}-${option.layer || ''}`}\n onClick={() => {\n setSelectedStat(option);\n }}\n css={{\n px: '$9',\n bg: isSelected ? selectionBg : undefined,\n c: isSelected ? '$on_primary_high' : '$on_primary_high',\n }}\n >\n {option.label}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n </Flex>\n {/* Stats */}\n {selectedStat.id === 'local-peer' ? (\n <LocalPeerStats />\n ) : (\n <TrackStats trackID={selectedStat.id} layer={selectedStat.layer} local={selectedStat.local} />\n )}\n <Flex justify=\"start\" gap={4} css={{ m: '$10 0', w: '100%' }}>\n <DebugInfo details={details} />\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nconst useTracksWithLabel = () => {\n const tracksMap = useHMSStore(selectTracksMap);\n const peersMap = useHMSStore(selectPeersMap);\n const localPeerID = useHMSStore(selectLocalPeerID);\n const tracksWithLabels = useMemo(\n () =>\n Object.values(tracksMap).reduce((res, track) => {\n const peerName = peersMap[track.peerId]?.name;\n const isLocalTrack = track.peerId === localPeerID;\n if (isLocalTrack && track.layerDefinitions?.length) {\n res = res.concat(\n track.layerDefinitions.map(({ layer }) => {\n return {\n id: track.id,\n layer,\n local: true,\n label: `${peerName} ${track.source} ${track.type} - ${layer}`,\n };\n }),\n );\n return res;\n }\n res.push({\n id: track.id,\n local: isLocalTrack,\n label: `${peerName} ${track.source} ${track.type}`,\n });\n return res;\n }, []),\n [tracksMap, peersMap, localPeerID],\n );\n return tracksWithLabels;\n};\n\nconst LocalPeerStats = () => {\n const stats = useHMSStatsStore(selectHMSStats.localPeerStats);\n\n if (!stats) {\n return null;\n }\n\n return (\n <Flex css={{ flexWrap: 'wrap', gap: '$10' }}>\n <StatsRow label=\"Packets Lost\" value={stats.subscribe?.packetsLost} />\n <StatsRow label=\"Jitter\" value={stats.subscribe?.jitter} />\n <StatsRow label=\"Publish Bitrate\" value={formatBytes(stats.publish?.bitrate, 'b/s')} />\n <StatsRow label=\"Subscribe Bitrate\" value={formatBytes(stats.subscribe?.bitrate, 'b/s')} />\n <StatsRow\n label=\"Available Outgoing Bitrate\"\n value={formatBytes(stats.publish?.availableOutgoingBitrate, 'b/s')}\n />\n <StatsRow label=\"Total Bytes Sent\" value={formatBytes(stats.publish?.bytesSent)} />\n <StatsRow label=\"Total Bytes Received\" value={formatBytes(stats.subscribe?.bytesReceived)} />\n <StatsRow\n label=\"Round Trip Time\"\n value={`${\n (((stats.publish?.currentRoundTripTime || 0) + (stats.subscribe?.currentRoundTripTime || 0)) / 2).toFixed(3) *\n 1000\n } ms`}\n />\n </Flex>\n );\n};\n\nconst TrackStats = ({ trackID, layer, local }) => {\n const selector = match({ trackID, layer, local })\n .with(\n {\n layer: P.when(layer => !!layer),\n },\n () => selectHMSStats.localVideoTrackStatsByLayer(layer)(trackID),\n )\n .with({ local: P.when(local => !!local) }, () => selectHMSStats.localAudioTrackStatsByID(trackID))\n .otherwise(() => selectHMSStats.trackStatsByID(trackID));\n const stats = useHMSStatsStore(selector);\n if (!stats) {\n return null;\n }\n const inbound = stats.type.includes('inbound');\n\n return (\n <Flex css={{ flexWrap: 'wrap', gap: '$10' }}>\n <StatsRow label=\"Type\" value={stats.type + ' ' + stats.kind} />\n <StatsRow label=\"Bitrate\" value={formatBytes(stats.bitrate, 'b/s')} />\n <StatsRow label=\"Packets Lost\" value={stats.packetsLost} />\n <StatsRow label=\"Jitter\" value={stats.jitter?.toFixed(3)} />\n <StatsRow\n label={inbound ? 'Bytes Received' : 'Bytes Sent'}\n value={formatBytes(inbound ? stats.bytesReceived : stats.bytesSent)}\n />\n {stats.kind === 'video' && (\n <>\n <StatsRow label=\"Framerate\" value={stats.framesPerSecond} />\n {!inbound && <StatsRow label=\"Quality Limitation Reason\" value={stats.qualityLimitationReason} />}\n </>\n )}\n <StatsRow\n label=\"Round Trip Time\"\n value={stats.roundTripTime ? `${(stats.roundTripTime * 1000).toFixed(3)} ms` : '-'}\n />\n </Flex>\n );\n};\n\nconst DebugInfo = ({ details }) => {\n return (\n <Accordion.Root type=\"single\" collapsible css={{ w: '100%' }}>\n <Accordion.Item value=\"Debug Info\">\n <Accordion.Header>\n <Label variant=\"body2\" css={{ c: '$on_surface_high' }}>\n Debug Info\n </Label>\n </Accordion.Header>\n <Accordion.Content>\n <Flex css={{ flexWrap: 'wrap', mt: '$10', gap: '$10' }}>\n <StatsRow css={{ w: '100%' }} label=\"Websocket URL\" value={details?.websocketURL} />\n <StatsRow css={{ w: '100%' }} label=\"Init Endpoint\" value={details?.initEndpoint} />\n <StatsRow css={{ w: '100%' }} label=\"Enabled flags\" value={details?.enabledFlags?.join(', ')} />\n </Flex>\n </Accordion.Content>\n </Accordion.Item>\n </Accordion.Root>\n );\n};\n\nconst StatsRow = React.memo(({ label, value, css }) => (\n <Box css={{ bg: '$surface_bright', w: 'calc(50% - $6)', p: '$8', r: '$3', ...css }}>\n <Text\n variant=\"overline\"\n css={{\n fontWeight: '$semiBold',\n color: '$on_surface_medium',\n textTransform: 'uppercase',\n }}\n >\n {label}\n </Text>\n <Text variant=\"sub1\" css={{ fontWeight: '$semiBold', color: '$on_surface_high' }}>\n {value || '-'}\n </Text>\n </Box>\n));\n", "import React, { useCallback, useRef, useState } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { AlertTriangleIcon, ChangeRoleIcon, CheckIcon } from '@100mslive/react-icons';\nimport { Button, Checkbox, Dialog, Dropdown, Flex, Loading, Text } from '../../../';\nimport { DialogContent, DialogRow } from '../../primitives/DialogContent';\nimport { DialogDropdownTrigger } from '../../primitives/DropdownTrigger';\nimport { useFilteredRoles } from '../../common/hooks';\n\nexport const BulkRoleChangeModal = ({ onOpenChange }) => {\n const roles = useFilteredRoles();\n const hmsActions = useHMSActions();\n const ref = useRef(null);\n const roleRef = useRef(null);\n const [selectedBulkRole, setBulkRole] = useState([]);\n const [selectedRole, setRole] = useState('');\n const [bulkRoleDialog, setBulkRoleDialog] = useState(false);\n const [roleDialog, setRoleDialog] = useState(false);\n const [errorMessage, setErrorMessage] = useState('');\n const [isSubmiting, setIsSubmiting] = useState(false);\n\n const changeBulkRole = useCallback(async () => {\n if (selectedBulkRole.length > 0 && selectedRole) {\n try {\n setIsSubmiting(true);\n await hmsActions.changeRoleOfPeersWithRoles(selectedBulkRole, selectedRole);\n setIsSubmiting(false);\n setErrorMessage('');\n onOpenChange(false);\n } catch (err) {\n setErrorMessage(err?.message ? err?.message : 'Unknown error');\n setIsSubmiting(false);\n }\n }\n }, [selectedBulkRole, selectedRole, hmsActions, onOpenChange]);\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <DialogContent title=\"Bulk Role Change\" Icon={ChangeRoleIcon}>\n <DialogRow>\n <Text>For Roles: </Text>\n <Dropdown.Root\n open={bulkRoleDialog}\n onOpenChange={value => {\n if (value) {\n setBulkRoleDialog(value);\n }\n }}\n modal={false}\n >\n <DialogDropdownTrigger\n ref={ref}\n title={selectedBulkRole.length === 0 ? 'Select Multiple Roles' : selectedBulkRole.toString()}\n css={{\n w: '70%',\n p: '$8',\n }}\n open={bulkRoleDialog}\n />\n <Dropdown.Content\n css={{ w: ref.current?.clientWidth, zIndex: 1000 }}\n onInteractOutside={() => {\n if (bulkRoleDialog) {\n setBulkRoleDialog(false);\n }\n }}\n >\n {roles &&\n roles.map(role => {\n return (\n <Dropdown.CheckboxItem\n key={role}\n checked={selectedBulkRole.includes(role)}\n onCheckedChange={value => {\n setBulkRole(selection => {\n return value ? [...selection, role] : selection.filter(selectedRole => selectedRole !== role);\n });\n setErrorMessage('');\n }}\n >\n <Checkbox.Root css={{ margin: '$2' }} checked={selectedBulkRole.includes(role)}>\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n {role}\n </Dropdown.CheckboxItem>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Root>\n </DialogRow>\n <DialogRow>\n <Text>To Role: </Text>\n <Dropdown.Root open={roleDialog} onOpenChange={value => setRoleDialog(value)}>\n <DialogDropdownTrigger\n ref={roleRef}\n title={selectedRole || 'Select Role'}\n css={{\n w: '70%',\n p: '$8',\n }}\n open={roleDialog}\n />\n <Dropdown.Content css={{ w: roleRef.current?.clientWidth, zIndex: 1000 }}>\n {roles &&\n roles.map(role => {\n return (\n <Dropdown.Item\n key={role}\n onSelect={() => {\n setRole(role);\n setErrorMessage('');\n }}\n >\n {role}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Root>\n </DialogRow>\n <DialogRow>\n {errorMessage && (\n <Flex gap={2} css={{ c: '$alert_error_default', w: '70%', ml: 'auto' }}>\n <AlertTriangleIcon />\n <Text css={{ c: 'inherit' }}>{errorMessage}</Text>\n </Flex>\n )}\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button variant=\"primary\" onClick={changeBulkRole} disabled={!(selectedRole && selectedBulkRole.length > 0)}>\n {isSubmiting && <Loading css={{ color: '$on_primary_medium' }} />}\n Apply\n </Button>\n </DialogRow>\n </DialogContent>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { config as cssConfig, Dialog } from '../../..';\nimport { Sheet } from '../../../Sheet';\nimport { CaptionContent } from './CaptionContent';\n\nexport const CaptionModal = ({ onOpenChange }: { onOpenChange: (value: boolean) => void }) => {\n const isMobile = useMedia(cssConfig.media.md);\n\n const props = {\n isMobile,\n onExit: () => {\n onOpenChange(false);\n },\n };\n\n if (isMobile) {\n return (\n <Sheet.Root defaultOpen onOpenChange={onOpenChange}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$8 0' }}>\n <CaptionContent {...props} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ bg: '$surface_dim', width: 'min(400px,80%)', p: '$10' }}>\n <CaptionContent {...props} />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { HMSTranscriptionMode, selectIsTranscriptionEnabled, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Box, Flex } from '../../../Layout';\nimport { Loading } from '../../../Loading';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit Any\nimport { ToastManager } from '../Toast/ToastManager';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey, useSetIsCaptionEnabled } from '../AppData/useUISettings';\nimport { CAPTION_TOAST } from '../../common/constants';\n\nexport const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit: () => void }) => {\n const DURATION = 2000;\n const actions = useHMSActions();\n const isTranscriptionEnabled = useHMSStore(selectIsTranscriptionEnabled);\n const [toastId, setToastId] = useSetAppDataByKey(CAPTION_TOAST.captionToast);\n\n const [isCaptionEnabled, setIsCaptionEnabled] = useSetIsCaptionEnabled();\n\n return (\n <>\n <Text\n variant={isMobile ? 'md' : 'lg'}\n css={{\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'flex',\n '@md': { px: '$8' },\n }}\n >\n {isTranscriptionEnabled ? 'Disable' : 'Enable'} Closed Caption (CC) for this session?\n <Box\n css={{ color: 'inherit', ml: 'auto', '&:hover': { color: '$on_surface_medium', cursor: 'pointer' } }}\n onClick={onExit}\n >\n <CrossIcon />\n </Box>\n </Text>\n {!isMobile ? (\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', mt: '$4', '@md': { px: '$8' } }}>\n This will {isTranscriptionEnabled ? 'disable' : 'enable'} Closed Captions for everyone in this room. You\n can&nbsp;\n {isTranscriptionEnabled ? 'enable' : 'disable'} it later.\n </Text>\n ) : null}\n\n <Flex\n justify=\"between\"\n align=\"center\"\n css={{\n width: '100%',\n gap: '$md',\n mt: '$10',\n '@md': { px: '$4' },\n }}\n >\n {isMobile ? null : (\n <Button variant=\"standard\" css={{ w: '100%' }} outlined onClick={onExit}>\n Cancel\n </Button>\n )}\n <Flex\n direction=\"column\"\n justify=\"between\"\n align=\"center\"\n css={{\n width: '100%',\n '@md': { px: '$4' },\n }}\n >\n {isMobile && isTranscriptionEnabled ? (\n <Button\n variant=\"standard\"\n css={{ w: '100%', mb: '$4' }}\n outlined\n onClick={() => {\n setIsCaptionEnabled(!isCaptionEnabled);\n onExit();\n }}\n >\n {isCaptionEnabled ? 'Hide For Me' : 'Show For Me'}\n </Button>\n ) : null}\n <Button\n variant={isTranscriptionEnabled ? 'danger' : 'primary'}\n css={{ width: '100%' }}\n data-testid=\"popup_change_btn\"\n onClick={async () => {\n try {\n if (isTranscriptionEnabled) {\n await actions.stopTranscription({\n mode: HMSTranscriptionMode.CAPTION,\n });\n setIsCaptionEnabled(false);\n const id = ToastManager.replaceToast(toastId, {\n title: `Disabling Closed Caption for everyone.`,\n variant: 'standard',\n duration: DURATION,\n icon: <Loading color=\"currentColor\" />,\n });\n setToastId(id);\n onExit();\n return;\n }\n await actions.startTranscription({\n mode: HMSTranscriptionMode.CAPTION,\n });\n const id = ToastManager.replaceToast(toastId, {\n title: `Enabling Closed Caption for everyone.`,\n variant: 'standard',\n duration: DURATION,\n icon: <Loading color=\"currentColor\" />,\n });\n setToastId(id);\n } catch (err) {\n const id = ToastManager.replaceToast(toastId, {\n title: `Failed to ${isTranscriptionEnabled ? 'disable' : 'enable'} closed caption`,\n variant: 'error',\n icon: <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />,\n });\n setToastId(id);\n } finally {\n setIsCaptionEnabled(true);\n }\n onExit();\n }}\n >\n {isTranscriptionEnabled ? 'Disable' : 'Enable'} for Everyone\n </Button>\n </Flex>\n </Flex>\n {isMobile && (\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', pb: '$4', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>\n This will {isTranscriptionEnabled ? 'disable' : 'enable'} Closed Captions for everyone in this room. You\n can&nbsp;\n {isTranscriptionEnabled ? 'enable' : 'disable'} it later.\n </Text>\n )}\n </>\n );\n};\n", "import React from 'react';\nimport { ExpandIcon } from '@100mslive/react-icons';\nimport { Dropdown, Text } from '../../..';\nimport { useFullscreen } from '../hooks/useFullscreen';\n\nexport const FullScreenItem = () => {\n const { allowed, isFullscreen, toggleFullscreen } = useFullscreen();\n\n if (!allowed) {\n return null;\n }\n\n return (\n <Dropdown.Item\n onClick={() => {\n toggleFullscreen();\n }}\n data-testid=\"full_screen_btn\"\n >\n <ExpandIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {isFullscreen ? 'Exit ' : 'Go '}Fullscreen\n </Text>\n </Dropdown.Item>\n );\n};\n", "import { useCallback, useEffect, useState } from 'react';\nimport screenfull from 'screenfull';\n// @ts-ignore: No implicit any\nimport { ToastManager } from '../Toast/ToastManager';\nimport { DEFAULT_PORTAL_CONTAINER } from '../../common/constants';\n\nexport const useFullscreen = () => {\n const [isFullScreenEnabled, setIsFullScreenEnabled] = useState(screenfull.isFullscreen);\n\n const toggle = useCallback(async () => {\n if (!screenfull.isEnabled) {\n ToastManager.addToast({ title: 'Fullscreen feature not supported' });\n return;\n }\n try {\n const container = document.querySelector(DEFAULT_PORTAL_CONTAINER);\n if (isFullScreenEnabled) {\n await screenfull.exit();\n } else if (container) {\n await screenfull.request(container);\n }\n } catch (err) {\n ToastManager.addToast({ title: (err as Error).message });\n }\n }, [isFullScreenEnabled]);\n\n useEffect(() => {\n const onChange = () => {\n setIsFullScreenEnabled(screenfull.isFullscreen);\n };\n if (screenfull.isEnabled) {\n screenfull.on('change', onChange);\n }\n return () => {\n if (screenfull.isEnabled) {\n screenfull.off('change', onChange);\n }\n };\n }, []);\n\n return {\n allowed: screenfull.isEnabled,\n isFullscreen: isFullScreenEnabled,\n toggleFullscreen: toggle,\n };\n};\n", "import React, { useCallback, useState } from 'react';\nimport {\n HMSRoleName,\n HMSTrackSource,\n HMSTrackType,\n selectAvailableRoleNames,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { MicOffIcon } from '@100mslive/react-icons';\nimport { Dialog } from '../../..';\nimport { Sheet } from '../../../Sheet';\n// @ts-ignore: No implicit any\nimport { DialogContent } from '../../primitives/DialogContent';\nimport { MuteAllContent } from './MuteAllContent';\n\nexport const MuteAllModal = ({\n onOpenChange,\n isMobile = false,\n}: {\n onOpenChange: (value: boolean) => void;\n isMobile?: boolean;\n}) => {\n const roles = useHMSStore(selectAvailableRoleNames);\n const hmsActions = useHMSActions();\n const [enabled, setEnabled] = useState(false);\n const [trackType, setTrackType] = useState<HMSTrackType>();\n const [selectedRole, setRole] = useState<HMSRoleName>();\n const [selectedSource, setSource] = useState<HMSTrackSource>();\n\n const muteAll = useCallback(async () => {\n await hmsActions.setRemoteTracksEnabled({\n enabled: enabled,\n type: trackType,\n source: selectedSource,\n roles: selectedRole ? [selectedRole] : undefined,\n });\n onOpenChange(false);\n }, [selectedRole, enabled, trackType, selectedSource, hmsActions, onOpenChange]);\n\n const props = {\n muteAll,\n roles,\n enabled,\n setEnabled,\n trackType,\n setTrackType,\n selectedRole,\n setRole,\n selectedSource,\n setSource,\n isMobile,\n };\n\n if (isMobile) {\n return (\n <Sheet.Root defaultOpen onOpenChange={onOpenChange}>\n <Sheet.Content css={{ px: '$10' }}>\n <MuteAllContent {...props} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <DialogContent title=\"Mute/Unmute Remote Tracks\" Icon={MicOffIcon}>\n <MuteAllContent {...props} />\n </DialogContent>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { HMSRoleName, HMSTrackSource, HMSTrackType, selectPermissions, useHMSStore } from '@100mslive/react-sdk';\nimport { Button } from '../../../Button';\nimport { Label } from '../../../Label';\nimport { Flex } from '../../../Layout';\nimport { RadioGroup } from '../../../RadioGroup';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit any\nimport { DialogRow, DialogSelect } from '../../primitives/DialogContent';\nimport { trackSourceOptions, trackTypeOptions } from './constants';\n\nexport const MuteAllContent = (props: {\n muteAll: () => Promise<void>;\n roles?: HMSRoleName[];\n enabled: boolean;\n setEnabled: (value: boolean) => void;\n trackType?: HMSTrackType;\n setTrackType: (value: HMSTrackType) => void;\n selectedRole?: HMSRoleName;\n setRole: (value: HMSRoleName) => void;\n selectedSource?: HMSTrackSource;\n setSource: (value: HMSTrackSource) => void;\n isMobile: boolean;\n}) => {\n const roles = props.roles || [];\n const permissions = useHMSStore(selectPermissions);\n return (\n <>\n <DialogSelect\n title=\"Role\"\n options={[{ label: 'All Roles', value: '' }, ...roles.map(role => ({ label: role, value: role }))]}\n selected={props.selectedRole}\n keyField=\"value\"\n labelField=\"label\"\n onChange={props.setRole}\n />\n <DialogSelect\n title=\"Track type\"\n options={trackTypeOptions}\n selected={props.trackType}\n onChange={props.setTrackType}\n keyField=\"value\"\n labelField=\"label\"\n />\n <DialogSelect\n title=\"Track source\"\n options={trackSourceOptions}\n selected={props.selectedSource}\n onChange={props.setSource}\n keyField=\"value\"\n labelField=\"label\"\n />\n <DialogRow>\n <Text variant=\"md\">Track status</Text>\n <RadioGroup.Root value={String(props.enabled)} onValueChange={value => props.setEnabled(value === 'true')}>\n {permissions?.mute && (\n <Flex align=\"center\" css={{ mr: '$8' }}>\n <RadioGroup.Item value=\"false\" id=\"trackDisableRadio\" css={{ mr: '$4' }}>\n <RadioGroup.Indicator />\n </RadioGroup.Item>\n <Label htmlFor=\"trackDisableRadio\">Mute</Label>\n </Flex>\n )}\n {permissions?.unmute && (\n <Flex align=\"center\" css={{ cursor: 'pointer' }}>\n <RadioGroup.Item value=\"true\" id=\"trackEnableRadio\" css={{ mr: '$4' }}>\n <RadioGroup.Indicator />\n </RadioGroup.Item>\n <Label htmlFor=\"trackEnableRadio\">Request Unmute</Label>\n </Flex>\n )}\n </RadioGroup.Root>\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button variant=\"primary\" onClick={props.muteAll} css={{ w: props?.isMobile ? '100%' : '' }}>\n Apply\n </Button>\n </DialogRow>\n </>\n );\n};\n", "import { useEffect } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { getCssText } from '../../../Theme';\nimport { usePIPWindow } from './usePIPWindow';\n\nexport const usePIPChat = () => {\n const hmsActions = useHMSActions();\n const { isSupported, requestPipWindow, pipWindow, closePipWindow } = usePIPWindow();\n\n useEffect(() => {\n if (document && pipWindow) {\n const style = document.createElement('style');\n style.id = 'stitches';\n style.textContent = getCssText();\n pipWindow.document.head.appendChild(style);\n }\n }, [pipWindow]);\n\n // @ts-ignore\n useEffect(() => {\n if (pipWindow) {\n const chatContainer = pipWindow.document.getElementById('chat-container');\n const selector = pipWindow.document.getElementById('selector') as HTMLSelectElement;\n const sendBtn = pipWindow.document.getElementById('send-btn');\n const pipChatInput = pipWindow.document.getElementById('chat-input') as HTMLTextAreaElement;\n const marker = pipWindow.document.getElementById('marker');\n\n marker?.scrollIntoView({ block: 'end' });\n\n const observer = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n if (entry.isIntersecting && entry.target.id) {\n hmsActions.setMessageRead(true, entry.target.id);\n }\n });\n },\n {\n root: chatContainer,\n threshold: 0.8,\n },\n );\n\n const mutationObserver = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.addedNodes.length > 0) {\n const newMessages = mutation.addedNodes;\n newMessages.forEach(message => {\n const messageId = (message as Element)?.id;\n if (messageId === 'new-message-notif') {\n message.addEventListener('click', () =>\n setTimeout(() => marker?.scrollIntoView({ block: 'end', behavior: 'smooth' }), 0),\n );\n } else if (messageId) observer.observe(message as Element);\n });\n }\n });\n });\n mutationObserver.observe(chatContainer as Node, {\n childList: true,\n });\n\n const sendMessage = async () => {\n const selection = selector?.value || 'Everyone';\n if (selection === 'Everyone') {\n await hmsActions.sendBroadcastMessage(pipChatInput.value.trim());\n } else {\n await hmsActions.sendGroupMessage(pipChatInput.value.trim(), [selection]);\n }\n pipChatInput.value = '';\n setTimeout(() => marker?.scrollIntoView({ block: 'end', behavior: 'smooth' }), 0);\n };\n\n if (sendBtn && hmsActions && pipChatInput) {\n const pipMessages = pipWindow.document.getElementsByClassName('pip-message');\n // @ts-ignore\n [...pipMessages].forEach(message => {\n if (message.id) {\n hmsActions.setMessageRead(true, message.id);\n }\n });\n // @ts-ignore\n const sendOnEnter = e => {\n if (e.key === 'Enter') sendMessage();\n };\n sendBtn.addEventListener('click', sendMessage);\n pipChatInput.addEventListener('keypress', sendOnEnter);\n return () => {\n sendBtn.removeEventListener('click', sendMessage);\n pipChatInput.removeEventListener('keypress', sendOnEnter);\n mutationObserver.disconnect();\n observer.disconnect();\n };\n }\n }\n }, [pipWindow, hmsActions]);\n\n useEffect(() => {\n return () => {\n pipWindow && closePipWindow();\n };\n }, [closePipWindow, pipWindow]);\n\n return { isSupported, requestPipWindow, pipWindow };\n};\n", "import React, { useRef, useState } from 'react';\nimport { useClickAway } from 'react-use';\nimport { ConferencingScreen, DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport { match } from 'ts-pattern';\nimport {\n HMSTranscriptionMode,\n selectIsConnectedToRoom,\n selectIsLocalVideoEnabled,\n selectIsTranscriptionAllowedByMode,\n selectIsTranscriptionEnabled,\n selectPeerCount,\n selectPermissions,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport {\n BrbIcon,\n ClosedCaptionIcon,\n CrossIcon,\n EmojiIcon,\n HamburgerMenuIcon,\n HandIcon,\n HandRaiseSlashedIcon,\n InfoIcon,\n OpenCaptionIcon,\n PeopleIcon,\n QuizActiveIcon,\n QuizIcon,\n RecordIcon,\n SettingsIcon,\n VirtualBackgroundIcon,\n} from '@100mslive/react-icons';\nimport { Box, Loading, Tooltip } from '../../../..';\nimport { Sheet } from '../../../../Sheet';\n// @ts-ignore: No implicit any\nimport IconButton from '../../../IconButton';\nimport { NoiseCancellation } from '../../AudioVideoToggle';\n// @ts-ignore: No implicit any\nimport { EmojiReaction } from '../../EmojiReaction';\n// @ts-ignore: No implicit any\nimport { StopRecordingInSheet } from '../../Header/StreamActions';\n// @ts-ignore: No implicit any\nimport SettingsModal from '../../Settings/SettingsModal';\n// @ts-ignore: No implicit any\nimport { ToastManager } from '../../Toast/ToastManager';\n// @ts-ignore: No implicit any\nimport { ActionTile } from '../ActionTile';\nimport { CaptionModal } from '../CaptionModal';\n// @ts-ignore: No implicit any\nimport { ChangeNameModal } from '../ChangeNameModal';\n// @ts-ignore: No implicit any\nimport { MuteAllModal } from '../MuteAllModal';\nimport { useRoomLayoutHeader } from '../../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useSheetToggle } from '../../AppData/useSheet';\n// @ts-ignore: No implicit any\nimport { usePollViewToggle, useSidepaneToggle } from '../../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { useSetIsCaptionEnabled, useShowPolls } from '../../AppData/useUISettings';\n// @ts-ignore: No implicit any\nimport { useDropdownList } from '../../hooks/useDropdownList';\nimport { useMyMetadata } from '../../hooks/useMetadata';\nimport { useUnreadPollQuizPresent } from '../../hooks/useUnreadPollQuizPresent';\nimport { useLandscapeHLSStream, useMobileHLSStream, useRecordingHandler } from '../../../common/hooks';\n// @ts-ignore: No implicit any\nimport { getFormattedCount } from '../../../common/utils';\n// @ts-ignore: No implicit any\nimport { SHEET_OPTIONS, SIDE_PANE_OPTIONS } from '../../../common/constants';\n\nconst MODALS = {\n CHANGE_NAME: 'changeName',\n SELF_ROLE_CHANGE: 'selfRoleChange',\n MORE_SETTINGS: 'moreSettings',\n START_RECORDING: 'startRecording',\n DEVICE_SETTINGS: 'deviceSettings',\n STATS_FOR_NERDS: 'statsForNerds',\n BULK_ROLE_CHANGE: 'bulkRoleChange',\n MUTE_ALL: 'muteAll',\n EMBED_URL: 'embedUrl',\n CAPTION: 'caption',\n};\n\nexport const MwebOptions = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const hmsActions = useHMSActions();\n const permissions = useHMSStore(selectPermissions);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const [openModals, setOpenModals] = useState(new Set());\n const [openOptionsSheet, setOpenOptionsSheet] = useState(false);\n const [openSettingsSheet, setOpenSettingsSheet] = useState(false);\n const [showEmojiCard, setShowEmojiCard] = useState(false);\n const [showRecordingOn, setShowRecordingOn] = useState(false);\n const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const { showPolls } = useShowPolls();\n const togglePollView = usePollViewToggle();\n const peerCount = useHMSStore(selectPeerCount);\n const emojiCardRef = useRef(null);\n const { isBRBOn, toggleBRB, isHandRaised, toggleHandRaise } = useMyMetadata();\n const { unreadPollQuiz, setUnreadPollQuiz } = useUnreadPollQuizPresent();\n const { title, description } = useRoomLayoutHeader();\n const toggleDetailsSheet = useSheetToggle(SHEET_OPTIONS.ROOM_DETAILS);\n const isMobileHLSStream = useMobileHLSStream();\n const isLandscapeHLSStream = useLandscapeHLSStream();\n const toggleVB = useSidepaneToggle(SIDE_PANE_OPTIONS.VB);\n const isLocalVideoEnabled = useHMSStore(selectIsLocalVideoEnabled);\n const { startRecording, isRecordingLoading } = useRecordingHandler();\n const isTranscriptionAllowed = useHMSStore(selectIsTranscriptionAllowedByMode(HMSTranscriptionMode.CAPTION));\n const isTranscriptionEnabled = useHMSStore(selectIsTranscriptionEnabled);\n\n const [isCaptionEnabled] = useSetIsCaptionEnabled();\n useDropdownList({ open: openModals.size > 0 || openOptionsSheet || openSettingsSheet, name: 'MoreSettings' });\n\n const updateState = (modalName: string, value: boolean) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n\n useClickAway(emojiCardRef, () => setShowEmojiCard(false));\n\n return (\n <>\n <Sheet.Root open={openOptionsSheet} onOpenChange={setOpenOptionsSheet}>\n <Tooltip title=\"More options\">\n <Sheet.Trigger asChild data-testid=\"more_settings_btn\">\n <IconButton css={{ bg: isMobileHLSStream || isLandscapeHLSStream ? '$surface_default' : '' }}>\n <HamburgerMenuIcon />\n </IconButton>\n </Sheet.Trigger>\n </Tooltip>\n <Sheet.Content css={{ bg: '$surface_dim', pb: '$14' }}>\n <Sheet.Title\n css={{\n display: 'flex',\n color: '$on_surface_high',\n w: '100%',\n justifyContent: 'space-between',\n fontSize: '$md',\n mt: '$8',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_default',\n mb: '$8',\n alignItems: 'center',\n }}\n >\n Options\n <Sheet.Close>\n <Box css={{ color: '$on_surface_high' }}>\n <CrossIcon />\n </Box>\n </Sheet.Close>\n </Sheet.Title>\n <Box\n css={{\n display: 'grid',\n gridTemplateColumns: '1fr 1fr 1fr',\n gridTemplateRows: 'auto',\n gridColumnGap: '$6',\n gridRowGap: '$8',\n px: '$9',\n }}\n >\n {elements?.participant_list && (\n <ActionTile.Root\n onClick={() => {\n toggleParticipants();\n setOpenOptionsSheet(false);\n }}\n >\n <ActionTile.Count>{getFormattedCount(peerCount)}</ActionTile.Count>\n <PeopleIcon />\n <ActionTile.Title>Participants</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {elements.hand_raise ? (\n <ActionTile.Root\n active={isHandRaised}\n onClick={() => {\n toggleHandRaise();\n setOpenOptionsSheet(false);\n }}\n >\n {isHandRaised ? <HandRaiseSlashedIcon /> : <HandIcon />}\n <ActionTile.Title>{isHandRaised ? 'Lower' : 'Raise'} Hand</ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n <NoiseCancellation setOpenOptionsSheet={setOpenOptionsSheet} actionTile />\n {isTranscriptionAllowed ? (\n <ActionTile.Root\n onClick={() => {\n setOpenOptionsSheet(false);\n updateState(MODALS.CAPTION, true);\n }}\n >\n {isTranscriptionEnabled && isCaptionEnabled ? <ClosedCaptionIcon /> : <OpenCaptionIcon />}\n <ActionTile.Title>Closed Caption</ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n {isLocalVideoEnabled && !!elements?.virtual_background ? (\n <ActionTile.Root\n onClick={() => {\n toggleVB();\n setOpenOptionsSheet(false);\n }}\n >\n <VirtualBackgroundIcon />\n <ActionTile.Title>Virtual Background</ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n\n {elements?.emoji_reactions && !(isLandscapeHLSStream || isMobileHLSStream) && (\n <ActionTile.Root\n onClick={() => {\n setShowEmojiCard(true);\n setOpenOptionsSheet(false);\n }}\n >\n <EmojiIcon />\n <ActionTile.Title>Emoji Reactions</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {showPolls && (\n <ActionTile.Root\n onClick={() => {\n togglePollView();\n setOpenOptionsSheet(false);\n setUnreadPollQuiz(false);\n }}\n >\n {unreadPollQuiz ? <QuizActiveIcon /> : <QuizIcon />}\n <ActionTile.Title>Polls and Quizzes</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {elements?.brb && (\n <ActionTile.Root\n active={isBRBOn}\n onClick={() => {\n toggleBRB();\n setOpenOptionsSheet(false);\n }}\n >\n <BrbIcon />\n <ActionTile.Title>Be Right Back</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n <ActionTile.Root\n onClick={() => {\n setOpenSettingsSheet(true);\n setOpenOptionsSheet(false);\n }}\n >\n <SettingsIcon />\n <ActionTile.Title>Settings</ActionTile.Title>\n </ActionTile.Root>\n\n {isConnected && permissions?.browserRecording ? (\n <ActionTile.Root\n disabled={isHLSRunning}\n onClick={async () => {\n if (isRecordingLoading) {\n return;\n }\n if (isBrowserRecordingOn || isStreamingOn) {\n setOpenOptionsSheet(false);\n setShowRecordingOn(true);\n } else {\n // start recording\n await startRecording();\n setOpenOptionsSheet(false);\n }\n if (isHLSRunning) {\n setOpenOptionsSheet(false);\n }\n }}\n >\n {isRecordingLoading ? <Loading /> : <RecordIcon />}\n <ActionTile.Title>\n {match({ isBrowserRecordingOn, isRecordingLoading })\n .with({ isBrowserRecordingOn: true, isRecordingLoading: false }, () => 'Recording On')\n .with({ isRecordingLoading: true }, () => 'Starting Recording')\n .with({ isRecordingLoading: false }, () => 'Start Recording')\n .otherwise(() => null)}\n </ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n\n {title || description ? (\n <ActionTile.Root\n onClick={() => {\n setOpenOptionsSheet(false);\n toggleDetailsSheet();\n }}\n >\n <InfoIcon />\n <ActionTile.Title>About Session</ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n <SettingsModal open={openSettingsSheet} onOpenChange={setOpenSettingsSheet} screenType={screenType} />\n {openModals.has(MODALS.MUTE_ALL) && (\n <MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} isMobile />\n )}\n {openModals.has(MODALS.CHANGE_NAME) && (\n <ChangeNameModal\n onOpenChange={(value: boolean) => updateState(MODALS.CHANGE_NAME, value)}\n openParentSheet={() => setOpenOptionsSheet(true)}\n />\n )}\n {openModals.has(MODALS.CAPTION) && (\n <CaptionModal onOpenChange={(value: boolean) => updateState(MODALS.CAPTION, value)} />\n )}\n {showEmojiCard && (\n <Box\n ref={emojiCardRef}\n css={{\n maxWidth: '100%',\n w: '100%',\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: '$18',\n bg: '$surface_default',\n zIndex: '10',\n p: '$8',\n pb: 0,\n r: '$1',\n mx: '$4',\n }}\n >\n <EmojiReaction showCard />\n </Box>\n )}\n {showRecordingOn && (\n <StopRecordingInSheet\n onClose={() => setShowRecordingOn(false)}\n onStopRecording={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n setShowRecordingOn(false);\n } catch (error) {\n ToastManager.addToast({\n // @ts-ignore\n title: error.message,\n variant: 'error',\n });\n }\n }}\n />\n )}\n </>\n );\n};\n", "import { useEffect, useState } from 'react';\nimport { selectLocalPeerID } from '@100mslive/hms-video-store';\nimport { HMSNotificationTypes, useHMSNotifications, useHMSStore } from '@100mslive/react-sdk';\n\nexport const useUnreadPollQuizPresent = () => {\n const localPeerID = useHMSStore(selectLocalPeerID);\n const notification = useHMSNotifications(HMSNotificationTypes.POLL_STARTED);\n const [unreadPollQuiz, setUnreadPollQuiz] = useState(false);\n\n useEffect(() => {\n if (!notification) {\n return;\n }\n setUnreadPollQuiz(notification.data.startedBy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MACC,SAAS,MAAM,mBAAmB,KAAK;AAAA,MACvC,iBAAiB,MAAY;AAC3B,YAAI;AACF,gBAAM,WAAW,qBAAqB;AACtC,6BAAmB,KAAK;AAAA,QAC1B,SAAS,OAAO;AACd,uBAAa,SAAS;AAAA;AAAA,YAEpB,OAAO,MAAM;AAAA,YACb,SAAS;AAAA,UACX,CAAC;AAAA,QACH;AAAA,MACF;AAAA;AAAA,EACF,CAEJ;AAEJ;;;A3BpWO,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AACF,MAGM;AACJ,QAAM,WAAWQ,UAAS,OAAU,MAAM,EAAE;AAC5C,QAAM,uBAAuB,sBAAsB;AACnD,SAAO,YAAY,uBACjB,gBAAAC,QAAA,cAAC,eAAY,UAAoB,YAAwB,IAEzD,gBAAAA,QAAA,cAAC,kBAAe,UAAoB,YAAwB;AAEhE;",
6
+ "names": ["React", "useMedia", "React", "Fragment", "useState", "match", "HMSTranscriptionMode", "selectIsTranscriptionEnabled", "selectLocalPeerID", "useHMSActions", "useHMSStore", "CheckIcon", "InfoIcon", "PipIcon", "React", "isMicActive", "_a", "_b", "isCamActive", "React", "React", "useCallback", "useEffect", "useMemo", "useState", "selectHMSMessages", "selectLocalPeerID", "selectPeerNameByID", "selectSessionStore", "selectUnreadHMSMessagesCount", "useHMSStore", "React", "useCallback", "useEffect", "useState", "useMedia", "selectLocalPeerName", "selectPeerNameByID", "selectSessionStore", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "React", "useCallback", "useState", "useHMSActions", "useHMSStore", "React", "React", "useCallback", "useHMSActions", "useHMSActions", "useCallback", "useCallback", "selectSessionStore", "useHMSActions", "useHMSVanillaStore", "useHMSActions", "useHMSVanillaStore", "useCallback", "selectSessionStore", "useState", "useHMSActions", "useHMSStore", "useCallback", "React", "React", "React", "useEffect", "useState", "selectSessionStore", "useHMSStore", "useHMSStore", "selectSessionStore", "useState", "useEffect", "match", "React", "useHMSStore", "selectPeerNameByID", "useMedia", "useState", "useHMSActions", "useCallback", "useEffect", "selectSessionStore", "useHMSVanillaStore", "selectLocalPeerName", "useHMSStore", "selectHMSMessages", "selectLocalPeerID", "selectUnreadHMSMessagesCount", "useState", "useCallback", "useEffect", "selectSessionStore", "useMemo", "React", "selectPeerNameByID", "React", "React", "React", "useState", "selectPermissions", "useHMSActions", "useHMSStore", "React", "useCallback", "useState", "useState", "useCallback", "React", "useHMSStore", "selectPermissions", "useState", "useHMSActions", "React", "React", "useEffect", "useMemo", "useRef", "useState", "selectLocalPeerID", "selectTracksMap", "useHMSActions", "useHMSStore", "useMemo", "useHMSActions", "useState", "useRef", "useEffect", "React", "useHMSStore", "selectTracksMap", "selectLocalPeerID", "layer", "local", "React", "useCallback", "useRef", "useState", "useHMSActions", "AlertTriangleIcon", "useHMSActions", "useRef", "useState", "useCallback", "React", "selectedRole", "AlertTriangleIcon", "React", "useMedia", "React", "useHMSActions", "useHMSStore", "AlertTriangleIcon", "CrossIcon", "useHMSActions", "useHMSStore", "React", "CrossIcon", "id", "AlertTriangleIcon", "useMedia", "React", "React", "useCallback", "useEffect", "useState", "useState", "useCallback", "useEffect", "React", "React", "useCallback", "useState", "useHMSActions", "useHMSStore", "React", "selectPermissions", "useHMSStore", "useHMSStore", "selectPermissions", "React", "useHMSStore", "useHMSActions", "useState", "useCallback", "React", "useEffect", "useHMSActions", "useHMSActions", "useEffect", "useHMSStore", "selectLocalPeerID", "useHMSActions", "useState", "HMSTranscriptionMode", "selectIsTranscriptionEnabled", "React", "Fragment", "CheckIcon", "PipIcon", "match", "InfoIcon", "React", "useRef", "useState", "match", "HMSTranscriptionMode", "selectIsLocalVideoEnabled", "selectIsTranscriptionAllowedByMode", "selectIsTranscriptionEnabled", "selectPermissions", "useHMSActions", "useHMSStore", "useRecordingStreaming", "BrbIcon", "CrossIcon", "HamburgerMenuIcon", "InfoIcon", "OpenCaptionIcon", "SettingsIcon", "useEffect", "useState", "useHMSStore", "useState", "useEffect", "MODALS", "useHMSActions", "useHMSStore", "selectPermissions", "useRecordingStreaming", "useState", "useRef", "selectIsLocalVideoEnabled", "selectIsTranscriptionAllowedByMode", "HMSTranscriptionMode", "selectIsTranscriptionEnabled", "React", "HamburgerMenuIcon", "CrossIcon", "OpenCaptionIcon", "BrbIcon", "SettingsIcon", "match", "InfoIcon", "useMedia", "React"]
7
+ }
@@ -0,0 +1,30 @@
1
+ import {
2
+ useSidepaneReset
3
+ } from "./chunk-4BQ3AMVG.js";
4
+ import {
5
+ useRoomLayoutConferencingScreen
6
+ } from "./chunk-6BX3VCVC.js";
7
+ import {
8
+ APP_DATA,
9
+ init_define_process_env
10
+ } from "./chunk-YDIB6WKJ.js";
11
+
12
+ // src/Prebuilt/components/AppData/useSidepaneResetOnLayoutUpdate.tsx
13
+ init_define_process_env();
14
+ import { useEffect } from "react";
15
+ import { selectAppData, useHMSStore } from "@100mslive/react-sdk";
16
+ var useSidepaneResetOnLayoutUpdate = (layoutKey, sidepaneOption) => {
17
+ const { elements } = useRoomLayoutConferencingScreen();
18
+ const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));
19
+ const resetSidePane = useSidepaneReset();
20
+ useEffect(() => {
21
+ if (sidepane === sidepaneOption && !(elements == null ? void 0 : elements[layoutKey])) {
22
+ resetSidePane();
23
+ }
24
+ }, [elements, elements == null ? void 0 : elements[layoutKey], resetSidePane, sidepane, layoutKey, sidepaneOption]);
25
+ };
26
+
27
+ export {
28
+ useSidepaneResetOnLayoutUpdate
29
+ };
30
+ //# sourceMappingURL=chunk-THDU2DKP.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/Prebuilt/components/AppData/useSidepaneResetOnLayoutUpdate.tsx"],
4
+ "sourcesContent": ["import { useEffect } from 'react';\nimport { DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport { selectAppData, useHMSStore } from '@100mslive/react-sdk';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore\nimport { useSidepaneReset } from './useSidepane';\nimport { APP_DATA, SidePaneOption } from '../../common/constants';\n\n// Closes the sidepane if an element is removed from the layout via the customiser\nexport const useSidepaneResetOnLayoutUpdate = (\n layoutKey: keyof DefaultConferencingScreen_Elements,\n sidepaneOption: SidePaneOption,\n) => {\n const { elements } = useRoomLayoutConferencingScreen();\n const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));\n const resetSidePane = useSidepaneReset();\n useEffect(() => {\n if (sidepane === sidepaneOption && !elements?.[layoutKey]) {\n resetSidePane();\n }\n }, [elements, elements?.[layoutKey], resetSidePane, sidepane, layoutKey, sidepaneOption]);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA,SAAS,iBAAiB;AAE1B,SAAS,eAAe,mBAAmB;AAOpC,IAAM,iCAAiC,CAC5C,WACA,mBACG;AACH,QAAM,EAAE,SAAS,IAAI,gCAAgC;AACrD,QAAM,WAAW,YAAY,cAAc,SAAS,QAAQ,CAAC;AAC7D,QAAM,gBAAgB,iBAAiB;AACvC,YAAU,MAAM;AACd,QAAI,aAAa,kBAAkB,EAAC,qCAAW,aAAY;AACzD,oBAAc;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,UAAU,qCAAW,YAAY,eAAe,UAAU,WAAW,cAAc,CAAC;AAC1F;",
6
+ "names": []
7
+ }