@werxt/livekit-components-react 2.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +36 -0
- package/dist/assets/icons/CameraDisabledIcon.d.ts +11 -0
- package/dist/assets/icons/CameraDisabledIcon.d.ts.map +1 -0
- package/dist/assets/icons/CameraIcon.d.ts +11 -0
- package/dist/assets/icons/CameraIcon.d.ts.map +1 -0
- package/dist/assets/icons/ChatCloseIcon.d.ts +11 -0
- package/dist/assets/icons/ChatCloseIcon.d.ts.map +1 -0
- package/dist/assets/icons/ChatIcon.d.ts +11 -0
- package/dist/assets/icons/ChatIcon.d.ts.map +1 -0
- package/dist/assets/icons/Chevron.d.ts +11 -0
- package/dist/assets/icons/Chevron.d.ts.map +1 -0
- package/dist/assets/icons/FocusToggleIcon.d.ts +11 -0
- package/dist/assets/icons/FocusToggleIcon.d.ts.map +1 -0
- package/dist/assets/icons/GearIcon.d.ts +11 -0
- package/dist/assets/icons/GearIcon.d.ts.map +1 -0
- package/dist/assets/icons/LeaveIcon.d.ts +11 -0
- package/dist/assets/icons/LeaveIcon.d.ts.map +1 -0
- package/dist/assets/icons/LockLockedIcon.d.ts +11 -0
- package/dist/assets/icons/LockLockedIcon.d.ts.map +1 -0
- package/dist/assets/icons/MicDisabledIcon.d.ts +11 -0
- package/dist/assets/icons/MicDisabledIcon.d.ts.map +1 -0
- package/dist/assets/icons/MicIcon.d.ts +11 -0
- package/dist/assets/icons/MicIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityExcellentIcon.d.ts +11 -0
- package/dist/assets/icons/QualityExcellentIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityGoodIcon.d.ts +11 -0
- package/dist/assets/icons/QualityGoodIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityPoorIcon.d.ts +11 -0
- package/dist/assets/icons/QualityPoorIcon.d.ts.map +1 -0
- package/dist/assets/icons/QualityUnknownIcon.d.ts +11 -0
- package/dist/assets/icons/QualityUnknownIcon.d.ts.map +1 -0
- package/dist/assets/icons/ScreenShareIcon.d.ts +11 -0
- package/dist/assets/icons/ScreenShareIcon.d.ts.map +1 -0
- package/dist/assets/icons/ScreenShareStopIcon.d.ts +11 -0
- package/dist/assets/icons/ScreenShareStopIcon.d.ts.map +1 -0
- package/dist/assets/icons/SpinnerIcon.d.ts +11 -0
- package/dist/assets/icons/SpinnerIcon.d.ts.map +1 -0
- package/dist/assets/icons/UnfocusToggleIcon.d.ts +11 -0
- package/dist/assets/icons/UnfocusToggleIcon.d.ts.map +1 -0
- package/dist/assets/icons/index.d.ts +20 -0
- package/dist/assets/icons/index.d.ts.map +1 -0
- package/dist/assets/icons/util.d.ts +11 -0
- package/dist/assets/icons/util.d.ts.map +1 -0
- package/dist/assets/images/ParticipantPlaceholder.d.ts +11 -0
- package/dist/assets/images/ParticipantPlaceholder.d.ts.map +1 -0
- package/dist/assets/images/index.d.ts +2 -0
- package/dist/assets/images/index.d.ts.map +1 -0
- package/dist/components/ChatEntry.d.ts +35 -0
- package/dist/components/ChatEntry.d.ts.map +1 -0
- package/dist/components/ConnectionState.d.ts +23 -0
- package/dist/components/ConnectionState.d.ts.map +1 -0
- package/dist/components/ConnectionStateToast.d.ts +13 -0
- package/dist/components/ConnectionStateToast.d.ts.map +1 -0
- package/dist/components/LiveKitRoom.d.ts +92 -0
- package/dist/components/LiveKitRoom.d.ts.map +1 -0
- package/dist/components/ParticipantLoop.d.ts +28 -0
- package/dist/components/ParticipantLoop.d.ts.map +1 -0
- package/dist/components/RoomAudioRenderer.d.ts +29 -0
- package/dist/components/RoomAudioRenderer.d.ts.map +1 -0
- package/dist/components/RoomName.d.ts +20 -0
- package/dist/components/RoomName.d.ts.map +1 -0
- package/dist/components/SessionProvider.d.ts +13 -0
- package/dist/components/SessionProvider.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +14 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/TrackLoop.d.ts +26 -0
- package/dist/components/TrackLoop.d.ts.map +1 -0
- package/dist/components/controls/ChatToggle.d.ts +19 -0
- package/dist/components/controls/ChatToggle.d.ts.map +1 -0
- package/dist/components/controls/ClearPinButton.d.ts +20 -0
- package/dist/components/controls/ClearPinButton.d.ts.map +1 -0
- package/dist/components/controls/DisconnectButton.d.ts +19 -0
- package/dist/components/controls/DisconnectButton.d.ts.map +1 -0
- package/dist/components/controls/FocusToggle.d.ts +21 -0
- package/dist/components/controls/FocusToggle.d.ts.map +1 -0
- package/dist/components/controls/MediaDeviceSelect.d.ts +40 -0
- package/dist/components/controls/MediaDeviceSelect.d.ts.map +1 -0
- package/dist/components/controls/PaginationControl.d.ts +9 -0
- package/dist/components/controls/PaginationControl.d.ts.map +1 -0
- package/dist/components/controls/PaginationIndicator.d.ts +7 -0
- package/dist/components/controls/PaginationIndicator.d.ts.map +1 -0
- package/dist/components/controls/SettingsMenuToggle.d.ts +13 -0
- package/dist/components/controls/SettingsMenuToggle.d.ts.map +1 -0
- package/dist/components/controls/StartAudio.d.ts +24 -0
- package/dist/components/controls/StartAudio.d.ts.map +1 -0
- package/dist/components/controls/StartMediaButton.d.ts +22 -0
- package/dist/components/controls/StartMediaButton.d.ts.map +1 -0
- package/dist/components/controls/TrackToggle.d.ts +32 -0
- package/dist/components/controls/TrackToggle.d.ts.map +1 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/layout/CarouselLayout.d.ts +27 -0
- package/dist/components/layout/CarouselLayout.d.ts.map +1 -0
- package/dist/components/layout/FocusLayout.d.ts +25 -0
- package/dist/components/layout/FocusLayout.d.ts.map +1 -0
- package/dist/components/layout/GridLayout.d.ts +26 -0
- package/dist/components/layout/GridLayout.d.ts.map +1 -0
- package/dist/components/layout/LayoutContextProvider.d.ts +12 -0
- package/dist/components/layout/LayoutContextProvider.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/participant/AudioTrack.d.ts +33 -0
- package/dist/components/participant/AudioTrack.d.ts.map +1 -0
- package/dist/components/participant/AudioVisualizer.d.ts +22 -0
- package/dist/components/participant/AudioVisualizer.d.ts.map +1 -0
- package/dist/components/participant/BarVisualizer.d.ts +77 -0
- package/dist/components/participant/BarVisualizer.d.ts.map +1 -0
- package/dist/components/participant/ConnectionQualityIndicator.d.ts +16 -0
- package/dist/components/participant/ConnectionQualityIndicator.d.ts.map +1 -0
- package/dist/components/participant/ParticipantAudioTile.d.ts +14 -0
- package/dist/components/participant/ParticipantAudioTile.d.ts.map +1 -0
- package/dist/components/participant/ParticipantName.d.ts +17 -0
- package/dist/components/participant/ParticipantName.d.ts.map +1 -0
- package/dist/components/participant/ParticipantTile.d.ts +49 -0
- package/dist/components/participant/ParticipantTile.d.ts.map +1 -0
- package/dist/components/participant/TrackMutedIndicator.d.ts +19 -0
- package/dist/components/participant/TrackMutedIndicator.d.ts.map +1 -0
- package/dist/components/participant/VideoTrack.d.ts +23 -0
- package/dist/components/participant/VideoTrack.d.ts.map +1 -0
- package/dist/components/participant/animationSequences/connectingSequence.d.ts +2 -0
- package/dist/components/participant/animationSequences/connectingSequence.d.ts.map +1 -0
- package/dist/components/participant/animationSequences/listeningSequence.d.ts +2 -0
- package/dist/components/participant/animationSequences/listeningSequence.d.ts.map +1 -0
- package/dist/components/participant/animationSequences/thinkingSequence.d.ts +2 -0
- package/dist/components/participant/animationSequences/thinkingSequence.d.ts.map +1 -0
- package/dist/components/participant/animators/useBarAnimator.d.ts +3 -0
- package/dist/components/participant/animators/useBarAnimator.d.ts.map +1 -0
- package/dist/components-lNrIMTWQ.mjs +1051 -0
- package/dist/components-lNrIMTWQ.mjs.map +1 -0
- package/dist/context/chat-context.d.ts +23 -0
- package/dist/context/chat-context.d.ts.map +1 -0
- package/dist/context/feature-context.d.ts +14 -0
- package/dist/context/feature-context.d.ts.map +1 -0
- package/dist/context/index.d.ts +10 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/layout-context.d.ts +32 -0
- package/dist/context/layout-context.d.ts.map +1 -0
- package/dist/context/participant-context.d.ts +22 -0
- package/dist/context/participant-context.d.ts.map +1 -0
- package/dist/context/pin-context.d.ts +17 -0
- package/dist/context/pin-context.d.ts.map +1 -0
- package/dist/context/room-context.d.ts +22 -0
- package/dist/context/room-context.d.ts.map +1 -0
- package/dist/context/session-context.d.ts +22 -0
- package/dist/context/session-context.d.ts.map +1 -0
- package/dist/context/track-reference-context.d.ts +25 -0
- package/dist/context/track-reference-context.d.ts.map +1 -0
- package/dist/contexts-D4V9wQRc.mjs +4026 -0
- package/dist/contexts-D4V9wQRc.mjs.map +1 -0
- package/dist/hooks/cloud/krisp/useKrispNoiseFilter.d.ts +42 -0
- package/dist/hooks/cloud/krisp/useKrispNoiseFilter.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +54 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/internal/index.d.ts +10 -0
- package/dist/hooks/internal/index.d.ts.map +1 -0
- package/dist/hooks/internal/useMediaQuery.d.ts +7 -0
- package/dist/hooks/internal/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/internal/useObservableState.d.ts +6 -0
- package/dist/hooks/internal/useObservableState.d.ts.map +1 -0
- package/dist/hooks/internal/useResizeObserver.d.ts +14 -0
- package/dist/hooks/internal/useResizeObserver.d.ts.map +1 -0
- package/dist/hooks/useAgent.d.ts +219 -0
- package/dist/hooks/useAgent.d.ts.map +1 -0
- package/dist/hooks/useAudioPlayback.d.ts +15 -0
- package/dist/hooks/useAudioPlayback.d.ts.map +1 -0
- package/dist/hooks/useChat.d.ts +43 -0
- package/dist/hooks/useChat.d.ts.map +1 -0
- package/dist/hooks/useChatToggle.d.ts +21 -0
- package/dist/hooks/useChatToggle.d.ts.map +1 -0
- package/dist/hooks/useClearPinButton.d.ts +15 -0
- package/dist/hooks/useClearPinButton.d.ts.map +1 -0
- package/dist/hooks/useConnectionQualityIndicator.d.ts +20 -0
- package/dist/hooks/useConnectionQualityIndicator.d.ts.map +1 -0
- package/dist/hooks/useConnectionStatus.d.ts +12 -0
- package/dist/hooks/useConnectionStatus.d.ts.map +1 -0
- package/dist/hooks/useDataChannel.d.ts +38 -0
- package/dist/hooks/useDataChannel.d.ts.map +1 -0
- package/dist/hooks/useDisconnectButton.d.ts +21 -0
- package/dist/hooks/useDisconnectButton.d.ts.map +1 -0
- package/dist/hooks/useEvents.d.ts +9 -0
- package/dist/hooks/useEvents.d.ts.map +1 -0
- package/dist/hooks/useFacingMode.d.ts +10 -0
- package/dist/hooks/useFacingMode.d.ts.map +1 -0
- package/dist/hooks/useFocusToggle.d.ts +26 -0
- package/dist/hooks/useFocusToggle.d.ts.map +1 -0
- package/dist/hooks/useGridLayout.d.ts +27 -0
- package/dist/hooks/useGridLayout.d.ts.map +1 -0
- package/dist/hooks/useIsEncrypted.d.ts +12 -0
- package/dist/hooks/useIsEncrypted.d.ts.map +1 -0
- package/dist/hooks/useIsMuted.d.ts +22 -0
- package/dist/hooks/useIsMuted.d.ts.map +1 -0
- package/dist/hooks/useIsRecording.d.ts +11 -0
- package/dist/hooks/useIsRecording.d.ts.map +1 -0
- package/dist/hooks/useIsSpeaking.d.ts +11 -0
- package/dist/hooks/useIsSpeaking.d.ts.map +1 -0
- package/dist/hooks/useLiveKitRoom.d.ts +19 -0
- package/dist/hooks/useLiveKitRoom.d.ts.map +1 -0
- package/dist/hooks/useLocalParticipant.d.ts +29 -0
- package/dist/hooks/useLocalParticipant.d.ts.map +1 -0
- package/dist/hooks/useLocalParticipantPermissions.d.ts +12 -0
- package/dist/hooks/useLocalParticipantPermissions.d.ts.map +1 -0
- package/dist/hooks/useMediaDeviceSelect.d.ts +41 -0
- package/dist/hooks/useMediaDeviceSelect.d.ts.map +1 -0
- package/dist/hooks/useMediaDevices.d.ts +15 -0
- package/dist/hooks/useMediaDevices.d.ts.map +1 -0
- package/dist/hooks/useMediaTrackBySourceOrName.d.ts +18 -0
- package/dist/hooks/useMediaTrackBySourceOrName.d.ts.map +1 -0
- package/dist/hooks/usePagination.d.ts +24 -0
- package/dist/hooks/usePagination.d.ts.map +1 -0
- package/dist/hooks/useParticipantAttributes.d.ts +30 -0
- package/dist/hooks/useParticipantAttributes.d.ts.map +1 -0
- package/dist/hooks/useParticipantInfo.d.ts +21 -0
- package/dist/hooks/useParticipantInfo.d.ts.map +1 -0
- package/dist/hooks/useParticipantPermissions.d.ts +17 -0
- package/dist/hooks/useParticipantPermissions.d.ts.map +1 -0
- package/dist/hooks/useParticipantTile.d.ts +22 -0
- package/dist/hooks/useParticipantTile.d.ts.map +1 -0
- package/dist/hooks/useParticipantTracks.d.ts +14 -0
- package/dist/hooks/useParticipantTracks.d.ts.map +1 -0
- package/dist/hooks/useParticipants.d.ts +30 -0
- package/dist/hooks/useParticipants.d.ts.map +1 -0
- package/dist/hooks/usePersistentUserChoices.d.ts +35 -0
- package/dist/hooks/usePersistentUserChoices.d.ts.map +1 -0
- package/dist/hooks/usePinnedTracks.d.ts +14 -0
- package/dist/hooks/usePinnedTracks.d.ts.map +1 -0
- package/dist/hooks/useRemoteParticipant.d.ts +35 -0
- package/dist/hooks/useRemoteParticipant.d.ts.map +1 -0
- package/dist/hooks/useRemoteParticipants.d.ts +30 -0
- package/dist/hooks/useRemoteParticipants.d.ts.map +1 -0
- package/dist/hooks/useRoomInfo.d.ts +21 -0
- package/dist/hooks/useRoomInfo.d.ts.map +1 -0
- package/dist/hooks/useSequentialRoomConnectDisconnect.d.ts +27 -0
- package/dist/hooks/useSequentialRoomConnectDisconnect.d.ts.map +1 -0
- package/dist/hooks/useSession.d.ts +130 -0
- package/dist/hooks/useSession.d.ts.map +1 -0
- package/dist/hooks/useSessionMessages.d.ts +29 -0
- package/dist/hooks/useSessionMessages.d.ts.map +1 -0
- package/dist/hooks/useSettingsToggle.d.ts +20 -0
- package/dist/hooks/useSettingsToggle.d.ts.map +1 -0
- package/dist/hooks/useSortedParticipants.d.ts +7 -0
- package/dist/hooks/useSortedParticipants.d.ts.map +1 -0
- package/dist/hooks/useSpeakingParticipants.d.ts +16 -0
- package/dist/hooks/useSpeakingParticipants.d.ts.map +1 -0
- package/dist/hooks/useStartAudio.d.ts +27 -0
- package/dist/hooks/useStartAudio.d.ts.map +1 -0
- package/dist/hooks/useStartVideo.d.ts +26 -0
- package/dist/hooks/useStartVideo.d.ts.map +1 -0
- package/dist/hooks/useSwipe.d.ts +24 -0
- package/dist/hooks/useSwipe.d.ts.map +1 -0
- package/dist/hooks/useTextStream.d.ts +20 -0
- package/dist/hooks/useTextStream.d.ts.map +1 -0
- package/dist/hooks/useToken.d.ts +20 -0
- package/dist/hooks/useToken.d.ts.map +1 -0
- package/dist/hooks/useTrack.d.ts +4 -0
- package/dist/hooks/useTrack.d.ts.map +1 -0
- package/dist/hooks/useTrackByName.d.ts +10 -0
- package/dist/hooks/useTrackByName.d.ts.map +1 -0
- package/dist/hooks/useTrackMutedIndicator.d.ts +18 -0
- package/dist/hooks/useTrackMutedIndicator.d.ts.map +1 -0
- package/dist/hooks/useTrackRefBySourceOrName.d.ts +7 -0
- package/dist/hooks/useTrackRefBySourceOrName.d.ts.map +1 -0
- package/dist/hooks/useTrackSyncTime.d.ts +10 -0
- package/dist/hooks/useTrackSyncTime.d.ts.map +1 -0
- package/dist/hooks/useTrackToggle.d.ts +27 -0
- package/dist/hooks/useTrackToggle.d.ts.map +1 -0
- package/dist/hooks/useTrackTranscription.d.ts +26 -0
- package/dist/hooks/useTrackTranscription.d.ts.map +1 -0
- package/dist/hooks/useTrackVolume.d.ts +49 -0
- package/dist/hooks/useTrackVolume.d.ts.map +1 -0
- package/dist/hooks/useTracks.d.ts +29 -0
- package/dist/hooks/useTracks.d.ts.map +1 -0
- package/dist/hooks/useTranscriptions.d.ts +21 -0
- package/dist/hooks/useTranscriptions.d.ts.map +1 -0
- package/dist/hooks/useVisualStableUpdate.d.ts +27 -0
- package/dist/hooks/useVisualStableUpdate.d.ts.map +1 -0
- package/dist/hooks/useVoiceAssistant.d.ts +43 -0
- package/dist/hooks/useVoiceAssistant.d.ts.map +1 -0
- package/dist/hooks/useWarnAboutMissingStyles.d.ts +5 -0
- package/dist/hooks/useWarnAboutMissingStyles.d.ts.map +1 -0
- package/dist/hooks-hQJmeINB.mjs +1992 -0
- package/dist/hooks-hQJmeINB.mjs.map +1 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -0
- package/dist/hooks.mjs +64 -0
- package/dist/hooks.mjs.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.docs.d.ts +6 -0
- package/dist/index.docs.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +157 -0
- package/dist/index.mjs.map +1 -0
- package/dist/krisp.d.ts +2 -0
- package/dist/krisp.js +2 -0
- package/dist/krisp.js.map +1 -0
- package/dist/krisp.mjs +45 -0
- package/dist/krisp.mjs.map +1 -0
- package/dist/mergeProps.d.ts +25 -0
- package/dist/mergeProps.d.ts.map +1 -0
- package/dist/prefabs/AudioConference.d.ts +22 -0
- package/dist/prefabs/AudioConference.d.ts.map +1 -0
- package/dist/prefabs/Chat.d.ts +35 -0
- package/dist/prefabs/Chat.d.ts.map +1 -0
- package/dist/prefabs/ControlBar.d.ts +45 -0
- package/dist/prefabs/ControlBar.d.ts.map +1 -0
- package/dist/prefabs/MediaDeviceMenu.d.ts +36 -0
- package/dist/prefabs/MediaDeviceMenu.d.ts.map +1 -0
- package/dist/prefabs/PreJoin.d.ts +59 -0
- package/dist/prefabs/PreJoin.d.ts.map +1 -0
- package/dist/prefabs/VideoConference.d.ts +35 -0
- package/dist/prefabs/VideoConference.d.ts.map +1 -0
- package/dist/prefabs/VoiceAssistantControlBar.d.ts +32 -0
- package/dist/prefabs/VoiceAssistantControlBar.d.ts.map +1 -0
- package/dist/prefabs/index.d.ts +8 -0
- package/dist/prefabs/index.d.ts.map +1 -0
- package/dist/prefabs.d.ts +2 -0
- package/dist/prefabs.js +2 -0
- package/dist/prefabs.js.map +1 -0
- package/dist/prefabs.mjs +579 -0
- package/dist/prefabs.mjs.map +1 -0
- package/dist/room-BP3SCCCd.mjs +191 -0
- package/dist/room-BP3SCCCd.mjs.map +1 -0
- package/dist/shared-88J2fzv7.js +2 -0
- package/dist/shared-88J2fzv7.js.map +1 -0
- package/dist/shared-BDr0qLg4.js +4 -0
- package/dist/shared-BDr0qLg4.js.map +1 -0
- package/dist/shared-CjI_UuOX.js +2 -0
- package/dist/shared-CjI_UuOX.js.map +1 -0
- package/dist/shared-DTHOl3uJ.js +2 -0
- package/dist/shared-DTHOl3uJ.js.map +1 -0
- package/dist/utils.d.ts +19 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +104 -0
- package/src/assets/icons/CameraDisabledIcon.tsx +15 -0
- package/src/assets/icons/CameraIcon.tsx +14 -0
- package/src/assets/icons/ChatCloseIcon.tsx +17 -0
- package/src/assets/icons/ChatIcon.tsx +25 -0
- package/src/assets/icons/Chevron.tsx +19 -0
- package/src/assets/icons/FocusToggleIcon.tsx +16 -0
- package/src/assets/icons/GearIcon.tsx +19 -0
- package/src/assets/icons/LeaveIcon.tsx +25 -0
- package/src/assets/icons/LockLockedIcon.tsx +19 -0
- package/src/assets/icons/MicDisabledIcon.tsx +15 -0
- package/src/assets/icons/MicIcon.tsx +19 -0
- package/src/assets/icons/QualityExcellentIcon.tsx +15 -0
- package/src/assets/icons/QualityGoodIcon.tsx +19 -0
- package/src/assets/icons/QualityPoorIcon.tsx +20 -0
- package/src/assets/icons/QualityUnknownIcon.tsx +17 -0
- package/src/assets/icons/ScreenShareIcon.tsx +25 -0
- package/src/assets/icons/ScreenShareStopIcon.tsx +21 -0
- package/src/assets/icons/SpinnerIcon.tsx +93 -0
- package/src/assets/icons/UnfocusToggleIcon.tsx +16 -0
- package/src/assets/icons/index.ts +19 -0
- package/src/assets/icons/util.tsx +47 -0
- package/src/assets/images/ParticipantPlaceholder.tsx +31 -0
- package/src/assets/images/index.ts +1 -0
- package/src/assets/template.js +21 -0
- package/src/components/ChatEntry.tsx +112 -0
- package/src/components/ConnectionState.tsx +36 -0
- package/src/components/ConnectionStateToast.tsx +47 -0
- package/src/components/LiveKitRoom.tsx +122 -0
- package/src/components/ParticipantLoop.tsx +41 -0
- package/src/components/RoomAudioRenderer.tsx +57 -0
- package/src/components/RoomName.tsx +36 -0
- package/src/components/SessionProvider.tsx +22 -0
- package/src/components/Toast.tsx +18 -0
- package/src/components/TrackLoop.tsx +45 -0
- package/src/components/controls/ChatToggle.tsx +32 -0
- package/src/components/controls/ClearPinButton.tsx +32 -0
- package/src/components/controls/DisconnectButton.tsx +32 -0
- package/src/components/controls/FocusToggle.tsx +54 -0
- package/src/components/controls/MediaDeviceSelect.tsx +144 -0
- package/src/components/controls/PaginationControl.tsx +51 -0
- package/src/components/controls/PaginationIndicator.tsx +26 -0
- package/src/components/controls/SettingsMenuToggle.tsx +26 -0
- package/src/components/controls/StartAudio.tsx +40 -0
- package/src/components/controls/StartMediaButton.tsx +41 -0
- package/src/components/controls/TrackToggle.tsx +54 -0
- package/src/components/index.ts +34 -0
- package/src/components/layout/CarouselLayout.tsx +80 -0
- package/src/components/layout/FocusLayout.tsx +37 -0
- package/src/components/layout/GridLayout.tsx +63 -0
- package/src/components/layout/LayoutContextProvider.tsx +36 -0
- package/src/components/layout/index.ts +3 -0
- package/src/components/participant/AudioTrack.tsx +89 -0
- package/src/components/participant/AudioVisualizer.tsx +67 -0
- package/src/components/participant/BarVisualizer.tsx +164 -0
- package/src/components/participant/ConnectionQualityIndicator.tsx +36 -0
- package/src/components/participant/ParticipantAudioTile.tsx +67 -0
- package/src/components/participant/ParticipantName.tsx +50 -0
- package/src/components/participant/ParticipantTile.tsx +192 -0
- package/src/components/participant/TrackMutedIndicator.tsx +53 -0
- package/src/components/participant/VideoTrack.tsx +92 -0
- package/src/components/participant/animationSequences/connectingSequence.ts +9 -0
- package/src/components/participant/animationSequences/listeningSequence.ts +6 -0
- package/src/components/participant/animationSequences/thinkingSequence.ts +12 -0
- package/src/components/participant/animators/useBarAnimator.ts +55 -0
- package/src/context/chat-context.ts +37 -0
- package/src/context/feature-context.ts +28 -0
- package/src/context/index.ts +27 -0
- package/src/context/layout-context.ts +72 -0
- package/src/context/participant-context.ts +44 -0
- package/src/context/pin-context.ts +27 -0
- package/src/context/room-context.ts +42 -0
- package/src/context/session-context.ts +43 -0
- package/src/context/track-reference-context.ts +47 -0
- package/src/hooks/cloud/krisp/useKrispNoiseFilter.ts +110 -0
- package/src/hooks/index.ts +72 -0
- package/src/hooks/internal/index.ts +10 -0
- package/src/hooks/internal/useMediaQuery.ts +46 -0
- package/src/hooks/internal/useObservableState.ts +24 -0
- package/src/hooks/internal/useResizeObserver.ts +124 -0
- package/src/hooks/useAgent.ts +945 -0
- package/src/hooks/useAudioPlayback.ts +34 -0
- package/src/hooks/useChat.ts +57 -0
- package/src/hooks/useChatToggle.ts +38 -0
- package/src/hooks/useClearPinButton.ts +29 -0
- package/src/hooks/useConnectionQualityIndicator.ts +33 -0
- package/src/hooks/useConnectionStatus.ts +22 -0
- package/src/hooks/useDataChannel.ts +73 -0
- package/src/hooks/useDisconnectButton.ts +36 -0
- package/src/hooks/useEvents.ts +39 -0
- package/src/hooks/useFacingMode.ts +22 -0
- package/src/hooks/useFocusToggle.ts +59 -0
- package/src/hooks/useGridLayout.ts +44 -0
- package/src/hooks/useIsEncrypted.ts +29 -0
- package/src/hooks/useIsMuted.ts +51 -0
- package/src/hooks/useIsRecording.ts +23 -0
- package/src/hooks/useIsSpeaking.ts +21 -0
- package/src/hooks/useLiveKitRoom.ts +186 -0
- package/src/hooks/useLocalParticipant.ts +73 -0
- package/src/hooks/useLocalParticipantPermissions.ts +24 -0
- package/src/hooks/useMediaDeviceSelect.ts +81 -0
- package/src/hooks/useMediaDevices.ts +28 -0
- package/src/hooks/useMediaTrackBySourceOrName.ts +97 -0
- package/src/hooks/usePagination.test.ts +77 -0
- package/src/hooks/usePagination.ts +67 -0
- package/src/hooks/useParticipantAttributes.ts +69 -0
- package/src/hooks/useParticipantInfo.ts +35 -0
- package/src/hooks/useParticipantPermissions.ts +29 -0
- package/src/hooks/useParticipantTile.ts +81 -0
- package/src/hooks/useParticipantTracks.ts +54 -0
- package/src/hooks/useParticipants.ts +42 -0
- package/src/hooks/usePersistentUserChoices.ts +64 -0
- package/src/hooks/usePinnedTracks.ts +24 -0
- package/src/hooks/useRemoteParticipant.ts +79 -0
- package/src/hooks/useRemoteParticipants.ts +45 -0
- package/src/hooks/useRoomInfo.ts +32 -0
- package/src/hooks/useSequentialRoomConnectDisconnect.ts +171 -0
- package/src/hooks/useSession.ts +642 -0
- package/src/hooks/useSessionMessages.ts +158 -0
- package/src/hooks/useSettingsToggle.ts +32 -0
- package/src/hooks/useSortedParticipants.ts +20 -0
- package/src/hooks/useSpeakingParticipants.ts +27 -0
- package/src/hooks/useStartAudio.ts +50 -0
- package/src/hooks/useStartVideo.ts +49 -0
- package/src/hooks/useSwipe.ts +68 -0
- package/src/hooks/useTextStream.ts +35 -0
- package/src/hooks/useToken.ts +54 -0
- package/src/hooks/useTrack.ts +11 -0
- package/src/hooks/useTrackByName.ts +15 -0
- package/src/hooks/useTrackMutedIndicator.ts +44 -0
- package/src/hooks/useTrackRefBySourceOrName.ts +30 -0
- package/src/hooks/useTrackSyncTime.ts +18 -0
- package/src/hooks/useTrackToggle.ts +93 -0
- package/src/hooks/useTrackTranscription.ts +75 -0
- package/src/hooks/useTrackVolume.ts +283 -0
- package/src/hooks/useTracks.test.ts +60 -0
- package/src/hooks/useTracks.ts +154 -0
- package/src/hooks/useTranscriptions.ts +48 -0
- package/src/hooks/useVisualStableUpdate.ts +63 -0
- package/src/hooks/useVoiceAssistant.ts +109 -0
- package/src/hooks/useWarnAboutMissingStyles.ts +11 -0
- package/src/index.docs.ts +12 -0
- package/src/index.ts +32 -0
- package/src/mergeProps.ts +87 -0
- package/src/prefabs/AudioConference.tsx +57 -0
- package/src/prefabs/Chat.tsx +153 -0
- package/src/prefabs/ControlBar.tsx +227 -0
- package/src/prefabs/MediaDeviceMenu.tsx +159 -0
- package/src/prefabs/PreJoin.tsx +439 -0
- package/src/prefabs/VideoConference.tsx +184 -0
- package/src/prefabs/VoiceAssistantControlBar.tsx +109 -0
- package/src/prefabs/index.ts +11 -0
- package/src/utils.ts +78 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const d=require("livekit-client"),Gn=require("react");function Yn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Y=Yn(Gn),Ne=Math.min,le=Math.max,$e=Math.round,_e=Math.floor,Z=e=>({x:e,y:e}),qn={left:"right",right:"left",bottom:"top",top:"bottom"},Kn={start:"end",end:"start"};function Pt(e,t,n){return le(e,Ne(t,n))}function Ge(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function Ye(e){return e.split("-")[1]}function Kt(e){return e==="x"?"y":"x"}function Qt(e){return e==="y"?"height":"width"}const Qn=new Set(["top","bottom"]);function oe(e){return Qn.has(ue(e))?"y":"x"}function Jt(e){return Kt(oe(e))}function Jn(e,t,n){n===void 0&&(n=!1);const r=Ye(e),i=Jt(e),o=Qt(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ue(a)),[a,Ue(a)]}function Xn(e){const t=Ue(e);return[st(e),t,st(t)]}function st(e){return e.replace(/start|end/g,t=>Kn[t])}const Ct=["left","right"],Ot=["right","left"],Zn=["top","bottom"],er=["bottom","top"];function tr(e,t,n){switch(e){case"top":case"bottom":return n?t?Ot:Ct:t?Ct:Ot;case"left":case"right":return t?Zn:er;default:return[]}}function nr(e,t,n,r){const i=Ye(e);let o=tr(ue(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(st)))),o}function Ue(e){return e.replace(/left|right|bottom|top/g,t=>qn[t])}function rr(e){return{top:0,right:0,bottom:0,left:0,...e}}function ir(e){return typeof e!="number"?rr(e):{top:e,right:e,bottom:e,left:e}}function We(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function kt(e,t,n){let{reference:r,floating:i}=e;const o=oe(t),a=Jt(t),s=Qt(a),c=ue(t),l=o==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,m=r[s]/2-i[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Ye(t)){case"start":p[a]-=m*(n&&l?-1:1);break;case"end":p[a]+=m*(n&&l?-1:1);break}return p}const or=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=kt(l,r,c),m=r,p={},b=0;for(let v=0;v<s.length;v++){const{name:g,fn:h}=s[v],{x:w,y:S,data:k,reset:y}=await h({x:u,y:f,initialPlacement:r,placement:m,strategy:i,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=w??u,f=S??f,p={...p,[g]:{...p[g],...k}},y&&b<=50&&(b++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(l=y.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:f}=kt(l,m,c)),v=-1)}return{x:u,y:f,placement:m,strategy:i,middlewareData:p}};async function Xt(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Ge(t,e),b=ir(p),g=s[m?f==="floating"?"reference":"floating":f],h=We(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),w=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),k=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},y=We(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:S,strategy:c}):w);return{top:(h.top-y.top+b.top)/k.y,bottom:(y.bottom-h.bottom+b.bottom)/k.y,left:(h.left-y.left+b.left)/k.x,right:(y.right-h.right+b.right)/k.x}}const ar=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...g}=Ge(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const h=ue(i),w=oe(s),S=ue(s)===s,k=await(c.isRTL==null?void 0:c.isRTL(l.floating)),y=m||(S||!v?[Ue(s)]:Xn(s)),E=b!=="none";!m&&E&&y.push(...nr(s,v,b,k));const T=[s,...y],R=await Xt(t,g),I=[];let N=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&I.push(R[h]),f){const A=Jn(i,a,k);I.push(R[A[0]],R[A[1]])}if(N=[...N,{placement:i,overflows:I}],!I.every(A=>A<=0)){var x,P;const A=(((x=o.flip)==null?void 0:x.index)||0)+1,M=T[A];if(M&&(!(f==="alignment"?w!==oe(M):!1)||N.every(D=>oe(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:A,overflows:N},reset:{placement:M}};let G=(P=N.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:P.placement;if(!G)switch(p){case"bestFit":{var W;const K=(W=N.filter(D=>{if(E){const ie=oe(D.placement);return ie===w||ie==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(ie=>ie>0).reduce((ie,zn)=>ie+zn,0)]).sort((D,ie)=>D[1]-ie[1])[0])==null?void 0:W[0];K&&(G=K);break}case"initialPlacement":G=s;break}if(i!==G)return{reset:{placement:G}}}return{}}}},sr=new Set(["left","top"]);async function cr(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ue(n),s=Ye(n),c=oe(n)==="y",l=sr.has(a)?-1:1,u=o&&c?-1:1,f=Ge(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),c?{x:p*u,y:m*l}:{x:m*l,y:p*u}}const lr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,c=await cr(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},ur=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:h,y:w}=g;return{x:h,y:w}}},...c}=Ge(e,t),l={x:n,y:r},u=await Xt(t,c),f=oe(ue(i)),m=Kt(f);let p=l[m],b=l[f];if(o){const g=m==="y"?"top":"left",h=m==="y"?"bottom":"right",w=p+u[g],S=p-u[h];p=Pt(w,p,S)}if(a){const g=f==="y"?"top":"left",h=f==="y"?"bottom":"right",w=b+u[g],S=b-u[h];b=Pt(w,b,S)}const v=s.fn({...t,[m]:p,[f]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:o,[f]:a}}}}}};function qe(){return typeof window<"u"}function we(e){return Zt(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(Zt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zt(e){return qe()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return qe()?e instanceof Element||e instanceof z(e).Element:!1}function ee(e){return qe()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function At(e){return!qe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const fr=new Set(["inline","contents"]);function ke(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!fr.has(i)}const dr=new Set(["table","td","th"]);function pr(e){return dr.has(we(e))}const vr=[":popover-open",":modal"];function Ke(e){return vr.some(t=>{try{return e.matches(t)}catch{return!1}})}const hr=["transform","translate","scale","rotate","perspective"],mr=["transform","translate","scale","rotate","perspective","filter"],br=["paint","layout","strict","content"];function ht(e){const t=mt(),n=J(e)?X(e):e;return hr.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||mr.some(r=>(n.willChange||"").includes(r))||br.some(r=>(n.contain||"").includes(r))}function gr(e){let t=se(e);for(;ee(t)&&!be(t);){if(ht(t))return t;if(Ke(t))return null;t=se(t)}return null}function mt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yr=new Set(["html","body","#document"]);function be(e){return yr.has(we(e))}function X(e){return z(e).getComputedStyle(e)}function Qe(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function se(e){if(we(e)==="html")return e;const t=e.assignedSlot||e.parentNode||At(e)&&e.host||te(e);return At(t)?t.host:t}function en(e){const t=se(e);return be(t)?e.ownerDocument?e.ownerDocument.body:e.body:ee(t)&&ke(t)?t:en(t)}function Te(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=en(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=z(i);if(o){const s=ct(a);return t.concat(a,a.visualViewport||[],ke(i)?i:[],s&&n?Te(s):[])}return t.concat(i,Te(i,[],n))}function ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tn(e){const t=X(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ee(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=$e(n)!==o||$e(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function bt(e){return J(e)?e:e.contextElement}function ve(e){const t=bt(e);if(!ee(t))return Z(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=tn(t);let a=(o?$e(n.width):n.width)/r,s=(o?$e(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const wr=Z(0);function nn(e){const t=z(e);return!mt()||!t.visualViewport?wr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function fe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=bt(e);let a=Z(1);t&&(r?J(r)&&(a=ve(r)):a=ve(e));const s=Sr(o,n,r)?nn(o):Z(0);let c=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,u=i.width/a.x,f=i.height/a.y;if(o){const m=z(o),p=r&&J(r)?z(r):r;let b=m,v=ct(b);for(;v&&r&&p!==b;){const g=ve(v),h=v.getBoundingClientRect(),w=X(v),S=h.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,k=h.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;c*=g.x,l*=g.y,u*=g.x,f*=g.y,c+=S,l+=k,b=z(v),v=ct(b)}}return We({width:u,height:f,x:c,y:l})}function Je(e,t){const n=Qe(e).scrollLeft;return t?t.left+n:fe(te(e)).left+n}function rn(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Je(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Er(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=te(r),s=t?Ke(t.floating):!1;if(r===a||s&&o)return n;let c={scrollLeft:0,scrollTop:0},l=Z(1);const u=Z(0),f=ee(r);if((f||!f&&!o)&&((we(r)!=="body"||ke(a))&&(c=Qe(r)),ee(r))){const p=fe(r);l=ve(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const m=a&&!f&&!o?rn(a,c):Z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+m.x,y:n.y*l.y-c.scrollTop*l.y+u.y+m.y}}function xr(e){return Array.from(e.getClientRects())}function Tr(e){const t=te(e),n=Qe(e),r=e.ownerDocument.body,i=le(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=le(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Je(e);const s=-n.scrollTop;return X(r).direction==="rtl"&&(a+=le(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}const _t=25;function Pr(e,t){const n=z(e),r=te(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;const u=mt();(!u||u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const l=Je(r);if(l<=0){const u=r.ownerDocument,f=u.body,m=getComputedStyle(f),p=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-f.clientWidth-p);b<=_t&&(o-=b)}else l<=_t&&(o+=l);return{width:o,height:a,x:s,y:c}}const Cr=new Set(["absolute","fixed"]);function Or(e,t){const n=fe(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=ee(e)?ve(e):Z(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,c=i*o.x,l=r*o.y;return{width:a,height:s,x:c,y:l}}function Lt(e,t,n){let r;if(t==="viewport")r=Pr(e,n);else if(t==="document")r=Tr(te(e));else if(J(t))r=Or(t,n);else{const i=nn(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return We(r)}function on(e,t){const n=se(e);return n===t||!J(n)||be(n)?!1:X(n).position==="fixed"||on(n,t)}function kr(e,t){const n=t.get(e);if(n)return n;let r=Te(e,[],!1).filter(s=>J(s)&&we(s)!=="body"),i=null;const o=X(e).position==="fixed";let a=o?se(e):e;for(;J(a)&&!be(a);){const s=X(a),c=ht(a);!c&&s.position==="fixed"&&(i=null),(o?!c&&!i:!c&&s.position==="static"&&!!i&&Cr.has(i.position)||ke(a)&&!c&&on(e,a))?r=r.filter(u=>u!==a):i=s,a=se(a)}return t.set(e,r),r}function Ar(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Ke(t)?[]:kr(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{const f=Lt(t,u,i);return l.top=le(f.top,l.top),l.right=Ne(f.right,l.right),l.bottom=Ne(f.bottom,l.bottom),l.left=le(f.left,l.left),l},Lt(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _r(e){const{width:t,height:n}=tn(e);return{width:t,height:n}}function Lr(e,t,n){const r=ee(t),i=te(t),o=n==="fixed",a=fe(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const c=Z(0);function l(){c.x=Je(i)}if(r||!r&&!o)if((we(t)!=="body"||ke(i))&&(s=Qe(t)),r){const p=fe(t,!0,o,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&l();o&&!r&&i&&l();const u=i&&!r&&!o?rn(i,s):Z(0),f=a.left+s.scrollLeft-c.x-u.x,m=a.top+s.scrollTop-c.y-u.y;return{x:f,y:m,width:a.width,height:a.height}}function tt(e){return X(e).position==="static"}function Rt(e,t){if(!ee(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function an(e,t){const n=z(e);if(Ke(e))return n;if(!ee(e)){let i=se(e);for(;i&&!be(i);){if(J(i)&&!tt(i))return i;i=se(i)}return n}let r=Rt(e,t);for(;r&&pr(r)&&tt(r);)r=Rt(r,t);return r&&be(r)&&tt(r)&&!ht(r)?n:r||gr(e)||n}const Rr=async function(e){const t=this.getOffsetParent||an,n=this.getDimensions,r=await n(e.floating);return{reference:Lr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ir(e){return X(e).direction==="rtl"}const Mr={convertOffsetParentRelativeRectToViewportRelativeRect:Er,getDocumentElement:te,getClippingRect:Ar,getOffsetParent:an,getElementRects:Rr,getClientRects:xr,getDimensions:_r,getScale:ve,isElement:J,isRTL:Ir};function sn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dr(e,t){let n=null,r;const i=te(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:f,width:m,height:p}=l;if(s||t(),!m||!p)return;const b=_e(f),v=_e(i.clientWidth-(u+m)),g=_e(i.clientHeight-(f+p)),h=_e(u),S={rootMargin:-b+"px "+-v+"px "+-g+"px "+-h+"px",threshold:le(0,Ne(1,c))||1};let k=!0;function y(E){const T=E[0].intersectionRatio;if(T!==c){if(!k)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!sn(l,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(y,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,S)}n.observe(e)}return a(!0),o}function Fr(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=bt(e),u=i||o?[...l?Te(l):[],...Te(t)]:[];u.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),o&&h.addEventListener("resize",n)});const f=l&&s?Dr(l,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(h=>{let[w]=h;w&&w.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let b,v=c?fe(e):null;c&&g();function g(){const h=fe(e);v&&!sn(v,h)&&n(),v=h,b=requestAnimationFrame(g)}return n(),()=>{var h;u.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f==null||f(),(h=p)==null||h.disconnect(),p=null,c&&cancelAnimationFrame(b)}}const Nr=lr,$r=ur,Ur=ar,Wr=(e,t,n)=>{const r=new Map,i={platform:Mr,...n},o={...i.platform,_c:r};return or(e,t,{...i,platform:o})};var Br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Me={exports:{}},jr=Me.exports,It;function Vr(){return It||(It=1,(function(e){(function(t,n){e.exports?e.exports=n():t.log=n()})(jr,function(){var t=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],o={},a=null;function s(v,g){var h=v[g];if(typeof h.bind=="function")return h.bind(v);try{return Function.prototype.bind.call(h,v)}catch{return function(){return Function.prototype.apply.apply(h,[v,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(v){return v==="debug"&&(v="log"),typeof console===n?!1:v==="trace"&&r?c:console[v]!==void 0?s(console,v):console.log!==void 0?s(console,"log"):t}function u(){for(var v=this.getLevel(),g=0;g<i.length;g++){var h=i[g];this[h]=g<v?t:this.methodFactory(h,v,this.name)}if(this.log=this.debug,typeof console===n&&v<this.levels.SILENT)return"No console available for logging"}function f(v){return function(){typeof console!==n&&(u.call(this),this[v].apply(this,arguments))}}function m(v,g,h){return l(v)||f.apply(this,arguments)}function p(v,g){var h=this,w,S,k,y="loglevel";typeof v=="string"?y+=":"+v:typeof v=="symbol"&&(y=void 0);function E(x){var P=(i[x]||"silent").toUpperCase();if(!(typeof window===n||!y)){try{window.localStorage[y]=P;return}catch{}try{window.document.cookie=encodeURIComponent(y)+"="+P+";"}catch{}}}function T(){var x;if(!(typeof window===n||!y)){try{x=window.localStorage[y]}catch{}if(typeof x===n)try{var P=window.document.cookie,W=encodeURIComponent(y),A=P.indexOf(W+"=");A!==-1&&(x=/^([^;]+)/.exec(P.slice(A+W.length+1))[1])}catch{}return h.levels[x]===void 0&&(x=void 0),x}}function R(){if(!(typeof window===n||!y)){try{window.localStorage.removeItem(y)}catch{}try{window.document.cookie=encodeURIComponent(y)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function I(x){var P=x;if(typeof P=="string"&&h.levels[P.toUpperCase()]!==void 0&&(P=h.levels[P.toUpperCase()]),typeof P=="number"&&P>=0&&P<=h.levels.SILENT)return P;throw new TypeError("log.setLevel() called with invalid level: "+x)}h.name=v,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=g||m,h.getLevel=function(){return k??S??w},h.setLevel=function(x,P){return k=I(x),P!==!1&&E(k),u.call(h)},h.setDefaultLevel=function(x){S=I(x),T()||h.setLevel(x,!1)},h.resetLevel=function(){k=null,R(),u.call(h)},h.enableAll=function(x){h.setLevel(h.levels.TRACE,x)},h.disableAll=function(x){h.setLevel(h.levels.SILENT,x)},h.rebuild=function(){if(a!==h&&(w=I(a.getLevel())),u.call(h),a===h)for(var x in o)o[x].rebuild()},w=I(a?a.getLevel():"WARN");var N=T();N!=null&&(k=I(N)),u.call(h)}a=new p,a.getLogger=function(g){if(typeof g!="symbol"&&typeof g!="string"||g==="")throw new TypeError("You must supply a name when creating a logger.");var h=o[g];return h||(h=o[g]=new p(g,a.methodFactory)),h};var b=typeof window!==n?window.log:void 0;return a.noConflict=function(){return typeof window!==n&&window.log===a&&(window.log=b),a},a.getLoggers=function(){return o},a.default=a,a})})(Me)),Me.exports}var Hr=Vr();const zr=cn(Hr);var lt=function(e,t){return lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},lt(e,t)};function re(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");lt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Gr(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?o(u.value):i(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}function ln(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ge(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function de(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function ye(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function he(e){return this instanceof he?(this.v=e,this):new he(e)}function Yr(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(b){return Promise.resolve(b).then(p,f)}}function s(p,b){r[p]&&(i[p]=function(v){return new Promise(function(g,h){o.push([p,v,g,h])>1||c(p,v)})},b&&(i[p]=b(i[p])))}function c(p,b){try{l(r[p](b))}catch(v){m(o[0][3],v)}}function l(p){p.value instanceof he?Promise.resolve(p.value.v).then(u,f):m(o[0][2],p)}function u(p){c("next",p)}function f(p){c("throw",p)}function m(p,b){p(b),o.shift(),o.length&&c(o[0][0],o[0][1])}}function qr(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ge=="function"?ge(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,c){a=e[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(l){o({value:l,done:s})},a)}}function C(e){return typeof e=="function"}function gt(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var nt=gt(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
2
|
+
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Be(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Ae=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=ge(a),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(v){t={error:v}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var u=this.initialTeardown;if(C(u))try{u()}catch(v){o=v instanceof nt?v.errors:[v]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var m=ge(f),p=m.next();!p.done;p=m.next()){var b=p.value;try{Mt(b)}catch(v){o=o??[],v instanceof nt?o=ye(ye([],de(o)),de(v.errors)):o.push(v)}}}catch(v){r={error:v}}finally{try{p&&!p.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}}if(o)throw new nt(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Mt(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Be(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Be(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),un=Ae.EMPTY;function fn(e){return e instanceof Ae||e&&"closed"in e&&C(e.remove)&&C(e.add)&&C(e.unsubscribe)}function Mt(e){C(e)?e():e.unsubscribe()}var Kr={Promise:void 0},Qr={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ye([e,t],de(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function dn(e){Qr.setTimeout(function(){throw e})}function je(){}function De(e){e()}var yt=(function(e){re(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,fn(n)&&n.add(r)):r.destination=Zr,r}return t.create=function(n,r,i){return new Pe(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Ae),Jr=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Le(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Le(r)}else Le(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Le(n)}},e})(),Pe=(function(e){re(t,e);function t(n,r,i){var o=e.call(this)||this,a;return C(n)||!n?a={next:n??void 0,error:r??void 0,complete:i??void 0}:a=n,o.destination=new Jr(a),o}return t})(yt);function Le(e){dn(e)}function Xr(e){throw e}var Zr={closed:!0,next:je,error:Xr,complete:je},wt=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Xe(e){return e}function ei(e){return e.length===0?Xe:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var _=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=ni(t)?t:new Pe(t,n,r);return De(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=Dt(n),new n(function(i,o){var a=new Pe({next:function(s){try{t(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[wt]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ei(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=Dt(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e})();function Dt(e){var t;return(t=e??Kr.Promise)!==null&&t!==void 0?t:Promise}function ti(e){return e&&C(e.next)&&C(e.error)&&C(e.complete)}function ni(e){return e&&e instanceof yt||ti(e)&&fn(e)}function ri(e){return C(e==null?void 0:e.lift)}function U(e){return function(t){if(ri(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function V(e,t,n,r,i){return new ii(e,t,n,r,i)}var ii=(function(e){re(t,e);function t(n,r,i,o,a,s){var c=e.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:e.prototype._next,c._error=o?function(l){try{o(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(yt),oi=gt(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ne=(function(e){re(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new Ft(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new oi},t.prototype.next=function(n){var r=this;De(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ge(r.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(n)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;De(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;De(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?un:(this.currentObservers=null,s.push(n),new Ae(function(){r.currentObservers=null,Be(s,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},t.prototype.asObservable=function(){var n=new _;return n.source=this,n},t.create=function(n,r){return new Ft(n,r)},t})(_),Ft=(function(e){re(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:un},t})(ne),pn=(function(e){re(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t})(ne),ai={now:function(){return Date.now()}},si=(function(e){re(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(Ae),Nt={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,ye([e,t],de(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},ci=(function(e){re(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Nt.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Nt.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Be(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(si),$t=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=ai.now,e})(),li=(function(e){re(t,e);function t(n,r){r===void 0&&(r=$t.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t})($t),ui=new li(ci);function fi(e){return e&&C(e.schedule)}function di(e){return e[e.length-1]}function St(e){return fi(di(e))?e.pop():void 0}var Et=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function vn(e){return C(e==null?void 0:e.then)}function hn(e){return C(e[wt])}function mn(e){return Symbol.asyncIterator&&C(e==null?void 0:e[Symbol.asyncIterator])}function bn(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function pi(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var gn=pi();function yn(e){return C(e==null?void 0:e[gn])}function wn(e){return Yr(this,arguments,function(){var n,r,i,o;return ln(this,function(a){switch(a.label){case 0:n=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,he(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,he(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,he(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Sn(e){return C(e==null?void 0:e.getReader)}function q(e){if(e instanceof _)return e;if(e!=null){if(hn(e))return vi(e);if(Et(e))return hi(e);if(vn(e))return mi(e);if(mn(e))return En(e);if(yn(e))return bi(e);if(Sn(e))return gi(e)}throw bn(e)}function vi(e){return new _(function(t){var n=e[wt]();if(C(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function hi(e){return new _(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function mi(e){return new _(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,dn)})}function bi(e){return new _(function(t){var n,r;try{for(var i=ge(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function En(e){return new _(function(t){yi(e,t).catch(function(n){return t.error(n)})})}function gi(e){return En(wn(e))}function yi(e,t){var n,r,i,o;return Gr(this,void 0,void 0,function(){var a,s;return ln(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=qr(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function ae(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function xn(e,t){return t===void 0&&(t=0),U(function(n,r){n.subscribe(V(r,function(i){return ae(r,e,function(){return r.next(i)},t)},function(){return ae(r,e,function(){return r.complete()},t)},function(i){return ae(r,e,function(){return r.error(i)},t)}))})}function Tn(e,t){return t===void 0&&(t=0),U(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function wi(e,t){return q(e).pipe(Tn(t),xn(t))}function Si(e,t){return q(e).pipe(Tn(t),xn(t))}function Ei(e,t){return new _(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function xi(e,t){return new _(function(n){var r;return ae(n,t,function(){r=e[gn](),ae(n,t,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return C(r==null?void 0:r.return)&&r.return()}})}function Pn(e,t){if(!e)throw new Error("Iterable cannot be null");return new _(function(n){ae(n,t,function(){var r=e[Symbol.asyncIterator]();ae(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Ti(e,t){return Pn(wn(e),t)}function Pi(e,t){if(e!=null){if(hn(e))return wi(e,t);if(Et(e))return Ei(e,t);if(vn(e))return Si(e,t);if(mn(e))return Pn(e,t);if(yn(e))return xi(e,t);if(Sn(e))return Ti(e,t)}throw bn(e)}function me(e,t){return t?Pi(e,t):q(e)}function ut(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=St(e);return me(e,n)}function Ci(e){return e instanceof Date&&!isNaN(e)}var Oi=gt(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function ki(e,t){var n=Ci(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,o=n.with,a=o===void 0?Ai:o,s=n.scheduler,c=s===void 0?ui:s,l=n.meta,u=l===void 0?null:l;if(r==null&&i==null)throw new TypeError("No timeout provided.");return U(function(f,m){var p,b,v=null,g=0,h=function(w){b=ae(m,c,function(){try{p.unsubscribe(),q(a({meta:u,lastValue:v,seen:g})).subscribe(m)}catch(S){m.error(S)}},w)};p=f.subscribe(V(m,function(w){b==null||b.unsubscribe(),g++,m.next(v=w),i>0&&h(i)},void 0,void 0,function(){b!=null&&b.closed||b==null||b.unsubscribe(),v=null})),!g&&h(r!=null?typeof r=="number"?r:+r-c.now():i)})}function Ai(e){throw new Oi(e)}function O(e,t){return U(function(n,r){var i=0;n.subscribe(V(r,function(o){r.next(e.call(t,o,i++))}))})}var _i=Array.isArray;function Li(e,t){return _i(t)?e.apply(void 0,ye([],de(t))):e(t)}function Ri(e){return O(function(t){return Li(e,t)})}function Ii(e,t,n,r,i,o,a,s){var c=[],l=0,u=0,f=!1,m=function(){f&&!c.length&&!l&&t.complete()},p=function(v){return l<r?b(v):c.push(v)},b=function(v){l++;var g=!1;q(n(v,u++)).subscribe(V(t,function(h){t.next(h)},function(){g=!0},void 0,function(){if(g)try{l--;for(var h=function(){var w=c.shift();a||b(w)};c.length&&l<r;)h();m()}catch(w){t.error(w)}}))};return e.subscribe(V(t,p,function(){f=!0,m()})),function(){}}function Ce(e,t,n){return n===void 0&&(n=1/0),C(t)?Ce(function(r,i){return O(function(o,a){return t(r,o,i,a)})(q(e(r,i)))},n):(typeof t=="number"&&(n=t),U(function(r,i){return Ii(r,i,e,n)}))}function Mi(e){return Ce(Xe,e)}function Di(){return Mi(1)}function Ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Di()(me(e,St(e)))}var Fi=["addListener","removeListener"],Ni=["addEventListener","removeEventListener"],$i=["on","off"];function ft(e,t,n,r){if(C(n)&&(r=n,n=void 0),r)return ft(e,t,n).pipe(Ri(r));var i=de(Bi(e)?Ni.map(function(s){return function(c){return e[s](t,c,n)}}):Ui(e)?Fi.map(Ut(e,t)):Wi(e)?$i.map(Ut(e,t)):[],2),o=i[0],a=i[1];if(!o&&Et(e))return Ce(function(s){return ft(s,t,n)})(q(e));if(!o)throw new TypeError("Invalid event target");return new _(function(s){var c=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return s.next(1<l.length?l:l[0])};return o(c),function(){return a(c)}})}function Ut(e,t){return function(n){return function(r){return e[n](t,r)}}}function Ui(e){return C(e.addListener)&&C(e.removeListener)}function Wi(e){return C(e.on)&&C(e.off)}function Bi(e){return C(e.addEventListener)&&C(e.removeEventListener)}function Ze(e,t){return U(function(n,r){var i=0;n.subscribe(V(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function ji(e,t,n,r,i){return function(o,a){var s=n,c=t,l=0;o.subscribe(V(a,function(u){var f=l++;c=s?e(c,u,f):(s=!0,u),a.next(c)},i))}}function Vi(e,t){return t===void 0&&(t=Xe),e=e??Hi,U(function(n,r){var i,o=!0;n.subscribe(V(r,function(a){var s=t(a);(o||!e(i,s))&&(o=!1,i=s,r.next(a))}))})}function Hi(e,t){return e===t}function zi(e){return U(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}function Fe(e,t){return U(ji(e,t,arguments.length>=2,!0))}function Gi(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new ne}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,a=o===void 0?!0:o,s=e.resetOnRefCountZero,c=s===void 0?!0:s;return function(l){var u,f,m,p=0,b=!1,v=!1,g=function(){f==null||f.unsubscribe(),f=void 0},h=function(){g(),u=m=void 0,b=v=!1},w=function(){var S=u;h(),S==null||S.unsubscribe()};return U(function(S,k){p++,!v&&!b&&g();var y=m=m??n();k.add(function(){p--,p===0&&!v&&!b&&(f=rt(w,c))}),y.subscribe(k),!u&&p>0&&(u=new Pe({next:function(E){return y.next(E)},error:function(E){v=!0,g(),f=rt(h,i,E),y.error(E)},complete:function(){b=!0,g(),f=rt(h,a),y.complete()}}),q(S).subscribe(u))})(l)}}function rt(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new Pe({next:function(){i.unsubscribe(),e()}});return q(t.apply(void 0,ye([],de(n)))).subscribe(i)}}function Yi(e){return U(function(t,n){var r=!1,i=V(n,function(){i==null||i.unsubscribe(),r=!0},je);q(e).subscribe(i),t.subscribe(V(n,function(o){return r&&n.next(o)}))})}function F(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=St(e);return U(function(r,i){(n?Ve(e,r,n):Ve(e,r)).subscribe(i)})}function Cn(e,t){return U(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(V(r,function(c){i==null||i.unsubscribe();var l=0,u=o++;q(e(c,u)).subscribe(i=V(r,function(f){return r.next(t?t(c,f,u,l++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function Wt(e){return U(function(t,n){q(e).subscribe(V(n,function(){return n.complete()},je)),!n.closed&&t.subscribe(n)})}function qi(e,t,n){var r=C(e)||t||n?{next:e,error:t,complete:n}:e;return r?U(function(i,o){var a;(a=r.subscribe)===null||a===void 0||a.call(r);var s=!0;i.subscribe(V(o,function(c){var l;(l=r.next)===null||l===void 0||l.call(r,c),o.next(c)},function(){var c;s=!1,(c=r.complete)===null||c===void 0||c.call(r),o.complete()},function(c){var l;s=!1,(l=r.error)===null||l===void 0||l.call(r,c),o.error(c)},function(){var c,l;s&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):Xe}var Ki=Object.defineProperty,Qi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Xi=Object.prototype.hasOwnProperty,Zi=Object.prototype.propertyIsEnumerable,jt=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Vt=(e,t,n)=>t in e?Ki(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t)=>{for(var n in t||(t={}))Xi.call(t,n)&&Vt(e,n,t[n]);if(Bt)for(var n of Bt(t))Zi.call(t,n)&&Vt(e,n,t[n]);return e},ce=(e,t)=>Qi(e,Ji(t)),B=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())}),eo=(e,t,n)=>(t=e[jt("asyncIterator")])?t.call(e):(e=e[jt("iterator")](),t={},n=(r,i)=>(i=e[r])&&(t[r]=o=>new Promise((a,s,c)=>(o=i.call(e,o),c=o.done,Promise.resolve(o.value).then(l=>a({value:l,done:c}),s)))),n("next"),n("return"),t),On="lk";function j(e){return typeof e>"u"?!1:to(e)||no(e)}function to(e){var t;return e?e.hasOwnProperty("participant")&&e.hasOwnProperty("source")&&e.hasOwnProperty("track")&&typeof((t=e.publication)==null?void 0:t.track)<"u":!1}function no(e){return e?e.hasOwnProperty("participant")&&e.hasOwnProperty("source")&&e.hasOwnProperty("publication")&&typeof e.publication<"u":!1}function Oe(e){return e?e.hasOwnProperty("participant")&&e.hasOwnProperty("source")&&typeof e.publication>"u":!1}function $(e){if(typeof e=="string"||typeof e=="number")return`${e}`;if(Oe(e))return`${e.participant.identity}_${e.source}_placeholder`;if(j(e))return`${e.participant.identity}_${e.publication.source}_${e.publication.trackSid}`;throw new Error(`Can't generate a id for the given track reference: ${e}`)}function ro(e,t){return e===void 0||t===void 0?!1:j(e)&&j(t)?e.publication.trackSid===t.publication.trackSid:$(e)===$(t)}function io(e,t){return typeof t>"u"?!1:j(e)?t.some(n=>n.participant.identity===e.participant.identity&&j(n)&&n.publication.trackSid===e.publication.trackSid):Oe(e)?t.some(n=>n.participant.identity===e.participant.identity&&Oe(n)&&n.source===e.source):!1}function oo(e,t){return Oe(e)&&j(t)&&t.participant.identity===e.participant.identity&&t.source===e.source}function ao(){const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),document.body.removeChild(t),n-r}function so(){return typeof document<"u"}function co(e){e=Q({},e);const t="(?:(?:[a-z]+:)?//)?",n="(?:\\S+(?::\\S*)?@)?",r=new RegExp("(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}","g").source,l=`(?:${t}|www\\.)${n}(?:localhost|${r}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))\\.?)(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return e.exact?new RegExp(`(?:^${l}$)`,"i"):new RegExp(l,"ig")}var Ht="[^\\.\\s@:](?:[^\\s@:]*[^\\s@:\\.])?@[^\\.\\s@]+(?:\\.[^\\.\\s@]+)*";function lo({exact:e}={}){return e?new RegExp(`^${Ht}$`):new RegExp(Ht,"g")}function uo(e,t,n){return Fr(e,t,()=>B(this,null,function*(){const{x:i,y:o}=yield Wr(e,t,{placement:"top",middleware:[Nr(6),Ur(),$r({padding:5})]});n==null||n(i,o)}))}function fo(e,t){return!e.contains(t.target)}var po=()=>({email:lo(),url:co({})});function vo(e,t){const n=Object.entries(t).map(([o,a],s)=>Array.from(e.matchAll(a)).map(({index:c,0:l})=>({type:o,weight:s,content:l,index:c??0}))).flat().sort((o,a)=>{const s=o.index-a.index;return s!==0?s:o.weight-a.weight}).filter(({index:o},a,s)=>{if(a===0)return!0;const c=s[a-1];return c.index+c.content.length<=o}),r=[];let i=0;for(const{type:o,content:a,index:s}of n)s>i&&r.push(e.substring(i,s)),r.push({type:o,content:a}),i=s+a.length;return e.length>i&&r.push(e.substring(i)),r}var ho=[d.RoomEvent.ConnectionStateChanged,d.RoomEvent.RoomMetadataChanged,d.RoomEvent.ActiveSpeakersChanged,d.RoomEvent.ConnectionQualityChanged,d.RoomEvent.ParticipantConnected,d.RoomEvent.ParticipantDisconnected,d.RoomEvent.ParticipantPermissionsChanged,d.RoomEvent.ParticipantMetadataChanged,d.RoomEvent.ParticipantNameChanged,d.RoomEvent.ParticipantAttributesChanged,d.RoomEvent.TrackMuted,d.RoomEvent.TrackUnmuted,d.RoomEvent.TrackPublished,d.RoomEvent.TrackUnpublished,d.RoomEvent.TrackStreamStateChanged,d.RoomEvent.TrackSubscriptionFailed,d.RoomEvent.TrackSubscriptionPermissionChanged,d.RoomEvent.TrackSubscriptionStatusChanged],kn=[...ho,d.RoomEvent.LocalTrackPublished,d.RoomEvent.LocalTrackUnpublished],mo=[d.ParticipantEvent.TrackPublished,d.ParticipantEvent.TrackUnpublished,d.ParticipantEvent.TrackMuted,d.ParticipantEvent.TrackUnmuted,d.ParticipantEvent.TrackStreamStateChanged,d.ParticipantEvent.TrackSubscribed,d.ParticipantEvent.TrackUnsubscribed,d.ParticipantEvent.TrackSubscriptionPermissionChanged,d.ParticipantEvent.TrackSubscriptionFailed,d.ParticipantEvent.LocalTrackPublished,d.ParticipantEvent.LocalTrackUnpublished],bo=[d.ParticipantEvent.ConnectionQualityChanged,d.ParticipantEvent.IsSpeakingChanged,d.ParticipantEvent.ParticipantMetadataChanged,d.ParticipantEvent.ParticipantPermissionsChanged,d.ParticipantEvent.TrackMuted,d.ParticipantEvent.TrackUnmuted,d.ParticipantEvent.TrackPublished,d.ParticipantEvent.TrackUnpublished,d.ParticipantEvent.TrackStreamStateChanged,d.ParticipantEvent.TrackSubscriptionFailed,d.ParticipantEvent.TrackSubscriptionPermissionChanged,d.ParticipantEvent.TrackSubscriptionStatusChanged],An=[...bo,d.ParticipantEvent.LocalTrackPublished,d.ParticipantEvent.LocalTrackUnpublished],L=zr.getLogger("lk-components-js");L.setDefaultLevel("WARN");function go(e,t={}){var n;L.setLevel(e),d.setLogLevel((n=t.liveKitClientLogLevel)!=null?n:e)}function yo(e,t={}){var n;const r=L.methodFactory;L.methodFactory=(i,o,a)=>{const s=r(i,o,a),c=d.LogLevel[i],l=c>=o&&c<d.LogLevel.silent;return(u,f)=>{f?s(u,f):s(u),l&&e(c,u,f)}},L.setLevel(L.getLevel()),d.setLogExtension((n=t.liveKitClientLogExtension)!=null?n:e)}var wo=[{columns:1,rows:1},{columns:1,rows:2,orientation:"portrait"},{columns:2,rows:1,orientation:"landscape"},{columns:2,rows:2,minWidth:560},{columns:3,rows:3,minWidth:700},{columns:4,rows:4,minWidth:960},{columns:5,rows:5,minWidth:1100}];function _n(e,t,n,r){if(e.length<1)throw new Error("At least one grid layout definition must be provided.");const i=So(e);if(n<=0||r<=0)return i[0];let o=0;const a=n/r>1?"landscape":"portrait";let s=i.find((c,l,u)=>{o=l;const f=u.findIndex((m,p)=>{const b=!m.orientation||m.orientation===a,v=p>l,g=m.maxTiles===c.maxTiles;return v&&g&&b})!==-1;return c.maxTiles>=t&&!f});if(s===void 0)if(s=i[i.length-1],s)L.warn(`No layout found for: participantCount: ${t}, width/height: ${n}/${r} fallback to biggest available layout (${s}).`);else throw new Error("No layout or fallback layout found.");if((n<s.minWidth||r<s.minHeight)&&o>0){const c=i[o-1];s=_n(i.slice(0,o),c.maxTiles,n,r)}return s}function So(e){return[...e].map(t=>{var n,r;return{name:`${t.columns}x${t.rows}`,columns:t.columns,rows:t.rows,maxTiles:t.columns*t.rows,minWidth:(n=t.minWidth)!=null?n:0,minHeight:(r=t.minHeight)!=null?r:0,orientation:t.orientation}}).sort((t,n)=>t.maxTiles!==n.maxTiles?t.maxTiles-n.maxTiles:t.minWidth!==0||n.minWidth!==0?t.minWidth-n.minWidth:t.minHeight!==0||n.minHeight!==0?t.minHeight-n.minHeight:0)}function Eo(){return typeof navigator<"u"&&navigator.mediaDevices&&!!navigator.mediaDevices.getDisplayMedia}function xo(e,t){var n;return ce(Q({},e),{receivedAtMediaTimestamp:(n=t.rtpTimestamp)!=null?n:0,receivedAt:t.timestamp})}function To(e,t,n){return[...e,...t].reduceRight((r,i)=>(r.find(o=>o.id===i.id)||r.unshift(i),r),[]).slice(0-n)}var Ln=(e=>(e.AgentState="lk.agent.state",e.PublishOnBehalf="lk.publish_on_behalf",e.TranscriptionFinal="lk.transcription_final",e.TranscriptionSegmentId="lk.segment_id",e.TranscribedTrackId="lk.transcribed_track_id",e))(Ln||{}),Po=[],Co={showChat:!1,unreadMessages:0,showSettings:!1};function Rn(e){return typeof e=="object"}function Oo(e){return Array.isArray(e)&&e.filter(Rn).length>0}function In(e,t){return t.audioLevel-e.audioLevel}function Mn(e,t){return e.isSpeaking===t.isSpeaking?0:e.isSpeaking?-1:1}function Dn(e,t){var n,r,i,o;return e.lastSpokeAt!==void 0||t.lastSpokeAt!==void 0?((r=(n=t.lastSpokeAt)==null?void 0:n.getTime())!=null?r:0)-((o=(i=e.lastSpokeAt)==null?void 0:i.getTime())!=null?o:0):0}function He(e,t){var n,r,i,o;return((r=(n=e.joinedAt)==null?void 0:n.getTime())!=null?r:0)-((o=(i=t.joinedAt)==null?void 0:i.getTime())!=null?o:0)}function ko(e,t){return j(e)?j(t)?0:-1:j(t)?1:0}function Ao(e,t){const n=e.participant.isCameraEnabled,r=t.participant.isCameraEnabled;return n!==r?n?-1:1:0}function _o(e){const t=[],n=[],r=[],i=[];e.forEach(s=>{s.participant.isLocal&&s.source===d.Track.Source.Camera?t.push(s):s.source===d.Track.Source.ScreenShare?n.push(s):s.source===d.Track.Source.Camera?r.push(s):i.push(s)});const o=Lo(n),a=Ro(r);return[...t,...o,...a,...i]}function Lo(e){const t=[],n=[];return e.forEach(i=>{i.participant.isLocal?t.push(i):n.push(i)}),t.sort((i,o)=>He(i.participant,o.participant)),n.sort((i,o)=>He(i.participant,o.participant)),[...n,...t]}function Ro(e){const t=[],n=[];return e.forEach(r=>{r.participant.isLocal?t.push(r):n.push(r)}),n.sort((r,i)=>r.participant.isSpeaking&&i.participant.isSpeaking?In(r.participant,i.participant):r.participant.isSpeaking!==i.participant.isSpeaking?Mn(r.participant,i.participant):r.participant.lastSpokeAt!==i.participant.lastSpokeAt?Dn(r.participant,i.participant):j(r)!==j(i)?ko(r,i):r.participant.isCameraEnabled!==i.participant.isCameraEnabled?Ao(r,i):He(r.participant,i.participant)),[...t,...n]}function Io(e){const t=[...e];t.sort((r,i)=>{if(r.isSpeaking&&i.isSpeaking)return In(r,i);if(r.isSpeaking!==i.isSpeaking)return Mn(r,i);if(r.lastSpokeAt!==i.lastSpokeAt)return Dn(r,i);const o=r.videoTrackPublications.size>0,a=i.videoTrackPublications.size>0;return o!==a?o?-1:1:He(r,i)});const n=t.find(r=>r.isLocal);if(n){const r=t.indexOf(n);r>=0&&(t.splice(r,1),t.length>0?t.splice(0,0,n):t.push(n))}return t}function Mo(e,t){return e.reduce((n,r,i)=>i%t===0?[...n,[r]]:[...n.slice(0,-1),[...n.slice(-1)[0],r]],[])}function zt(e,t){const n=Math.max(e.length,t.length);return new Array(n).fill([]).map((r,i)=>[e[i],t[i]])}function ze(e,t,n){return e.filter(r=>!t.map(i=>n(i)).includes(n(r)))}function dt(e){return e.map(t=>typeof t=="string"||typeof t=="number"?`${t}`:$(t))}function Do(e,t){return{dropped:ze(e,t,$),added:ze(t,e,$)}}function Fo(e){return e.added.length!==0||e.dropped.length!==0}function pt(e,t){const n=t.findIndex(r=>$(r)===$(e));if(n===-1)throw new Error(`Element not part of the array: ${$(e)} not in ${dt(t)}`);return n}function No(e,t,n){const r=pt(e,n),i=pt(t,n);return n.splice(r,1,t),n.splice(i,1,e),n}function $o(e,t){const n=pt(e,t);return t.splice(n,1),t}function Uo(e,t){return[...t,e]}function it(e,t){return Mo(e,t)}function Wo(e,t,n){let r=Bo(e,t);if(r.length<t.length){const a=ze(t,r,$);r=[...r,...a]}const i=it(r,n),o=it(t,n);if(zt(i,o).forEach(([a,s],c)=>{if(a&&s){const l=it(r,n)[c],u=Do(l,s);Fo(u)&&(L.debug(`Detected visual changes on page: ${c}, current: ${dt(a)}, next: ${dt(s)}`,{changes:u}),u.added.length===u.dropped.length&&zt(u.added,u.dropped).forEach(([f,m])=>{if(f&&m)r=No(f,m,r);else throw new Error(`For a swap action we need a addition and a removal one is missing: ${f}, ${m}`)}),u.added.length===0&&u.dropped.length>0&&u.dropped.forEach(f=>{r=$o(f,r)}),u.added.length>0&&u.dropped.length===0&&u.added.forEach(f=>{r=Uo(f,r)}))}}),r.length>t.length){const a=ze(r,t,$);r=r.filter(s=>!a.map($).includes($(s)))}return r}function Bo(e,t){return e.map(n=>{const r=t.find(i=>$(n)===$(i)||typeof n!="number"&&Oe(n)&&j(i)&&oo(n,i));return r??n})}function H(e){return`${On}-${e}`}function jo(e){const t=vt(e),n=xt(e.participant).pipe(O(()=>vt(e)),F(t));return{className:H(e.source===d.Track.Source.Camera||e.source===d.Track.Source.ScreenShare?"participant-media-video":"participant-media-audio"),trackObserver:n}}function vt(e){if(j(e))return e.publication;{const{source:t,name:n,participant:r}=e;if(t&&n)return r.getTrackPublications().find(i=>i.source===t&&i.trackName===n);if(n)return r.getTrackPublicationByName(n);if(t)return r.getTrackPublication(t);throw new Error("At least one of source and name needs to be defined")}}function pe(e,...t){return new _(r=>{const i=()=>{r.next(e)};return t.forEach(a=>{e.on(a,i)}),()=>{t.forEach(a=>{e.off(a,i)})}}).pipe(F(e))}function Se(e,t){return new _(r=>{const i=(...a)=>{r.next(a)};return e.on(t,i),()=>{e.off(t,i)}})}function Vo(e){return Se(e,d.RoomEvent.ConnectionStateChanged).pipe(O(([t])=>t),F(e.state))}function Ho(e){return pe(e,d.RoomEvent.RoomMetadataChanged,d.RoomEvent.ConnectionStateChanged).pipe(O(n=>({name:n.name,metadata:n.metadata})))}function zo(e){return Se(e,d.RoomEvent.ActiveSpeakersChanged).pipe(O(([t])=>t))}function Go(e,t,n=!0){const r=new _(o=>{d.Room.getLocalDevices(e,n).then(a=>{o.next(a),o.complete()}).catch(a=>{t==null||t(a),o.next([]),o.complete()})}),i=new _(o=>{var a;const s=()=>B(this,null,function*(){try{const c=yield d.Room.getLocalDevices(e,n);o.next(c)}catch(c){t==null||t(c)}});if(typeof window<"u"){if(!window.isSecureContext)throw new Error("Accessing media devices is available only in secure contexts (HTTPS and localhost), in some or all supporting browsers. See: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices");(a=navigator==null?void 0:navigator.mediaDevices)==null||a.addEventListener("devicechange",s)}return()=>{var c;(c=navigator==null?void 0:navigator.mediaDevices)==null||c.removeEventListener("devicechange",s)}});return Ve(r,i)}function Yo(e){return Se(e,d.RoomEvent.DataReceived)}function Fn(e){return pe(e,d.RoomEvent.AudioPlaybackStatusChanged).pipe(O(n=>({canPlayAudio:n.canPlaybackAudio})))}function qo(e){return pe(e,d.RoomEvent.VideoPlaybackStatusChanged).pipe(O(n=>({canPlayVideo:n.canPlaybackVideo})))}function Ko(e,t){return Se(e,d.RoomEvent.ActiveDeviceChanged).pipe(Ze(([n])=>n===t),O(([n,r])=>(L.debug("activeDeviceObservable | RoomEvent.ActiveDeviceChanged",{kind:n,deviceId:r}),r)))}function Qo(e,t){return Se(e,d.RoomEvent.ParticipantEncryptionStatusChanged).pipe(Ze(([,n])=>(t==null?void 0:t.identity)===(n==null?void 0:n.identity)||!n&&(t==null?void 0:t.identity)===e.localParticipant.identity),O(([n])=>n),F(t!=null&&t.isLocal?t.isE2EEEnabled:!!(t!=null&&t.isEncrypted)))}function Jo(e){return Se(e,d.RoomEvent.RecordingStatusChanged).pipe(O(([t])=>t),F(e.isRecording))}function Ee(e,...t){return new _(r=>{const i=()=>{r.next(e)};return t.forEach(a=>{e.on(a,i)}),()=>{t.forEach(a=>{e.off(a,i)})}}).pipe(F(e))}function xt(e){return Ee(e,d.ParticipantEvent.TrackMuted,d.ParticipantEvent.TrackUnmuted,d.ParticipantEvent.ParticipantPermissionsChanged,d.ParticipantEvent.TrackPublished,d.ParticipantEvent.TrackUnpublished,d.ParticipantEvent.LocalTrackPublished,d.ParticipantEvent.LocalTrackUnpublished,d.ParticipantEvent.MediaDevicesError,d.ParticipantEvent.TrackSubscriptionStatusChanged).pipe(O(n=>{const{isMicrophoneEnabled:r,isCameraEnabled:i,isScreenShareEnabled:o}=n,a=n.getTrackPublication(d.Track.Source.Microphone),s=n.getTrackPublication(d.Track.Source.Camera);return{isCameraEnabled:i,isMicrophoneEnabled:r,isScreenShareEnabled:o,cameraTrack:s,microphoneTrack:a,participant:n}}))}function Nn(e){return e?Ee(e,d.ParticipantEvent.ParticipantMetadataChanged,d.ParticipantEvent.ParticipantNameChanged).pipe(O(({name:n,identity:r,metadata:i})=>({name:n,identity:r,metadata:i})),F({name:e.name,identity:e.identity,metadata:e.metadata})):void 0}function Xo(e){return et(e,d.ParticipantEvent.ConnectionQualityChanged).pipe(O(([n])=>n),F(e.connectionQuality))}function et(e,t){return new _(r=>{const i=(...a)=>{r.next(a)};return e.on(t,i),()=>{e.off(t,i)}})}function $n(e){var t,n,r,i;return Ee(e.participant,d.ParticipantEvent.TrackMuted,d.ParticipantEvent.TrackUnmuted,d.ParticipantEvent.TrackSubscribed,d.ParticipantEvent.TrackUnsubscribed,d.ParticipantEvent.LocalTrackPublished,d.ParticipantEvent.LocalTrackUnpublished).pipe(O(o=>{var a,s;const c=(a=e.publication)!=null?a:o.getTrackPublication(e.source);return(s=c==null?void 0:c.isMuted)!=null?s:!0}),F((i=(r=(t=e.publication)==null?void 0:t.isMuted)!=null?r:(n=e.participant.getTrackPublication(e.source))==null?void 0:n.isMuted)!=null?i:!0))}function Zo(e){return et(e,d.ParticipantEvent.IsSpeakingChanged).pipe(O(([t])=>t))}function ea(e,t={}){var n;let r;const i=new _(c=>(r=c,()=>s.unsubscribe())).pipe(F(Array.from(e.remoteParticipants.values()))),o=(n=t.additionalRoomEvents)!=null?n:kn,a=Array.from(new Set([d.RoomEvent.ParticipantConnected,d.RoomEvent.ParticipantDisconnected,d.RoomEvent.ConnectionStateChanged,...o])),s=pe(e,...a).subscribe(c=>r==null?void 0:r.next(Array.from(c.remoteParticipants.values())));return e.remoteParticipants.size>0&&(r==null||r.next(Array.from(e.remoteParticipants.values()))),i}function ta(e,t,n={}){var r;const i=(r=n.additionalEvents)!=null?r:An;return pe(e,d.RoomEvent.ParticipantConnected,d.RoomEvent.ParticipantDisconnected,d.RoomEvent.ConnectionStateChanged).pipe(Cn(a=>{const s=a.getParticipantByIdentity(t);return s?Ee(s,...i):new _(c=>c.next(void 0))}),F(e.getParticipantByIdentity(t)))}function na(e){return et(e,d.ParticipantEvent.ParticipantPermissionsChanged).pipe(O(()=>e.permissions),F(e.permissions))}function ra(e,{kind:t,identity:n},r={}){var i;const o=(i=r.additionalEvents)!=null?i:An,a=c=>{let l=!0;return t&&(l=l&&c.kind===t),n&&(l=l&&c.identity===n),l};return pe(e,d.RoomEvent.ParticipantConnected,d.RoomEvent.ParticipantDisconnected,d.RoomEvent.ConnectionStateChanged).pipe(Cn(c=>{const l=Array.from(c.remoteParticipants.values()).find(u=>a(u));return l?Ee(l,...o):new _(u=>u.next(void 0))}),F(Array.from(e.remoteParticipants.values()).find(c=>a(c))))}function ia(e){return typeof e>"u"?new _:et(e,d.ParticipantEvent.AttributesChanged).pipe(O(([t])=>({changed:t,attributes:e.attributes})),F({changed:e.attributes,attributes:e.attributes}))}function oa(e,t,n,r,i){const{localParticipant:o}=t,a=(f,m)=>{let p=!1;switch(f){case d.Track.Source.Camera:p=m.isCameraEnabled;break;case d.Track.Source.Microphone:p=m.isMicrophoneEnabled;break;case d.Track.Source.ScreenShare:p=m.isScreenShareEnabled;break}return p},s=xt(o).pipe(O(f=>a(e,f.participant)),F(a(e,o))),c=new ne,l=(f,m)=>B(this,null,function*(){try{switch(m??(m=n),c.next(!0),e){case d.Track.Source.Camera:return yield o.setCameraEnabled(f??!o.isCameraEnabled,m,r),o.isCameraEnabled;case d.Track.Source.Microphone:return yield o.setMicrophoneEnabled(f??!o.isMicrophoneEnabled,m,r),o.isMicrophoneEnabled;case d.Track.Source.ScreenShare:return yield o.setScreenShareEnabled(f??!o.isScreenShareEnabled,m,r),o.isScreenShareEnabled;default:throw new TypeError("Tried to toggle unsupported source")}}catch(p){if(i&&p instanceof Error){i==null||i(p);return}else throw p}finally{c.next(!1)}});return{className:H("button"),toggle:l,enabledObserver:s,pendingObserver:c.asObservable()}}function aa(){let e=!1;const t=new ne,n=new ne,r=o=>B(this,null,function*(){n.next(!0),e=o??!e,t.next(e),n.next(!1)});return{className:H("button"),toggle:r,enabledObserver:t.asObservable(),pendingObserver:n.asObservable()}}function sa(e,t,n){const r=new pn(void 0),i=Ko(t,e),o=(s,...c)=>B(this,[s,...c],function*(l,u={}){var f,m,p;if(t){const b=d.getBrowser();if(e==="audiooutput"&&((b==null?void 0:b.name)==="Safari"||(b==null?void 0:b.os)==="iOS")){L.warn("Switching audio output device is not supported on Safari and iOS.");return}L.debug(`Switching active device of kind "${e}" with id ${l}.`),yield t.switchActiveDevice(e,l,u.exact);const v=(f=t.getActiveDevice(e))!=null?f:l;v!==l&&l!=="default"&&L.info(`We tried to select the device with id (${l}), but the browser decided to select the device with id (${v}) instead.`);let g;e==="audioinput"?g=(m=t.localParticipant.getTrackPublication(d.Track.Source.Microphone))==null?void 0:m.track:e==="videoinput"&&(g=(p=t.localParticipant.getTrackPublication(d.Track.Source.Camera))==null?void 0:p.track);const h=l==="default"&&!g||l==="default"&&(g==null?void 0:g.mediaStreamTrack.label.startsWith("Default"));r.next(h?l:v)}});return{className:H("media-device-select"),activeDeviceObservable:i,setActiveMediaDevice:o}}function ca(e){const t=r=>{e.disconnect(r)};return{className:H("disconnect-button"),disconnect:t}}function la(e){const t=H("connection-quality"),n=Xo(e);return{className:t,connectionQualityObserver:n}}function ua(e){let t="track-muted-indicator-camera";switch(e.source){case d.Track.Source.Camera:t="track-muted-indicator-camera";break;case d.Track.Source.Microphone:t="track-muted-indicator-microphone";break}const n=H(t),r=$n(e);return{className:n,mediaMutedObserver:r}}function fa(e){return{className:"lk-participant-name",infoObserver:Nn(e)}}function da(){return{className:H("participant-tile")}}var Un={CHAT:"lk.chat",TRANSCRIPTION:"lk.transcription"},pa={CHAT:"lk-chat-topic"};function Wn(e,t){return B(this,arguments,function*(n,r,i={}){const{reliable:o,destinationIdentities:a,topic:s}=i;yield n.publishData(r,{destinationIdentities:a,topic:s,reliable:o})})}function Bn(e,t,n){const r=Array.isArray(t)?t:[t],i=Yo(e).pipe(Ze(([,,,c])=>t===void 0||c!==void 0&&r.includes(c)),O(([c,l,,u])=>{const f={payload:c,topic:u,from:l};return n==null||n(f),f}));let o;const a=new _(c=>{o=c});return{messageObservable:i,isSendingObservable:a,send:(c,...l)=>B(this,[c,...l],function*(u,f={}){o.next(!0);try{yield Wn(e.localParticipant,u,Q({topic:r[0]},f))}finally{o.next(!1)}})}}var va=class{constructor(e,t){this._isResolved=!1,this.onFinally=t,this.promise=new Promise((n,r)=>B(this,null,function*(){this.resolve=n,this.reject=r,e&&(yield e(n,r))})).finally(()=>{var n;this._isResolved=!0,(n=this.onFinally)==null||n.call(this)})}get isResolved(){return this._isResolved}},Re=new WeakMap,Ie=new Map;function ha(e){return e.ignoreLegacy==!0}var ma=e=>JSON.parse(new TextDecoder().decode(e)),ba=e=>new TextEncoder().encode(JSON.stringify(e));function ga(e,t){var n,r,i,o,a,s;const c=()=>{var y,E,T;return((y=e.serverInfo)==null?void 0:y.edition)===1||!!((E=e.serverInfo)!=null&&E.version)&&d.compareVersions((T=e.serverInfo)==null?void 0:T.version,"1.8.2")>0},l=new ne,u=(n=t==null?void 0:t.channelTopic)!=null?n:Un.CHAT,f=(r=t==null?void 0:t.channelTopic)!=null?r:pa.CHAT;let m=!1;Re.has(e)||(m=!0);const p=(i=Re.get(e))!=null?i:new Map,b=(o=p.get(u))!=null?o:new ne;p.set(u,b),Re.set(e,p);const v=(a=t==null?void 0:t.messageDecoder)!=null?a:ma;if(m){e.registerTextStreamHandler(u,(E,T)=>B(this,null,function*(){const{id:R,timestamp:I,attributes:N,attachedStreamIds:x}=E.info,P=new Map((x??[]).map(A=>[A,new va]));Ie.set(R,P),me(E).pipe(Fe((A,M)=>A+M),Ce(A=>P.size===0?ut({chunk:A,attachedFiles:[]}):me(P.values()).pipe(Ce(M=>me(M.promise)),Fe((M,G)=>[...M,new File(G.buffer,G.fileName)],[]),O(M=>({chunk:A,attachedFiles:M})))),O(({chunk:A,attachedFiles:M})=>({id:R,timestamp:I,message:A,from:e.getParticipantByIdentity(T.identity),type:"chatMessage",attributes:N,attachedFiles:M})),zi(()=>Ie.delete(R))).subscribe({next:A=>b.next(A)})})),e.registerByteStreamHandler(u,E=>B(this,null,function*(){var T,R;const{id:I}=E.info,N=Array.from(Ie).find(([,D])=>D.has(I));if(!N)return;const x=N[0],P=[];try{for(var W=eo(E),A,M,G;A=!(M=yield W.next()).done;A=!1){const D=M.value;P.push(D)}}catch(D){G=[D]}finally{try{A&&(M=W.return)&&(yield M.call(W))}finally{if(G)throw G[0]}}const K=(T=Ie.get(x))==null?void 0:T.get(I);K&&((R=K.resolve)==null||R.call(K,{fileName:E.info.name,buffer:P}))}));const{messageObservable:y}=Bn(e,[f]);y.pipe(O(E=>{const T=v(E.payload);return ha(T)?void 0:ce(Q({},T),{type:"chatMessage",from:E.from})}),Ze(E=>!!E),Wt(l)).subscribe(b)}const g=b.pipe(Fe((y,E)=>{if("id"in E&&y.find(T=>{var R,I;return((R=T.from)==null?void 0:R.identity)===((I=E.from)==null?void 0:I.identity)&&T.id===E.id})){const T=y.findIndex(R=>R.id===E.id);if(T>-1){const R=y[T];y[T]=ce(Q({},E),{timestamp:R.timestamp,editTimestamp:E.timestamp})}return[...y]}return[...y,E]},[]),Wt(l)),h=new pn(!1),w=(s=t==null?void 0:t.messageEncoder)!=null?s:ba,S=(y,E)=>B(this,null,function*(){var T;E||(E={}),(T=E.topic)!=null||(E.topic=u),h.next(!0);try{const I={id:(yield e.localParticipant.sendText(y,E)).id,timestamp:Date.now(),message:y},N=ce(Q({},I),{attachedFiles:E.attachments}),x=ce(Q({},N),{type:"chatMessage",from:e.localParticipant,attributes:E.attributes});b.next(x);const P=w(ce(Q({},I),{ignoreLegacy:c()}));try{yield Wn(e.localParticipant,P,{reliable:!0,topic:f})}catch(W){L.info("could not send message in legacy chat format",W)}return x}finally{h.next(!1)}});function k(){l.next(),l.complete(),b.complete(),Re.delete(e),e.unregisterTextStreamHandler(u),e.unregisterByteStreamHandler(u)}return e.once(d.RoomEvent.Disconnected,k),{messageObservable:g,isSendingObservable:h,send:S}}function ya(){const e=n=>B(this,null,function*(){L.info("Start Audio for room: ",n),yield n.startAudio()});return{className:H("start-audio-button"),roomAudioPlaybackAllowedObservable:Fn,handleStartAudioPlayback:e}}function wa(){const e=n=>B(this,null,function*(){L.info("Start Video for room: ",n),yield n.startVideo()});return{className:H("start-audio-button"),roomVideoPlaybackAllowedObservable:qo,handleStartVideoPlayback:e}}function Sa(){return{className:[H("button"),H("chat-toggle")].join(" ")}}function Ea(){return{className:[H("button"),H("focus-toggle-button")].join(" ")}}function xa(){return{className:"lk-clear-pin-button lk-button"}}function Ta(){return{className:"lk-room-container"}}function Gt(e,t,n=!0){const i=[e.localParticipant,...Array.from(e.remoteParticipants.values())],o=[];return i.forEach(a=>{t.forEach(s=>{const c=Array.from(a.trackPublications.values()).filter(l=>l.source===s&&(!n||l.track)).map(l=>({participant:a,publication:l,source:l.source}));o.push(...c)})}),{trackReferences:o,participants:i}}function Yt(e,t,n=!1){const{sources:r,kind:i,name:o}=t;return Array.from(e.trackPublications.values()).filter(s=>(!r||r.includes(s.source))&&(!i||s.kind===i)&&(!o||s.trackName===o)&&(!n||s.track)).map(s=>({participant:e,publication:s,source:s.source}))}function Pa(e,t,n){var r,i;const o=(r=n.additionalRoomEvents)!=null?r:kn,a=(i=n.onlySubscribed)!=null?i:!0,s=Array.from(new Set([d.RoomEvent.ParticipantConnected,d.RoomEvent.ParticipantDisconnected,d.RoomEvent.ConnectionStateChanged,d.RoomEvent.LocalTrackPublished,d.RoomEvent.LocalTrackUnpublished,d.RoomEvent.TrackPublished,d.RoomEvent.TrackUnpublished,d.RoomEvent.TrackSubscriptionStatusChanged,...o]).values());return pe(e,...s).pipe(O(l=>{const u=Gt(l,t,a);return L.debug(`TrackReference[] was updated. (length ${u.trackReferences.length})`,u),u}),F(Gt(e,t,a)))}function Ca(e,t){return Ee(e,...mo).pipe(O(r=>{const i=Yt(r,t);return L.debug(`TrackReference[] was updated. (length ${i.length})`,i),i}),F(Yt(e,t)))}function jn(e,t){return new _(r=>{const i=(...a)=>{r.next(a)};return e.on(t,i),()=>{e.off(t,i)}})}function Oa(e){return jn(e,d.TrackEvent.TranscriptionReceived)}function ka(e){return jn(e,d.TrackEvent.TimeSyncUpdate).pipe(O(([t])=>t))}function Aa(e,t=1e3){if(e===null)return ut(!1);const n=ft(e,"mousemove",{passive:!0}).pipe(O(()=>!0)),r=n.pipe(ki({each:t,with:()=>Ve(ut(!1),r.pipe(Yi(n)))}),Vi());return r}function _a(e,t){if(typeof localStorage>"u"){L.error("Local storage is not available.");return}try{if(t){const n=Object.fromEntries(Object.entries(t).filter(([,r])=>r!==""));localStorage.setItem(e,JSON.stringify(n))}}catch(n){L.error(`Error setting item to local storage: ${n}`)}}function La(e){if(typeof localStorage>"u"){L.error("Local storage is not available.");return}try{const t=localStorage.getItem(e);if(!t){L.warn(`Item with key ${e} does not exist in local storage.`);return}return JSON.parse(t)}catch(t){L.error(`Error getting item from local storage: ${t}`);return}}function Ra(e){return{load:()=>La(e),save:t=>_a(e,t)}}var Ia=`${On}-user-choices`,xe={videoEnabled:!0,audioEnabled:!0,videoDeviceId:"default",audioDeviceId:"default",username:""},{load:Ma,save:Da}=Ra(Ia);function Fa(e,t=!1){t!==!0&&Da(e)}function Na(e,t=!1){var n,r,i,o,a;const s={videoEnabled:(n=e==null?void 0:e.videoEnabled)!=null?n:xe.videoEnabled,audioEnabled:(r=e==null?void 0:e.audioEnabled)!=null?r:xe.audioEnabled,videoDeviceId:(i=e==null?void 0:e.videoDeviceId)!=null?i:xe.videoDeviceId,audioDeviceId:(o=e==null?void 0:e.audioDeviceId)!=null?o:xe.audioDeviceId,username:(a=e==null?void 0:e.username)!=null?a:xe.username};if(t)return s;{const c=Ma();return Q(Q({},s),c??{})}}var ot=null,at=null,$a=0;function qt(){return ot||(ot=new Map),ot}function Ua(){return at||(at=new WeakMap),at}function Wa(e,t){const n=Ua();let r=n.get(e);return r||(r=`room_${$a++}`,n.set(e,r)),`${r}:${t}`}function Ba(e,t){const n=Wa(e,t),r=qt(),i=r.get(n);if(i)return i;const o=new ne;let a=[];const s="lk.segment_id",c=o.pipe(qi({subscribe:()=>{e.registerTextStreamHandler(t,(l,u)=>B(this,null,function*(){var f;const m=me(l).pipe(Fe((b,v)=>b+v,"")),p=!!((f=l.info.attributes)!=null&&f[s]);m.subscribe(b=>{const v=a.findIndex(g=>{var h,w;return g.streamInfo.id===l.info.id||p&&((h=g.streamInfo.attributes)==null?void 0:h[s])===((w=l.info.attributes)==null?void 0:w[s])});v!==-1?(a[v]=ce(Q({},a[v]),{text:b}),o.next([...a])):(a.push({text:b,participantInfo:u,streamInfo:l.info}),o.next([...a]))})}))},finalize:()=>{e.unregisterTextStreamHandler(t)}}),Gi());return r.set(n,c),e.on(d.RoomEvent.Disconnected,()=>{qt().delete(n),a=[],o.next([])}),c}const Tt=Y.createContext(void 0);function ja(){const e=Y.useContext(Tt);if(!e)throw Error("tried to access room context outside of livekit room component");return e}function Vn(){return Y.useContext(Tt)}function Hn(e){const t=Vn(),n=e??t;if(!n)throw new Error("No room provided, make sure you are inside a Room context or pass the room explicitly");return n}function Va(e={}){const t=Hn(e.room),[n,r]=Y.useState(t.localParticipant),[i,o]=Y.useState(n.isMicrophoneEnabled),[a,s]=Y.useState(n.isCameraEnabled),[c,l]=Y.useState(n.isScreenShareEnabled),[u,f]=Y.useState(n.lastMicrophoneError),[m,p]=Y.useState(n.lastCameraError),[b,v]=Y.useState(void 0),[g,h]=Y.useState(void 0),w=S=>{s(S.isCameraEnabled),o(S.isMicrophoneEnabled),l(S.isScreenShareEnabled),h(S.cameraTrack),v(S.microphoneTrack),f(S.participant.lastMicrophoneError),p(S.participant.lastCameraError),r(S.participant)};return Y.useEffect(()=>{const S=xt(t.localParticipant).subscribe(w);return()=>S.unsubscribe()},[t]),{isMicrophoneEnabled:i,isScreenShareEnabled:c,isCameraEnabled:a,microphoneTrack:b,cameraTrack:g,lastMicrophoneError:u,lastCameraError:m,localParticipant:n}}exports.DataTopic=Un;exports.GRID_LAYOUTS=wo;exports.PIN_DEFAULT_STATE=Po;exports.ParticipantAgentAttributes=Ln;exports.RoomContext=Tt;exports.WIDGET_DEFAULT_STATE=Co;exports.activeSpeakerObserver=zo;exports.addMediaTimestampToTranscription=xo;exports.commonjsGlobal=Br;exports.computeMenuPosition=uo;exports.connectedParticipantObserver=ta;exports.connectedParticipantsObserver=ea;exports.connectionStateObserver=Vo;exports.createDefaultGrammar=po;exports.createInteractingObservable=Aa;exports.createIsSpeakingObserver=Zo;exports.createMediaDeviceObserver=Go;exports.dedupeSegments=To;exports.encryptionStatusObservable=Qo;exports.getDefaultExportFromCjs=cn;exports.getScrollBarWidth=ao;exports.getTrackByIdentifier=vt;exports.getTrackReferenceId=$;exports.isEqualTrackRef=ro;exports.isSourceWitOptions=Rn;exports.isSourcesWithOptions=Oo;exports.isTrackReference=j;exports.isTrackReferencePinned=io;exports.isWeb=so;exports.loadUserChoices=Na;exports.log=L;exports.mutedObserver=$n;exports.participantAttributesObserver=ia;exports.participantByIdentifierObserver=ra;exports.participantInfoObserver=Nn;exports.participantPermissionObserver=na;exports.participantTracksObservable=Ca;exports.recordingStatusObservable=Jo;exports.roomAudioPlaybackAllowedObservable=Fn;exports.roomInfoObserver=Ho;exports.saveUserChoices=Fa;exports.selectGridLayout=_n;exports.setLogExtension=yo;exports.setLogLevel=go;exports.setupChat=ga;exports.setupChatToggle=Sa;exports.setupClearPinButton=xa;exports.setupConnectionQualityIndicator=la;exports.setupDataMessageHandler=Bn;exports.setupDeviceSelector=sa;exports.setupDisconnectButton=ca;exports.setupFocusToggle=Ea;exports.setupLiveKitRoom=Ta;exports.setupManualToggle=aa;exports.setupMediaToggle=oa;exports.setupMediaTrack=jo;exports.setupParticipantName=fa;exports.setupParticipantTile=da;exports.setupStartAudio=ya;exports.setupStartVideo=wa;exports.setupTextStream=Ba;exports.setupTrackMutedIndicator=ua;exports.sortParticipants=Io;exports.sortTrackReferences=_o;exports.supportsScreenSharing=Eo;exports.tokenize=vo;exports.trackReferencesObservable=Pa;exports.trackSyncTimeObserver=ka;exports.trackTranscriptionObserver=Oa;exports.updatePages=Wo;exports.useEnsureRoom=Hn;exports.useLocalParticipant=Va;exports.useMaybeRoomContext=Vn;exports.useRoomContext=ja;exports.wasClickOutside=fo;
|
|
4
|
+
//# sourceMappingURL=shared-BDr0qLg4.js.map
|