UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

4 lines 2.87 MB
{ "version": 3, "sources": ["../node_modules/inline-style-parser/index.js", "../node_modules/style-to-object/src/index.ts", "../node_modules/extend/index.js", "../src/index.ts", "../src/components/Attachment/Attachment.tsx", "../src/components/Attachment/AttachmentContainer.tsx", "../src/components/Attachment/AttachmentActions.tsx", "../src/context/ChannelActionContext.tsx", "../src/context/ChannelListContext.tsx", "../src/context/ChannelStateContext.tsx", "../src/context/ChatContext.tsx", "../src/context/utils/getDisplayName.ts", "../src/context/ComponentContext.tsx", "../src/context/DialogManagerContext.tsx", "../src/components/Dialog/DialogManager.ts", "../src/components/Dialog/DialogPortal.tsx", "../src/components/Dialog/hooks/useDialog.ts", "../src/store/hooks/useStateStore.ts", "../src/components/Portal/Portal.ts", "../src/context/MessageContext.tsx", "../src/context/MessageBounceContext.tsx", "../src/context/MessageInputContext.tsx", "../src/context/MessageListContext.tsx", "../src/context/PollContext.tsx", "../src/context/TranslationContext.tsx", "../src/i18n/utils.ts", "../src/context/TypingContext.tsx", "../src/context/WithComponents.tsx", "../src/components/Attachment/Audio.tsx", "../src/components/Attachment/components/DownloadButton.tsx", "../src/components/Attachment/icons.tsx", "../src/components/SafeAnchor/SafeAnchor.tsx", "../src/components/Attachment/components/FileSizeIndicator.tsx", "../src/components/MessageInput/hooks/utils.ts", "../src/components/Attachment/components/ProgressBar.tsx", "../src/components/Attachment/components/PlaybackRateButton.tsx", "../src/components/Attachment/components/PlayButton.tsx", "../src/components/Attachment/components/WaveProgressBar.tsx", "../src/components/Attachment/utils.tsx", "../src/components/Attachment/audioSampling.ts", "../src/components/Attachment/hooks/useAudioController.ts", "../src/components/Attachment/VoiceRecording.tsx", "../src/components/ReactFileUtilities/FileIcon/FileIcon.tsx", "../src/components/ReactFileUtilities/FileIcon/FileIconSet.tsx", "../src/components/ReactFileUtilities/FileIcon/mimeTypes.ts", "../src/components/ReactFileUtilities/FileIcon/iconMap.ts", "../src/components/ReactFileUtilities/UploadButton.tsx", "../src/components/ReactFileUtilities/utils.ts", "../src/components/MessageInput/AttachmentSelector.tsx", "../src/components/MessageInput/icons.tsx", "../src/components/MessageInput/hooks/useMessageComposer.ts", "../src/components/Threads/ThreadContext.tsx", "../src/components/Threads/ThreadList/ThreadList.tsx", "../src/components/Threads/ThreadList/ThreadListItem.tsx", "../src/components/Threads/ThreadList/ThreadListItemUI.tsx", "../src/components/Message/Timestamp.tsx", "../src/components/Avatar/Avatar.tsx", "../src/components/Threads/icons.tsx", "../src/utils/getChannel.ts", "../src/utils/getWholeChar.ts", "../src/components/Avatar/ChannelAvatar.tsx", "../src/components/Avatar/GroupAvatar.tsx", "../src/components/Threads/UnreadCountBadge.tsx", "../src/components/ChannelPreview/ChannelPreview.tsx", "../src/components/ChannelPreview/ChannelPreviewMessenger.tsx", "../src/components/ChannelPreview/ChannelPreviewActionButtons.tsx", "../src/components/ChannelList/ChannelList.tsx", "../src/components/ChannelList/hooks/useConnectionRecoveredListener.ts", "../src/components/ChannelList/hooks/useMobileNavigation.ts", "../src/components/ChannelList/hooks/usePaginatedChannels.ts", "../src/components/ChannelList/utils.ts", "../src/constants/limits.ts", "../src/components/ChannelList/hooks/useChannelListShape.ts", "../src/components/ChannelList/ChannelListMessenger.tsx", "../src/components/Loading/LoadingChannels.tsx", "../src/components/UtilityComponents/NullComponent.tsx", "../src/components/UtilityComponents/ErrorBoundary.tsx", "../src/components/ChannelSearch/ChannelSearch.tsx", "../src/components/ChannelSearch/hooks/useChannelSearch.ts", "../src/components/ChannelSearch/utils.ts", "../src/components/ChannelSearch/SearchBar.tsx", "../src/components/ChannelSearch/icons.tsx", "../src/components/ChannelSearch/SearchInput.tsx", "../src/components/ChannelSearch/SearchResults.tsx", "../src/components/EmptyStateIndicator/EmptyStateIndicator.tsx", "../src/components/EmptyStateIndicator/icons.tsx", "../src/components/LoadMore/LoadMorePaginator.tsx", "../src/components/LoadMore/LoadMoreButton.tsx", "../src/components/Loading/LoadingErrorIndicator.tsx", "../src/components/Loading/LoadingIndicator.tsx", "../src/utils/deprecationWarning.ts", "../src/components/ChannelList/hooks/useChannelDeletedListener.ts", "../src/components/ChannelList/hooks/useChannelHiddenListener.ts", "../src/components/ChannelList/hooks/useChannelTruncatedListener.ts", "../src/components/ChannelList/hooks/useChannelUpdatedListener.ts", "../src/components/ChannelList/hooks/useChannelVisibleListener.ts", "../src/components/ChannelList/hooks/useMessageNewListener.ts", "../src/components/ChannelList/hooks/useNotificationAddedToChannelListener.ts", "../src/components/ChannelList/hooks/useNotificationMessageNewListener.ts", "../src/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.ts", "../src/components/ChannelList/hooks/useUserPresenceChangedListener.ts", "../src/components/ChannelList/hooks/useSelectedChannelState.ts", "../src/components/ChannelList/hooks/useChannelMembershipState.ts", "../src/components/ChannelPreview/icons.tsx", "../src/components/ChannelPreview/hooks/useIsChannelMuted.ts", "../src/components/ChannelPreview/hooks/useChannelPreviewInfo.ts", "../src/components/ChannelPreview/utils.tsx", "../node_modules/devlop/lib/default.js", "../node_modules/comma-separated-tokens/index.js", "../node_modules/estree-util-is-identifier-name/lib/index.js", "../node_modules/hast-util-whitespace/lib/index.js", "../node_modules/property-information/lib/util/schema.js", "../node_modules/property-information/lib/util/merge.js", "../node_modules/property-information/lib/normalize.js", "../node_modules/property-information/lib/util/info.js", "../node_modules/property-information/lib/util/types.js", "../node_modules/property-information/lib/util/defined-info.js", "../node_modules/property-information/lib/util/create.js", "../node_modules/property-information/lib/xlink.js", "../node_modules/property-information/lib/xml.js", "../node_modules/property-information/lib/util/case-sensitive-transform.js", "../node_modules/property-information/lib/util/case-insensitive-transform.js", "../node_modules/property-information/lib/xmlns.js", "../node_modules/property-information/lib/aria.js", "../node_modules/property-information/lib/html.js", "../node_modules/property-information/lib/svg.js", "../node_modules/property-information/lib/find.js", "../node_modules/property-information/lib/hast-to-react.js", "../node_modules/property-information/index.js", "../node_modules/space-separated-tokens/index.js", "../node_modules/style-to-object/esm/index.mjs", "../node_modules/unist-util-position/lib/index.js", "../node_modules/unist-util-stringify-position/lib/index.js", "../node_modules/vfile-message/lib/index.js", "../node_modules/hast-util-to-jsx-runtime/lib/index.js", "../node_modules/html-url-attributes/lib/index.js", "../node_modules/react-markdown/lib/index.js", "../node_modules/mdast-util-to-string/lib/index.js", "../node_modules/character-entities/index.js", "../node_modules/decode-named-character-reference/index.js", "../node_modules/micromark-util-chunked/index.js", "../node_modules/micromark-util-combine-extensions/index.js", "../node_modules/micromark-util-decode-numeric-character-reference/index.js", "../node_modules/micromark-util-normalize-identifier/index.js", "../node_modules/micromark-util-character/index.js", "../node_modules/micromark-util-sanitize-uri/index.js", "../node_modules/micromark-factory-space/index.js", "../node_modules/micromark/lib/initialize/content.js", "../node_modules/micromark/lib/initialize/document.js", "../node_modules/micromark-util-classify-character/index.js", "../node_modules/micromark-util-resolve-all/index.js", "../node_modules/micromark-core-commonmark/lib/attention.js", "../node_modules/micromark-core-commonmark/lib/autolink.js", "../node_modules/micromark-core-commonmark/lib/blank-line.js", "../node_modules/micromark-core-commonmark/lib/block-quote.js", "../node_modules/micromark-core-commonmark/lib/character-escape.js", "../node_modules/micromark-core-commonmark/lib/character-reference.js", "../node_modules/micromark-core-commonmark/lib/code-fenced.js", "../node_modules/micromark-core-commonmark/lib/code-indented.js", "../node_modules/micromark-core-commonmark/lib/code-text.js", "../node_modules/micromark-util-subtokenize/lib/splice-buffer.js", "../node_modules/micromark-util-subtokenize/index.js", "../node_modules/micromark-core-commonmark/lib/content.js", "../node_modules/micromark-factory-destination/index.js", "../node_modules/micromark-factory-label/index.js", "../node_modules/micromark-factory-title/index.js", "../node_modules/micromark-factory-whitespace/index.js", "../node_modules/micromark-core-commonmark/lib/definition.js", "../node_modules/micromark-core-commonmark/lib/hard-break-escape.js", "../node_modules/micromark-core-commonmark/lib/heading-atx.js", "../node_modules/micromark-util-html-tag-name/index.js", "../node_modules/micromark-core-commonmark/lib/html-flow.js", "../node_modules/micromark-core-commonmark/lib/html-text.js", "../node_modules/micromark-core-commonmark/lib/label-end.js", "../node_modules/micromark-core-commonmark/lib/label-start-image.js", "../node_modules/micromark-core-commonmark/lib/label-start-link.js", "../node_modules/micromark-core-commonmark/lib/line-ending.js", "../node_modules/micromark-core-commonmark/lib/thematic-break.js", "../node_modules/micromark-core-commonmark/lib/list.js", "../node_modules/micromark-core-commonmark/lib/setext-underline.js", "../node_modules/micromark/lib/initialize/flow.js", "../node_modules/micromark/lib/initialize/text.js", "../node_modules/micromark/lib/constructs.js", "../node_modules/micromark/lib/create-tokenizer.js", "../node_modules/micromark/lib/parse.js", "../node_modules/micromark/lib/postprocess.js", "../node_modules/micromark/lib/preprocess.js", "../node_modules/micromark-util-decode-string/index.js", "../node_modules/mdast-util-from-markdown/lib/index.js", "../node_modules/remark-parse/lib/index.js", "../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js", "../node_modules/mdast-util-to-hast/lib/handlers/break.js", "../node_modules/mdast-util-to-hast/lib/handlers/code.js", "../node_modules/mdast-util-to-hast/lib/handlers/delete.js", "../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js", "../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js", "../node_modules/mdast-util-to-hast/lib/handlers/heading.js", "../node_modules/mdast-util-to-hast/lib/handlers/html.js", "../node_modules/mdast-util-to-hast/lib/revert.js", "../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js", "../node_modules/mdast-util-to-hast/lib/handlers/image.js", "../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js", "../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js", "../node_modules/mdast-util-to-hast/lib/handlers/link.js", "../node_modules/mdast-util-to-hast/lib/handlers/list-item.js", "../node_modules/mdast-util-to-hast/lib/handlers/list.js", "../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js", "../node_modules/mdast-util-to-hast/lib/handlers/root.js", "../node_modules/mdast-util-to-hast/lib/handlers/strong.js", "../node_modules/mdast-util-to-hast/lib/handlers/table.js", "../node_modules/mdast-util-to-hast/lib/handlers/table-row.js", "../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js", "../node_modules/trim-lines/index.js", "../node_modules/mdast-util-to-hast/lib/handlers/text.js", "../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js", "../node_modules/mdast-util-to-hast/lib/handlers/index.js", "../node_modules/@ungap/structured-clone/esm/types.js", "../node_modules/@ungap/structured-clone/esm/deserialize.js", "../node_modules/@ungap/structured-clone/esm/serialize.js", "../node_modules/@ungap/structured-clone/esm/index.js", "../node_modules/mdast-util-to-hast/lib/footer.js", "../node_modules/unist-util-is/lib/index.js", "../node_modules/unist-util-visit-parents/lib/color.node.js", "../node_modules/unist-util-visit-parents/lib/index.js", "../node_modules/unist-util-visit/lib/index.js", "../node_modules/mdast-util-to-hast/lib/state.js", "../node_modules/mdast-util-to-hast/lib/index.js", "../node_modules/remark-rehype/lib/index.js", "../node_modules/bail/index.js", "../node_modules/unified/lib/index.js", "../node_modules/is-plain-obj/index.js", "../node_modules/trough/index.js", "../node_modules/vfile/lib/minpath.js", "../node_modules/vfile/lib/minproc.js", "../node_modules/vfile/lib/minurl.js", "../node_modules/vfile/lib/minurl.shared.js", "../node_modules/vfile/lib/index.js", "../node_modules/unified/lib/callable-instance.js", "../src/components/ChannelPreview/hooks/useMessageDeliveryStatus.ts", "../src/components/ChatView/ChatView.tsx", "../src/components/Threads/ThreadList/ThreadListEmptyPlaceholder.tsx", "../src/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.tsx", "../src/components/Threads/ThreadList/ThreadListLoadingIndicator.tsx", "../src/components/Thread/Thread.tsx", "../src/components/Thread/LegacyThreadContext.ts", "../src/components/Message/FixedHeightMessage.tsx", "../src/components/Message/hooks/useActionHandler.ts", "../src/components/Message/utils.tsx", "../src/components/Message/hooks/useDeleteHandler.ts", "../src/components/Message/hooks/useEditHandler.ts", "../src/components/Message/hooks/useFlagHandler.ts", "../src/components/Message/hooks/useMentionsHandler.ts", "../src/components/Message/hooks/useMarkUnreadHandler.ts", "../src/components/Message/hooks/useMuteHandler.ts", "../src/components/Message/hooks/useOpenThreadHandler.ts", "../src/components/Message/hooks/usePinHandler.ts", "../src/components/Message/hooks/useReactionHandler.ts", "../src/components/Message/hooks/useRetryHandler.ts", "../src/components/Message/hooks/useUserHandler.ts", "../src/components/Message/hooks/useUserRole.ts", "../src/components/Message/hooks/useReactionsFetcher.ts", "../src/components/Message/hooks/useMessageTextStreaming.ts", "../src/components/Message/hooks/useMessageReminder.ts", "../src/components/Message/MessageDeleted.tsx", "../src/components/Message/MessageTimestamp.tsx", "../src/components/Gallery/BaseImage.tsx", "../src/components/Gallery/Gallery.tsx", "../src/components/Modal/GlobalModal.tsx", "../src/components/Modal/icons.tsx", "../src/components/Dialog/ButtonWithSubmenu.tsx", "../src/components/Dialog/DialogAnchor.tsx", "../src/components/Modal/Modal.tsx", "../src/components/Gallery/ModalGallery.tsx", "../src/components/Gallery/Image.tsx", "../src/components/MessageActions/MessageActions.tsx", "../src/components/MessageActions/MessageActionsBox.tsx", "../src/components/MessageActions/CustomMessageActionsList.tsx", "../src/components/MessageActions/RemindMeSubmenu.tsx", "../src/components/Message/icons.tsx", "../src/components/Message/renderText/regex.ts", "../node_modules/hast-util-is-element/lib/index.js", "../node_modules/hast-util-find-and-replace/node_modules/escape-string-regexp/index.js", "../node_modules/hast-util-find-and-replace/lib/index.js", "../node_modules/unist-builder/lib/index.js", "../src/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.ts", "../src/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.ts", "../src/components/Message/renderText/remarkPlugins/htmlToTextPlugin.ts", "../src/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.ts", "../src/components/Message/renderText/renderText.tsx", "../node_modules/ccount/index.js", "../node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js", "../node_modules/mdast-util-find-and-replace/lib/index.js", "../node_modules/mdast-util-gfm-autolink-literal/lib/index.js", "../node_modules/mdast-util-gfm-footnote/lib/index.js", "../node_modules/mdast-util-gfm-strikethrough/lib/index.js", "../node_modules/markdown-table/index.js", "../node_modules/mdast-util-to-markdown/lib/handle/blockquote.js", "../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js", "../node_modules/mdast-util-to-markdown/lib/handle/break.js", "../node_modules/longest-streak/index.js", "../node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js", "../node_modules/mdast-util-to-markdown/lib/util/check-fence.js", "../node_modules/mdast-util-to-markdown/lib/handle/code.js", "../node_modules/mdast-util-to-markdown/lib/util/check-quote.js", "../node_modules/mdast-util-to-markdown/lib/handle/definition.js", "../node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js", "../node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js", "../node_modules/mdast-util-to-markdown/lib/util/encode-info.js", "../node_modules/mdast-util-to-markdown/lib/handle/emphasis.js", "../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js", "../node_modules/mdast-util-to-markdown/lib/handle/heading.js", "../node_modules/mdast-util-to-markdown/lib/handle/html.js", "../node_modules/mdast-util-to-markdown/lib/handle/image.js", "../node_modules/mdast-util-to-markdown/lib/handle/image-reference.js", "../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js", "../node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js", "../node_modules/mdast-util-to-markdown/lib/handle/link.js", "../node_modules/mdast-util-to-markdown/lib/handle/link-reference.js", "../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js", "../node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js", "../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js", "../node_modules/mdast-util-to-markdown/lib/util/check-rule.js", "../node_modules/mdast-util-to-markdown/lib/handle/list.js", "../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js", "../node_modules/mdast-util-to-markdown/lib/handle/list-item.js", "../node_modules/mdast-util-to-markdown/lib/handle/paragraph.js", "../node_modules/mdast-util-phrasing/lib/index.js", "../node_modules/mdast-util-to-markdown/lib/handle/root.js", "../node_modules/mdast-util-to-markdown/lib/util/check-strong.js", "../node_modules/mdast-util-to-markdown/lib/handle/strong.js", "../node_modules/mdast-util-to-markdown/lib/handle/text.js", "../node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js", "../node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js", "../node_modules/mdast-util-to-markdown/lib/handle/index.js", "../node_modules/mdast-util-gfm-table/lib/index.js", "../node_modules/mdast-util-gfm-task-list-item/lib/index.js", "../node_modules/mdast-util-gfm/lib/index.js", "../node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js", "../node_modules/micromark-extension-gfm-footnote/lib/syntax.js", "../node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js", "../node_modules/micromark-extension-gfm-table/lib/edit-map.js", "../node_modules/micromark-extension-gfm-table/lib/infer.js", "../node_modules/micromark-extension-gfm-table/lib/syntax.js", "../node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js", "../node_modules/micromark-extension-gfm/index.js", "../node_modules/remark-gfm/lib/index.js", "../src/components/Message/renderText/componentRenderers/Anchor.tsx", "../src/components/Message/renderText/componentRenderers/Emoji.tsx", "../src/components/Message/renderText/componentRenderers/Mention.tsx", "../src/components/Message/Message.tsx", "../src/components/Message/MessageSimple.tsx", "../src/components/MessageBounce/MessageBounceModal.tsx", "../src/components/MessageBounce/MessageBouncePrompt.tsx", "../src/components/Message/MessageBlocked.tsx", "../src/components/Message/MessageOptions.tsx", "../src/components/Reactions/ReactionSelectorWithButton.tsx", "../src/components/Reactions/ReactionSelector.tsx", "../src/components/Reactions/reactionOptions.tsx", "../src/components/Reactions/StreamEmoji.tsx", "../src/components/Reactions/SpriteImage.tsx", "../src/components/Reactions/utils/utils.ts", "../src/components/Message/MessageRepliesCountButton.tsx", "../src/components/Message/MessageStatus.tsx", "../src/components/Tooltip/Tooltip.tsx", "../src/components/Tooltip/hooks/useEnterLeaveHandlers.ts", "../src/components/Message/MessageText.tsx", "../src/components/Message/QuotedMessage.tsx", "../src/components/Poll/Poll.tsx", "../src/components/Poll/PollContent.tsx", "../src/components/Poll/PollHeader.tsx", "../src/components/Poll/PollActions/AddCommentForm.tsx", "../src/components/Dialog/FormDialog.tsx", "../src/components/Form/FieldError.tsx", "../src/components/Dialog/PromptDialog.tsx", "../src/components/Poll/PollActions/EndPollDialog.tsx", "../src/components/Poll/PollActions/PollActions.tsx", "../src/components/Poll/PollActions/PollAction.tsx", "../src/components/Poll/PollActions/SuggestPollOptionForm.tsx", "../src/components/Poll/PollActions/PollAnswerList.tsx", "../src/components/Modal/ModalHeader.tsx", "../src/components/Poll/PollVote.tsx", "../src/components/Poll/hooks/usePollAnswerPagination.ts", "../src/components/Poll/hooks/useManagePollVotesRealtime.ts", "../src/components/InfiniteScrollPaginator/hooks/useCursorPaginator.ts", "../src/components/Poll/hooks/usePollOptionVotesPagination.ts", "../src/components/InfiniteScrollPaginator/InfiniteScrollPaginator.tsx", "../src/components/Poll/PollActions/PollOptionsFullList.tsx", "../src/components/Poll/PollOptionList.tsx", "../src/components/Poll/PollOptionSelector.tsx", "../src/components/Poll/PollActions/PollResults/PollResults.tsx", "../src/components/Poll/PollActions/PollResults/PollOptionVotesList.tsx", "../src/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.tsx", "../src/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.tsx", "../src/components/Poll/constants.ts", "../src/components/Poll/QuotedPoll.tsx", "../src/components/Poll/PollCreationDialog/PollCreationDialog.tsx", "../src/components/Poll/PollCreationDialog/MultipleAnswersField.tsx", "../src/components/Form/SwitchField.tsx", "../src/components/Poll/PollCreationDialog/NameField.tsx", "../src/components/Poll/PollCreationDialog/OptionFieldSet.tsx", "../src/components/DragAndDrop/DragAndDropContainer.tsx", "../src/components/Poll/PollCreationDialog/PollCreationDialogControls.tsx", "../src/components/Message/MessageErrorText.tsx", "../src/components/Message/StreamedMessageText.tsx", "../src/components/MessageList/ConnectionStatus.tsx", "../src/components/MessageList/CustomNotification.tsx", "../src/components/MessageList/GiphyPreviewMessage.tsx", "../src/components/MessageList/MessageList.tsx", "../src/components/MessageList/hooks/MessageList/useEnrichedMessages.ts", "../src/components/MessageList/utils.ts", "../src/constants/messageTypes.ts", "../src/i18n/de.json", "../src/i18n/en.json", "../src/i18n/es.json", "../src/i18n/fr.json", "../src/i18n/hi.json", "../src/i18n/it.json", "../src/i18n/ja.json", "../src/i18n/ko.json", "../src/i18n/nl.json", "../src/i18n/pt.json", "../src/i18n/ru.json", "../src/i18n/tr.json", "../src/i18n/Streami18n.ts", "../src/i18n/TranslationBuilder/TranslationBuilder.ts", "../src/i18n/TranslationBuilder/notifications/attachmentUpload.ts", "../src/i18n/TranslationBuilder/notifications/pollComposition.ts", "../src/i18n/TranslationBuilder/notifications/pollVoteCountTrespass.ts", "../src/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.ts", "../src/components/MessageList/hooks/MessageList/useMessageListElements.tsx", "../src/components/MessageList/hooks/useLastReadData.ts", "../src/components/MessageList/hooks/MessageList/useMessageListScrollManager.ts", "../src/components/MessageList/hooks/MessageList/useScrollLocationLogic.tsx", "../src/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.ts", "../src/components/MessageList/MessageListMainPanel.tsx", "../src/components/MessageList/UnreadMessagesSeparator.tsx", "../src/components/MessageList/hooks/useMarkRead.ts", "../src/components/MessageList/MessageNotification.tsx", "../src/components/MessageList/MessageListNotifications.tsx", "../src/components/Notifications/hooks/useNotifications.ts", "../src/components/MessageList/UnreadMessagesNotification.tsx", "../src/components/MessageList/icons.tsx", "../src/components/InfiniteScrollPaginator/InfiniteScroll.tsx", "../src/components/TypingIndicator/TypingIndicator.tsx", "../src/components/MessageList/renderMessages.tsx", "../src/components/DateSeparator/DateSeparator.tsx", "../src/components/EventComponent/EventComponent.tsx", "../src/components/UtilityComponents/useStableId.ts", "../src/components/MessageList/ScrollToBottomButton.tsx", "../src/components/MessageList/VirtualizedMessageList.tsx", "../src/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.ts", "../src/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.ts", "../src/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.ts", "../src/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.ts", "../src/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.ts", "../src/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.ts", "../src/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.ts", "../src/components/MessageList/VirtualizedMessageListComponents.tsx", "../src/context/VirtualizedMessageListContext.tsx", "../src/components/Message/MessageIsThreadReplyInChannelButtonIndicator.tsx", "../src/components/Message/ReminderNotification.tsx", "../src/components/Reactions/ReactionsList.tsx", "../src/components/Reactions/ReactionsListModal.tsx", "../src/components/Reactions/hooks/useFetchReactions.ts", "../src/components/Reactions/hooks/useProcessReactions.tsx", "../src/components/Reactions/SimpleReactionsList.tsx", "../src/components/Message/MessageEditedTimestamp.tsx", "../src/components/Thread/ThreadHeader.tsx", "../src/components/Thread/icons.tsx", "../src/components/Thread/ThreadHead.tsx", "../src/components/Thread/ThreadStart.tsx", "../src/components/MessageInput/hooks/useAttachmentManagerState.ts", "../src/components/Channel/constants.ts", "../src/components/Dialog/DialogMenu.tsx", "../src/components/Location/ShareLocationDialog.tsx", "../src/components/Form/Dropdown.tsx", "../src/context/AttachmentSelectorContext.tsx", "../src/components/MessageInput/hooks/useAttachmentsForPreview.ts", "../src/components/MessageInput/hooks/useCanCreatePoll.ts", "../src/components/MessageInput/hooks/useCooldownTimer.tsx", "../src/components/MessageInput/hooks/useTextareaRef.ts", "../src/components/MessageInput/hooks/useSubmitHandler.ts", "../src/components/MessageInput/hooks/usePasteHandler.ts", "../src/components/MediaRecorder/hooks/useMediaRecorder.ts", "../src/components/MediaRecorder/observable/Subscription.ts", "../src/components/MediaRecorder/observable/Observer.ts", "../src/components/MediaRecorder/observable/Observable.ts", "../src/components/MediaRecorder/observable/Subject.ts", "../src/components/MediaRecorder/observable/BehaviorSubject.ts", "../src/components/MediaRecorder/classes/BrowserPermission.ts", "../src/components/MediaRecorder/classes/MediaRecorderController.ts", "../src/utils/mergeDeep.ts", "../src/components/MediaRecorder/classes/AmplitudeRecorder.ts", "../src/components/MediaRecorder/transcode/audioProcessing.ts", "../src/components/MediaRecorder/transcode/wav.ts", "../src/components/MediaRecorder/transcode/index.ts", "../src/components/MessageInput/hooks/useMessageInputControls.ts", "../src/components/MessageInput/hooks/useMessageComposerHasSendableData.ts", "../src/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.tsx", "../src/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.tsx", "../src/components/MessageInput/AttachmentPreviewList/VoiceRecordingPreview.tsx", "../src/components/MediaRecorder/RecordingPermissionDeniedNotification.tsx", "../src/components/MediaRecorder/AudioRecorder/AudioRecorder.tsx", "../src/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.tsx", "../src/components/MediaRecorder/AudioRecorder/RecordingTimer.tsx", "../src/components/MediaRecorder/AudioRecorder/AudioRecordingInProgress.tsx", "../src/components/MediaRecorder/AudioRecorder/hooks/useTimeElapsed.ts", "../src/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.tsx", "../src/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.tsx", "../src/components/MessageInput/AttachmentPreviewList/ImageAttachmentPreview.tsx", "../src/components/MessageInput/AttachmentPreviewList/GeolocationPreview.tsx", "../src/components/MessageInput/CooldownTimer.tsx", "../src/components/MessageInput/hooks/useTimer.ts", "../src/components/MessageInput/EditMessageForm.tsx", "../src/components/MessageInput/MessageInput.tsx", "../src/components/MessageInput/MessageInputFlat.tsx", "../src/components/MessageInput/SendButton.tsx", "../src/components/MessageInput/StopAIGenerationButton.tsx", "../src/components/MessageInput/QuotedMessagePreview.tsx", "../src/components/MessageInput/LinkPreviewList.tsx", "../src/components/MessageInput/SendToChannelCheckbox.tsx", "../src/components/TextareaComposer/SuggestionList/CommandItem.tsx", "../src/components/TextareaComposer/SuggestionList/EmoticonItem.tsx", "../src/components/TextareaComposer/SuggestionList/SuggestionList.tsx", "../src/components/TextareaComposer/SuggestionList/SuggestionListItem.tsx", "../src/components/TextareaComposer/SuggestionList/UserItem.tsx", "../src/components/TextareaComposer/TextareaComposer.tsx", "../src/components/AIStateIndicator/AIStateIndicator.tsx", "../src/components/AIStateIndicator/hooks/useAIState.ts", "../src/components/MessageInput/WithDragAndDropUpload.tsx", "../src/components/MessageInput/hooks/useCreateMessageInputContext.ts", "../src/components/Attachment/Card.tsx", "../src/components/Attachment/FileAttachment.tsx", "../src/components/Attachment/Geolocation.tsx", "../src/components/Attachment/UnsupportedAttachment.tsx", "../src/components/Location/hooks/useLiveLocationSharingManager.ts", "../src/components/Channel/Channel.tsx", "../src/components/Channel/channelState.ts", "../src/components/Channel/hooks/useCreateChannelStateContext.ts", "../src/components/Channel/hooks/useCreateTypingContext.ts", "../src/components/Channel/hooks/useEditMessageHandler.ts", "../src/components/Channel/hooks/useIsMounted.ts", "../src/components/Channel/hooks/useMentionsHandlers.ts", "../src/components/Channel/LoadingChannel.tsx", "../src/components/Channel/hooks/useChannelContainerClasses.ts", "../src/components/Channel/utils.ts", "../src/components/Attachment/attachment-sizing.tsx", "../src/experimental/Search/hooks/useSearchFocusedMessage.ts", "../src/components/ChannelHeader/ChannelHeader.tsx", "../src/components/ChannelHeader/icons.tsx", "../src/components/Chat/Chat.tsx", "../src/components/Chat/hooks/useChat.ts", "../src/components/Chat/hooks/useCreateChatContext.ts", "../src/components/Chat/hooks/useChannelsQueryState.ts", "../src/components/Chat/hooks/useCreateChatClient.ts", "../src/components/Window/Window.tsx"], "sourcesContent": ["// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nmodule.exports = function (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n var errorsList = [];\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n};\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n", "import type { Declaration } from 'inline-style-parser';\nimport parse from 'inline-style-parser';\n\nexport { Declaration };\n\ninterface StyleObject {\n [name: string]: string;\n}\n\ntype Iterator = (\n property: string,\n value: string,\n declaration: Declaration,\n) => void;\n\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nexport default function StyleToObject(\n style: string,\n iterator?: Iterator,\n): StyleObject | null {\n let styleObject: StyleObject | null = null;\n\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n\n const declarations = parse(style);\n const hasIterator = typeof iterator === 'function';\n\n declarations.forEach((declaration) => {\n if (declaration.type !== 'declaration') {\n return;\n }\n\n const { property, value } = declaration;\n\n if (hasIterator) {\n iterator(property, value, declaration);\n } else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n\n return styleObject;\n}\n", "'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n", "export * from './components';\nexport * from './context';\nexport * from './i18n';\nexport * from './store';\nexport * from './types';\nexport * from './utils';\n", "import React, { useMemo } from 'react';\nimport {\n isAudioAttachment,\n isFileAttachment,\n isImageAttachment,\n isScrapedContent,\n isSharedLocationResponse,\n isVideoAttachment,\n isVoiceRecordingAttachment,\n} from 'stream-chat';\n\nimport {\n AudioContainer,\n CardContainer,\n FileContainer,\n GalleryContainer,\n GeolocationContainer,\n ImageContainer,\n MediaContainer,\n UnsupportedAttachmentContainer,\n VoiceRecordingContainer,\n} from './AttachmentContainer';\nimport { SUPPORTED_VIDEO_FORMATS } from './utils';\n\nimport type { ReactPlayerProps } from 'react-player';\nimport type { SharedLocationResponse, Attachment as StreamAttachment } from 'stream-chat';\nimport type { AttachmentActionsProps } from './AttachmentActions';\nimport type { AudioProps } from './Audio';\nimport type { VoiceRecordingProps } from './VoiceRecording';\nimport type { CardProps } from './Card';\nimport type { FileAttachmentProps } from './FileAttachment';\nimport type { GalleryProps, ImageProps } from '../Gallery';\nimport type { UnsupportedAttachmentProps } from './UnsupportedAttachment';\nimport type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler';\nimport type { GroupedRenderedAttachment } from './utils';\nimport type { GeolocationProps } from './Geolocation';\n\nconst CONTAINER_MAP = {\n audio: AudioContainer,\n card: CardContainer,\n file: FileContainer,\n media: MediaContainer,\n unsupported: UnsupportedAttachmentContainer,\n voiceRecording: VoiceRecordingContainer,\n} as const;\n\nexport const ATTACHMENT_GROUPS_ORDER = [\n 'card',\n 'gallery',\n 'image',\n 'media',\n 'audio',\n 'voiceRecording',\n 'file',\n 'geolocation',\n 'unsupported',\n] as const;\n\nexport type AttachmentProps = {\n /** The message attachments to render, see [attachment structure](https://getstream.io/chat/docs/javascript/message_format/?language=javascript) **/\n attachments: (StreamAttachment | SharedLocationResponse)[];\n /**\tThe handler function to call when an action is performed on an attachment, examples include canceling a \\/giphy command or shuffling the results. */\n actionHandler?: ActionHandlerReturnType;\n /** Custom UI component for displaying attachment actions, defaults to and accepts same props as: [AttachmentActions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/AttachmentActions.tsx) */\n AttachmentActions?: React.ComponentType<AttachmentActionsProps>;\n /** Custom UI component for displaying an audio type attachment, defaults to and accepts same props as: [Audio](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Audio.tsx) */\n Audio?: React.ComponentType<AudioProps>;\n /** Custom UI component for displaying a card type attachment, defaults to and accepts same props as: [Card](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Card.tsx) */\n Card?: React.ComponentType<CardProps>;\n /** Custom UI component for displaying a file type attachment, defaults to and accepts same props as: [File](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/FileAttachment.tsx) */\n File?: React.ComponentType<FileAttachmentProps>;\n /** Custom UI component for displaying a gallery of image type attachments, defaults to and accepts same props as: [Gallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/Gallery.tsx) */\n Gallery?: React.ComponentType<GalleryProps>;\n Geolocation?: React.ComponentType<GeolocationProps>;\n /** Custom UI component for displaying an image type attachment, defaults to and accepts same props as: [Image](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/Image.tsx) */\n Image?: React.ComponentType<ImageProps>;\n /** Optional flag to signal that an attachment is a displayed as a part of a quoted message */\n isQuoted?: boolean;\n /** Custom UI component for displaying a media type attachment, defaults to `ReactPlayer` from 'react-player' */\n Media?: React.ComponentType<ReactPlayerProps>;\n /** Custom UI component for displaying unsupported attachment types, defaults to NullComponent */\n UnsupportedAttachment?: React.ComponentType<UnsupportedAttachmentProps>;\n /** Custom UI component for displaying an audio recording attachment, defaults to and accepts same props as: [VoiceRecording](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/VoiceRecording.tsx) */\n VoiceRecording?: React.ComponentType<VoiceRecordingProps>;\n};\n\n/**\n * A component used for rendering message attachments. By default, the component supports: AttachmentActions, Audio, Card, File, Gallery, Image, and Video\n */\nexport const Attachment = (props: AttachmentProps) => {\n const { attachments } = props;\n\n const groupedAttachments = useMemo(\n () => renderGroupedAttachments(props),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [attachments],\n );\n\n return (\n <div className='str-chat__attachment-list'>\n {ATTACHMENT_GROUPS_ORDER.reduce(\n (acc, groupName) => [...acc, ...groupedAttachments[groupName]],\n [] as React.ReactNode[],\n )}\n </div>\n );\n};\n\nconst renderGroupedAttachments = ({\n attachments,\n ...rest\n}: AttachmentProps): GroupedRenderedAttachment => {\n const uploadedImages: StreamAttachment[] = attachments.filter((attachment) =>\n isImageAttachment(attachment),\n );\n\n const containers = attachments\n .filter((attachment) => !isImageAttachment(attachment))\n .reduce<GroupedRenderedAttachment>(\n (typeMap, attachment) => {\n if (isSharedLocationResponse(attachment)) {\n typeMap.geolocation.push(\n <GeolocationContainer\n {...rest}\n key='geolocation-container'\n location={attachment}\n />,\n );\n } else {\n const attachmentType = getAttachmentType(attachment);\n\n const Container = CONTAINER_MAP[attachmentType];\n typeMap[attachmentType].push(\n <Container\n key={`${attachmentType}-${typeMap[attachmentType].length}`}\n {...rest}\n attachment={attachment}\n />,\n );\n }\n\n return typeMap;\n },\n {\n audio: [],\n card: [],\n file: [],\n media: [],\n unsupported: [],\n // not used in reduce\n // eslint-disable-next-line sort-keys\n image: [],\n // eslint-disable-next-line sort-keys\n gallery: [],\n geolocation: [],\n voiceRecording: [],\n },\n );\n\n if (uploadedImages.length > 1) {\n containers['gallery'] = [\n <GalleryContainer\n key='gallery-container'\n {...rest}\n attachment={{\n images: uploadedImages,\n type: 'gallery',\n }}\n />,\n ];\n } else if (uploadedImages.length === 1) {\n containers['image'] = [\n <ImageContainer key='image-container' {...rest} attachment={uploadedImages[0]} />,\n ];\n }\n\n return containers;\n};\n\nconst getAttachmentType = (\n attachment: AttachmentProps['attachments'][number],\n): keyof typeof CONTAINER_MAP => {\n if (isScrapedContent(attachment)) {\n return 'card';\n } else if (isVideoAttachment(attachment, SUPPORTED_VIDEO_FORMATS)) {\n return 'media';\n } else if (isAudioAttachment(attachment)) {\n return 'audio';\n } else if (isVoiceRecordingAttachment(attachment)) {\n return 'voiceRecording';\n } else if (isFileAttachment(attachment, SUPPORTED_VIDEO_FORMATS)) {\n return 'file';\n }\n\n return 'unsupported';\n};\n", "import type { PropsWithChildren } from 'react';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport ReactPlayer from 'react-player';\nimport clsx from 'clsx';\nimport * as linkify from