@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,1051 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { useState as B, useRef as z, useEffect as V, useMemo as Ne } from "react";
|
|
3
|
+
import { u as Le, a as he, b as ze, c as Ve, d as Fe, e as Ze, f as ge, g as He, h as Be, i as je, j as _e, k as Oe, l as ve, m as We, n as qe, o as $e, p as De, q as Ue, r as Ge, s as Ee, t as Qe, v as Xe } from "./hooks-hQJmeINB.mjs";
|
|
4
|
+
import { a as I, c as ee } from "./room-BP3SCCCd.mjs";
|
|
5
|
+
import { RoomEvent as Ye, Track as S, ConnectionQuality as Q, RemoteTrackPublication as J, RemoteAudioTrack as Je, ConnectionState as X } from "livekit-client";
|
|
6
|
+
import { ae as te, af as pe, w as Ke, u as et, f as tt, c as at, ag as nt, X as rt, Y as ct, a1 as $, l as j, ah as q, ai as lt, i as _, B as st, aj as we, ak as ae, j as it, al as ot, m as ut, p as ke, am as dt, an as mt, ao as ft, ap as ht, aq as gt, ar as vt, R as Et } from "./contexts-D4V9wQRc.mjs";
|
|
7
|
+
const ca = /* @__PURE__ */ e.forwardRef(
|
|
8
|
+
function(n, a) {
|
|
9
|
+
const { buttonProps: c } = Le(n);
|
|
10
|
+
return /* @__PURE__ */ e.createElement("button", { ref: a, ...c }, n.children);
|
|
11
|
+
}
|
|
12
|
+
), la = /* @__PURE__ */ e.forwardRef(
|
|
13
|
+
function({ room: n, ...a }, c) {
|
|
14
|
+
const r = he(n);
|
|
15
|
+
return /* @__PURE__ */ e.createElement("div", { ref: c, ...a }, r);
|
|
16
|
+
}
|
|
17
|
+
), sa = /* @__PURE__ */ e.forwardRef(
|
|
18
|
+
function(n, a) {
|
|
19
|
+
const { mergedProps: c } = ze({ props: n });
|
|
20
|
+
return /* @__PURE__ */ e.createElement("button", { ref: a, ...c }, n.children);
|
|
21
|
+
}
|
|
22
|
+
), ia = /* @__PURE__ */ e.forwardRef(
|
|
23
|
+
function(n, a) {
|
|
24
|
+
const { buttonProps: c } = Ve(n);
|
|
25
|
+
return /* @__PURE__ */ e.createElement("button", { ref: a, ...c }, n.children);
|
|
26
|
+
}
|
|
27
|
+
), pt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M1.354.646a.5.5 0 1 0-.708.708l14 14a.5.5 0 0 0 .708-.708L11 10.293V4.5A1.5 1.5 0 0 0 9.5 3H3.707zM0 4.5a1.5 1.5 0 0 1 .943-1.393l9.532 9.533c-.262.224-.603.36-.975.36h-8A1.5 1.5 0 0 1 0 11.5z" }), /* @__PURE__ */ e.createElement("path", { d: "m15.2 3.6-2.8 2.1a1 1 0 0 0-.4.8v3a1 1 0 0 0 .4.8l2.8 2.1a.5.5 0 0 0 .8-.4V4a.5.5 0 0 0-.8-.4z" })), wt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M0 4.5A1.5 1.5 0 0 1 1.5 3h8A1.5 1.5 0 0 1 11 4.5v7A1.5 1.5 0 0 1 9.5 13h-8A1.5 1.5 0 0 1 0 11.5zM15.2 3.6l-2.8 2.1a1 1 0 0 0-.4.8v3a1 1 0 0 0 .4.8l2.8 2.1a.5.5 0 0 0 .8-.4V4a.5.5 0 0 0-.8-.4z" })), oa = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 24 24", ...t }, /* @__PURE__ */ e.createElement(
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
fill: "#FFF",
|
|
31
|
+
d: "M4.99 3.99a1 1 0 0 0-.697 1.717L10.586 12l-6.293 6.293a1 1 0 1 0 1.414 1.414L12 13.414l6.293 6.293a1 1 0 1 0 1.414-1.414L13.414 12l6.293-6.293a1 1 0 0 0-.727-1.717 1 1 0 0 0-.687.303L12 10.586 5.707 4.293a1 1 0 0 0-.717-.303z"
|
|
32
|
+
}
|
|
33
|
+
)), ua = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 18, fill: "none", ...t }, /* @__PURE__ */ e.createElement(
|
|
34
|
+
"path",
|
|
35
|
+
{
|
|
36
|
+
fill: "currentColor",
|
|
37
|
+
fillRule: "evenodd",
|
|
38
|
+
d: "M0 2.75A2.75 2.75 0 0 1 2.75 0h10.5A2.75 2.75 0 0 1 16 2.75v13.594a.75.75 0 0 1-1.234.572l-3.691-3.12a1.25 1.25 0 0 0-.807-.296H2.75A2.75 2.75 0 0 1 0 10.75v-8ZM2.75 1.5c-.69 0-1.25.56-1.25 1.25v8c0 .69.56 1.25 1.25 1.25h7.518c.65 0 1.279.23 1.775.65l2.457 2.077V2.75c0-.69-.56-1.25-1.25-1.25H2.75Z",
|
|
39
|
+
clipRule: "evenodd"
|
|
40
|
+
}
|
|
41
|
+
), /* @__PURE__ */ e.createElement(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
fill: "currentColor",
|
|
45
|
+
fillRule: "evenodd",
|
|
46
|
+
d: "M3 4.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5Z",
|
|
47
|
+
clipRule: "evenodd"
|
|
48
|
+
}
|
|
49
|
+
)), ie = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement(
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
fill: "currentcolor",
|
|
53
|
+
fillRule: "evenodd",
|
|
54
|
+
d: "M5.293 2.293a1 1 0 0 1 1.414 0l4.823 4.823a1.25 1.25 0 0 1 0 1.768l-4.823 4.823a1 1 0 0 1-1.414-1.414L9.586 8 5.293 3.707a1 1 0 0 1 0-1.414z",
|
|
55
|
+
clipRule: "evenodd"
|
|
56
|
+
}
|
|
57
|
+
)), kt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 }, /* @__PURE__ */ e.createElement("path", { d: "M10 1.75h4.25m0 0V6m0-4.25L9 7M6 14.25H1.75m0 0V10m0 4.25L7 9" }))), da = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement(
|
|
58
|
+
"path",
|
|
59
|
+
{
|
|
60
|
+
fill: "currentcolor",
|
|
61
|
+
fillRule: "evenodd",
|
|
62
|
+
d: "M8.961.894C8.875-.298 7.125-.298 7.04.894c-.066.912-1.246 1.228-1.76.472-.67-.99-2.186-.115-1.664.96.399.824-.465 1.688-1.288 1.289-1.076-.522-1.95.994-.961 1.665.756.513.44 1.693-.472 1.759-1.192.086-1.192 1.836 0 1.922.912.066 1.228 1.246.472 1.76-.99.67-.115 2.186.96 1.664.824-.399 1.688.465 1.289 1.288-.522 1.076.994 1.95 1.665.961.513-.756 1.693-.44 1.759.472.086 1.192 1.836 1.192 1.922 0 .066-.912 1.246-1.228 1.76-.472.67.99 2.186.115 1.664-.96-.399-.824.465-1.688 1.288-1.289 1.076.522 1.95-.994.961-1.665-.756-.513-.44-1.693.472-1.759 1.192-.086 1.192-1.836 0-1.922-.912-.066-1.228-1.246-.472-1.76.99-.67.115-2.186-.96-1.664-.824.399-1.688-.465-1.289-1.288.522-1.076-.994-1.95-1.665-.961-.513.756-1.693.44-1.759-.472ZM8 13A5 5 0 1 0 8 3a5 5 0 0 0 0 10Z",
|
|
63
|
+
clipRule: "evenodd"
|
|
64
|
+
}
|
|
65
|
+
)), ma = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement(
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
fill: "currentColor",
|
|
69
|
+
fillRule: "evenodd",
|
|
70
|
+
d: "M2 2.75A2.75 2.75 0 0 1 4.75 0h6.5A2.75 2.75 0 0 1 14 2.75v10.5A2.75 2.75 0 0 1 11.25 16h-6.5A2.75 2.75 0 0 1 2 13.25v-.5a.75.75 0 0 1 1.5 0v.5c0 .69.56 1.25 1.25 1.25h6.5c.69 0 1.25-.56 1.25-1.25V2.75c0-.69-.56-1.25-1.25-1.25h-6.5c-.69 0-1.25.56-1.25 1.25v.5a.75.75 0 0 1-1.5 0v-.5Z",
|
|
71
|
+
clipRule: "evenodd"
|
|
72
|
+
}
|
|
73
|
+
), /* @__PURE__ */ e.createElement(
|
|
74
|
+
"path",
|
|
75
|
+
{
|
|
76
|
+
fill: "currentColor",
|
|
77
|
+
fillRule: "evenodd",
|
|
78
|
+
d: "M8.78 7.47a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H1.75a.75.75 0 0 1 0-1.5h4.69l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25Z",
|
|
79
|
+
clipRule: "evenodd"
|
|
80
|
+
}
|
|
81
|
+
)), Rt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement(
|
|
82
|
+
"path",
|
|
83
|
+
{
|
|
84
|
+
fill: "currentcolor",
|
|
85
|
+
fillRule: "evenodd",
|
|
86
|
+
d: "M4 6.104V4a4 4 0 1 1 8 0v2.104c1.154.326 2 1.387 2 2.646v4.5A2.75 2.75 0 0 1 11.25 16h-6.5A2.75 2.75 0 0 1 2 13.25v-4.5c0-1.259.846-2.32 2-2.646ZM5.5 4a2.5 2.5 0 0 1 5 0v2h-5V4Z",
|
|
87
|
+
clipRule: "evenodd"
|
|
88
|
+
}
|
|
89
|
+
)), Mt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M12.227 11.52a5.477 5.477 0 0 0 1.246-2.97.5.5 0 0 0-.995-.1 4.478 4.478 0 0 1-.962 2.359l-1.07-1.07C10.794 9.247 11 8.647 11 8V3a3 3 0 0 0-6 0v1.293L1.354.646a.5.5 0 1 0-.708.708l14 14a.5.5 0 0 0 .708-.708zM8 12.5c.683 0 1.33-.152 1.911-.425l.743.743c-.649.359-1.378.59-2.154.66V15h2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1h2v-1.522a5.502 5.502 0 0 1-4.973-4.929.5.5 0 0 1 .995-.098A4.5 4.5 0 0 0 8 12.5z" }), /* @__PURE__ */ e.createElement("path", { d: "M8.743 10.907 5 7.164V8a3 3 0 0 0 3.743 2.907z" })), yt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement(
|
|
90
|
+
"path",
|
|
91
|
+
{
|
|
92
|
+
fillRule: "evenodd",
|
|
93
|
+
d: "M2.975 8.002a.5.5 0 0 1 .547.449 4.5 4.5 0 0 0 8.956 0 .5.5 0 1 1 .995.098A5.502 5.502 0 0 1 8.5 13.478V15h2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1h2v-1.522a5.502 5.502 0 0 1-4.973-4.929.5.5 0 0 1 .448-.547z",
|
|
94
|
+
clipRule: "evenodd"
|
|
95
|
+
}
|
|
96
|
+
), /* @__PURE__ */ e.createElement("path", { d: "M5 3a3 3 0 1 1 6 0v5a3 3 0 0 1-6 0z" })), bt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentcolor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" })), St = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentcolor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("g", { opacity: 0.25 }, /* @__PURE__ */ e.createElement("path", { d: "M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("path", { d: "M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }))), Ct = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentcolor", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("g", { opacity: 0.25 }, /* @__PURE__ */ e.createElement("path", { d: "M6 6.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("path", { d: "M6 6.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }), /* @__PURE__ */ e.createElement("path", { d: "M12 .5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5z" }))), It = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "currentColor", ...t }, /* @__PURE__ */ e.createElement("g", { opacity: 0.25 }, /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-4Zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-9Zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V.5Z" }), /* @__PURE__ */ e.createElement("path", { d: "M0 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-4Zm6-5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-9Zm6-6a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V.5Z" }))), Re = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement(
|
|
97
|
+
"path",
|
|
98
|
+
{
|
|
99
|
+
fill: "currentColor",
|
|
100
|
+
fillRule: "evenodd",
|
|
101
|
+
d: "M0 2.75A2.75 2.75 0 0 1 2.75 0h14.5A2.75 2.75 0 0 1 20 2.75v10.5A2.75 2.75 0 0 1 17.25 16H2.75A2.75 2.75 0 0 1 0 13.25V2.75ZM2.75 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h14.5c.69 0 1.25-.56 1.25-1.25V2.75c0-.69-.56-1.25-1.25-1.25H2.75Z",
|
|
102
|
+
clipRule: "evenodd"
|
|
103
|
+
}
|
|
104
|
+
), /* @__PURE__ */ e.createElement(
|
|
105
|
+
"path",
|
|
106
|
+
{
|
|
107
|
+
fill: "currentColor",
|
|
108
|
+
fillRule: "evenodd",
|
|
109
|
+
d: "M9.47 4.22a.75.75 0 0 1 1.06 0l2.25 2.25a.75.75 0 0 1-1.06 1.06l-.97-.97v4.69a.75.75 0 0 1-1.5 0V6.56l-.97.97a.75.75 0 0 1-1.06-1.06l2.25-2.25Z",
|
|
110
|
+
clipRule: "evenodd"
|
|
111
|
+
}
|
|
112
|
+
)), xt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement("g", { fill: "currentColor" }, /* @__PURE__ */ e.createElement("path", { d: "M7.28 4.22a.75.75 0 0 0-1.06 1.06L8.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L10 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L11.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L10 6.94z" }), /* @__PURE__ */ e.createElement(
|
|
113
|
+
"path",
|
|
114
|
+
{
|
|
115
|
+
fillRule: "evenodd",
|
|
116
|
+
d: "M2.75 0A2.75 2.75 0 0 0 0 2.75v10.5A2.75 2.75 0 0 0 2.75 16h14.5A2.75 2.75 0 0 0 20 13.25V2.75A2.75 2.75 0 0 0 17.25 0zM1.5 2.75c0-.69.56-1.25 1.25-1.25h14.5c.69 0 1.25.56 1.25 1.25v10.5c0 .69-.56 1.25-1.25 1.25H2.75c-.69 0-1.25-.56-1.25-1.25z",
|
|
117
|
+
clipRule: "evenodd"
|
|
118
|
+
}
|
|
119
|
+
))), oe = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement(
|
|
120
|
+
"path",
|
|
121
|
+
{
|
|
122
|
+
fill: "currentColor",
|
|
123
|
+
fillRule: "evenodd",
|
|
124
|
+
d: "M8 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0V.75A.75.75 0 0 1 8 0Z",
|
|
125
|
+
clipRule: "evenodd"
|
|
126
|
+
}
|
|
127
|
+
), /* @__PURE__ */ e.createElement(
|
|
128
|
+
"path",
|
|
129
|
+
{
|
|
130
|
+
fill: "currentColor",
|
|
131
|
+
fillRule: "evenodd",
|
|
132
|
+
d: "M8 12a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5A.75.75 0 0 1 8 12Z",
|
|
133
|
+
clipRule: "evenodd",
|
|
134
|
+
opacity: 0.7
|
|
135
|
+
}
|
|
136
|
+
), /* @__PURE__ */ e.createElement(
|
|
137
|
+
"path",
|
|
138
|
+
{
|
|
139
|
+
fill: "currentColor",
|
|
140
|
+
fillRule: "evenodd",
|
|
141
|
+
d: "M12 1.072a.75.75 0 0 1 .274 1.024l-1.25 2.165a.75.75 0 0 1-1.299-.75l1.25-2.165A.75.75 0 0 1 12 1.072Z",
|
|
142
|
+
clipRule: "evenodd"
|
|
143
|
+
}
|
|
144
|
+
), /* @__PURE__ */ e.createElement(
|
|
145
|
+
"path",
|
|
146
|
+
{
|
|
147
|
+
fill: "currentColor",
|
|
148
|
+
fillRule: "evenodd",
|
|
149
|
+
d: "M6 11.464a.75.75 0 0 1 .274 1.025l-1.25 2.165a.75.75 0 0 1-1.299-.75l1.25-2.165A.75.75 0 0 1 6 11.464Z",
|
|
150
|
+
clipRule: "evenodd",
|
|
151
|
+
opacity: 0.6
|
|
152
|
+
}
|
|
153
|
+
), /* @__PURE__ */ e.createElement(
|
|
154
|
+
"path",
|
|
155
|
+
{
|
|
156
|
+
fill: "currentColor",
|
|
157
|
+
fillRule: "evenodd",
|
|
158
|
+
d: "M14.928 4a.75.75 0 0 1-.274 1.025l-2.165 1.25a.75.75 0 1 1-.75-1.3l2.165-1.25A.75.75 0 0 1 14.928 4Z",
|
|
159
|
+
clipRule: "evenodd"
|
|
160
|
+
}
|
|
161
|
+
), /* @__PURE__ */ e.createElement(
|
|
162
|
+
"path",
|
|
163
|
+
{
|
|
164
|
+
fill: "currentColor",
|
|
165
|
+
fillRule: "evenodd",
|
|
166
|
+
d: "M4.536 10a.75.75 0 0 1-.275 1.024l-2.165 1.25a.75.75 0 0 1-.75-1.298l2.165-1.25A.75.75 0 0 1 4.536 10Z",
|
|
167
|
+
clipRule: "evenodd",
|
|
168
|
+
opacity: 0.5
|
|
169
|
+
}
|
|
170
|
+
), /* @__PURE__ */ e.createElement(
|
|
171
|
+
"path",
|
|
172
|
+
{
|
|
173
|
+
fill: "currentColor",
|
|
174
|
+
fillRule: "evenodd",
|
|
175
|
+
d: "M16 8a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h2.5A.75.75 0 0 1 16 8Z",
|
|
176
|
+
clipRule: "evenodd"
|
|
177
|
+
}
|
|
178
|
+
), /* @__PURE__ */ e.createElement(
|
|
179
|
+
"path",
|
|
180
|
+
{
|
|
181
|
+
fill: "currentColor",
|
|
182
|
+
fillRule: "evenodd",
|
|
183
|
+
d: "M4 8a.75.75 0 0 1-.75.75H.75a.75.75 0 0 1 0-1.5h2.5A.75.75 0 0 1 4 8Z",
|
|
184
|
+
clipRule: "evenodd",
|
|
185
|
+
opacity: 0.4
|
|
186
|
+
}
|
|
187
|
+
), /* @__PURE__ */ e.createElement(
|
|
188
|
+
"path",
|
|
189
|
+
{
|
|
190
|
+
fill: "currentColor",
|
|
191
|
+
fillRule: "evenodd",
|
|
192
|
+
d: "M14.928 12a.75.75 0 0 1-1.024.274l-2.165-1.25a.75.75 0 0 1 .75-1.299l2.165 1.25A.75.75 0 0 1 14.928 12Z",
|
|
193
|
+
clipRule: "evenodd",
|
|
194
|
+
opacity: 0.9
|
|
195
|
+
}
|
|
196
|
+
), /* @__PURE__ */ e.createElement(
|
|
197
|
+
"path",
|
|
198
|
+
{
|
|
199
|
+
fill: "currentColor",
|
|
200
|
+
fillRule: "evenodd",
|
|
201
|
+
d: "M4.536 6a.75.75 0 0 1-1.025.275l-2.165-1.25a.75.75 0 1 1 .75-1.3l2.165 1.25A.75.75 0 0 1 4.536 6Z",
|
|
202
|
+
clipRule: "evenodd",
|
|
203
|
+
opacity: 0.3
|
|
204
|
+
}
|
|
205
|
+
), /* @__PURE__ */ e.createElement(
|
|
206
|
+
"path",
|
|
207
|
+
{
|
|
208
|
+
fill: "currentColor",
|
|
209
|
+
fillRule: "evenodd",
|
|
210
|
+
d: "M12 14.928a.75.75 0 0 1-1.024-.274l-1.25-2.165a.75.75 0 0 1 1.298-.75l1.25 2.165A.75.75 0 0 1 12 14.928Z",
|
|
211
|
+
clipRule: "evenodd",
|
|
212
|
+
opacity: 0.8
|
|
213
|
+
}
|
|
214
|
+
), /* @__PURE__ */ e.createElement(
|
|
215
|
+
"path",
|
|
216
|
+
{
|
|
217
|
+
fill: "currentColor",
|
|
218
|
+
fillRule: "evenodd",
|
|
219
|
+
d: "M6 4.536a.75.75 0 0 1-1.024-.275l-1.25-2.165a.75.75 0 1 1 1.299-.75l1.25 2.165A.75.75 0 0 1 6 4.536Z",
|
|
220
|
+
clipRule: "evenodd",
|
|
221
|
+
opacity: 0.2
|
|
222
|
+
}
|
|
223
|
+
)), Pt = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", ...t }, /* @__PURE__ */ e.createElement("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 }, /* @__PURE__ */ e.createElement("path", { d: "M13.25 7H9m0 0V2.75M9 7l5.25-5.25M2.75 9H7m0 0v4.25M7 9l-5.25 5.25" }))), Tt = /* @__PURE__ */ e.forwardRef(
|
|
224
|
+
function({ trackRef: n, ...a }, c) {
|
|
225
|
+
const r = te(), { mergedProps: s, inFocus: o } = Fe({
|
|
226
|
+
trackRef: n ?? r,
|
|
227
|
+
props: a
|
|
228
|
+
});
|
|
229
|
+
return /* @__PURE__ */ e.createElement(pe.Consumer, null, (l) => l !== void 0 && /* @__PURE__ */ e.createElement("button", { ref: c, ...s }, a.children ? a.children : o ? /* @__PURE__ */ e.createElement(Pt, null) : /* @__PURE__ */ e.createElement(kt, null)));
|
|
230
|
+
}
|
|
231
|
+
), fa = /* @__PURE__ */ e.forwardRef(
|
|
232
|
+
function({
|
|
233
|
+
kind: n,
|
|
234
|
+
initialSelection: a,
|
|
235
|
+
onActiveDeviceChange: c,
|
|
236
|
+
onDeviceListChange: r,
|
|
237
|
+
onDeviceSelectError: s,
|
|
238
|
+
exactMatch: o,
|
|
239
|
+
track: l,
|
|
240
|
+
requestPermissions: i,
|
|
241
|
+
onError: d,
|
|
242
|
+
...u
|
|
243
|
+
}, v) {
|
|
244
|
+
const f = Ke(), p = e.useRef("default"), E = e.useCallback(
|
|
245
|
+
(w) => {
|
|
246
|
+
f && f.emit(Ye.MediaDevicesError, w), d == null || d(w);
|
|
247
|
+
},
|
|
248
|
+
[f, d]
|
|
249
|
+
), { devices: h, activeDeviceId: m, setActiveMediaDevice: y, className: C } = Ze({
|
|
250
|
+
kind: n,
|
|
251
|
+
room: f,
|
|
252
|
+
track: l,
|
|
253
|
+
requestPermissions: i,
|
|
254
|
+
onError: E
|
|
255
|
+
});
|
|
256
|
+
e.useEffect(() => {
|
|
257
|
+
a !== void 0 && y(a);
|
|
258
|
+
}, [y]), e.useEffect(() => {
|
|
259
|
+
typeof r == "function" && r(h);
|
|
260
|
+
}, [r, h]), e.useEffect(() => {
|
|
261
|
+
m !== p.current && (c == null || c(m)), p.current = m;
|
|
262
|
+
}, [m]);
|
|
263
|
+
const A = async (w) => {
|
|
264
|
+
try {
|
|
265
|
+
await y(w, { exact: o ?? !0 });
|
|
266
|
+
} catch (M) {
|
|
267
|
+
if (M instanceof Error)
|
|
268
|
+
s == null || s(M);
|
|
269
|
+
else
|
|
270
|
+
throw M;
|
|
271
|
+
}
|
|
272
|
+
}, N = e.useMemo(
|
|
273
|
+
() => I(u, { className: C }, { className: "lk-list" }),
|
|
274
|
+
[C, u]
|
|
275
|
+
), g = !!h.find((w) => w.label.toLowerCase().startsWith("default"));
|
|
276
|
+
function R(w, M, P) {
|
|
277
|
+
return w === M || !g && P === 0 && M === "default";
|
|
278
|
+
}
|
|
279
|
+
return /* @__PURE__ */ e.createElement("ul", { ref: v, ...N }, h.map((w, M) => /* @__PURE__ */ e.createElement(
|
|
280
|
+
"li",
|
|
281
|
+
{
|
|
282
|
+
key: w.deviceId,
|
|
283
|
+
id: w.deviceId,
|
|
284
|
+
"data-lk-active": R(w.deviceId, m, M),
|
|
285
|
+
"aria-selected": R(w.deviceId, m, M),
|
|
286
|
+
role: "option"
|
|
287
|
+
},
|
|
288
|
+
/* @__PURE__ */ e.createElement("button", { className: "lk-button", onClick: () => A(w.deviceId) }, w.label)
|
|
289
|
+
)));
|
|
290
|
+
}
|
|
291
|
+
), ha = /* @__PURE__ */ e.forwardRef(
|
|
292
|
+
function({ label: n = "Allow Audio", ...a }, c) {
|
|
293
|
+
const r = et(a.room), { mergedProps: s } = ge({ room: r, props: a });
|
|
294
|
+
return /* @__PURE__ */ e.createElement("button", { ref: c, ...s }, n);
|
|
295
|
+
}
|
|
296
|
+
), ga = /* @__PURE__ */ e.forwardRef(
|
|
297
|
+
function({ label: n, ...a }, c) {
|
|
298
|
+
const r = tt(), { mergedProps: s, canPlayAudio: o } = ge({ room: r, props: a }), { mergedProps: l, canPlayVideo: i } = He({ room: r, props: s }), { style: d, ...u } = l;
|
|
299
|
+
return d.display = o && i ? "none" : "block", /* @__PURE__ */ e.createElement("button", { ref: c, style: d, ...u }, n ?? `Start ${o ? "Video" : "Audio"}`);
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
function Me(t, n) {
|
|
303
|
+
switch (t) {
|
|
304
|
+
case S.Source.Microphone:
|
|
305
|
+
return n ? /* @__PURE__ */ e.createElement(yt, null) : /* @__PURE__ */ e.createElement(Mt, null);
|
|
306
|
+
case S.Source.Camera:
|
|
307
|
+
return n ? /* @__PURE__ */ e.createElement(wt, null) : /* @__PURE__ */ e.createElement(pt, null);
|
|
308
|
+
case S.Source.ScreenShare:
|
|
309
|
+
return n ? /* @__PURE__ */ e.createElement(xt, null) : /* @__PURE__ */ e.createElement(Re, null);
|
|
310
|
+
default:
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function At(t) {
|
|
315
|
+
switch (t) {
|
|
316
|
+
case Q.Excellent:
|
|
317
|
+
return /* @__PURE__ */ e.createElement(bt, null);
|
|
318
|
+
case Q.Good:
|
|
319
|
+
return /* @__PURE__ */ e.createElement(St, null);
|
|
320
|
+
case Q.Poor:
|
|
321
|
+
return /* @__PURE__ */ e.createElement(Ct, null);
|
|
322
|
+
default:
|
|
323
|
+
return /* @__PURE__ */ e.createElement(It, null);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
const va = /* @__PURE__ */ e.forwardRef(function({ showIcon: n, ...a }, c) {
|
|
327
|
+
const { buttonProps: r, enabled: s } = Be(a), [o, l] = e.useState(!1);
|
|
328
|
+
return e.useEffect(() => {
|
|
329
|
+
l(!0);
|
|
330
|
+
}, []), o && /* @__PURE__ */ e.createElement("button", { ref: c, ...r }, (n ?? !0) && Me(a.source, s), a.children);
|
|
331
|
+
}), ye = /* @__PURE__ */ e.forwardRef(function(n, a) {
|
|
332
|
+
const { className: c, quality: r } = je(n), s = e.useMemo(() => ({ ...I(n, { className: c }), "data-lk-quality": r }), [r, n, c]);
|
|
333
|
+
return /* @__PURE__ */ e.createElement("div", { ref: a, ...s }, n.children ?? At(r));
|
|
334
|
+
}), K = /* @__PURE__ */ e.forwardRef(
|
|
335
|
+
function({ participant: n, ...a }, c) {
|
|
336
|
+
const r = at(n), { className: s, infoObserver: o } = e.useMemo(() => nt(r), [r]), { identity: l, name: i } = _e(o, {
|
|
337
|
+
name: r.name,
|
|
338
|
+
identity: r.identity,
|
|
339
|
+
metadata: r.metadata
|
|
340
|
+
}), d = e.useMemo(() => I(a, { className: s, "data-lk-participant-name": i }), [a, s, i]);
|
|
341
|
+
return /* @__PURE__ */ e.createElement("span", { ref: c, ...d }, i !== "" ? i : l, a.children);
|
|
342
|
+
}
|
|
343
|
+
), be = /* @__PURE__ */ e.forwardRef(
|
|
344
|
+
function({ trackRef: n, show: a = "always", ...c }, r) {
|
|
345
|
+
const { className: s, isMuted: o } = Oe(n), l = a === "always" || a === "muted" && o || a === "unmuted" && !o, i = e.useMemo(
|
|
346
|
+
() => I(c, {
|
|
347
|
+
className: s
|
|
348
|
+
}),
|
|
349
|
+
[s, c]
|
|
350
|
+
);
|
|
351
|
+
return l ? /* @__PURE__ */ e.createElement("div", { ref: r, ...i, "data-lk-muted": o }, c.children ?? Me(n.source, !o)) : null;
|
|
352
|
+
}
|
|
353
|
+
), Nt = (t) => /* @__PURE__ */ e.createElement(
|
|
354
|
+
"svg",
|
|
355
|
+
{
|
|
356
|
+
width: 320,
|
|
357
|
+
height: 320,
|
|
358
|
+
viewBox: "0 0 320 320",
|
|
359
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
360
|
+
fill: "none",
|
|
361
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
362
|
+
...t
|
|
363
|
+
},
|
|
364
|
+
/* @__PURE__ */ e.createElement(
|
|
365
|
+
"path",
|
|
366
|
+
{
|
|
367
|
+
d: "M160 180C204.182 180 240 144.183 240 100C240 55.8172 204.182 20 160 20C115.817 20 79.9997 55.8172 79.9997 100C79.9997 144.183 115.817 180 160 180Z",
|
|
368
|
+
fill: "white",
|
|
369
|
+
fillOpacity: 0.25
|
|
370
|
+
}
|
|
371
|
+
),
|
|
372
|
+
/* @__PURE__ */ e.createElement(
|
|
373
|
+
"path",
|
|
374
|
+
{
|
|
375
|
+
d: "M97.6542 194.614C103.267 191.818 109.841 192.481 115.519 195.141C129.025 201.466 144.1 205 159.999 205C175.899 205 190.973 201.466 204.48 195.141C210.158 192.481 216.732 191.818 222.345 194.614C262.703 214.719 291.985 253.736 298.591 300.062C300.15 310.997 291.045 320 280 320H39.9997C28.954 320 19.8495 310.997 21.4087 300.062C28.014 253.736 57.2966 214.72 97.6542 194.614Z",
|
|
376
|
+
fill: "white",
|
|
377
|
+
fillOpacity: 0.25
|
|
378
|
+
}
|
|
379
|
+
)
|
|
380
|
+
);
|
|
381
|
+
function Se(t, n = {}) {
|
|
382
|
+
const [a, c] = e.useState(rt(t)), [r, s] = e.useState(a == null ? void 0 : a.isMuted), [o, l] = e.useState(a == null ? void 0 : a.isSubscribed), [i, d] = e.useState(a == null ? void 0 : a.track), [u, v] = e.useState("landscape"), f = e.useRef(), { className: p, trackObserver: E } = e.useMemo(() => ct(t), [
|
|
383
|
+
t.participant.sid ?? t.participant.identity,
|
|
384
|
+
t.source,
|
|
385
|
+
$(t) && t.publication.trackSid
|
|
386
|
+
]);
|
|
387
|
+
return e.useEffect(() => {
|
|
388
|
+
const h = E.subscribe((m) => {
|
|
389
|
+
j.debug("update track", m), c(m), s(m == null ? void 0 : m.isMuted), l(m == null ? void 0 : m.isSubscribed), d(m == null ? void 0 : m.track);
|
|
390
|
+
});
|
|
391
|
+
return () => h == null ? void 0 : h.unsubscribe();
|
|
392
|
+
}, [E]), e.useEffect(() => {
|
|
393
|
+
var h, m;
|
|
394
|
+
return i && (f.current && i.detach(f.current), (h = n.element) != null && h.current && !(t.participant.isLocal && (i == null ? void 0 : i.kind) === "audio") && i.attach(n.element.current)), f.current = (m = n.element) == null ? void 0 : m.current, () => {
|
|
395
|
+
f.current && (i == null || i.detach(f.current));
|
|
396
|
+
};
|
|
397
|
+
}, [i, n.element]), e.useEffect(() => {
|
|
398
|
+
var h, m;
|
|
399
|
+
if (typeof ((h = a == null ? void 0 : a.dimensions) == null ? void 0 : h.width) == "number" && typeof ((m = a == null ? void 0 : a.dimensions) == null ? void 0 : m.height) == "number") {
|
|
400
|
+
const y = a.dimensions.width > a.dimensions.height ? "landscape" : "portrait";
|
|
401
|
+
v(y);
|
|
402
|
+
}
|
|
403
|
+
}, [a]), {
|
|
404
|
+
publication: a,
|
|
405
|
+
isMuted: r,
|
|
406
|
+
isSubscribed: o,
|
|
407
|
+
track: i,
|
|
408
|
+
elementProps: I(n.props, {
|
|
409
|
+
className: p,
|
|
410
|
+
"data-lk-local-participant": t.participant.isLocal,
|
|
411
|
+
"data-lk-source": a == null ? void 0 : a.source,
|
|
412
|
+
...(a == null ? void 0 : a.kind) === "video" && { "data-lk-orientation": u }
|
|
413
|
+
})
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
var Y, ue;
|
|
417
|
+
function Lt() {
|
|
418
|
+
if (ue) return Y;
|
|
419
|
+
ue = 1;
|
|
420
|
+
var t = "Expected a function", n = NaN, a = "[object Symbol]", c = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, o = /^0o[0-7]+$/i, l = parseInt, i = typeof q == "object" && q && q.Object === Object && q, d = typeof self == "object" && self && self.Object === Object && self, u = i || d || Function("return this")(), v = Object.prototype, f = v.toString, p = Math.max, E = Math.min, h = function() {
|
|
421
|
+
return u.Date.now();
|
|
422
|
+
};
|
|
423
|
+
function m(g, R, w) {
|
|
424
|
+
var M, P, O, L, b, T, F = 0, re = !1, Z = !1, D = !0;
|
|
425
|
+
if (typeof g != "function")
|
|
426
|
+
throw new TypeError(t);
|
|
427
|
+
R = N(R) || 0, y(w) && (re = !!w.leading, Z = "maxWait" in w, O = Z ? p(N(w.maxWait) || 0, R) : O, D = "trailing" in w ? !!w.trailing : D);
|
|
428
|
+
function U(k) {
|
|
429
|
+
var x = M, H = P;
|
|
430
|
+
return M = P = void 0, F = k, L = g.apply(H, x), L;
|
|
431
|
+
}
|
|
432
|
+
function xe(k) {
|
|
433
|
+
return F = k, b = setTimeout(W, R), re ? U(k) : L;
|
|
434
|
+
}
|
|
435
|
+
function Pe(k) {
|
|
436
|
+
var x = k - T, H = k - F, se = R - x;
|
|
437
|
+
return Z ? E(se, O - H) : se;
|
|
438
|
+
}
|
|
439
|
+
function ce(k) {
|
|
440
|
+
var x = k - T, H = k - F;
|
|
441
|
+
return T === void 0 || x >= R || x < 0 || Z && H >= O;
|
|
442
|
+
}
|
|
443
|
+
function W() {
|
|
444
|
+
var k = h();
|
|
445
|
+
if (ce(k))
|
|
446
|
+
return le(k);
|
|
447
|
+
b = setTimeout(W, Pe(k));
|
|
448
|
+
}
|
|
449
|
+
function le(k) {
|
|
450
|
+
return b = void 0, D && M ? U(k) : (M = P = void 0, L);
|
|
451
|
+
}
|
|
452
|
+
function Te() {
|
|
453
|
+
b !== void 0 && clearTimeout(b), F = 0, M = T = P = b = void 0;
|
|
454
|
+
}
|
|
455
|
+
function Ae() {
|
|
456
|
+
return b === void 0 ? L : le(h());
|
|
457
|
+
}
|
|
458
|
+
function G() {
|
|
459
|
+
var k = h(), x = ce(k);
|
|
460
|
+
if (M = arguments, P = this, T = k, x) {
|
|
461
|
+
if (b === void 0)
|
|
462
|
+
return xe(T);
|
|
463
|
+
if (Z)
|
|
464
|
+
return b = setTimeout(W, R), U(T);
|
|
465
|
+
}
|
|
466
|
+
return b === void 0 && (b = setTimeout(W, R)), L;
|
|
467
|
+
}
|
|
468
|
+
return G.cancel = Te, G.flush = Ae, G;
|
|
469
|
+
}
|
|
470
|
+
function y(g) {
|
|
471
|
+
var R = typeof g;
|
|
472
|
+
return !!g && (R == "object" || R == "function");
|
|
473
|
+
}
|
|
474
|
+
function C(g) {
|
|
475
|
+
return !!g && typeof g == "object";
|
|
476
|
+
}
|
|
477
|
+
function A(g) {
|
|
478
|
+
return typeof g == "symbol" || C(g) && f.call(g) == a;
|
|
479
|
+
}
|
|
480
|
+
function N(g) {
|
|
481
|
+
if (typeof g == "number")
|
|
482
|
+
return g;
|
|
483
|
+
if (A(g))
|
|
484
|
+
return n;
|
|
485
|
+
if (y(g)) {
|
|
486
|
+
var R = typeof g.valueOf == "function" ? g.valueOf() : g;
|
|
487
|
+
g = y(R) ? R + "" : R;
|
|
488
|
+
}
|
|
489
|
+
if (typeof g != "string")
|
|
490
|
+
return g === 0 ? g : +g;
|
|
491
|
+
g = g.replace(c, "");
|
|
492
|
+
var w = s.test(g);
|
|
493
|
+
return w || o.test(g) ? l(g.slice(2), w ? 2 : 8) : r.test(g) ? n : +g;
|
|
494
|
+
}
|
|
495
|
+
return Y = m, Y;
|
|
496
|
+
}
|
|
497
|
+
var zt = Lt();
|
|
498
|
+
const de = /* @__PURE__ */ lt(zt);
|
|
499
|
+
function Vt(t) {
|
|
500
|
+
const n = z(t);
|
|
501
|
+
n.current = t, V(
|
|
502
|
+
() => () => {
|
|
503
|
+
n.current();
|
|
504
|
+
},
|
|
505
|
+
[]
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
function Ft(t, n = 500, a) {
|
|
509
|
+
const c = z();
|
|
510
|
+
Vt(() => {
|
|
511
|
+
c.current && c.current.cancel();
|
|
512
|
+
});
|
|
513
|
+
const r = Ne(() => {
|
|
514
|
+
const s = de(t, n, a), o = (...l) => s(...l);
|
|
515
|
+
return o.cancel = () => {
|
|
516
|
+
s.cancel();
|
|
517
|
+
}, o.isPending = () => !!c.current, o.flush = () => s.flush(), o;
|
|
518
|
+
}, [t, n, a]);
|
|
519
|
+
return V(() => {
|
|
520
|
+
c.current = de(t, n, a);
|
|
521
|
+
}, [t, n, a]), r;
|
|
522
|
+
}
|
|
523
|
+
function Zt(t, n, a) {
|
|
524
|
+
const c = ((d, u) => d === u), r = t instanceof Function ? t() : t, [s, o] = B(r), l = z(r), i = Ft(
|
|
525
|
+
o,
|
|
526
|
+
n,
|
|
527
|
+
a
|
|
528
|
+
);
|
|
529
|
+
return c(l.current, r) || (i(r), l.current = r), [s, i];
|
|
530
|
+
}
|
|
531
|
+
function Ht({
|
|
532
|
+
threshold: t = 0,
|
|
533
|
+
root: n = null,
|
|
534
|
+
rootMargin: a = "0%",
|
|
535
|
+
freezeOnceVisible: c = !1,
|
|
536
|
+
initialIsIntersecting: r = !1,
|
|
537
|
+
onChange: s
|
|
538
|
+
} = {}) {
|
|
539
|
+
var o;
|
|
540
|
+
const [l, i] = B(null), [d, u] = B(() => ({
|
|
541
|
+
isIntersecting: r,
|
|
542
|
+
entry: void 0
|
|
543
|
+
})), v = z();
|
|
544
|
+
v.current = s;
|
|
545
|
+
const f = ((o = d.entry) == null ? void 0 : o.isIntersecting) && c;
|
|
546
|
+
V(() => {
|
|
547
|
+
if (!l || !("IntersectionObserver" in window) || f)
|
|
548
|
+
return;
|
|
549
|
+
const h = new IntersectionObserver(
|
|
550
|
+
(m) => {
|
|
551
|
+
const y = Array.isArray(h.thresholds) ? h.thresholds : [h.thresholds];
|
|
552
|
+
m.forEach((C) => {
|
|
553
|
+
const A = C.isIntersecting && y.some((N) => C.intersectionRatio >= N);
|
|
554
|
+
u({ isIntersecting: A, entry: C }), v.current && v.current(A, C);
|
|
555
|
+
});
|
|
556
|
+
},
|
|
557
|
+
{ threshold: t, root: n, rootMargin: a }
|
|
558
|
+
);
|
|
559
|
+
return h.observe(l), () => {
|
|
560
|
+
h.disconnect();
|
|
561
|
+
};
|
|
562
|
+
}, [
|
|
563
|
+
l,
|
|
564
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
565
|
+
JSON.stringify(t),
|
|
566
|
+
n,
|
|
567
|
+
a,
|
|
568
|
+
f,
|
|
569
|
+
c
|
|
570
|
+
]);
|
|
571
|
+
const p = z(null);
|
|
572
|
+
V(() => {
|
|
573
|
+
var h;
|
|
574
|
+
!l && ((h = d.entry) != null && h.target) && !c && !f && p.current !== d.entry.target && (p.current = d.entry.target, u({ isIntersecting: r, entry: void 0 }));
|
|
575
|
+
}, [l, d.entry, c, f, r]);
|
|
576
|
+
const E = [
|
|
577
|
+
i,
|
|
578
|
+
!!d.isIntersecting,
|
|
579
|
+
d.entry
|
|
580
|
+
];
|
|
581
|
+
return E.ref = E[0], E.isIntersecting = E[1], E.entry = E[2], E;
|
|
582
|
+
}
|
|
583
|
+
const Bt = /* @__PURE__ */ e.forwardRef(
|
|
584
|
+
function({
|
|
585
|
+
onTrackClick: n,
|
|
586
|
+
onClick: a,
|
|
587
|
+
onSubscriptionStatusChanged: c,
|
|
588
|
+
trackRef: r,
|
|
589
|
+
manageSubscription: s,
|
|
590
|
+
...o
|
|
591
|
+
}, l) {
|
|
592
|
+
const i = _(r), d = e.useRef(null);
|
|
593
|
+
e.useImperativeHandle(l, () => d.current);
|
|
594
|
+
const u = Ht({ root: d.current }), [v] = Zt(u, 3e3);
|
|
595
|
+
e.useEffect(() => {
|
|
596
|
+
s && i.publication instanceof J && (v == null ? void 0 : v.isIntersecting) === !1 && (u == null ? void 0 : u.isIntersecting) === !1 && i.publication.setSubscribed(!1);
|
|
597
|
+
}, [v, i, s]), e.useEffect(() => {
|
|
598
|
+
s && i.publication instanceof J && (u == null ? void 0 : u.isIntersecting) === !0 && i.publication.setSubscribed(!0);
|
|
599
|
+
}, [u, i, s]);
|
|
600
|
+
const {
|
|
601
|
+
elementProps: f,
|
|
602
|
+
publication: p,
|
|
603
|
+
isSubscribed: E
|
|
604
|
+
} = Se(i, {
|
|
605
|
+
element: d,
|
|
606
|
+
props: o
|
|
607
|
+
});
|
|
608
|
+
e.useEffect(() => {
|
|
609
|
+
c == null || c(!!E);
|
|
610
|
+
}, [E, c]);
|
|
611
|
+
const h = (m) => {
|
|
612
|
+
a == null || a(m), n == null || n({ participant: i == null ? void 0 : i.participant, track: p });
|
|
613
|
+
};
|
|
614
|
+
return /* @__PURE__ */ e.createElement("video", { ref: d, ...f, muted: !0, onClick: h });
|
|
615
|
+
}
|
|
616
|
+
), ne = /* @__PURE__ */ e.forwardRef(
|
|
617
|
+
function({ trackRef: n, onSubscriptionStatusChanged: a, volume: c, ...r }, s) {
|
|
618
|
+
const o = _(n), l = e.useRef(null);
|
|
619
|
+
e.useImperativeHandle(s, () => l.current);
|
|
620
|
+
const {
|
|
621
|
+
elementProps: i,
|
|
622
|
+
isSubscribed: d,
|
|
623
|
+
track: u,
|
|
624
|
+
publication: v
|
|
625
|
+
} = Se(o, {
|
|
626
|
+
element: l,
|
|
627
|
+
props: r
|
|
628
|
+
});
|
|
629
|
+
return e.useEffect(() => {
|
|
630
|
+
a == null || a(!!d);
|
|
631
|
+
}, [d, a]), e.useEffect(() => {
|
|
632
|
+
u === void 0 || c === void 0 || (u instanceof Je ? u.setVolume(c) : j.warn("Volume can only be set on remote audio tracks."));
|
|
633
|
+
}, [c, u]), e.useEffect(() => {
|
|
634
|
+
v === void 0 || r.muted === void 0 || (v instanceof J ? v.setEnabled(!r.muted) : j.warn("Can only call setEnabled on remote track publications."));
|
|
635
|
+
}, [r.muted, v, u]), /* @__PURE__ */ e.createElement("audio", { ref: l, ...i });
|
|
636
|
+
}
|
|
637
|
+
);
|
|
638
|
+
function jt(t) {
|
|
639
|
+
const n = !!st();
|
|
640
|
+
return t.participant && !n ? /* @__PURE__ */ e.createElement(we.Provider, { value: t.participant }, t.children) : /* @__PURE__ */ e.createElement(e.Fragment, null, t.children);
|
|
641
|
+
}
|
|
642
|
+
function _t(t) {
|
|
643
|
+
const n = !!te();
|
|
644
|
+
return t.trackRef && !n ? /* @__PURE__ */ e.createElement(ae.Provider, { value: t.trackRef }, t.children) : /* @__PURE__ */ e.createElement(e.Fragment, null, t.children);
|
|
645
|
+
}
|
|
646
|
+
const Ot = /* @__PURE__ */ e.forwardRef(
|
|
647
|
+
function({
|
|
648
|
+
trackRef: n,
|
|
649
|
+
children: a,
|
|
650
|
+
onParticipantClick: c,
|
|
651
|
+
disableSpeakingIndicator: r,
|
|
652
|
+
...s
|
|
653
|
+
}, o) {
|
|
654
|
+
var p, E;
|
|
655
|
+
const l = _(n), { elementProps: i } = ve({
|
|
656
|
+
htmlProps: s,
|
|
657
|
+
disableSpeakingIndicator: r,
|
|
658
|
+
onParticipantClick: c,
|
|
659
|
+
trackRef: l
|
|
660
|
+
}), d = We(l.participant), u = it(), v = (p = ot()) == null ? void 0 : p.autoSubscription, f = e.useCallback(
|
|
661
|
+
(h) => {
|
|
662
|
+
l.source && !h && u && u.pin.dispatch && ut(l, u.pin.state) && u.pin.dispatch({ msg: "clear_pin" });
|
|
663
|
+
},
|
|
664
|
+
[l, u]
|
|
665
|
+
);
|
|
666
|
+
return /* @__PURE__ */ e.createElement("div", { ref: o, style: { position: "relative" }, ...i }, /* @__PURE__ */ e.createElement(_t, { trackRef: l }, /* @__PURE__ */ e.createElement(jt, { participant: l.participant }, a ?? /* @__PURE__ */ e.createElement(e.Fragment, null, $(l) && (((E = l.publication) == null ? void 0 : E.kind) === "video" || l.source === S.Source.Camera || l.source === S.Source.ScreenShare) ? /* @__PURE__ */ e.createElement(
|
|
667
|
+
Bt,
|
|
668
|
+
{
|
|
669
|
+
trackRef: l,
|
|
670
|
+
onSubscriptionStatusChanged: f,
|
|
671
|
+
manageSubscription: v
|
|
672
|
+
}
|
|
673
|
+
) : $(l) && /* @__PURE__ */ e.createElement(
|
|
674
|
+
ne,
|
|
675
|
+
{
|
|
676
|
+
trackRef: l,
|
|
677
|
+
onSubscriptionStatusChanged: f
|
|
678
|
+
}
|
|
679
|
+
), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-placeholder" }, /* @__PURE__ */ e.createElement(Nt, null)), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-metadata" }, /* @__PURE__ */ e.createElement("div", { className: "lk-participant-metadata-item" }, l.source === S.Source.Camera ? /* @__PURE__ */ e.createElement(e.Fragment, null, d && /* @__PURE__ */ e.createElement(Rt, { style: { marginRight: "0.25rem" } }), /* @__PURE__ */ e.createElement(
|
|
680
|
+
be,
|
|
681
|
+
{
|
|
682
|
+
trackRef: {
|
|
683
|
+
participant: l.participant,
|
|
684
|
+
source: S.Source.Microphone
|
|
685
|
+
},
|
|
686
|
+
show: "muted"
|
|
687
|
+
}
|
|
688
|
+
), /* @__PURE__ */ e.createElement(K, null)) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(Re, { style: { marginRight: "0.25rem" } }), /* @__PURE__ */ e.createElement(K, null, "'s screen"))), /* @__PURE__ */ e.createElement(ye, { className: "lk-participant-metadata-item" }))), /* @__PURE__ */ e.createElement(Tt, { trackRef: l }))));
|
|
689
|
+
}
|
|
690
|
+
);
|
|
691
|
+
function Ea(t) {
|
|
692
|
+
const n = I(t, { className: "lk-focus-layout" });
|
|
693
|
+
return /* @__PURE__ */ e.createElement("div", { ...n }, t.children);
|
|
694
|
+
}
|
|
695
|
+
function pa({ trackRef: t, ...n }) {
|
|
696
|
+
return /* @__PURE__ */ e.createElement(Ot, { trackRef: t, ...n });
|
|
697
|
+
}
|
|
698
|
+
function Ce({ tracks: t, ...n }) {
|
|
699
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, t.map((a) => /* @__PURE__ */ e.createElement(
|
|
700
|
+
ae.Provider,
|
|
701
|
+
{
|
|
702
|
+
value: a,
|
|
703
|
+
key: ke(a)
|
|
704
|
+
},
|
|
705
|
+
ee(n.children)
|
|
706
|
+
)));
|
|
707
|
+
}
|
|
708
|
+
function Wt({
|
|
709
|
+
totalPageCount: t,
|
|
710
|
+
nextPage: n,
|
|
711
|
+
prevPage: a,
|
|
712
|
+
currentPage: c,
|
|
713
|
+
pagesContainer: r
|
|
714
|
+
}) {
|
|
715
|
+
const [s, o] = e.useState(!1);
|
|
716
|
+
return e.useEffect(() => {
|
|
717
|
+
let l;
|
|
718
|
+
return r && (l = dt(r.current, 2e3).subscribe(
|
|
719
|
+
o
|
|
720
|
+
)), () => {
|
|
721
|
+
l && l.unsubscribe();
|
|
722
|
+
};
|
|
723
|
+
}, [r]), /* @__PURE__ */ e.createElement("div", { className: "lk-pagination-control", "data-lk-user-interaction": s }, /* @__PURE__ */ e.createElement("button", { className: "lk-button", onClick: a }, /* @__PURE__ */ e.createElement(ie, null)), /* @__PURE__ */ e.createElement("span", { className: "lk-pagination-count" }, `${c} of ${t}`), /* @__PURE__ */ e.createElement("button", { className: "lk-button", onClick: n }, /* @__PURE__ */ e.createElement(ie, null)));
|
|
724
|
+
}
|
|
725
|
+
const qt = /* @__PURE__ */ e.forwardRef(
|
|
726
|
+
function({ totalPageCount: n, currentPage: a }, c) {
|
|
727
|
+
const r = new Array(n).fill("").map((s, o) => o + 1 === a ? /* @__PURE__ */ e.createElement("span", { "data-lk-active": !0, key: o }) : /* @__PURE__ */ e.createElement("span", { key: o }));
|
|
728
|
+
return /* @__PURE__ */ e.createElement("div", { ref: c, className: "lk-pagination-indicator" }, r);
|
|
729
|
+
}
|
|
730
|
+
);
|
|
731
|
+
function wa({ tracks: t, ...n }) {
|
|
732
|
+
const a = e.createRef(), c = e.useMemo(
|
|
733
|
+
() => I(n, { className: "lk-grid-layout" }),
|
|
734
|
+
[n]
|
|
735
|
+
), { layout: r } = qe(a, t.length), s = $e(r.maxTiles, t);
|
|
736
|
+
return De(a, {
|
|
737
|
+
onLeftSwipe: s.nextPage,
|
|
738
|
+
onRightSwipe: s.prevPage
|
|
739
|
+
}), /* @__PURE__ */ e.createElement("div", { ref: a, "data-lk-pagination": s.totalPageCount > 1, ...c }, /* @__PURE__ */ e.createElement(Ce, { tracks: s.tracks }, n.children), t.length > r.maxTiles && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
740
|
+
qt,
|
|
741
|
+
{
|
|
742
|
+
totalPageCount: s.totalPageCount,
|
|
743
|
+
currentPage: s.currentPage
|
|
744
|
+
}
|
|
745
|
+
), /* @__PURE__ */ e.createElement(Wt, { pagesContainer: a, ...s })));
|
|
746
|
+
}
|
|
747
|
+
const $t = 130, Dt = 140, me = 1, Ie = 16 / 10, Ut = (1 - Ie) * -1;
|
|
748
|
+
function ka({ tracks: t, orientation: n, ...a }) {
|
|
749
|
+
const c = e.useRef(null), [r, s] = e.useState(0), { width: o, height: l } = Ue(c), i = n || (l >= o ? "vertical" : "horizontal"), d = i === "vertical" ? Math.max(o * Ut, $t) : Math.max(l * Ie, Dt), u = mt(), v = Math.max(i === "vertical" ? (l - u) / d : (o - u) / d, me);
|
|
750
|
+
let f = Math.round(v);
|
|
751
|
+
Math.abs(v - r) < 0.5 ? f = Math.round(r) : r !== v && s(v);
|
|
752
|
+
const p = Ge(t, f);
|
|
753
|
+
return e.useLayoutEffect(() => {
|
|
754
|
+
c.current && (c.current.dataset.lkOrientation = i, c.current.style.setProperty("--lk-max-visible-tiles", f.toString()));
|
|
755
|
+
}, [f, i]), /* @__PURE__ */ e.createElement("aside", { key: i, className: "lk-carousel", ref: c, ...a }, /* @__PURE__ */ e.createElement(Ce, { tracks: p }, a.children));
|
|
756
|
+
}
|
|
757
|
+
function Ra({
|
|
758
|
+
value: t,
|
|
759
|
+
onPinChange: n,
|
|
760
|
+
onWidgetChange: a,
|
|
761
|
+
children: c
|
|
762
|
+
}) {
|
|
763
|
+
const r = ft(t);
|
|
764
|
+
return e.useEffect(() => {
|
|
765
|
+
j.debug("PinState Updated", { state: r.pin.state }), n && r.pin.state && n(r.pin.state);
|
|
766
|
+
}, [r.pin.state, n]), e.useEffect(() => {
|
|
767
|
+
j.debug("Widget Updated", { widgetState: r.widget.state }), a && r.widget.state && a(r.widget.state);
|
|
768
|
+
}, [a, r.widget.state]), /* @__PURE__ */ e.createElement(pe.Provider, { value: r }, c);
|
|
769
|
+
}
|
|
770
|
+
const Ma = /* @__PURE__ */ e.forwardRef(
|
|
771
|
+
function({ trackRef: n, ...a }, c) {
|
|
772
|
+
const u = _(n), v = Ee(u, { bands: 7, loPass: 300 });
|
|
773
|
+
return /* @__PURE__ */ e.createElement(
|
|
774
|
+
"svg",
|
|
775
|
+
{
|
|
776
|
+
ref: c,
|
|
777
|
+
width: "100%",
|
|
778
|
+
height: "100%",
|
|
779
|
+
viewBox: "0 0 200 90",
|
|
780
|
+
...a,
|
|
781
|
+
className: "lk-audio-visualizer"
|
|
782
|
+
},
|
|
783
|
+
/* @__PURE__ */ e.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%" }),
|
|
784
|
+
/* @__PURE__ */ e.createElement(
|
|
785
|
+
"g",
|
|
786
|
+
{
|
|
787
|
+
style: {
|
|
788
|
+
transform: `translate(${130 / 2}px, 0)`
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
v.map((f, p) => /* @__PURE__ */ e.createElement(
|
|
792
|
+
"rect",
|
|
793
|
+
{
|
|
794
|
+
key: p,
|
|
795
|
+
x: p * 10,
|
|
796
|
+
y: 90 / 2 - f * 50 / 2,
|
|
797
|
+
width: 6,
|
|
798
|
+
height: f * 50
|
|
799
|
+
}
|
|
800
|
+
))
|
|
801
|
+
)
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
);
|
|
805
|
+
function ya({ participants: t, ...n }) {
|
|
806
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, t.map((a) => /* @__PURE__ */ e.createElement(we.Provider, { value: a, key: a.identity }, ee(n.children))));
|
|
807
|
+
}
|
|
808
|
+
function ba({ room: t, volume: n, muted: a }) {
|
|
809
|
+
const c = Qe(
|
|
810
|
+
[S.Source.Microphone, S.Source.ScreenShareAudio, S.Source.Unknown],
|
|
811
|
+
{
|
|
812
|
+
updateOnlyOn: [],
|
|
813
|
+
onlySubscribed: !0,
|
|
814
|
+
room: t
|
|
815
|
+
}
|
|
816
|
+
).filter((r) => !r.participant.isLocal && r.publication.kind === S.Kind.Audio);
|
|
817
|
+
return /* @__PURE__ */ e.createElement("div", { style: { display: "none" } }, c.map((r) => /* @__PURE__ */ e.createElement(
|
|
818
|
+
ne,
|
|
819
|
+
{
|
|
820
|
+
key: ke(r),
|
|
821
|
+
trackRef: r,
|
|
822
|
+
volume: n,
|
|
823
|
+
muted: a
|
|
824
|
+
}
|
|
825
|
+
)));
|
|
826
|
+
}
|
|
827
|
+
const Sa = /* @__PURE__ */ e.forwardRef(function({ childrenPosition: n = "before", children: a, ...c }, r) {
|
|
828
|
+
const { name: s } = Xe();
|
|
829
|
+
return /* @__PURE__ */ e.createElement("span", { ref: r, ...c }, n === "before" && a, s, n === "after" && a);
|
|
830
|
+
});
|
|
831
|
+
function Gt(t) {
|
|
832
|
+
const n = e.useMemo(() => I(t, { className: "lk-toast" }), [t]);
|
|
833
|
+
return /* @__PURE__ */ e.createElement("div", { ...n }, t.children);
|
|
834
|
+
}
|
|
835
|
+
const Qt = (t) => {
|
|
836
|
+
const n = [];
|
|
837
|
+
for (let a = 0; a < t; a++)
|
|
838
|
+
n.push([a, t - 1 - a]);
|
|
839
|
+
return n;
|
|
840
|
+
}, fe = (t) => [[Math.floor(t / 2)], [-1]], Xt = (t, n, a) => {
|
|
841
|
+
const [c, r] = B(0), [s, o] = B([[]]);
|
|
842
|
+
V(() => {
|
|
843
|
+
if (t === "thinking")
|
|
844
|
+
o(fe(n));
|
|
845
|
+
else if (t === "connecting" || t === "initializing") {
|
|
846
|
+
const i = [...Qt(n)];
|
|
847
|
+
o(i);
|
|
848
|
+
} else o(t === "listening" ? fe(n) : t === void 0 || t === "speaking" ? [new Array(n).fill(0).map((i, d) => d)] : [[]]);
|
|
849
|
+
r(0);
|
|
850
|
+
}, [t, n]);
|
|
851
|
+
const l = z(null);
|
|
852
|
+
return V(() => {
|
|
853
|
+
let i = performance.now();
|
|
854
|
+
const d = (u) => {
|
|
855
|
+
u - i >= a && (r((f) => f + 1), i = u), l.current = requestAnimationFrame(d);
|
|
856
|
+
};
|
|
857
|
+
return l.current = requestAnimationFrame(d), () => {
|
|
858
|
+
l.current !== null && cancelAnimationFrame(l.current);
|
|
859
|
+
};
|
|
860
|
+
}, [a, n, t, s.length]), s[c % s.length];
|
|
861
|
+
}, Yt = /* @__PURE__ */ new Map([
|
|
862
|
+
["connecting", 2e3],
|
|
863
|
+
["initializing", 2e3],
|
|
864
|
+
["listening", 500],
|
|
865
|
+
["thinking", 150]
|
|
866
|
+
]), Jt = (t, n) => {
|
|
867
|
+
if (t === void 0)
|
|
868
|
+
return 1e3;
|
|
869
|
+
let a = Yt.get(t);
|
|
870
|
+
if (a)
|
|
871
|
+
switch (t) {
|
|
872
|
+
case "connecting":
|
|
873
|
+
a /= n;
|
|
874
|
+
break;
|
|
875
|
+
}
|
|
876
|
+
return a;
|
|
877
|
+
}, Kt = /* @__PURE__ */ e.forwardRef(
|
|
878
|
+
function({ state: n, options: a, barCount: c = 15, trackRef: r, track: s, children: o, ...l }, i) {
|
|
879
|
+
const d = I(l, { className: "lk-audio-bar-visualizer" });
|
|
880
|
+
let u = te();
|
|
881
|
+
(r || s) && (u = r || s);
|
|
882
|
+
const v = Ee(u, {
|
|
883
|
+
bands: c,
|
|
884
|
+
loPass: 100,
|
|
885
|
+
hiPass: 200
|
|
886
|
+
}), f = (a == null ? void 0 : a.minHeight) ?? 20, p = (a == null ? void 0 : a.maxHeight) ?? 100, E = Xt(
|
|
887
|
+
n,
|
|
888
|
+
c,
|
|
889
|
+
Jt(n, c) ?? 100
|
|
890
|
+
);
|
|
891
|
+
return /* @__PURE__ */ e.createElement("div", { ref: i, ...d, "data-lk-va-state": n }, v.map(
|
|
892
|
+
(h, m) => o ? ee(o, {
|
|
893
|
+
"data-lk-highlighted": E.includes(m),
|
|
894
|
+
"data-lk-bar-index": m,
|
|
895
|
+
className: "lk-audio-bar",
|
|
896
|
+
style: { height: `${Math.min(p, Math.max(f, h * 100 + 5))}%` }
|
|
897
|
+
}) : /* @__PURE__ */ e.createElement(
|
|
898
|
+
"span",
|
|
899
|
+
{
|
|
900
|
+
key: m,
|
|
901
|
+
"data-lk-highlighted": E.includes(m),
|
|
902
|
+
"data-lk-bar-index": m,
|
|
903
|
+
className: `lk-audio-bar ${E.includes(m) && "lk-highlighted"}`,
|
|
904
|
+
style: {
|
|
905
|
+
// TODO transform animations would be more performant, however the border-radius gets distorted when using scale transforms. a 9-slice approach (or 3 in this case) could work
|
|
906
|
+
// transform: `scale(1, ${Math.min(maxHeight, Math.max(minHeight, volume))}`,
|
|
907
|
+
height: `${Math.min(p, Math.max(f, h * 100 + 5))}%`
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
)
|
|
911
|
+
));
|
|
912
|
+
}
|
|
913
|
+
), Ca = /* @__PURE__ */ e.forwardRef(
|
|
914
|
+
function({
|
|
915
|
+
children: n,
|
|
916
|
+
disableSpeakingIndicator: a,
|
|
917
|
+
onParticipantClick: c,
|
|
918
|
+
trackRef: r,
|
|
919
|
+
...s
|
|
920
|
+
}, o) {
|
|
921
|
+
const l = _(r), { elementProps: i } = ve({
|
|
922
|
+
trackRef: l,
|
|
923
|
+
htmlProps: s,
|
|
924
|
+
disableSpeakingIndicator: a,
|
|
925
|
+
onParticipantClick: c
|
|
926
|
+
});
|
|
927
|
+
return /* @__PURE__ */ e.createElement("div", { ref: o, style: { position: "relative", minHeight: "160px" }, ...i }, /* @__PURE__ */ e.createElement(ae.Provider, { value: l }, n ?? /* @__PURE__ */ e.createElement(e.Fragment, null, $(l) && /* @__PURE__ */ e.createElement(ne, { trackRef: l }), /* @__PURE__ */ e.createElement(Kt, { barCount: 7, options: { minHeight: 8 } }), /* @__PURE__ */ e.createElement("div", { className: "lk-participant-metadata" }, /* @__PURE__ */ e.createElement("div", { className: "lk-participant-metadata-item" }, /* @__PURE__ */ e.createElement(be, { trackRef: l }), /* @__PURE__ */ e.createElement(K, null)), /* @__PURE__ */ e.createElement(ye, { className: "lk-participant-metadata-item" })))));
|
|
928
|
+
}
|
|
929
|
+
);
|
|
930
|
+
function Ia(t) {
|
|
931
|
+
const [n, a] = e.useState(void 0), c = he(t.room);
|
|
932
|
+
return e.useEffect(() => {
|
|
933
|
+
switch (c) {
|
|
934
|
+
case X.Reconnecting:
|
|
935
|
+
a(
|
|
936
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(oe, { className: "lk-spinner" }), " Reconnecting")
|
|
937
|
+
);
|
|
938
|
+
break;
|
|
939
|
+
case X.Connecting:
|
|
940
|
+
a(
|
|
941
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(oe, { className: "lk-spinner" }), " Connecting")
|
|
942
|
+
);
|
|
943
|
+
break;
|
|
944
|
+
case X.Disconnected:
|
|
945
|
+
a(/* @__PURE__ */ e.createElement(e.Fragment, null, "Disconnected"));
|
|
946
|
+
break;
|
|
947
|
+
default:
|
|
948
|
+
a(void 0);
|
|
949
|
+
break;
|
|
950
|
+
}
|
|
951
|
+
}, [c]), n ? /* @__PURE__ */ e.createElement(Gt, { className: "lk-toast-connection-state" }, n) : /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
952
|
+
}
|
|
953
|
+
const xa = /* @__PURE__ */ e.forwardRef(
|
|
954
|
+
function({ entry: n, hideName: a = !1, hideTimestamp: c = !1, messageFormatter: r, ...s }, o) {
|
|
955
|
+
var f, p, E, h;
|
|
956
|
+
const l = e.useMemo(() => r ? r(n.message) : n.message, [n.message, r]), i = !!n.editTimestamp, d = new Date(n.timestamp), u = typeof navigator < "u" ? navigator.language : "en-US", v = ((f = n.from) == null ? void 0 : f.name) ?? ((p = n.from) == null ? void 0 : p.identity);
|
|
957
|
+
return /* @__PURE__ */ e.createElement(
|
|
958
|
+
"li",
|
|
959
|
+
{
|
|
960
|
+
ref: o,
|
|
961
|
+
className: "lk-chat-entry",
|
|
962
|
+
title: d.toLocaleTimeString(u, { timeStyle: "full" }),
|
|
963
|
+
"data-lk-message-origin": (E = n.from) != null && E.isLocal ? "local" : "remote",
|
|
964
|
+
...s
|
|
965
|
+
},
|
|
966
|
+
(!c || !a || i) && /* @__PURE__ */ e.createElement("span", { className: "lk-meta-data" }, !a && /* @__PURE__ */ e.createElement("strong", { className: "lk-participant-name" }, v), (!c || i) && /* @__PURE__ */ e.createElement("span", { className: "lk-timestamp" }, i && "edited ", d.toLocaleTimeString(u, { timeStyle: "short" }))),
|
|
967
|
+
/* @__PURE__ */ e.createElement("span", { className: "lk-message-body" }, l),
|
|
968
|
+
/* @__PURE__ */ e.createElement("span", { className: "lk-message-attachements" }, (h = n.attachedFiles) == null ? void 0 : h.map(
|
|
969
|
+
(m) => m.type.startsWith("image/") && /* @__PURE__ */ e.createElement(
|
|
970
|
+
"img",
|
|
971
|
+
{
|
|
972
|
+
style: { maxWidth: "300px", maxHeight: "300px" },
|
|
973
|
+
key: m.name,
|
|
974
|
+
src: URL.createObjectURL(m),
|
|
975
|
+
alt: m.name
|
|
976
|
+
}
|
|
977
|
+
)
|
|
978
|
+
))
|
|
979
|
+
);
|
|
980
|
+
}
|
|
981
|
+
);
|
|
982
|
+
function Pa(t) {
|
|
983
|
+
return ht(t, gt()).map((n, a) => {
|
|
984
|
+
if (typeof n == "string")
|
|
985
|
+
return n;
|
|
986
|
+
{
|
|
987
|
+
const c = n.content.toString(), r = n.type === "url" ? /^http(s?):\/\//.test(c) ? c : `https://${c}` : `mailto:${c}`;
|
|
988
|
+
return /* @__PURE__ */ e.createElement("a", { className: "lk-chat-link", key: a, href: r, target: "_blank", rel: "noreferrer" }, c);
|
|
989
|
+
}
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
function Ta(t) {
|
|
993
|
+
return /* @__PURE__ */ e.createElement(vt.Provider, { value: t.session }, /* @__PURE__ */ e.createElement(Et.Provider, { value: t.session.room }, t.children));
|
|
994
|
+
}
|
|
995
|
+
export {
|
|
996
|
+
Pt as $,
|
|
997
|
+
Ma as A,
|
|
998
|
+
Kt as B,
|
|
999
|
+
sa as C,
|
|
1000
|
+
ia as D,
|
|
1001
|
+
pt as E,
|
|
1002
|
+
Ea as F,
|
|
1003
|
+
wa as G,
|
|
1004
|
+
wt as H,
|
|
1005
|
+
ie as I,
|
|
1006
|
+
kt as J,
|
|
1007
|
+
Rt as K,
|
|
1008
|
+
Ra as L,
|
|
1009
|
+
fa as M,
|
|
1010
|
+
Mt as N,
|
|
1011
|
+
yt as O,
|
|
1012
|
+
Ot as P,
|
|
1013
|
+
bt as Q,
|
|
1014
|
+
ba as R,
|
|
1015
|
+
oa as S,
|
|
1016
|
+
va as T,
|
|
1017
|
+
St as U,
|
|
1018
|
+
Bt as V,
|
|
1019
|
+
Ct as W,
|
|
1020
|
+
It as X,
|
|
1021
|
+
Re as Y,
|
|
1022
|
+
xt as Z,
|
|
1023
|
+
oe as _,
|
|
1024
|
+
xa as a,
|
|
1025
|
+
Nt as b,
|
|
1026
|
+
ua as c,
|
|
1027
|
+
da as d,
|
|
1028
|
+
ma as e,
|
|
1029
|
+
ga as f,
|
|
1030
|
+
ka as g,
|
|
1031
|
+
pa as h,
|
|
1032
|
+
Ia as i,
|
|
1033
|
+
Ce as j,
|
|
1034
|
+
Ca as k,
|
|
1035
|
+
Gt as l,
|
|
1036
|
+
Pa as m,
|
|
1037
|
+
ca as n,
|
|
1038
|
+
la as o,
|
|
1039
|
+
Tt as p,
|
|
1040
|
+
ha as q,
|
|
1041
|
+
ye as r,
|
|
1042
|
+
ne as s,
|
|
1043
|
+
K as t,
|
|
1044
|
+
be as u,
|
|
1045
|
+
ya as v,
|
|
1046
|
+
Sa as w,
|
|
1047
|
+
jt as x,
|
|
1048
|
+
_t as y,
|
|
1049
|
+
Ta as z
|
|
1050
|
+
};
|
|
1051
|
+
//# sourceMappingURL=components-lNrIMTWQ.mjs.map
|