@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,4026 @@
|
|
|
1
|
+
import { setLogLevel as Gn, LogLevel as Et, setLogExtension as Qn, RoomEvent as y, ParticipantEvent as w, Track as $, TrackEvent as Jt, getBrowser as Jn, compareVersions as Xn, Room as Ct } from "livekit-client";
|
|
2
|
+
import * as D from "react";
|
|
3
|
+
const Ue = Math.min, fe = Math.max, We = Math.round, Ie = Math.floor, te = (e) => ({
|
|
4
|
+
x: e,
|
|
5
|
+
y: e
|
|
6
|
+
}), Zn = {
|
|
7
|
+
left: "right",
|
|
8
|
+
right: "left",
|
|
9
|
+
bottom: "top",
|
|
10
|
+
top: "bottom"
|
|
11
|
+
}, er = {
|
|
12
|
+
start: "end",
|
|
13
|
+
end: "start"
|
|
14
|
+
};
|
|
15
|
+
function Pt(e, t, n) {
|
|
16
|
+
return fe(e, Ue(t, n));
|
|
17
|
+
}
|
|
18
|
+
function Ke(e, t) {
|
|
19
|
+
return typeof e == "function" ? e(t) : e;
|
|
20
|
+
}
|
|
21
|
+
function de(e) {
|
|
22
|
+
return e.split("-")[0];
|
|
23
|
+
}
|
|
24
|
+
function Ge(e) {
|
|
25
|
+
return e.split("-")[1];
|
|
26
|
+
}
|
|
27
|
+
function Xt(e) {
|
|
28
|
+
return e === "x" ? "y" : "x";
|
|
29
|
+
}
|
|
30
|
+
function Zt(e) {
|
|
31
|
+
return e === "y" ? "height" : "width";
|
|
32
|
+
}
|
|
33
|
+
const tr = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
34
|
+
function ae(e) {
|
|
35
|
+
return tr.has(de(e)) ? "y" : "x";
|
|
36
|
+
}
|
|
37
|
+
function en(e) {
|
|
38
|
+
return Xt(ae(e));
|
|
39
|
+
}
|
|
40
|
+
function nr(e, t, n) {
|
|
41
|
+
n === void 0 && (n = !1);
|
|
42
|
+
const r = Ge(e), i = en(e), o = Zt(i);
|
|
43
|
+
let s = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
44
|
+
return t.reference[o] > t.floating[o] && (s = Be(s)), [s, Be(s)];
|
|
45
|
+
}
|
|
46
|
+
function rr(e) {
|
|
47
|
+
const t = Be(e);
|
|
48
|
+
return [ut(e), t, ut(t)];
|
|
49
|
+
}
|
|
50
|
+
function ut(e) {
|
|
51
|
+
return e.replace(/start|end/g, (t) => er[t]);
|
|
52
|
+
}
|
|
53
|
+
const Ot = ["left", "right"], At = ["right", "left"], ir = ["top", "bottom"], or = ["bottom", "top"];
|
|
54
|
+
function sr(e, t, n) {
|
|
55
|
+
switch (e) {
|
|
56
|
+
case "top":
|
|
57
|
+
case "bottom":
|
|
58
|
+
return n ? t ? At : Ot : t ? Ot : At;
|
|
59
|
+
case "left":
|
|
60
|
+
case "right":
|
|
61
|
+
return t ? ir : or;
|
|
62
|
+
default:
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function ar(e, t, n, r) {
|
|
67
|
+
const i = Ge(e);
|
|
68
|
+
let o = sr(de(e), n === "start", r);
|
|
69
|
+
return i && (o = o.map((s) => s + "-" + i), t && (o = o.concat(o.map(ut)))), o;
|
|
70
|
+
}
|
|
71
|
+
function Be(e) {
|
|
72
|
+
return e.replace(/left|right|bottom|top/g, (t) => Zn[t]);
|
|
73
|
+
}
|
|
74
|
+
function cr(e) {
|
|
75
|
+
return {
|
|
76
|
+
top: 0,
|
|
77
|
+
right: 0,
|
|
78
|
+
bottom: 0,
|
|
79
|
+
left: 0,
|
|
80
|
+
...e
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function ur(e) {
|
|
84
|
+
return typeof e != "number" ? cr(e) : {
|
|
85
|
+
top: e,
|
|
86
|
+
right: e,
|
|
87
|
+
bottom: e,
|
|
88
|
+
left: e
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function je(e) {
|
|
92
|
+
const {
|
|
93
|
+
x: t,
|
|
94
|
+
y: n,
|
|
95
|
+
width: r,
|
|
96
|
+
height: i
|
|
97
|
+
} = e;
|
|
98
|
+
return {
|
|
99
|
+
width: r,
|
|
100
|
+
height: i,
|
|
101
|
+
top: n,
|
|
102
|
+
left: t,
|
|
103
|
+
right: t + r,
|
|
104
|
+
bottom: n + i,
|
|
105
|
+
x: t,
|
|
106
|
+
y: n
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function _t(e, t, n) {
|
|
110
|
+
let {
|
|
111
|
+
reference: r,
|
|
112
|
+
floating: i
|
|
113
|
+
} = e;
|
|
114
|
+
const o = ae(t), s = en(t), a = Zt(s), c = de(t), u = o === "y", l = r.x + r.width / 2 - i.width / 2, f = r.y + r.height / 2 - i.height / 2, v = r[a] / 2 - i[a] / 2;
|
|
115
|
+
let d;
|
|
116
|
+
switch (c) {
|
|
117
|
+
case "top":
|
|
118
|
+
d = {
|
|
119
|
+
x: l,
|
|
120
|
+
y: r.y - i.height
|
|
121
|
+
};
|
|
122
|
+
break;
|
|
123
|
+
case "bottom":
|
|
124
|
+
d = {
|
|
125
|
+
x: l,
|
|
126
|
+
y: r.y + r.height
|
|
127
|
+
};
|
|
128
|
+
break;
|
|
129
|
+
case "right":
|
|
130
|
+
d = {
|
|
131
|
+
x: r.x + r.width,
|
|
132
|
+
y: f
|
|
133
|
+
};
|
|
134
|
+
break;
|
|
135
|
+
case "left":
|
|
136
|
+
d = {
|
|
137
|
+
x: r.x - i.width,
|
|
138
|
+
y: f
|
|
139
|
+
};
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
d = {
|
|
143
|
+
x: r.x,
|
|
144
|
+
y: r.y
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
switch (Ge(t)) {
|
|
148
|
+
case "start":
|
|
149
|
+
d[s] -= v * (n && u ? -1 : 1);
|
|
150
|
+
break;
|
|
151
|
+
case "end":
|
|
152
|
+
d[s] += v * (n && u ? -1 : 1);
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
return d;
|
|
156
|
+
}
|
|
157
|
+
const lr = async (e, t, n) => {
|
|
158
|
+
const {
|
|
159
|
+
placement: r = "bottom",
|
|
160
|
+
strategy: i = "absolute",
|
|
161
|
+
middleware: o = [],
|
|
162
|
+
platform: s
|
|
163
|
+
} = n, a = o.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
164
|
+
let u = await s.getElementRects({
|
|
165
|
+
reference: e,
|
|
166
|
+
floating: t,
|
|
167
|
+
strategy: i
|
|
168
|
+
}), {
|
|
169
|
+
x: l,
|
|
170
|
+
y: f
|
|
171
|
+
} = _t(u, r, c), v = r, d = {}, m = 0;
|
|
172
|
+
for (let p = 0; p < a.length; p++) {
|
|
173
|
+
const {
|
|
174
|
+
name: g,
|
|
175
|
+
fn: h
|
|
176
|
+
} = a[p], {
|
|
177
|
+
x,
|
|
178
|
+
y: E,
|
|
179
|
+
data: _,
|
|
180
|
+
reset: b
|
|
181
|
+
} = await h({
|
|
182
|
+
x: l,
|
|
183
|
+
y: f,
|
|
184
|
+
initialPlacement: r,
|
|
185
|
+
placement: v,
|
|
186
|
+
strategy: i,
|
|
187
|
+
middlewareData: d,
|
|
188
|
+
rects: u,
|
|
189
|
+
platform: s,
|
|
190
|
+
elements: {
|
|
191
|
+
reference: e,
|
|
192
|
+
floating: t
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
l = x ?? l, f = E ?? f, d = {
|
|
196
|
+
...d,
|
|
197
|
+
[g]: {
|
|
198
|
+
...d[g],
|
|
199
|
+
..._
|
|
200
|
+
}
|
|
201
|
+
}, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (v = b.placement), b.rects && (u = b.rects === !0 ? await s.getElementRects({
|
|
202
|
+
reference: e,
|
|
203
|
+
floating: t,
|
|
204
|
+
strategy: i
|
|
205
|
+
}) : b.rects), {
|
|
206
|
+
x: l,
|
|
207
|
+
y: f
|
|
208
|
+
} = _t(u, v, c)), p = -1);
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
x: l,
|
|
212
|
+
y: f,
|
|
213
|
+
placement: v,
|
|
214
|
+
strategy: i,
|
|
215
|
+
middlewareData: d
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
async function tn(e, t) {
|
|
219
|
+
var n;
|
|
220
|
+
t === void 0 && (t = {});
|
|
221
|
+
const {
|
|
222
|
+
x: r,
|
|
223
|
+
y: i,
|
|
224
|
+
platform: o,
|
|
225
|
+
rects: s,
|
|
226
|
+
elements: a,
|
|
227
|
+
strategy: c
|
|
228
|
+
} = e, {
|
|
229
|
+
boundary: u = "clippingAncestors",
|
|
230
|
+
rootBoundary: l = "viewport",
|
|
231
|
+
elementContext: f = "floating",
|
|
232
|
+
altBoundary: v = !1,
|
|
233
|
+
padding: d = 0
|
|
234
|
+
} = Ke(t, e), m = ur(d), g = a[v ? f === "floating" ? "reference" : "floating" : f], h = je(await o.getClippingRect({
|
|
235
|
+
element: (n = await (o.isElement == null ? void 0 : o.isElement(g))) == null || n ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
|
|
236
|
+
boundary: u,
|
|
237
|
+
rootBoundary: l,
|
|
238
|
+
strategy: c
|
|
239
|
+
})), x = f === "floating" ? {
|
|
240
|
+
x: r,
|
|
241
|
+
y: i,
|
|
242
|
+
width: s.floating.width,
|
|
243
|
+
height: s.floating.height
|
|
244
|
+
} : s.reference, E = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), _ = await (o.isElement == null ? void 0 : o.isElement(E)) ? await (o.getScale == null ? void 0 : o.getScale(E)) || {
|
|
245
|
+
x: 1,
|
|
246
|
+
y: 1
|
|
247
|
+
} : {
|
|
248
|
+
x: 1,
|
|
249
|
+
y: 1
|
|
250
|
+
}, b = je(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
251
|
+
elements: a,
|
|
252
|
+
rect: x,
|
|
253
|
+
offsetParent: E,
|
|
254
|
+
strategy: c
|
|
255
|
+
}) : x);
|
|
256
|
+
return {
|
|
257
|
+
top: (h.top - b.top + m.top) / _.y,
|
|
258
|
+
bottom: (b.bottom - h.bottom + m.bottom) / _.y,
|
|
259
|
+
left: (h.left - b.left + m.left) / _.x,
|
|
260
|
+
right: (b.right - h.right + m.right) / _.x
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
const fr = function(e) {
|
|
264
|
+
return e === void 0 && (e = {}), {
|
|
265
|
+
name: "flip",
|
|
266
|
+
options: e,
|
|
267
|
+
async fn(t) {
|
|
268
|
+
var n, r;
|
|
269
|
+
const {
|
|
270
|
+
placement: i,
|
|
271
|
+
middlewareData: o,
|
|
272
|
+
rects: s,
|
|
273
|
+
initialPlacement: a,
|
|
274
|
+
platform: c,
|
|
275
|
+
elements: u
|
|
276
|
+
} = t, {
|
|
277
|
+
mainAxis: l = !0,
|
|
278
|
+
crossAxis: f = !0,
|
|
279
|
+
fallbackPlacements: v,
|
|
280
|
+
fallbackStrategy: d = "bestFit",
|
|
281
|
+
fallbackAxisSideDirection: m = "none",
|
|
282
|
+
flipAlignment: p = !0,
|
|
283
|
+
...g
|
|
284
|
+
} = Ke(e, t);
|
|
285
|
+
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
286
|
+
return {};
|
|
287
|
+
const h = de(i), x = ae(a), E = de(a) === a, _ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), b = v || (E || !p ? [Be(a)] : rr(a)), S = m !== "none";
|
|
288
|
+
!v && S && b.push(...ar(a, p, m, _));
|
|
289
|
+
const C = [a, ...b], M = await tn(t, g), R = [];
|
|
290
|
+
let W = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
291
|
+
if (l && R.push(M[h]), f) {
|
|
292
|
+
const k = nr(i, s, _);
|
|
293
|
+
R.push(M[k[0]], M[k[1]]);
|
|
294
|
+
}
|
|
295
|
+
if (W = [...W, {
|
|
296
|
+
placement: i,
|
|
297
|
+
overflows: R
|
|
298
|
+
}], !R.every((k) => k <= 0)) {
|
|
299
|
+
var T, P;
|
|
300
|
+
const k = (((T = o.flip) == null ? void 0 : T.index) || 0) + 1, F = C[k];
|
|
301
|
+
if (F && (!(f === "alignment" ? x !== ae(F) : !1) || // We leave the current main axis only if every placement on that axis
|
|
302
|
+
// overflows the main axis.
|
|
303
|
+
W.every((N) => ae(N.placement) === x ? N.overflows[0] > 0 : !0)))
|
|
304
|
+
return {
|
|
305
|
+
data: {
|
|
306
|
+
index: k,
|
|
307
|
+
overflows: W
|
|
308
|
+
},
|
|
309
|
+
reset: {
|
|
310
|
+
placement: F
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
let G = (P = W.filter((J) => J.overflows[0] <= 0).sort((J, N) => J.overflows[1] - N.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
314
|
+
if (!G)
|
|
315
|
+
switch (d) {
|
|
316
|
+
case "bestFit": {
|
|
317
|
+
var j;
|
|
318
|
+
const J = (j = W.filter((N) => {
|
|
319
|
+
if (S) {
|
|
320
|
+
const se = ae(N.placement);
|
|
321
|
+
return se === x || // Create a bias to the `y` side axis due to horizontal
|
|
322
|
+
// reading directions favoring greater width.
|
|
323
|
+
se === "y";
|
|
324
|
+
}
|
|
325
|
+
return !0;
|
|
326
|
+
}).map((N) => [N.placement, N.overflows.filter((se) => se > 0).reduce((se, Kn) => se + Kn, 0)]).sort((N, se) => N[1] - se[1])[0]) == null ? void 0 : j[0];
|
|
327
|
+
J && (G = J);
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
case "initialPlacement":
|
|
331
|
+
G = a;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
if (i !== G)
|
|
335
|
+
return {
|
|
336
|
+
reset: {
|
|
337
|
+
placement: G
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
return {};
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
}, dr = /* @__PURE__ */ new Set(["left", "top"]);
|
|
345
|
+
async function pr(e, t) {
|
|
346
|
+
const {
|
|
347
|
+
placement: n,
|
|
348
|
+
platform: r,
|
|
349
|
+
elements: i
|
|
350
|
+
} = e, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), s = de(n), a = Ge(n), c = ae(n) === "y", u = dr.has(s) ? -1 : 1, l = o && c ? -1 : 1, f = Ke(t, e);
|
|
351
|
+
let {
|
|
352
|
+
mainAxis: v,
|
|
353
|
+
crossAxis: d,
|
|
354
|
+
alignmentAxis: m
|
|
355
|
+
} = typeof f == "number" ? {
|
|
356
|
+
mainAxis: f,
|
|
357
|
+
crossAxis: 0,
|
|
358
|
+
alignmentAxis: null
|
|
359
|
+
} : {
|
|
360
|
+
mainAxis: f.mainAxis || 0,
|
|
361
|
+
crossAxis: f.crossAxis || 0,
|
|
362
|
+
alignmentAxis: f.alignmentAxis
|
|
363
|
+
};
|
|
364
|
+
return a && typeof m == "number" && (d = a === "end" ? m * -1 : m), c ? {
|
|
365
|
+
x: d * l,
|
|
366
|
+
y: v * u
|
|
367
|
+
} : {
|
|
368
|
+
x: v * u,
|
|
369
|
+
y: d * l
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
const hr = function(e) {
|
|
373
|
+
return e === void 0 && (e = 0), {
|
|
374
|
+
name: "offset",
|
|
375
|
+
options: e,
|
|
376
|
+
async fn(t) {
|
|
377
|
+
var n, r;
|
|
378
|
+
const {
|
|
379
|
+
x: i,
|
|
380
|
+
y: o,
|
|
381
|
+
placement: s,
|
|
382
|
+
middlewareData: a
|
|
383
|
+
} = t, c = await pr(t, e);
|
|
384
|
+
return s === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
|
|
385
|
+
x: i + c.x,
|
|
386
|
+
y: o + c.y,
|
|
387
|
+
data: {
|
|
388
|
+
...c,
|
|
389
|
+
placement: s
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
}, vr = function(e) {
|
|
395
|
+
return e === void 0 && (e = {}), {
|
|
396
|
+
name: "shift",
|
|
397
|
+
options: e,
|
|
398
|
+
async fn(t) {
|
|
399
|
+
const {
|
|
400
|
+
x: n,
|
|
401
|
+
y: r,
|
|
402
|
+
placement: i
|
|
403
|
+
} = t, {
|
|
404
|
+
mainAxis: o = !0,
|
|
405
|
+
crossAxis: s = !1,
|
|
406
|
+
limiter: a = {
|
|
407
|
+
fn: (g) => {
|
|
408
|
+
let {
|
|
409
|
+
x: h,
|
|
410
|
+
y: x
|
|
411
|
+
} = g;
|
|
412
|
+
return {
|
|
413
|
+
x: h,
|
|
414
|
+
y: x
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
...c
|
|
419
|
+
} = Ke(e, t), u = {
|
|
420
|
+
x: n,
|
|
421
|
+
y: r
|
|
422
|
+
}, l = await tn(t, c), f = ae(de(i)), v = Xt(f);
|
|
423
|
+
let d = u[v], m = u[f];
|
|
424
|
+
if (o) {
|
|
425
|
+
const g = v === "y" ? "top" : "left", h = v === "y" ? "bottom" : "right", x = d + l[g], E = d - l[h];
|
|
426
|
+
d = Pt(x, d, E);
|
|
427
|
+
}
|
|
428
|
+
if (s) {
|
|
429
|
+
const g = f === "y" ? "top" : "left", h = f === "y" ? "bottom" : "right", x = m + l[g], E = m - l[h];
|
|
430
|
+
m = Pt(x, m, E);
|
|
431
|
+
}
|
|
432
|
+
const p = a.fn({
|
|
433
|
+
...t,
|
|
434
|
+
[v]: d,
|
|
435
|
+
[f]: m
|
|
436
|
+
});
|
|
437
|
+
return {
|
|
438
|
+
...p,
|
|
439
|
+
data: {
|
|
440
|
+
x: p.x - n,
|
|
441
|
+
y: p.y - r,
|
|
442
|
+
enabled: {
|
|
443
|
+
[v]: o,
|
|
444
|
+
[f]: s
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
function Qe() {
|
|
452
|
+
return typeof window < "u";
|
|
453
|
+
}
|
|
454
|
+
function Se(e) {
|
|
455
|
+
return nn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
456
|
+
}
|
|
457
|
+
function q(e) {
|
|
458
|
+
var t;
|
|
459
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
460
|
+
}
|
|
461
|
+
function re(e) {
|
|
462
|
+
var t;
|
|
463
|
+
return (t = (nn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
464
|
+
}
|
|
465
|
+
function nn(e) {
|
|
466
|
+
return Qe() ? e instanceof Node || e instanceof q(e).Node : !1;
|
|
467
|
+
}
|
|
468
|
+
function Z(e) {
|
|
469
|
+
return Qe() ? e instanceof Element || e instanceof q(e).Element : !1;
|
|
470
|
+
}
|
|
471
|
+
function ne(e) {
|
|
472
|
+
return Qe() ? e instanceof HTMLElement || e instanceof q(e).HTMLElement : !1;
|
|
473
|
+
}
|
|
474
|
+
function kt(e) {
|
|
475
|
+
return !Qe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
|
|
476
|
+
}
|
|
477
|
+
const mr = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
478
|
+
function ke(e) {
|
|
479
|
+
const {
|
|
480
|
+
overflow: t,
|
|
481
|
+
overflowX: n,
|
|
482
|
+
overflowY: r,
|
|
483
|
+
display: i
|
|
484
|
+
} = ee(e);
|
|
485
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !mr.has(i);
|
|
486
|
+
}
|
|
487
|
+
const gr = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
488
|
+
function br(e) {
|
|
489
|
+
return gr.has(Se(e));
|
|
490
|
+
}
|
|
491
|
+
const yr = [":popover-open", ":modal"];
|
|
492
|
+
function Je(e) {
|
|
493
|
+
return yr.some((t) => {
|
|
494
|
+
try {
|
|
495
|
+
return e.matches(t);
|
|
496
|
+
} catch {
|
|
497
|
+
return !1;
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
const wr = ["transform", "translate", "scale", "rotate", "perspective"], xr = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Sr = ["paint", "layout", "strict", "content"];
|
|
502
|
+
function mt(e) {
|
|
503
|
+
const t = gt(), n = Z(e) ? ee(e) : e;
|
|
504
|
+
return wr.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) || xr.some((r) => (n.willChange || "").includes(r)) || Sr.some((r) => (n.contain || "").includes(r));
|
|
505
|
+
}
|
|
506
|
+
function Tr(e) {
|
|
507
|
+
let t = ue(e);
|
|
508
|
+
for (; ne(t) && !ye(t); ) {
|
|
509
|
+
if (mt(t))
|
|
510
|
+
return t;
|
|
511
|
+
if (Je(t))
|
|
512
|
+
return null;
|
|
513
|
+
t = ue(t);
|
|
514
|
+
}
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
function gt() {
|
|
518
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
519
|
+
}
|
|
520
|
+
const Er = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
521
|
+
function ye(e) {
|
|
522
|
+
return Er.has(Se(e));
|
|
523
|
+
}
|
|
524
|
+
function ee(e) {
|
|
525
|
+
return q(e).getComputedStyle(e);
|
|
526
|
+
}
|
|
527
|
+
function Xe(e) {
|
|
528
|
+
return Z(e) ? {
|
|
529
|
+
scrollLeft: e.scrollLeft,
|
|
530
|
+
scrollTop: e.scrollTop
|
|
531
|
+
} : {
|
|
532
|
+
scrollLeft: e.scrollX,
|
|
533
|
+
scrollTop: e.scrollY
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
function ue(e) {
|
|
537
|
+
if (Se(e) === "html")
|
|
538
|
+
return e;
|
|
539
|
+
const t = (
|
|
540
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
541
|
+
e.assignedSlot || // DOM Element detected.
|
|
542
|
+
e.parentNode || // ShadowRoot detected.
|
|
543
|
+
kt(e) && e.host || // Fallback.
|
|
544
|
+
re(e)
|
|
545
|
+
);
|
|
546
|
+
return kt(t) ? t.host : t;
|
|
547
|
+
}
|
|
548
|
+
function rn(e) {
|
|
549
|
+
const t = ue(e);
|
|
550
|
+
return ye(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ne(t) && ke(t) ? t : rn(t);
|
|
551
|
+
}
|
|
552
|
+
function Pe(e, t, n) {
|
|
553
|
+
var r;
|
|
554
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
555
|
+
const i = rn(e), o = i === ((r = e.ownerDocument) == null ? void 0 : r.body), s = q(i);
|
|
556
|
+
if (o) {
|
|
557
|
+
const a = lt(s);
|
|
558
|
+
return t.concat(s, s.visualViewport || [], ke(i) ? i : [], a && n ? Pe(a) : []);
|
|
559
|
+
}
|
|
560
|
+
return t.concat(i, Pe(i, [], n));
|
|
561
|
+
}
|
|
562
|
+
function lt(e) {
|
|
563
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
564
|
+
}
|
|
565
|
+
function on(e) {
|
|
566
|
+
const t = ee(e);
|
|
567
|
+
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
568
|
+
const i = ne(e), o = i ? e.offsetWidth : n, s = i ? e.offsetHeight : r, a = We(n) !== o || We(r) !== s;
|
|
569
|
+
return a && (n = o, r = s), {
|
|
570
|
+
width: n,
|
|
571
|
+
height: r,
|
|
572
|
+
$: a
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
function bt(e) {
|
|
576
|
+
return Z(e) ? e : e.contextElement;
|
|
577
|
+
}
|
|
578
|
+
function me(e) {
|
|
579
|
+
const t = bt(e);
|
|
580
|
+
if (!ne(t))
|
|
581
|
+
return te(1);
|
|
582
|
+
const n = t.getBoundingClientRect(), {
|
|
583
|
+
width: r,
|
|
584
|
+
height: i,
|
|
585
|
+
$: o
|
|
586
|
+
} = on(t);
|
|
587
|
+
let s = (o ? We(n.width) : n.width) / r, a = (o ? We(n.height) : n.height) / i;
|
|
588
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
589
|
+
x: s,
|
|
590
|
+
y: a
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
const Cr = /* @__PURE__ */ te(0);
|
|
594
|
+
function sn(e) {
|
|
595
|
+
const t = q(e);
|
|
596
|
+
return !gt() || !t.visualViewport ? Cr : {
|
|
597
|
+
x: t.visualViewport.offsetLeft,
|
|
598
|
+
y: t.visualViewport.offsetTop
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
function Pr(e, t, n) {
|
|
602
|
+
return t === void 0 && (t = !1), !n || t && n !== q(e) ? !1 : t;
|
|
603
|
+
}
|
|
604
|
+
function pe(e, t, n, r) {
|
|
605
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
606
|
+
const i = e.getBoundingClientRect(), o = bt(e);
|
|
607
|
+
let s = te(1);
|
|
608
|
+
t && (r ? Z(r) && (s = me(r)) : s = me(e));
|
|
609
|
+
const a = Pr(o, n, r) ? sn(o) : te(0);
|
|
610
|
+
let c = (i.left + a.x) / s.x, u = (i.top + a.y) / s.y, l = i.width / s.x, f = i.height / s.y;
|
|
611
|
+
if (o) {
|
|
612
|
+
const v = q(o), d = r && Z(r) ? q(r) : r;
|
|
613
|
+
let m = v, p = lt(m);
|
|
614
|
+
for (; p && r && d !== m; ) {
|
|
615
|
+
const g = me(p), h = p.getBoundingClientRect(), x = ee(p), E = h.left + (p.clientLeft + parseFloat(x.paddingLeft)) * g.x, _ = h.top + (p.clientTop + parseFloat(x.paddingTop)) * g.y;
|
|
616
|
+
c *= g.x, u *= g.y, l *= g.x, f *= g.y, c += E, u += _, m = q(p), p = lt(m);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
return je({
|
|
620
|
+
width: l,
|
|
621
|
+
height: f,
|
|
622
|
+
x: c,
|
|
623
|
+
y: u
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
function Ze(e, t) {
|
|
627
|
+
const n = Xe(e).scrollLeft;
|
|
628
|
+
return t ? t.left + n : pe(re(e)).left + n;
|
|
629
|
+
}
|
|
630
|
+
function an(e, t) {
|
|
631
|
+
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - Ze(e, n), i = n.top + t.scrollTop;
|
|
632
|
+
return {
|
|
633
|
+
x: r,
|
|
634
|
+
y: i
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
function Or(e) {
|
|
638
|
+
let {
|
|
639
|
+
elements: t,
|
|
640
|
+
rect: n,
|
|
641
|
+
offsetParent: r,
|
|
642
|
+
strategy: i
|
|
643
|
+
} = e;
|
|
644
|
+
const o = i === "fixed", s = re(r), a = t ? Je(t.floating) : !1;
|
|
645
|
+
if (r === s || a && o)
|
|
646
|
+
return n;
|
|
647
|
+
let c = {
|
|
648
|
+
scrollLeft: 0,
|
|
649
|
+
scrollTop: 0
|
|
650
|
+
}, u = te(1);
|
|
651
|
+
const l = te(0), f = ne(r);
|
|
652
|
+
if ((f || !f && !o) && ((Se(r) !== "body" || ke(s)) && (c = Xe(r)), ne(r))) {
|
|
653
|
+
const d = pe(r);
|
|
654
|
+
u = me(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
|
|
655
|
+
}
|
|
656
|
+
const v = s && !f && !o ? an(s, c) : te(0);
|
|
657
|
+
return {
|
|
658
|
+
width: n.width * u.x,
|
|
659
|
+
height: n.height * u.y,
|
|
660
|
+
x: n.x * u.x - c.scrollLeft * u.x + l.x + v.x,
|
|
661
|
+
y: n.y * u.y - c.scrollTop * u.y + l.y + v.y
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
function Ar(e) {
|
|
665
|
+
return Array.from(e.getClientRects());
|
|
666
|
+
}
|
|
667
|
+
function _r(e) {
|
|
668
|
+
const t = re(e), n = Xe(e), r = e.ownerDocument.body, i = fe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), o = fe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
669
|
+
let s = -n.scrollLeft + Ze(e);
|
|
670
|
+
const a = -n.scrollTop;
|
|
671
|
+
return ee(r).direction === "rtl" && (s += fe(t.clientWidth, r.clientWidth) - i), {
|
|
672
|
+
width: i,
|
|
673
|
+
height: o,
|
|
674
|
+
x: s,
|
|
675
|
+
y: a
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
const Lt = 25;
|
|
679
|
+
function kr(e, t) {
|
|
680
|
+
const n = q(e), r = re(e), i = n.visualViewport;
|
|
681
|
+
let o = r.clientWidth, s = r.clientHeight, a = 0, c = 0;
|
|
682
|
+
if (i) {
|
|
683
|
+
o = i.width, s = i.height;
|
|
684
|
+
const l = gt();
|
|
685
|
+
(!l || l && t === "fixed") && (a = i.offsetLeft, c = i.offsetTop);
|
|
686
|
+
}
|
|
687
|
+
const u = Ze(r);
|
|
688
|
+
if (u <= 0) {
|
|
689
|
+
const l = r.ownerDocument, f = l.body, v = getComputedStyle(f), d = l.compatMode === "CSS1Compat" && parseFloat(v.marginLeft) + parseFloat(v.marginRight) || 0, m = Math.abs(r.clientWidth - f.clientWidth - d);
|
|
690
|
+
m <= Lt && (o -= m);
|
|
691
|
+
} else u <= Lt && (o += u);
|
|
692
|
+
return {
|
|
693
|
+
width: o,
|
|
694
|
+
height: s,
|
|
695
|
+
x: a,
|
|
696
|
+
y: c
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
const Lr = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
700
|
+
function Ir(e, t) {
|
|
701
|
+
const n = pe(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, o = ne(e) ? me(e) : te(1), s = e.clientWidth * o.x, a = e.clientHeight * o.y, c = i * o.x, u = r * o.y;
|
|
702
|
+
return {
|
|
703
|
+
width: s,
|
|
704
|
+
height: a,
|
|
705
|
+
x: c,
|
|
706
|
+
y: u
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
function It(e, t, n) {
|
|
710
|
+
let r;
|
|
711
|
+
if (t === "viewport")
|
|
712
|
+
r = kr(e, n);
|
|
713
|
+
else if (t === "document")
|
|
714
|
+
r = _r(re(e));
|
|
715
|
+
else if (Z(t))
|
|
716
|
+
r = Ir(t, n);
|
|
717
|
+
else {
|
|
718
|
+
const i = sn(e);
|
|
719
|
+
r = {
|
|
720
|
+
x: t.x - i.x,
|
|
721
|
+
y: t.y - i.y,
|
|
722
|
+
width: t.width,
|
|
723
|
+
height: t.height
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
return je(r);
|
|
727
|
+
}
|
|
728
|
+
function cn(e, t) {
|
|
729
|
+
const n = ue(e);
|
|
730
|
+
return n === t || !Z(n) || ye(n) ? !1 : ee(n).position === "fixed" || cn(n, t);
|
|
731
|
+
}
|
|
732
|
+
function Mr(e, t) {
|
|
733
|
+
const n = t.get(e);
|
|
734
|
+
if (n)
|
|
735
|
+
return n;
|
|
736
|
+
let r = Pe(e, [], !1).filter((a) => Z(a) && Se(a) !== "body"), i = null;
|
|
737
|
+
const o = ee(e).position === "fixed";
|
|
738
|
+
let s = o ? ue(e) : e;
|
|
739
|
+
for (; Z(s) && !ye(s); ) {
|
|
740
|
+
const a = ee(s), c = mt(s);
|
|
741
|
+
!c && a.position === "fixed" && (i = null), (o ? !c && !i : !c && a.position === "static" && !!i && Lr.has(i.position) || ke(s) && !c && cn(e, s)) ? r = r.filter((l) => l !== s) : i = a, s = ue(s);
|
|
742
|
+
}
|
|
743
|
+
return t.set(e, r), r;
|
|
744
|
+
}
|
|
745
|
+
function Rr(e) {
|
|
746
|
+
let {
|
|
747
|
+
element: t,
|
|
748
|
+
boundary: n,
|
|
749
|
+
rootBoundary: r,
|
|
750
|
+
strategy: i
|
|
751
|
+
} = e;
|
|
752
|
+
const s = [...n === "clippingAncestors" ? Je(t) ? [] : Mr(t, this._c) : [].concat(n), r], a = s[0], c = s.reduce((u, l) => {
|
|
753
|
+
const f = It(t, l, i);
|
|
754
|
+
return u.top = fe(f.top, u.top), u.right = Ue(f.right, u.right), u.bottom = Ue(f.bottom, u.bottom), u.left = fe(f.left, u.left), u;
|
|
755
|
+
}, It(t, a, i));
|
|
756
|
+
return {
|
|
757
|
+
width: c.right - c.left,
|
|
758
|
+
height: c.bottom - c.top,
|
|
759
|
+
x: c.left,
|
|
760
|
+
y: c.top
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
function Dr(e) {
|
|
764
|
+
const {
|
|
765
|
+
width: t,
|
|
766
|
+
height: n
|
|
767
|
+
} = on(e);
|
|
768
|
+
return {
|
|
769
|
+
width: t,
|
|
770
|
+
height: n
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
function Fr(e, t, n) {
|
|
774
|
+
const r = ne(t), i = re(t), o = n === "fixed", s = pe(e, !0, o, t);
|
|
775
|
+
let a = {
|
|
776
|
+
scrollLeft: 0,
|
|
777
|
+
scrollTop: 0
|
|
778
|
+
};
|
|
779
|
+
const c = te(0);
|
|
780
|
+
function u() {
|
|
781
|
+
c.x = Ze(i);
|
|
782
|
+
}
|
|
783
|
+
if (r || !r && !o)
|
|
784
|
+
if ((Se(t) !== "body" || ke(i)) && (a = Xe(t)), r) {
|
|
785
|
+
const d = pe(t, !0, o, t);
|
|
786
|
+
c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
|
|
787
|
+
} else i && u();
|
|
788
|
+
o && !r && i && u();
|
|
789
|
+
const l = i && !r && !o ? an(i, a) : te(0), f = s.left + a.scrollLeft - c.x - l.x, v = s.top + a.scrollTop - c.y - l.y;
|
|
790
|
+
return {
|
|
791
|
+
x: f,
|
|
792
|
+
y: v,
|
|
793
|
+
width: s.width,
|
|
794
|
+
height: s.height
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
function rt(e) {
|
|
798
|
+
return ee(e).position === "static";
|
|
799
|
+
}
|
|
800
|
+
function Mt(e, t) {
|
|
801
|
+
if (!ne(e) || ee(e).position === "fixed")
|
|
802
|
+
return null;
|
|
803
|
+
if (t)
|
|
804
|
+
return t(e);
|
|
805
|
+
let n = e.offsetParent;
|
|
806
|
+
return re(e) === n && (n = n.ownerDocument.body), n;
|
|
807
|
+
}
|
|
808
|
+
function un(e, t) {
|
|
809
|
+
const n = q(e);
|
|
810
|
+
if (Je(e))
|
|
811
|
+
return n;
|
|
812
|
+
if (!ne(e)) {
|
|
813
|
+
let i = ue(e);
|
|
814
|
+
for (; i && !ye(i); ) {
|
|
815
|
+
if (Z(i) && !rt(i))
|
|
816
|
+
return i;
|
|
817
|
+
i = ue(i);
|
|
818
|
+
}
|
|
819
|
+
return n;
|
|
820
|
+
}
|
|
821
|
+
let r = Mt(e, t);
|
|
822
|
+
for (; r && br(r) && rt(r); )
|
|
823
|
+
r = Mt(r, t);
|
|
824
|
+
return r && ye(r) && rt(r) && !mt(r) ? n : r || Tr(e) || n;
|
|
825
|
+
}
|
|
826
|
+
const Nr = async function(e) {
|
|
827
|
+
const t = this.getOffsetParent || un, n = this.getDimensions, r = await n(e.floating);
|
|
828
|
+
return {
|
|
829
|
+
reference: Fr(e.reference, await t(e.floating), e.strategy),
|
|
830
|
+
floating: {
|
|
831
|
+
x: 0,
|
|
832
|
+
y: 0,
|
|
833
|
+
width: r.width,
|
|
834
|
+
height: r.height
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
function $r(e) {
|
|
839
|
+
return ee(e).direction === "rtl";
|
|
840
|
+
}
|
|
841
|
+
const Ur = {
|
|
842
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Or,
|
|
843
|
+
getDocumentElement: re,
|
|
844
|
+
getClippingRect: Rr,
|
|
845
|
+
getOffsetParent: un,
|
|
846
|
+
getElementRects: Nr,
|
|
847
|
+
getClientRects: Ar,
|
|
848
|
+
getDimensions: Dr,
|
|
849
|
+
getScale: me,
|
|
850
|
+
isElement: Z,
|
|
851
|
+
isRTL: $r
|
|
852
|
+
};
|
|
853
|
+
function ln(e, t) {
|
|
854
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
855
|
+
}
|
|
856
|
+
function Wr(e, t) {
|
|
857
|
+
let n = null, r;
|
|
858
|
+
const i = re(e);
|
|
859
|
+
function o() {
|
|
860
|
+
var a;
|
|
861
|
+
clearTimeout(r), (a = n) == null || a.disconnect(), n = null;
|
|
862
|
+
}
|
|
863
|
+
function s(a, c) {
|
|
864
|
+
a === void 0 && (a = !1), c === void 0 && (c = 1), o();
|
|
865
|
+
const u = e.getBoundingClientRect(), {
|
|
866
|
+
left: l,
|
|
867
|
+
top: f,
|
|
868
|
+
width: v,
|
|
869
|
+
height: d
|
|
870
|
+
} = u;
|
|
871
|
+
if (a || t(), !v || !d)
|
|
872
|
+
return;
|
|
873
|
+
const m = Ie(f), p = Ie(i.clientWidth - (l + v)), g = Ie(i.clientHeight - (f + d)), h = Ie(l), E = {
|
|
874
|
+
rootMargin: -m + "px " + -p + "px " + -g + "px " + -h + "px",
|
|
875
|
+
threshold: fe(0, Ue(1, c)) || 1
|
|
876
|
+
};
|
|
877
|
+
let _ = !0;
|
|
878
|
+
function b(S) {
|
|
879
|
+
const C = S[0].intersectionRatio;
|
|
880
|
+
if (C !== c) {
|
|
881
|
+
if (!_)
|
|
882
|
+
return s();
|
|
883
|
+
C ? s(!1, C) : r = setTimeout(() => {
|
|
884
|
+
s(!1, 1e-7);
|
|
885
|
+
}, 1e3);
|
|
886
|
+
}
|
|
887
|
+
C === 1 && !ln(u, e.getBoundingClientRect()) && s(), _ = !1;
|
|
888
|
+
}
|
|
889
|
+
try {
|
|
890
|
+
n = new IntersectionObserver(b, {
|
|
891
|
+
...E,
|
|
892
|
+
// Handle <iframe>s
|
|
893
|
+
root: i.ownerDocument
|
|
894
|
+
});
|
|
895
|
+
} catch {
|
|
896
|
+
n = new IntersectionObserver(b, E);
|
|
897
|
+
}
|
|
898
|
+
n.observe(e);
|
|
899
|
+
}
|
|
900
|
+
return s(!0), o;
|
|
901
|
+
}
|
|
902
|
+
function Br(e, t, n, r) {
|
|
903
|
+
r === void 0 && (r = {});
|
|
904
|
+
const {
|
|
905
|
+
ancestorScroll: i = !0,
|
|
906
|
+
ancestorResize: o = !0,
|
|
907
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
908
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
909
|
+
animationFrame: c = !1
|
|
910
|
+
} = r, u = bt(e), l = i || o ? [...u ? Pe(u) : [], ...Pe(t)] : [];
|
|
911
|
+
l.forEach((h) => {
|
|
912
|
+
i && h.addEventListener("scroll", n, {
|
|
913
|
+
passive: !0
|
|
914
|
+
}), o && h.addEventListener("resize", n);
|
|
915
|
+
});
|
|
916
|
+
const f = u && a ? Wr(u, n) : null;
|
|
917
|
+
let v = -1, d = null;
|
|
918
|
+
s && (d = new ResizeObserver((h) => {
|
|
919
|
+
let [x] = h;
|
|
920
|
+
x && x.target === u && d && (d.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
921
|
+
var E;
|
|
922
|
+
(E = d) == null || E.observe(t);
|
|
923
|
+
})), n();
|
|
924
|
+
}), u && !c && d.observe(u), d.observe(t));
|
|
925
|
+
let m, p = c ? pe(e) : null;
|
|
926
|
+
c && g();
|
|
927
|
+
function g() {
|
|
928
|
+
const h = pe(e);
|
|
929
|
+
p && !ln(p, h) && n(), p = h, m = requestAnimationFrame(g);
|
|
930
|
+
}
|
|
931
|
+
return n(), () => {
|
|
932
|
+
var h;
|
|
933
|
+
l.forEach((x) => {
|
|
934
|
+
i && x.removeEventListener("scroll", n), o && x.removeEventListener("resize", n);
|
|
935
|
+
}), f == null || f(), (h = d) == null || h.disconnect(), d = null, c && cancelAnimationFrame(m);
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
const jr = hr, Vr = vr, Hr = fr, zr = (e, t, n) => {
|
|
939
|
+
const r = /* @__PURE__ */ new Map(), i = {
|
|
940
|
+
platform: Ur,
|
|
941
|
+
...n
|
|
942
|
+
}, o = {
|
|
943
|
+
...i.platform,
|
|
944
|
+
_c: r
|
|
945
|
+
};
|
|
946
|
+
return lr(e, t, {
|
|
947
|
+
...i,
|
|
948
|
+
platform: o
|
|
949
|
+
});
|
|
950
|
+
};
|
|
951
|
+
var os = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
952
|
+
function Yr(e) {
|
|
953
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
954
|
+
}
|
|
955
|
+
var Fe = { exports: {} }, qr = Fe.exports, Rt;
|
|
956
|
+
function Kr() {
|
|
957
|
+
return Rt || (Rt = 1, (function(e) {
|
|
958
|
+
(function(t, n) {
|
|
959
|
+
e.exports ? e.exports = n() : t.log = n();
|
|
960
|
+
})(qr, function() {
|
|
961
|
+
var t = function() {
|
|
962
|
+
}, n = "undefined", r = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), i = [
|
|
963
|
+
"trace",
|
|
964
|
+
"debug",
|
|
965
|
+
"info",
|
|
966
|
+
"warn",
|
|
967
|
+
"error"
|
|
968
|
+
], o = {}, s = null;
|
|
969
|
+
function a(p, g) {
|
|
970
|
+
var h = p[g];
|
|
971
|
+
if (typeof h.bind == "function")
|
|
972
|
+
return h.bind(p);
|
|
973
|
+
try {
|
|
974
|
+
return Function.prototype.bind.call(h, p);
|
|
975
|
+
} catch {
|
|
976
|
+
return function() {
|
|
977
|
+
return Function.prototype.apply.apply(h, [p, arguments]);
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
function c() {
|
|
982
|
+
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
983
|
+
}
|
|
984
|
+
function u(p) {
|
|
985
|
+
return p === "debug" && (p = "log"), typeof console === n ? !1 : p === "trace" && r ? c : console[p] !== void 0 ? a(console, p) : console.log !== void 0 ? a(console, "log") : t;
|
|
986
|
+
}
|
|
987
|
+
function l() {
|
|
988
|
+
for (var p = this.getLevel(), g = 0; g < i.length; g++) {
|
|
989
|
+
var h = i[g];
|
|
990
|
+
this[h] = g < p ? t : this.methodFactory(h, p, this.name);
|
|
991
|
+
}
|
|
992
|
+
if (this.log = this.debug, typeof console === n && p < this.levels.SILENT)
|
|
993
|
+
return "No console available for logging";
|
|
994
|
+
}
|
|
995
|
+
function f(p) {
|
|
996
|
+
return function() {
|
|
997
|
+
typeof console !== n && (l.call(this), this[p].apply(this, arguments));
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
function v(p, g, h) {
|
|
1001
|
+
return u(p) || f.apply(this, arguments);
|
|
1002
|
+
}
|
|
1003
|
+
function d(p, g) {
|
|
1004
|
+
var h = this, x, E, _, b = "loglevel";
|
|
1005
|
+
typeof p == "string" ? b += ":" + p : typeof p == "symbol" && (b = void 0);
|
|
1006
|
+
function S(T) {
|
|
1007
|
+
var P = (i[T] || "silent").toUpperCase();
|
|
1008
|
+
if (!(typeof window === n || !b)) {
|
|
1009
|
+
try {
|
|
1010
|
+
window.localStorage[b] = P;
|
|
1011
|
+
return;
|
|
1012
|
+
} catch {
|
|
1013
|
+
}
|
|
1014
|
+
try {
|
|
1015
|
+
window.document.cookie = encodeURIComponent(b) + "=" + P + ";";
|
|
1016
|
+
} catch {
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
function C() {
|
|
1021
|
+
var T;
|
|
1022
|
+
if (!(typeof window === n || !b)) {
|
|
1023
|
+
try {
|
|
1024
|
+
T = window.localStorage[b];
|
|
1025
|
+
} catch {
|
|
1026
|
+
}
|
|
1027
|
+
if (typeof T === n)
|
|
1028
|
+
try {
|
|
1029
|
+
var P = window.document.cookie, j = encodeURIComponent(b), k = P.indexOf(j + "=");
|
|
1030
|
+
k !== -1 && (T = /^([^;]+)/.exec(
|
|
1031
|
+
P.slice(k + j.length + 1)
|
|
1032
|
+
)[1]);
|
|
1033
|
+
} catch {
|
|
1034
|
+
}
|
|
1035
|
+
return h.levels[T] === void 0 && (T = void 0), T;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
function M() {
|
|
1039
|
+
if (!(typeof window === n || !b)) {
|
|
1040
|
+
try {
|
|
1041
|
+
window.localStorage.removeItem(b);
|
|
1042
|
+
} catch {
|
|
1043
|
+
}
|
|
1044
|
+
try {
|
|
1045
|
+
window.document.cookie = encodeURIComponent(b) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
1046
|
+
} catch {
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
function R(T) {
|
|
1051
|
+
var P = T;
|
|
1052
|
+
if (typeof P == "string" && h.levels[P.toUpperCase()] !== void 0 && (P = h.levels[P.toUpperCase()]), typeof P == "number" && P >= 0 && P <= h.levels.SILENT)
|
|
1053
|
+
return P;
|
|
1054
|
+
throw new TypeError("log.setLevel() called with invalid level: " + T);
|
|
1055
|
+
}
|
|
1056
|
+
h.name = p, h.levels = {
|
|
1057
|
+
TRACE: 0,
|
|
1058
|
+
DEBUG: 1,
|
|
1059
|
+
INFO: 2,
|
|
1060
|
+
WARN: 3,
|
|
1061
|
+
ERROR: 4,
|
|
1062
|
+
SILENT: 5
|
|
1063
|
+
}, h.methodFactory = g || v, h.getLevel = function() {
|
|
1064
|
+
return _ ?? E ?? x;
|
|
1065
|
+
}, h.setLevel = function(T, P) {
|
|
1066
|
+
return _ = R(T), P !== !1 && S(_), l.call(h);
|
|
1067
|
+
}, h.setDefaultLevel = function(T) {
|
|
1068
|
+
E = R(T), C() || h.setLevel(T, !1);
|
|
1069
|
+
}, h.resetLevel = function() {
|
|
1070
|
+
_ = null, M(), l.call(h);
|
|
1071
|
+
}, h.enableAll = function(T) {
|
|
1072
|
+
h.setLevel(h.levels.TRACE, T);
|
|
1073
|
+
}, h.disableAll = function(T) {
|
|
1074
|
+
h.setLevel(h.levels.SILENT, T);
|
|
1075
|
+
}, h.rebuild = function() {
|
|
1076
|
+
if (s !== h && (x = R(s.getLevel())), l.call(h), s === h)
|
|
1077
|
+
for (var T in o)
|
|
1078
|
+
o[T].rebuild();
|
|
1079
|
+
}, x = R(
|
|
1080
|
+
s ? s.getLevel() : "WARN"
|
|
1081
|
+
);
|
|
1082
|
+
var W = C();
|
|
1083
|
+
W != null && (_ = R(W)), l.call(h);
|
|
1084
|
+
}
|
|
1085
|
+
s = new d(), s.getLogger = function(g) {
|
|
1086
|
+
if (typeof g != "symbol" && typeof g != "string" || g === "")
|
|
1087
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
1088
|
+
var h = o[g];
|
|
1089
|
+
return h || (h = o[g] = new d(
|
|
1090
|
+
g,
|
|
1091
|
+
s.methodFactory
|
|
1092
|
+
)), h;
|
|
1093
|
+
};
|
|
1094
|
+
var m = typeof window !== n ? window.log : void 0;
|
|
1095
|
+
return s.noConflict = function() {
|
|
1096
|
+
return typeof window !== n && window.log === s && (window.log = m), s;
|
|
1097
|
+
}, s.getLoggers = function() {
|
|
1098
|
+
return o;
|
|
1099
|
+
}, s.default = s, s;
|
|
1100
|
+
});
|
|
1101
|
+
})(Fe)), Fe.exports;
|
|
1102
|
+
}
|
|
1103
|
+
var Gr = Kr();
|
|
1104
|
+
const Qr = /* @__PURE__ */ Yr(Gr);
|
|
1105
|
+
var ft = function(e, t) {
|
|
1106
|
+
return ft = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
1107
|
+
n.__proto__ = r;
|
|
1108
|
+
} || function(n, r) {
|
|
1109
|
+
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
|
|
1110
|
+
}, ft(e, t);
|
|
1111
|
+
};
|
|
1112
|
+
function oe(e, t) {
|
|
1113
|
+
if (typeof t != "function" && t !== null)
|
|
1114
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
1115
|
+
ft(e, t);
|
|
1116
|
+
function n() {
|
|
1117
|
+
this.constructor = e;
|
|
1118
|
+
}
|
|
1119
|
+
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
1120
|
+
}
|
|
1121
|
+
function Jr(e, t, n, r) {
|
|
1122
|
+
function i(o) {
|
|
1123
|
+
return o instanceof n ? o : new n(function(s) {
|
|
1124
|
+
s(o);
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
return new (n || (n = Promise))(function(o, s) {
|
|
1128
|
+
function a(l) {
|
|
1129
|
+
try {
|
|
1130
|
+
u(r.next(l));
|
|
1131
|
+
} catch (f) {
|
|
1132
|
+
s(f);
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
function c(l) {
|
|
1136
|
+
try {
|
|
1137
|
+
u(r.throw(l));
|
|
1138
|
+
} catch (f) {
|
|
1139
|
+
s(f);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
function u(l) {
|
|
1143
|
+
l.done ? o(l.value) : i(l.value).then(a, c);
|
|
1144
|
+
}
|
|
1145
|
+
u((r = r.apply(e, t || [])).next());
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
function fn(e, t) {
|
|
1149
|
+
var n = { label: 0, sent: function() {
|
|
1150
|
+
if (o[0] & 1) throw o[1];
|
|
1151
|
+
return o[1];
|
|
1152
|
+
}, trys: [], ops: [] }, r, i, o, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
1153
|
+
return s.next = a(0), s.throw = a(1), s.return = a(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
1154
|
+
return this;
|
|
1155
|
+
}), s;
|
|
1156
|
+
function a(u) {
|
|
1157
|
+
return function(l) {
|
|
1158
|
+
return c([u, l]);
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
function c(u) {
|
|
1162
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
1163
|
+
for (; s && (s = 0, u[0] && (n = 0)), n; ) try {
|
|
1164
|
+
if (r = 1, i && (o = u[0] & 2 ? i.return : u[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, u[1])).done) return o;
|
|
1165
|
+
switch (i = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
|
|
1166
|
+
case 0:
|
|
1167
|
+
case 1:
|
|
1168
|
+
o = u;
|
|
1169
|
+
break;
|
|
1170
|
+
case 4:
|
|
1171
|
+
return n.label++, { value: u[1], done: !1 };
|
|
1172
|
+
case 5:
|
|
1173
|
+
n.label++, i = u[1], u = [0];
|
|
1174
|
+
continue;
|
|
1175
|
+
case 7:
|
|
1176
|
+
u = n.ops.pop(), n.trys.pop();
|
|
1177
|
+
continue;
|
|
1178
|
+
default:
|
|
1179
|
+
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
1180
|
+
n = 0;
|
|
1181
|
+
continue;
|
|
1182
|
+
}
|
|
1183
|
+
if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
|
|
1184
|
+
n.label = u[1];
|
|
1185
|
+
break;
|
|
1186
|
+
}
|
|
1187
|
+
if (u[0] === 6 && n.label < o[1]) {
|
|
1188
|
+
n.label = o[1], o = u;
|
|
1189
|
+
break;
|
|
1190
|
+
}
|
|
1191
|
+
if (o && n.label < o[2]) {
|
|
1192
|
+
n.label = o[2], n.ops.push(u);
|
|
1193
|
+
break;
|
|
1194
|
+
}
|
|
1195
|
+
o[2] && n.ops.pop(), n.trys.pop();
|
|
1196
|
+
continue;
|
|
1197
|
+
}
|
|
1198
|
+
u = t.call(e, n);
|
|
1199
|
+
} catch (l) {
|
|
1200
|
+
u = [6, l], i = 0;
|
|
1201
|
+
} finally {
|
|
1202
|
+
r = o = 0;
|
|
1203
|
+
}
|
|
1204
|
+
if (u[0] & 5) throw u[1];
|
|
1205
|
+
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
function we(e) {
|
|
1209
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
1210
|
+
if (n) return n.call(e);
|
|
1211
|
+
if (e && typeof e.length == "number") return {
|
|
1212
|
+
next: function() {
|
|
1213
|
+
return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1217
|
+
}
|
|
1218
|
+
function he(e, t) {
|
|
1219
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1220
|
+
if (!n) return e;
|
|
1221
|
+
var r = n.call(e), i, o = [], s;
|
|
1222
|
+
try {
|
|
1223
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; ) o.push(i.value);
|
|
1224
|
+
} catch (a) {
|
|
1225
|
+
s = { error: a };
|
|
1226
|
+
} finally {
|
|
1227
|
+
try {
|
|
1228
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
1229
|
+
} finally {
|
|
1230
|
+
if (s) throw s.error;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
return o;
|
|
1234
|
+
}
|
|
1235
|
+
function xe(e, t, n) {
|
|
1236
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, o; r < i; r++)
|
|
1237
|
+
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
1238
|
+
return e.concat(o || Array.prototype.slice.call(t));
|
|
1239
|
+
}
|
|
1240
|
+
function ge(e) {
|
|
1241
|
+
return this instanceof ge ? (this.v = e, this) : new ge(e);
|
|
1242
|
+
}
|
|
1243
|
+
function Xr(e, t, n) {
|
|
1244
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1245
|
+
var r = n.apply(e, t || []), i, o = [];
|
|
1246
|
+
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), a("next"), a("throw"), a("return", s), i[Symbol.asyncIterator] = function() {
|
|
1247
|
+
return this;
|
|
1248
|
+
}, i;
|
|
1249
|
+
function s(d) {
|
|
1250
|
+
return function(m) {
|
|
1251
|
+
return Promise.resolve(m).then(d, f);
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
function a(d, m) {
|
|
1255
|
+
r[d] && (i[d] = function(p) {
|
|
1256
|
+
return new Promise(function(g, h) {
|
|
1257
|
+
o.push([d, p, g, h]) > 1 || c(d, p);
|
|
1258
|
+
});
|
|
1259
|
+
}, m && (i[d] = m(i[d])));
|
|
1260
|
+
}
|
|
1261
|
+
function c(d, m) {
|
|
1262
|
+
try {
|
|
1263
|
+
u(r[d](m));
|
|
1264
|
+
} catch (p) {
|
|
1265
|
+
v(o[0][3], p);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
function u(d) {
|
|
1269
|
+
d.value instanceof ge ? Promise.resolve(d.value.v).then(l, f) : v(o[0][2], d);
|
|
1270
|
+
}
|
|
1271
|
+
function l(d) {
|
|
1272
|
+
c("next", d);
|
|
1273
|
+
}
|
|
1274
|
+
function f(d) {
|
|
1275
|
+
c("throw", d);
|
|
1276
|
+
}
|
|
1277
|
+
function v(d, m) {
|
|
1278
|
+
d(m), o.shift(), o.length && c(o[0][0], o[0][1]);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
function Zr(e) {
|
|
1282
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1283
|
+
var t = e[Symbol.asyncIterator], n;
|
|
1284
|
+
return t ? t.call(e) : (e = typeof we == "function" ? we(e) : e[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
|
|
1285
|
+
return this;
|
|
1286
|
+
}, n);
|
|
1287
|
+
function r(o) {
|
|
1288
|
+
n[o] = e[o] && function(s) {
|
|
1289
|
+
return new Promise(function(a, c) {
|
|
1290
|
+
s = e[o](s), i(a, c, s.done, s.value);
|
|
1291
|
+
});
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
function i(o, s, a, c) {
|
|
1295
|
+
Promise.resolve(c).then(function(u) {
|
|
1296
|
+
o({ value: u, done: a });
|
|
1297
|
+
}, s);
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
function O(e) {
|
|
1301
|
+
return typeof e == "function";
|
|
1302
|
+
}
|
|
1303
|
+
function yt(e) {
|
|
1304
|
+
var t = function(r) {
|
|
1305
|
+
Error.call(r), r.stack = new Error().stack;
|
|
1306
|
+
}, n = e(t);
|
|
1307
|
+
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
|
1308
|
+
}
|
|
1309
|
+
var it = yt(function(e) {
|
|
1310
|
+
return function(n) {
|
|
1311
|
+
e(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
|
1312
|
+
` + n.map(function(r, i) {
|
|
1313
|
+
return i + 1 + ") " + r.toString();
|
|
1314
|
+
}).join(`
|
|
1315
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
|
1316
|
+
};
|
|
1317
|
+
});
|
|
1318
|
+
function Ve(e, t) {
|
|
1319
|
+
if (e) {
|
|
1320
|
+
var n = e.indexOf(t);
|
|
1321
|
+
0 <= n && e.splice(n, 1);
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
var Le = (function() {
|
|
1325
|
+
function e(t) {
|
|
1326
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
1327
|
+
}
|
|
1328
|
+
return e.prototype.unsubscribe = function() {
|
|
1329
|
+
var t, n, r, i, o;
|
|
1330
|
+
if (!this.closed) {
|
|
1331
|
+
this.closed = !0;
|
|
1332
|
+
var s = this._parentage;
|
|
1333
|
+
if (s)
|
|
1334
|
+
if (this._parentage = null, Array.isArray(s))
|
|
1335
|
+
try {
|
|
1336
|
+
for (var a = we(s), c = a.next(); !c.done; c = a.next()) {
|
|
1337
|
+
var u = c.value;
|
|
1338
|
+
u.remove(this);
|
|
1339
|
+
}
|
|
1340
|
+
} catch (p) {
|
|
1341
|
+
t = { error: p };
|
|
1342
|
+
} finally {
|
|
1343
|
+
try {
|
|
1344
|
+
c && !c.done && (n = a.return) && n.call(a);
|
|
1345
|
+
} finally {
|
|
1346
|
+
if (t) throw t.error;
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
else
|
|
1350
|
+
s.remove(this);
|
|
1351
|
+
var l = this.initialTeardown;
|
|
1352
|
+
if (O(l))
|
|
1353
|
+
try {
|
|
1354
|
+
l();
|
|
1355
|
+
} catch (p) {
|
|
1356
|
+
o = p instanceof it ? p.errors : [p];
|
|
1357
|
+
}
|
|
1358
|
+
var f = this._finalizers;
|
|
1359
|
+
if (f) {
|
|
1360
|
+
this._finalizers = null;
|
|
1361
|
+
try {
|
|
1362
|
+
for (var v = we(f), d = v.next(); !d.done; d = v.next()) {
|
|
1363
|
+
var m = d.value;
|
|
1364
|
+
try {
|
|
1365
|
+
Dt(m);
|
|
1366
|
+
} catch (p) {
|
|
1367
|
+
o = o ?? [], p instanceof it ? o = xe(xe([], he(o)), he(p.errors)) : o.push(p);
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
} catch (p) {
|
|
1371
|
+
r = { error: p };
|
|
1372
|
+
} finally {
|
|
1373
|
+
try {
|
|
1374
|
+
d && !d.done && (i = v.return) && i.call(v);
|
|
1375
|
+
} finally {
|
|
1376
|
+
if (r) throw r.error;
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
if (o)
|
|
1381
|
+
throw new it(o);
|
|
1382
|
+
}
|
|
1383
|
+
}, e.prototype.add = function(t) {
|
|
1384
|
+
var n;
|
|
1385
|
+
if (t && t !== this)
|
|
1386
|
+
if (this.closed)
|
|
1387
|
+
Dt(t);
|
|
1388
|
+
else {
|
|
1389
|
+
if (t instanceof e) {
|
|
1390
|
+
if (t.closed || t._hasParent(this))
|
|
1391
|
+
return;
|
|
1392
|
+
t._addParent(this);
|
|
1393
|
+
}
|
|
1394
|
+
(this._finalizers = (n = this._finalizers) !== null && n !== void 0 ? n : []).push(t);
|
|
1395
|
+
}
|
|
1396
|
+
}, e.prototype._hasParent = function(t) {
|
|
1397
|
+
var n = this._parentage;
|
|
1398
|
+
return n === t || Array.isArray(n) && n.includes(t);
|
|
1399
|
+
}, e.prototype._addParent = function(t) {
|
|
1400
|
+
var n = this._parentage;
|
|
1401
|
+
this._parentage = Array.isArray(n) ? (n.push(t), n) : n ? [n, t] : t;
|
|
1402
|
+
}, e.prototype._removeParent = function(t) {
|
|
1403
|
+
var n = this._parentage;
|
|
1404
|
+
n === t ? this._parentage = null : Array.isArray(n) && Ve(n, t);
|
|
1405
|
+
}, e.prototype.remove = function(t) {
|
|
1406
|
+
var n = this._finalizers;
|
|
1407
|
+
n && Ve(n, t), t instanceof e && t._removeParent(this);
|
|
1408
|
+
}, e.EMPTY = (function() {
|
|
1409
|
+
var t = new e();
|
|
1410
|
+
return t.closed = !0, t;
|
|
1411
|
+
})(), e;
|
|
1412
|
+
})(), dn = Le.EMPTY;
|
|
1413
|
+
function pn(e) {
|
|
1414
|
+
return e instanceof Le || e && "closed" in e && O(e.remove) && O(e.add) && O(e.unsubscribe);
|
|
1415
|
+
}
|
|
1416
|
+
function Dt(e) {
|
|
1417
|
+
O(e) ? e() : e.unsubscribe();
|
|
1418
|
+
}
|
|
1419
|
+
var ei = {
|
|
1420
|
+
Promise: void 0
|
|
1421
|
+
}, ti = {
|
|
1422
|
+
setTimeout: function(e, t) {
|
|
1423
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
1424
|
+
n[r - 2] = arguments[r];
|
|
1425
|
+
return setTimeout.apply(void 0, xe([e, t], he(n)));
|
|
1426
|
+
},
|
|
1427
|
+
clearTimeout: function(e) {
|
|
1428
|
+
return clearTimeout(e);
|
|
1429
|
+
},
|
|
1430
|
+
delegate: void 0
|
|
1431
|
+
};
|
|
1432
|
+
function hn(e) {
|
|
1433
|
+
ti.setTimeout(function() {
|
|
1434
|
+
throw e;
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
function He() {
|
|
1438
|
+
}
|
|
1439
|
+
function Ne(e) {
|
|
1440
|
+
e();
|
|
1441
|
+
}
|
|
1442
|
+
var wt = (function(e) {
|
|
1443
|
+
oe(t, e);
|
|
1444
|
+
function t(n) {
|
|
1445
|
+
var r = e.call(this) || this;
|
|
1446
|
+
return r.isStopped = !1, n ? (r.destination = n, pn(n) && n.add(r)) : r.destination = ii, r;
|
|
1447
|
+
}
|
|
1448
|
+
return t.create = function(n, r, i) {
|
|
1449
|
+
return new Oe(n, r, i);
|
|
1450
|
+
}, t.prototype.next = function(n) {
|
|
1451
|
+
this.isStopped || this._next(n);
|
|
1452
|
+
}, t.prototype.error = function(n) {
|
|
1453
|
+
this.isStopped || (this.isStopped = !0, this._error(n));
|
|
1454
|
+
}, t.prototype.complete = function() {
|
|
1455
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
|
1456
|
+
}, t.prototype.unsubscribe = function() {
|
|
1457
|
+
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
|
|
1458
|
+
}, t.prototype._next = function(n) {
|
|
1459
|
+
this.destination.next(n);
|
|
1460
|
+
}, t.prototype._error = function(n) {
|
|
1461
|
+
try {
|
|
1462
|
+
this.destination.error(n);
|
|
1463
|
+
} finally {
|
|
1464
|
+
this.unsubscribe();
|
|
1465
|
+
}
|
|
1466
|
+
}, t.prototype._complete = function() {
|
|
1467
|
+
try {
|
|
1468
|
+
this.destination.complete();
|
|
1469
|
+
} finally {
|
|
1470
|
+
this.unsubscribe();
|
|
1471
|
+
}
|
|
1472
|
+
}, t;
|
|
1473
|
+
})(Le), ni = (function() {
|
|
1474
|
+
function e(t) {
|
|
1475
|
+
this.partialObserver = t;
|
|
1476
|
+
}
|
|
1477
|
+
return e.prototype.next = function(t) {
|
|
1478
|
+
var n = this.partialObserver;
|
|
1479
|
+
if (n.next)
|
|
1480
|
+
try {
|
|
1481
|
+
n.next(t);
|
|
1482
|
+
} catch (r) {
|
|
1483
|
+
Me(r);
|
|
1484
|
+
}
|
|
1485
|
+
}, e.prototype.error = function(t) {
|
|
1486
|
+
var n = this.partialObserver;
|
|
1487
|
+
if (n.error)
|
|
1488
|
+
try {
|
|
1489
|
+
n.error(t);
|
|
1490
|
+
} catch (r) {
|
|
1491
|
+
Me(r);
|
|
1492
|
+
}
|
|
1493
|
+
else
|
|
1494
|
+
Me(t);
|
|
1495
|
+
}, e.prototype.complete = function() {
|
|
1496
|
+
var t = this.partialObserver;
|
|
1497
|
+
if (t.complete)
|
|
1498
|
+
try {
|
|
1499
|
+
t.complete();
|
|
1500
|
+
} catch (n) {
|
|
1501
|
+
Me(n);
|
|
1502
|
+
}
|
|
1503
|
+
}, e;
|
|
1504
|
+
})(), Oe = (function(e) {
|
|
1505
|
+
oe(t, e);
|
|
1506
|
+
function t(n, r, i) {
|
|
1507
|
+
var o = e.call(this) || this, s;
|
|
1508
|
+
return O(n) || !n ? s = {
|
|
1509
|
+
next: n ?? void 0,
|
|
1510
|
+
error: r ?? void 0,
|
|
1511
|
+
complete: i ?? void 0
|
|
1512
|
+
} : s = n, o.destination = new ni(s), o;
|
|
1513
|
+
}
|
|
1514
|
+
return t;
|
|
1515
|
+
})(wt);
|
|
1516
|
+
function Me(e) {
|
|
1517
|
+
hn(e);
|
|
1518
|
+
}
|
|
1519
|
+
function ri(e) {
|
|
1520
|
+
throw e;
|
|
1521
|
+
}
|
|
1522
|
+
var ii = {
|
|
1523
|
+
closed: !0,
|
|
1524
|
+
next: He,
|
|
1525
|
+
error: ri,
|
|
1526
|
+
complete: He
|
|
1527
|
+
}, xt = (function() {
|
|
1528
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
1529
|
+
})();
|
|
1530
|
+
function et(e) {
|
|
1531
|
+
return e;
|
|
1532
|
+
}
|
|
1533
|
+
function oi(e) {
|
|
1534
|
+
return e.length === 0 ? et : e.length === 1 ? e[0] : function(n) {
|
|
1535
|
+
return e.reduce(function(r, i) {
|
|
1536
|
+
return i(r);
|
|
1537
|
+
}, n);
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
var L = (function() {
|
|
1541
|
+
function e(t) {
|
|
1542
|
+
t && (this._subscribe = t);
|
|
1543
|
+
}
|
|
1544
|
+
return e.prototype.lift = function(t) {
|
|
1545
|
+
var n = new e();
|
|
1546
|
+
return n.source = this, n.operator = t, n;
|
|
1547
|
+
}, e.prototype.subscribe = function(t, n, r) {
|
|
1548
|
+
var i = this, o = ai(t) ? t : new Oe(t, n, r);
|
|
1549
|
+
return Ne(function() {
|
|
1550
|
+
var s = i, a = s.operator, c = s.source;
|
|
1551
|
+
o.add(a ? a.call(o, c) : c ? i._subscribe(o) : i._trySubscribe(o));
|
|
1552
|
+
}), o;
|
|
1553
|
+
}, e.prototype._trySubscribe = function(t) {
|
|
1554
|
+
try {
|
|
1555
|
+
return this._subscribe(t);
|
|
1556
|
+
} catch (n) {
|
|
1557
|
+
t.error(n);
|
|
1558
|
+
}
|
|
1559
|
+
}, e.prototype.forEach = function(t, n) {
|
|
1560
|
+
var r = this;
|
|
1561
|
+
return n = Ft(n), new n(function(i, o) {
|
|
1562
|
+
var s = new Oe({
|
|
1563
|
+
next: function(a) {
|
|
1564
|
+
try {
|
|
1565
|
+
t(a);
|
|
1566
|
+
} catch (c) {
|
|
1567
|
+
o(c), s.unsubscribe();
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
error: o,
|
|
1571
|
+
complete: i
|
|
1572
|
+
});
|
|
1573
|
+
r.subscribe(s);
|
|
1574
|
+
});
|
|
1575
|
+
}, e.prototype._subscribe = function(t) {
|
|
1576
|
+
var n;
|
|
1577
|
+
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t);
|
|
1578
|
+
}, e.prototype[xt] = function() {
|
|
1579
|
+
return this;
|
|
1580
|
+
}, e.prototype.pipe = function() {
|
|
1581
|
+
for (var t = [], n = 0; n < arguments.length; n++)
|
|
1582
|
+
t[n] = arguments[n];
|
|
1583
|
+
return oi(t)(this);
|
|
1584
|
+
}, e.prototype.toPromise = function(t) {
|
|
1585
|
+
var n = this;
|
|
1586
|
+
return t = Ft(t), new t(function(r, i) {
|
|
1587
|
+
var o;
|
|
1588
|
+
n.subscribe(function(s) {
|
|
1589
|
+
return o = s;
|
|
1590
|
+
}, function(s) {
|
|
1591
|
+
return i(s);
|
|
1592
|
+
}, function() {
|
|
1593
|
+
return r(o);
|
|
1594
|
+
});
|
|
1595
|
+
});
|
|
1596
|
+
}, e.create = function(t) {
|
|
1597
|
+
return new e(t);
|
|
1598
|
+
}, e;
|
|
1599
|
+
})();
|
|
1600
|
+
function Ft(e) {
|
|
1601
|
+
var t;
|
|
1602
|
+
return (t = e ?? ei.Promise) !== null && t !== void 0 ? t : Promise;
|
|
1603
|
+
}
|
|
1604
|
+
function si(e) {
|
|
1605
|
+
return e && O(e.next) && O(e.error) && O(e.complete);
|
|
1606
|
+
}
|
|
1607
|
+
function ai(e) {
|
|
1608
|
+
return e && e instanceof wt || si(e) && pn(e);
|
|
1609
|
+
}
|
|
1610
|
+
function ci(e) {
|
|
1611
|
+
return O(e == null ? void 0 : e.lift);
|
|
1612
|
+
}
|
|
1613
|
+
function B(e) {
|
|
1614
|
+
return function(t) {
|
|
1615
|
+
if (ci(t))
|
|
1616
|
+
return t.lift(function(n) {
|
|
1617
|
+
try {
|
|
1618
|
+
return e(n, this);
|
|
1619
|
+
} catch (r) {
|
|
1620
|
+
this.error(r);
|
|
1621
|
+
}
|
|
1622
|
+
});
|
|
1623
|
+
throw new TypeError("Unable to lift unknown Observable type");
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
function z(e, t, n, r, i) {
|
|
1627
|
+
return new ui(e, t, n, r, i);
|
|
1628
|
+
}
|
|
1629
|
+
var ui = (function(e) {
|
|
1630
|
+
oe(t, e);
|
|
1631
|
+
function t(n, r, i, o, s, a) {
|
|
1632
|
+
var c = e.call(this, n) || this;
|
|
1633
|
+
return c.onFinalize = s, c.shouldUnsubscribe = a, c._next = r ? function(u) {
|
|
1634
|
+
try {
|
|
1635
|
+
r(u);
|
|
1636
|
+
} catch (l) {
|
|
1637
|
+
n.error(l);
|
|
1638
|
+
}
|
|
1639
|
+
} : e.prototype._next, c._error = o ? function(u) {
|
|
1640
|
+
try {
|
|
1641
|
+
o(u);
|
|
1642
|
+
} catch (l) {
|
|
1643
|
+
n.error(l);
|
|
1644
|
+
} finally {
|
|
1645
|
+
this.unsubscribe();
|
|
1646
|
+
}
|
|
1647
|
+
} : e.prototype._error, c._complete = i ? function() {
|
|
1648
|
+
try {
|
|
1649
|
+
i();
|
|
1650
|
+
} catch (u) {
|
|
1651
|
+
n.error(u);
|
|
1652
|
+
} finally {
|
|
1653
|
+
this.unsubscribe();
|
|
1654
|
+
}
|
|
1655
|
+
} : e.prototype._complete, c;
|
|
1656
|
+
}
|
|
1657
|
+
return t.prototype.unsubscribe = function() {
|
|
1658
|
+
var n;
|
|
1659
|
+
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
1660
|
+
var r = this.closed;
|
|
1661
|
+
e.prototype.unsubscribe.call(this), !r && ((n = this.onFinalize) === null || n === void 0 || n.call(this));
|
|
1662
|
+
}
|
|
1663
|
+
}, t;
|
|
1664
|
+
})(wt), li = yt(function(e) {
|
|
1665
|
+
return function() {
|
|
1666
|
+
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
1667
|
+
};
|
|
1668
|
+
}), ie = (function(e) {
|
|
1669
|
+
oe(t, e);
|
|
1670
|
+
function t() {
|
|
1671
|
+
var n = e.call(this) || this;
|
|
1672
|
+
return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
|
|
1673
|
+
}
|
|
1674
|
+
return t.prototype.lift = function(n) {
|
|
1675
|
+
var r = new Nt(this, this);
|
|
1676
|
+
return r.operator = n, r;
|
|
1677
|
+
}, t.prototype._throwIfClosed = function() {
|
|
1678
|
+
if (this.closed)
|
|
1679
|
+
throw new li();
|
|
1680
|
+
}, t.prototype.next = function(n) {
|
|
1681
|
+
var r = this;
|
|
1682
|
+
Ne(function() {
|
|
1683
|
+
var i, o;
|
|
1684
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
1685
|
+
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
|
1686
|
+
try {
|
|
1687
|
+
for (var s = we(r.currentObservers), a = s.next(); !a.done; a = s.next()) {
|
|
1688
|
+
var c = a.value;
|
|
1689
|
+
c.next(n);
|
|
1690
|
+
}
|
|
1691
|
+
} catch (u) {
|
|
1692
|
+
i = { error: u };
|
|
1693
|
+
} finally {
|
|
1694
|
+
try {
|
|
1695
|
+
a && !a.done && (o = s.return) && o.call(s);
|
|
1696
|
+
} finally {
|
|
1697
|
+
if (i) throw i.error;
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
});
|
|
1702
|
+
}, t.prototype.error = function(n) {
|
|
1703
|
+
var r = this;
|
|
1704
|
+
Ne(function() {
|
|
1705
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
|
1706
|
+
r.hasError = r.isStopped = !0, r.thrownError = n;
|
|
1707
|
+
for (var i = r.observers; i.length; )
|
|
1708
|
+
i.shift().error(n);
|
|
1709
|
+
}
|
|
1710
|
+
});
|
|
1711
|
+
}, t.prototype.complete = function() {
|
|
1712
|
+
var n = this;
|
|
1713
|
+
Ne(function() {
|
|
1714
|
+
if (n._throwIfClosed(), !n.isStopped) {
|
|
1715
|
+
n.isStopped = !0;
|
|
1716
|
+
for (var r = n.observers; r.length; )
|
|
1717
|
+
r.shift().complete();
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
}, t.prototype.unsubscribe = function() {
|
|
1721
|
+
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
|
1722
|
+
}, Object.defineProperty(t.prototype, "observed", {
|
|
1723
|
+
get: function() {
|
|
1724
|
+
var n;
|
|
1725
|
+
return ((n = this.observers) === null || n === void 0 ? void 0 : n.length) > 0;
|
|
1726
|
+
},
|
|
1727
|
+
enumerable: !1,
|
|
1728
|
+
configurable: !0
|
|
1729
|
+
}), t.prototype._trySubscribe = function(n) {
|
|
1730
|
+
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, n);
|
|
1731
|
+
}, t.prototype._subscribe = function(n) {
|
|
1732
|
+
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
|
1733
|
+
}, t.prototype._innerSubscribe = function(n) {
|
|
1734
|
+
var r = this, i = this, o = i.hasError, s = i.isStopped, a = i.observers;
|
|
1735
|
+
return o || s ? dn : (this.currentObservers = null, a.push(n), new Le(function() {
|
|
1736
|
+
r.currentObservers = null, Ve(a, n);
|
|
1737
|
+
}));
|
|
1738
|
+
}, t.prototype._checkFinalizedStatuses = function(n) {
|
|
1739
|
+
var r = this, i = r.hasError, o = r.thrownError, s = r.isStopped;
|
|
1740
|
+
i ? n.error(o) : s && n.complete();
|
|
1741
|
+
}, t.prototype.asObservable = function() {
|
|
1742
|
+
var n = new L();
|
|
1743
|
+
return n.source = this, n;
|
|
1744
|
+
}, t.create = function(n, r) {
|
|
1745
|
+
return new Nt(n, r);
|
|
1746
|
+
}, t;
|
|
1747
|
+
})(L), Nt = (function(e) {
|
|
1748
|
+
oe(t, e);
|
|
1749
|
+
function t(n, r) {
|
|
1750
|
+
var i = e.call(this) || this;
|
|
1751
|
+
return i.destination = n, i.source = r, i;
|
|
1752
|
+
}
|
|
1753
|
+
return t.prototype.next = function(n) {
|
|
1754
|
+
var r, i;
|
|
1755
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.next) === null || i === void 0 || i.call(r, n);
|
|
1756
|
+
}, t.prototype.error = function(n) {
|
|
1757
|
+
var r, i;
|
|
1758
|
+
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.error) === null || i === void 0 || i.call(r, n);
|
|
1759
|
+
}, t.prototype.complete = function() {
|
|
1760
|
+
var n, r;
|
|
1761
|
+
(r = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || r === void 0 || r.call(n);
|
|
1762
|
+
}, t.prototype._subscribe = function(n) {
|
|
1763
|
+
var r, i;
|
|
1764
|
+
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(n)) !== null && i !== void 0 ? i : dn;
|
|
1765
|
+
}, t;
|
|
1766
|
+
})(ie), vn = (function(e) {
|
|
1767
|
+
oe(t, e);
|
|
1768
|
+
function t(n) {
|
|
1769
|
+
var r = e.call(this) || this;
|
|
1770
|
+
return r._value = n, r;
|
|
1771
|
+
}
|
|
1772
|
+
return Object.defineProperty(t.prototype, "value", {
|
|
1773
|
+
get: function() {
|
|
1774
|
+
return this.getValue();
|
|
1775
|
+
},
|
|
1776
|
+
enumerable: !1,
|
|
1777
|
+
configurable: !0
|
|
1778
|
+
}), t.prototype._subscribe = function(n) {
|
|
1779
|
+
var r = e.prototype._subscribe.call(this, n);
|
|
1780
|
+
return !r.closed && n.next(this._value), r;
|
|
1781
|
+
}, t.prototype.getValue = function() {
|
|
1782
|
+
var n = this, r = n.hasError, i = n.thrownError, o = n._value;
|
|
1783
|
+
if (r)
|
|
1784
|
+
throw i;
|
|
1785
|
+
return this._throwIfClosed(), o;
|
|
1786
|
+
}, t.prototype.next = function(n) {
|
|
1787
|
+
e.prototype.next.call(this, this._value = n);
|
|
1788
|
+
}, t;
|
|
1789
|
+
})(ie), fi = {
|
|
1790
|
+
now: function() {
|
|
1791
|
+
return Date.now();
|
|
1792
|
+
}
|
|
1793
|
+
}, di = (function(e) {
|
|
1794
|
+
oe(t, e);
|
|
1795
|
+
function t(n, r) {
|
|
1796
|
+
return e.call(this) || this;
|
|
1797
|
+
}
|
|
1798
|
+
return t.prototype.schedule = function(n, r) {
|
|
1799
|
+
return this;
|
|
1800
|
+
}, t;
|
|
1801
|
+
})(Le), $t = {
|
|
1802
|
+
setInterval: function(e, t) {
|
|
1803
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
1804
|
+
n[r - 2] = arguments[r];
|
|
1805
|
+
return setInterval.apply(void 0, xe([e, t], he(n)));
|
|
1806
|
+
},
|
|
1807
|
+
clearInterval: function(e) {
|
|
1808
|
+
return clearInterval(e);
|
|
1809
|
+
},
|
|
1810
|
+
delegate: void 0
|
|
1811
|
+
}, pi = (function(e) {
|
|
1812
|
+
oe(t, e);
|
|
1813
|
+
function t(n, r) {
|
|
1814
|
+
var i = e.call(this, n, r) || this;
|
|
1815
|
+
return i.scheduler = n, i.work = r, i.pending = !1, i;
|
|
1816
|
+
}
|
|
1817
|
+
return t.prototype.schedule = function(n, r) {
|
|
1818
|
+
var i;
|
|
1819
|
+
if (r === void 0 && (r = 0), this.closed)
|
|
1820
|
+
return this;
|
|
1821
|
+
this.state = n;
|
|
1822
|
+
var o = this.id, s = this.scheduler;
|
|
1823
|
+
return o != null && (this.id = this.recycleAsyncId(s, o, r)), this.pending = !0, this.delay = r, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(s, this.id, r), this;
|
|
1824
|
+
}, t.prototype.requestAsyncId = function(n, r, i) {
|
|
1825
|
+
return i === void 0 && (i = 0), $t.setInterval(n.flush.bind(n, this), i);
|
|
1826
|
+
}, t.prototype.recycleAsyncId = function(n, r, i) {
|
|
1827
|
+
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
|
|
1828
|
+
return r;
|
|
1829
|
+
r != null && $t.clearInterval(r);
|
|
1830
|
+
}, t.prototype.execute = function(n, r) {
|
|
1831
|
+
if (this.closed)
|
|
1832
|
+
return new Error("executing a cancelled action");
|
|
1833
|
+
this.pending = !1;
|
|
1834
|
+
var i = this._execute(n, r);
|
|
1835
|
+
if (i)
|
|
1836
|
+
return i;
|
|
1837
|
+
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
|
|
1838
|
+
}, t.prototype._execute = function(n, r) {
|
|
1839
|
+
var i = !1, o;
|
|
1840
|
+
try {
|
|
1841
|
+
this.work(n);
|
|
1842
|
+
} catch (s) {
|
|
1843
|
+
i = !0, o = s || new Error("Scheduled action threw falsy error");
|
|
1844
|
+
}
|
|
1845
|
+
if (i)
|
|
1846
|
+
return this.unsubscribe(), o;
|
|
1847
|
+
}, t.prototype.unsubscribe = function() {
|
|
1848
|
+
if (!this.closed) {
|
|
1849
|
+
var n = this, r = n.id, i = n.scheduler, o = i.actions;
|
|
1850
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, Ve(o, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, e.prototype.unsubscribe.call(this);
|
|
1851
|
+
}
|
|
1852
|
+
}, t;
|
|
1853
|
+
})(di), Ut = (function() {
|
|
1854
|
+
function e(t, n) {
|
|
1855
|
+
n === void 0 && (n = e.now), this.schedulerActionCtor = t, this.now = n;
|
|
1856
|
+
}
|
|
1857
|
+
return e.prototype.schedule = function(t, n, r) {
|
|
1858
|
+
return n === void 0 && (n = 0), new this.schedulerActionCtor(this, t).schedule(r, n);
|
|
1859
|
+
}, e.now = fi.now, e;
|
|
1860
|
+
})(), hi = (function(e) {
|
|
1861
|
+
oe(t, e);
|
|
1862
|
+
function t(n, r) {
|
|
1863
|
+
r === void 0 && (r = Ut.now);
|
|
1864
|
+
var i = e.call(this, n, r) || this;
|
|
1865
|
+
return i.actions = [], i._active = !1, i;
|
|
1866
|
+
}
|
|
1867
|
+
return t.prototype.flush = function(n) {
|
|
1868
|
+
var r = this.actions;
|
|
1869
|
+
if (this._active) {
|
|
1870
|
+
r.push(n);
|
|
1871
|
+
return;
|
|
1872
|
+
}
|
|
1873
|
+
var i;
|
|
1874
|
+
this._active = !0;
|
|
1875
|
+
do
|
|
1876
|
+
if (i = n.execute(n.state, n.delay))
|
|
1877
|
+
break;
|
|
1878
|
+
while (n = r.shift());
|
|
1879
|
+
if (this._active = !1, i) {
|
|
1880
|
+
for (; n = r.shift(); )
|
|
1881
|
+
n.unsubscribe();
|
|
1882
|
+
throw i;
|
|
1883
|
+
}
|
|
1884
|
+
}, t;
|
|
1885
|
+
})(Ut), vi = new hi(pi);
|
|
1886
|
+
function mi(e) {
|
|
1887
|
+
return e && O(e.schedule);
|
|
1888
|
+
}
|
|
1889
|
+
function gi(e) {
|
|
1890
|
+
return e[e.length - 1];
|
|
1891
|
+
}
|
|
1892
|
+
function St(e) {
|
|
1893
|
+
return mi(gi(e)) ? e.pop() : void 0;
|
|
1894
|
+
}
|
|
1895
|
+
var Tt = (function(e) {
|
|
1896
|
+
return e && typeof e.length == "number" && typeof e != "function";
|
|
1897
|
+
});
|
|
1898
|
+
function mn(e) {
|
|
1899
|
+
return O(e == null ? void 0 : e.then);
|
|
1900
|
+
}
|
|
1901
|
+
function gn(e) {
|
|
1902
|
+
return O(e[xt]);
|
|
1903
|
+
}
|
|
1904
|
+
function bn(e) {
|
|
1905
|
+
return Symbol.asyncIterator && O(e == null ? void 0 : e[Symbol.asyncIterator]);
|
|
1906
|
+
}
|
|
1907
|
+
function yn(e) {
|
|
1908
|
+
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.");
|
|
1909
|
+
}
|
|
1910
|
+
function bi() {
|
|
1911
|
+
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
1912
|
+
}
|
|
1913
|
+
var wn = bi();
|
|
1914
|
+
function xn(e) {
|
|
1915
|
+
return O(e == null ? void 0 : e[wn]);
|
|
1916
|
+
}
|
|
1917
|
+
function Sn(e) {
|
|
1918
|
+
return Xr(this, arguments, function() {
|
|
1919
|
+
var n, r, i, o;
|
|
1920
|
+
return fn(this, function(s) {
|
|
1921
|
+
switch (s.label) {
|
|
1922
|
+
case 0:
|
|
1923
|
+
n = e.getReader(), s.label = 1;
|
|
1924
|
+
case 1:
|
|
1925
|
+
s.trys.push([1, , 9, 10]), s.label = 2;
|
|
1926
|
+
case 2:
|
|
1927
|
+
return [4, ge(n.read())];
|
|
1928
|
+
case 3:
|
|
1929
|
+
return r = s.sent(), i = r.value, o = r.done, o ? [4, ge(void 0)] : [3, 5];
|
|
1930
|
+
case 4:
|
|
1931
|
+
return [2, s.sent()];
|
|
1932
|
+
case 5:
|
|
1933
|
+
return [4, ge(i)];
|
|
1934
|
+
case 6:
|
|
1935
|
+
return [4, s.sent()];
|
|
1936
|
+
case 7:
|
|
1937
|
+
return s.sent(), [3, 2];
|
|
1938
|
+
case 8:
|
|
1939
|
+
return [3, 10];
|
|
1940
|
+
case 9:
|
|
1941
|
+
return n.releaseLock(), [7];
|
|
1942
|
+
case 10:
|
|
1943
|
+
return [2];
|
|
1944
|
+
}
|
|
1945
|
+
});
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1948
|
+
function Tn(e) {
|
|
1949
|
+
return O(e == null ? void 0 : e.getReader);
|
|
1950
|
+
}
|
|
1951
|
+
function Q(e) {
|
|
1952
|
+
if (e instanceof L)
|
|
1953
|
+
return e;
|
|
1954
|
+
if (e != null) {
|
|
1955
|
+
if (gn(e))
|
|
1956
|
+
return yi(e);
|
|
1957
|
+
if (Tt(e))
|
|
1958
|
+
return wi(e);
|
|
1959
|
+
if (mn(e))
|
|
1960
|
+
return xi(e);
|
|
1961
|
+
if (bn(e))
|
|
1962
|
+
return En(e);
|
|
1963
|
+
if (xn(e))
|
|
1964
|
+
return Si(e);
|
|
1965
|
+
if (Tn(e))
|
|
1966
|
+
return Ti(e);
|
|
1967
|
+
}
|
|
1968
|
+
throw yn(e);
|
|
1969
|
+
}
|
|
1970
|
+
function yi(e) {
|
|
1971
|
+
return new L(function(t) {
|
|
1972
|
+
var n = e[xt]();
|
|
1973
|
+
if (O(n.subscribe))
|
|
1974
|
+
return n.subscribe(t);
|
|
1975
|
+
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
1976
|
+
});
|
|
1977
|
+
}
|
|
1978
|
+
function wi(e) {
|
|
1979
|
+
return new L(function(t) {
|
|
1980
|
+
for (var n = 0; n < e.length && !t.closed; n++)
|
|
1981
|
+
t.next(e[n]);
|
|
1982
|
+
t.complete();
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
function xi(e) {
|
|
1986
|
+
return new L(function(t) {
|
|
1987
|
+
e.then(function(n) {
|
|
1988
|
+
t.closed || (t.next(n), t.complete());
|
|
1989
|
+
}, function(n) {
|
|
1990
|
+
return t.error(n);
|
|
1991
|
+
}).then(null, hn);
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
function Si(e) {
|
|
1995
|
+
return new L(function(t) {
|
|
1996
|
+
var n, r;
|
|
1997
|
+
try {
|
|
1998
|
+
for (var i = we(e), o = i.next(); !o.done; o = i.next()) {
|
|
1999
|
+
var s = o.value;
|
|
2000
|
+
if (t.next(s), t.closed)
|
|
2001
|
+
return;
|
|
2002
|
+
}
|
|
2003
|
+
} catch (a) {
|
|
2004
|
+
n = { error: a };
|
|
2005
|
+
} finally {
|
|
2006
|
+
try {
|
|
2007
|
+
o && !o.done && (r = i.return) && r.call(i);
|
|
2008
|
+
} finally {
|
|
2009
|
+
if (n) throw n.error;
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
t.complete();
|
|
2013
|
+
});
|
|
2014
|
+
}
|
|
2015
|
+
function En(e) {
|
|
2016
|
+
return new L(function(t) {
|
|
2017
|
+
Ei(e, t).catch(function(n) {
|
|
2018
|
+
return t.error(n);
|
|
2019
|
+
});
|
|
2020
|
+
});
|
|
2021
|
+
}
|
|
2022
|
+
function Ti(e) {
|
|
2023
|
+
return En(Sn(e));
|
|
2024
|
+
}
|
|
2025
|
+
function Ei(e, t) {
|
|
2026
|
+
var n, r, i, o;
|
|
2027
|
+
return Jr(this, void 0, void 0, function() {
|
|
2028
|
+
var s, a;
|
|
2029
|
+
return fn(this, function(c) {
|
|
2030
|
+
switch (c.label) {
|
|
2031
|
+
case 0:
|
|
2032
|
+
c.trys.push([0, 5, 6, 11]), n = Zr(e), c.label = 1;
|
|
2033
|
+
case 1:
|
|
2034
|
+
return [4, n.next()];
|
|
2035
|
+
case 2:
|
|
2036
|
+
if (r = c.sent(), !!r.done) return [3, 4];
|
|
2037
|
+
if (s = r.value, t.next(s), t.closed)
|
|
2038
|
+
return [2];
|
|
2039
|
+
c.label = 3;
|
|
2040
|
+
case 3:
|
|
2041
|
+
return [3, 1];
|
|
2042
|
+
case 4:
|
|
2043
|
+
return [3, 11];
|
|
2044
|
+
case 5:
|
|
2045
|
+
return a = c.sent(), i = { error: a }, [3, 11];
|
|
2046
|
+
case 6:
|
|
2047
|
+
return c.trys.push([6, , 9, 10]), r && !r.done && (o = n.return) ? [4, o.call(n)] : [3, 8];
|
|
2048
|
+
case 7:
|
|
2049
|
+
c.sent(), c.label = 8;
|
|
2050
|
+
case 8:
|
|
2051
|
+
return [3, 10];
|
|
2052
|
+
case 9:
|
|
2053
|
+
if (i) throw i.error;
|
|
2054
|
+
return [7];
|
|
2055
|
+
case 10:
|
|
2056
|
+
return [7];
|
|
2057
|
+
case 11:
|
|
2058
|
+
return t.complete(), [2];
|
|
2059
|
+
}
|
|
2060
|
+
});
|
|
2061
|
+
});
|
|
2062
|
+
}
|
|
2063
|
+
function ce(e, t, n, r, i) {
|
|
2064
|
+
r === void 0 && (r = 0), i === void 0 && (i = !1);
|
|
2065
|
+
var o = t.schedule(function() {
|
|
2066
|
+
n(), i ? e.add(this.schedule(null, r)) : this.unsubscribe();
|
|
2067
|
+
}, r);
|
|
2068
|
+
if (e.add(o), !i)
|
|
2069
|
+
return o;
|
|
2070
|
+
}
|
|
2071
|
+
function Cn(e, t) {
|
|
2072
|
+
return t === void 0 && (t = 0), B(function(n, r) {
|
|
2073
|
+
n.subscribe(z(r, function(i) {
|
|
2074
|
+
return ce(r, e, function() {
|
|
2075
|
+
return r.next(i);
|
|
2076
|
+
}, t);
|
|
2077
|
+
}, function() {
|
|
2078
|
+
return ce(r, e, function() {
|
|
2079
|
+
return r.complete();
|
|
2080
|
+
}, t);
|
|
2081
|
+
}, function(i) {
|
|
2082
|
+
return ce(r, e, function() {
|
|
2083
|
+
return r.error(i);
|
|
2084
|
+
}, t);
|
|
2085
|
+
}));
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2088
|
+
function Pn(e, t) {
|
|
2089
|
+
return t === void 0 && (t = 0), B(function(n, r) {
|
|
2090
|
+
r.add(e.schedule(function() {
|
|
2091
|
+
return n.subscribe(r);
|
|
2092
|
+
}, t));
|
|
2093
|
+
});
|
|
2094
|
+
}
|
|
2095
|
+
function Ci(e, t) {
|
|
2096
|
+
return Q(e).pipe(Pn(t), Cn(t));
|
|
2097
|
+
}
|
|
2098
|
+
function Pi(e, t) {
|
|
2099
|
+
return Q(e).pipe(Pn(t), Cn(t));
|
|
2100
|
+
}
|
|
2101
|
+
function Oi(e, t) {
|
|
2102
|
+
return new L(function(n) {
|
|
2103
|
+
var r = 0;
|
|
2104
|
+
return t.schedule(function() {
|
|
2105
|
+
r === e.length ? n.complete() : (n.next(e[r++]), n.closed || this.schedule());
|
|
2106
|
+
});
|
|
2107
|
+
});
|
|
2108
|
+
}
|
|
2109
|
+
function Ai(e, t) {
|
|
2110
|
+
return new L(function(n) {
|
|
2111
|
+
var r;
|
|
2112
|
+
return ce(n, t, function() {
|
|
2113
|
+
r = e[wn](), ce(n, t, function() {
|
|
2114
|
+
var i, o, s;
|
|
2115
|
+
try {
|
|
2116
|
+
i = r.next(), o = i.value, s = i.done;
|
|
2117
|
+
} catch (a) {
|
|
2118
|
+
n.error(a);
|
|
2119
|
+
return;
|
|
2120
|
+
}
|
|
2121
|
+
s ? n.complete() : n.next(o);
|
|
2122
|
+
}, 0, !0);
|
|
2123
|
+
}), function() {
|
|
2124
|
+
return O(r == null ? void 0 : r.return) && r.return();
|
|
2125
|
+
};
|
|
2126
|
+
});
|
|
2127
|
+
}
|
|
2128
|
+
function On(e, t) {
|
|
2129
|
+
if (!e)
|
|
2130
|
+
throw new Error("Iterable cannot be null");
|
|
2131
|
+
return new L(function(n) {
|
|
2132
|
+
ce(n, t, function() {
|
|
2133
|
+
var r = e[Symbol.asyncIterator]();
|
|
2134
|
+
ce(n, t, function() {
|
|
2135
|
+
r.next().then(function(i) {
|
|
2136
|
+
i.done ? n.complete() : n.next(i.value);
|
|
2137
|
+
});
|
|
2138
|
+
}, 0, !0);
|
|
2139
|
+
});
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
function _i(e, t) {
|
|
2143
|
+
return On(Sn(e), t);
|
|
2144
|
+
}
|
|
2145
|
+
function ki(e, t) {
|
|
2146
|
+
if (e != null) {
|
|
2147
|
+
if (gn(e))
|
|
2148
|
+
return Ci(e, t);
|
|
2149
|
+
if (Tt(e))
|
|
2150
|
+
return Oi(e, t);
|
|
2151
|
+
if (mn(e))
|
|
2152
|
+
return Pi(e, t);
|
|
2153
|
+
if (bn(e))
|
|
2154
|
+
return On(e, t);
|
|
2155
|
+
if (xn(e))
|
|
2156
|
+
return Ai(e, t);
|
|
2157
|
+
if (Tn(e))
|
|
2158
|
+
return _i(e, t);
|
|
2159
|
+
}
|
|
2160
|
+
throw yn(e);
|
|
2161
|
+
}
|
|
2162
|
+
function be(e, t) {
|
|
2163
|
+
return t ? ki(e, t) : Q(e);
|
|
2164
|
+
}
|
|
2165
|
+
function dt() {
|
|
2166
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
|
2167
|
+
e[t] = arguments[t];
|
|
2168
|
+
var n = St(e);
|
|
2169
|
+
return be(e, n);
|
|
2170
|
+
}
|
|
2171
|
+
function Li(e) {
|
|
2172
|
+
return e instanceof Date && !isNaN(e);
|
|
2173
|
+
}
|
|
2174
|
+
var Ii = yt(function(e) {
|
|
2175
|
+
return function(n) {
|
|
2176
|
+
n === void 0 && (n = null), e(this), this.message = "Timeout has occurred", this.name = "TimeoutError", this.info = n;
|
|
2177
|
+
};
|
|
2178
|
+
});
|
|
2179
|
+
function Mi(e, t) {
|
|
2180
|
+
var n = Li(e) ? { first: e } : typeof e == "number" ? { each: e } : e, r = n.first, i = n.each, o = n.with, s = o === void 0 ? Ri : o, a = n.scheduler, c = a === void 0 ? vi : a, u = n.meta, l = u === void 0 ? null : u;
|
|
2181
|
+
if (r == null && i == null)
|
|
2182
|
+
throw new TypeError("No timeout provided.");
|
|
2183
|
+
return B(function(f, v) {
|
|
2184
|
+
var d, m, p = null, g = 0, h = function(x) {
|
|
2185
|
+
m = ce(v, c, function() {
|
|
2186
|
+
try {
|
|
2187
|
+
d.unsubscribe(), Q(s({
|
|
2188
|
+
meta: l,
|
|
2189
|
+
lastValue: p,
|
|
2190
|
+
seen: g
|
|
2191
|
+
})).subscribe(v);
|
|
2192
|
+
} catch (E) {
|
|
2193
|
+
v.error(E);
|
|
2194
|
+
}
|
|
2195
|
+
}, x);
|
|
2196
|
+
};
|
|
2197
|
+
d = f.subscribe(z(v, function(x) {
|
|
2198
|
+
m == null || m.unsubscribe(), g++, v.next(p = x), i > 0 && h(i);
|
|
2199
|
+
}, void 0, void 0, function() {
|
|
2200
|
+
m != null && m.closed || m == null || m.unsubscribe(), p = null;
|
|
2201
|
+
})), !g && h(r != null ? typeof r == "number" ? r : +r - c.now() : i);
|
|
2202
|
+
});
|
|
2203
|
+
}
|
|
2204
|
+
function Ri(e) {
|
|
2205
|
+
throw new Ii(e);
|
|
2206
|
+
}
|
|
2207
|
+
function A(e, t) {
|
|
2208
|
+
return B(function(n, r) {
|
|
2209
|
+
var i = 0;
|
|
2210
|
+
n.subscribe(z(r, function(o) {
|
|
2211
|
+
r.next(e.call(t, o, i++));
|
|
2212
|
+
}));
|
|
2213
|
+
});
|
|
2214
|
+
}
|
|
2215
|
+
var Di = Array.isArray;
|
|
2216
|
+
function Fi(e, t) {
|
|
2217
|
+
return Di(t) ? e.apply(void 0, xe([], he(t))) : e(t);
|
|
2218
|
+
}
|
|
2219
|
+
function Ni(e) {
|
|
2220
|
+
return A(function(t) {
|
|
2221
|
+
return Fi(e, t);
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
function $i(e, t, n, r, i, o, s, a) {
|
|
2225
|
+
var c = [], u = 0, l = 0, f = !1, v = function() {
|
|
2226
|
+
f && !c.length && !u && t.complete();
|
|
2227
|
+
}, d = function(p) {
|
|
2228
|
+
return u < r ? m(p) : c.push(p);
|
|
2229
|
+
}, m = function(p) {
|
|
2230
|
+
u++;
|
|
2231
|
+
var g = !1;
|
|
2232
|
+
Q(n(p, l++)).subscribe(z(t, function(h) {
|
|
2233
|
+
t.next(h);
|
|
2234
|
+
}, function() {
|
|
2235
|
+
g = !0;
|
|
2236
|
+
}, void 0, function() {
|
|
2237
|
+
if (g)
|
|
2238
|
+
try {
|
|
2239
|
+
u--;
|
|
2240
|
+
for (var h = function() {
|
|
2241
|
+
var x = c.shift();
|
|
2242
|
+
s || m(x);
|
|
2243
|
+
}; c.length && u < r; )
|
|
2244
|
+
h();
|
|
2245
|
+
v();
|
|
2246
|
+
} catch (x) {
|
|
2247
|
+
t.error(x);
|
|
2248
|
+
}
|
|
2249
|
+
}));
|
|
2250
|
+
};
|
|
2251
|
+
return e.subscribe(z(t, d, function() {
|
|
2252
|
+
f = !0, v();
|
|
2253
|
+
})), function() {
|
|
2254
|
+
};
|
|
2255
|
+
}
|
|
2256
|
+
function Ae(e, t, n) {
|
|
2257
|
+
return n === void 0 && (n = 1 / 0), O(t) ? Ae(function(r, i) {
|
|
2258
|
+
return A(function(o, s) {
|
|
2259
|
+
return t(r, o, i, s);
|
|
2260
|
+
})(Q(e(r, i)));
|
|
2261
|
+
}, n) : (typeof t == "number" && (n = t), B(function(r, i) {
|
|
2262
|
+
return $i(r, i, e, n);
|
|
2263
|
+
}));
|
|
2264
|
+
}
|
|
2265
|
+
function Ui(e) {
|
|
2266
|
+
return Ae(et, e);
|
|
2267
|
+
}
|
|
2268
|
+
function Wi() {
|
|
2269
|
+
return Ui(1);
|
|
2270
|
+
}
|
|
2271
|
+
function ze() {
|
|
2272
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
|
2273
|
+
e[t] = arguments[t];
|
|
2274
|
+
return Wi()(be(e, St(e)));
|
|
2275
|
+
}
|
|
2276
|
+
var Bi = ["addListener", "removeListener"], ji = ["addEventListener", "removeEventListener"], Vi = ["on", "off"];
|
|
2277
|
+
function pt(e, t, n, r) {
|
|
2278
|
+
if (O(n) && (r = n, n = void 0), r)
|
|
2279
|
+
return pt(e, t, n).pipe(Ni(r));
|
|
2280
|
+
var i = he(Yi(e) ? ji.map(function(a) {
|
|
2281
|
+
return function(c) {
|
|
2282
|
+
return e[a](t, c, n);
|
|
2283
|
+
};
|
|
2284
|
+
}) : Hi(e) ? Bi.map(Wt(e, t)) : zi(e) ? Vi.map(Wt(e, t)) : [], 2), o = i[0], s = i[1];
|
|
2285
|
+
if (!o && Tt(e))
|
|
2286
|
+
return Ae(function(a) {
|
|
2287
|
+
return pt(a, t, n);
|
|
2288
|
+
})(Q(e));
|
|
2289
|
+
if (!o)
|
|
2290
|
+
throw new TypeError("Invalid event target");
|
|
2291
|
+
return new L(function(a) {
|
|
2292
|
+
var c = function() {
|
|
2293
|
+
for (var u = [], l = 0; l < arguments.length; l++)
|
|
2294
|
+
u[l] = arguments[l];
|
|
2295
|
+
return a.next(1 < u.length ? u : u[0]);
|
|
2296
|
+
};
|
|
2297
|
+
return o(c), function() {
|
|
2298
|
+
return s(c);
|
|
2299
|
+
};
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
function Wt(e, t) {
|
|
2303
|
+
return function(n) {
|
|
2304
|
+
return function(r) {
|
|
2305
|
+
return e[n](t, r);
|
|
2306
|
+
};
|
|
2307
|
+
};
|
|
2308
|
+
}
|
|
2309
|
+
function Hi(e) {
|
|
2310
|
+
return O(e.addListener) && O(e.removeListener);
|
|
2311
|
+
}
|
|
2312
|
+
function zi(e) {
|
|
2313
|
+
return O(e.on) && O(e.off);
|
|
2314
|
+
}
|
|
2315
|
+
function Yi(e) {
|
|
2316
|
+
return O(e.addEventListener) && O(e.removeEventListener);
|
|
2317
|
+
}
|
|
2318
|
+
function tt(e, t) {
|
|
2319
|
+
return B(function(n, r) {
|
|
2320
|
+
var i = 0;
|
|
2321
|
+
n.subscribe(z(r, function(o) {
|
|
2322
|
+
return e.call(t, o, i++) && r.next(o);
|
|
2323
|
+
}));
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
|
+
function qi(e, t, n, r, i) {
|
|
2327
|
+
return function(o, s) {
|
|
2328
|
+
var a = n, c = t, u = 0;
|
|
2329
|
+
o.subscribe(z(s, function(l) {
|
|
2330
|
+
var f = u++;
|
|
2331
|
+
c = a ? e(c, l, f) : (a = !0, l), s.next(c);
|
|
2332
|
+
}, i));
|
|
2333
|
+
};
|
|
2334
|
+
}
|
|
2335
|
+
function Ki(e, t) {
|
|
2336
|
+
return t === void 0 && (t = et), e = e ?? Gi, B(function(n, r) {
|
|
2337
|
+
var i, o = !0;
|
|
2338
|
+
n.subscribe(z(r, function(s) {
|
|
2339
|
+
var a = t(s);
|
|
2340
|
+
(o || !e(i, a)) && (o = !1, i = a, r.next(s));
|
|
2341
|
+
}));
|
|
2342
|
+
});
|
|
2343
|
+
}
|
|
2344
|
+
function Gi(e, t) {
|
|
2345
|
+
return e === t;
|
|
2346
|
+
}
|
|
2347
|
+
function Qi(e) {
|
|
2348
|
+
return B(function(t, n) {
|
|
2349
|
+
try {
|
|
2350
|
+
t.subscribe(n);
|
|
2351
|
+
} finally {
|
|
2352
|
+
n.add(e);
|
|
2353
|
+
}
|
|
2354
|
+
});
|
|
2355
|
+
}
|
|
2356
|
+
function $e(e, t) {
|
|
2357
|
+
return B(qi(e, t, arguments.length >= 2, !0));
|
|
2358
|
+
}
|
|
2359
|
+
function Ji(e) {
|
|
2360
|
+
e === void 0 && (e = {});
|
|
2361
|
+
var t = e.connector, n = t === void 0 ? function() {
|
|
2362
|
+
return new ie();
|
|
2363
|
+
} : t, r = e.resetOnError, i = r === void 0 ? !0 : r, o = e.resetOnComplete, s = o === void 0 ? !0 : o, a = e.resetOnRefCountZero, c = a === void 0 ? !0 : a;
|
|
2364
|
+
return function(u) {
|
|
2365
|
+
var l, f, v, d = 0, m = !1, p = !1, g = function() {
|
|
2366
|
+
f == null || f.unsubscribe(), f = void 0;
|
|
2367
|
+
}, h = function() {
|
|
2368
|
+
g(), l = v = void 0, m = p = !1;
|
|
2369
|
+
}, x = function() {
|
|
2370
|
+
var E = l;
|
|
2371
|
+
h(), E == null || E.unsubscribe();
|
|
2372
|
+
};
|
|
2373
|
+
return B(function(E, _) {
|
|
2374
|
+
d++, !p && !m && g();
|
|
2375
|
+
var b = v = v ?? n();
|
|
2376
|
+
_.add(function() {
|
|
2377
|
+
d--, d === 0 && !p && !m && (f = ot(x, c));
|
|
2378
|
+
}), b.subscribe(_), !l && d > 0 && (l = new Oe({
|
|
2379
|
+
next: function(S) {
|
|
2380
|
+
return b.next(S);
|
|
2381
|
+
},
|
|
2382
|
+
error: function(S) {
|
|
2383
|
+
p = !0, g(), f = ot(h, i, S), b.error(S);
|
|
2384
|
+
},
|
|
2385
|
+
complete: function() {
|
|
2386
|
+
m = !0, g(), f = ot(h, s), b.complete();
|
|
2387
|
+
}
|
|
2388
|
+
}), Q(E).subscribe(l));
|
|
2389
|
+
})(u);
|
|
2390
|
+
};
|
|
2391
|
+
}
|
|
2392
|
+
function ot(e, t) {
|
|
2393
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
|
2394
|
+
n[r - 2] = arguments[r];
|
|
2395
|
+
if (t === !0) {
|
|
2396
|
+
e();
|
|
2397
|
+
return;
|
|
2398
|
+
}
|
|
2399
|
+
if (t !== !1) {
|
|
2400
|
+
var i = new Oe({
|
|
2401
|
+
next: function() {
|
|
2402
|
+
i.unsubscribe(), e();
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
return Q(t.apply(void 0, xe([], he(n)))).subscribe(i);
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
function Xi(e) {
|
|
2409
|
+
return B(function(t, n) {
|
|
2410
|
+
var r = !1, i = z(n, function() {
|
|
2411
|
+
i == null || i.unsubscribe(), r = !0;
|
|
2412
|
+
}, He);
|
|
2413
|
+
Q(e).subscribe(i), t.subscribe(z(n, function(o) {
|
|
2414
|
+
return r && n.next(o);
|
|
2415
|
+
}));
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
function U() {
|
|
2419
|
+
for (var e = [], t = 0; t < arguments.length; t++)
|
|
2420
|
+
e[t] = arguments[t];
|
|
2421
|
+
var n = St(e);
|
|
2422
|
+
return B(function(r, i) {
|
|
2423
|
+
(n ? ze(e, r, n) : ze(e, r)).subscribe(i);
|
|
2424
|
+
});
|
|
2425
|
+
}
|
|
2426
|
+
function An(e, t) {
|
|
2427
|
+
return B(function(n, r) {
|
|
2428
|
+
var i = null, o = 0, s = !1, a = function() {
|
|
2429
|
+
return s && !i && r.complete();
|
|
2430
|
+
};
|
|
2431
|
+
n.subscribe(z(r, function(c) {
|
|
2432
|
+
i == null || i.unsubscribe();
|
|
2433
|
+
var u = 0, l = o++;
|
|
2434
|
+
Q(e(c, l)).subscribe(i = z(r, function(f) {
|
|
2435
|
+
return r.next(t ? t(c, f, l, u++) : f);
|
|
2436
|
+
}, function() {
|
|
2437
|
+
i = null, a();
|
|
2438
|
+
}));
|
|
2439
|
+
}, function() {
|
|
2440
|
+
s = !0, a();
|
|
2441
|
+
}));
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
function Bt(e) {
|
|
2445
|
+
return B(function(t, n) {
|
|
2446
|
+
Q(e).subscribe(z(n, function() {
|
|
2447
|
+
return n.complete();
|
|
2448
|
+
}, He)), !n.closed && t.subscribe(n);
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
function Zi(e, t, n) {
|
|
2452
|
+
var r = O(e) || t || n ? { next: e, error: t, complete: n } : e;
|
|
2453
|
+
return r ? B(function(i, o) {
|
|
2454
|
+
var s;
|
|
2455
|
+
(s = r.subscribe) === null || s === void 0 || s.call(r);
|
|
2456
|
+
var a = !0;
|
|
2457
|
+
i.subscribe(z(o, function(c) {
|
|
2458
|
+
var u;
|
|
2459
|
+
(u = r.next) === null || u === void 0 || u.call(r, c), o.next(c);
|
|
2460
|
+
}, function() {
|
|
2461
|
+
var c;
|
|
2462
|
+
a = !1, (c = r.complete) === null || c === void 0 || c.call(r), o.complete();
|
|
2463
|
+
}, function(c) {
|
|
2464
|
+
var u;
|
|
2465
|
+
a = !1, (u = r.error) === null || u === void 0 || u.call(r, c), o.error(c);
|
|
2466
|
+
}, function() {
|
|
2467
|
+
var c, u;
|
|
2468
|
+
a && ((c = r.unsubscribe) === null || c === void 0 || c.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
|
|
2469
|
+
}));
|
|
2470
|
+
}) : et;
|
|
2471
|
+
}
|
|
2472
|
+
var eo = Object.defineProperty, to = Object.defineProperties, no = Object.getOwnPropertyDescriptors, jt = Object.getOwnPropertySymbols, ro = Object.prototype.hasOwnProperty, io = Object.prototype.propertyIsEnumerable, Vt = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), Ht = (e, t, n) => t in e ? eo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, X = (e, t) => {
|
|
2473
|
+
for (var n in t || (t = {}))
|
|
2474
|
+
ro.call(t, n) && Ht(e, n, t[n]);
|
|
2475
|
+
if (jt)
|
|
2476
|
+
for (var n of jt(t))
|
|
2477
|
+
io.call(t, n) && Ht(e, n, t[n]);
|
|
2478
|
+
return e;
|
|
2479
|
+
}, le = (e, t) => to(e, no(t)), H = (e, t, n) => new Promise((r, i) => {
|
|
2480
|
+
var o = (c) => {
|
|
2481
|
+
try {
|
|
2482
|
+
a(n.next(c));
|
|
2483
|
+
} catch (u) {
|
|
2484
|
+
i(u);
|
|
2485
|
+
}
|
|
2486
|
+
}, s = (c) => {
|
|
2487
|
+
try {
|
|
2488
|
+
a(n.throw(c));
|
|
2489
|
+
} catch (u) {
|
|
2490
|
+
i(u);
|
|
2491
|
+
}
|
|
2492
|
+
}, a = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(o, s);
|
|
2493
|
+
a((n = n.apply(e, t)).next());
|
|
2494
|
+
}), oo = (e, t, n) => (t = e[Vt("asyncIterator")]) ? t.call(e) : (e = e[Vt("iterator")](), t = {}, n = (r, i) => (i = e[r]) && (t[r] = (o) => new Promise((s, a, c) => (o = i.call(e, o), c = o.done, Promise.resolve(o.value).then((u) => s({ value: u, done: c }), a)))), n("next"), n("return"), t), _n = "lk";
|
|
2495
|
+
function K(e) {
|
|
2496
|
+
return typeof e > "u" ? !1 : so(e) || ao(e);
|
|
2497
|
+
}
|
|
2498
|
+
function so(e) {
|
|
2499
|
+
var t;
|
|
2500
|
+
return e ? e.hasOwnProperty("participant") && e.hasOwnProperty("source") && e.hasOwnProperty("track") && typeof ((t = e.publication) == null ? void 0 : t.track) < "u" : !1;
|
|
2501
|
+
}
|
|
2502
|
+
function ao(e) {
|
|
2503
|
+
return e ? e.hasOwnProperty("participant") && e.hasOwnProperty("source") && e.hasOwnProperty("publication") && typeof e.publication < "u" : !1;
|
|
2504
|
+
}
|
|
2505
|
+
function _e(e) {
|
|
2506
|
+
return e ? e.hasOwnProperty("participant") && e.hasOwnProperty("source") && typeof e.publication > "u" : !1;
|
|
2507
|
+
}
|
|
2508
|
+
function V(e) {
|
|
2509
|
+
if (typeof e == "string" || typeof e == "number")
|
|
2510
|
+
return `${e}`;
|
|
2511
|
+
if (_e(e))
|
|
2512
|
+
return `${e.participant.identity}_${e.source}_placeholder`;
|
|
2513
|
+
if (K(e))
|
|
2514
|
+
return `${e.participant.identity}_${e.publication.source}_${e.publication.trackSid}`;
|
|
2515
|
+
throw new Error(`Can't generate a id for the given track reference: ${e}`);
|
|
2516
|
+
}
|
|
2517
|
+
function ss(e, t) {
|
|
2518
|
+
return e === void 0 || t === void 0 ? !1 : K(e) && K(t) ? e.publication.trackSid === t.publication.trackSid : V(e) === V(t);
|
|
2519
|
+
}
|
|
2520
|
+
function as(e, t) {
|
|
2521
|
+
return typeof t > "u" ? !1 : K(e) ? t.some(
|
|
2522
|
+
(n) => n.participant.identity === e.participant.identity && K(n) && n.publication.trackSid === e.publication.trackSid
|
|
2523
|
+
) : _e(e) ? t.some(
|
|
2524
|
+
(n) => n.participant.identity === e.participant.identity && _e(n) && n.source === e.source
|
|
2525
|
+
) : !1;
|
|
2526
|
+
}
|
|
2527
|
+
function co(e, t) {
|
|
2528
|
+
return _e(e) && K(t) && t.participant.identity === e.participant.identity && t.source === e.source;
|
|
2529
|
+
}
|
|
2530
|
+
function cs() {
|
|
2531
|
+
const e = document.createElement("p");
|
|
2532
|
+
e.style.width = "100%", e.style.height = "200px";
|
|
2533
|
+
const t = document.createElement("div");
|
|
2534
|
+
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);
|
|
2535
|
+
const n = e.offsetWidth;
|
|
2536
|
+
t.style.overflow = "scroll";
|
|
2537
|
+
let r = e.offsetWidth;
|
|
2538
|
+
return n === r && (r = t.clientWidth), document.body.removeChild(t), n - r;
|
|
2539
|
+
}
|
|
2540
|
+
function us() {
|
|
2541
|
+
return typeof document < "u";
|
|
2542
|
+
}
|
|
2543
|
+
function uo(e) {
|
|
2544
|
+
e = X({}, e);
|
|
2545
|
+
const t = "(?:(?:[a-z]+:)?//)?", n = "(?:\\S+(?::\\S*)?@)?", r = new RegExp(
|
|
2546
|
+
"(?: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}",
|
|
2547
|
+
"g"
|
|
2548
|
+
).source, u = `(?:${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"]*)?`;
|
|
2549
|
+
return e.exact ? new RegExp(`(?:^${u}$)`, "i") : new RegExp(u, "ig");
|
|
2550
|
+
}
|
|
2551
|
+
var zt = "[^\\.\\s@:](?:[^\\s@:]*[^\\s@:\\.])?@[^\\.\\s@]+(?:\\.[^\\.\\s@]+)*";
|
|
2552
|
+
function lo({ exact: e } = {}) {
|
|
2553
|
+
return e ? new RegExp(`^${zt}$`) : new RegExp(zt, "g");
|
|
2554
|
+
}
|
|
2555
|
+
function ls(e, t, n) {
|
|
2556
|
+
return Br(e, t, () => H(this, null, function* () {
|
|
2557
|
+
const { x: i, y: o } = yield zr(e, t, {
|
|
2558
|
+
placement: "top",
|
|
2559
|
+
middleware: [jr(6), Hr(), Vr({ padding: 5 })]
|
|
2560
|
+
});
|
|
2561
|
+
n == null || n(i, o);
|
|
2562
|
+
}));
|
|
2563
|
+
}
|
|
2564
|
+
function fs(e, t) {
|
|
2565
|
+
return !e.contains(t.target);
|
|
2566
|
+
}
|
|
2567
|
+
var ds = () => ({
|
|
2568
|
+
email: lo(),
|
|
2569
|
+
url: uo({})
|
|
2570
|
+
});
|
|
2571
|
+
function ps(e, t) {
|
|
2572
|
+
const n = Object.entries(t).map(
|
|
2573
|
+
([o, s], a) => Array.from(e.matchAll(s)).map(({ index: c, 0: u }) => ({
|
|
2574
|
+
type: o,
|
|
2575
|
+
weight: a,
|
|
2576
|
+
content: u,
|
|
2577
|
+
index: c ?? 0
|
|
2578
|
+
}))
|
|
2579
|
+
).flat().sort((o, s) => {
|
|
2580
|
+
const a = o.index - s.index;
|
|
2581
|
+
return a !== 0 ? a : o.weight - s.weight;
|
|
2582
|
+
}).filter(({ index: o }, s, a) => {
|
|
2583
|
+
if (s === 0) return !0;
|
|
2584
|
+
const c = a[s - 1];
|
|
2585
|
+
return c.index + c.content.length <= o;
|
|
2586
|
+
}), r = [];
|
|
2587
|
+
let i = 0;
|
|
2588
|
+
for (const { type: o, content: s, index: a } of n)
|
|
2589
|
+
a > i && r.push(e.substring(i, a)), r.push({ type: o, content: s }), i = a + s.length;
|
|
2590
|
+
return e.length > i && r.push(e.substring(i)), r;
|
|
2591
|
+
}
|
|
2592
|
+
var fo = [
|
|
2593
|
+
y.ConnectionStateChanged,
|
|
2594
|
+
y.RoomMetadataChanged,
|
|
2595
|
+
y.ActiveSpeakersChanged,
|
|
2596
|
+
y.ConnectionQualityChanged,
|
|
2597
|
+
y.ParticipantConnected,
|
|
2598
|
+
y.ParticipantDisconnected,
|
|
2599
|
+
y.ParticipantPermissionsChanged,
|
|
2600
|
+
y.ParticipantMetadataChanged,
|
|
2601
|
+
y.ParticipantNameChanged,
|
|
2602
|
+
y.ParticipantAttributesChanged,
|
|
2603
|
+
y.TrackMuted,
|
|
2604
|
+
y.TrackUnmuted,
|
|
2605
|
+
y.TrackPublished,
|
|
2606
|
+
y.TrackUnpublished,
|
|
2607
|
+
y.TrackStreamStateChanged,
|
|
2608
|
+
y.TrackSubscriptionFailed,
|
|
2609
|
+
y.TrackSubscriptionPermissionChanged,
|
|
2610
|
+
y.TrackSubscriptionStatusChanged
|
|
2611
|
+
], kn = [
|
|
2612
|
+
...fo,
|
|
2613
|
+
y.LocalTrackPublished,
|
|
2614
|
+
y.LocalTrackUnpublished
|
|
2615
|
+
], po = [
|
|
2616
|
+
w.TrackPublished,
|
|
2617
|
+
w.TrackUnpublished,
|
|
2618
|
+
w.TrackMuted,
|
|
2619
|
+
w.TrackUnmuted,
|
|
2620
|
+
w.TrackStreamStateChanged,
|
|
2621
|
+
w.TrackSubscribed,
|
|
2622
|
+
w.TrackUnsubscribed,
|
|
2623
|
+
w.TrackSubscriptionPermissionChanged,
|
|
2624
|
+
w.TrackSubscriptionFailed,
|
|
2625
|
+
w.LocalTrackPublished,
|
|
2626
|
+
w.LocalTrackUnpublished
|
|
2627
|
+
], ho = [
|
|
2628
|
+
w.ConnectionQualityChanged,
|
|
2629
|
+
w.IsSpeakingChanged,
|
|
2630
|
+
w.ParticipantMetadataChanged,
|
|
2631
|
+
w.ParticipantPermissionsChanged,
|
|
2632
|
+
w.TrackMuted,
|
|
2633
|
+
w.TrackUnmuted,
|
|
2634
|
+
w.TrackPublished,
|
|
2635
|
+
w.TrackUnpublished,
|
|
2636
|
+
w.TrackStreamStateChanged,
|
|
2637
|
+
w.TrackSubscriptionFailed,
|
|
2638
|
+
w.TrackSubscriptionPermissionChanged,
|
|
2639
|
+
w.TrackSubscriptionStatusChanged
|
|
2640
|
+
], Ln = [
|
|
2641
|
+
...ho,
|
|
2642
|
+
w.LocalTrackPublished,
|
|
2643
|
+
w.LocalTrackUnpublished
|
|
2644
|
+
], I = Qr.getLogger("lk-components-js");
|
|
2645
|
+
I.setDefaultLevel("WARN");
|
|
2646
|
+
function hs(e, t = {}) {
|
|
2647
|
+
var n;
|
|
2648
|
+
I.setLevel(e), Gn((n = t.liveKitClientLogLevel) != null ? n : e);
|
|
2649
|
+
}
|
|
2650
|
+
function vs(e, t = {}) {
|
|
2651
|
+
var n;
|
|
2652
|
+
const r = I.methodFactory;
|
|
2653
|
+
I.methodFactory = (i, o, s) => {
|
|
2654
|
+
const a = r(i, o, s), c = Et[i], u = c >= o && c < Et.silent;
|
|
2655
|
+
return (l, f) => {
|
|
2656
|
+
f ? a(l, f) : a(l), u && e(c, l, f);
|
|
2657
|
+
};
|
|
2658
|
+
}, I.setLevel(I.getLevel()), Qn((n = t.liveKitClientLogExtension) != null ? n : e);
|
|
2659
|
+
}
|
|
2660
|
+
var ms = [
|
|
2661
|
+
{
|
|
2662
|
+
columns: 1,
|
|
2663
|
+
rows: 1
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
columns: 1,
|
|
2667
|
+
rows: 2,
|
|
2668
|
+
orientation: "portrait"
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
columns: 2,
|
|
2672
|
+
rows: 1,
|
|
2673
|
+
orientation: "landscape"
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
columns: 2,
|
|
2677
|
+
rows: 2,
|
|
2678
|
+
minWidth: 560
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
columns: 3,
|
|
2682
|
+
rows: 3,
|
|
2683
|
+
minWidth: 700
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
columns: 4,
|
|
2687
|
+
rows: 4,
|
|
2688
|
+
minWidth: 960
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
columns: 5,
|
|
2692
|
+
rows: 5,
|
|
2693
|
+
minWidth: 1100
|
|
2694
|
+
}
|
|
2695
|
+
];
|
|
2696
|
+
function vo(e, t, n, r) {
|
|
2697
|
+
if (e.length < 1)
|
|
2698
|
+
throw new Error("At least one grid layout definition must be provided.");
|
|
2699
|
+
const i = mo(e);
|
|
2700
|
+
if (n <= 0 || r <= 0)
|
|
2701
|
+
return i[0];
|
|
2702
|
+
let o = 0;
|
|
2703
|
+
const s = n / r > 1 ? "landscape" : "portrait";
|
|
2704
|
+
let a = i.find((c, u, l) => {
|
|
2705
|
+
o = u;
|
|
2706
|
+
const f = l.findIndex((v, d) => {
|
|
2707
|
+
const m = !v.orientation || v.orientation === s, p = d > u, g = v.maxTiles === c.maxTiles;
|
|
2708
|
+
return p && g && m;
|
|
2709
|
+
}) !== -1;
|
|
2710
|
+
return c.maxTiles >= t && !f;
|
|
2711
|
+
});
|
|
2712
|
+
if (a === void 0)
|
|
2713
|
+
if (a = i[i.length - 1], a)
|
|
2714
|
+
I.warn(
|
|
2715
|
+
`No layout found for: participantCount: ${t}, width/height: ${n}/${r} fallback to biggest available layout (${a}).`
|
|
2716
|
+
);
|
|
2717
|
+
else
|
|
2718
|
+
throw new Error("No layout or fallback layout found.");
|
|
2719
|
+
if ((n < a.minWidth || r < a.minHeight) && o > 0) {
|
|
2720
|
+
const c = i[o - 1];
|
|
2721
|
+
a = vo(
|
|
2722
|
+
i.slice(0, o),
|
|
2723
|
+
c.maxTiles,
|
|
2724
|
+
n,
|
|
2725
|
+
r
|
|
2726
|
+
);
|
|
2727
|
+
}
|
|
2728
|
+
return a;
|
|
2729
|
+
}
|
|
2730
|
+
function mo(e) {
|
|
2731
|
+
return [...e].map((t) => {
|
|
2732
|
+
var n, r;
|
|
2733
|
+
return {
|
|
2734
|
+
name: `${t.columns}x${t.rows}`,
|
|
2735
|
+
columns: t.columns,
|
|
2736
|
+
rows: t.rows,
|
|
2737
|
+
maxTiles: t.columns * t.rows,
|
|
2738
|
+
minWidth: (n = t.minWidth) != null ? n : 0,
|
|
2739
|
+
minHeight: (r = t.minHeight) != null ? r : 0,
|
|
2740
|
+
orientation: t.orientation
|
|
2741
|
+
};
|
|
2742
|
+
}).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);
|
|
2743
|
+
}
|
|
2744
|
+
function gs() {
|
|
2745
|
+
return typeof navigator < "u" && navigator.mediaDevices && !!navigator.mediaDevices.getDisplayMedia;
|
|
2746
|
+
}
|
|
2747
|
+
function bs(e, t) {
|
|
2748
|
+
var n;
|
|
2749
|
+
return le(X({}, e), {
|
|
2750
|
+
receivedAtMediaTimestamp: (n = t.rtpTimestamp) != null ? n : 0,
|
|
2751
|
+
receivedAt: t.timestamp
|
|
2752
|
+
});
|
|
2753
|
+
}
|
|
2754
|
+
function ys(e, t, n) {
|
|
2755
|
+
return [...e, ...t].reduceRight((r, i) => (r.find((o) => o.id === i.id) || r.unshift(i), r), []).slice(0 - n);
|
|
2756
|
+
}
|
|
2757
|
+
var go = /* @__PURE__ */ ((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))(go || {}), In = [], Mn = {
|
|
2758
|
+
showChat: !1,
|
|
2759
|
+
unreadMessages: 0,
|
|
2760
|
+
showSettings: !1
|
|
2761
|
+
};
|
|
2762
|
+
function bo(e) {
|
|
2763
|
+
return typeof e == "object";
|
|
2764
|
+
}
|
|
2765
|
+
function ws(e) {
|
|
2766
|
+
return Array.isArray(e) && e.filter(bo).length > 0;
|
|
2767
|
+
}
|
|
2768
|
+
function Rn(e, t) {
|
|
2769
|
+
return t.audioLevel - e.audioLevel;
|
|
2770
|
+
}
|
|
2771
|
+
function Dn(e, t) {
|
|
2772
|
+
return e.isSpeaking === t.isSpeaking ? 0 : e.isSpeaking ? -1 : 1;
|
|
2773
|
+
}
|
|
2774
|
+
function Fn(e, t) {
|
|
2775
|
+
var n, r, i, o;
|
|
2776
|
+
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;
|
|
2777
|
+
}
|
|
2778
|
+
function Ye(e, t) {
|
|
2779
|
+
var n, r, i, o;
|
|
2780
|
+
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);
|
|
2781
|
+
}
|
|
2782
|
+
function yo(e, t) {
|
|
2783
|
+
return K(e) ? K(t) ? 0 : -1 : K(t) ? 1 : 0;
|
|
2784
|
+
}
|
|
2785
|
+
function wo(e, t) {
|
|
2786
|
+
const n = e.participant.isCameraEnabled, r = t.participant.isCameraEnabled;
|
|
2787
|
+
return n !== r ? n ? -1 : 1 : 0;
|
|
2788
|
+
}
|
|
2789
|
+
function xs(e) {
|
|
2790
|
+
const t = [], n = [], r = [], i = [];
|
|
2791
|
+
e.forEach((a) => {
|
|
2792
|
+
a.participant.isLocal && a.source === $.Source.Camera ? t.push(a) : a.source === $.Source.ScreenShare ? n.push(a) : a.source === $.Source.Camera ? r.push(a) : i.push(a);
|
|
2793
|
+
});
|
|
2794
|
+
const o = xo(n), s = So(r);
|
|
2795
|
+
return [...t, ...o, ...s, ...i];
|
|
2796
|
+
}
|
|
2797
|
+
function xo(e) {
|
|
2798
|
+
const t = [], n = [];
|
|
2799
|
+
return e.forEach((i) => {
|
|
2800
|
+
i.participant.isLocal ? t.push(i) : n.push(i);
|
|
2801
|
+
}), t.sort((i, o) => Ye(i.participant, o.participant)), n.sort((i, o) => Ye(i.participant, o.participant)), [...n, ...t];
|
|
2802
|
+
}
|
|
2803
|
+
function So(e) {
|
|
2804
|
+
const t = [], n = [];
|
|
2805
|
+
return e.forEach((r) => {
|
|
2806
|
+
r.participant.isLocal ? t.push(r) : n.push(r);
|
|
2807
|
+
}), n.sort((r, i) => r.participant.isSpeaking && i.participant.isSpeaking ? Rn(r.participant, i.participant) : r.participant.isSpeaking !== i.participant.isSpeaking ? Dn(r.participant, i.participant) : r.participant.lastSpokeAt !== i.participant.lastSpokeAt ? Fn(r.participant, i.participant) : K(r) !== K(i) ? yo(r, i) : r.participant.isCameraEnabled !== i.participant.isCameraEnabled ? wo(r, i) : Ye(r.participant, i.participant)), [...t, ...n];
|
|
2808
|
+
}
|
|
2809
|
+
function Ss(e) {
|
|
2810
|
+
const t = [...e];
|
|
2811
|
+
t.sort((r, i) => {
|
|
2812
|
+
if (r.isSpeaking && i.isSpeaking)
|
|
2813
|
+
return Rn(r, i);
|
|
2814
|
+
if (r.isSpeaking !== i.isSpeaking)
|
|
2815
|
+
return Dn(r, i);
|
|
2816
|
+
if (r.lastSpokeAt !== i.lastSpokeAt)
|
|
2817
|
+
return Fn(r, i);
|
|
2818
|
+
const o = r.videoTrackPublications.size > 0, s = i.videoTrackPublications.size > 0;
|
|
2819
|
+
return o !== s ? o ? -1 : 1 : Ye(r, i);
|
|
2820
|
+
});
|
|
2821
|
+
const n = t.find((r) => r.isLocal);
|
|
2822
|
+
if (n) {
|
|
2823
|
+
const r = t.indexOf(n);
|
|
2824
|
+
r >= 0 && (t.splice(r, 1), t.length > 0 ? t.splice(0, 0, n) : t.push(n));
|
|
2825
|
+
}
|
|
2826
|
+
return t;
|
|
2827
|
+
}
|
|
2828
|
+
function To(e, t) {
|
|
2829
|
+
return e.reduce(
|
|
2830
|
+
(n, r, i) => i % t === 0 ? [...n, [r]] : [...n.slice(0, -1), [...n.slice(-1)[0], r]],
|
|
2831
|
+
[]
|
|
2832
|
+
);
|
|
2833
|
+
}
|
|
2834
|
+
function Yt(e, t) {
|
|
2835
|
+
const n = Math.max(e.length, t.length);
|
|
2836
|
+
return new Array(n).fill([]).map((r, i) => [e[i], t[i]]);
|
|
2837
|
+
}
|
|
2838
|
+
function qe(e, t, n) {
|
|
2839
|
+
return e.filter((r) => !t.map((i) => n(i)).includes(n(r)));
|
|
2840
|
+
}
|
|
2841
|
+
function ht(e) {
|
|
2842
|
+
return e.map((t) => typeof t == "string" || typeof t == "number" ? `${t}` : V(t));
|
|
2843
|
+
}
|
|
2844
|
+
function Eo(e, t) {
|
|
2845
|
+
return {
|
|
2846
|
+
dropped: qe(e, t, V),
|
|
2847
|
+
added: qe(t, e, V)
|
|
2848
|
+
};
|
|
2849
|
+
}
|
|
2850
|
+
function Co(e) {
|
|
2851
|
+
return e.added.length !== 0 || e.dropped.length !== 0;
|
|
2852
|
+
}
|
|
2853
|
+
function vt(e, t) {
|
|
2854
|
+
const n = t.findIndex(
|
|
2855
|
+
(r) => V(r) === V(e)
|
|
2856
|
+
);
|
|
2857
|
+
if (n === -1)
|
|
2858
|
+
throw new Error(
|
|
2859
|
+
`Element not part of the array: ${V(
|
|
2860
|
+
e
|
|
2861
|
+
)} not in ${ht(t)}`
|
|
2862
|
+
);
|
|
2863
|
+
return n;
|
|
2864
|
+
}
|
|
2865
|
+
function Po(e, t, n) {
|
|
2866
|
+
const r = vt(e, n), i = vt(t, n);
|
|
2867
|
+
return n.splice(r, 1, t), n.splice(i, 1, e), n;
|
|
2868
|
+
}
|
|
2869
|
+
function Oo(e, t) {
|
|
2870
|
+
const n = vt(e, t);
|
|
2871
|
+
return t.splice(n, 1), t;
|
|
2872
|
+
}
|
|
2873
|
+
function Ao(e, t) {
|
|
2874
|
+
return [...t, e];
|
|
2875
|
+
}
|
|
2876
|
+
function st(e, t) {
|
|
2877
|
+
return To(e, t);
|
|
2878
|
+
}
|
|
2879
|
+
function Ts(e, t, n) {
|
|
2880
|
+
let r = _o(e, t);
|
|
2881
|
+
if (r.length < t.length) {
|
|
2882
|
+
const s = qe(t, r, V);
|
|
2883
|
+
r = [...r, ...s];
|
|
2884
|
+
}
|
|
2885
|
+
const i = st(r, n), o = st(t, n);
|
|
2886
|
+
if (Yt(i, o).forEach(([s, a], c) => {
|
|
2887
|
+
if (s && a) {
|
|
2888
|
+
const u = st(r, n)[c], l = Eo(u, a);
|
|
2889
|
+
Co(l) && (I.debug(
|
|
2890
|
+
`Detected visual changes on page: ${c}, current: ${ht(
|
|
2891
|
+
s
|
|
2892
|
+
)}, next: ${ht(a)}`,
|
|
2893
|
+
{ changes: l }
|
|
2894
|
+
), l.added.length === l.dropped.length && Yt(l.added, l.dropped).forEach(([f, v]) => {
|
|
2895
|
+
if (f && v)
|
|
2896
|
+
r = Po(f, v, r);
|
|
2897
|
+
else
|
|
2898
|
+
throw new Error(
|
|
2899
|
+
`For a swap action we need a addition and a removal one is missing: ${f}, ${v}`
|
|
2900
|
+
);
|
|
2901
|
+
}), l.added.length === 0 && l.dropped.length > 0 && l.dropped.forEach((f) => {
|
|
2902
|
+
r = Oo(f, r);
|
|
2903
|
+
}), l.added.length > 0 && l.dropped.length === 0 && l.added.forEach((f) => {
|
|
2904
|
+
r = Ao(f, r);
|
|
2905
|
+
}));
|
|
2906
|
+
}
|
|
2907
|
+
}), r.length > t.length) {
|
|
2908
|
+
const s = qe(r, t, V);
|
|
2909
|
+
r = r.filter(
|
|
2910
|
+
(a) => !s.map(V).includes(V(a))
|
|
2911
|
+
);
|
|
2912
|
+
}
|
|
2913
|
+
return r;
|
|
2914
|
+
}
|
|
2915
|
+
function _o(e, t) {
|
|
2916
|
+
return e.map((n) => {
|
|
2917
|
+
const r = t.find(
|
|
2918
|
+
(i) => (
|
|
2919
|
+
// If the IDs match or ..
|
|
2920
|
+
V(n) === V(i) || // ... if the current item is a placeholder and the new item is the track reference can replace it.
|
|
2921
|
+
typeof n != "number" && _e(n) && K(i) && co(n, i)
|
|
2922
|
+
)
|
|
2923
|
+
);
|
|
2924
|
+
return r ?? n;
|
|
2925
|
+
});
|
|
2926
|
+
}
|
|
2927
|
+
function Y(e) {
|
|
2928
|
+
return `${_n}-${e}`;
|
|
2929
|
+
}
|
|
2930
|
+
function Es(e) {
|
|
2931
|
+
const t = qt(e), n = Nn(e.participant).pipe(
|
|
2932
|
+
A(() => qt(e)),
|
|
2933
|
+
U(t)
|
|
2934
|
+
);
|
|
2935
|
+
return { className: Y(
|
|
2936
|
+
e.source === $.Source.Camera || e.source === $.Source.ScreenShare ? "participant-media-video" : "participant-media-audio"
|
|
2937
|
+
), trackObserver: n };
|
|
2938
|
+
}
|
|
2939
|
+
function qt(e) {
|
|
2940
|
+
if (K(e))
|
|
2941
|
+
return e.publication;
|
|
2942
|
+
{
|
|
2943
|
+
const { source: t, name: n, participant: r } = e;
|
|
2944
|
+
if (t && n)
|
|
2945
|
+
return r.getTrackPublications().find((i) => i.source === t && i.trackName === n);
|
|
2946
|
+
if (n)
|
|
2947
|
+
return r.getTrackPublicationByName(n);
|
|
2948
|
+
if (t)
|
|
2949
|
+
return r.getTrackPublication(t);
|
|
2950
|
+
throw new Error("At least one of source and name needs to be defined");
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
function ve(e, ...t) {
|
|
2954
|
+
return new L((r) => {
|
|
2955
|
+
const i = () => {
|
|
2956
|
+
r.next(e);
|
|
2957
|
+
};
|
|
2958
|
+
return t.forEach((s) => {
|
|
2959
|
+
e.on(s, i);
|
|
2960
|
+
}), () => {
|
|
2961
|
+
t.forEach((s) => {
|
|
2962
|
+
e.off(s, i);
|
|
2963
|
+
});
|
|
2964
|
+
};
|
|
2965
|
+
}).pipe(U(e));
|
|
2966
|
+
}
|
|
2967
|
+
function Te(e, t) {
|
|
2968
|
+
return new L((r) => {
|
|
2969
|
+
const i = (...s) => {
|
|
2970
|
+
r.next(s);
|
|
2971
|
+
};
|
|
2972
|
+
return e.on(t, i), () => {
|
|
2973
|
+
e.off(t, i);
|
|
2974
|
+
};
|
|
2975
|
+
});
|
|
2976
|
+
}
|
|
2977
|
+
function Cs(e) {
|
|
2978
|
+
return Te(e, y.ConnectionStateChanged).pipe(
|
|
2979
|
+
A(([t]) => t),
|
|
2980
|
+
U(e.state)
|
|
2981
|
+
);
|
|
2982
|
+
}
|
|
2983
|
+
function Ps(e) {
|
|
2984
|
+
return ve(
|
|
2985
|
+
e,
|
|
2986
|
+
y.RoomMetadataChanged,
|
|
2987
|
+
y.ConnectionStateChanged
|
|
2988
|
+
).pipe(
|
|
2989
|
+
A((n) => ({ name: n.name, metadata: n.metadata }))
|
|
2990
|
+
);
|
|
2991
|
+
}
|
|
2992
|
+
function Os(e) {
|
|
2993
|
+
return Te(e, y.ActiveSpeakersChanged).pipe(
|
|
2994
|
+
A(([t]) => t)
|
|
2995
|
+
);
|
|
2996
|
+
}
|
|
2997
|
+
function As(e, t, n = !0) {
|
|
2998
|
+
const r = new L((o) => {
|
|
2999
|
+
Ct.getLocalDevices(e, n).then((s) => {
|
|
3000
|
+
o.next(s), o.complete();
|
|
3001
|
+
}).catch((s) => {
|
|
3002
|
+
t == null || t(s), o.next([]), o.complete();
|
|
3003
|
+
});
|
|
3004
|
+
}), i = new L((o) => {
|
|
3005
|
+
var s;
|
|
3006
|
+
const a = () => H(this, null, function* () {
|
|
3007
|
+
try {
|
|
3008
|
+
const c = yield Ct.getLocalDevices(e, n);
|
|
3009
|
+
o.next(c);
|
|
3010
|
+
} catch (c) {
|
|
3011
|
+
t == null || t(c);
|
|
3012
|
+
}
|
|
3013
|
+
});
|
|
3014
|
+
if (typeof window < "u") {
|
|
3015
|
+
if (!window.isSecureContext)
|
|
3016
|
+
throw new Error(
|
|
3017
|
+
"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"
|
|
3018
|
+
);
|
|
3019
|
+
(s = navigator == null ? void 0 : navigator.mediaDevices) == null || s.addEventListener("devicechange", a);
|
|
3020
|
+
}
|
|
3021
|
+
return () => {
|
|
3022
|
+
var c;
|
|
3023
|
+
(c = navigator == null ? void 0 : navigator.mediaDevices) == null || c.removeEventListener("devicechange", a);
|
|
3024
|
+
};
|
|
3025
|
+
});
|
|
3026
|
+
return ze(r, i);
|
|
3027
|
+
}
|
|
3028
|
+
function ko(e) {
|
|
3029
|
+
return Te(e, y.DataReceived);
|
|
3030
|
+
}
|
|
3031
|
+
function Lo(e) {
|
|
3032
|
+
return ve(e, y.AudioPlaybackStatusChanged).pipe(
|
|
3033
|
+
A((n) => ({ canPlayAudio: n.canPlaybackAudio }))
|
|
3034
|
+
);
|
|
3035
|
+
}
|
|
3036
|
+
function Io(e) {
|
|
3037
|
+
return ve(e, y.VideoPlaybackStatusChanged).pipe(
|
|
3038
|
+
A((n) => ({ canPlayVideo: n.canPlaybackVideo }))
|
|
3039
|
+
);
|
|
3040
|
+
}
|
|
3041
|
+
function Mo(e, t) {
|
|
3042
|
+
return Te(e, y.ActiveDeviceChanged).pipe(
|
|
3043
|
+
tt(([n]) => n === t),
|
|
3044
|
+
A(([n, r]) => (I.debug("activeDeviceObservable | RoomEvent.ActiveDeviceChanged", { kind: n, deviceId: r }), r))
|
|
3045
|
+
);
|
|
3046
|
+
}
|
|
3047
|
+
function _s(e, t) {
|
|
3048
|
+
return Te(e, y.ParticipantEncryptionStatusChanged).pipe(
|
|
3049
|
+
tt(
|
|
3050
|
+
([, n]) => (t == null ? void 0 : t.identity) === (n == null ? void 0 : n.identity) || !n && (t == null ? void 0 : t.identity) === e.localParticipant.identity
|
|
3051
|
+
),
|
|
3052
|
+
A(([n]) => n),
|
|
3053
|
+
U(
|
|
3054
|
+
t != null && t.isLocal ? t.isE2EEEnabled : !!(t != null && t.isEncrypted)
|
|
3055
|
+
)
|
|
3056
|
+
);
|
|
3057
|
+
}
|
|
3058
|
+
function ks(e) {
|
|
3059
|
+
return Te(e, y.RecordingStatusChanged).pipe(
|
|
3060
|
+
A(([t]) => t),
|
|
3061
|
+
U(e.isRecording)
|
|
3062
|
+
);
|
|
3063
|
+
}
|
|
3064
|
+
function Ee(e, ...t) {
|
|
3065
|
+
return new L((r) => {
|
|
3066
|
+
const i = () => {
|
|
3067
|
+
r.next(e);
|
|
3068
|
+
};
|
|
3069
|
+
return t.forEach((s) => {
|
|
3070
|
+
e.on(s, i);
|
|
3071
|
+
}), () => {
|
|
3072
|
+
t.forEach((s) => {
|
|
3073
|
+
e.off(s, i);
|
|
3074
|
+
});
|
|
3075
|
+
};
|
|
3076
|
+
}).pipe(U(e));
|
|
3077
|
+
}
|
|
3078
|
+
function Nn(e) {
|
|
3079
|
+
return Ee(
|
|
3080
|
+
e,
|
|
3081
|
+
w.TrackMuted,
|
|
3082
|
+
w.TrackUnmuted,
|
|
3083
|
+
w.ParticipantPermissionsChanged,
|
|
3084
|
+
// ParticipantEvent.IsSpeakingChanged,
|
|
3085
|
+
w.TrackPublished,
|
|
3086
|
+
w.TrackUnpublished,
|
|
3087
|
+
w.LocalTrackPublished,
|
|
3088
|
+
w.LocalTrackUnpublished,
|
|
3089
|
+
w.MediaDevicesError,
|
|
3090
|
+
w.TrackSubscriptionStatusChanged
|
|
3091
|
+
// ParticipantEvent.ConnectionQualityChanged,
|
|
3092
|
+
).pipe(
|
|
3093
|
+
A((n) => {
|
|
3094
|
+
const { isMicrophoneEnabled: r, isCameraEnabled: i, isScreenShareEnabled: o } = n, s = n.getTrackPublication($.Source.Microphone), a = n.getTrackPublication($.Source.Camera);
|
|
3095
|
+
return {
|
|
3096
|
+
isCameraEnabled: i,
|
|
3097
|
+
isMicrophoneEnabled: r,
|
|
3098
|
+
isScreenShareEnabled: o,
|
|
3099
|
+
cameraTrack: a,
|
|
3100
|
+
microphoneTrack: s,
|
|
3101
|
+
participant: n
|
|
3102
|
+
};
|
|
3103
|
+
})
|
|
3104
|
+
);
|
|
3105
|
+
}
|
|
3106
|
+
function Ro(e) {
|
|
3107
|
+
return e ? Ee(
|
|
3108
|
+
e,
|
|
3109
|
+
w.ParticipantMetadataChanged,
|
|
3110
|
+
w.ParticipantNameChanged
|
|
3111
|
+
).pipe(
|
|
3112
|
+
A(({ name: n, identity: r, metadata: i }) => ({
|
|
3113
|
+
name: n,
|
|
3114
|
+
identity: r,
|
|
3115
|
+
metadata: i
|
|
3116
|
+
})),
|
|
3117
|
+
U({
|
|
3118
|
+
name: e.name,
|
|
3119
|
+
identity: e.identity,
|
|
3120
|
+
metadata: e.metadata
|
|
3121
|
+
})
|
|
3122
|
+
) : void 0;
|
|
3123
|
+
}
|
|
3124
|
+
function Do(e) {
|
|
3125
|
+
return nt(
|
|
3126
|
+
e,
|
|
3127
|
+
w.ConnectionQualityChanged
|
|
3128
|
+
).pipe(
|
|
3129
|
+
A(([n]) => n),
|
|
3130
|
+
U(e.connectionQuality)
|
|
3131
|
+
);
|
|
3132
|
+
}
|
|
3133
|
+
function nt(e, t) {
|
|
3134
|
+
return new L((r) => {
|
|
3135
|
+
const i = (...s) => {
|
|
3136
|
+
r.next(s);
|
|
3137
|
+
};
|
|
3138
|
+
return e.on(t, i), () => {
|
|
3139
|
+
e.off(t, i);
|
|
3140
|
+
};
|
|
3141
|
+
});
|
|
3142
|
+
}
|
|
3143
|
+
function Fo(e) {
|
|
3144
|
+
var t, n, r, i;
|
|
3145
|
+
return Ee(
|
|
3146
|
+
e.participant,
|
|
3147
|
+
w.TrackMuted,
|
|
3148
|
+
w.TrackUnmuted,
|
|
3149
|
+
w.TrackSubscribed,
|
|
3150
|
+
w.TrackUnsubscribed,
|
|
3151
|
+
w.LocalTrackPublished,
|
|
3152
|
+
w.LocalTrackUnpublished
|
|
3153
|
+
).pipe(
|
|
3154
|
+
A((o) => {
|
|
3155
|
+
var s, a;
|
|
3156
|
+
const c = (s = e.publication) != null ? s : o.getTrackPublication(e.source);
|
|
3157
|
+
return (a = c == null ? void 0 : c.isMuted) != null ? a : !0;
|
|
3158
|
+
}),
|
|
3159
|
+
U(
|
|
3160
|
+
(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
|
|
3161
|
+
)
|
|
3162
|
+
);
|
|
3163
|
+
}
|
|
3164
|
+
function Ls(e) {
|
|
3165
|
+
return nt(e, w.IsSpeakingChanged).pipe(
|
|
3166
|
+
A(([t]) => t)
|
|
3167
|
+
);
|
|
3168
|
+
}
|
|
3169
|
+
function Is(e, t = {}) {
|
|
3170
|
+
var n;
|
|
3171
|
+
let r;
|
|
3172
|
+
const i = new L((c) => (r = c, () => a.unsubscribe())).pipe(U(Array.from(e.remoteParticipants.values()))), o = (n = t.additionalRoomEvents) != null ? n : kn, s = Array.from(
|
|
3173
|
+
/* @__PURE__ */ new Set([
|
|
3174
|
+
y.ParticipantConnected,
|
|
3175
|
+
y.ParticipantDisconnected,
|
|
3176
|
+
y.ConnectionStateChanged,
|
|
3177
|
+
...o
|
|
3178
|
+
])
|
|
3179
|
+
), a = ve(e, ...s).subscribe(
|
|
3180
|
+
(c) => r == null ? void 0 : r.next(Array.from(c.remoteParticipants.values()))
|
|
3181
|
+
);
|
|
3182
|
+
return e.remoteParticipants.size > 0 && (r == null || r.next(Array.from(e.remoteParticipants.values()))), i;
|
|
3183
|
+
}
|
|
3184
|
+
function Ms(e, t, n = {}) {
|
|
3185
|
+
var r;
|
|
3186
|
+
const i = (r = n.additionalEvents) != null ? r : Ln;
|
|
3187
|
+
return ve(
|
|
3188
|
+
e,
|
|
3189
|
+
y.ParticipantConnected,
|
|
3190
|
+
y.ParticipantDisconnected,
|
|
3191
|
+
y.ConnectionStateChanged
|
|
3192
|
+
).pipe(
|
|
3193
|
+
An((s) => {
|
|
3194
|
+
const a = s.getParticipantByIdentity(t);
|
|
3195
|
+
return a ? Ee(a, ...i) : new L((c) => c.next(void 0));
|
|
3196
|
+
}),
|
|
3197
|
+
U(e.getParticipantByIdentity(t))
|
|
3198
|
+
);
|
|
3199
|
+
}
|
|
3200
|
+
function Rs(e) {
|
|
3201
|
+
return nt(
|
|
3202
|
+
e,
|
|
3203
|
+
w.ParticipantPermissionsChanged
|
|
3204
|
+
).pipe(
|
|
3205
|
+
A(() => e.permissions),
|
|
3206
|
+
U(e.permissions)
|
|
3207
|
+
);
|
|
3208
|
+
}
|
|
3209
|
+
function Ds(e, { kind: t, identity: n }, r = {}) {
|
|
3210
|
+
var i;
|
|
3211
|
+
const o = (i = r.additionalEvents) != null ? i : Ln, s = (c) => {
|
|
3212
|
+
let u = !0;
|
|
3213
|
+
return t && (u = u && c.kind === t), n && (u = u && c.identity === n), u;
|
|
3214
|
+
};
|
|
3215
|
+
return ve(
|
|
3216
|
+
e,
|
|
3217
|
+
y.ParticipantConnected,
|
|
3218
|
+
y.ParticipantDisconnected,
|
|
3219
|
+
y.ConnectionStateChanged
|
|
3220
|
+
).pipe(
|
|
3221
|
+
An((c) => {
|
|
3222
|
+
const u = Array.from(c.remoteParticipants.values()).find(
|
|
3223
|
+
(l) => s(l)
|
|
3224
|
+
);
|
|
3225
|
+
return u ? Ee(u, ...o) : new L((l) => l.next(void 0));
|
|
3226
|
+
}),
|
|
3227
|
+
U(Array.from(e.remoteParticipants.values()).find((c) => s(c)))
|
|
3228
|
+
);
|
|
3229
|
+
}
|
|
3230
|
+
function Fs(e) {
|
|
3231
|
+
return typeof e > "u" ? new L() : nt(e, w.AttributesChanged).pipe(
|
|
3232
|
+
A(([t]) => ({
|
|
3233
|
+
changed: t,
|
|
3234
|
+
attributes: e.attributes
|
|
3235
|
+
})),
|
|
3236
|
+
U({ changed: e.attributes, attributes: e.attributes })
|
|
3237
|
+
);
|
|
3238
|
+
}
|
|
3239
|
+
function Ns(e, t, n, r, i) {
|
|
3240
|
+
const { localParticipant: o } = t, s = (f, v) => {
|
|
3241
|
+
let d = !1;
|
|
3242
|
+
switch (f) {
|
|
3243
|
+
case $.Source.Camera:
|
|
3244
|
+
d = v.isCameraEnabled;
|
|
3245
|
+
break;
|
|
3246
|
+
case $.Source.Microphone:
|
|
3247
|
+
d = v.isMicrophoneEnabled;
|
|
3248
|
+
break;
|
|
3249
|
+
case $.Source.ScreenShare:
|
|
3250
|
+
d = v.isScreenShareEnabled;
|
|
3251
|
+
break;
|
|
3252
|
+
}
|
|
3253
|
+
return d;
|
|
3254
|
+
}, a = Nn(o).pipe(
|
|
3255
|
+
A((f) => s(e, f.participant)),
|
|
3256
|
+
U(s(e, o))
|
|
3257
|
+
), c = new ie(), u = (f, v) => H(this, null, function* () {
|
|
3258
|
+
try {
|
|
3259
|
+
switch (v ?? (v = n), c.next(!0), e) {
|
|
3260
|
+
case $.Source.Camera:
|
|
3261
|
+
return yield o.setCameraEnabled(
|
|
3262
|
+
f ?? !o.isCameraEnabled,
|
|
3263
|
+
v,
|
|
3264
|
+
r
|
|
3265
|
+
), o.isCameraEnabled;
|
|
3266
|
+
case $.Source.Microphone:
|
|
3267
|
+
return yield o.setMicrophoneEnabled(
|
|
3268
|
+
f ?? !o.isMicrophoneEnabled,
|
|
3269
|
+
v,
|
|
3270
|
+
r
|
|
3271
|
+
), o.isMicrophoneEnabled;
|
|
3272
|
+
case $.Source.ScreenShare:
|
|
3273
|
+
return yield o.setScreenShareEnabled(
|
|
3274
|
+
f ?? !o.isScreenShareEnabled,
|
|
3275
|
+
v,
|
|
3276
|
+
r
|
|
3277
|
+
), o.isScreenShareEnabled;
|
|
3278
|
+
default:
|
|
3279
|
+
throw new TypeError("Tried to toggle unsupported source");
|
|
3280
|
+
}
|
|
3281
|
+
} catch (d) {
|
|
3282
|
+
if (i && d instanceof Error) {
|
|
3283
|
+
i == null || i(d);
|
|
3284
|
+
return;
|
|
3285
|
+
} else
|
|
3286
|
+
throw d;
|
|
3287
|
+
} finally {
|
|
3288
|
+
c.next(!1);
|
|
3289
|
+
}
|
|
3290
|
+
});
|
|
3291
|
+
return {
|
|
3292
|
+
className: Y("button"),
|
|
3293
|
+
toggle: u,
|
|
3294
|
+
enabledObserver: a,
|
|
3295
|
+
pendingObserver: c.asObservable()
|
|
3296
|
+
};
|
|
3297
|
+
}
|
|
3298
|
+
function $s() {
|
|
3299
|
+
let e = !1;
|
|
3300
|
+
const t = new ie(), n = new ie(), r = (o) => H(this, null, function* () {
|
|
3301
|
+
n.next(!0), e = o ?? !e, t.next(e), n.next(!1);
|
|
3302
|
+
});
|
|
3303
|
+
return {
|
|
3304
|
+
className: Y("button"),
|
|
3305
|
+
toggle: r,
|
|
3306
|
+
enabledObserver: t.asObservable(),
|
|
3307
|
+
pendingObserver: n.asObservable()
|
|
3308
|
+
};
|
|
3309
|
+
}
|
|
3310
|
+
function Us(e, t, n) {
|
|
3311
|
+
const r = new vn(void 0), i = Mo(t, e), o = (a, ...c) => H(this, [a, ...c], function* (u, l = {}) {
|
|
3312
|
+
var f, v, d;
|
|
3313
|
+
if (t) {
|
|
3314
|
+
const m = Jn();
|
|
3315
|
+
if (e === "audiooutput" && ((m == null ? void 0 : m.name) === "Safari" || (m == null ? void 0 : m.os) === "iOS")) {
|
|
3316
|
+
I.warn("Switching audio output device is not supported on Safari and iOS.");
|
|
3317
|
+
return;
|
|
3318
|
+
}
|
|
3319
|
+
I.debug(`Switching active device of kind "${e}" with id ${u}.`), yield t.switchActiveDevice(e, u, l.exact);
|
|
3320
|
+
const p = (f = t.getActiveDevice(e)) != null ? f : u;
|
|
3321
|
+
p !== u && u !== "default" && I.info(
|
|
3322
|
+
`We tried to select the device with id (${u}), but the browser decided to select the device with id (${p}) instead.`
|
|
3323
|
+
);
|
|
3324
|
+
let g;
|
|
3325
|
+
e === "audioinput" ? g = (v = t.localParticipant.getTrackPublication($.Source.Microphone)) == null ? void 0 : v.track : e === "videoinput" && (g = (d = t.localParticipant.getTrackPublication($.Source.Camera)) == null ? void 0 : d.track);
|
|
3326
|
+
const h = u === "default" && !g || u === "default" && (g == null ? void 0 : g.mediaStreamTrack.label.startsWith("Default"));
|
|
3327
|
+
r.next(h ? u : p);
|
|
3328
|
+
}
|
|
3329
|
+
});
|
|
3330
|
+
return {
|
|
3331
|
+
className: Y("media-device-select"),
|
|
3332
|
+
activeDeviceObservable: i,
|
|
3333
|
+
setActiveMediaDevice: o
|
|
3334
|
+
};
|
|
3335
|
+
}
|
|
3336
|
+
function Ws(e) {
|
|
3337
|
+
const t = (r) => {
|
|
3338
|
+
e.disconnect(r);
|
|
3339
|
+
};
|
|
3340
|
+
return { className: Y("disconnect-button"), disconnect: t };
|
|
3341
|
+
}
|
|
3342
|
+
function Bs(e) {
|
|
3343
|
+
const t = Y("connection-quality"), n = Do(e);
|
|
3344
|
+
return { className: t, connectionQualityObserver: n };
|
|
3345
|
+
}
|
|
3346
|
+
function js(e) {
|
|
3347
|
+
let t = "track-muted-indicator-camera";
|
|
3348
|
+
switch (e.source) {
|
|
3349
|
+
case $.Source.Camera:
|
|
3350
|
+
t = "track-muted-indicator-camera";
|
|
3351
|
+
break;
|
|
3352
|
+
case $.Source.Microphone:
|
|
3353
|
+
t = "track-muted-indicator-microphone";
|
|
3354
|
+
break;
|
|
3355
|
+
}
|
|
3356
|
+
const n = Y(t), r = Fo(e);
|
|
3357
|
+
return { className: n, mediaMutedObserver: r };
|
|
3358
|
+
}
|
|
3359
|
+
function Vs(e) {
|
|
3360
|
+
return { className: "lk-participant-name", infoObserver: Ro(e) };
|
|
3361
|
+
}
|
|
3362
|
+
function Hs() {
|
|
3363
|
+
return {
|
|
3364
|
+
className: Y("participant-tile")
|
|
3365
|
+
};
|
|
3366
|
+
}
|
|
3367
|
+
var No = {
|
|
3368
|
+
CHAT: "lk.chat",
|
|
3369
|
+
TRANSCRIPTION: "lk.transcription"
|
|
3370
|
+
}, $o = {
|
|
3371
|
+
CHAT: "lk-chat-topic"
|
|
3372
|
+
};
|
|
3373
|
+
function $n(e, t) {
|
|
3374
|
+
return H(this, arguments, function* (n, r, i = {}) {
|
|
3375
|
+
const { reliable: o, destinationIdentities: s, topic: a } = i;
|
|
3376
|
+
yield n.publishData(r, {
|
|
3377
|
+
destinationIdentities: s,
|
|
3378
|
+
topic: a,
|
|
3379
|
+
reliable: o
|
|
3380
|
+
});
|
|
3381
|
+
});
|
|
3382
|
+
}
|
|
3383
|
+
function Uo(e, t, n) {
|
|
3384
|
+
const r = Array.isArray(t) ? t : [t], i = ko(e).pipe(
|
|
3385
|
+
tt(
|
|
3386
|
+
([, , , c]) => t === void 0 || c !== void 0 && r.includes(c)
|
|
3387
|
+
),
|
|
3388
|
+
A(([c, u, , l]) => {
|
|
3389
|
+
const f = {
|
|
3390
|
+
payload: c,
|
|
3391
|
+
topic: l,
|
|
3392
|
+
from: u
|
|
3393
|
+
};
|
|
3394
|
+
return n == null || n(f), f;
|
|
3395
|
+
})
|
|
3396
|
+
);
|
|
3397
|
+
let o;
|
|
3398
|
+
const s = new L((c) => {
|
|
3399
|
+
o = c;
|
|
3400
|
+
});
|
|
3401
|
+
return { messageObservable: i, isSendingObservable: s, send: (c, ...u) => H(this, [c, ...u], function* (l, f = {}) {
|
|
3402
|
+
o.next(!0);
|
|
3403
|
+
try {
|
|
3404
|
+
yield $n(e.localParticipant, l, X({ topic: r[0] }, f));
|
|
3405
|
+
} finally {
|
|
3406
|
+
o.next(!1);
|
|
3407
|
+
}
|
|
3408
|
+
}) };
|
|
3409
|
+
}
|
|
3410
|
+
var Wo = class {
|
|
3411
|
+
constructor(e, t) {
|
|
3412
|
+
this._isResolved = !1, this.onFinally = t, this.promise = new Promise((n, r) => H(this, null, function* () {
|
|
3413
|
+
this.resolve = n, this.reject = r, e && (yield e(n, r));
|
|
3414
|
+
})).finally(() => {
|
|
3415
|
+
var n;
|
|
3416
|
+
this._isResolved = !0, (n = this.onFinally) == null || n.call(this);
|
|
3417
|
+
});
|
|
3418
|
+
}
|
|
3419
|
+
get isResolved() {
|
|
3420
|
+
return this._isResolved;
|
|
3421
|
+
}
|
|
3422
|
+
}, Re = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new Map();
|
|
3423
|
+
function Bo(e) {
|
|
3424
|
+
return e.ignoreLegacy == !0;
|
|
3425
|
+
}
|
|
3426
|
+
var jo = (e) => JSON.parse(new TextDecoder().decode(e)), Vo = (e) => new TextEncoder().encode(JSON.stringify(e));
|
|
3427
|
+
function zs(e, t) {
|
|
3428
|
+
var n, r, i, o, s, a;
|
|
3429
|
+
const c = () => {
|
|
3430
|
+
var b, S, C;
|
|
3431
|
+
return ((b = e.serverInfo) == null ? void 0 : b.edition) === 1 || !!((S = e.serverInfo) != null && S.version) && Xn((C = e.serverInfo) == null ? void 0 : C.version, "1.8.2") > 0;
|
|
3432
|
+
}, u = new ie(), l = (n = t == null ? void 0 : t.channelTopic) != null ? n : No.CHAT, f = (r = t == null ? void 0 : t.channelTopic) != null ? r : $o.CHAT;
|
|
3433
|
+
let v = !1;
|
|
3434
|
+
Re.has(e) || (v = !0);
|
|
3435
|
+
const d = (i = Re.get(e)) != null ? i : /* @__PURE__ */ new Map(), m = (o = d.get(l)) != null ? o : new ie();
|
|
3436
|
+
d.set(l, m), Re.set(e, d);
|
|
3437
|
+
const p = (s = t == null ? void 0 : t.messageDecoder) != null ? s : jo;
|
|
3438
|
+
if (v) {
|
|
3439
|
+
e.registerTextStreamHandler(l, (S, C) => H(this, null, function* () {
|
|
3440
|
+
const { id: M, timestamp: R, attributes: W, attachedStreamIds: T } = S.info, P = new Map(
|
|
3441
|
+
(T ?? []).map((k) => [
|
|
3442
|
+
k,
|
|
3443
|
+
new Wo()
|
|
3444
|
+
])
|
|
3445
|
+
);
|
|
3446
|
+
De.set(M, P), be(S).pipe(
|
|
3447
|
+
$e((k, F) => k + F),
|
|
3448
|
+
Ae((k) => P.size === 0 ? dt({ chunk: k, attachedFiles: [] }) : be(P.values()).pipe(
|
|
3449
|
+
Ae((F) => be(F.promise)),
|
|
3450
|
+
$e(
|
|
3451
|
+
(F, G) => [...F, new File(G.buffer, G.fileName)],
|
|
3452
|
+
[]
|
|
3453
|
+
),
|
|
3454
|
+
A((F) => ({ chunk: k, attachedFiles: F }))
|
|
3455
|
+
)),
|
|
3456
|
+
A(({ chunk: k, attachedFiles: F }) => ({
|
|
3457
|
+
id: M,
|
|
3458
|
+
timestamp: R,
|
|
3459
|
+
message: k,
|
|
3460
|
+
from: e.getParticipantByIdentity(C.identity),
|
|
3461
|
+
type: "chatMessage",
|
|
3462
|
+
attributes: W,
|
|
3463
|
+
attachedFiles: F
|
|
3464
|
+
// editTimestamp: type === 'update' ? timestamp : undefined,
|
|
3465
|
+
})),
|
|
3466
|
+
Qi(() => De.delete(M))
|
|
3467
|
+
).subscribe({
|
|
3468
|
+
next: (k) => m.next(k)
|
|
3469
|
+
});
|
|
3470
|
+
})), e.registerByteStreamHandler(l, (S) => H(this, null, function* () {
|
|
3471
|
+
var C, M;
|
|
3472
|
+
const { id: R } = S.info, W = Array.from(De).find(
|
|
3473
|
+
([, N]) => N.has(R)
|
|
3474
|
+
);
|
|
3475
|
+
if (!W)
|
|
3476
|
+
return;
|
|
3477
|
+
const T = W[0], P = [];
|
|
3478
|
+
try {
|
|
3479
|
+
for (var j = oo(S), k, F, G; k = !(F = yield j.next()).done; k = !1) {
|
|
3480
|
+
const N = F.value;
|
|
3481
|
+
P.push(N);
|
|
3482
|
+
}
|
|
3483
|
+
} catch (N) {
|
|
3484
|
+
G = [N];
|
|
3485
|
+
} finally {
|
|
3486
|
+
try {
|
|
3487
|
+
k && (F = j.return) && (yield F.call(j));
|
|
3488
|
+
} finally {
|
|
3489
|
+
if (G)
|
|
3490
|
+
throw G[0];
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
const J = (C = De.get(T)) == null ? void 0 : C.get(R);
|
|
3494
|
+
J && ((M = J.resolve) == null || M.call(J, {
|
|
3495
|
+
fileName: S.info.name,
|
|
3496
|
+
buffer: P
|
|
3497
|
+
}));
|
|
3498
|
+
}));
|
|
3499
|
+
const { messageObservable: b } = Uo(e, [f]);
|
|
3500
|
+
b.pipe(
|
|
3501
|
+
A((S) => {
|
|
3502
|
+
const C = p(S.payload);
|
|
3503
|
+
return Bo(C) ? void 0 : le(X({}, C), {
|
|
3504
|
+
type: "chatMessage",
|
|
3505
|
+
from: S.from
|
|
3506
|
+
});
|
|
3507
|
+
}),
|
|
3508
|
+
tt((S) => !!S),
|
|
3509
|
+
Bt(u)
|
|
3510
|
+
).subscribe(m);
|
|
3511
|
+
}
|
|
3512
|
+
const g = m.pipe(
|
|
3513
|
+
$e((b, S) => {
|
|
3514
|
+
if ("id" in S && b.find((C) => {
|
|
3515
|
+
var M, R;
|
|
3516
|
+
return ((M = C.from) == null ? void 0 : M.identity) === ((R = S.from) == null ? void 0 : R.identity) && C.id === S.id;
|
|
3517
|
+
})) {
|
|
3518
|
+
const C = b.findIndex((M) => M.id === S.id);
|
|
3519
|
+
if (C > -1) {
|
|
3520
|
+
const M = b[C];
|
|
3521
|
+
b[C] = le(X({}, S), {
|
|
3522
|
+
timestamp: M.timestamp,
|
|
3523
|
+
editTimestamp: S.timestamp
|
|
3524
|
+
});
|
|
3525
|
+
}
|
|
3526
|
+
return [...b];
|
|
3527
|
+
}
|
|
3528
|
+
return [...b, S];
|
|
3529
|
+
}, []),
|
|
3530
|
+
Bt(u)
|
|
3531
|
+
), h = new vn(!1), x = (a = t == null ? void 0 : t.messageEncoder) != null ? a : Vo, E = (b, S) => H(this, null, function* () {
|
|
3532
|
+
var C;
|
|
3533
|
+
S || (S = {}), (C = S.topic) != null || (S.topic = l), h.next(!0);
|
|
3534
|
+
try {
|
|
3535
|
+
const R = {
|
|
3536
|
+
id: (yield e.localParticipant.sendText(b, S)).id,
|
|
3537
|
+
timestamp: Date.now(),
|
|
3538
|
+
message: b
|
|
3539
|
+
}, W = le(X({}, R), {
|
|
3540
|
+
attachedFiles: S.attachments
|
|
3541
|
+
}), T = le(X({}, W), {
|
|
3542
|
+
type: "chatMessage",
|
|
3543
|
+
from: e.localParticipant,
|
|
3544
|
+
attributes: S.attributes
|
|
3545
|
+
});
|
|
3546
|
+
m.next(T);
|
|
3547
|
+
const P = x(le(X({}, R), {
|
|
3548
|
+
ignoreLegacy: c()
|
|
3549
|
+
}));
|
|
3550
|
+
try {
|
|
3551
|
+
yield $n(e.localParticipant, P, {
|
|
3552
|
+
reliable: !0,
|
|
3553
|
+
topic: f
|
|
3554
|
+
});
|
|
3555
|
+
} catch (j) {
|
|
3556
|
+
I.info("could not send message in legacy chat format", j);
|
|
3557
|
+
}
|
|
3558
|
+
return T;
|
|
3559
|
+
} finally {
|
|
3560
|
+
h.next(!1);
|
|
3561
|
+
}
|
|
3562
|
+
});
|
|
3563
|
+
function _() {
|
|
3564
|
+
u.next(), u.complete(), m.complete(), Re.delete(e), e.unregisterTextStreamHandler(l), e.unregisterByteStreamHandler(l);
|
|
3565
|
+
}
|
|
3566
|
+
return e.once(y.Disconnected, _), {
|
|
3567
|
+
messageObservable: g,
|
|
3568
|
+
isSendingObservable: h,
|
|
3569
|
+
send: E
|
|
3570
|
+
};
|
|
3571
|
+
}
|
|
3572
|
+
function Ys() {
|
|
3573
|
+
const e = (n) => H(this, null, function* () {
|
|
3574
|
+
I.info("Start Audio for room: ", n), yield n.startAudio();
|
|
3575
|
+
});
|
|
3576
|
+
return { className: Y("start-audio-button"), roomAudioPlaybackAllowedObservable: Lo, handleStartAudioPlayback: e };
|
|
3577
|
+
}
|
|
3578
|
+
function qs() {
|
|
3579
|
+
const e = (n) => H(this, null, function* () {
|
|
3580
|
+
I.info("Start Video for room: ", n), yield n.startVideo();
|
|
3581
|
+
});
|
|
3582
|
+
return { className: Y("start-audio-button"), roomVideoPlaybackAllowedObservable: Io, handleStartVideoPlayback: e };
|
|
3583
|
+
}
|
|
3584
|
+
function Ks() {
|
|
3585
|
+
return { className: [Y("button"), Y("chat-toggle")].join(" ") };
|
|
3586
|
+
}
|
|
3587
|
+
function Gs() {
|
|
3588
|
+
return { className: [Y("button"), Y("focus-toggle-button")].join(" ") };
|
|
3589
|
+
}
|
|
3590
|
+
function Qs() {
|
|
3591
|
+
return { className: "lk-clear-pin-button lk-button" };
|
|
3592
|
+
}
|
|
3593
|
+
function Js() {
|
|
3594
|
+
return { className: "lk-room-container" };
|
|
3595
|
+
}
|
|
3596
|
+
function Kt(e, t, n = !0) {
|
|
3597
|
+
const i = [e.localParticipant, ...Array.from(e.remoteParticipants.values())], o = [];
|
|
3598
|
+
return i.forEach((s) => {
|
|
3599
|
+
t.forEach((a) => {
|
|
3600
|
+
const c = Array.from(
|
|
3601
|
+
s.trackPublications.values()
|
|
3602
|
+
).filter(
|
|
3603
|
+
(u) => u.source === a && // either return all or only the ones that are subscribed
|
|
3604
|
+
(!n || u.track)
|
|
3605
|
+
).map((u) => ({
|
|
3606
|
+
participant: s,
|
|
3607
|
+
publication: u,
|
|
3608
|
+
source: u.source
|
|
3609
|
+
}));
|
|
3610
|
+
o.push(...c);
|
|
3611
|
+
});
|
|
3612
|
+
}), { trackReferences: o, participants: i };
|
|
3613
|
+
}
|
|
3614
|
+
function Gt(e, t, n = !1) {
|
|
3615
|
+
const { sources: r, kind: i, name: o } = t;
|
|
3616
|
+
return Array.from(e.trackPublications.values()).filter(
|
|
3617
|
+
(a) => (!r || r.includes(a.source)) && (!i || a.kind === i) && (!o || a.trackName === o) && // either return all or only the ones that are subscribed
|
|
3618
|
+
(!n || a.track)
|
|
3619
|
+
).map((a) => ({
|
|
3620
|
+
participant: e,
|
|
3621
|
+
publication: a,
|
|
3622
|
+
source: a.source
|
|
3623
|
+
}));
|
|
3624
|
+
}
|
|
3625
|
+
function Xs(e, t, n) {
|
|
3626
|
+
var r, i;
|
|
3627
|
+
const o = (r = n.additionalRoomEvents) != null ? r : kn, s = (i = n.onlySubscribed) != null ? i : !0, a = Array.from(
|
|
3628
|
+
(/* @__PURE__ */ new Set([
|
|
3629
|
+
y.ParticipantConnected,
|
|
3630
|
+
y.ParticipantDisconnected,
|
|
3631
|
+
y.ConnectionStateChanged,
|
|
3632
|
+
y.LocalTrackPublished,
|
|
3633
|
+
y.LocalTrackUnpublished,
|
|
3634
|
+
y.TrackPublished,
|
|
3635
|
+
y.TrackUnpublished,
|
|
3636
|
+
y.TrackSubscriptionStatusChanged,
|
|
3637
|
+
...o
|
|
3638
|
+
])).values()
|
|
3639
|
+
);
|
|
3640
|
+
return ve(e, ...a).pipe(
|
|
3641
|
+
A((u) => {
|
|
3642
|
+
const l = Kt(u, t, s);
|
|
3643
|
+
return I.debug(`TrackReference[] was updated. (length ${l.trackReferences.length})`, l), l;
|
|
3644
|
+
}),
|
|
3645
|
+
U(Kt(e, t, s))
|
|
3646
|
+
);
|
|
3647
|
+
}
|
|
3648
|
+
function Zs(e, t) {
|
|
3649
|
+
return Ee(e, ...po).pipe(
|
|
3650
|
+
A((r) => {
|
|
3651
|
+
const i = Gt(r, t);
|
|
3652
|
+
return I.debug(`TrackReference[] was updated. (length ${i.length})`, i), i;
|
|
3653
|
+
}),
|
|
3654
|
+
U(Gt(e, t))
|
|
3655
|
+
);
|
|
3656
|
+
}
|
|
3657
|
+
function Un(e, t) {
|
|
3658
|
+
return new L((r) => {
|
|
3659
|
+
const i = (...s) => {
|
|
3660
|
+
r.next(s);
|
|
3661
|
+
};
|
|
3662
|
+
return e.on(t, i), () => {
|
|
3663
|
+
e.off(t, i);
|
|
3664
|
+
};
|
|
3665
|
+
});
|
|
3666
|
+
}
|
|
3667
|
+
function ea(e) {
|
|
3668
|
+
return Un(e, Jt.TranscriptionReceived);
|
|
3669
|
+
}
|
|
3670
|
+
function ta(e) {
|
|
3671
|
+
return Un(e, Jt.TimeSyncUpdate).pipe(
|
|
3672
|
+
A(([t]) => t)
|
|
3673
|
+
);
|
|
3674
|
+
}
|
|
3675
|
+
function na(e, t = 1e3) {
|
|
3676
|
+
if (e === null) return dt(!1);
|
|
3677
|
+
const n = pt(e, "mousemove", { passive: !0 }).pipe(A(() => !0)), r = n.pipe(
|
|
3678
|
+
Mi({
|
|
3679
|
+
each: t,
|
|
3680
|
+
with: () => ze(dt(!1), r.pipe(Xi(n)))
|
|
3681
|
+
}),
|
|
3682
|
+
Ki()
|
|
3683
|
+
);
|
|
3684
|
+
return r;
|
|
3685
|
+
}
|
|
3686
|
+
function Ho(e, t) {
|
|
3687
|
+
if (typeof localStorage > "u") {
|
|
3688
|
+
I.error("Local storage is not available.");
|
|
3689
|
+
return;
|
|
3690
|
+
}
|
|
3691
|
+
try {
|
|
3692
|
+
if (t) {
|
|
3693
|
+
const n = Object.fromEntries(
|
|
3694
|
+
Object.entries(t).filter(([, r]) => r !== "")
|
|
3695
|
+
);
|
|
3696
|
+
localStorage.setItem(e, JSON.stringify(n));
|
|
3697
|
+
}
|
|
3698
|
+
} catch (n) {
|
|
3699
|
+
I.error(`Error setting item to local storage: ${n}`);
|
|
3700
|
+
}
|
|
3701
|
+
}
|
|
3702
|
+
function zo(e) {
|
|
3703
|
+
if (typeof localStorage > "u") {
|
|
3704
|
+
I.error("Local storage is not available.");
|
|
3705
|
+
return;
|
|
3706
|
+
}
|
|
3707
|
+
try {
|
|
3708
|
+
const t = localStorage.getItem(e);
|
|
3709
|
+
if (!t) {
|
|
3710
|
+
I.warn(`Item with key ${e} does not exist in local storage.`);
|
|
3711
|
+
return;
|
|
3712
|
+
}
|
|
3713
|
+
return JSON.parse(t);
|
|
3714
|
+
} catch (t) {
|
|
3715
|
+
I.error(`Error getting item from local storage: ${t}`);
|
|
3716
|
+
return;
|
|
3717
|
+
}
|
|
3718
|
+
}
|
|
3719
|
+
function Yo(e) {
|
|
3720
|
+
return {
|
|
3721
|
+
load: () => zo(e),
|
|
3722
|
+
save: (t) => Ho(e, t)
|
|
3723
|
+
};
|
|
3724
|
+
}
|
|
3725
|
+
var qo = `${_n}-user-choices`, Ce = {
|
|
3726
|
+
videoEnabled: !0,
|
|
3727
|
+
audioEnabled: !0,
|
|
3728
|
+
videoDeviceId: "default",
|
|
3729
|
+
audioDeviceId: "default",
|
|
3730
|
+
username: ""
|
|
3731
|
+
}, { load: Ko, save: Go } = Yo(qo);
|
|
3732
|
+
function ra(e, t = !1) {
|
|
3733
|
+
t !== !0 && Go(e);
|
|
3734
|
+
}
|
|
3735
|
+
function ia(e, t = !1) {
|
|
3736
|
+
var n, r, i, o, s;
|
|
3737
|
+
const a = {
|
|
3738
|
+
videoEnabled: (n = e == null ? void 0 : e.videoEnabled) != null ? n : Ce.videoEnabled,
|
|
3739
|
+
audioEnabled: (r = e == null ? void 0 : e.audioEnabled) != null ? r : Ce.audioEnabled,
|
|
3740
|
+
videoDeviceId: (i = e == null ? void 0 : e.videoDeviceId) != null ? i : Ce.videoDeviceId,
|
|
3741
|
+
audioDeviceId: (o = e == null ? void 0 : e.audioDeviceId) != null ? o : Ce.audioDeviceId,
|
|
3742
|
+
username: (s = e == null ? void 0 : e.username) != null ? s : Ce.username
|
|
3743
|
+
};
|
|
3744
|
+
if (t)
|
|
3745
|
+
return a;
|
|
3746
|
+
{
|
|
3747
|
+
const c = Ko();
|
|
3748
|
+
return X(X({}, a), c ?? {});
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
var at = null, ct = null, Qo = 0;
|
|
3752
|
+
function Qt() {
|
|
3753
|
+
return at || (at = /* @__PURE__ */ new Map()), at;
|
|
3754
|
+
}
|
|
3755
|
+
function Jo() {
|
|
3756
|
+
return ct || (ct = /* @__PURE__ */ new WeakMap()), ct;
|
|
3757
|
+
}
|
|
3758
|
+
function Xo(e, t) {
|
|
3759
|
+
const n = Jo();
|
|
3760
|
+
let r = n.get(e);
|
|
3761
|
+
return r || (r = `room_${Qo++}`, n.set(e, r)), `${r}:${t}`;
|
|
3762
|
+
}
|
|
3763
|
+
function oa(e, t) {
|
|
3764
|
+
const n = Xo(e, t), r = Qt(), i = r.get(n);
|
|
3765
|
+
if (i)
|
|
3766
|
+
return i;
|
|
3767
|
+
const o = new ie();
|
|
3768
|
+
let s = [];
|
|
3769
|
+
const a = "lk.segment_id", c = o.pipe(
|
|
3770
|
+
Zi({
|
|
3771
|
+
subscribe: () => {
|
|
3772
|
+
e.registerTextStreamHandler(t, (u, l) => H(this, null, function* () {
|
|
3773
|
+
var f;
|
|
3774
|
+
const v = be(u).pipe(
|
|
3775
|
+
$e((m, p) => m + p, "")
|
|
3776
|
+
), d = !!((f = u.info.attributes) != null && f[a]);
|
|
3777
|
+
v.subscribe((m) => {
|
|
3778
|
+
const p = s.findIndex(
|
|
3779
|
+
(g) => {
|
|
3780
|
+
var h, x;
|
|
3781
|
+
return g.streamInfo.id === u.info.id || d && ((h = g.streamInfo.attributes) == null ? void 0 : h[a]) === ((x = u.info.attributes) == null ? void 0 : x[a]);
|
|
3782
|
+
}
|
|
3783
|
+
);
|
|
3784
|
+
p !== -1 ? (s[p] = le(X({}, s[p]), {
|
|
3785
|
+
text: m
|
|
3786
|
+
}), o.next([...s])) : (s.push({
|
|
3787
|
+
text: m,
|
|
3788
|
+
participantInfo: l,
|
|
3789
|
+
streamInfo: u.info
|
|
3790
|
+
}), o.next([...s]));
|
|
3791
|
+
});
|
|
3792
|
+
}));
|
|
3793
|
+
},
|
|
3794
|
+
finalize: () => {
|
|
3795
|
+
e.unregisterTextStreamHandler(t);
|
|
3796
|
+
}
|
|
3797
|
+
}),
|
|
3798
|
+
Ji()
|
|
3799
|
+
);
|
|
3800
|
+
return r.set(n, c), e.on(y.Disconnected, () => {
|
|
3801
|
+
Qt().delete(n), s = [], o.next([]);
|
|
3802
|
+
}), c;
|
|
3803
|
+
}
|
|
3804
|
+
function Wn(e, t) {
|
|
3805
|
+
if (t.msg === "show_chat")
|
|
3806
|
+
return { ...e, showChat: !0, unreadMessages: 0 };
|
|
3807
|
+
if (t.msg === "hide_chat")
|
|
3808
|
+
return { ...e, showChat: !1 };
|
|
3809
|
+
if (t.msg === "toggle_chat") {
|
|
3810
|
+
const n = { ...e, showChat: !e.showChat };
|
|
3811
|
+
return n.showChat === !0 && (n.unreadMessages = 0), n;
|
|
3812
|
+
} else return t.msg === "unread_msg" ? { ...e, unreadMessages: t.count } : t.msg === "toggle_settings" ? { ...e, showSettings: !e.showSettings } : { ...e };
|
|
3813
|
+
}
|
|
3814
|
+
function Bn(e, t) {
|
|
3815
|
+
return t.msg === "set_pin" ? [t.trackReference] : t.msg === "clear_pin" ? [] : { ...e };
|
|
3816
|
+
}
|
|
3817
|
+
const jn = D.createContext(void 0);
|
|
3818
|
+
function sa() {
|
|
3819
|
+
const e = D.useContext(jn);
|
|
3820
|
+
if (!e)
|
|
3821
|
+
throw Error("Tried to access LayoutContext context outside a LayoutContextProvider provider.");
|
|
3822
|
+
return e;
|
|
3823
|
+
}
|
|
3824
|
+
function aa(e) {
|
|
3825
|
+
const t = Zo();
|
|
3826
|
+
if (e ?? (e = t), !e)
|
|
3827
|
+
throw Error("Tried to access LayoutContext context outside a LayoutContextProvider provider.");
|
|
3828
|
+
return e;
|
|
3829
|
+
}
|
|
3830
|
+
function ca() {
|
|
3831
|
+
const [e, t] = D.useReducer(Bn, In), [n, r] = D.useReducer(Wn, Mn);
|
|
3832
|
+
return {
|
|
3833
|
+
pin: { dispatch: t, state: e },
|
|
3834
|
+
widget: { dispatch: r, state: n }
|
|
3835
|
+
};
|
|
3836
|
+
}
|
|
3837
|
+
function ua(e) {
|
|
3838
|
+
const [t, n] = D.useReducer(Bn, In), [r, i] = D.useReducer(Wn, Mn);
|
|
3839
|
+
return e ?? {
|
|
3840
|
+
pin: { dispatch: n, state: t },
|
|
3841
|
+
widget: { dispatch: i, state: r }
|
|
3842
|
+
};
|
|
3843
|
+
}
|
|
3844
|
+
function Zo() {
|
|
3845
|
+
return D.useContext(jn);
|
|
3846
|
+
}
|
|
3847
|
+
const Vn = D.createContext(
|
|
3848
|
+
void 0
|
|
3849
|
+
);
|
|
3850
|
+
function la() {
|
|
3851
|
+
const e = D.useContext(Vn);
|
|
3852
|
+
if (!e)
|
|
3853
|
+
throw Error("tried to access track context outside of track context provider");
|
|
3854
|
+
return e;
|
|
3855
|
+
}
|
|
3856
|
+
function Hn() {
|
|
3857
|
+
return D.useContext(Vn);
|
|
3858
|
+
}
|
|
3859
|
+
function fa(e) {
|
|
3860
|
+
const t = Hn(), n = e ?? t;
|
|
3861
|
+
if (!n)
|
|
3862
|
+
throw new Error(
|
|
3863
|
+
"No TrackRef, make sure you are inside a TrackRefContext or pass the TrackRef explicitly"
|
|
3864
|
+
);
|
|
3865
|
+
return n;
|
|
3866
|
+
}
|
|
3867
|
+
const zn = D.createContext(void 0);
|
|
3868
|
+
function da() {
|
|
3869
|
+
const e = D.useContext(zn);
|
|
3870
|
+
if (!e)
|
|
3871
|
+
throw Error("tried to access participant context outside of participant context provider");
|
|
3872
|
+
return e;
|
|
3873
|
+
}
|
|
3874
|
+
function es() {
|
|
3875
|
+
return D.useContext(zn);
|
|
3876
|
+
}
|
|
3877
|
+
function pa(e) {
|
|
3878
|
+
const t = es(), n = Hn(), r = e ?? t ?? (n == null ? void 0 : n.participant);
|
|
3879
|
+
if (!r)
|
|
3880
|
+
throw new Error(
|
|
3881
|
+
"No participant provided, make sure you are inside a participant context or pass the participant explicitly"
|
|
3882
|
+
);
|
|
3883
|
+
return r;
|
|
3884
|
+
}
|
|
3885
|
+
const Yn = D.createContext(void 0);
|
|
3886
|
+
function ha() {
|
|
3887
|
+
const e = D.useContext(Yn);
|
|
3888
|
+
if (!e)
|
|
3889
|
+
throw Error("tried to access room context outside of livekit room component");
|
|
3890
|
+
return e;
|
|
3891
|
+
}
|
|
3892
|
+
function ts() {
|
|
3893
|
+
return D.useContext(Yn);
|
|
3894
|
+
}
|
|
3895
|
+
function va(e) {
|
|
3896
|
+
const t = ts(), n = e ?? t;
|
|
3897
|
+
if (!n)
|
|
3898
|
+
throw new Error(
|
|
3899
|
+
"No room provided, make sure you are inside a Room context or pass the room explicitly"
|
|
3900
|
+
);
|
|
3901
|
+
return n;
|
|
3902
|
+
}
|
|
3903
|
+
const qn = D.createContext(void 0);
|
|
3904
|
+
function ma() {
|
|
3905
|
+
const e = D.useContext(qn);
|
|
3906
|
+
if (!e)
|
|
3907
|
+
throw Error("tried to access session context outside of SessionProvider component");
|
|
3908
|
+
return e;
|
|
3909
|
+
}
|
|
3910
|
+
function ns() {
|
|
3911
|
+
return D.useContext(qn);
|
|
3912
|
+
}
|
|
3913
|
+
function ga(e) {
|
|
3914
|
+
const t = ns(), n = e ?? t;
|
|
3915
|
+
if (!n)
|
|
3916
|
+
throw new Error(
|
|
3917
|
+
"No session provided, make sure you are inside a Session context or pass the session explicitly"
|
|
3918
|
+
);
|
|
3919
|
+
return n;
|
|
3920
|
+
}
|
|
3921
|
+
const rs = D.createContext(void 0);
|
|
3922
|
+
function ba(e) {
|
|
3923
|
+
const t = D.useContext(rs);
|
|
3924
|
+
if (e === !0) {
|
|
3925
|
+
if (t)
|
|
3926
|
+
return t;
|
|
3927
|
+
throw Error("tried to access feature context, but none is present");
|
|
3928
|
+
}
|
|
3929
|
+
return t;
|
|
3930
|
+
}
|
|
3931
|
+
export {
|
|
3932
|
+
ra as $,
|
|
3933
|
+
Ts as A,
|
|
3934
|
+
es as B,
|
|
3935
|
+
Ro as C,
|
|
3936
|
+
Hs as D,
|
|
3937
|
+
Is as E,
|
|
3938
|
+
aa as F,
|
|
3939
|
+
ms as G,
|
|
3940
|
+
Ms as H,
|
|
3941
|
+
Ds as I,
|
|
3942
|
+
Ps as J,
|
|
3943
|
+
Os as K,
|
|
3944
|
+
rs as L,
|
|
3945
|
+
Ss as M,
|
|
3946
|
+
Ys as N,
|
|
3947
|
+
qs as O,
|
|
3948
|
+
Ks as P,
|
|
3949
|
+
js as Q,
|
|
3950
|
+
Yn as R,
|
|
3951
|
+
Ns as S,
|
|
3952
|
+
$s as T,
|
|
3953
|
+
bo as U,
|
|
3954
|
+
Xs as V,
|
|
3955
|
+
ws as W,
|
|
3956
|
+
qt as X,
|
|
3957
|
+
Es as Y,
|
|
3958
|
+
zs as Z,
|
|
3959
|
+
ia as _,
|
|
3960
|
+
sa as a,
|
|
3961
|
+
_s as a0,
|
|
3962
|
+
K as a1,
|
|
3963
|
+
Zs as a2,
|
|
3964
|
+
ta as a3,
|
|
3965
|
+
ea as a4,
|
|
3966
|
+
ys as a5,
|
|
3967
|
+
bs as a6,
|
|
3968
|
+
Fs as a7,
|
|
3969
|
+
go as a8,
|
|
3970
|
+
ks as a9,
|
|
3971
|
+
da as aA,
|
|
3972
|
+
ma as aB,
|
|
3973
|
+
la as aC,
|
|
3974
|
+
oa as aa,
|
|
3975
|
+
No as ab,
|
|
3976
|
+
ns as ac,
|
|
3977
|
+
ga as ad,
|
|
3978
|
+
Hn as ae,
|
|
3979
|
+
jn as af,
|
|
3980
|
+
Vs as ag,
|
|
3981
|
+
os as ah,
|
|
3982
|
+
Yr as ai,
|
|
3983
|
+
zn as aj,
|
|
3984
|
+
Vn as ak,
|
|
3985
|
+
ba as al,
|
|
3986
|
+
na as am,
|
|
3987
|
+
cs as an,
|
|
3988
|
+
ua as ao,
|
|
3989
|
+
ps as ap,
|
|
3990
|
+
ds as aq,
|
|
3991
|
+
qn as ar,
|
|
3992
|
+
ls as as,
|
|
3993
|
+
fs as at,
|
|
3994
|
+
gs as au,
|
|
3995
|
+
ca as av,
|
|
3996
|
+
ss as aw,
|
|
3997
|
+
us as ax,
|
|
3998
|
+
hs as ay,
|
|
3999
|
+
vs as az,
|
|
4000
|
+
Qs as b,
|
|
4001
|
+
pa as c,
|
|
4002
|
+
Bs as d,
|
|
4003
|
+
Cs as e,
|
|
4004
|
+
ha as f,
|
|
4005
|
+
Uo as g,
|
|
4006
|
+
Ws as h,
|
|
4007
|
+
fa as i,
|
|
4008
|
+
Zo as j,
|
|
4009
|
+
Gs as k,
|
|
4010
|
+
I as l,
|
|
4011
|
+
as as m,
|
|
4012
|
+
vo as n,
|
|
4013
|
+
Fo as o,
|
|
4014
|
+
V as p,
|
|
4015
|
+
Ls as q,
|
|
4016
|
+
Lo as r,
|
|
4017
|
+
Js as s,
|
|
4018
|
+
Nn as t,
|
|
4019
|
+
va as u,
|
|
4020
|
+
Rs as v,
|
|
4021
|
+
ts as w,
|
|
4022
|
+
As as x,
|
|
4023
|
+
Us as y,
|
|
4024
|
+
xs as z
|
|
4025
|
+
};
|
|
4026
|
+
//# sourceMappingURL=contexts-D4V9wQRc.mjs.map
|