{"version":3,"sources":["utils/buffer.ts","utils/crc32.js","utils/context.ts","utils/csv.ts","utils/date.ts","utils/events.ts","utils/formik.ts","utils/hex.ts","utils/ic.ts","utils/infiniteDataUtils.ts","utils/number.ts","utils/object.ts","utils/optimisticUpdate/article.ts","utils/optimisticUpdate/comment.ts","utils/optimisticUpdate/post.ts","utils/poll.ts","utils/query.ts","utils/user.ts","utils/wallets.ts","pages/profile/services/projects.ts","constants/user.ts","components/Dialogs/Confirm.tsx","client/main/main.did.js","client/messaging/messaging.did.js","client/assets/assets.did.js","client/nft/nft.did.js","client/index.ts","pages/profile/services/nft.ts","components/ConditionalWrapper/ConditionalWrapper.tsx","components/Buttons/CopyButton.tsx","pages/profile/services/profile.ts","pages/profile/utils/nft.ts","utils/getExternalUrl.tsx","constants/feed.ts","components/Compose/ComposePoll/utils.ts","components/Search/index.ts","components/Buttons/styles.tsx","components/Dialogs/DialogHeader.tsx","types/formik.ts","types/poll.ts","utils/strings.ts","components/Compose/emojiPositionSuggestion.ts","pages/profile/utils/profile.ts","components/Dialogs/FullImage.tsx","components/NavigationButton/NavigationButton.tsx","utils/getMobileOS.ts","components/Dialogs/ICIdentityExplainer.tsx","providers/OpenDistriktProvider.tsx","theme/common.tsx","theme/light.ts","theme/dark.ts","providers/StatelessThemeProvider.tsx","providers/ThemeProvider.tsx","components/icons/Warning.tsx","constants/appLinks.ts","constants/comment.ts","constants/poll.ts","constants/moderation.ts","constants/post.ts","constants/profile.ts","constants/thread.ts","components/iconsOld/ProfileMention.tsx","components/Alert/styles.ts","components/Alert/Alert.tsx","services/users.ts","components/Loading/index.tsx","components/CustomExternalLink/styles.ts","components/CustomExternalLink/CustomExternalLink.tsx","components/Dialog/styles.ts","components/Dialog/Dialog.tsx","pages/profile/Follows/User.tsx","components/UserList/UserList.tsx","components/Search/styles.ts","components/Search/Dropdown.tsx","components/Search/Search.tsx","components/Checkbox/Checkbox.tsx","services/auth.ts","utils/heartbeat.ts","pages/profile/hooks/useIsUserNftOwner.ts","providers/ColorModeContext.tsx","pages/profile/services/follower.ts","components/PageHeader/PageHeader.tsx","components/TextInput/styles.tsx","components/TextInput/TextLimitCount.tsx","components/TextInput/TextField.tsx","pages/profile/constants/index.ts","pages/profile/NftDropzone/utils/sha224.ts","pages/discover/services.ts","pages/discover/constants.ts","pages/messages/constants/index.ts","components/iconsOld/AlertTriangle.tsx","components/iconsOld/CircledCheck.tsx","components/iconsOld/Articles.tsx","components/iconsOld/Bookmark.tsx","components/iconsOld/Camera.tsx","components/iconsOld/CircledClose.tsx","components/iconsOld/Close.tsx","components/iconsOld/DistriktBadge.tsx","components/iconsOld/Comment.tsx","components/iconsOld/CopyLink.tsx","components/iconsOld/Error.tsx","components/iconsOld/Success.tsx","components/iconsOld/Info.tsx","components/iconsOld/EditItem.tsx","components/iconsOld/HamburgerMenu.tsx","components/iconsOld/Happy.tsx","components/iconsOld/Image.tsx","components/iconsOld/LikeFull.tsx","components/iconsOld/LikeOutline.tsx","components/iconsOld/LinkOutline.tsx","components/iconsOld/Logo.tsx","components/iconsOld/Message.tsx","components/iconsOld/MessageUnread.tsx","components/iconsOld/Moderation.tsx","components/iconsOld/MoreHorizontal.tsx","components/iconsOld/Notification.tsx","components/iconsOld/NotificationAlert.tsx","components/iconsOld/Plus.tsx","components/iconsOld/QuestionCircle.tsx","components/iconsOld/RefreshArrows.tsx","components/iconsOld/Repost.tsx","components/iconsOld/SearchOutline.tsx","components/iconsOld/Settings.tsx","components/iconsOld/Share.tsx","components/iconsOld/Stream.tsx","components/iconsOld/TrashBin.tsx","components/iconsOld/UserProfile.tsx","components/iconsOld/WarningOutlined.tsx","components/icons/Add.tsx","components/icons/AlarmBell.tsx","components/icons/AlarmBellFilled.tsx","components/icons/AlarmBellFilledUnread.tsx","components/icons/AlarmBellOff.tsx","components/icons/AlarmBellOn.tsx","components/icons/AlarmBellUnread.tsx","components/icons/ArrowBack.tsx","components/icons/ArrowDown.tsx","components/icons/ArrowForward.tsx","components/icons/ArrowLeft.tsx","components/icons/ArrowRight.tsx","components/icons/ArrowUp.tsx","components/icons/Avatar.tsx","components/icons/CheckboxChecked.tsx","components/icons/CheckboxEmpty.tsx","components/icons/Calendar.tsx","components/icons/Check.tsx","components/icons/Copy.tsx","components/icons/Discord.tsx","components/icons/Discover.tsx","components/icons/DiscoverFilled.tsx","components/icons/Distrikt.tsx","components/icons/DistriktLogo.tsx","components/icons/Edit.tsx","components/icons/ErrorFilled.tsx","components/icons/Favorite.tsx","components/icons/FavoriteFilled.tsx","components/icons/Flag.tsx","components/icons/Flash.tsx","components/icons/FlashFilled.tsx","components/icons/ThunderFilled.tsx","components/icons/Help.tsx","components/icons/Home.tsx","components/icons/HomeFilled.tsx","components/icons/Info.tsx","components/icons/InfoFilled.tsx","components/icons/Layers.tsx","components/icons/Layout.tsx","components/icons/Loading.tsx","components/icons/Lock.tsx","components/icons/MarkAsRead.tsx","components/icons/Medium.tsx","components/icons/Menu.tsx","components/icons/Messages.tsx","components/icons/MessagesDouble.tsx","components/icons/MessagesFilled.tsx","components/icons/MessagesFilledUnread.tsx","components/icons/MessagesUnread.tsx","components/icons/MoreInfo.tsx","components/icons/Newspaper.tsx","components/icons/NewspaperFilled.tsx","components/icons/Picture.tsx","components/icons/Pin.tsx","components/icons/Poll.tsx","components/icons/Profile.tsx","components/icons/ProfileFilled.tsx","components/icons/Refresh.tsx","components/icons/RadioOutline.tsx","components/icons/RadioInside.tsx","components/icons/Remove.tsx","components/icons/RemoveBin.tsx","components/icons/Search.tsx","components/icons/SearchFilled.tsx","components/icons/Send.tsx","components/icons/Setting.tsx","components/icons/SettingFilled.tsx","components/icons/Share.tsx","components/icons/Share2.tsx","components/icons/SmileFace.tsx","components/icons/SuccessFilled.tsx","components/icons/Telegram.tsx","components/icons/Transfer.tsx","components/icons/Twitter.tsx","components/icons/Unblock.tsx","components/icons/Unlock.tsx","components/icons/Unpin.tsx","components/icons/UserRemove.tsx","components/icons/LogoHeader.tsx","components/icons/ViewOff.tsx","components/icons/ViewOn.tsx","components/icons/VerificationBadge.tsx","components/icons/WarningFilled.tsx","components/icons/Dark.tsx","components/icons/Light.tsx","components/icons/Auto.tsx","components/icons/Thread.tsx","components/icons/Cake.tsx","components/icons/Wallet.tsx","pages/profile/services/index.ts","components/ImageLoader/memoryLoader.tsx","components/ImageLoader/ImageLoader.tsx","components/ImageLoader/ProfileImageLoader.tsx","components/ImageLoader/PostImageLoader.tsx","components/Loading/Loading.tsx","hooks/useDeferredPromise.ts","hooks/useOptimisticMutation.ts","hooks/usePreviousValue.ts","hooks/useScroll.ts","hooks/useEmojiPlugin.ts","pages/profile/utils/experiences.ts","utils/formatDate.tsx","components/UserAvatar/UserAvatar.tsx","components/Buttons/MoreButton.tsx","components/Cards/UserPreviewCard.tsx","pages/post/utils/postItem.ts","pages/profile/NftDropzone/utils/nftUtils.tsx","utils/moderationShortcuts.tsx","utils/auth.ts","pages/home/services.ts","pages/home/constants.ts","pages/profile/services/milestones.ts","components/Buttons/FollowButton.tsx","components/Alert/AlertOld.tsx","components/Avatar/styles.ts","components/Avatar/Avatar.tsx","components/ConditionalRoute/ConditionalRoute.tsx","components/DatePicker/DatePicker.tsx","components/Dot/Dot.tsx","components/Dropdown/styles.ts","components/Dropdown/Dropdown.tsx","components/Dropdown/ProfileDropdown.tsx","components/EmptyState/styles.ts","components/EmptyState/EmptyState.tsx","components/Filter/FilterInput.tsx","components/LoginSignupBox/LoginSignupBox.tsx","components/Select/styles.ts","components/Select/Select.tsx","constants/common.ts","pages/static/mobileauth.tsx","pages/static/AppLink.tsx","pages/static/cookiepolicy.tsx","components/Error/Error.tsx","components/Compose/types.tsx","pages/post/utils/initialData.ts","pages/post/services/post.ts","components/Compose/styles.tsx","components/Compose/mentionRegex.ts","components/Compose/Compose.tsx","pages/profile/hooks/useIsVisibleExperience.ts","pages/profile/components/ExperienceCard/styles.ts","components/Buttons/LoadMoreButton.tsx","hooks/rich-editor/useMentionsParser.ts","hooks/rich-editor/useMentionsChecker.ts","pages/post/components/Comment/styles.tsx","components/Compose/Addons/utils.ts","components/Compose/Addons/EmojisAddon.tsx","components/Compose/Addons/ImageAddon.tsx","components/Compose/Addons/PollAddon.tsx","components/Compose/Toolbar.tsx","pages/post/components/Comment/CreateComment.tsx","components/Cards/ExtendedUserCard.tsx","components/Dialogs/UserListModal/UserListComponent.tsx","components/Dialogs/UserListModal/UserListLikes.tsx","components/Dialogs/Warning.tsx","pages/moderation/reports/constants.ts","pages/post/components/Like/styles.tsx","pages/post/components/Like/Like.tsx","constants/reportCategories.ts","pages/post/services/likes.ts","components/Dialogs/Report.tsx","components/Report/ReportResource.tsx","components/Linkify/hashtag.tsx","components/RichTextFormat/RichTextFormat.tsx","pages/post/components/Comment/SingleComment.tsx","pages/post/components/PostContent/styles.ts","components/Poll/Poll.tsx","pages/post/components/PostContent/PostContent.tsx","pages/post/components/PostContentVerticalConnect/styles.ts","pages/post/components/PostContentVerticalConnect/PostContentVerticalConnect.tsx","pages/post/components/SinglePost/styles.ts","pages/post/components/PostHeader/PostHeader.tsx","pages/post/components/Reshare/styles.tsx","components/Dialogs/UserListModal/UserListReshares.tsx","pages/post/components/Reshare/Reshare.tsx","pages/post/components/SinglePost/components/styles.tsx","pages/post/components/SinglePost/components/Toolbar.tsx","pages/thread/components/FullThreadButton/styles.ts","pages/thread/components/FullThreadButton/FullThreadButton.tsx","pages/thread/components/SharedThreadPost/SharedThreadPost.tsx","pages/thread/components/Thread/styles.ts","pages/thread/components/Thread/Thread.tsx","pages/thread/components/ThreadPost/styles.ts","pages/thread/components/ThreadPost/ThreadPost.tsx","pages/thread/components/ThreadPreview/styles.ts","pages/thread/components/ThreadPreview/ThreadPreview.tsx","pages/post/components/SharedPost/styles.ts","components/Compose/LinkPreview.tsx","pages/post/components/SharedPost/SharedPost.tsx","pages/article/SingleArticle/styles.tsx","pages/article/SingleArticle/components/UserInfo.tsx","utils/parseRichText.tsx","pages/article/SingleArticle/Article.tsx","utils/logger.tsx","pages/article/SingleArticle/ArticleErrorBoundary.tsx","pages/article/SingleArticle/index.tsx","pages/article/ArticleCreate/ArticleCreate.tsx","pages/article/SharedArticle/styles.ts","pages/article/SharedArticle/SharedArticle.tsx","pages/article/index.tsx","pages/moderation/reports/utils.ts","pages/moderation/reports/services.ts","pages/post/components/QuotedResource/styles.ts","pages/post/components/QuotedResource/QuotedResource.tsx","pages/post/utils/quotedResources.ts","pages/profile/services/posts.ts","pages/post/components/SinglePost/SinglePost.tsx","pages/post/components/CommentPreview/styles.tsx","pages/post/components/CommentPreview/CommentPreview.tsx","pages/post/components/PostItem/PostItem.tsx","pages/profile/components/ActivityTab/styles.ts","pages/profile/components/ActivityTab/ActivityTab.tsx","pages/profile/components/BlockedUser/styles.ts","pages/profile/components/BlockedUser/BlockedUser.tsx","pages/messages/utils/messages.ts","pages/messages/utils/errors.ts","pages/messages/effects/errors.ts","pages/messages/effects/rooms.ts","pages/messages/effects/messages.ts","pages/messages/effects/notifications.ts","pages/messages/services/rooms.ts","pages/profile/components/CollaboratorSearch/CollaboratorSearch.tsx","pages/messages/services/search.ts","pages/profile/components/ChooseCollaboratorsModal/styles.ts","pages/profile/components/ChooseCollaboratorsModal/ChooseCollaboratorsModal.tsx","pages/profile/components/CollaboratorsListModal/CollaboratorsListModal.tsx","pages/profile/components/CreateMilestoneModal/CreateMilestoneModal.tsx","components/Compose/Bio/CreateBio.tsx","pages/profile/components/EditProfile/styles.ts","pages/profile/components/EditProfile/components/EditWalletsInfo.tsx","pages/profile/components/EditProfile/EditProfile.tsx","pages/profile/components/ExperienceSectionHeader/ExperienceSectionHeader.tsx","pages/profile/components/MilestonePreviewModal/styles.ts","pages/profile/components/MilestonePreviewModal/MilestonePreviewModal.tsx","pages/profile/components/Milestones/styles.ts","pages/profile/components/Milestones/Milestones.tsx","pages/profile/components/ProjectPreviewModal/styles.ts","pages/profile/components/ProjectPreviewModal/ProjectPreviewModal.tsx","pages/profile/components/ProjectContent/styles.ts","components/Compose/TextField/Username.tsx","components/TextInput/MentionsInputField.tsx","pages/profile/components/ProjectForm/styles.ts","pages/profile/components/ProjectForm/ProjectForm.tsx","pages/profile/components/ProjectEditModal/ProjectEditModal.tsx","pages/profile/components/ProjectHeader/styles.ts","pages/profile/components/ProjectHeader/ProjectHeader.tsx","pages/profile/components/ProjectContent/ProjectContent.tsx","pages/profile/components/Project/Project.tsx","pages/profile/components/Projects/Projects.tsx","pages/profile/components/ExperienceTab/styles.ts","pages/profile/components/ExperienceTab/ExperienceTab.tsx","pages/profile/components/MilestoneContent/styles.ts","pages/profile/components/MilestoneContent/MilestoneContent.tsx","pages/profile/components/MilestoneForm/styles.ts","pages/profile/components/MilestoneForm/MilestoneForm.tsx","pages/profile/components/MilestoneEditModal/MilestoneEditModal.tsx","pages/profile/components/MilestoneHeader/styles.ts","pages/profile/components/MilestoneHeader/MilestoneHeader.tsx","components/Dialogs/BlockedUsersModal.tsx","components/Dialogs/Remove.tsx","components/Dialogs/Success.tsx","pages/profile/components/ProfileActions/styles.ts","pages/profile/components/ProfileActions/ProfileActions.tsx","pages/profile/components/ProfileInfo/styles.ts","pages/profile/components/ProfileInfo/ProfileInfo.tsx","pages/profile/components/ProfileTabs/styles.ts","pages/profile/components/ProfileTabs/ProfileTabs.tsx","pages/profile/components/Project/SharedProject.tsx","components/UploadPhotoModal/UploadPhotoModal.tsx","pages/profile/components/UpdateCover/styles.ts","pages/profile/components/UpdateCover/UpdateCover.tsx","pages/profile/components/ProfileImage/styles.ts","pages/profile/components/ProfileImage/ProfileImage.tsx","pages/profile/components/WalletsList/WalletsList.tsx","pages/profile/components/CreateProjectModal/CreateProjectModal.tsx","pages/profile/components/ExperienceCard/ExperienceCard.tsx","pages/profile/components/Milestone/Milestone.tsx","components/Compose/Image.tsx","components/Compose/ComposePoll/ComposePoll.tsx","hooks/useLinkPreview.ts","utils/loadLinkPreview.ts","components/Compose/ComposeContainer.tsx","components/Dialogs/CreatePostModal.tsx","components/Dialogs/GetMobileApp.tsx","pages/app/components/Announcements/Announcements.tsx","pages/app/components/DesktopNavigationBar/styles.ts","pages/app/components/DesktopNavigationBar/DesktopNavigationBar.tsx","pages/app/components/Feedback/FeedbackDialog.tsx","pages/app/components/Feedback/Feedback.tsx","pages/app/services.ts","pages/app/components/GlobalSearch/GlobalSearch.tsx","pages/app/components/MobileNavigationBar/styles.ts","pages/app/components/MobileNavigationBar/MobileNavigationBar.tsx","pages/notifications/constants.ts","pages/notifications/services.ts","pages/app/components/Navigation/styles.ts","pages/app/components/Navigation/Navigation.tsx","pages/messages/services/notifications.ts","pages/app/components/NewToDistrikt/styles.tsx","pages/app/components/NewToDistrikt/NewToDistrikt.tsx","pages/app/components/NotificationButton/NotificationButton.tsx","pages/app/components/UserInfo/UserInfo.tsx","pages/app/components/LoginSignupBanner/LoginSignupBanner.tsx","pages/app/NavigationBar.tsx","hooks/useScrollDirection.ts","pages/app/components/TrendingThisWeek/TrendingThisWeek.tsx","pages/app/SidebarCards.tsx","pages/app/Sidebar.tsx","components/Layout/Layout.tsx","pages/messages/components/AvatarCard/styles.ts","pages/messages/components/AvatarCard/AvatarCard.tsx","pages/messages/components/EmptyMessage/EmptyMessage.tsx","pages/messages/components/ErrorAlert/ErrorAlert.tsx","pages/messages/components/FollowerSearch/FollowerSearch.tsx","pages/messages/components/Input/styles.ts","pages/messages/components/Input/Input.tsx","pages/messages/components/MessageBox/styles.ts","pages/messages/components/MessageBox/MessageBox.tsx","pages/messages/components/MessageList/styles.ts","pages/messages/components/MessageList/MessageList.tsx","pages/messages/services/messages.ts","pages/messages/components/MessageListToolbar/styles.ts","pages/messages/components/MessageListToolbar/MessageListToolbar.tsx","pages/messages/components/RoomItem/styles.ts","pages/messages/components/RoomItem/RoomItem.tsx","pages/messages/components/RoomList/RoomList.tsx","pages/messages/components/RoomListToolbar/styles.ts","pages/messages/components/RoomListToolbar/RoomListToolbar.tsx","pages/messages/components/StartConversationWarning/StartConversationWarning.tsx","pages/messages/components/SystemMessage/SystemMessage.tsx","pages/messages/styles.ts","pages/messages/Chat.tsx","pages/messages/utils/filter.ts","pages/messages/utils/search.ts","pages/home/HomeErrorBoundary.tsx","pages/messages/index.tsx","pages/designsystem/Typography.tsx","pages/designsystem/ColorVariations.tsx","pages/designsystem/AlertDemo.tsx","pages/designsystem/RadioDemo.tsx","pages/designsystem/TextFieldDemo.tsx","pages/designsystem/SelectDemo.tsx","pages/designsystem/ButtonDemo.tsx","pages/designsystem/CheckboxDemo.tsx","pages/designsystem/EmptyStateDemo.tsx","pages/profile/NftDropzone/styles.tsx","pages/profile/NftDropzone/NftLayersDialog.tsx","pages/profile/NftDropzone/SingleNft.tsx","pages/designsystem/NFTDemo.tsx","pages/designsystem/DatePickerDemo.tsx","pages/designsystem/DialogDemo.tsx","pages/designsystem/TabsDemo.tsx","pages/designsystem/TagDemo.tsx","pages/designsystem/NavigationButtons.tsx","pages/designsystem/OverflowDemo.tsx","components/Buttons/SelectMenu.tsx","pages/designsystem/SelectMenuDemo.tsx","pages/designsystem/SearchDemo.tsx","pages/designsystem/DesignSystemDemo.tsx","pages/designsystem/index.ts","pages/discover/DiscoverErrorBoundary.tsx","pages/discover/components/DiscoveryFeatures.tsx","components/ScrollKeeper/ScrollKeeper.tsx","components/Feed/Feed.tsx","pages/discover/Discover.tsx","pages/discover/index.tsx","pages/featuredPosts/FeaturedPostsErrorBoundary.tsx","pages/featuredPosts/featuredPosts.tsx","pages/featuredPosts/index.tsx","pages/explore/ExploreErrorBoundary.tsx","pages/explore/components/styles.tsx","pages/explore/components/ArticleCard.tsx","pages/explore/styles.tsx","pages/explore/explore.tsx","pages/explore/index.tsx","pages/hashtag/styles.ts","pages/hashtag/HashtagPage.tsx","pages/home/home.tsx","pages/home/index.tsx","pages/moderation/Moderation.tsx","pages/moderation/ModerationErrorBoundary.tsx","pages/moderation/verification/styles.tsx","pages/moderation/verification/verificationrequest.tsx","pages/moderation/verification/services.tsx","pages/moderation/verification/verification.tsx","pages/moderation/reports/styles.ts","pages/moderation/reports/SingleReportButtons.tsx","pages/moderation/reports/SingleReport.tsx","pages/moderation/reports/reports.tsx","pages/moderation/index.tsx","pages/notifications/NotificationsErrorBoundary.tsx","components/Buttons/RemoveFollowerButton.tsx","pages/notifications/components/SingleNotification/styles.ts","pages/notifications/components/SingleNotification/SingleNotification.tsx","pages/notifications/utils.ts","pages/notifications/hooks.ts","pages/notifications/styles.ts","pages/notifications/Notifications.tsx","pages/notifications/index.tsx","pages/post/components/SortSelect.tsx","pages/post/styles.tsx","pages/post/Post.tsx","pages/post/PostErrorBoundary.tsx","pages/post/index.tsx","pages/profile/Follows/styles.tsx","pages/profile/Follows/Followers.tsx","pages/profile/Follows/Following.tsx","pages/profile/Follows/Follows.tsx","pages/profile/NftDropzone/NftTransferDialog.tsx","pages/profile/NftDropzone/ShowPrincipalDialog.tsx","pages/profile/NftDropzone/NftDropzone.tsx","pages/profile/NftDropzone/index.tsx","pages/profile/styles.ts","pages/profile/components/UploadPhotoButton/styles.ts","pages/profile/components/UploadPhotoButton/UploadPhotoButton.tsx","pages/profile/Profile.tsx","pages/profile/ProfileErrorBoundary.tsx","pages/profile/index.tsx","pages/search/Search.tsx","pages/search/index.tsx","pages/settings/styles.tsx","pages/settings/settings.tsx","pages/settings/services.ts","hooks/useSignupCallback.ts","pages/static/TermsOfUse/content.tsx","components/Dialogs/TermsOfUse.tsx","pages/signup/CaptchaDialog.tsx","pages/signup/Signup.tsx","pages/thread/ThreadPage.tsx","pages/thread/index.tsx","pages/static/faq/content.tsx","pages/static/faq/faqpage.tsx","pages/static/TermsOfUse/termsofusepage.tsx","routes.tsx","App.tsx","index.tsx","utils/crypt.ts","pages/post/constants.ts","utils/image.ts","pages/hashtag/services.ts"],"names":["toBlob","arr","buffer","Buffer","from","to32bits","num","b","ArrayBuffer","DataView","setUint32","Array","Uint8Array","from32bits","ba","value","i","lookUpTable","Uint32Array","getCrc32","buf","crc","length","byte","emptyMethod","console","log","isJsons","array","isArray","every","row","jsons2arrays","jsons","headers","headerLabels","map","json","Object","keys","reduce","a","Set","headerKeys","header","label","key","object","getHeaderValue","property","obj","foundValue","replace","split","o","p","undefined","splice","joiner","data","separator","enclosingCharacter","filter","e","element","elementOrEmpty","column","join","toCSV","jsons2csv","arrays2csv","string2csv","TypeError","getDataURI","uFEFF","csv","type","test","navigator","userAgent","dataURI","downloadCSVFile","filename","downloadLink","document","createElement","href","encodeURI","download","body","appendChild","click","removeChild","getDateTimeString","date","dayjs","extend","isToday","isYesterday","parsedDate","Number","time","format","isSame","getDateString","isSameDay","prevDate","parsedPrevDate","isAfterDiff","dateToManipulateAndCompare","unit","amount","dateToCompare","parsedDateToCompare","Date","isAfter","subtract","stopPropagationOnEventTags","event","parentRef","tagsToAllow","path","node","target","current","stopPropagation","push","tagName","parentNode","some","tag","includes","formikPostToPoll","postFormik","values","poll","errors","touched","setValues","shouldValidate","setFieldValue","setTouched","setFieldTouched","field","formikThreadToPost","threadFormik","index","items","fromHexString","text","match","parseInt","toHexString","toString","slice","toIcVariant","fromIcEnum","toIcEnum","fromIcOpt","toIcOpt","extractApiDataOrThrow","response","errorHandler","errorKind","Err","Function","Error","Ok","flattenInfiniteData","numberOfPagesToFlatten","pages","unshiftItemToInifiteData","prev","pageParams","item","limit","disableCreatingNewPage","newPages","leftoverItem","memo","page","newPage","unshiftToArrayWithLimit","replaceFieldInInifiteData","fieldKey","fieldValue","replaceItemInInifiteData","newItem","fieldToCheck","fieldToValidate","pageIndex","pagesIndex","findIndex","MESSAGE_PAGE_SIZE","formatItemInInifiteData","valueToCheck","fieldUpdater","abbreviate","suffixNum","Math","floor","shortValue","precision","parseFloat","pow","toPrecision","stringShortValue","toFixed","isIterable","Symbol","iterator","useArticleRelatedQueryKeys","articleId","update","queryKey","patch","useCommentRelatedQueryKeys","commentId","postId","findAndUpdateComment","useCallback","args","comments","comment","comment_id","SORT_ORDER","ASCENDING","DESCENDING","usePostRelatedQueryKeys","authUser","useQueryClient","getQueryData","routeParams","useParams","userId","useGetUserIdByUsername","username","updateThreadItem","post","OptimizedPost","findAndUpdateInThreadPreview","ThreadPreview","preview","id","findAndUpdatePost","optimizedPosts","optimizedPost","post_id","hashtags","useLocalStorage","withImages","withCertifiedUsers","getPaginatedOptimizedDiscoveryFeedQueryKey","with_hashtags","with_certified_users","with_image","skip_ids","getPaginatedOptimizedUserFeedQueryKey","getPaginatedOptimizedProfileFeedQueryKey","getPaginatedOptimizedHashtagFeedQueryKey","hashtag","posts","postItem","getProfilePinnedPostsQueryKey","duration","isPoll","optExtension","extension","toPollExtension","votes_per_user","isMultichoice","poll_duration_in_minutes","pollLength","asMinutes","options","choices","option","getCurrentContent","getPlainText","trim","humanizeUnit","upperCase","charAt","toUpperCase","humanizeTimeToVote","timeLeft","timeUnits","queryClient","QueryClient","defaultOptions","queries","refetchOnWindowFocus","queryCache","QueryCache","onError","async","error","message","isAuthenticated","logout","then","window","location","pathname","cancelQueries","relatedQueryKeys","invalidateQueries","snapshotQueries","updateQueries","setQueryData","old","setQueries","getUserName","user","user_name","svgRegExt","svgAvatarByUrl","loadSVGAvatar","url","hasOwnProperty","content","fetch","startsWith","walletKinds","walletKindToNamesMapping","Stoic","Plug","Nns","isValidWalletAddress","walletAddress","wallet","checksum","hash","validChecksum","verifyChecksum","countRepetitions","repetitions","kind","count","kinds","useGetProjectWithUserData","useQuery","res","mainApi","getExperienceWithUserData","enabled","onSuccess","experience","useGetProjectsWithUserData","getExperiencesWithUserData","useCreateNewProject","useMutation","projectForm","end_date","end","year","month","day","start_date","start","image","photo","formatImage","MIME_TYPES_PROJECT","description","user_tags","descriptionData","project","title","role","present","links","Boolean","company_name","BigInt","valueOf","collaborators","company_handle","company_username","newExperience","_","useRemoveProject","removeExperience","useEditProject","removePhoto","image_id","assetsApi","delete","err","updatedProject","updateExperience","useUpdateProjectCollab","updateExperienceCollab","useUpdateProjectCollabVisibility","visibility","updateExperienceCollabVisibility","customParseFormat","RECENT_USERS_INITIAL_ITEMS_LIMIT","LIKED_USERS_INITIAL_ITEMS_LIMIT","ConfirmModal","close","confirm","confirmButton","loading","ctaText","onClose","onSubmit","idlFactory","IDL","UserId","Nat64","KeyInfo","Record","Principal","timestamp","key_name","Text","ByteBuf","Vec","Nat8","TimeStamp","LinkMetadataBuf","image_url","Opt","publisher","author","logo_url","ImageBuf","canister_id","Asset","Variant","None","Null","LinkMetadata","Image","NFTUrl","ItemId","DeletionReport","articles","assets","threads","user_id","likes","comment_replies","thread_posts","experiences","followers","following","milestones","ThreadPostId","OptionId","ResourceId","WeekTimeStamp","Nat32","ErrorKind","InterCanisterUpdateCallError","Tuple","ThreadNotFound","RmpDeserializeError","ThreadPostNotInThread","PollOptionNotFound","ResourceAlreadyExists","PollUserAlreadyVoted","UserAlreadyBlocked","RmpSerializeError","ItemNotFound","PollVoteLimitExceeded","EncodeError","NotFound","ForbiddenAnonymousCaller","ThreadPostNotFound","InvalidUserId","WeekTimeStampWindowError","ItemsNotFound","InterCanisterCallFailed","PollNoVotes","PollExpired","StableMemory64GrowError","InvalidCallerKey","UnauthorizedUserCall","Other","LimitExceeded","PinnedPostLimitExceeded","UserBlocked","CannotBlockSelf","EncodedSizeError","UserIdNotFound","PollNotFound","ResultDeletionReport","Birthday","WalletKind","Wallet","Profile","wallets_are_public","Bool","principal","link","cover","badges","meta","name","education","description_hashtags","display_name","company","description_user_tags","birthday","nft_url","preferred_wallet","wallet_addresses","StatusCode","ResultStatus","Description","Collaborator","approved","visible","Experience","Int64","Milestone","one_day","pinned","Announcement","updated_at","action","announcement_type","created_at","button_name","announcement_id","Feedback","platform_type","Ios","Web","Android","Unknown","Article","time_to_read","summary","article_id","AuditLogEntry","report_id","VerifyUser","DisplayNameChange","ReportRemove","UnverifyUser","UsernameChange","ReportIgnore","RemoveComment","RemovePost","RemoveUser","audit_log_id","resource_id","CommentCounter","Comment","replies_counter","link_metadata","ReSharedCounter","AnnouncementId","ArticleId","MilestoneId","ExperienceId","QuotedResourceById","Post","ThreadPost","TotalVoteCounter","VotePercentage","PollOption","votes","vote_percentage","Poll","poll_end_timestamp","total_vote_counter","Extension","quoted_resource","nft_image_url","reshared_counter","quoted_resource_by_id","ProfileLiteWithPreferredWallet","preferred_wallet_address","master_id","QuotedResource","LikeCounter","PollInfo","request_user_votes","ExtensionInfo","OptimizedPostV2","comment_counter","author_profile","like_counter","is_liked_by_request_user","extension_info","OptimizedThreadPost","ApiCommentedPost","CommentPreview","commented_post","OptimizedThread","ApiItem","ResultApiItem","ResultUserIds","PostKind","ApiLeaderBoardV2","profiles","ApiLeaderBoardV1","LogId","LogLevel","Info","Warn","Debug","Log","level","Notification","resource","action_user","profile_image","seen","parent_resource_id","notification_id","notification_type","ReportResourceType","User","ReportCategory","InappropriateContent","Violence","Scam","Spam","Pornography","Impersonation","Report","resource_type","category","processed","Ordering","Descending","Ascending","PostId","OptimizedComment","ResultOptimizedCommentList","OptimizedUserFeed","profile","ResultOptimizedUserFeed","len","ApiItemFeed","OptimizedUserFeedV2","ResultOptimizedUserFeedV2","Offset","Limit","ApiFeedFilterParameter","ReportFeedFilterParameter","with_categories","with_types","MilestoneWithUserData","milestone","ExperienceWithUserData","ReportResource","OptimizedReport","report","OptimizedReportFeed","ResultOptimizedReportFeed","ResultApiItemFeed","ResultProfiles","GeneralStats","resolved","total","pending","ResultOptimizedThread","ResultOptimizedThreadPost","RequestStatus","Accepted","Pending","ConnectionRequest","status","caller","VerificationRequest","request_id","Ignored","Refused","Verified","verification_proof","NewAnnouncement","NewArticle","NewComment","NewExperience","NewMilestone","NewPostV1","NewPost","PollRequest","Nat16","ExtensionRequest","NewPostRequestV2","nft_image_urls","images","ResultPost","NewReportV1","NewReport","NewReportV2","ResultItemId","ProfileWithFollowerData","is_followed","LogCounter","NewThreadRequest","new_posts","author_id","FollowerProfileLite","ResultProfileWithFollowerData","SignupRequestV1","SignupRequest","SignupRequestV2","UpdateProfileRequestV1","UpdateProfileRequest","UpdateProfileRequestV2","Service","acceptConnection","Func","addTeamBadge","adminDeleteUser","adminUpdateUserNameInAllProfileOnce","allTokenRefreshStats","authorizeKey","authorizeKeyWithWords","autoSuggest","blockUser","cancelConnection","canisterStatus","stable_storage_size","cycle_balance","changeUsername","changeVerificationRequest","checkIfUserExist","commentsRemaining","deleteMyAccount","epochRestart","followUser","getAllExperiences","getAllFollows","followed","getAllFollowsWithData","getAllFollowsWithMutualData","mutual","getAllMilestones","getAllNotifications","action_user_id","getAnnouncement","getAnnouncementFeedbacks","getArticle","getArticleWithUserData","article","getArticles","getAuditLog","getAuditLogForModerator","getAuthorizedKeys","getBlockedBackup","blocked_users","getBlockedList","getBlockedListWithUserData","getCommentCount","getCommentWithUserData","getCommentsCount","getCommentsWithUserData","getCount","getDiscoveryFeed","getDiscoveryFeedWithUserData","getExperience","getExperienceCollabPendingCount","getExperienceCount","getExperiences","getExperiencesV2","getFollowCounts","getFollowedUsernames","getFollowedUsers","getFollowerUsernames","getFollowers","getFollowersWithLitePreferredWallet","getFollowersWithMutualData","getFollowingsWithMutualData","getGlobalLimit","getHashtagFeed","getHashtagFeedWithUserData","getItem","getItemLikes","getLastWeekLeaderBoardResultV2","getLastWeekLeaderBoardResultsV1","getLatestAnnouncements","getLatestUserPosts","getLatestUsers","getLikes","getLikesCount","getLikesUsers","getLogsFromIds","getMilestone","getMilestoneCollabPendingCount","getMilestoneCount","getMilestoneWithUserData","getMilestones","getMilestonesV2","getMilestonesWithUserData","getMostFollowed","getNotifications","getOfficial","getOwnReports","getPaginatedCommentsWithUserDataAndSorting","getPaginatedExperiences","getPaginatedExperiencesWithUserData","getPaginatedLogIds","getPaginatedLogs","getPaginatedMilestones","getPaginatedMilestonesWithUserData","getPaginatedOptimizedCommentForResourceId","getPaginatedOptimizedDiscoveryFeed","getPaginatedOptimizedDiscoveryFeedV2","getPaginatedOptimizedDiscoveryFeedV3","getPaginatedOptimizedHashtagFeed","getPaginatedOptimizedProfileFeed","getPaginatedOptimizedProfileFeedV2","getPaginatedOptimizedReportFeed","getPaginatedOptimizedUserFeed","getPaginatedOptimizedUserFeedV2","getPaginatedOptimizedUserFeedV3","getPaginatedOptimizedUserTagFeed","getPaginatedUserFeed","getPaginatedUsersWhoResharedPost","getPinnedItems","getPinnedMilestones","getPost","getPostCount","getPostWithUserData","getProfileListFromUserIdList","getProfilesWhoLikedPost","getProfilesWhoLikedThreadPost","getReport","getReportCount","getReportStats","users","getReportStatsV2","getReports","getReportsWithUserData","getSelf","getSelfUserId","getThread","getThreadPost","getThreadPostLikes","getUnreadNotificationCount","getUser","getUserById","getUserByUsername","getUserConnections","getUserCount","getUserFeed","getUserFeedWithUserData","getUserPendingConnections","getUserPosts","getUserPostsWithUserData","getUserTaggedFeed","getUserVerificationRequest","getUserVerificationRequestMaybe","getUsernames","getUsers","getVerificationRequest","getVerificationRequests","getVerificationRequestsWithUserData","request","getVerificationStats","getWordsKey","isConnected","isFollowedBy","isFollowing","isFollowingBatch","isKeyTrusted","isLimitEnabled","isRateLimited","isReported","isUserTrusted","likeItem","likeResource","markAllAsRead","markBadActor","migrateUsernames","newAnnouncement","newArticle","newCommentV2","newMilestone","newPost","newPostV2","newPostV3","newReport","newReportV2","newReportV3","paginatedSearch","paginatedSearchWithFollowerData","postLog","postLogs","postPollVote","postThread","postsRemaining","processReport","provideAnnouncementFeedback","provideAnnouncementFeedbackV2","removeAnnouncement","removeArticle","removeComment","removeConnection","removeFollower","removeItem","removeKey","removeMilestone","removeNotifications","removeNotificationsForAllUsers","removeNotificationsForUsers","removePost","removeTeamBadge","removeThreadPost","removeUser","removeUsername","requestConnectionWithUser","search","searchFollowersFirst10StartWith","searchFollowersProfileFirst10StartWith","searchFollowersProfileLiteFirst10StartWith","searchUserNamesForProfileWithFollowerData","searchWithFollowerData","setArticleImage","setGlobalLimit","setLimits","setNotificationsStatus","setOfficial","setUserLimit","setWords","signup","signupV2","signupV3","tokenRefresh","tokenRefreshStats","transferUsername","trustKey","unblockUser","unfollowUser","unlikeItem","unlikeResource","unmarkBadActor","untrustKey","unverifyUser","updateAnnouncement","updateArticle","updateCoverImage","updateDisplayName","updateMilestone","updateMilestoneCollab","updateMilestoneCollabVisibility","updateNFTProfileImage","updatePinnedMilestone","updateProfile","updateProfileImage","updateProfilePinnedPosts","updateProfileV2","updateProfileV3","verificationRequest","verifyUser","verifyUsersByUsernames","RoomId","ApiErrorKind","MsgPagninationLimitExceeded","RoomNotBlocked","ProfileNotFoundInCanister","UserHasNoRoom","IndexOutOfBound","RoomAlreadyExists","RoomNotFound","MaxPacketSizeReached","MissingRoom","UserNotAParticipantToThisRoom","MissingRoomForUsers","RoomAlreadyBlocked","UserNotFound","CannotUnblockRoomBlockedBy","ApiResultRoomId","MsgToken","MimeType","Gif","Jpg","Png","String","Video","PostMsg","token","mime_type","UnReadCounter","MsgId","MsgStatus","Read","UnRead","Content","GetMsg","RoomHeader","participants","statuses","msgs_len","blocked_by","RoomCard","is_following","number_of_unread_msgs","other_user_profile","last_msg","room_header","ApiResultRoomCard","ProfileLite","RoomCardLite","ApiResultRoomCardLite","ApiResultStatus","ApiResultGetMsgList","ApiResultRoomHeaderList","ApiResultRoomIdList","ApiResultRoomCardLiteList","ApiResultRoomCardList","ApiResultProfileList","ApiResultProfileLiteList","ApiResultRoomHeader","ApiResultUnReadMsgCounter","NotificationCounter","PushMsgResponse","ApiResultPushMsgResponse","createRoomBetweenUserIds","createRoomBetweenUserIdsAndPushMsgReturnRoomCard","createRoomBetweenUserIdsAndPushMsgReturnRoomCardLite","deleteRoom","getAllMsgsInRoom","getAllRoomHeaderForUserId","getAllUserRoomIdList","getPaginatedMsgsInRoomForUserIds","getPaginatedMsgsInRoomId","getPaginatedRoomCardLitesFromUserId","getPaginatedRoomCardsFromUserId","getProfileLiteListFromUserIdList","getRoomCardFromRoomIdForUserId","getRoomCardLiteFromRoomIdForUserId","getRoomHeaderFromRoomId","getRoomIdFromUserIds","getUnReadMsgCounterForUserId","getUnReadMsgNotificationCounterForUserId","pushMessageToRoomId","resetUnReadMsgNotificationForUserId","setAllRoomStatusForUserId","setAllStatusForUserIdInRoomId","setLastMsgsStatusForUserIdInRoomId","setRoomToBlockFromRoomIdForUserId","setRoomToUnBlockFromRoomIdForUserId","KeyValue","append","batch_put","get","get_random_key","list","lookup_data_bucket_for_get","lookup_data_bucket_for_put","maintenance","put","set_data_bucket_canister_wasm_binary","set_used_bytes_threshold","AssetType","Static","Model","TokenIndex","AssetInfo","assetName","TokenIdentifier","AccountIdentifier","address","AllowanceRequest","owner","spender","Balance__1","Nat","CommonError","InvalidToken","Result__1_2","ok","SubAccount","Balance","ApproveRequest","subaccount","allowance","BalanceRequest","CommonError__1","BalanceResponse","Memo","TransferRequest","to","notify","TransferResponse","CannotNotify","InsufficientBalance","Rejected","Unauthorized","TokenIdentifier__1","AccountIdentifier__1","Result__1_1","Metadata","fungible","decimals","metadata","symbol","nonfungible","HeaderField","HttpRequest","method","HttpResponse","status_code","Result__1","Result_2","Result_1","Time","Int","Listing","locked","seller","price","Result","acceptCycles","addAssetURLMany","addAssetsType","addJSONMany","addMulti","addThumbnailMany","approve","approveAll","availableCycles","balance","batchMintNFT","batchTransfer","bearer","clearAssetURL","clearJSON","deleteAssetsType","extensions","getAllowances","getAssetURLByIndex","getAssetURLByTokenId","getAssetsType","getCapRoot","getJSON","getMinter","getMultiAssetURLByIndex","getMultiAssetURLByTokenID","getProperties","getRegistry","getRegistryOriginal","getThumbnailKeys","getTokens","getTokensByIds","getTokensByProperties","http_request","initCap","initproperties","isSuspended","mintNFT","rmMulti","setMinter","setSuspend","supply","tokens","tokens_ext","transfer","transferDistrikt","updateMetadataAndProperties","actor","messagingActor","assetsActor","nftActor","createActor","identity","agent","process","ENV_NAME","HttpAgent","host","retryTimes","Actor","actorInterfaceMain","canisterId","actorInterfaceAssets","AnonymousIdentity","actorInterfaceMessaging","actorInterfaceNft","setActor","actorInstance","useGetNftRegistry","nftApi","staleTime","cacheTime","useGetAddressByNftUrl","nftIndex","nftURL","result","POD","HELMET","forEach","SwitchWrapper","condition","wrappers","children","true","false","ConditionalWrapper","wrapper","CopyButton","disabled","variant","useExternalUrl","copyText","toastMessage","classes","useCopyBtnStyles","tooltipOpen","toggleTooltip","React","handleCopy","clipboard","writeText","getExternalUrl","sendHeartbeat","severity","onClick","className","linkButton","linkButtonContainer","copyTextIconButton","iconButton","size","useGetProfilePinnedPosts","api","initialData","useGetPaginatedOptimizedProfileFeed","useInfiniteQuery","pageParam","auth","exact","previousIds","extractPostItemKey","INITIAL_ITEMS_LIMIT","getNextPageParam","usePutAsset","imageId","imageIdToUse","createImageId","base64","binary_string","atob","bytes","charCodeAt","_base64ToArrayBuffer","useUpdateCoverImage","newCover","oldCover","fromText","userName","useUpdateProfile","useUpdateProfileImage","useUpdateNFTProfileImage","extractNftIndex","nftUrl","parsedNftUrl","URL","urlParams","URLSearchParams","has","extractNftIndexIdAndAssetsType","assetsType","tokenid","getHigherUnits","getRelatedUnits","getLowerUnits","relation","currentUnitIndex","currentUnit","checkAllLowerThanBound","units","targetUnit","checkAllCompareToBound","checkAllHigherThanBound","find","MIN_POLL_DURATION","MAX_POLL_DURATION","makeStyles","theme","tooltipStyle","backgroundColor","palette","mode","boxShadow","color","primary","main","fontSize","typography","pxToRem","paddingTop","spacing","paddingBottom","paddingLeft","paddingRight","tooltipArrow","tooltipIcon","height","width","tooltipText","marginLeft","icon","secondary","copyIcon","centeredContainer","display","justifyContent","alignItems","boxSizing","border","borderColor","colors","borderRadius","padding","background","marginBottom","cursor","textDecoration","useRemoveFollowerStyles","button","useSelectMenuStyles","checkIcon","right","menuPaper","marginTop","menuItem","selectedMenuItem","ui_04","selectedDangerMenuItem","danger_ghost_pressed","danger","danger_ghost_hover","dangerMenuItem","dangerIcon","marginRight","openRoundButton","useStyles","closeButton","closeButtonContainer","alignSelf","titleContainer","heading","textTransform","fontWeight","subheading","opacity","largeIcon","DialogHeader","handleClose","subtitle","warning","root","aria-label","component","Close","viewBox","style","Warning","stringToBytesArray","str","utf8Encode","TextEncoder","encode","bytesArrayToString","TextDecoder","decode","isUrl","getRelativeParent","getComputedStyle","getPropertyValue","parentElement","positionSuggestions","decoratorRect","popover","state","filteredEmojis","relativeParent","relativeRect","relativeParentRect","getBoundingClientRect","scrollLeft","scrollTop","left","top","pageXOffset","documentElement","pageYOffset","popoverHeight","clientHeight","distanceToElBottom","bottom","transform","transition","innerHeight","isActive","transformOrigin","uuidv4","createIcImage","dialog","breakpoints","down","isAvatarPreview","contentContainer","overflow","maxWidth","maxHeight","objectFit","nftImage","minWidth","minHeight","anchorOriginBottomRightCircle","contentRoot","FullImageModal","open","nftImageUrl","isNft","aria-labelledby","aria-describedby","overlap","anchorOrigin","vertical","horizontal","badgeContent","CircledClose","anchorOriginBottomRightCircular","src","alt","StyledToggleButton","styled","ToggleButton","ui_03","ui_01","NavigationButton","selected","iconOnly","startIcon","endIcon","disableFocusRipple","fullWidth","getMobileOS","vendor","redirectToStore","ANDROID_APP_LINK","IOS_APP_LINK","position","ICIdentityExplaierModal","setLoading","useState","Dialog","DialogContent","onLoad","textAlign","logoIcon","iiLink","guestButton","loginSignupBox","flexDirection","buttons","downloadButton","initialValues","recomputeMode","handleAction","OpenDistriktContext","createContext","OpenDistriktProvider","props","iiExplainerOpened","setIiExplainerOpened","loginModalOpened","setLoginModalOpened","setMode","computeMode","isSignedUp","isIdentified","getModeElements","isLoading","useGetSelf","refetchIdentity","getIdentity","useLocation","userOS","useEffect","onLoginSignupBoxAction","Provider","noBtns","closeOnBackdropClick","Typography","onKeyDown","tabIndex","buttonsClassName","Button","baseTheme","xs","sm","md","lg","xl","sidebar","normal","fontFamily","fontWeightRegular","fontWeightBold","h1","lineHeight","h1b","h2","h2b","h3","h3b","bodyb","paragraph","getTheme","themeColor","createTheme","primary_hover","primary_pressed","danger_hover","danger_pressed","danger_disabled","success","info","ui_background","ui_gradient","ui_02","ui_05","ui_06","ui_07","getDarkTheme","default","paper","components","MuiCssBaseline","styleOverrides","html","scrollbarWidth","scrollbarColor","MuiTypography","defaultProps","variantMapping","MuiAppBar","MuiButton","disableElevation","ownerState","contained","containedError","outlined","outlinedError","textError","MuiIconButton","colorPrimary","MuiToggleButton","only","c","MuiOutlinedInput","input","MuiInputAdornment","margin","MuiFormHelperText","MuiRadio","checkedIcon","MuiAlert","wordBreak","standardSuccess","standardInfo","standardWarning","standardError","MuiAlertTitle","MuiSelect","iconOutlined","select","MuiLinearProgress","MuiPopper","MuiModal","MuiPopover","invisible","MuiAutocomplete","MuiSnackbar","MuiPaper","MuiMenuItem","MuiCardActions","MuiCard","MuiCardHeader","MuiCardContent","MuiLink","MuiCheckbox","disableRipple","fill","MuiCalendarPicker","viewTransitionContainer","MuiPickersDay","MuiFormControl","MuiFormControlLabel","MuiInputBase","MuiSvgIcon","MuiTab","borderBottom","MuiTabs","indicatorColor","span","flexContainer","MuiDialog","MuiDialogTitle","MuiDialogContentText","MuiChip","MuiDrawer","elevation","modal","StatelessThemeProvider","createMuiStrictModeTheme","StyledEngineProvider","injectFirst","CssBaseline","ThemeProvider","themeLS","setThemeLS","colorMode","setColorMode","newMode","colorValue","matchMedia","matches","ColorModeContext","LocalizationProvider","dateAdapter","AdapterDayjs","enableColorScheme","Svg","createSvgIcon","stroke","strokeWidth","fillRule","d","WarningIcon","COMMENTS_INITIAL_ITEMS_LIMIT","MAX_POLL_CHOICES","MAX_POLL_CHOICE_CHAR_COUNT","DEFAULT_POLL_DURATION","days","hours","minutes","minPollDuration","maxPollDuration","TOP_SIGNIFICANT_POLL_UNIT","lowerThanTopSignificantUnits","higherThanTopSignificantUnits","BOTTOM_SIGNIFICANT_POLL_UNIT","reverse","lowerThanBottomSignificantUnits","higherThanBottomSignificantUnits","NB_POLL_MANDATORY_CHOICES","POLL_LENGTH_TIME_UNITS","cap","MAX_MENTIONS_WITH_POLL","defaultPollInfo","createEditorStateWithText","choicesVisible","INITIAL_VERIFICATION_ITEMS_LIMIT","MAX_FILE_SIZE","MIME_TYPES_POST","MIME_TYPES","MIME_TYPE_KEYS","JPEG","JPG","GIF","PNG","defaultPostInfo","mentions","PROFILE_PICTURE_ASPECT_RATIO","PROFILE_COVER_PICTURE_ASPECT_RATIO","defaultThreadInfo","strokeLinecap","strokeLinejoin","ProfileMentionIcon","LinearProgressWrapper","Box","icons","Alert","progress","setProgress","setOpen","el","getElementById","startExitAnimation","timer","setInterval","oldProgress","max","clearInterval","useMemo","Portal","container","Snackbar","ClickAwayListenerProps","mouseEvent","TransitionComponent","Grow","TransitionProps","onExited","IconButton","SvgIcon","AlertTitle","LinearProgress","sx","useGetUserByUsername","useGetUserIdById","useGetArticles","useGetFollowCount","getAllFollowersLiteData","refetchInterval","useGetCurrentProfileFollowCount","useRemoveFollower","onMutate","variables","previousValue","context","onSettled","useFollow","isMutatingFollow","useIsMutating","mutationKey","previous","previousCount","previousAuthCount","__","rollback","useUnfollow","useRemoveUser","useBlockUser","useUnblockUser","useIsFollowedByNoInit","useContext","useIsFollowedBy","follows","useIsFollowing","tooltip","nbCharsDisplayed","getCustomExternalLink","regex","RegExp","Tooltip","arrow","overflowY","DialogTitle","verticalAlign","MuiDialogContent","DialogActions","MuiDialogActions","ctaButtonBox","cancelText","closeOnSubmit","hideDivider","onCancel","cancelColor","onlySubmit","form","disableInlingLoading","secondarySubmitIcon","secondarySubmit","onSecondarySubmit","secondarySubmitDisabled","hasSubmit","useTheme","disableEscapeKeyDown","hideBackdrop","PaperProps","reason","DialogContentText","Divider","Loading","inline","preventDefault","textOverflow","whiteSpace","teamBadge","listItemAvatar","allowMoreActions","preferredWalletAddress","preferredWallet","isFollowedLoading","mutate","isRemovingFollower","handleRemoveFollower","moreButtonItems","handleClick","alertMessage","flex","ListItemAvatar","UserAvatar","clickable","ListItemText","Link","renderUserBadge","primaryTypographyProps","noWrap","secondaryTypographyProps","gap","FollowButton","MoreButton","StyledListItem","ListItem","UserList","disabledPath","reversedDisabled","UserComponent","List","mt","disabledData","DropdownContainer","Paper","zIndex","ContainedContainer","HeaderContainer","LoadingContainer","Title","EmptyText","MuiDivider","MuiList","InlineLoadingContainer","Popper","Dropdown","itemCount","headerItems","emptyMessage","getHeaderOptionLabel","onHeaderClick","Container","Styled","disablePadding","ListItemButton","Input","inputProps","InputProps","placeholder","disableIcon","TextField","startAdornment","InputAdornment","disablePointerEvents","Search","portalElementId","focusOnMount","onChange","onBlur","forceUsePortal","results","ref","useRef","mobileSize","useMediaQuery","term","setTerm","searchTerm","setSearchTerm","focus","setFocus","clearSearch","debounceSearch","handleHeaderClick","blur","Autocomplete","freeSolo","disablePortal","onOpen","relatedTarget","localName","clearIcon","filterOptions","inputValue","getOptionLabel","onInputChange","renderInput","inputRef","renderOption","UserPreviewCard","enableFollowing","PopperComponent","PaperComponent","Checkbox","useIsUserTrusted","catch","HeartbeatView","useIsUserNftOwner","registry","accountIdentifier","principalToAccountIdentifier","useGetAllFollowerLiteData","followCounts","pageSize","EXPORT_FOLLOWERS_ITEMS_LIMIT","offset","withChildren","leftContainer","backButton","appBar","AppBar","showDivider","guestView","up","PageHeader","showBackButton","showRightButton","buttonTitle","buttonVariant","buttonDisabled","showDividerOnlyOnScroll","history","useHistory","scrollOnTop","setScrollOnTop","onScroll","addEventListener","removeEventListener","tabletSize","goBack","inputTopLabel","inputBottomLabel","inputDisabledLabel","lengthLimitLabel","topLabelContainer","errorIcon","noDisplay","TextLimitCount","valueLength","lengthLimit","focused","helperText","FormHelperText","DesignSystemTextField","gutters","required","onFocus","inputLabel","errorText","rows","multiline","enableLimitCount","bottomLabel","copyToClipboard","copyToClipboardToastMessage","plugins","setFocused","editor","valueText","mapKeyToEditorCommand","editorState","keyCode","getDefaultKeyBinding","newEditorState","RichUtils","onTab","makeFocused","makeBlurred","FormControl","mb","editorKey","keyBindingFn","spellCheck","readOnly","maxLength","endAdornment","MIME_TYPES_PROFILE","SHOW_ALL_STATUS_INIT","experienceCollabs","milestoneCollabs","PROFILE_TABS","ACTIVITY","EXPERIENCE","MAX_PROJECTS_LIMIT","LOAD_PROJECT_ITEMS_LIMIT","MAX_MILESTONES_LIMIT","LOAD_MILESTONE_ITEMS_LIMIT","PROFILE_FOLLOWS_ITEMS_LIMIT","sha224","shaObj","jsSha224","create","useGetPaginatedOptimizedDiscoveryFeed","resetStreamFilters","localStorage","MSG_STATUS","FILTER_OPTIONS","ALL","READ","UNREAD","MESSAGE_CHAR_LIMIT","x1","y1","x2","y2","x","y","rx","cx","cy","r","points","fillOpacity","xlinkHref","AddIcon","AlarmBellIcon","AlarmBellFilledIcon","AlarmBellFilledUnreadIcon","AlarmBellUnreadIcon","ArrowBackIcon","ArrowDownIcon","ArrowLeftIcon","ArrowRightIcon","ArrowUpIcon","CalendarIcon","CheckIcon","CopyIcon","DiscoverIcon","DiscoverFilledIcon","DistriktIcon","DistriktLogoIcon","EditIcon","ErrorFilledIcon","FavoriteIcon","FavoriteFilledIcon","FlagIcon","FlashIcon","FlashFilledIcon","ThunderFilledIcon","HomeIcon","HomeFilledIcon","InfoIcon","InfoFilledIcon","LockIcon","MarkAsReadIcon","MenuIcon","MessagesIcon","MessagesDoubleIcon","MessagesFilledIcon","MessagesUnreadIcon","MoreInfoIcon","NewspaperIcon","NewspaperFilledIcon","PictureIcon","PinIcon","PollIcon","ProfileIcon","ProfileFilledIcon","RefreshIcon","RadioOutlineIcon","RadioInsideIcon","RemoveIcon","RemoveBinIcon","SearchIcon","SearchFilledIcon","SendIcon","SettingIcon","SettingFilledIcon","ShareIcon","Share2Icon","SmileFaceIcon","SuccessFilledIcon","UnpinIcon","UserRemoveIcon","LogoHeaderIcon","ViewOffIcon","ViewOnIcon","VerificationBadgeIcon","WarningFilledIcon","mask","DarkIcon","LightIcon","AutoIcon","clipPath","ThreadIcon","CakeIcon","WalletIcon","pendingCalls","Map","cached","jpeg","jpg","gif","png","Cache","resolveImage","Promise","resolve","query","imageBytes","add","set","mimeType","blob","Blob","ImageLoader","imageProp","setSrc","setError","loadImage","createObjectURL","revokeObjectURL","ProfileImageLoader","skeleton","skeletonProps","defaultImage","payload","Skeleton","imgContainer","imageFullsize","aspectRatio","borderBottomLeftRadius","borderTopLeftRadius","borderBottomRightRadius","nftImageQuotedResource","imageQuotedResource","pointerEvents","withoutMarginTop","PostImageLoader","isQuotedResource","imageModal","setImageModal","nftError","setNftError","setNft_image_url","indexAndAssetsType","addressByNftUrl","isLoadingAddressByNftUrl","nftImageByIndex","ImageToDisplay","clsx","FullImage","backdrop","box","formattedSize","loop","animationData","lottieJson","play","useDeferredPromise","deferRef","defer","deferred","promise","reject","useOptimisticMutation","previousData","isMutating","usePreviousValue","currentRef","prevRef","useScrollIsBottom","itemLength","isBottom","setIsBottom","isTop","setIsTop","isScrollEnabled","setIsScrollEnabled","useScroll","scrollHeight","emojiSelectPopoverEntry","emojiSelectPopoverEntryFocused","emojiGroup","emojiSelectButton","emojiSuggestionsEntry","alignContent","emojiSuggestionsEntryFocused","light","commonEmojiContainer","modalEmoji","postEmoji","emoji","backgroundImage","useEmojiPlugin","selectButtonContent","defaultTheme","emojiSelectPopover","emojiSuggestions","emojiSelectPopoverNavEntry","emojiSelectPopoverNavEntryActive","emojiPlugin","createEmojiPlugin","useNativeArt","toneSelectOpenDelay","createPlaceholderProject","unix","createPlaceholderMilestone","getCollaborators","authId","approvedOnly","isOwnCollab","collab","isUserCollab","getCollaboratorsAdvanced","newCollab","formattedDate","createdAt","itemDate","parse","nowDate","now","relativeTime","updateLocale","future","past","s","m","mm","h","hh","dd","M","MM","yy","formatMonthYear","formatSimple","borderTopRightRadius","openAvatarInModal","avatarRef","avatarModalOpened","setAvatarModalOpened","avatarError","setAvatarError","avatarSVG","setAvatarSVG","nftCanisterImage","setNftCanisterImage","img","onload","svg","this","querySelector","imgProps","SelectMenu","anchorEl","setAnchorEl","setToastMessage","handleMainButtonClick","currentTarget","handleItemClick","aria-haspopup","aria-expanded","Menu","MenuItem","avatarContainer","nameFullWidth","highlightedUsername","reactStringReplace","extractPostItemTimestamp","toUint8Array","array2","decodeTokenIdToIndex","tid","encodeTokenId","fromUint8Array","toText","loadNfts","getPrincipal","myNfts","nftsAndMetadata","JSON","tokenId","multiAssetUrl","nftsAndMetadataItem","serialNumber","urls","getNftIndexUrl","getNftTokenIdUrl","transferNft","idx","transferResult","getMyPrincipal","badgeProps","badge","isUserDistriktTeam","isUserVerified","authClient","AuthClient","idleOptions","disableIdle","ac","MAX_TIME_TO_LIVE","login","identityProvider","maxTimeToLive","derivationOrigin","useGetPaginatedOptimizedUserFeed","getPinnedMilestonesQueryKey","useGetPinnedMilestones","getMilestoneWithUserDataQueryKey","useGetMilestoneWithUserData","getMilestonesWithUserDataQueryKey","useGetMilestonesWithUserData","useCreateNewMilestone","milestoneForm","useUpdateMilestone","updatedMilestone","useUpdatePinnedMilestone","milestoneId","wasPinned","mutation","mutationFn","useUpdateMilestoneCollabVisibility","useUpdateMilestoneCollab","useRemoveMilestone","variantProp","cancelVariant","followText","confirmModal","setConfirmModal","isFollowingLoading","isFollowedByLoading","useFollowMutation","useUnfollowMutation","openDistriktMode","openDistriktAction","mutateAsync","AlertOld","avatar","Avatar","ConditionalRoute","Component","routeProps","render","LeftArrowIcon","RightArrowIcon","SwitchViewIcon","OpenPickerIcon","ErrorPickerIcon","DatePicker","disableHighlightToday","inputFormat","DialogProps","offsetWidth","renderDay","_value","DayComponentProps","today","isSelected","Badge","PickersDay","onMouseDown","StyledBox","Dot","emptyText","displayName","bullet","resultsTitle","divider","listItem","inlineLoading","ItemComponent","dense","ProfileDropdown","Card","disableBorder","CardContent","CardActions","EmptyState","CardMedia","gutterBottom","FilterInput","handleChange","LoginSignupBox","propsSx","boxProps","handleLogin","setItem","ErrorListItemIcon","ListItemIcon","CheckListItemIcon","Select","emptyLabel","hideEmptyLabelOnDropdown","defaultValue","onMouseLeave","narrow","showWarningIcon","displayEmpty","IconComponent","MenuProps","Fade","in","Check","MAX_PREVIEW_IMAGE_HEIGHT","MAX_DISPLAY_NAME_LENGTH","MobileSessionIdentity","SignIdentity","constructor","_publicKey","super","getPublicKey","sign","MemoryClientStorage","storage","remove","MobileAuth","appUrl","setAppUrl","getValue","queryString","sessionPublicKey","callbackUri","Ed25519PublicKey","fromDer","delegationChain","getDelegation","stringify","toJSON","redirectUrl","setTimeout","py","backgroundSize","backgroundPosition","topContainer","imageContainer","bottomContainer","logo","textContainer","topText","AppDownload","resourcesContainer","CookiePolicy","TableContainer","Table","table","TableHead","TableRow","TableCell","TableBody","scope","ERRORS","getItemDataFromFeed","queryProps","parentResourceId","resourceId","useGetPostOrThreadPost","threadId","getItemQuery","getInitialItemDataFromFeeds","getThreadPostQuery","useGetPaginatedOptimizedCommentForResourceId","commentsSort","useNewCommentV2","linkify","substr","indexOf","imageFormatted","prepareAndSubmitComment","threadMasterId","preparePostData","quotedResourceById","quotedResource","baseOptionsContainer","flexWrap","plusThreadButton","editorContainerModal","editorContainer","between","editorAndDelete","contentSidedesk","verticalDividerContainer","verticalDivider","editorContainerComment","commentEditor","photoContainer","photoContainerComment","optionsContainer","optionsContainerComment","toolbarContainer","flexGrow","toolbarContainerComment","postBtns","rightContainer","rightContainerWithCounter","rightContainerComment","counter","usernameError","usernameErrorMobile","emojiPopup","emojiPopupModal","hide","emojiButton","checkboxLabel","checkboxLabelDisabled","checkbox","linkPreview","withStyles","createStyles","rootEditor","placeholderThread","userCard","listItemContainer","suggestionsContainer","modalSuggestionsContainer","setEditorState","processing","setLoadingSearch","onEnter","disableMentions","emojiSuggestionProps","glowingPlaceholder","inputFocused","inputFocusedForce","suggestions","setSuggestions","MentionSuggestions","mentionPlugin","createMentionPlugin","mentionRegExp","mentionRegex","entityMutability","mentionPrefix","supportWhitespace","mentionSuggestionsPopupVisible","mentionSuggestionsEntryFocused","newSuggestions","suggestion","newSuggestion","finally","onOpenChange","_open","onSearchChange","EmojiSuggestions","EmojiSelect","nativeEvent","shiftKey","onAddMention","entryComponent","mention","searchValue","isFocused","parentProps","renderEmptyPopup","useIsVisibleExperience","authUserId","isCollab","isOwner","rootContainer","rootContainerMilestone","rootContainerProject","rootProjectContent","rootMilestone","rootProject","milestoneContainer","collabHidden","addButtonContainer","borderTop","addButton","collaboratorContainerProject","collaboratorContainerMilestone","collaboratorText","LoadMoreButton","isFetching","fetchNextPage","useMentionsParser","trimEnd","substring","self","cache","maxMentions","resolveMention","exists","checked","ret","all","commentStyles","postContainer","common","white","postHeader","userInfo","headerText","nameText","smallText","wordWrap","imageContainerComment","imageOnlyContainerComment","postFooter","buttonContainer","buttonText","card","actions","commentHeader","verificationBadge","nameLink","commentContainer","replyWrapper","repliesWrapper","replyButton","showRepliesButton","styles","toolbar","iconButtonActive","emojiContainer","isDisabled","onCloseEmoji","onOpenEmoji","closeOnEmojiSelect","isActivated","setPhoto","errorMessage","setErrorMessage","handleUploadFile","files","file","reader","FileReader","formatReaderDataToImage","readAsDataURL","accept","htmlFor","createPoll","addons","Grid","Emojis","replyRoot","reply","replyToReply","onCommentCreated","onCommentCreateStart","onEditorClose","composeClasses","useComposeStyles","usernameErrorModal","setUsernameErrorModal","exceededErrorModal","setExceededErrorModal","errorModal","setErrorModal","newCommentV2Mutation","mentionsParser","mentionsChecker","useMentionsChecker","setEmojiOpened","emojiOpened","setInputFocused","formikValidate","textLength","preSubmitChecksPromise","preSubmitChecksPromiseRef","preSubmitChecks","toICCommentRequest","formikSubmit","setSubmitting","resetForm","resolution","formik","useFormik","validate","contentLength","isComposerLoading","setIsComposerLoading","isProccessing","isSubmitting","onComposeEvent","handleSubmit","ComposeContainer","emojiPlugins","onEvent","setIsLoading","isValid","clickableDate","secondRow","cardRoot","cardAction","overflowX","singlePost","sharedPost","threadPreview","commentedPostUsername","ExtendedUserCard","includeAction","routerLocation","CardHeader","RouterLink","subheader","UserListModal","hasNextPage","isFetchingNextPage","my","fetchUsersLike","pagedUsersLike","lastPage","UserListComponent","WarningModal","RESOURCE_TYPE","likedIcon","linkText","LikeResource","FEATURES","likeCounter","isLiked","isLikedProp","resourceType","postUserId","likedModal","setLikedModal","warningModal","setWarningModal","handleLikeUnlikePost","updatePostLikes","operation","likeUnlike","useLikeUnlikePost","handleLikeUnlikeArticle","updateArticleLikes","articleLikes","l","useLikeUnlikeArticle","handleLikeUnlikeComment","updateCommentLikes","useLikeUnlikeComment","likeCounterExists","likesData","useGetLikes","toggleLike","toggleLikeModal","REPORT_CATEGORIES","VIOLENCE","IMPERSONATION","SPAM","PORNOGRAPHY","INAPPROPRIATE_CONTENT","SCAM","UNKNOWN","FEATURE_CATEGORIES","POST","COMMENTS","USERS","PROJECTS","MILESTONES","getReportCategoriesByFeature","feature","ReportModal","setValue","openWarning","setOpenWarning","submitCount","reportCategory","v","reportLabelToValue","toLowerCase","minRows","openInputModal","setInputModal","successReport","setSuccessReport","reportedError","setReportedErrorModal","reportLoading","setReportLoading","validateOnChange","client","registerPlugin","scanner","parser","utils","POUND","DOMAIN","TLD","LOCALHOST","UNDERSCORE","NUM","START_STATE","Hashtag","createTokenClass","isLink","HASH_STATE","tt","HASHTAG_STATE","HASH_UNDERSCORE_STATE","HASHT_DIVIDER_SYMS_STATE","badTag","badTagThreadPreview","RichTextFormat","onContentClick","ignoreTags","attributes","rel","formatHref","SingleComment","commentItem","onCommentDelete","replyId","onShowCommentReply","showCommentReplyPostId","isTrusted","setProcessing","blockUserMutation","commentDeleteMutation","useHandleCommentDelete","showRepliesLS","setShowRepliesLS","deleteModal","setDeleteModal","showBlockUserAlert","setShowBlockUserAlert","showWarningAlert","setShowWarningAlert","showCommentReply","setShowCommentReply","showReplies","setShowReplies","replyDisabled","setReplyDisabled","commentBottomRef","reload","MoreCommentButton","deleteOrReportItem","blockUserItem","updateCounters","replies","repliesCount","replyToComment","Like","PostImageWrapper","PostNftImageWrapper","PollOptionControl","Radio","PollVoteControlSection","isInteractive","updateTimeLeftToVote","initialChoices","updateOptimizedPost","selectedOptions","totalVoteCounter","optionsInfo","percentage","intPercentage","remainder","remainingPercentages","sum","sort","info1","info2","currentInfo","vote","voteMutation","selectedChoices","diff","isAnyOptionSelected","isSuccess","onRadioButtonChange","onCheckboxChange","onOptionClick","RadioGroup","FormControlLabel","ml","control","mr","handleBlur","PollResults","maxVotes","hasVotedForTheOption","votedOptionId","valueBuffer","totalVotes","userVotes","hasAlreadyVoted","voteEndDate","calculateTimeLeftToVote","millisecondsLeftToVote","timeLeftToVote","setTimeLeftToVote","handle","POLL_REFRESH_TIME_SECONDS","isVotingEnded","asMilliseconds","timeLeftToVoteHumanized","isSmallScreen","pollExpiredDialogOpen","setPollExpiredDialogOpen","onVotingError","PostContent","commentPreview","previewPost","isPostPoll","requestUserVotes","PostContentVerticalConnect","enableLeftSideVerticalConnection","flexItem","orientation","noPadding","verticalDeviderEnabled","contentSidedesk2","PostHeader","buttonItems","isMyPost","enableActions","isPinned","postUrl","reshareIcon","UserListResharesModal","fetchUsersReshare","pagedUsersReshare","ReshareResource","reshareCounter","setPostModal","resharedModal","setResharedModal","toggleReshareModal","resharePost","UserListReshares","useToolbarStyles","goToPostButton","PostToolbar","postData","authorData","onPostDelete","commentPreviewPostId","postModal","removeItemMutate","useRemoveItem","commentCounterExists","commentCountData","commentCount","Reshare","Toolbar","ThreadIconContainer","FullThreadButton","SharedThreadPost","isThread","Thread","thread","successPostDelete","setSuccessPostDelete","handlePostDelete","lastPost","threadPost","disabledSpacing","showSingleThreadPost","hasMoreThreadPosts","quotedContainer","hasImage","leftAside","topWrapper","titleWrapper","authorWrapper","flexShrink","iconButtonNext","WebkitLineClamp","WebkitBoxOrient","loaderWrapper","iconsLoader","LinkPreview","hasNext","onNextClick","onCloseClick","failedImage","setFailedImage","failedIco","setFailedIco","ArrowRight","Remove","dangerouslySetInnerHTML","__html","SharedPost","postRef","infoContainer","float","actionsContainer","relatedContainer","infoText","userInfoContainer","userContainer","UserInfo","parseImagesFromArticleText","smallImage","matched","attr","params","matchLink","getLink","articleObject","toggleCopied","setToggleCopied","scrollTo","msg","ArticleErrorBoundary","hasError","componentDidCatch","errorInfo","logger","SingleArticleContainer","useRouteMatch","useLayoutEffect","Suspense","fallback","styledButton","inlineStyleControls","blockStyleControls","mainContainer","sideControls","addContainer","StyledButton","onToggle","active","INLINE_STYLES","InlineStyleControls","currentStyle","getCurrentInlineStyle","BLOCK_TYPES","BlockStyleControls","selection","getSelection","blockType","getBlockForKey","getStartKey","getType","ArticleCreate","setTitle","toggleBlockType","toggleInlineStyle","inlineStyle","handleKeyCommand","command","newState","InlineToolbar","inlineToolbarPlugin","createInlineToolbarPlugin","handleCreate","convertToHTML","published","pl","pr","InputLabelProps","TextFields","popupId","popupState","bindTrigger","bindMenu","MenuListProps","FormatListNumbered","AlternateEmail","PanoramaOutlined","CodeOutlined","SharedArticle","ArticleRoutes","findResourceType","resourceIdentifier","getResourceQueryKey","getResource","useGetReportResource","getReportResource","sharedContainer","successExperienceDelete","setSuccessExperienceDelete","enableQuotedResourceDataSource","q","extractTypeFromQuotedResourceData","userData","userIsLoading","extractAuthorIdFromQuotedResourceData","announcement","formatQuotedResourceToReport","extendedQuotedResource","showMenu","profileUserId","onProjectDelete","onMilestoneDelete","usePinUnpinPost","firstOlderItemIndex","dataClone","concat","pageClone","setPinPosts","pinnedPostsIds","SinglePost","cantPinModalOpen","setCantPinModalOpen","pinUnpinPostMutation","nbPinnedPosts","useGetPinnedPostsIds","pinPost","square","historyUrl","previewPostButtonWrapper","previewPostButton","previewPostLS","setPreviewPostLS","setPreviewPost","listen","PostItem","placeholderImage","Feed","PinnedPosts","queryResults","pinnedPosts","Fragment","ActivityTab","pagedPostItems","isFetched","postItems","pinnedPostsQueryResults","isPinnedPostsFetched","isPinnedPostsFetching","userWrapper","unblocking","BlockedUser","setUnblockedUsers","handleUnblockAlert","setUnblockingUserId","unblockingUserId","blockUserMutate","unblockUserMutate","isBlocked","setIsBlocked","confirmationModal","setConfirmationModal","blockedUnblockedState","postMessageToGetMessage","getTime","skipOnErrorDisplay","resetError","updateLastMsgInRoomCard","roomId","roomIndex","unshiftPostMessage","replaceMsgByToken","updateUnreadRoomCounter","rooms","lastMsg","useCreateRoomBetweenUserIdsAndPushMsg","messagingApi","followerUser","previousRooms","previousMessages","formattedMessage","followerUserBaseData","unshiftTempRoomCardLite","room","unshiftRoomAndRemoveRoomCardByUserId","newMessage","unshiftNewMessage","useSetLastMsgsReadStatusUserId","messageId","updateRoomCardLastMsgStatus","CollaboratorSearch","searchData","prevSearchTerm","placeholderData","f","toLocaleLowerCase","useCollabSearch","cancelButton","coverPreview","confirmContainer","confirmContent","searchContainer","resultsContainer","userAside","ChooseCollaboratorsModal","initialCollaborators","setCollaborators","reachedLimit","setReachedLimit","collaborator","newCollaborator","prevState","updatedItems","handleRemoveCollaborator","CollaboratorsListModal","CreateMilestoneModal","isChanged","setIsChanged","inputContainerTop","descriptionCounter","descriptionCounterDanger","inputContainer","disabledField","borderBottomStyle","inputIcon","errorContainer","labelContainer","borderBottomColor","deleteIcon","WalletAddressError","walletAddressErrorMapping","Invalid","Duplicate","EditWalletInfo","isPreferred","textFieldProps","findWalletIndex","walletIndex","errorType","lastChangedKind","last_wallet_kind_address_changed","isLastChanged","duplicatedKinds","isLastChangedNotDuplicated","isFirstTouchedDuplicated","hasPreferredWallet","preferredWalletDirty","setPreferredWalletDirty","getPreferredWalletCandidates","wallets","computePreferredWallet","preferredWalletCandidates","newPreferredWallet","computeChangeType","newValue","newWalletAdddresses","setIn","walletName","isPreferredWalletCandidate","EditWalletsInfo","validMonts","1","2","3","4","5","6","7","8","9","10","11","12","EditProfile","onSave","updateProfileMutate","skipMentionsCheck","setSkipMentionsCheck","skipMentionsLimit","setSkipMentionsLimit","descriptionFocused","setDescriptionFocused","birthdayError","setBirthdayError","birthdayDayError","setBirthdayDayError","birthdayMonthError","setBirthdayMonthError","maxDescription","walletAddressRepetitions","setWalletAddressError","checkedMentions","mentionsArray","img_url","updateFormik","dirty","hasErrors","InputLabel","RemoveBin","inputComponent","CreateBio","ExperienceSectionHeader","dialogPaper","subtitleContainer","companyName","mainTitle","approveButton","rejectButton","approveRejectBox","MilestonePreviewModal","updateMilestoneCollabMutate","collaboratorsModal","setCollaboratorsModal","expandedCollaborators","setExpandedCollaborators","handleCollabClick","pt","grid","Milestones","showAllStatus","toggleShowAllStatus","counts","onAddMilestoneClick","successMilestoneDelete","setSuccessMilestoneDelete","ownProfile","milestoneCount","collabs","myMilestones","myCollabs","headerContainer","linkContainer","removeMention","MuiRemoveIcon","ProjectPreviewModal","updateProjectCollabMutate","pb","readMore","ellipsis","setLoadingUsername","mentionTrigger","startText","iconContainer","MentionsInputField","valueName","initialValue","loadingUsername","overLengthLimit","reachedLenghtLimit","Username","menu","menuList","checkboxContainer","logoContainer","trashIcon","selectContainer","makeInitialValues","ProjectForm","getFullYear","setRemovePhoto","collaboratorsAdvanced","setCollaboratorsAdvanced","usernamesCache","checkUsername","months","years","submitProject","earliestText","earliest","linkErrors","formattedValues","formattedCollaborators","formatted","handleErrorsChange","fieldName","setErrors","noValidate","fetchAsBlob","convertBlobToBase64","linkIndex","handleLinkChange","ProjectEditModal","INIT_ACTION_STATES","reportProject","deleteProject","editProject","shareProject","showProject","hideProject","ProjectHeader","isVisible","removeProjectMutate","editProjectMutate","updateProjectCollabVisibilityMutate","groupedCollaborators","isApprovedCollab","actionStates","setActionStates","successEdit","setSuccessEdit","moreItems","submitVisibilityChange","isPrivateProfile","iconSize","Confirm","previewProject","showCollaborators","ProjectContent","openCollaboratorsModal","direction","wrap","Project","Experiences","projects","onAddProjectClick","successProjectDelete","setSuccessProjectDelete","projectCount","myProjects","sectionTitle","ExperienceTab","isProjectsLoading","isMilestonesLoading","isOwnProfile","openedProjectId","setOpenedProjectId","openedMilestoneId","setOpenedMilestoneId","successExperienceCreated","setSuccessExperienceCreated","addProjectModal","setAddProject","addMilestoneModal","setAddMilestone","setShowAllStatus","createNewProjectMutate","createNewMilestoneMutate","projectId","Projects","companyNameText","collaboratorContainer","previewMilestone","MilestoneContent","closePreviewMilestone","plusIcon","MilestoneForm","submitMilestone","isBefore","handleChangeDate","setFieldError","startDateValue","endDateValue","MilestoneEditModal","deleteMilestone","editMilestone","showMilestone","hideMilestone","reportMilestone","shareMilestone","pinnedLimitReached","MilestoneHeader","pinnedMilestones","removeMilestoneMutate","updatePinnedMilestoneMutate","updateMilestoneMutate","updateMilestoneCollabVisibilityMutate","BlockedUsersModal","unblockedUsers","isMutatingUnblockUser","fetchBlockedUsers","pagedUsers","Buttons","RemoveModal","dividers","SuccessModal","CircledCheck","editButtonContainer","followContainer","editProfile","openInput","showDeleteUser","showSuccess","showBlockUser","showBlockedUser","showUnblockUser","ProfileActions","isFollowed","removeUserMutate","successSave","setSuccessSave","unblockedUser","setUnblockedUser","Success","cardContainer","detailsFooter","footerText","section","follow","followCount","ProfileInfo","tabsContainer","tabs","tab","tabPanelAbout","tabPanelActivity","ProfileTabs","activeTab","setActiveTab","TabContext","Tabs","Tab","TabPanel","SharedProject","dialogCover","dialogContent","dialogActions","dialogTitle","grey","actionButton","cropper","cropperCover","UploadPhotoModal","onChangeFile","backgroundLoading","cropperRef","destroy","setImageRef","Cropper","viewMode","zoomable","autoCropArea","movable","rotatable","scalable","handleSaveClick","canvas","getCroppedCanvas","toDataURL","selectedImage","imageContainerUpload","placeholderLoading","UpdateCover","setCover","coverModal","setNewCover","isNaN","putAssetMutate","covers","defaultCovers","newCoverImage","multiple","formContainer","orBorderRight","orBorderLeft","orLabel","imageError","chooseImage","labelStyle","browseButton","nftImages","nftImagesDisabled","nftImageWrapperSelected","nftImageSelected","ProfileImage","updateProfileImageMutate","updateNFTProfileImageMutate","showImageError","setShowImageError","disableBrowse","setDisableBrowse","nftCanisterUrl","setNftCanisterUrl","nftTokenIdUrl","setNftTokenIdUrl","isMyNft","saveNFTURL","testImage","handleChangeAssetsType","evt","autoComplete","hidden","walletKindToImageNameMapping","WalletInfo","WalletsList","walletAddresses","CreateProjectModal","addAsOwn","MilestoneContainer","Children","cloneElement","ExperienceCard","underline","imageCrop","setHeight","enableCropping","Choice","onFocusProp","newValues","hasText","isOptionalChoice","PollLengthSelect","unitConfig","allLowerThanBound","allHigherThanBound","higherUnits","lowerUnits","isOptionAllowed","isNotBellowMin","isNotAboveMax","pollLengthChoices","newPollLength","clone","targetValue","ComposePoll","isDirty","onRemovePoll","setFocusedChoice","removePoll","useLinkPreview","onLinkMetadataChange","setLinks","linkMetadata","setLinkMetadata","linkPreviewIdx","setLinkPreviewIdx","selectedLinkPreview","setSelectedLinkPreview","selectedLinkPreviewData","setSelectedLinkPreviewData","linksLength","setLinksLength","aggr","urlToCheck","newLinkMetadata","newSelectedLinkPreview","credentials","redirect","referrerPolicy","loadLinkPreview","selectedData","fetchData","isLastThreadItem","setFocusedEditor","textFocused","setInternalError","formikLinkMetadata","arg","newMentions","checkContentForMentions","isMainComment","isComment","focusComposeForce","setFocusComposeForce","onClearPost","shouldRemove","allChoicesEmpty","choice","showRemoveButton","setShowRemoveButtonInternal","setShowRemoveButton","previouslyVisible","onRemoveImage","setPreview","userTags","onMouseEnter","overflowWrap","nextLinkPreviewIds","sharedPostContainer","sharedProjectContainer","sharedMilestoneContainer","sharedArticleContainer","CreatePostModal","resourceTypeRawProp","quotedResourceRawProp","quotedResourceProp","prefilled_content","setScrollYLS","newPostV3Mutation","useNewPostV3","postThreadMutation","usePostThread","discardModal","setDiscardModal","successToast","setSuccessToast","goToHome","endsWith","quotedResourceIdentifier","resourceToIdentify","createEmojiPluginsForThreadItem","setEmojiPlugins","pushEmojiPlugins","spliceEmojiPlugins","deleteCount","newEmojiPlugins","warnings","setWarnings","setWarning","newWarnings","pollFormikValidate","setChoiceError","isPostItemEmpty","quotedResourceId","postFormikValidate","pollErrors","threadFormikValidate","allItemsTextInvalid","itemErrors","prefilledQuotedResource","prefilledQuotedResourceId","prefilledQuotedResourceType","toICPostRequest","submitPost","submitThread","threadFormikSubmit","setFocusedThreadItem","itemsTouched","imageUrl","nftImageInit","setNftImageInit","focusedEditor","focusedThreadItem","focusedTextLength","focusedHasImage","focusedIsPoll","focusedIsQuotedResource","focusedNbMentions","focusedMarkAsTouched","onThreadItemRemoveIcon","newItems","newItemsTouched","itemIndex","onEditorFocus","editorIndex","onAddThreadItem","addPostItemIconColor","composerLocation","formId","isFirstThreadItem","GetMobileAppModal","logoImage","logoWidth","logoHeight","ecLevel","Announcements","announcementData","announcements","titleTypographyProps","NavigationContainer","DesktopNavigationBar","onPostClick","FeedbackDialog","CONTRIBUTE_ANNOUNCEMENT_ID","openFeedbackForm","setOpenFeedbackForm","successFeedback","setSuccessFeedback","errorFeedback","setErrorFeedback","provideAnnouncementFeedbackV2Mutation","useGetLastWeekLeaderBoardResult","GlobalSearch","enableScrollLock","useSearchWithFollowerData","LogoIcon","MobileNavigationBar","onGetMobileClick","searchFocused","setSearchFocused","openDrawer","setOpenDrawer","showLeftSpacing","Drawer","anchor","NOTIFICATION_TYPE","getNotificationsQueryKey","getUnreadNotificationCountQueryKey","useGetUnreadNotificationCount","refetchIntervalInBackground","MuiDistriktIcon","MuiDistriktLogoIcon","Navigation","notificationCounter","unreadMsgCounter","homeNavigationItem","Icon","FilledIcon","queryKeys","skip","streamNavigationItem","nav","handleNavigationClick","px","userPreviewCard","userPlaceholder","pins","pin","borderWidth","borderStyle","activePin","NewToDistrikt","classess","startIdx","setStartIdx","NotificationButton","LoginSignupBanner","sxProps","appBarProps","bgcolor","textDecorationColor","NavigationBar","getMobileAppModal","setGetMobileAppModal","GetMobileApp","onClickProp","postsCount","behavior","TrendingThisWeek","DISTANCE_TOP","Sidebar","emptyBoxRef","scrollDirection","setScrollDirection","blocking","prevScrollY","updateScrollDirection","scrollY","abs","newScrollDirection","requestAnimationFrame","useScrollDirection","windowScrollY","useWindowScroll","visibleWindowHeight","useWindowSize","refHeight","fullPageHeight","offsetTop","MuiContainer","Layout","gridColumnGap","gridTemplateColumns","LeftContainer","gridColumn","CenterContainer","extendedDesktopSize","borderRight","RightContainer","userDataContainer","Subtitle","AvatarCard","hideUserName","EmptyMessage","hideButton","roomsAvailable","ErrorAlert","FollowerSearch","useSearchFollowers","containerDisabled","WebkitTouchCallout","WebkitUserSelect","KhtmlUserSelect","MozUserSelect","MsUserSelect","userSelect","emojiWrapper","isEmojiOpen","setIsEmojiOpen","setLastMsgsReadStatusMutate","lastMessage","contentEmpty","reachedLengthLimit","overLenghtLimit","contentContainerLeft","contentContainerRight","contentLeft","contentRight","contentError","MessageBox","messageRef","showAvatar","ownMessage","hideDate","isLast","isTempMessage","failedToSend","messageList","disabledList","MessageList","focusedMessageId","setFocusedMessageId","focusedMessageRef","latestMessageRef","containerRef","pagedMessages","isError","isIdle","setIsIdle","useIdleTimer","timeout","onIdle","onActive","updateLastMsgInRoomCardByUserId","useGetMessagesByUserId","messagesRef","messages","focusedMessageIndex","messageShouldShowTimeList","handleScrollToBottom","smooth","scrollIntoView","block","handleScrollToFocused","newConvTitle","noWrapWhitespace","avatarWrapper","gridItem","gridFixedItem","searchLabel","MessageListToolbar","isNewRoom","enablePortalSearchResults","onBackClick","onSearchClick","Hidden","mdUp","smUp","smDown","containerSelected","avatarCard","dotContainer","dot","RoomItem","unread","RoomList","selectedRoomId","onRoomChange","buttonMenu","RoomListToolbar","hideNewChatButton","onNewChatClick","onFilterClick","onRefreshClick","isRefreshing","setIsRefreshing","setAllLastMsgsReadStatusUserIdMutate","updateAllRoomCardLastMsgStatus","prevUnreadCounter","useSetAllLastMsgsReadStatusUserId","reset","StartConversationWarning","containerOutlined","SystemMessage","isOutlined","roomlistContainer","roomListToolbar","roomList","emptyMessageContainer","messageListContainer","messageListToolbar","letterSpacing","Chat","setSelectedRoomId","creatingNewRoom","setCreatingNewRoom","creatingNewRoomForFollower","setCreatingNewRoomForFollower","roomSearchValue","setRoomSearchValue","selectedRoomFilter","setSelectedRoomFilter","userIsFetched","desktopMode","tabletMode","roomsError","roomsIsError","roomsRemove","roomsIsFetching","roomsIsFetched","useGetRoomsByUserId","createRoomWithMessageMutate","pushMessageMutate","cachedMessage","firstPageOnly","refetchPage","refetchMsgList","usePushMessageToRoomId","roomsRef","filteredRooms","roomsWithExistingCorrespondent","filterRooms","searchedRooms","searchRooms","selectedRoom","handleSelectNewFollower","roomsWithMessagesLength","follower","existingRoomForFollower","createMessageData","HomeErrorBoundary","ChatContainer","TypographyDemo","mamWidth","ColorVariationsDemo","RadioDemo","TextFieldDemo","value1","setValue1","value2","setValue2","value3","setValue3","value4","setValue4","SelectDemo","CheckboxDemo","FormGroup","defaultChecked","EmptyStateDemo","nftList","gridGap","emptyDropzoneText","emptyDropzone","listTitle","smallDialog","text14","inputField","infoIcon","warningContainer","transferWordBtn","transferIconBtn","verticalCenter","nftBackground","receivedOn","collectionTitle","collectionAndNr","transferButton","ellipsisBtn","btnContainer","copyButton","footer","layersIcon","nftLayersDialog","nftLayersImages","nftLayersImageWrapper","nftLayersImageSelected","nftLayersImage","nftLayersDescription","principalViewer","viewPrincipalBtn","principalViewerText","principalViewerTitle","warningIcon","marginBotom","dialogText","NftLayersDialog","imageUrls","defaultAssetsType","onAssetsTypeChange","selectedAssetsType","setSelectedAssetsType","SingleNft","collection","tokenIndex","setTransferTokenId","setTransferIndex","defaultAssetsTypesLS","setDefaultAssetsTypesLS","setAssetsType","layersModal","setLayersModal","profilePictureUpdated","setProfilePictureUpdated","Transfer","setAsProfilePicture","NFTDemo","transferIndex","DialogDemo","isOpen","setIsOpen","TabsDemo","TagDemo","Chip","onDelete","NavigationButtonsDemo","setSelected","OverflowDemo","handleMenuItemClick","setSelectedIndex","SelectMenuDemo","selectedIndex","SearchDemo","DesignSystemDemo","ColorVariations","AlertDemo","ButtonDemo","DatePickerDemo","NavigationButtons","DiscoverErrorBoundary","popularThisWeek","flashIcon","upDownIcon","closeIconButton","closeIcon","infoClosed","wrapperProfiles","transitionProperty","transitionDuration","transitionTimingFunction","tooltipDisplayName","tooltipUsername","morePosts","arrowLeft","arrowRight","DiscoveryFeatures","sectionClosedLS","setSectionClosedLS","infoClosedLS","setInfoClosedLS","sectionClosed","setSectionClosed","setInfoClosed","usersLeft","setUsersLeft","arrowRightDisabled","setArrowRightDisabled","resetUsersLeft","wrapperWidth","avatarWidth","avatarMargin","avatarsWidth","avatarsLeft","ceil","handleClickAvatar","ArrowLeft","ScrollKeeper","setScrollY","trendingHashtagsSection","chips","chip","pillChip","additionalChips","noResults","pageHeaderFilters","filterWrapper","Discover","hashtagsLS","setHashtagsLS","withCertifiedUsersLS","setWithCertifiedUsersLS","withImagesLS","setWithImagesLS","setHashtags","setWithCertifiedUsers","setWithImages","feedProps","showHeaderFilter","setShowHeaderFilter","discoveryFeaturesWrapper","oldHashtags","DiscoverContainer","FeaturedPostsErrorBoundary","FeaturedPosts","FeaturedPostsContainer","ExploreErrorBoundary","popup","ArticleCard","Explore","ExploreContainer","emptyTextContainer","HashtagPage","useGetPaginatedOptimizedHashtagFeed","Home","HomeContainer","titleText","headerTitle","titleRoot","statsTitle","bigStatsNumber","statsNumber","tableCell","CellTitle","CellNumber","number","ModerationBoard","verification","reports","getStats","verificationStats","reportsStats","mx","ModerationErrorBoundary","useVerificationRequestStyles","sectionTitleContainer","handleText","buttonsContainer","requestId","verificationAction","useChangeVerificationRequest","approveModal","setApproveModal","rejectModal","setRejectModal","successModal","setSuccessModal","successContent","setSuccessContent","VERIFICATION_ACTION","handleUpdateRequest","VerificationBoard","verificationRequests","verificationRequestsError","verificationRequestsIsLoading","useGetVerificationRequestsWithUserData","reportsStyles","singleReportStyles","resourceContainer","reportContainer","reportText","resourceText","handleApprove","handleRemove","approveText","removeText","SingleReport","reportingUser","removed","setRemoved","getReportCategory","findResourceTypeByProperty","removeReport","shouldIKeepResource","reportId","removeReportInApi","resourceTypeName","SingleReportComponent","categoryMap","ReportsBoard","useQueryParams","pagesTotal","Moderation","ModerationContainer","NotificationsErrorBoundary","RemoveFollowerButton","iconMode","removeFollowerMutation","notificationContent","NotificationActions","isExperienceType","notification","setNotificationsStatusMutate","SingleNotification","ids","useSetNotificationsStatus","showContent","generateNotificationDisplayInfo","useOrganizeNotifications","notifications","Notifications","markAllAsReadMutation","useMarkAllAsRead","pagesdNotifications","refetch","formattedNotifications","buttonComponent","NotificationsContainer","SortSelect","other","disableUnderline","getContentAnchorEl","composeContainer","commentBorder","borderLeft","commentNoBorder","firstCommentBorder","successCommentDelete","setSuccessCommentDelete","setShowCommentReplyPostId","threadPostId","setCommentsSort","invalidSortOrder","itemIsLoading","itemError","isThreadPost","isThreadPostFn","itemData","itemKey","postIdForComments","commentIsLoading","commentError","PostErrorBoundary","PostDetails","useFollowStyles","useFollowersStyles","emptyList","useFollowingStyles","Followers","Following","Follows","tabName","showExportModal","setShowExportModal","isFollowersTab","csvHeaders","isExporting","setIsExporting","exportFollowers","csvData","profileLite","walletType","dateString","getDate","getMonth","getHours","getMinutes","onExportCompleted","isStale","onExportFollowers","addressToErrorMapping","NoError","InvalidAddress","MyAddress","NftTransferDialog","transferTokenId","transferToAddress","setTransferToAddress","setWalletAddress","transferDone","setTransferDone","transferError","setTransferError","setPage","addressError","setAddressError","closeHandler","myPrincipal","myWalletAddress","ShowPrincipalDialog","principalWarningDialogOpen","setPrincipalWarningDialogOpen","principalShowDialogOpen","setPrincipalShowDialogOpen","successAlert","setSuccessAlert","confirmShowPrincipalText","setConfirmShowPrincipalText","NftDropzone","principalLoading","principalError","showPrincipalDialog","setShowPrincipalDialog","nft","coverImage","emptyCoverImage","disabledBackground","cardHeaderAction","cardContent","avatarRow","profileInfoContainer","skillsLabel","sectionContent","sectionActions","allButton","dots","nameContainer","calendarIcon","coverContainer","coverIconButton","verificationIcon","slider","navigationContainer","navigationButton","navigationIcon","navigationText","pinnedTitle","memberSince","calendar","profileHeaderText","followNumber","nftButton","nftBanner","nftBannerText","UploadPhotoButton","profileImageDialog","setProfileImageDialog","sliderSettings","arrows","infinite","accessibility","speed","slidesToShow","slidesToScroll","responsive","breakpoint","settings","sliderRef","setCoverModal","coverModalOpened","setCoverModalOpened","isUserLoading","updateCoverImageMutate","calculateMemberSince","pinnedMilestone","ProfileErrorBoundary","componentDidUpdate","prevProps","setState","withRouter","ProfileDetails","ProfileDetailsContainer","SearchContainer","sectionFirstTitle","radioButtonContainer","verticalSection","themeContainer","themeOption","selectedTheme","notSelectedTheme","SettingsPage","deleteMyAccountMutation","setTheme","deleteDialogOpen","setDeleteDialogOpen","confirmDeleteDialogOpen","setConfirmDeleteDialogOpen","confirmDeleteText","setConfirmDeleteText","acLogout","handleThemeChange","useSignupCallback","TermsOfUseContent","setContent","newContent","getContent","loadContentAsync","TermsOfUseModal","randomDigit","random","firstDigit","secondDigit","negativeFactor","solution","Canvas","tries","canvasRef","code","getContext","clearRect","font","fillText","CaptchaDialog","setInputValue","setTries","drawer","usernameWarningRow","centralLineContainer","centralLine","gridElement","alert","alertText","termsLink","termsContainer","USERNAME_REGEX","Signup","checkedTerms","setCheckedTerms","checkedError","setCheckedError","termsModal","setTermsModal","captchaModal","setCaptchaModal","submitForm","shrink","TermsOfUse","ThreadPage","ThreadContainer","FaqContent","parsed","center","FaqMobile","FaqWeb","TermsOfUseMobile","TermsOfUseWeb","AUTH_MOBILE_ROUTE","Routes","isChatPage","scrollToTop","loginSignupBannerVisible","redirectAfterLogin","displayLayout","SidebarCards","Articles","Settings","AppLink","setLogger","warn","AuthProvider","mounted","innerWidth","App","initialIsOpen","prototype","askPassword","ignoreLocalStorage","password","prompt","msgUint8","hashBuffer","crypto","subtle","digest","padStart","encryptMessage","ReactDOM","StrictMode","getMimeTypeExtensionMessage","mimeTypes","allowedMimeTypes","mimeTypesExtMessage","isMimeTypeSupported","base64Str","drawImage","resizeImage","base64str","formattedImages","decodedArr","rejectExtension","onerror","onabort","clearTimeout"],"mappings":"+4DAEO,MAAMA,EAAUC,GAAQC,IAAOC,OAAOC,KAAKH,GAErCI,EAAYC,IACvB,MAAMC,EAAI,IAAIC,YAAY,GAE1B,OADA,IAAIC,SAASF,GAAGG,UAAU,EAAGJ,GACtBK,MAAMP,KAAK,IAAIQ,WAAWL,KAGtBM,EAAcC,IACzB,IAAIC,EACJ,IAAK,IAAIC,EAAI,EAAGA,EAAI,EAAGA,IACrBD,EAASA,GAAS,EAAKD,EAAGE,GAE5B,OAAOD,GCZHE,EAAc,IAAIC,YAAY,CAClC,EACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,SACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,SACA,WACA,WACA,WACA,SACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,SACA,WACA,WACA,WACA,SACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,SACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,YAMK,SAASC,EAASC,GACvB,MAAMb,EAAI,IAAIK,WAAWQ,GACzB,IAAIC,GAAO,EAEX,IAAK,IAAIL,EAAI,EAAGA,EAAIT,EAAEe,O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CAAC18B,EAA0CzB,EAAQ0B,IACnDmC,OAASu6B,YAAY,MAAS,IAAD,EAC3B,MAAMnpC,EAAOoO,EAAYxD,aACvB,CAAC4B,EAA0CzB,EAAQ0B,GACnD,CAAE48B,OAAO,IAILC,EAAcziC,YAClB7G,EACAmpC,GACA1qC,KAAKmB,GAAM2pC,YAAmB3pC,KAE1B+R,QAAYo3B,IAAIja,iCACpB/jB,GAAU,GACV0B,EACAkH,OAAOw1B,EAAYK,KACnB71B,OAAO61B,KACPF,GAEF,iBAAOjjC,YAAsBsL,UAA7B,aAAO,EAA4BnM,QAErC,CACEsM,UAAWrF,EACXg9B,iBAAkB,CAAChiC,EAAMV,IACvBU,GAAQA,EAAK9J,QAAU6rC,IAAsBziC,EAAMpJ,YAASkC,O","file":"static/js/main.23e912ca.chunk.js","sourcesContent":["import buffer from 'buffer';\n\nexport const toBlob = (arr) => buffer.Buffer.from(arr);\n\nexport const to32bits = (num) => {\n const b = new ArrayBuffer(4);\n new DataView(b).setUint32(0, num);\n return Array.from(new Uint8Array(b));\n};\n\nexport const from32bits = (ba) => {\n let value;\n for (let i = 0; i < 4; i++) {\n value = (value << 8) | ba[i];\n }\n return value;\n};\n","// tslint:disable:no-bitwise\n// This file is translated to JavaScript from\n// https://lxp32.github.io/docs/a-simple-example-crc32-calculation/\nconst lookUpTable = new Uint32Array([\n 0x00000000,\n 0x77073096,\n 0xee0e612c,\n 0x990951ba,\n 0x076dc419,\n 0x706af48f,\n 0xe963a535,\n 0x9e6495a3,\n 0x0edb8832,\n 0x79dcb8a4,\n 0xe0d5e91e,\n 0x97d2d988,\n 0x09b64c2b,\n 0x7eb17cbd,\n 0xe7b82d07,\n 0x90bf1d91,\n 0x1db71064,\n 0x6ab020f2,\n 0xf3b97148,\n 0x84be41de,\n 0x1adad47d,\n 0x6ddde4eb,\n 0xf4d4b551,\n 0x83d385c7,\n 0x136c9856,\n 0x646ba8c0,\n 0xfd62f97a,\n 0x8a65c9ec,\n 0x14015c4f,\n 0x63066cd9,\n 0xfa0f3d63,\n 0x8d080df5,\n 0x3b6e20c8,\n 0x4c69105e,\n 0xd56041e4,\n 0xa2677172,\n 0x3c03e4d1,\n 0x4b04d447,\n 0xd20d85fd,\n 0xa50ab56b,\n 0x35b5a8fa,\n 0x42b2986c,\n 0xdbbbc9d6,\n 0xacbcf940,\n 0x32d86ce3,\n 0x45df5c75,\n 0xdcd60dcf,\n 0xabd13d59,\n 0x26d930ac,\n 0x51de003a,\n 0xc8d75180,\n 0xbfd06116,\n 0x21b4f4b5,\n 0x56b3c423,\n 0xcfba9599,\n 0xb8bda50f,\n 0x2802b89e,\n 0x5f058808,\n 0xc60cd9b2,\n 0xb10be924,\n 0x2f6f7c87,\n 0x58684c11,\n 0xc1611dab,\n 0xb6662d3d,\n 0x76dc4190,\n 0x01db7106,\n 0x98d220bc,\n 0xefd5102a,\n 0x71b18589,\n 0x06b6b51f,\n 0x9fbfe4a5,\n 0xe8b8d433,\n 0x7807c9a2,\n 0x0f00f934,\n 0x9609a88e,\n 0xe10e9818,\n 0x7f6a0dbb,\n 0x086d3d2d,\n 0x91646c97,\n 0xe6635c01,\n 0x6b6b51f4,\n 0x1c6c6162,\n 0x856530d8,\n 0xf262004e,\n 0x6c0695ed,\n 0x1b01a57b,\n 0x8208f4c1,\n 0xf50fc457,\n 0x65b0d9c6,\n 0x12b7e950,\n 0x8bbeb8ea,\n 0xfcb9887c,\n 0x62dd1ddf,\n 0x15da2d49,\n 0x8cd37cf3,\n 0xfbd44c65,\n 0x4db26158,\n 0x3ab551ce,\n 0xa3bc0074,\n 0xd4bb30e2,\n 0x4adfa541,\n 0x3dd895d7,\n 0xa4d1c46d,\n 0xd3d6f4fb,\n 0x4369e96a,\n 0x346ed9fc,\n 0xad678846,\n 0xda60b8d0,\n 0x44042d73,\n 0x33031de5,\n 0xaa0a4c5f,\n 0xdd0d7cc9,\n 0x5005713c,\n 0x270241aa,\n 0xbe0b1010,\n 0xc90c2086,\n 0x5768b525,\n 0x206f85b3,\n 0xb966d409,\n 0xce61e49f,\n 0x5edef90e,\n 0x29d9c998,\n 0xb0d09822,\n 0xc7d7a8b4,\n 0x59b33d17,\n 0x2eb40d81,\n 0xb7bd5c3b,\n 0xc0ba6cad,\n 0xedb88320,\n 0x9abfb3b6,\n 0x03b6e20c,\n 0x74b1d29a,\n 0xead54739,\n 0x9dd277af,\n 0x04db2615,\n 0x73dc1683,\n 0xe3630b12,\n 0x94643b84,\n 0x0d6d6a3e,\n 0x7a6a5aa8,\n 0xe40ecf0b,\n 0x9309ff9d,\n 0x0a00ae27,\n 0x7d079eb1,\n 0xf00f9344,\n 0x8708a3d2,\n 0x1e01f268,\n 0x6906c2fe,\n 0xf762575d,\n 0x806567cb,\n 0x196c3671,\n 0x6e6b06e7,\n 0xfed41b76,\n 0x89d32be0,\n 0x10da7a5a,\n 0x67dd4acc,\n 0xf9b9df6f,\n 0x8ebeeff9,\n 0x17b7be43,\n 0x60b08ed5,\n 0xd6d6a3e8,\n 0xa1d1937e,\n 0x38d8c2c4,\n 0x4fdff252,\n 0xd1bb67f1,\n 0xa6bc5767,\n 0x3fb506dd,\n 0x48b2364b,\n 0xd80d2bda,\n 0xaf0a1b4c,\n 0x36034af6,\n 0x41047a60,\n 0xdf60efc3,\n 0xa867df55,\n 0x316e8eef,\n 0x4669be79,\n 0xcb61b38c,\n 0xbc66831a,\n 0x256fd2a0,\n 0x5268e236,\n 0xcc0c7795,\n 0xbb0b4703,\n 0x220216b9,\n 0x5505262f,\n 0xc5ba3bbe,\n 0xb2bd0b28,\n 0x2bb45a92,\n 0x5cb36a04,\n 0xc2d7ffa7,\n 0xb5d0cf31,\n 0x2cd99e8b,\n 0x5bdeae1d,\n 0x9b64c2b0,\n 0xec63f226,\n 0x756aa39c,\n 0x026d930a,\n 0x9c0906a9,\n 0xeb0e363f,\n 0x72076785,\n 0x05005713,\n 0x95bf4a82,\n 0xe2b87a14,\n 0x7bb12bae,\n 0x0cb61b38,\n 0x92d28e9b,\n 0xe5d5be0d,\n 0x7cdcefb7,\n 0x0bdbdf21,\n 0x86d3d2d4,\n 0xf1d4e242,\n 0x68ddb3f8,\n 0x1fda836e,\n 0x81be16cd,\n 0xf6b9265b,\n 0x6fb077e1,\n 0x18b74777,\n 0x88085ae6,\n 0xff0f6a70,\n 0x66063bca,\n 0x11010b5c,\n 0x8f659eff,\n 0xf862ae69,\n 0x616bffd3,\n 0x166ccf45,\n 0xa00ae278,\n 0xd70dd2ee,\n 0x4e048354,\n 0x3903b3c2,\n 0xa7672661,\n 0xd06016f7,\n 0x4969474d,\n 0x3e6e77db,\n 0xaed16a4a,\n 0xd9d65adc,\n 0x40df0b66,\n 0x37d83bf0,\n 0xa9bcae53,\n 0xdebb9ec5,\n 0x47b2cf7f,\n 0x30b5ffe9,\n 0xbdbdf21c,\n 0xcabac28a,\n 0x53b39330,\n 0x24b4a3a6,\n 0xbad03605,\n 0xcdd70693,\n 0x54de5729,\n 0x23d967bf,\n 0xb3667a2e,\n 0xc4614ab8,\n 0x5d681b02,\n 0x2a6f2b94,\n 0xb40bbe37,\n 0xc30c8ea1,\n 0x5a05df1b,\n 0x2d02ef8d,\n]);\n/**\n * Calculate the CRC32 of a blob.\n * @param buf The blob to calculate the CRC32 of.\n */\nexport function getCrc32(buf) {\n const b = new Uint8Array(buf);\n let crc = -1;\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < b.length; i++) {\n const byte = b[i];\n const t = (byte ^ crc) & 0xff;\n crc = lookUpTable[t] ^ (crc >>> 8);\n }\n return (crc ^ -1) >>> 0;\n}\n//# sourceMappingURL=getCrc.js.map\n","export const emptyMethod = () => {\n console.log('NOT IMPLEMENTED');\n};\n","/**\n * Simple safari detection based on user agent test\n */\nconst isSafari = () =>\n /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\nconst isJsons = (array) =>\n Array.isArray(array) &&\n array.every((row) => typeof row === 'object' && !(row instanceof Array));\n\nconst isArrays = (array) =>\n Array.isArray(array) && array.every((row) => Array.isArray(row));\n\nconst jsonsHeaders = (array) =>\n Array.from(\n array\n .map((json) => Object.keys(json))\n .reduce((a, b) => new Set([...a, ...b]), [])\n );\n\nconst jsons2arrays = (jsons, headers) => {\n headers = headers || jsonsHeaders(jsons);\n\n // allow headers to have custom labels, defaulting to having the header data key be the label\n let headerLabels = headers;\n let headerKeys = headers;\n if (isJsons(headers)) {\n headerLabels = headers.map((header) => header.label);\n headerKeys = headers.map((header) => header.key);\n }\n\n const data = jsons.map((object) =>\n headerKeys.map((header) => getHeaderValue(header, object))\n );\n return [headerLabels, ...data];\n};\n\nconst getHeaderValue = (property, obj) => {\n const foundValue = property\n .replace(/\\[([^\\]]+)]/g, '.$1')\n .split('.')\n .reduce(function (o, p, i, arr) {\n // if at any point the nested keys passed do not exist, splice the array so it doesnt keep reducing\n const value = o[p];\n if (value === undefined || value === null) {\n arr.splice(1);\n } else {\n return value;\n }\n }, obj);\n // if at any point the nested keys passed do not exist then looks for key `property` in object obj\n return foundValue === undefined\n ? property in obj\n ? obj[property]\n : ''\n : foundValue;\n};\n\nconst elementOrEmpty = (element) =>\n typeof element === 'undefined' || element === null ? '' : element;\n\nconst joiner = (data, separator = ',', enclosingCharacter = '\"') => {\n return data\n .filter((e) => e)\n .map((row) =>\n row\n .map((element) => elementOrEmpty(element))\n .map((column) => `${enclosingCharacter}${column}${enclosingCharacter}`)\n .join(separator)\n )\n .join(`\\r\\n$`);\n};\n\nconst arrays2csv = (data, headers, separator, enclosingCharacter) =>\n joiner(headers ? [headers, ...data] : data, separator, enclosingCharacter);\n\nconst jsons2csv = (data, headers, separator, enclosingCharacter) =>\n joiner(jsons2arrays(data, headers), separator, enclosingCharacter);\n\nconst string2csv = (data, headers, separator) =>\n headers ? `${headers.join(separator)}\\n${data}` : data.replace(/\"/g, '\"\"');\n\nconst toCSV = (data, headers, separator, enclosingCharacter) => {\n if (isJsons(data))\n return jsons2csv(data, headers, separator, enclosingCharacter);\n if (isArrays(data))\n return arrays2csv(data, headers, separator, enclosingCharacter);\n if (typeof data === 'string') return string2csv(data, headers, separator);\n throw new TypeError(\n `Data should be a \"String\", \"Array of arrays\" OR \"Array of objects\" `\n );\n};\n\nconst getDataURI = (data, uFEFF, headers, separator, enclosingCharacter) => {\n const csv = toCSV(data, headers, separator, enclosingCharacter);\n const type = isSafari() ? 'application/csv' : 'text/csv';\n const dataURI = `data:${type};charset=utf-8,${uFEFF ? '\\uFEFF' : ''}${csv}`;\n\n return { csv, type, dataURI };\n};\n\nexport const downloadCSVFile = (\n data,\n uFEFF,\n headers,\n separator,\n enclosingCharacter,\n filename\n) => {\n const { dataURI } = getDataURI(\n data,\n uFEFF,\n headers,\n separator,\n enclosingCharacter\n );\n\n const downloadLink = document.createElement('a');\n downloadLink.href = encodeURI(dataURI);\n downloadLink.download = `${filename}.csv`;\n\n document.body.appendChild(downloadLink);\n downloadLink.click();\n document.body.removeChild(downloadLink);\n};\n","import dayjs, { Dayjs, OpUnitType } from 'dayjs';\nimport isToday from 'dayjs/plugin/isToday';\nimport isYesterday from 'dayjs/plugin/isYesterday';\n\nexport function getDateTimeString(date: bigint) {\n dayjs.extend(isToday);\n dayjs.extend(isYesterday);\n\n const parsedDate = dayjs(Number(date));\n const time = parsedDate.format('h:mma');\n\n if (parsedDate.isToday()) {\n return `Today ${time}`;\n }\n\n if (parsedDate.isYesterday()) {\n return `Yesterday ${time}`;\n }\n\n if (!parsedDate.isSame(dayjs(), 'year')) {\n return parsedDate.format('DD MMMM YYYY');\n }\n\n return `${parsedDate.format('MMMM DD')}, ${time}`;\n}\n\nexport function getDateString(date: bigint) {\n dayjs.extend(isToday);\n dayjs.extend(isYesterday);\n\n const parsedDate = dayjs(Number(date));\n\n if (parsedDate.isToday()) {\n return 'Today';\n }\n\n if (parsedDate.isYesterday()) {\n return 'Yesterday';\n }\n\n return parsedDate.format('DD MMMM');\n}\n\nexport function isSameDay(date: bigint, prevDate?: bigint) {\n if (!prevDate) {\n return false;\n }\n\n const parsedDate = dayjs(Number(date));\n const parsedPrevDate = dayjs(Number(prevDate));\n\n return parsedDate.isSame(parsedPrevDate, 'day');\n}\n\n/**\n * Returns if date is after date to compare\n */\nexport function isAfter(date: bigint, dateToCompare: bigint | Dayjs) {\n const parsedDate = dayjs(Number(date));\n const parsedDateToCompare =\n dateToCompare instanceof Date\n ? dateToCompare\n : dayjs(Number(dateToCompare));\n\n return parsedDate.isAfter(parsedDateToCompare);\n}\n\n/**\n * Returns if date is after date to compare after subtracting given number of units\n */\nexport function isAfterDiff(\n date: bigint,\n dateToManipulateAndCompare: bigint,\n unit: OpUnitType,\n amount: number\n) {\n const parsedDate = dayjs(Number(dateToManipulateAndCompare));\n\n return isAfter(date, parsedDate.subtract(amount, unit));\n}\n","/*\n * Utility to stop propagation in case the tag path of event buble contains specific tag\n **/\nexport function stopPropagationOnEventTags(\n event: React.MouseEvent,\n parentRef?: React.RefObject,\n tagsToAllow: Uppercase[] = [\n 'A',\n 'BUTTON',\n 'LI',\n 'IMG',\n ]\n) {\n const path = [];\n let node = event.target;\n while (node && node != parentRef?.current) {\n // if node reached body, then element is not inside the parentRef but most likely a dialog\n if (node == document.body) {\n event.stopPropagation();\n return;\n }\n\n path.push(node.tagName);\n node = node.parentNode;\n }\n\n if (tagsToAllow.some((tag) => path.includes(tag))) {\n event.stopPropagation();\n }\n}\n","import { FormikTouched } from 'formik';\nimport { SetStateAction } from 'react';\nimport { PollFormik, PollInfo, PostFormik, ThreadFormik } from 'types';\n\nexport const formikPostToPoll = (\n postFormik: Partial\n): Partial => ({\n values: postFormik.values.poll,\n errors: postFormik.errors.poll || {},\n touched: postFormik.touched.poll || {},\n setValues: (values: SetStateAction, shouldValidate?: boolean) =>\n postFormik.setFieldValue('poll', values, shouldValidate),\n setTouched: (touched: FormikTouched, shouldValidate?: boolean) =>\n postFormik.setFieldTouched('poll', touched, shouldValidate),\n setFieldValue: (field: string, value: any, shouldValidate?: boolean) =>\n postFormik.setFieldValue(`poll.${field}`, value, shouldValidate),\n setFieldTouched: (\n field: string,\n touched?: boolean,\n shouldValidate?: boolean\n ) => postFormik.setFieldTouched(`poll.${field}`, touched, shouldValidate),\n});\n\nexport const formikThreadToPost = (\n threadFormik: Partial,\n index: number\n): Partial => ({\n values: threadFormik.values.items[index],\n errors: threadFormik.errors.items?.[index] || {},\n touched: threadFormik.touched.items?.[index] || {},\n setValues: (values: SetStateAction, shouldValidate?: boolean) =>\n threadFormik.setFieldValue(`items[${index}]`, values, shouldValidate),\n setTouched: (touched: FormikTouched, shouldValidate?: boolean) =>\n threadFormik.setFieldTouched(`items[${index}]`, touched, shouldValidate),\n setFieldValue: (field: string, value: any, shouldValidate?: boolean) =>\n threadFormik.setFieldValue(\n `items[${index}].${field}`,\n value,\n shouldValidate\n ),\n setFieldTouched: (\n field: string,\n touched?: boolean,\n shouldValidate?: boolean\n ) =>\n threadFormik.setFieldTouched(\n `items[${index}].${field}`,\n touched,\n shouldValidate\n ),\n});\n","export const isHex = (text: string) => {\n const regexp = /^[0-9a-fA-F]+$/;\n return regexp.test(text);\n};\n\nexport const fromHexString = (text: string) =>\n Uint8Array.from(\n (text.match(/.{1,2}/g) ?? []).map((byte) => parseInt(byte, 16))\n );\n\nexport const toHexString = (data: Uint8Array | number[]) => {\n return Array.from(data, function (byte: number) {\n return ('0' + (byte & 0xff).toString(16)).slice(-2);\n }).join('');\n};\n","import { AllKeys, ApiResponse, OkResponse, PickType, PickTypeKey } from 'types';\n\n/**\n * Converts a object value and key to a IC candid variant option of a variant\n */\nexport function toIcVariant(key: AllKeys, value: PickType = null) {\n return { [key]: value } as T;\n}\n\n/**\n * Extracts the value returned by IC candid enums\n *\n * @example\n * // the status for messaging conversations is:\n * type MsgStatus = { Read: null } | { UnRead: null };\n *\n * // fromIcEnum(status) will return \"Read\" or \"UnRead\"\n */\nexport function fromIcEnum, unknown>>>(\n value: T\n): PickTypeKey> {\n // assersion needed because Object.keys always returns `string` type\n return (Object.keys(value) as Array>)[0];\n}\n\nexport function toIcEnum(value: T) {\n // assersion needed because Object.keys always returns `string` type\n return { [value]: null } as { [key in T]: null };\n}\n\n/**\n * Converts IC candid optional value into a nullable JS value\n *\n * optional values defined in candid, are returned from agent as `[]` or `[value]`\n * with fromIcOpt, turns them into: `value` | `undefined`\n */\nexport function fromIcOpt(value: [] | [T]): T | undefined {\n return value?.[0];\n}\n\n/**\n * Converts a nullable JS value into IC candid optional value\n *\n * optional values defined in candid, are returned from agent as `[]` or `[value]`\n * with toIcOpt, turns nullable value into: `[value]` | `[]`\n */\nexport function toIcOpt(value?: T): [] | [T] {\n return value ? [value] : [];\n}\n\n/**\n * Extracts value from IC candid response or throws an error with the enum key\n */\nexport function extractApiDataOrThrow(\n response: T,\n errorHandler?: (errorKind: unknown) => void\n): OkResponse {\n if ('Err' in response) {\n const errorKind = fromIcEnum(response.Err);\n\n errorHandler instanceof Function && errorHandler(errorKind);\n\n throw new Error(errorKind);\n }\n\n return response.Ok as OkResponse;\n}\n\ntype NumberArray =\n | Uint8Array\n | Uint16Array\n | Uint32Array\n | Int8Array\n | Int16Array\n | Int32Array;\n\ntype BigIntArray = BigInt64Array | BigUint64Array;\n\n/**\n * Vec to array type mapper\n *\n * IC Vec is transformed into the following JS types depending on inner type:\n * Nat8 => Uint8Array\n * Nat16 => Uint16Array\n * Nat32 => Uint32Array\n * Nat64 => BigUint64Array\n * Int8 => Int8Array\n * Int16 => Int16Array\n * Int32 => Int32Array\n * Int64 => BigInt64Array\n * _ => Array<_>\n */\nexport function icVecDataMapper<\n T extends NumberArray | BigIntArray | Array\n>(\n candidData: T\n): T extends BigIntArray\n ? bigint[]\n : T extends NumberArray\n ? number[]\n : Array {\n if (\n candidData instanceof BigInt64Array ||\n candidData instanceof BigUint64Array\n ) {\n return [...candidData];\n }\n\n if (\n candidData instanceof Uint8Array ||\n candidData instanceof Uint16Array ||\n candidData instanceof Uint32Array ||\n candidData instanceof Int8Array ||\n candidData instanceof Int16Array ||\n candidData instanceof Int32Array\n ) {\n return [...candidData];\n }\n\n return candidData;\n}\n","import { InfiniteData } from 'react-query';\nimport { flattenDeep, get, reverse, sortBy } from 'lodash';\n\nimport { MESSAGE_PAGE_SIZE } from 'pages/messages/constants';\n\n/**\n * Flatten the paginated infinite data from the API into a single array\n */\nexport function flattenInfiniteData(\n data: InfiniteData>,\n numberOfPagesToFlatten?: number\n): T[] {\n if (!data) {\n return [];\n }\n\n return flattenDeep(\n typeof numberOfPagesToFlatten === 'number'\n ? data.pages.slice(0, numberOfPagesToFlatten)\n : data.pages\n );\n}\n\n/**\n * Unshift an item to array, returns new array and leftover item if array is over limit\n */\nexport function unshiftToArrayWithLimit(\n array: Array,\n item: T,\n limit = 20\n) {\n if (array.length >= limit) {\n return [[item, ...array.slice(0, limit - 1)], array[array.length - 1]];\n }\n\n return [[item, ...array], null];\n}\n\n/**\n * Unshift item to react-query infinite data\n * and shifts leftover items to next page if it's over array limit\n */\nexport function unshiftItemToInifiteData(\n prev: InfiniteData> = { pageParams: [], pages: [] },\n item: T,\n limit = 20,\n disableCreatingNewPage = false\n) {\n const { pages, pageParams } = prev;\n\n const { newPages, leftoverItem } = pages.reduce(\n (memo, page) => {\n const [newPage, leftoverItem] = unshiftToArrayWithLimit(\n page,\n memo.leftoverItem,\n limit\n );\n\n return {\n newPages: [...memo.newPages, newPage],\n leftoverItem,\n };\n },\n { newPages: [] as Array, leftoverItem: item as T | null }\n );\n\n return {\n pages:\n leftoverItem && !disableCreatingNewPage\n ? [...newPages, [leftoverItem]]\n : newPages,\n pageParams,\n };\n}\n\n/**\n * Replaces fieldKey/fieldValue of all items in react-query infinite data\n */\nexport function replaceFieldInInifiteData(\n prev: InfiniteData> = { pageParams: [], pages: [] },\n fieldKey: string,\n fieldValue: unknown\n) {\n const { pages, pageParams } = prev;\n return {\n pageParams,\n pages: pages.map((page) => {\n return page.map((item) => {\n if (typeof item[fieldKey] !== 'undefined') {\n return { ...item, [fieldKey]: fieldValue };\n }\n return item;\n });\n }),\n };\n}\n\n/**\n * Replaces item in react-query infinite data\n * in case prev item does not exist, push it to start\n */\nexport function replaceItemInInifiteData(\n prev: InfiniteData> = { pageParams: [], pages: [] },\n newItem: T,\n fieldToCheck: string | [string],\n fieldToValidate?: string | [string] // optional field to check if item should be pushed in case prev item does not exist\n) {\n const { pages, pageParams } = prev;\n\n let pageIndex = -1;\n const pagesIndex = pages.findIndex((page) => {\n const index = page.findIndex(\n (item) => get(item, fieldToCheck) === get(newItem, fieldToCheck)\n );\n\n if (index !== -1) {\n pageIndex = index;\n\n return true;\n }\n });\n\n if (pagesIndex === -1) {\n if (fieldToValidate) {\n const exists = pages.some((page) => {\n return page.some(\n (item) => get(item, fieldToValidate) === get(newItem, fieldToValidate)\n );\n });\n\n if (exists) {\n return prev;\n }\n }\n return unshiftItemToInifiteData(prev, newItem, MESSAGE_PAGE_SIZE, true);\n }\n\n return {\n pages: [\n ...pages.slice(0, pagesIndex),\n [\n ...pages[pagesIndex].slice(0, pageIndex),\n newItem,\n ...pages[pagesIndex].slice(pageIndex + 1),\n ],\n ...pages.slice(pagesIndex + 1),\n ],\n pageParams,\n };\n}\n\n/**\n * Format existing item in react-query infinite data\n */\nexport function formatItemInInifiteData(\n prev: InfiniteData> = { pageParams: [], pages: [] },\n valueToCheck: string | bigint,\n // field or path to field to check.\n // if object, it will use the key of the object to match the first key inside the infinite data\n // this is needed in case the data in the infinite data store are IC Variant\n fieldToCheck: string | [string] | { [key: string]: string | [string] },\n // function used to format prev item instead of replacing with new item\n fieldUpdater: (arg0: T) => T\n) {\n const { pages, pageParams } = prev;\n\n let pageIndex = -1;\n const pagesIndex = pages.findIndex((page) => {\n const index = page.findIndex((item) => {\n if (typeof fieldToCheck === 'object' && !Array.isArray(fieldToCheck)) {\n // in case fieldToCheck is an object, we need to check that the item in store is an IC Variant\n if (Object.keys(item).length !== 1) {\n return false;\n }\n\n const key = Object.keys(item)[0];\n const path = fieldToCheck[key];\n if (path !== undefined) {\n return get(item, path) === valueToCheck;\n }\n\n return false;\n }\n\n return get(item, fieldToCheck) === valueToCheck;\n });\n\n if (index !== -1) {\n pageIndex = index;\n\n return true;\n }\n });\n\n if (pagesIndex === -1 || pageIndex === -1) {\n return prev;\n }\n\n return {\n pages: [\n ...pages.slice(0, pagesIndex),\n [\n ...pages[pagesIndex].slice(0, pageIndex),\n fieldUpdater(pages[pagesIndex][pageIndex]),\n ...pages[pagesIndex].slice(pageIndex + 1),\n ],\n ...pages.slice(pagesIndex + 1),\n ],\n pageParams,\n };\n}\n\n/**\n * Sorts items in react-query infinite data\n */\nexport function sortInifiteDataBy(\n data: InfiniteData> = { pageParams: [], pages: [] },\n field: string | [string],\n pagesToSort?: Array,\n sortFn?: (arr: Array) => Array\n) {\n const { pages, pageParams } = data;\n\n const sortedPages = pagesToSort\n ? pagesToSort.reduce((memo, pageIndex) => {\n const sortedPage =\n sortFn instanceof Function\n ? sortFn(pages[pageIndex])\n : reverse(sortBy(pages[pageIndex], field));\n\n return [\n ...memo.slice(0, pageIndex),\n sortedPage,\n ...memo.slice(pageIndex + 1),\n ];\n }, pages)\n : pages;\n\n return {\n pages: sortedPages,\n pageParams,\n };\n}\n","export const abbreviate = (value: number) => {\n const suffixes = ['', 'K', 'M', 'B', 'T'];\n const suffixNum = Math.floor((('' + value).length - 1) / 3);\n\n let shortValue: number;\n for (let precision = 4; precision >= 3; precision--) {\n shortValue = parseFloat(\n (suffixNum != 0 ? value / Math.pow(1000, suffixNum) : value).toPrecision(\n precision\n )\n );\n const dotLessShortValue = (shortValue + '').replace(/[^a-zA-Z 0-9]+/g, '');\n if (dotLessShortValue.length <= 2) {\n break;\n }\n }\n\n let stringShortValue = shortValue.toString();\n if (shortValue % 1 != 0) {\n stringShortValue = shortValue.toFixed(1);\n }\n\n return stringShortValue + suffixes[suffixNum];\n};\n","export const isIterable = (obj: any) =>\n obj == null ? false : typeof obj[Symbol.iterator] === 'function';\n","import { QueryKeyWithUpdateMethod } from 'utils/query';\n\nexport const useArticleRelatedQueryKeys = (\n articleId: any,\n update: any\n): Array => [\n {\n queryKey: ['getLikes', articleId],\n update: (data: any, patch: any) => update(data, patch),\n },\n];\n","import { SORT_ORDER } from 'pages/post/constants';\nimport { useCallback } from 'react';\nimport { QueryKeyWithUpdateMethod } from 'utils/query';\n\ninterface FindAndUpdateCommentArgs {\n data: any;\n patch: any;\n}\n\nexport const useCommentRelatedQueryKeys = (\n commentId: any,\n postId: any,\n update: any\n): Array => {\n const findAndUpdateComment = useCallback((args: FindAndUpdateCommentArgs) => {\n const { data, patch } = args;\n\n return data?.pages\n ? {\n ...data,\n pages: data.pages.map((comments: Array) =>\n comments.map((comment: any) =>\n comment?.comment?.comment_id === commentId\n ? update(comment, patch)\n : comment\n )\n ),\n }\n : data;\n }, []);\n\n return [\n {\n queryKey: [\n 'getPaginatedOptimizedCommentForResourceId',\n postId,\n SORT_ORDER.ASCENDING,\n ],\n update: (data: any, patch: any) => findAndUpdateComment({ data, patch }),\n },\n {\n queryKey: [\n 'getPaginatedOptimizedCommentForResourceId',\n postId,\n SORT_ORDER.DESCENDING,\n ],\n update: (data: any, patch: any) => findAndUpdateComment({ data, patch }),\n },\n ];\n};\n","import { Profile } from 'client';\nimport { getPaginatedOptimizedDiscoveryFeedQueryKey } from 'pages/discover/services';\nimport { getPaginatedOptimizedHashtagFeedQueryKey } from 'pages/hashtag/services';\nimport { getPaginatedOptimizedUserFeedQueryKey } from 'pages/home/services';\nimport {\n getPaginatedOptimizedProfileFeedQueryKey,\n getProfilePinnedPostsQueryKey,\n} from 'pages/profile/services';\nimport { useCallback } from 'react';\nimport { useQueryClient } from 'react-query';\nimport { useParams } from 'react-router-dom';\nimport { fromIcEnum } from 'utils/ic';\nimport { RouteParams as HastagRouteParams } from 'pages/hashtag/HashtagPage';\nimport { RouteParams as ProfileRouteParams } from 'pages/profile';\nimport { RouteParams as ThreadPostRouteParams } from 'pages/post/Post';\nimport { useGetUserIdByUsername } from 'services';\nimport { QueryKeyWithUpdateMethod } from 'utils/query';\nimport { useLocalStorage } from 'react-use';\n\ninterface FindAndUpdateOptimizedPostArgs {\n data: any;\n patch: any;\n}\n\nexport const usePostRelatedQueryKeys = (\n postId: bigint,\n update: any\n): Array => {\n const queryClient = useQueryClient();\n\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const routeParams = useParams() as Partial<\n HastagRouteParams & ThreadPostRouteParams & ProfileRouteParams\n >;\n\n const { data: userId } = useGetUserIdByUsername(routeParams?.username);\n\n const updateThreadItem = useCallback(\n (args: FindAndUpdateOptimizedPostArgs) => {\n const { data, patch } = args;\n\n return {\n ...data,\n post: update({ OptimizedPost: data.post }, patch).OptimizedPost,\n };\n },\n [update]\n );\n\n const findAndUpdateInThreadPreview = useCallback(\n (args: FindAndUpdateOptimizedPostArgs) => {\n const { data, patch } = args;\n\n return data\n ? {\n ...data,\n ThreadPreview: {\n ...data.ThreadPreview,\n preview: data.ThreadPreview.preview.map((item) =>\n item.id === postId\n ? updateThreadItem({\n data: item,\n patch,\n })\n : item\n ),\n },\n }\n : data;\n },\n [postId, updateThreadItem]\n );\n\n const findAndUpdatePost = useCallback(\n (args: FindAndUpdateOptimizedPostArgs) => {\n const { data, patch } = args;\n\n return data?.pages\n ? {\n ...data,\n pages: data.pages.map((optimizedPosts: Array) =>\n optimizedPosts.map((optimizedPost: any) =>\n !!optimizedPost &&\n fromIcEnum(optimizedPost) === 'OptimizedPost' &&\n optimizedPost?.OptimizedPost?.post?.post_id === postId\n ? update(optimizedPost, patch)\n : !!optimizedPost &&\n fromIcEnum(optimizedPost) === 'ThreadPreview'\n ? findAndUpdateInThreadPreview({\n data: optimizedPost,\n patch,\n })\n : optimizedPost\n )\n ),\n }\n : data;\n },\n [findAndUpdateInThreadPreview, postId, update]\n );\n\n const [hashtags] = useLocalStorage('app.stream.filter.hashtags', []);\n const [withImages] = useLocalStorage('app.stream.filter.withImages', false);\n const [withCertifiedUsers] = useLocalStorage(\n 'app.stream.filter.withCertifiedUsers',\n false\n );\n\n return [\n {\n queryKey: [\n getPaginatedOptimizedDiscoveryFeedQueryKey,\n {\n with_hashtags: hashtags,\n with_certified_users: withCertifiedUsers,\n with_image: withImages,\n skip_ids: [],\n },\n ],\n update: (data: any, patch: any) => findAndUpdatePost({ data, patch }),\n },\n {\n queryKey: getPaginatedOptimizedUserFeedQueryKey,\n update: (data: any, patch: any) => findAndUpdatePost({ data, patch }),\n },\n {\n queryKey: [getPaginatedOptimizedProfileFeedQueryKey, userId],\n update: (data: any, patch: any) => findAndUpdatePost({ data, patch }),\n },\n {\n queryKey: [\n getPaginatedOptimizedHashtagFeedQueryKey,\n authUser?.id,\n routeParams?.hashtag,\n ],\n update: (data: any, patch: any) => findAndUpdatePost({ data, patch }),\n },\n {\n queryKey: ['getThread', routeParams?.id],\n update: (data: any, patch: any) =>\n data?.posts\n ? {\n ...data,\n posts: data.posts.map((postItem: any) =>\n postItem.id === postId\n ? updateThreadItem({ data: postItem, patch })\n : postItem\n ),\n }\n : data,\n },\n {\n queryKey: 'getThread',\n update: (data: any) => data,\n },\n {\n queryKey: ['getItem', postId],\n update: (data: any, patch: any) => (data ? update(data, patch) : data),\n },\n {\n queryKey: 'getItem',\n update: (data: any) => data,\n },\n {\n queryKey: ['getThreadPost', routeParams?.id, routeParams?.postId],\n update: (data: any, patch: any) =>\n data?.post ? updateThreadItem({ data, patch }) : data,\n },\n {\n queryKey: ['getLastWeekLeaderBoardResult', authUser?.id],\n update: (data: any, patch: any) =>\n data?.[0]?.posts\n ? data.map((element) => ({\n ...element,\n posts: element?.posts\n ? findAndUpdatePost({\n data: { pages: [element?.posts] },\n patch,\n }).pages[0]\n : element?.posts,\n }))\n : data,\n },\n {\n queryKey: [getProfilePinnedPostsQueryKey, userId],\n update: (data: any, patch: any) =>\n !!data\n ? findAndUpdatePost({ data: { pages: [data] }, patch }).pages[0]\n : data,\n },\n ];\n};\n","import { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport { Extension, ExtensionRequest, PollRequest } from 'client';\nimport {\n MAX_POLL_CHOICES,\n defaultPollInfo,\n} from '../constants';\nimport { Duration } from 'dayjs/plugin/duration';\nimport { EditorState } from 'draft-js';\nimport { PollInfo, TimeUnit, timeUnits } from 'types';\nimport { fromIcEnum, fromIcOpt, toIcOpt, toIcVariant } from './ic';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\n\ndayjs.extend(duration);\n\nexport const isPoll = (optExtension: [] | [ExtensionRequest | Extension]) => {\n const extension = optExtension && fromIcOpt(optExtension);\n return !!extension && fromIcEnum(extension) === 'Poll';\n};\n\nexport const toPollExtension = (values?: PollInfo): [] | [ExtensionRequest] => {\n return toIcOpt(\n !!values\n ? toIcVariant('Poll', {\n votes_per_user: values.isMultichoice ? 0 : 1,\n poll_duration_in_minutes: values.pollLength.asMinutes(),\n options: values.choices\n .filter(\n (option: EditorState) =>\n !!option.getCurrentContent().getPlainText().trim()\n )\n .map((option: EditorState) =>\n option.getCurrentContent().getPlainText().trim()\n ),\n })\n : undefined\n );\n};\n\nexport const fromPollRequest = (values?: PollRequest): PollInfo => {\n return values\n ? {\n choices: values.options.map((option: string) =>\n createEditorStateWithText(option)\n ),\n choicesVisible: Array.from(\n Array(MAX_POLL_CHOICES)\n ).map((_, index: number) =>\n index <= values.options.length ? true : false\n ),\n isMultichoice: values.votes_per_user !== 1,\n pollLength: dayjs.duration(values.poll_duration_in_minutes, 'minutes'),\n }\n : defaultPollInfo;\n};\n\nexport const humanizeUnit = (unit: TimeUnit, value: number, upperCase = true) =>\n (upperCase ? unit.charAt(0).toUpperCase() : unit.charAt(0)) +\n unit.slice(1, unit.length - 1) +\n (value !== 1 ? 's' : '');\n\nexport const humanizeTimeToVote = (timeLeft: Duration) =>\n timeUnits\n .filter((unit: TimeUnit) => timeLeft[unit]() > 0)\n .map(\n (unit: TimeUnit) =>\n `${timeLeft[unit]()} ${humanizeUnit(unit, timeLeft[unit](), false)}`\n )\n .join(', ');\n","import { QueryCache, QueryClient, QueryKey } from 'react-query';\nimport { isAuthenticated, logout } from './auth';\n\nexport const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n refetchOnWindowFocus: false,\n },\n },\n queryCache: new QueryCache({\n onError: async (error: any) => {\n // in case of error, check if delegation is expired and move to login page if so\n if (error.message?.includes('Specified sender delegation has expired')) {\n if (isAuthenticated()) {\n logout().then(() => (window.location.pathname = '/'));\n }\n }\n },\n }),\n});\n\nexport interface QueryKeyWithUpdateMethod {\n queryKey: QueryKey;\n update: (old: any, patch: any) => any;\n}\n\nexport const cancelQueries = (\n relatedQueryKeys: Array\n) => {\n for (const { queryKey } of relatedQueryKeys) {\n queryClient.cancelQueries(queryKey);\n }\n};\n\nexport const invalidateQueries = (\n relatedQueryKeys: Array\n) => {\n for (const { queryKey } of relatedQueryKeys) {\n queryClient.invalidateQueries(queryKey);\n }\n};\n\nexport const snapshotQueries = (\n relatedQueryKeys: Array\n) => {\n return relatedQueryKeys.map(({ queryKey }: QueryKeyWithUpdateMethod) =>\n queryClient.getQueryData(queryKey)\n );\n};\n\nexport const updateQueries = (\n relatedQueryKeys: Array,\n patch: any\n) => {\n for (const { queryKey, update } of relatedQueryKeys) {\n queryClient.setQueryData(queryKey, (old) => update(old, patch));\n }\n};\n\nexport const setQueries = (\n relatedQueryKeys: Array,\n values: Array\n) => {\n for (let index = 0; index < relatedQueryKeys.length; index++) {\n const { queryKey } = relatedQueryKeys[index];\n queryClient.setQueryData(queryKey, values[index]);\n }\n};\n","import { FollowerProfileLite, Profile, ProfileLite } from 'client';\n\nexport function getUserName(user: Profile | ProfileLite | FollowerProfileLite) {\n if ('user_name' in user) {\n return user.user_name;\n }\n\n return user.username;\n}\n\nconst svgRegExt = /<\\/svg>/g;\n\nconst svgAvatarByUrl = {};\n\nexport async function loadSVGAvatar(url) {\n if (svgAvatarByUrl.hasOwnProperty(url)) {\n return svgAvatarByUrl[url];\n }\n if (url.includes('?tokenid')) {\n try {\n const content = await fetch(url).then((response) => {\n return response.text();\n });\n if (svgRegExt.test(content)) {\n const arr = content.split(svgRegExt);\n if (arr[3] && arr[3].startsWith('https://')) {\n svgAvatarByUrl[url] = arr[3];\n } else {\n svgAvatarByUrl[url] = '';\n }\n }\n } catch (e) {}\n }\n return svgAvatarByUrl[url];\n}\n","import { Wallet } from 'client';\nimport { to32bits } from './buffer';\nimport { getCrc32 } from './crc32';\nimport { fromHexString, isHex } from './hex';\n\nexport const walletKinds = ['Stoic', 'Plug', 'Nns'] as const;\nexport type WalletKind = typeof walletKinds[number];\nexport type PreferredWalletKind = WalletKind | 'None';\n\nexport type WalletKindsMapping = {\n [kind in WalletKind]: T;\n};\n\nexport const walletKindToNamesMapping: WalletKindsMapping = {\n Stoic: 'Stoic',\n Plug: 'Plug',\n Nns: 'Internet Identity',\n};\n\nconst verifyChecksum = (walletAddress: string) => {\n if (!isHex(walletAddress)) {\n return false;\n }\n\n const wallet = fromHexString(walletAddress);\n const checksum = wallet.slice(0, 4);\n const hash = wallet.slice(4);\n\n const validChecksum = to32bits(getCrc32(hash));\n\n return (\n checksum.length === validChecksum.length &&\n checksum.every((value, index) => value === validChecksum[index])\n );\n};\n\nexport const isValidWalletAddress = (walletAddress: string) => {\n return walletAddress.length === 64 && verifyChecksum(walletAddress);\n};\n\ninterface Repetition {\n count: number;\n kinds: Array;\n}\n\ntype WalletAddressToRepetition = {\n [key: string]: Repetition;\n};\n\nexport const countRepetitions = (data: Array) =>\n data?.reduce((repetitions: WalletAddressToRepetition, wallet: Wallet) => {\n const kind = Object.keys(wallet)[0] as WalletKind;\n const walletAddress = Object.values(wallet)[0];\n\n repetitions[walletAddress] = {\n count: repetitions[walletAddress]\n ? repetitions[walletAddress].count + 1\n : 1,\n kinds: repetitions[walletAddress]\n ? [...repetitions[walletAddress].kinds, kind]\n : [kind],\n };\n\n return repetitions;\n }, {});\n","import {\n Image,\n NewExperience,\n Project,\n ProjectWithUser,\n assetsApi,\n mainApi,\n} from 'client';\nimport dayjs from 'dayjs';\nimport { useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { fromIcOpt } from 'utils';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport { formatImage } from 'utils/image';\nimport { MIME_TYPES_PROJECT } from '../constants';\nimport { IExperienceForm } from '../components/ProjectForm/ProjectForm';\n\ndayjs.extend(customParseFormat);\n\nexport function useGetProjectWithUserData(id?: bigint) {\n const queryClient = useQueryClient();\n\n return useQuery(\n ['getExperienceWithUserData', id],\n async () => {\n const res = await mainApi.getExperienceWithUserData(id);\n\n return fromIcOpt(res);\n },\n {\n enabled: !!id,\n onSuccess: (data) => {\n queryClient.setQueryData>(\n ['getExperiencesWithUserData', id],\n (prev) => {\n if (prev) {\n return [...prev.filter((e) => e.experience.id !== id), data];\n }\n\n return [data];\n }\n );\n },\n }\n );\n}\n\n// TODO check which requests need to refetch on focus (maybe default should be false?)\n\n// TODO add pinned to pinned's request cache\nexport function useGetProjectsWithUserData(userId?: bigint, options = {}) {\n return useQuery, Error>(\n ['getExperiencesWithUserData', userId],\n () => mainApi.getExperiencesWithUserData(userId),\n {\n ...options,\n enabled: !!userId,\n }\n );\n}\n\nexport function useGetProjectCount(userId?: bigint) {\n return useQuery(\n ['getExperienceCount', userId],\n () => mainApi.getExperienceCount(userId),\n {\n enabled: !!userId,\n }\n );\n}\n\nexport interface INewProjectArgs {\n projectForm: IExperienceForm;\n userId: bigint;\n}\n\nexport function useCreateNewProject() {\n const queryClient = useQueryClient();\n return useMutation(\n async ({ projectForm }: INewProjectArgs) => {\n const end_date = dayjs(\n `${projectForm.end.year}-${projectForm.end.month}-${projectForm.end.day}`\n );\n const start_date = dayjs(\n `${projectForm.start.year}-${projectForm.start.month}-${projectForm.start.day}`\n );\n\n let image = [];\n if (projectForm.photo) {\n image = await formatImage(projectForm.photo, MIME_TYPES_PROJECT);\n }\n\n const description = {\n user_tags: projectForm.descriptionData.user_tags,\n hashtags: projectForm.descriptionData.hashtags,\n text: projectForm.descriptionData.text,\n };\n\n const project = {\n title: projectForm.role,\n present: projectForm.present,\n links: projectForm.links.filter(Boolean),\n company_name: projectForm.company_name,\n description: description,\n end_date: BigInt(projectForm.present ? 0 : end_date.valueOf()),\n start_date: BigInt(start_date.valueOf()),\n collaborators: projectForm.collaborators,\n company_handle: projectForm.company_username,\n image,\n };\n\n return mainApi.newExperience(project);\n },\n {\n onSuccess: (_, { userId }) => {\n return queryClient.invalidateQueries([\n 'getExperiencesWithUserData',\n userId,\n ]);\n },\n }\n );\n}\n\ninterface IRemoveProjectArgs {\n id: bigint;\n userId?: bigint;\n}\n\nexport function useRemoveProject() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ id }: IRemoveProjectArgs) => {\n return mainApi.removeExperience(id);\n },\n {\n onSuccess: (_, { userId }) => {\n userId &&\n queryClient.invalidateQueries(['getExperiencesWithUserData', userId]);\n },\n }\n );\n}\n\nexport interface IEditProjectArgs {\n projectForm: any;\n project: Project;\n userId: bigint;\n}\n\nexport function useEditProject() {\n const queryClient = useQueryClient();\n return useMutation(\n async ({ projectForm, project }: IEditProjectArgs) => {\n const end_date = dayjs(\n `${projectForm.end.year}-${projectForm.end.month}-${projectForm.end.day}`\n );\n const start_date = dayjs(\n `${projectForm.start.year}-${projectForm.start.month}-${projectForm.start.day}`\n );\n\n let image: Array = [];\n const removePhoto = projectForm.removePhoto;\n\n if (project.image.image_id && !removePhoto) {\n image = [project.image];\n }\n\n if (removePhoto && project.image.image_id) {\n await assetsApi.delete(project.image.image_id);\n image = [];\n }\n\n if (projectForm.photo) {\n try {\n image = await formatImage(projectForm.photo, MIME_TYPES_PROJECT);\n } catch (err) {\n throw new Error(\n err.message ||\n `Oops, it looks like this image format isn't supported! Please upload jpg, jpeg and png images only.`\n );\n }\n }\n\n const description = {\n user_tags: projectForm.descriptionData.user_tags,\n hashtags: projectForm.descriptionData.hashtags,\n text: projectForm.descriptionData.text,\n };\n\n const updatedProject = {\n title: projectForm.role,\n present: projectForm.present,\n links: projectForm.links.filter(Boolean),\n company_name: projectForm.company_name,\n description: description,\n end_date: BigInt(projectForm.present ? 0 : end_date.valueOf()),\n start_date: BigInt(start_date.valueOf()),\n collaborators: projectForm.collaborators,\n company_handle: projectForm.company_username,\n image: image,\n } as NewExperience;\n\n return await mainApi.updateExperience(project.id, updatedProject);\n },\n {\n onSuccess: (_, { userId }) => {\n return queryClient.invalidateQueries([\n 'getExperiencesWithUserData',\n userId,\n ]);\n },\n }\n );\n}\n\nexport interface IUpdateProjectCollabArgs {\n id: bigint;\n value: boolean;\n userId: bigint;\n}\n\nexport function useUpdateProjectCollab() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ id, value }: IUpdateProjectCollabArgs) => {\n return await mainApi.updateExperienceCollab(id, value);\n },\n {\n onSuccess: (_, { id, userId }) => {\n queryClient.invalidateQueries(['getExperienceWithUserData', id]);\n return queryClient.invalidateQueries([\n 'getExperiencesWithUserData',\n userId,\n ]);\n },\n }\n );\n}\n\nexport interface IUpdateProjectCollabVisibilityArgs {\n id: bigint;\n visibility: boolean;\n userId: bigint;\n}\n\nexport function useUpdateProjectCollabVisibility() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ id, visibility }: IUpdateProjectCollabVisibilityArgs) => {\n return await mainApi.updateExperienceCollabVisibility(id, visibility);\n },\n {\n onSuccess: (_, { id, userId }) => {\n queryClient.invalidateQueries(['getExperienceWithUserData', id]);\n return queryClient.invalidateQueries([\n 'getExperiencesWithUserData',\n userId,\n ]);\n },\n }\n );\n}\n","// Set how many items should be displayed in right sidebar\nexport const RECENT_USERS_INITIAL_ITEMS_LIMIT = 5;\n\nexport const LIKED_USERS_INITIAL_ITEMS_LIMIT = 20;\n","import React from 'react';\nimport { Dialog } from 'components';\n\nconst ConfirmModal = ({\n close,\n title,\n content,\n confirm,\n confirmButton,\n loading = false,\n}: {\n close: () => void;\n title: string;\n content: string;\n confirm: () => void;\n confirmButton: string;\n loading: boolean;\n}) => {\n return (\n close()}\n onSubmit={() => confirm()}\n />\n );\n};\n\nexport default ConfirmModal;\n","export const idlFactory = ({ IDL }) => {\n const UserId = IDL.Nat64;\n const KeyInfo = IDL.Record({\n key: IDL.Principal,\n timestamp: IDL.Nat64,\n key_name: IDL.Text,\n });\n const ByteBuf = IDL.Vec(IDL.Nat8);\n const TimeStamp = IDL.Nat64;\n const LinkMetadataBuf = IDL.Record({\n url: ByteBuf,\n title: ByteBuf,\n content: ByteBuf,\n image_url: IDL.Opt(ByteBuf),\n publisher: ByteBuf,\n author: ByteBuf,\n logo_url: ByteBuf,\n timestamp: TimeStamp,\n });\n const ImageBuf = IDL.Record({\n canister_id: IDL.Principal,\n image_id: ByteBuf,\n timestamp: TimeStamp,\n format: ByteBuf,\n });\n const Asset = IDL.Variant({\n None: IDL.Null,\n LinkMetadata: LinkMetadataBuf,\n Image: ImageBuf,\n NFTUrl: ByteBuf,\n });\n const ItemId = IDL.Nat64;\n const DeletionReport = IDL.Record({\n key: KeyInfo,\n user_name: IDL.Text,\n articles: IDL.Nat64,\n assets: IDL.Vec(Asset),\n threads: IDL.Vec(ItemId),\n user_id: UserId,\n likes: IDL.Nat64,\n comment_replies: IDL.Nat64,\n thread_posts: IDL.Nat64,\n comments: IDL.Vec(IDL.Nat64),\n experiences: IDL.Nat64,\n posts: IDL.Vec(ItemId),\n followers: IDL.Nat64,\n following: IDL.Nat64,\n milestones: IDL.Nat64,\n });\n const ThreadPostId = IDL.Nat64;\n const OptionId = IDL.Nat8;\n const ResourceId = IDL.Nat64;\n const WeekTimeStamp = IDL.Nat32;\n const ErrorKind = IDL.Variant({\n InterCanisterUpdateCallError: IDL.Tuple(IDL.Principal, IDL.Text),\n ThreadNotFound: ItemId,\n RmpDeserializeError: IDL.Text,\n ThreadPostNotInThread: IDL.Tuple(ThreadPostId, ItemId),\n PollOptionNotFound: OptionId,\n ResourceAlreadyExists: IDL.Text,\n PollUserAlreadyVoted: IDL.Null,\n UserAlreadyBlocked: IDL.Null,\n RmpSerializeError: IDL.Text,\n ItemNotFound: ItemId,\n PollVoteLimitExceeded: IDL.Nat8,\n EncodeError: IDL.Text,\n NotFound: IDL.Tuple(IDL.Text, ResourceId),\n ForbiddenAnonymousCaller: IDL.Null,\n ThreadPostNotFound: IDL.Tuple(ItemId, ThreadPostId),\n InvalidUserId: IDL.Null,\n WeekTimeStampWindowError: WeekTimeStamp,\n ItemsNotFound: IDL.Text,\n InterCanisterCallFailed: IDL.Text,\n PollNoVotes: IDL.Null,\n PollExpired: IDL.Null,\n StableMemory64GrowError: IDL.Nat64,\n InvalidCallerKey: IDL.Principal,\n UnauthorizedUserCall: IDL.Principal,\n Other: IDL.Text,\n LimitExceeded: IDL.Text,\n PinnedPostLimitExceeded: IDL.Nat8,\n UserBlocked: UserId,\n CannotBlockSelf: IDL.Null,\n EncodedSizeError: IDL.Text,\n UserIdNotFound: UserId,\n PollNotFound: IDL.Null,\n });\n const ResultDeletionReport = IDL.Variant({\n Ok: DeletionReport,\n Err: ErrorKind,\n });\n const Image = IDL.Record({\n canister_id: IDL.Principal,\n image_id: IDL.Text,\n timestamp: IDL.Nat64,\n format: IDL.Text,\n });\n const Birthday = IDL.Record({ day: IDL.Nat8, month: IDL.Nat8 });\n const WalletKind = IDL.Variant({\n Nns: IDL.Null,\n Stoic: IDL.Null,\n None: IDL.Null,\n Plug: IDL.Null,\n });\n const Wallet = IDL.Variant({\n Nns: IDL.Text,\n Stoic: IDL.Text,\n Plug: IDL.Text,\n });\n const Profile = IDL.Record({\n id: IDL.Nat64,\n wallets_are_public: IDL.Bool,\n title: IDL.Text,\n principal: IDL.Principal,\n username: IDL.Text,\n link: IDL.Text,\n cover: Image,\n badges: IDL.Vec(IDL.Record({ meta: IDL.Text, name: IDL.Text })),\n education: IDL.Text,\n description: IDL.Text,\n description_hashtags: IDL.Vec(IDL.Text),\n display_name: IDL.Text,\n company: IDL.Text,\n description_user_tags: IDL.Vec(\n IDL.Record({ username: IDL.Text, user_id: IDL.Nat64 })\n ),\n birthday: Birthday,\n nft_url: IDL.Text,\n image: Image,\n preferred_wallet: WalletKind,\n wallet_addresses: IDL.Vec(Wallet),\n location: IDL.Text,\n });\n const StatusCode = IDL.Null;\n const ResultStatus = IDL.Variant({ Ok: StatusCode, Err: ErrorKind });\n const Description = IDL.Record({\n user_tags: IDL.Vec(IDL.Record({ username: IDL.Text, user_id: IDL.Nat64 })),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n });\n const Collaborator = IDL.Record({\n user_id: IDL.Nat64,\n approved: IDL.Bool,\n visible: IDL.Bool,\n });\n const Experience = IDL.Record({\n id: IDL.Nat64,\n title: IDL.Text,\n present: IDL.Bool,\n company_name: IDL.Text,\n description: Description,\n end_date: IDL.Int64,\n user_id: IDL.Nat64,\n links: IDL.Vec(IDL.Text),\n start_date: IDL.Int64,\n collaborators: IDL.Vec(Collaborator),\n company_handle: IDL.Text,\n image: Image,\n });\n const Milestone = IDL.Record({\n id: IDL.Nat64,\n title: IDL.Text,\n company_name: IDL.Text,\n description: Description,\n end_date: IDL.Int64,\n one_day: IDL.Bool,\n user_id: IDL.Nat64,\n links: IDL.Vec(IDL.Text),\n start_date: IDL.Int64,\n pinned: IDL.Bool,\n collaborators: IDL.Vec(Collaborator),\n company_handle: IDL.Text,\n });\n const Announcement = IDL.Record({\n title: IDL.Text,\n updated_at: IDL.Nat64,\n action: IDL.Text,\n announcement_type: IDL.Text,\n content: IDL.Text,\n created_at: IDL.Nat64,\n user_id: IDL.Nat64,\n button_name: IDL.Text,\n announcement_id: IDL.Nat64,\n });\n const Feedback = IDL.Record({\n content: IDL.Text,\n platform_type: IDL.Variant({\n Ios: IDL.Null,\n Web: IDL.Null,\n Android: IDL.Null,\n Unknown: IDL.Null,\n }),\n created_at: IDL.Nat64,\n user_id: IDL.Nat64,\n announcement_id: IDL.Nat64,\n });\n const Article = IDL.Record({\n title: IDL.Text,\n updated_at: IDL.Nat64,\n content: IDL.Text,\n time_to_read: IDL.Nat64,\n created_at: IDL.Nat64,\n author: IDL.Nat64,\n summary: IDL.Text,\n image: Image,\n article_id: IDL.Nat64,\n });\n const AuditLogEntry = IDL.Record({\n report_id: IDL.Nat64,\n principal: IDL.Principal,\n action: IDL.Variant({\n VerifyUser: IDL.Null,\n DisplayNameChange: IDL.Null,\n ReportRemove: IDL.Null,\n UnverifyUser: IDL.Null,\n UsernameChange: IDL.Null,\n ReportIgnore: IDL.Null,\n RemoveComment: IDL.Null,\n Unknown: IDL.Null,\n RemovePost: IDL.Null,\n RemoveUser: IDL.Null,\n }),\n audit_log_id: IDL.Nat64,\n meta: IDL.Vec(IDL.Text),\n created_at: IDL.Nat64,\n user_id: IDL.Nat64,\n resource_id: IDL.Nat64,\n });\n const CommentCounter = IDL.Nat32;\n const LinkMetadata = IDL.Record({\n url: IDL.Text,\n title: IDL.Text,\n content: IDL.Text,\n image_url: IDL.Opt(IDL.Text),\n publisher: IDL.Text,\n author: IDL.Text,\n logo_url: IDL.Text,\n timestamp: IDL.Nat64,\n });\n const Comment = IDL.Record({\n updated_at: IDL.Nat64,\n user_tags: IDL.Vec(IDL.Record({ username: IDL.Text, user_id: IDL.Nat64 })),\n hashtags: IDL.Vec(IDL.Text),\n replies_counter: CommentCounter,\n text: IDL.Text,\n created_at: IDL.Nat64,\n author: IDL.Nat64,\n resource_id: IDL.Nat64,\n link_metadata: IDL.Opt(IDL.Vec(LinkMetadata)),\n image: Image,\n comment_id: IDL.Nat64,\n });\n const ReSharedCounter = IDL.Nat32;\n const AnnouncementId = IDL.Nat64;\n const ArticleId = IDL.Nat64;\n const MilestoneId = IDL.Nat64;\n const ExperienceId = IDL.Nat64;\n const QuotedResourceById = IDL.Variant({\n Announcement: AnnouncementId,\n Article: ArticleId,\n None: IDL.Null,\n Post: ItemId,\n ThreadPost: ThreadPostId,\n Comment: ItemId,\n Milestone: MilestoneId,\n Experience: ExperienceId,\n });\n const TotalVoteCounter = IDL.Nat64;\n const VotePercentage = IDL.Nat8;\n const PollOption = IDL.Record({\n id: OptionId,\n content: IDL.Text,\n votes: TotalVoteCounter,\n vote_percentage: VotePercentage,\n });\n const Poll = IDL.Record({\n poll_end_timestamp: TimeStamp,\n votes_per_user: IDL.Nat8,\n timestamp: TimeStamp,\n total_vote_counter: IDL.Nat64,\n options: IDL.Vec(PollOption),\n });\n const Extension = IDL.Variant({ None: IDL.Null, Poll: Poll });\n const Post = IDL.Record({\n quoted_resource: IDL.Nat64,\n user_tags: IDL.Vec(IDL.Record({ username: IDL.Text, user_id: IDL.Nat64 })),\n post_id: IDL.Nat64,\n nft_image_url: IDL.Text,\n hashtags: IDL.Vec(IDL.Text),\n reshared_counter: ReSharedCounter,\n text: IDL.Text,\n user_id: IDL.Nat64,\n timestamp: IDL.Nat64,\n link_metadata: IDL.Opt(IDL.Vec(LinkMetadata)),\n quoted_resource_by_id: QuotedResourceById,\n image: Image,\n extension: Extension,\n });\n const ProfileLiteWithPreferredWallet = IDL.Record({\n id: UserId,\n preferred_wallet_address: IDL.Opt(Wallet),\n username: IDL.Text,\n display_name: IDL.Text,\n });\n const ThreadPost = IDL.Record({\n id: ThreadPostId,\n post: Post,\n master_id: ItemId,\n });\n const QuotedResource = IDL.Variant({\n Announcement: Announcement,\n Article: Article,\n None: IDL.Null,\n Post: Post,\n ThreadPost: ThreadPost,\n Comment: Comment,\n Milestone: Milestone,\n Experience: Experience,\n });\n const LikeCounter = IDL.Nat32;\n const PollInfo = IDL.Record({ request_user_votes: IDL.Vec(OptionId) });\n const ExtensionInfo = IDL.Variant({ None: IDL.Null, Poll: PollInfo });\n const OptimizedPostV2 = IDL.Record({\n quoted_resource: QuotedResource,\n comment_counter: CommentCounter,\n reshared_counter: ReSharedCounter,\n author_profile: IDL.Opt(Profile),\n post: Post,\n like_counter: LikeCounter,\n is_liked_by_request_user: IDL.Bool,\n extension_info: ExtensionInfo,\n });\n const OptimizedThreadPost = IDL.Record({\n id: ThreadPostId,\n post: OptimizedPostV2,\n master_id: ItemId,\n });\n const ApiCommentedPost = IDL.Variant({\n Post: OptimizedPostV2,\n ThreadPost: OptimizedThreadPost,\n });\n const CommentPreview = IDL.Record({\n commented_post: ApiCommentedPost,\n comment: OptimizedPostV2,\n });\n const OptimizedThread = IDL.Record({\n id: ItemId,\n author_profile: Profile,\n posts: IDL.Vec(OptimizedThreadPost),\n });\n const ApiItem = IDL.Variant({\n CommentPreview: CommentPreview,\n OptimizedThread: OptimizedThread,\n OptimizedPost: OptimizedPostV2,\n });\n const ResultApiItem = IDL.Variant({ Ok: ApiItem, Err: ErrorKind });\n const ResultUserIds = IDL.Variant({\n Ok: IDL.Vec(UserId),\n Err: ErrorKind,\n });\n const PostKind = ApiCommentedPost;\n const ApiLeaderBoardV2 = IDL.Record({\n hashtags: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat32)),\n posts: IDL.Vec(PostKind),\n profiles: IDL.Vec(Profile),\n });\n const ApiLeaderBoardV1 = IDL.Record({\n hashtags: IDL.Vec(IDL.Text),\n posts: IDL.Vec(ApiItem),\n profiles: IDL.Vec(Profile),\n });\n const LogId = IDL.Nat64;\n const LogLevel = IDL.Variant({\n Error: IDL.Null,\n Info: IDL.Null,\n Warn: IDL.Null,\n Debug: IDL.Null,\n });\n const Log = IDL.Record({\n id: LogId,\n body: ByteBuf,\n level: LogLevel,\n timestamp: TimeStamp,\n });\n const Notification = IDL.Record({\n resource: IDL.Text,\n action_user: IDL.Record({\n profile_image: Image,\n principal: IDL.Principal,\n username: IDL.Text,\n badges: IDL.Vec(IDL.Record({ meta: IDL.Text, name: IDL.Text })),\n user_id: IDL.Nat64,\n display_name: IDL.Text,\n nft_url: IDL.Text,\n }),\n seen: IDL.Bool,\n created_at: IDL.Nat64,\n user_id: IDL.Nat64,\n parent_resource_id: IDL.Nat64,\n notification_id: IDL.Nat64,\n notification_type: IDL.Nat8,\n resource_id: IDL.Nat64,\n });\n const ReportResourceType = IDL.Variant({\n Post: IDL.Null,\n User: IDL.Null,\n ThreadPost: IDL.Null,\n Comment: IDL.Null,\n Milestone: IDL.Null,\n Experience: IDL.Null,\n Unknown: IDL.Null,\n });\n const ReportCategory = IDL.Variant({\n InappropriateContent: IDL.Null,\n Violence: IDL.Null,\n Scam: IDL.Null,\n Spam: IDL.Null,\n Pornography: IDL.Null,\n Unknown: IDL.Null,\n Impersonation: IDL.Null,\n });\n const Report = IDL.Record({\n report_id: IDL.Nat64,\n text: IDL.Text,\n user_id: IDL.Nat64,\n resource_type: ReportResourceType,\n timestamp: IDL.Nat64,\n resource_id: IDL.Nat64,\n category: ReportCategory,\n processed: IDL.Bool,\n });\n const Ordering = IDL.Variant({\n Descending: IDL.Null,\n Ascending: IDL.Null,\n });\n const PostId = IDL.Nat64;\n const OptimizedComment = IDL.Record({\n author_profile: Profile,\n likes: IDL.Vec(UserId),\n comment: Comment,\n });\n const ResultOptimizedCommentList = IDL.Variant({\n Ok: IDL.Vec(OptimizedComment),\n Err: ErrorKind,\n });\n const OptimizedPost = IDL.Record({\n quoted_resource: QuotedResource,\n comment_counter: CommentCounter,\n author_profile: Profile,\n post: Post,\n like_counter: LikeCounter,\n is_liked_by_request_user: IDL.Bool,\n });\n const OptimizedUserFeed = IDL.Record({\n posts: IDL.Vec(OptimizedPost),\n profile: Profile,\n });\n const ResultOptimizedUserFeed = IDL.Variant({\n Ok: OptimizedUserFeed,\n Err: ErrorKind,\n });\n const ThreadPreview = IDL.Record({\n id: ItemId,\n len: IDL.Nat64,\n preview: IDL.Vec(OptimizedThreadPost),\n author_profile: Profile,\n });\n const ApiItemFeed = IDL.Variant({\n ThreadPreview: ThreadPreview,\n CommentPreview: CommentPreview,\n OptimizedPost: OptimizedPostV2,\n });\n const OptimizedUserFeedV2 = IDL.Record({ items: IDL.Vec(ApiItemFeed) });\n const ResultOptimizedUserFeedV2 = IDL.Variant({\n Ok: OptimizedUserFeedV2,\n Err: ErrorKind,\n });\n const Offset = IDL.Nat64;\n const Limit = IDL.Nat64;\n const ApiFeedFilterParameter = IDL.Record({\n with_hashtags: IDL.Vec(IDL.Text),\n with_image: IDL.Bool,\n skip_ids: IDL.Vec(ItemId),\n with_certified_users: IDL.Bool,\n });\n const ReportFeedFilterParameter = IDL.Record({\n with_categories: IDL.Vec(ReportCategory),\n with_types: IDL.Vec(ReportResourceType),\n });\n const MilestoneWithUserData = IDL.Record({\n user: Profile,\n collaborators: IDL.Vec(\n IDL.Record({\n user: Profile,\n approved: IDL.Bool,\n visible: IDL.Bool,\n })\n ),\n milestone: Milestone,\n });\n const ExperienceWithUserData = IDL.Record({\n user: Profile,\n experience: Experience,\n collaborators: IDL.Vec(\n IDL.Record({\n user: Profile,\n approved: IDL.Bool,\n visible: IDL.Bool,\n })\n ),\n });\n const ReportResource = IDL.Variant({\n None: IDL.Null,\n Post: OptimizedPostV2,\n User: Profile,\n ThreadPost: OptimizedThreadPost,\n Comment: CommentPreview,\n Milestone: MilestoneWithUserData,\n Experience: ExperienceWithUserData,\n });\n const OptimizedReport = IDL.Record({\n report: Report,\n resource: ReportResource,\n user: Profile,\n });\n const OptimizedReportFeed = IDL.Record({\n items: IDL.Vec(OptimizedReport),\n });\n const ResultOptimizedReportFeed = IDL.Variant({\n Ok: OptimizedReportFeed,\n Err: ErrorKind,\n });\n const ResultApiItemFeed = IDL.Variant({\n Ok: ApiItemFeed,\n Err: ErrorKind,\n });\n const ResultProfiles = IDL.Variant({\n Ok: IDL.Vec(Profile),\n Err: ErrorKind,\n });\n const GeneralStats = IDL.Record({\n resolved: IDL.Nat64,\n total: IDL.Nat64,\n pending: IDL.Nat64,\n });\n const ResultOptimizedThread = IDL.Variant({\n Ok: OptimizedThread,\n Err: ErrorKind,\n });\n const ResultOptimizedThreadPost = IDL.Variant({\n Ok: OptimizedThreadPost,\n Err: ErrorKind,\n });\n const RequestStatus = IDL.Variant({\n Accepted: IDL.Null,\n Pending: IDL.Null,\n });\n const ConnectionRequest = IDL.Record({\n id: IDL.Nat64,\n status: RequestStatus,\n user: IDL.Nat64,\n caller: IDL.Nat64,\n });\n const VerificationRequest = IDL.Record({\n request_id: IDL.Nat64,\n status: IDL.Variant({\n Ignored: IDL.Null,\n Unknown: IDL.Null,\n Refused: IDL.Null,\n Verified: IDL.Null,\n Pending: IDL.Null,\n }),\n updated_at: IDL.Nat64,\n user_id: IDL.Nat64,\n verification_proof: IDL.Text,\n timestamp: IDL.Nat64,\n });\n const NewAnnouncement = IDL.Record({\n title: IDL.Text,\n action: IDL.Text,\n announcement_type: IDL.Text,\n content: IDL.Text,\n button_name: IDL.Text,\n });\n const NewArticle = IDL.Record({\n title: IDL.Text,\n content: IDL.Text,\n time_to_read: IDL.Nat64,\n summary: IDL.Text,\n });\n const NewComment = IDL.Record({\n user_tags: IDL.Vec(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n link_metadata: IDL.Opt(IDL.Vec(LinkMetadata)),\n image: IDL.Opt(Image),\n });\n const NewExperience = IDL.Record({\n title: IDL.Text,\n present: IDL.Bool,\n company_name: IDL.Text,\n description: Description,\n end_date: IDL.Int64,\n links: IDL.Vec(IDL.Text),\n start_date: IDL.Int64,\n collaborators: IDL.Vec(IDL.Nat64),\n company_handle: IDL.Text,\n image: IDL.Opt(Image),\n });\n const NewMilestone = IDL.Record({\n title: IDL.Text,\n company_name: IDL.Text,\n description: Description,\n end_date: IDL.Int64,\n one_day: IDL.Bool,\n links: IDL.Vec(IDL.Text),\n start_date: IDL.Int64,\n collaborators: IDL.Vec(IDL.Nat64),\n company_handle: IDL.Text,\n });\n const NewPostV1 = IDL.Record({\n quoted_resource: IDL.Nat64,\n user_tags: IDL.Vec(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n });\n const NewPost = IDL.Record({\n quoted_resource: IDL.Nat64,\n user_tags: IDL.Vec(IDL.Text),\n nft_image_url: IDL.Opt(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n image: IDL.Opt(Image),\n });\n const PollRequest = IDL.Record({\n votes_per_user: IDL.Nat8,\n poll_duration_in_minutes: IDL.Nat16,\n options: IDL.Vec(IDL.Text),\n });\n const ExtensionRequest = IDL.Variant({ Poll: PollRequest });\n const NewPostRequestV2 = IDL.Record({\n quoted_resource: QuotedResourceById,\n user_tags: IDL.Vec(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n nft_image_urls: IDL.Vec(IDL.Text),\n link_metadata: IDL.Opt(IDL.Vec(LinkMetadata)),\n extension: IDL.Opt(ExtensionRequest),\n images: IDL.Vec(Image),\n });\n const ResultPost = IDL.Variant({ Ok: Post, Err: ErrorKind });\n const NewReportV1 = IDL.Record({\n text: IDL.Text,\n resource_id: IDL.Nat64,\n });\n const NewReport = IDL.Record({\n text: IDL.Text,\n resource_id: IDL.Nat64,\n category: ReportCategory,\n });\n const NewReportV2 = IDL.Record({\n text: IDL.Text,\n resource_type: ReportResourceType,\n resource_id: IDL.Nat64,\n category: ReportCategory,\n });\n const ResultItemId = IDL.Variant({ Ok: ItemId, Err: ErrorKind });\n const ProfileWithFollowerData = IDL.Record({\n profile: Profile,\n is_followed: IDL.Bool,\n });\n const LogCounter = IDL.Nat64;\n const NewThreadRequest = IDL.Record({\n new_posts: IDL.Vec(NewPostRequestV2),\n author_id: UserId,\n });\n const FollowerProfileLite = IDL.Record({\n id: UserId,\n principal: IDL.Principal,\n user_name: IDL.Text,\n badges: IDL.Vec(IDL.Record({ meta: IDL.Text, name: IDL.Text })),\n display_name: IDL.Text,\n nft_url: IDL.Text,\n image: Image,\n is_followed: IDL.Bool,\n });\n const ResultProfileWithFollowerData = IDL.Variant({\n Ok: IDL.Vec(ProfileWithFollowerData),\n Err: ErrorKind,\n });\n const SignupRequestV1 = IDL.Record({\n title: IDL.Text,\n username: IDL.Text,\n link: IDL.Text,\n education: IDL.Text,\n description: IDL.Text,\n display_name: IDL.Text,\n company: IDL.Text,\n location: IDL.Text,\n });\n const SignupRequest = IDL.Record({\n title: IDL.Text,\n username: IDL.Text,\n link: IDL.Text,\n education: IDL.Text,\n description: IDL.Record({\n user_tags: IDL.Vec(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n }),\n display_name: IDL.Text,\n company: IDL.Text,\n location: IDL.Text,\n });\n const SignupRequestV2 = IDL.Record({\n wallets_are_public: IDL.Opt(IDL.Bool),\n title: IDL.Text,\n username: IDL.Text,\n link: IDL.Text,\n education: IDL.Text,\n description: IDL.Record({\n user_tags: IDL.Vec(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n }),\n display_name: IDL.Text,\n company: IDL.Text,\n birthday: Birthday,\n preferred_wallet: WalletKind,\n wallet_addresses: IDL.Vec(Wallet),\n location: IDL.Text,\n });\n const UpdateProfileRequestV1 = IDL.Record({\n title: IDL.Text,\n link: IDL.Text,\n education: IDL.Text,\n description: IDL.Text,\n display_name: IDL.Text,\n company: IDL.Text,\n location: IDL.Text,\n });\n const UpdateProfileRequest = IDL.Record({\n title: IDL.Text,\n link: IDL.Text,\n education: IDL.Text,\n description: IDL.Record({\n user_tags: IDL.Vec(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n }),\n display_name: IDL.Text,\n company: IDL.Text,\n location: IDL.Text,\n });\n const UpdateProfileRequestV2 = IDL.Record({\n wallets_are_public: IDL.Opt(IDL.Bool),\n title: IDL.Text,\n link: IDL.Text,\n education: IDL.Text,\n description: IDL.Record({\n user_tags: IDL.Vec(IDL.Text),\n hashtags: IDL.Vec(IDL.Text),\n text: IDL.Text,\n }),\n display_name: IDL.Text,\n company: IDL.Text,\n birthday: Birthday,\n preferred_wallet: WalletKind,\n wallet_addresses: IDL.Vec(Wallet),\n location: IDL.Text,\n });\n return IDL.Service({\n acceptConnection: IDL.Func([IDL.Nat64], [], []),\n addTeamBadge: IDL.Func([IDL.Nat64], [], []),\n adminDeleteUser: IDL.Func([UserId], [ResultDeletionReport], []),\n adminUpdateUserNameInAllProfileOnce: IDL.Func([], [], []),\n allTokenRefreshStats: IDL.Func(\n [],\n [IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64))))],\n ['query']\n ),\n authorizeKey: IDL.Func(\n [IDL.Nat64, IDL.Principal, IDL.Text],\n [IDL.Vec(KeyInfo)],\n []\n ),\n authorizeKeyWithWords: IDL.Func(\n [IDL.Nat64, IDL.Text, IDL.Text],\n [IDL.Vec(KeyInfo)],\n []\n ),\n autoSuggest: IDL.Func(\n [IDL.Text, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Profile)],\n ['query']\n ),\n blockUser: IDL.Func([IDL.Nat64], [], []),\n cancelConnection: IDL.Func([IDL.Nat64], [], []),\n canisterStatus: IDL.Func(\n [],\n [\n IDL.Record({\n stable_storage_size: IDL.Nat32,\n cycle_balance: IDL.Nat64,\n timestamp: IDL.Nat64,\n }),\n ],\n ['query']\n ),\n changeUsername: IDL.Func([IDL.Nat64, IDL.Text, IDL.Text], [], []),\n changeVerificationRequest: IDL.Func([IDL.Nat64, IDL.Nat8], [], []),\n checkIfUserExist: IDL.Func([IDL.Text], [IDL.Bool], ['query']),\n commentsRemaining: IDL.Func([], [IDL.Nat64], ['query']),\n deleteMyAccount: IDL.Func([], [ResultStatus], []),\n epochRestart: IDL.Func([], [IDL.Nat64], ['query']),\n followUser: IDL.Func([IDL.Nat64], [], []),\n getAllExperiences: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Experience)],\n ['query']\n ),\n getAllFollows: IDL.Func(\n [IDL.Nat64],\n [\n IDL.Record({\n followed: IDL.Vec(IDL.Nat64),\n followers: IDL.Vec(IDL.Nat64),\n }),\n ],\n ['query']\n ),\n getAllFollowsWithData: IDL.Func(\n [IDL.Nat64],\n [\n IDL.Record({\n followed: IDL.Vec(Profile),\n followers: IDL.Vec(Profile),\n }),\n ],\n ['query']\n ),\n getAllFollowsWithMutualData: IDL.Func(\n [IDL.Nat64],\n [\n IDL.Record({\n followed: IDL.Vec(IDL.Record({ mutual: IDL.Bool, profile: Profile })),\n followers: IDL.Vec(\n IDL.Record({ mutual: IDL.Bool, profile: Profile })\n ),\n }),\n ],\n ['query']\n ),\n getAllMilestones: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Milestone)],\n ['query']\n ),\n getAllNotifications: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [\n IDL.Vec(\n IDL.Record({\n action_user_id: IDL.Nat64,\n seen: IDL.Bool,\n created_at: IDL.Nat64,\n user_id: IDL.Nat64,\n notification_id: IDL.Nat64,\n notification_type: IDL.Nat8,\n resource_id: IDL.Nat64,\n })\n ),\n ],\n ['query']\n ),\n getAnnouncement: IDL.Func([IDL.Nat64], [Announcement], ['query']),\n getAnnouncementFeedbacks: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Feedback)],\n ['query']\n ),\n getArticle: IDL.Func([IDL.Nat64], [Article], ['query']),\n getArticleWithUserData: IDL.Func(\n [IDL.Nat64],\n [IDL.Record({ user: Profile, article: Article })],\n ['query']\n ),\n getArticles: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Article)],\n ['query']\n ),\n getAuditLog: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(AuditLogEntry)],\n ['query']\n ),\n getAuditLogForModerator: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(AuditLogEntry)],\n ['query']\n ),\n getAuthorizedKeys: IDL.Func([IDL.Nat64], [IDL.Vec(KeyInfo)], ['query']),\n getBlockedBackup: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [\n IDL.Vec(\n IDL.Record({\n blocked_users: IDL.Vec(IDL.Nat64),\n user_id: IDL.Nat64,\n })\n ),\n ],\n ['query']\n ),\n getBlockedList: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(IDL.Nat64)],\n ['query']\n ),\n getBlockedListWithUserData: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Profile)],\n ['query']\n ),\n getCommentCount: IDL.Func([ItemId], [IDL.Nat64], ['query']),\n getCommentWithUserData: IDL.Func(\n [ItemId],\n [IDL.Record({ user: Profile, comment: Comment })],\n ['query']\n ),\n getCommentsCount: IDL.Func([], [IDL.Nat64], ['query']),\n getCommentsWithUserData: IDL.Func(\n [ItemId],\n [IDL.Vec(IDL.Record({ user: Profile, comment: Comment }))],\n ['query']\n ),\n getCount: IDL.Func([IDL.Nat64, IDL.Nat8], [IDL.Nat64], ['query']),\n getDiscoveryFeed: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Post)],\n ['query']\n ),\n getDiscoveryFeedWithUserData: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(IDL.Record({ post: Post, user: Profile }))],\n ['query']\n ),\n getExperience: IDL.Func([IDL.Nat64], [Experience], ['query']),\n getExperienceCollabPendingCount: IDL.Func(\n [IDL.Nat64],\n [IDL.Nat64],\n ['query']\n ),\n getExperienceCount: IDL.Func([IDL.Nat64], [IDL.Nat64], ['query']),\n getExperienceWithUserData: IDL.Func(\n [IDL.Nat64],\n [\n IDL.Opt(\n IDL.Record({\n user: Profile,\n experience: Experience,\n collaborators: IDL.Vec(\n IDL.Record({ user: Profile, approved: IDL.Bool })\n ),\n })\n ),\n ],\n ['query']\n ),\n getExperiences: IDL.Func([IDL.Nat64], [IDL.Vec(Experience)], ['query']),\n getExperiencesV2: IDL.Func([IDL.Nat64], [IDL.Vec(Experience)], ['query']),\n getExperiencesWithUserData: IDL.Func(\n [IDL.Nat64],\n [\n IDL.Vec(\n IDL.Record({\n user: Profile,\n experience: Experience,\n collaborators: IDL.Vec(\n IDL.Record({\n user: Profile,\n approved: IDL.Bool,\n visible: IDL.Bool,\n })\n ),\n })\n ),\n ],\n ['query']\n ),\n getFollowCounts: IDL.Func(\n [IDL.Nat64],\n [IDL.Record({ followed: IDL.Nat64, followers: IDL.Nat64 })],\n ['query']\n ),\n getFollowedUsernames: IDL.Func([IDL.Nat64], [IDL.Vec(IDL.Text)], ['query']),\n getFollowedUsers: IDL.Func([IDL.Nat64], [IDL.Vec(IDL.Nat64)], ['query']),\n getFollowerUsernames: IDL.Func([IDL.Nat64], [IDL.Vec(IDL.Text)], ['query']),\n getFollowers: IDL.Func([IDL.Nat64], [IDL.Vec(IDL.Nat64)], ['query']),\n getFollowersWithLitePreferredWallet: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(ProfileLiteWithPreferredWallet)],\n ['query']\n ),\n getFollowersWithMutualData: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(IDL.Record({ mutual: IDL.Bool, profile: Profile }))],\n ['query']\n ),\n getFollowingsWithMutualData: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(IDL.Record({ mutual: IDL.Bool, profile: Profile }))],\n ['query']\n ),\n getGlobalLimit: IDL.Func([IDL.Text], [IDL.Nat64, IDL.Nat64], ['query']),\n getHashtagFeed: IDL.Func(\n [IDL.Text, IDL.Nat32, IDL.Nat32],\n [IDL.Vec(Post)],\n ['query']\n ),\n getHashtagFeedWithUserData: IDL.Func(\n [IDL.Text, IDL.Nat32, IDL.Nat32],\n [IDL.Vec(IDL.Record({ post: Post, user: Profile }))],\n ['query']\n ),\n getItem: IDL.Func([ItemId, UserId], [ResultApiItem], ['query']),\n getItemLikes: IDL.Func(\n [ItemId, UserId, IDL.Nat64, IDL.Nat64],\n [ResultUserIds],\n ['query']\n ),\n getLastWeekLeaderBoardResultV2: IDL.Func(\n [UserId],\n [IDL.Opt(ApiLeaderBoardV2)],\n ['query']\n ),\n getLastWeekLeaderBoardResultsV1: IDL.Func(\n [UserId],\n [IDL.Opt(ApiLeaderBoardV1)],\n ['query']\n ),\n getLatestAnnouncements: IDL.Func([], [IDL.Vec(Announcement)], ['query']),\n getLatestUserPosts: IDL.Func(\n [IDL.Nat64, IDL.Nat8],\n [IDL.Vec(Post)],\n ['query']\n ),\n getLatestUsers: IDL.Func([IDL.Nat8], [IDL.Vec(Profile)], ['query']),\n getLikes: IDL.Func([IDL.Nat64], [IDL.Vec(IDL.Nat64)], ['query']),\n getLikesCount: IDL.Func([], [IDL.Nat64], ['query']),\n getLikesUsers: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Profile)],\n ['query']\n ),\n getLogsFromIds: IDL.Func([IDL.Vec(LogId)], [IDL.Vec(Log)], ['query']),\n getMilestone: IDL.Func([IDL.Nat64], [Milestone], ['query']),\n getMilestoneCollabPendingCount: IDL.Func(\n [IDL.Nat64],\n [IDL.Nat64],\n ['query']\n ),\n getMilestoneCount: IDL.Func([IDL.Nat64], [IDL.Nat64], ['query']),\n getMilestoneWithUserData: IDL.Func(\n [IDL.Nat64],\n [\n IDL.Opt(\n IDL.Record({\n user: Profile,\n collaborators: IDL.Vec(\n IDL.Record({ user: Profile, approved: IDL.Bool })\n ),\n milestone: Milestone,\n })\n ),\n ],\n ['query']\n ),\n getMilestones: IDL.Func([IDL.Nat64], [IDL.Vec(Milestone)], ['query']),\n getMilestonesV2: IDL.Func([IDL.Nat64], [IDL.Vec(Milestone)], ['query']),\n getMilestonesWithUserData: IDL.Func(\n [IDL.Nat64],\n [\n IDL.Vec(\n IDL.Record({\n user: Profile,\n collaborators: IDL.Vec(\n IDL.Record({\n user: Profile,\n approved: IDL.Bool,\n visible: IDL.Bool,\n })\n ),\n milestone: Milestone,\n })\n ),\n ],\n ['query']\n ),\n getMostFollowed: IDL.Func([], [IDL.Vec(Profile)], ['query']),\n getNotifications: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Notification)],\n ['query']\n ),\n getOfficial: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),\n getOwnReports: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Report)],\n ['query']\n ),\n getPaginatedCommentsWithUserDataAndSorting: IDL.Func(\n [ItemId, IDL.Nat64, IDL.Nat64, IDL.Nat8],\n [IDL.Vec(IDL.Record({ user: Profile, comment: Comment }))],\n ['query']\n ),\n getPaginatedExperiences: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Experience)],\n ['query']\n ),\n getPaginatedExperiencesWithUserData: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [\n IDL.Vec(\n IDL.Record({\n user: Profile,\n experience: Experience,\n collaborators: IDL.Vec(\n IDL.Record({ user: Profile, approved: IDL.Bool })\n ),\n })\n ),\n ],\n ['query']\n ),\n getPaginatedLogIds: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(LogId)],\n ['query']\n ),\n getPaginatedLogs: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Log)],\n ['query']\n ),\n getPaginatedMilestones: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Milestone)],\n ['query']\n ),\n getPaginatedMilestonesWithUserData: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [\n IDL.Vec(\n IDL.Record({\n user: Profile,\n collaborators: IDL.Vec(\n IDL.Record({ user: Profile, approved: IDL.Bool })\n ),\n milestone: Milestone,\n })\n ),\n ],\n ['query']\n ),\n getPaginatedOptimizedCommentForResourceId: IDL.Func(\n [UserId, ItemId, IDL.Nat64, IDL.Nat64, Ordering, IDL.Vec(PostId)],\n [ResultOptimizedCommentList],\n ['query']\n ),\n getPaginatedOptimizedDiscoveryFeed: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(PostId)],\n [ResultOptimizedUserFeed],\n ['query']\n ),\n getPaginatedOptimizedDiscoveryFeedV2: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(ItemId)],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedOptimizedDiscoveryFeedV3: IDL.Func(\n [UserId, Offset, Limit, ApiFeedFilterParameter],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedOptimizedHashtagFeed: IDL.Func(\n [UserId, IDL.Text, IDL.Nat64, IDL.Nat64, IDL.Vec(ItemId)],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedOptimizedProfileFeed: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(ItemId)],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedOptimizedProfileFeedV2: IDL.Func(\n [UserId, UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(ItemId)],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedOptimizedReportFeed: IDL.Func(\n [Offset, Limit, ReportFeedFilterParameter],\n [ResultOptimizedReportFeed],\n ['query']\n ),\n getPaginatedOptimizedUserFeed: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(PostId)],\n [ResultOptimizedUserFeed],\n ['query']\n ),\n getPaginatedOptimizedUserFeedV2: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(ItemId)],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedOptimizedUserFeedV3: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(PostId)],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedOptimizedUserTagFeed: IDL.Func(\n [UserId, IDL.Text, IDL.Nat64, IDL.Nat64, IDL.Vec(ItemId)],\n [ResultOptimizedUserFeedV2],\n ['query']\n ),\n getPaginatedUserFeed: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64, IDL.Vec(ItemId)],\n [IDL.Vec(ResultApiItemFeed)],\n ['query']\n ),\n getPaginatedUsersWhoResharedPost: IDL.Func(\n [ItemId, UserId, Offset, Limit],\n [ResultProfiles],\n ['query']\n ),\n getPinnedItems: IDL.Func([UserId], [ResultOptimizedUserFeedV2], ['query']),\n getPinnedMilestones: IDL.Func([IDL.Nat64], [IDL.Vec(Milestone)], ['query']),\n getPost: IDL.Func([IDL.Nat64], [Post], ['query']),\n getPostCount: IDL.Func([], [IDL.Nat64], ['query']),\n getPostWithUserData: IDL.Func(\n [IDL.Nat64],\n [IDL.Record({ post: Post, user: Profile })],\n ['query']\n ),\n getProfileListFromUserIdList: IDL.Func(\n [IDL.Vec(UserId)],\n [IDL.Vec(Profile)],\n ['query']\n ),\n getProfilesWhoLikedPost: IDL.Func(\n [ItemId, UserId, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(ResultProfiles)],\n ['query']\n ),\n getProfilesWhoLikedThreadPost: IDL.Func(\n [ItemId, UserId, ThreadPostId, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(ResultProfiles)],\n ['query']\n ),\n getReport: IDL.Func([IDL.Nat64], [Report], ['query']),\n getReportCount: IDL.Func([], [IDL.Nat64], ['query']),\n getReportStats: IDL.Func(\n [],\n [\n IDL.Record({\n total: IDL.Nat64,\n users: GeneralStats,\n comments: GeneralStats,\n posts: GeneralStats,\n }),\n ],\n ['query']\n ),\n getReportStatsV2: IDL.Func(\n [],\n [\n IDL.Record({\n total: IDL.Nat64,\n users: GeneralStats,\n comments: GeneralStats,\n experiences: GeneralStats,\n posts: GeneralStats,\n milestones: GeneralStats,\n }),\n ],\n ['query']\n ),\n getReports: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Bool],\n [IDL.Vec(Report)],\n ['query']\n ),\n getReportsWithUserData: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Bool],\n [IDL.Vec(IDL.Record({ report: Report, user: Profile }))],\n ['query']\n ),\n getSelf: IDL.Func([], [IDL.Opt(Profile)], ['query']),\n getSelfUserId: IDL.Func([], [IDL.Nat64], ['query']),\n getThread: IDL.Func([ItemId], [ResultOptimizedThread], ['query']),\n getThreadPost: IDL.Func(\n [ItemId, ThreadPostId],\n [ResultOptimizedThreadPost],\n ['query']\n ),\n getThreadPostLikes: IDL.Func(\n [ItemId, ThreadPostId, UserId, IDL.Nat64, IDL.Nat64],\n [ResultUserIds],\n ['query']\n ),\n getUnreadNotificationCount: IDL.Func([], [IDL.Nat64], ['query']),\n getUser: IDL.Func([IDL.Text], [IDL.Opt(Profile)], ['query']),\n getUserById: IDL.Func([IDL.Nat64], [IDL.Opt(Profile)], ['query']),\n getUserByUsername: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),\n getUserConnections: IDL.Func(\n [IDL.Nat64],\n [IDL.Vec(ConnectionRequest)],\n ['query']\n ),\n getUserCount: IDL.Func([], [IDL.Nat64], ['query']),\n getUserFeed: IDL.Func([IDL.Nat8, IDL.Nat8], [IDL.Vec(Post)], ['query']),\n getUserFeedWithUserData: IDL.Func(\n [IDL.Nat8, IDL.Nat8],\n [IDL.Vec(IDL.Record({ post: Post, user: Profile }))],\n ['query']\n ),\n getUserPendingConnections: IDL.Func(\n [IDL.Nat64],\n [IDL.Vec(ConnectionRequest)],\n ['query']\n ),\n getUserPosts: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Post)],\n ['query']\n ),\n getUserPostsWithUserData: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(IDL.Record({ post: Post, user: Profile }))],\n ['query']\n ),\n getUserTaggedFeed: IDL.Func(\n [IDL.Nat64, IDL.Nat32, IDL.Nat32],\n [IDL.Vec(Post)],\n ['query']\n ),\n getUserVerificationRequest: IDL.Func([], [VerificationRequest], ['query']),\n getUserVerificationRequestMaybe: IDL.Func(\n [],\n [IDL.Opt(VerificationRequest)],\n ['query']\n ),\n getUsernames: IDL.Func([IDL.Nat64], [IDL.Vec(IDL.Text)], ['query']),\n getUsers: IDL.Func(\n [IDL.Nat64, IDL.Nat64],\n [\n IDL.Vec(\n IDL.Record({\n key: KeyInfo,\n user: Profile,\n followed: IDL.Vec(IDL.Nat64),\n followers: IDL.Vec(IDL.Nat64),\n })\n ),\n ],\n ['query']\n ),\n getVerificationRequest: IDL.Func(\n [IDL.Nat64],\n [VerificationRequest],\n ['query']\n ),\n getVerificationRequests: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Bool],\n [IDL.Vec(VerificationRequest)],\n ['query']\n ),\n getVerificationRequestsWithUserData: IDL.Func(\n [IDL.Nat64, IDL.Nat64, IDL.Bool],\n [IDL.Vec(IDL.Record({ request: VerificationRequest, user: Profile }))],\n ['query']\n ),\n getVerificationStats: IDL.Func([], [GeneralStats], ['query']),\n getWordsKey: IDL.Func([IDL.Text], [IDL.Principal], ['query']),\n isConnected: IDL.Func([IDL.Nat64], [IDL.Bool], ['query']),\n isFollowedBy: IDL.Func([IDL.Nat64], [IDL.Bool], ['query']),\n isFollowing: IDL.Func([IDL.Nat64], [IDL.Bool], ['query']),\n isFollowingBatch: IDL.Func(\n [UserId, IDL.Vec(UserId)],\n [IDL.Vec(IDL.Bool)],\n ['query']\n ),\n isKeyTrusted: IDL.Func([IDL.Principal], [IDL.Bool], ['query']),\n isLimitEnabled: IDL.Func([], [IDL.Bool], ['query']),\n isRateLimited: IDL.Func([], [IDL.Bool], ['query']),\n isReported: IDL.Func([IDL.Nat64], [IDL.Bool], ['query']),\n isUserTrusted: IDL.Func([IDL.Nat64], [IDL.Bool], ['query']),\n likeItem: IDL.Func([ItemId], [ResultStatus], []),\n likeResource: IDL.Func([IDL.Nat64], [], []),\n markAllAsRead: IDL.Func([], [], []),\n markBadActor: IDL.Func([IDL.Nat64], [], []),\n migrateUsernames: IDL.Func(\n [IDL.Vec(IDL.Record({ username: IDL.Text, user_id: IDL.Nat64 }))],\n [],\n []\n ),\n newAnnouncement: IDL.Func([NewAnnouncement], [Announcement], []),\n newArticle: IDL.Func([NewArticle], [Article], []),\n newCommentV2: IDL.Func([ItemId, NewComment], [], []),\n newExperience: IDL.Func([NewExperience], [Experience], []),\n newMilestone: IDL.Func([NewMilestone], [Milestone], []),\n newPost: IDL.Func([NewPostV1], [Post], []),\n newPostV2: IDL.Func([NewPost], [Post], []),\n newPostV3: IDL.Func([NewPostRequestV2], [ResultPost], []),\n newReport: IDL.Func([NewReportV1], [], []),\n newReportV2: IDL.Func([NewReport], [], []),\n newReportV3: IDL.Func([NewReportV2], [ResultItemId], []),\n paginatedSearch: IDL.Func(\n [IDL.Text, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(Profile)],\n ['query']\n ),\n paginatedSearchWithFollowerData: IDL.Func(\n [IDL.Text, IDL.Nat64, IDL.Nat64],\n [IDL.Vec(ProfileWithFollowerData)],\n ['query']\n ),\n postLog: IDL.Func([LogLevel, ByteBuf], [LogCounter], []),\n postLogs: IDL.Func(\n [IDL.Vec(IDL.Tuple(LogLevel, ByteBuf))],\n [LogCounter],\n []\n ),\n postPollVote: IDL.Func([ItemId, IDL.Vec(OptionId)], [ResultStatus], []),\n postThread: IDL.Func([NewThreadRequest], [ResultItemId], []),\n postsRemaining: IDL.Func([], [IDL.Nat64], ['query']),\n processReport: IDL.Func([IDL.Nat64, IDL.Bool], [IDL.Nat64], []),\n provideAnnouncementFeedback: IDL.Func([IDL.Nat64, IDL.Text], [], []),\n provideAnnouncementFeedbackV2: IDL.Func(\n [IDL.Nat64, IDL.Text, IDL.Nat8],\n [],\n []\n ),\n removeAnnouncement: IDL.Func([IDL.Nat64], [], []),\n removeArticle: IDL.Func([IDL.Nat64], [], []),\n removeComment: IDL.Func([ItemId], [], []),\n removeConnection: IDL.Func([IDL.Nat64], [], []),\n removeExperience: IDL.Func([IDL.Nat64], [], []),\n removeFollower: IDL.Func([IDL.Nat64], [], []),\n removeItem: IDL.Func([ItemId], [ResultApiItem], []),\n removeKey: IDL.Func([IDL.Nat64, IDL.Principal], [IDL.Vec(KeyInfo)], []),\n removeMilestone: IDL.Func([IDL.Nat64], [], []),\n removeNotifications: IDL.Func(\n [IDL.Nat64, IDL.Opt(IDL.Nat64)],\n [IDL.Variant({ Ok: IDL.Null, Err: IDL.Text })],\n []\n ),\n removeNotificationsForAllUsers: IDL.Func(\n [IDL.Opt(IDL.Nat64)],\n [IDL.Variant({ Ok: IDL.Null, Err: IDL.Text })],\n []\n ),\n removeNotificationsForUsers: IDL.Func(\n [IDL.Vec(IDL.Nat64), IDL.Opt(IDL.Nat64)],\n [IDL.Variant({ Ok: IDL.Null, Err: IDL.Text })],\n []\n ),\n removePost: IDL.Func([IDL.Nat64], [], []),\n removeTeamBadge: IDL.Func([IDL.Nat64], [], []),\n removeThreadPost: IDL.Func([ItemId, ThreadPostId], [ResultApiItem], []),\n removeUser: IDL.Func([IDL.Nat64], [], []),\n removeUsername: IDL.Func([IDL.Text], [], []),\n requestConnectionWithUser: IDL.Func([IDL.Nat64], [ConnectionRequest], []),\n search: IDL.Func([IDL.Text], [IDL.Vec(Profile)], ['query']),\n searchFollowersFirst10StartWith: IDL.Func(\n [IDL.Nat64, IDL.Text],\n [IDL.Vec(IDL.Text)],\n ['query']\n ),\n searchFollowersProfileFirst10StartWith: IDL.Func(\n [IDL.Nat64, IDL.Text],\n [IDL.Vec(Profile)],\n ['query']\n ),\n searchFollowersProfileLiteFirst10StartWith: IDL.Func(\n [IDL.Nat64, IDL.Text],\n [IDL.Vec(FollowerProfileLite)],\n ['query']\n ),\n searchUserNamesForProfileWithFollowerData: IDL.Func(\n [UserId, IDL.Text, IDL.Nat64, IDL.Vec(UserId)],\n [ResultProfileWithFollowerData],\n ['query']\n ),\n searchWithFollowerData: IDL.Func(\n [IDL.Text],\n [IDL.Vec(ProfileWithFollowerData)],\n ['query']\n ),\n setArticleImage: IDL.Func([IDL.Nat64, Image], [], []),\n setGlobalLimit: IDL.Func([IDL.Text, IDL.Nat64, IDL.Nat64], [], []),\n setLimits: IDL.Func([IDL.Bool, IDL.Nat64], [], []),\n setNotificationsStatus: IDL.Func([IDL.Vec(IDL.Nat64)], [], []),\n setOfficial: IDL.Func([IDL.Text, IDL.Nat64], [], []),\n setUserLimit: IDL.Func([IDL.Nat64, IDL.Nat64], [], []),\n setWords: IDL.Func([IDL.Text, IDL.Principal], [], []),\n signup: IDL.Func([SignupRequestV1], [Profile], []),\n signupV2: IDL.Func([SignupRequest], [Profile], []),\n signupV3: IDL.Func([SignupRequestV2], [Profile], []),\n tokenRefresh: IDL.Func([], [], []),\n tokenRefreshStats: IDL.Func(\n [IDL.Nat64],\n [IDL.Vec(IDL.Tuple(IDL.Nat64, IDL.Nat64))],\n ['query']\n ),\n transferUsername: IDL.Func([IDL.Text, IDL.Nat64], [], []),\n trustKey: IDL.Func([IDL.Principal], [], []),\n unblockUser: IDL.Func([IDL.Nat64], [], []),\n unfollowUser: IDL.Func([IDL.Nat64], [], []),\n unlikeItem: IDL.Func([ItemId], [ResultStatus], []),\n unlikeResource: IDL.Func([IDL.Nat64], [], []),\n unmarkBadActor: IDL.Func([IDL.Nat64], [], []),\n untrustKey: IDL.Func([IDL.Principal], [], []),\n unverifyUser: IDL.Func([IDL.Nat64], [], []),\n updateAnnouncement: IDL.Func([IDL.Nat64, NewAnnouncement], [], []),\n updateArticle: IDL.Func([IDL.Nat64, NewArticle], [], []),\n updateCoverImage: IDL.Func([Image], [], []),\n updateDisplayName: IDL.Func([IDL.Nat64, IDL.Text], [], []),\n updateExperience: IDL.Func([IDL.Nat64, NewExperience], [Experience], []),\n updateExperienceCollab: IDL.Func([IDL.Nat64, IDL.Bool], [], []),\n updateExperienceCollabVisibility: IDL.Func([IDL.Nat64, IDL.Bool], [], []),\n updateMilestone: IDL.Func([IDL.Nat64, NewMilestone], [Milestone], []),\n updateMilestoneCollab: IDL.Func([IDL.Nat64, IDL.Bool], [], []),\n updateMilestoneCollabVisibility: IDL.Func([IDL.Nat64, IDL.Bool], [], []),\n updateNFTProfileImage: IDL.Func([IDL.Text], [], []),\n updatePinnedMilestone: IDL.Func([IDL.Nat64, IDL.Bool], [], []),\n updateProfile: IDL.Func([UpdateProfileRequestV1], [Profile], []),\n updateProfileImage: IDL.Func([Image], [], []),\n updateProfilePinnedPosts: IDL.Func([IDL.Vec(ItemId)], [ResultStatus], []),\n updateProfileV2: IDL.Func([UpdateProfileRequest], [Profile], []),\n updateProfileV3: IDL.Func([UpdateProfileRequestV2], [Profile], []),\n verificationRequest: IDL.Func([IDL.Text], [], []),\n verifyUser: IDL.Func([IDL.Nat64], [], []),\n verifyUsersByUsernames: IDL.Func(\n [IDL.Vec(IDL.Text)],\n [IDL.Vec(IDL.Nat64)],\n []\n ),\n });\n};\nexport const init = ({ IDL }) => {\n return [];\n};\n","export const idlFactory = ({ IDL }) => {\n const UserId = IDL.Nat64;\n const RoomId = IDL.Text;\n const ApiErrorKind = IDL.Variant({\n MsgPagninationLimitExceeded: IDL.Tuple(IDL.Nat64, IDL.Nat64),\n RoomNotBlocked: IDL.Null,\n ProfileNotFoundInCanister: IDL.Tuple(IDL.Text, UserId),\n UserHasNoRoom: UserId,\n IndexOutOfBound: IDL.Nat64,\n RoomAlreadyExists: RoomId,\n ForbiddenAnonymousCaller: IDL.Null,\n RoomNotFound: RoomId,\n MaxPacketSizeReached: IDL.Tuple(IDL.Nat64, IDL.Nat64),\n InterCanisterCallFailed: IDL.Text,\n MissingRoom: RoomId,\n UnauthorizedUserCall: IDL.Principal,\n UserNotAParticipantToThisRoom: IDL.Tuple(RoomId, UserId),\n MissingRoomForUsers: IDL.Tuple(UserId, UserId),\n RoomAlreadyBlocked: UserId,\n UserNotFound: UserId,\n CannotUnblockRoomBlockedBy: UserId,\n });\n const ApiResultRoomId = IDL.Variant({ Ok: RoomId, Err: ApiErrorKind });\n const MsgToken = IDL.Nat64;\n const MimeType = IDL.Variant({\n Gif: IDL.Null,\n Jpg: IDL.Null,\n Png: IDL.Null,\n String: IDL.Null,\n Video: IDL.Null,\n });\n const PostMsg = IDL.Record({\n token: MsgToken,\n content: IDL.Vec(IDL.Nat8),\n mime_type: MimeType,\n user_id: UserId,\n });\n const UnReadCounter = IDL.Nat32;\n const Image = IDL.Record({\n canister_id: IDL.Principal,\n image_id: IDL.Text,\n timestamp: IDL.Nat64,\n format: IDL.Text,\n });\n const Profile = IDL.Record({\n id: IDL.Nat64,\n title: IDL.Text,\n principal: IDL.Principal,\n username: IDL.Text,\n link: IDL.Text,\n cover: Image,\n badges: IDL.Vec(IDL.Record({ meta: IDL.Text, name: IDL.Text })),\n education: IDL.Text,\n description: IDL.Text,\n description_hashtags: IDL.Vec(IDL.Text),\n display_name: IDL.Text,\n company: IDL.Text,\n description_user_tags: IDL.Vec(\n IDL.Record({ username: IDL.Text, user_id: IDL.Nat64 })\n ),\n nft_url: IDL.Text,\n image: Image,\n location: IDL.Text,\n });\n const MsgId = IDL.Text;\n const MsgStatus = IDL.Variant({ Read: IDL.Null, UnRead: IDL.Null });\n const Content = IDL.Vec(IDL.Nat8);\n const TimeStamp = IDL.Nat64;\n const GetMsg = IDL.Record({\n id: MsgId,\n status: MsgStatus,\n content: Content,\n mime_type: MimeType,\n user_id: UserId,\n timestamp: TimeStamp,\n });\n const RoomHeader = IDL.Record({\n id: RoomId,\n participants: IDL.Vec(UserId),\n statuses: IDL.Vec(MsgStatus),\n msgs_len: IDL.Nat64,\n blocked_by: IDL.Opt(UserId),\n });\n const RoomCard = IDL.Record({\n is_following: IDL.Bool,\n number_of_unread_msgs: UnReadCounter,\n other_user_profile: Profile,\n last_msg: IDL.Opt(GetMsg),\n room_header: RoomHeader,\n });\n const ApiResultRoomCard = IDL.Variant({\n Ok: RoomCard,\n Err: ApiErrorKind,\n });\n const ProfileLite = IDL.Record({\n id: UserId,\n principal: IDL.Principal,\n user_name: IDL.Text,\n badges: IDL.Vec(IDL.Record({ meta: IDL.Text, name: IDL.Text })),\n display_name: IDL.Text,\n nft_url: IDL.Text,\n image: Image,\n });\n const RoomCardLite = IDL.Record({\n is_following: IDL.Bool,\n number_of_unread_msgs: UnReadCounter,\n other_user_profile: ProfileLite,\n last_msg: IDL.Opt(GetMsg),\n room_header: RoomHeader,\n });\n const ApiResultRoomCardLite = IDL.Variant({\n Ok: RoomCardLite,\n Err: ApiErrorKind,\n });\n const StatusCode = IDL.Null;\n const ApiResultStatus = IDL.Variant({\n Ok: StatusCode,\n Err: ApiErrorKind,\n });\n const ApiResultGetMsgList = IDL.Variant({\n Ok: IDL.Vec(GetMsg),\n Err: ApiErrorKind,\n });\n const ApiResultRoomHeaderList = IDL.Variant({\n Ok: IDL.Vec(RoomHeader),\n Err: ApiErrorKind,\n });\n const ApiResultRoomIdList = IDL.Variant({\n Ok: IDL.Vec(RoomId),\n Err: ApiErrorKind,\n });\n const ApiResultRoomCardLiteList = IDL.Variant({\n Ok: IDL.Vec(RoomCardLite),\n Err: ApiErrorKind,\n });\n const ApiResultRoomCardList = IDL.Variant({\n Ok: IDL.Vec(RoomCard),\n Err: ApiErrorKind,\n });\n const ApiResultProfileList = IDL.Variant({\n Ok: IDL.Vec(Profile),\n Err: ApiErrorKind,\n });\n const ApiResultProfileLiteList = IDL.Variant({\n Ok: IDL.Vec(ProfileLite),\n Err: ApiErrorKind,\n });\n const ApiResultRoomHeader = IDL.Variant({\n Ok: RoomHeader,\n Err: ApiErrorKind,\n });\n const ApiResultUnReadMsgCounter = IDL.Variant({\n Ok: UnReadCounter,\n Err: ApiErrorKind,\n });\n const NotificationCounter = IDL.Nat32;\n const PushMsgResponse = IDL.Record({\n id: MsgId,\n status: MsgStatus,\n token: MsgToken,\n content: Content,\n mime_type: MimeType,\n user_id: UserId,\n timestamp: TimeStamp,\n });\n const ApiResultPushMsgResponse = IDL.Variant({\n Ok: PushMsgResponse,\n Err: ApiErrorKind,\n });\n return IDL.Service({\n createRoomBetweenUserIds: IDL.Func([UserId, UserId], [ApiResultRoomId], []),\n createRoomBetweenUserIdsAndPushMsgReturnRoomCard: IDL.Func(\n [UserId, UserId, PostMsg],\n [ApiResultRoomCard],\n []\n ),\n createRoomBetweenUserIdsAndPushMsgReturnRoomCardLite: IDL.Func(\n [UserId, UserId, PostMsg],\n [ApiResultRoomCardLite],\n []\n ),\n deleteRoom: IDL.Func([RoomId], [ApiResultStatus], []),\n getAllMsgsInRoom: IDL.Func([RoomId], [ApiResultGetMsgList], ['query']),\n getAllRoomHeaderForUserId: IDL.Func(\n [UserId],\n [ApiResultRoomHeaderList],\n ['query']\n ),\n getAllUserRoomIdList: IDL.Func([UserId], [ApiResultRoomIdList], ['query']),\n getPaginatedMsgsInRoomForUserIds: IDL.Func(\n [UserId, UserId, IDL.Nat64, IDL.Nat64],\n [ApiResultGetMsgList],\n ['query']\n ),\n getPaginatedMsgsInRoomId: IDL.Func(\n [RoomId, IDL.Nat64, IDL.Nat64],\n [ApiResultGetMsgList],\n ['query']\n ),\n getPaginatedRoomCardLitesFromUserId: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64],\n [ApiResultRoomCardLiteList],\n ['query']\n ),\n getPaginatedRoomCardsFromUserId: IDL.Func(\n [UserId, IDL.Nat64, IDL.Nat64],\n [ApiResultRoomCardList],\n ['query']\n ),\n getProfileListFromUserIdList: IDL.Func(\n [IDL.Vec(UserId)],\n [ApiResultProfileList],\n ['query']\n ),\n getProfileLiteListFromUserIdList: IDL.Func(\n [IDL.Vec(UserId)],\n [ApiResultProfileLiteList],\n ['query']\n ),\n getRoomCardFromRoomIdForUserId: IDL.Func(\n [RoomId, UserId],\n [ApiResultRoomCard],\n ['query']\n ),\n getRoomCardLiteFromRoomIdForUserId: IDL.Func(\n [RoomId, UserId],\n [ApiResultRoomCardLite],\n ['query']\n ),\n getRoomHeaderFromRoomId: IDL.Func(\n [RoomId],\n [ApiResultRoomHeader],\n ['query']\n ),\n getRoomIdFromUserIds: IDL.Func(\n [UserId, UserId],\n [ApiResultRoomId],\n ['query']\n ),\n getUnReadMsgCounterForUserId: IDL.Func(\n [UserId],\n [ApiResultUnReadMsgCounter],\n ['query']\n ),\n getUnReadMsgNotificationCounterForUserId: IDL.Func(\n [UserId],\n [NotificationCounter],\n ['query']\n ),\n pushMessageToRoomId: IDL.Func(\n [RoomId, PostMsg],\n [ApiResultPushMsgResponse],\n []\n ),\n resetUnReadMsgNotificationForUserId: IDL.Func([UserId], [], []),\n setAllRoomStatusForUserId: IDL.Func(\n [UserId, MsgStatus],\n [ApiResultStatus],\n []\n ),\n setAllStatusForUserIdInRoomId: IDL.Func(\n [RoomId, UserId, MsgStatus],\n [ApiResultStatus],\n []\n ),\n setLastMsgsStatusForUserIdInRoomId: IDL.Func(\n [RoomId, UserId, MsgStatus],\n [ApiResultStatus],\n []\n ),\n setRoomToBlockFromRoomIdForUserId: IDL.Func(\n [RoomId, UserId],\n [ApiResultStatus],\n []\n ),\n setRoomToUnBlockFromRoomIdForUserId: IDL.Func(\n [RoomId, UserId],\n [ApiResultStatus],\n []\n ),\n });\n};\nexport const init = ({ IDL }) => {\n return [];\n};\n","export const idlFactory = ({ IDL }) => {\n const KeyValue = IDL.Tuple(IDL.Vec(IDL.Nat8), IDL.Vec(IDL.Nat8));\n return IDL.Service({\n append: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8)], [IDL.Nat64], []),\n batch_put: IDL.Func([IDL.Vec(KeyValue)], [IDL.Nat64], []),\n delete: IDL.Func([IDL.Text], [IDL.Nat64], []),\n get: IDL.Func([IDL.Text], [IDL.Opt(IDL.Vec(IDL.Nat8))], ['query']),\n get_random_key: IDL.Func([], [IDL.Text], ['query']),\n list: IDL.Func(\n [IDL.Vec(IDL.Nat8)],\n [IDL.Vec(IDL.Vec(IDL.Nat8))],\n ['query']\n ),\n lookup_data_bucket_for_get: IDL.Func(\n [IDL.Text],\n [IDL.Opt(IDL.Text)],\n ['query']\n ),\n lookup_data_bucket_for_put: IDL.Func(\n [IDL.Text],\n [IDL.Opt(IDL.Text)],\n ['query']\n ),\n maintenance: IDL.Func([], [IDL.Text], []),\n put: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8)], [IDL.Nat64], []),\n set_data_bucket_canister_wasm_binary: IDL.Func([IDL.Vec(IDL.Nat8)], [], []),\n set_used_bytes_threshold: IDL.Func([IDL.Nat32], [], []),\n status: IDL.Func([], [IDL.Text], ['query']),\n });\n};\nconst init = ({ IDL }) => {\n return [];\n};\n","export const idlFactory = ({ IDL }) => {\n const AssetType = IDL.Variant({ Static: IDL.Null, Model: IDL.Null });\n const TokenIndex = IDL.Nat32;\n const AssetInfo = IDL.Record({ url: IDL.Text, assetName: IDL.Text });\n const TokenIdentifier = IDL.Text;\n const AccountIdentifier = IDL.Text;\n const User = IDL.Variant({\n principal: IDL.Principal,\n address: AccountIdentifier,\n });\n const AllowanceRequest = IDL.Record({\n token: TokenIdentifier,\n owner: User,\n spender: IDL.Principal,\n });\n const Balance__1 = IDL.Nat;\n const CommonError = IDL.Variant({\n InvalidToken: TokenIdentifier,\n Other: IDL.Text,\n });\n const Result__1_2 = IDL.Variant({ ok: Balance__1, err: CommonError });\n const SubAccount = IDL.Vec(IDL.Nat8);\n const Balance = IDL.Nat;\n const ApproveRequest = IDL.Record({\n token: TokenIdentifier,\n subaccount: IDL.Opt(SubAccount),\n allowance: Balance,\n spender: IDL.Principal,\n });\n const BalanceRequest = IDL.Record({\n token: TokenIdentifier,\n user: User,\n });\n const CommonError__1 = IDL.Variant({\n InvalidToken: TokenIdentifier,\n Other: IDL.Text,\n });\n const BalanceResponse = IDL.Variant({\n ok: Balance,\n err: CommonError__1,\n });\n const Memo = IDL.Vec(IDL.Nat8);\n const TransferRequest = IDL.Record({\n to: User,\n token: TokenIdentifier,\n notify: IDL.Bool,\n from: User,\n memo: Memo,\n subaccount: IDL.Opt(SubAccount),\n amount: Balance,\n });\n const TransferResponse = IDL.Variant({\n ok: Balance,\n err: IDL.Variant({\n CannotNotify: AccountIdentifier,\n InsufficientBalance: IDL.Null,\n InvalidToken: TokenIdentifier,\n Rejected: IDL.Null,\n Unauthorized: AccountIdentifier,\n Other: IDL.Text,\n }),\n });\n const TokenIdentifier__1 = IDL.Text;\n const AccountIdentifier__1 = IDL.Text;\n const Result__1_1 = IDL.Variant({\n ok: AccountIdentifier__1,\n err: CommonError,\n });\n const Extension = IDL.Text;\n const Metadata = IDL.Variant({\n fungible: IDL.Record({\n decimals: IDL.Nat8,\n metadata: IDL.Opt(IDL.Vec(IDL.Nat8)),\n name: IDL.Text,\n symbol: IDL.Text,\n }),\n nonfungible: IDL.Record({ metadata: IDL.Opt(IDL.Vec(IDL.Nat8)) }),\n });\n const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);\n const HttpRequest = IDL.Record({\n url: IDL.Text,\n method: IDL.Text,\n body: IDL.Vec(IDL.Nat8),\n headers: IDL.Vec(HeaderField),\n });\n const HttpResponse = IDL.Record({\n body: IDL.Vec(IDL.Nat8),\n headers: IDL.Vec(HeaderField),\n status_code: IDL.Nat16,\n });\n const Result__1 = IDL.Variant({ ok: Metadata, err: CommonError });\n const Result_2 = IDL.Variant({ ok: Balance__1, err: CommonError });\n const Result_1 = IDL.Variant({\n ok: IDL.Vec(TokenIndex),\n err: CommonError,\n });\n const Time = IDL.Int;\n const Listing = IDL.Record({\n locked: IDL.Opt(Time),\n seller: IDL.Principal,\n price: IDL.Nat64,\n });\n const Result = IDL.Variant({\n ok: IDL.Vec(\n IDL.Tuple(TokenIndex, IDL.Opt(Listing), IDL.Opt(IDL.Vec(IDL.Nat8)))\n ),\n err: CommonError,\n });\n const ERC721 = IDL.Service({\n acceptCycles: IDL.Func([], [], []),\n addAssetURLMany: IDL.Func(\n [IDL.Vec(IDL.Tuple(AssetType, TokenIndex, AssetInfo))],\n [],\n ['oneway']\n ),\n addAssetsType: IDL.Func([IDL.Text], [], ['oneway']),\n addJSONMany: IDL.Func(\n [IDL.Vec(IDL.Tuple(TokenIndex, IDL.Text))],\n [],\n ['oneway']\n ),\n addMulti: IDL.Func([IDL.Vec(TokenIndex)], [], ['oneway']),\n addThumbnailMany: IDL.Func(\n [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Nat8)))],\n [],\n []\n ),\n allowance: IDL.Func([AllowanceRequest], [Result__1_2], ['query']),\n approve: IDL.Func([ApproveRequest], [IDL.Bool], []),\n approveAll: IDL.Func([IDL.Vec(ApproveRequest)], [IDL.Vec(TokenIndex)], []),\n availableCycles: IDL.Func([], [IDL.Nat], ['query']),\n balance: IDL.Func([BalanceRequest], [BalanceResponse], ['query']),\n batchMintNFT: IDL.Func([IDL.Vec(IDL.Principal)], [IDL.Vec(TokenIndex)], []),\n batchTransfer: IDL.Func(\n [IDL.Vec(TransferRequest)],\n [IDL.Vec(TransferResponse)],\n []\n ),\n bearer: IDL.Func([TokenIdentifier__1], [Result__1_1], ['query']),\n caller: IDL.Func([], [IDL.Text, IDL.Text, IDL.Bool, IDL.Bool], []),\n clearAssetURL: IDL.Func([], [], ['oneway']),\n clearJSON: IDL.Func([], [], ['oneway']),\n deleteAssetsType: IDL.Func([IDL.Text], [], ['oneway']),\n extensions: IDL.Func([], [IDL.Vec(Extension)], ['query']),\n getAllowances: IDL.Func(\n [],\n [IDL.Vec(IDL.Tuple(TokenIndex, IDL.Principal))],\n ['query']\n ),\n getAssetURLByIndex: IDL.Func([TokenIndex], [IDL.Text], ['query']),\n getAssetURLByTokenId: IDL.Func([TokenIdentifier__1], [IDL.Text], ['query']),\n getAssetsType: IDL.Func([], [IDL.Vec(IDL.Text)], []),\n getCapRoot: IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),\n getJSON: IDL.Func([TokenIndex], [IDL.Text], ['query']),\n getMinter: IDL.Func([], [IDL.Principal], ['query']),\n getMultiAssetURLByIndex: IDL.Func(\n [TokenIndex],\n [\n IDL.Record({\n Static: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),\n Model: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),\n }),\n ],\n ['query']\n ),\n getMultiAssetURLByTokenID: IDL.Func(\n [TokenIdentifier__1],\n [\n IDL.Record({\n Static: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),\n Model: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),\n }),\n ],\n ['query']\n ),\n getProperties: IDL.Func(\n [],\n [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat))))],\n ['query']\n ),\n getRegistry: IDL.Func(\n [],\n [IDL.Vec(IDL.Tuple(TokenIndex, AccountIdentifier__1))],\n ['query']\n ),\n getRegistryOriginal: IDL.Func(\n [],\n [IDL.Vec(IDL.Tuple(TokenIndex, AccountIdentifier__1))],\n ['query']\n ),\n getThumbnailKeys: IDL.Func([], [IDL.Vec(IDL.Text)], ['query']),\n getTokens: IDL.Func(\n [],\n [IDL.Vec(IDL.Tuple(TokenIndex, Metadata))],\n ['query']\n ),\n getTokensByIds: IDL.Func(\n [IDL.Vec(TokenIndex)],\n [IDL.Vec(IDL.Tuple(TokenIndex, Metadata))],\n ['query']\n ),\n getTokensByProperties: IDL.Func(\n [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Text)))],\n [IDL.Vec(IDL.Tuple(TokenIndex, Metadata))],\n ['query']\n ),\n http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),\n initCap: IDL.Func([], [], []),\n initproperties: IDL.Func([], [], []),\n isSuspended: IDL.Func([], [IDL.Bool], ['query']),\n metadata: IDL.Func([TokenIdentifier__1], [Result__1], ['query']),\n mintNFT: IDL.Func([IDL.Principal], [TokenIndex], []),\n rmMulti: IDL.Func([TokenIndex], [], ['oneway']),\n setMinter: IDL.Func([IDL.Principal], [], []),\n setSuspend: IDL.Func([IDL.Bool], [], ['oneway']),\n supply: IDL.Func([TokenIdentifier__1], [Result_2], ['query']),\n tokens: IDL.Func([AccountIdentifier__1], [Result_1], ['query']),\n tokens_ext: IDL.Func([AccountIdentifier__1], [Result], ['query']),\n transfer: IDL.Func([TransferRequest], [TransferResponse], []),\n transferDistrikt: IDL.Func([IDL.Text, IDL.Text, IDL.Nat32], [IDL.Bool], []),\n updateMetadataAndProperties: IDL.Func([], [], ['oneway']),\n });\n return ERC721;\n};\nexport const init = ({ IDL }) => {\n return [IDL.Principal];\n};\n","import {\n Actor,\n AnonymousIdentity,\n HttpAgent,\n HttpAgentRequest,\n HttpAgentRequestTransformFn,\n} from '@dfinity/agent';\n\nimport { idlFactory as actorInterfaceMain } from './main/main.did';\nimport { idlFactory as actorInterfaceMessaging } from './messaging/messaging.did';\nimport { idlFactory as actorInterfaceAssets } from './assets/assets.did';\nimport { idlFactory as actorInterfaceNft } from './nft/nft.did';\n\nimport type { _SERVICE as MainServiceInterface } from './main/main.did';\nimport type { _SERVICE as MessagingServiceInterface } from './messaging/messaging.did';\nimport type { _SERVICE as AssetServiceInterface } from './assets/assets.did';\nimport type { _SERVICE as NFTServiceInterface } from './nft/nft.did';\n\nexport * from './index.d';\n\nexport const LOCALSTORAGE_KEY_ID = 'ic-identity';\nexport const LOCAL_KEY_ID = 'ic-identity';\n\nlet actor: MainServiceInterface;\nlet messagingActor: MessagingServiceInterface | undefined;\nlet assetsActor: AssetServiceInterface | undefined;\nlet nftActor: NFTServiceInterface | undefined;\n\nconst HEARTBEAT_METHODS = [\n 'getUserFeedWithUserData',\n 'getDiscoveryFeedWithUserData',\n 'getArticles',\n 'getArticleWithUserData',\n];\n\nexport function makeLivenessHeartbeatTransform(): HttpAgentRequestTransformFn {\n return async (request: HttpAgentRequest) => {\n if (\n request.body &&\n request.body.method_name &&\n HEARTBEAT_METHODS.includes(request.body.method_name)\n ) {\n //console.log('send heartbeat');\n }\n };\n}\n\nexport const createActor = (identity) => {\n let agent;\n\n if (process.env.ENV_NAME !== 'production') {\n agent = new HttpAgent({\n identity,\n host: process.env.REACT_APP_MAIN_CLUSTER_HOST,\n retryTimes: 1,\n });\n } else {\n agent = new HttpAgent({\n identity,\n retryTimes: 1,\n });\n }\n\n actor = Actor.createActor(actorInterfaceMain, {\n canisterId: process.env.REACT_APP_MAIN_CANISTER_ID,\n agent,\n });\n\n assetsActor = Actor.createActor(actorInterfaceAssets, {\n canisterId: process.env.REACT_APP_ASSETS_CANISTER_ID,\n agent,\n });\n\n // In case an identity is passed, create messaging actor as well\n if (!(identity instanceof AnonymousIdentity)) {\n messagingActor = Actor.createActor(\n actorInterfaceMessaging,\n {\n canisterId: process.env.REACT_APP_MESSAGING_CANISTER_ID,\n agent,\n }\n );\n }\n\n nftActor = Actor.createActor(actorInterfaceNft, {\n canisterId: process.env.REACT_APP_NFT_CANISTER_ID,\n agent,\n });\n\n return actor;\n};\n\nexport const setActor = (actorInstance) => {\n actor = actorInstance;\n};\n\nexport { actor as default };\nexport {\n actor as mainApi,\n messagingActor as messagingApi,\n assetsActor as assetsApi,\n nftActor as nftApi,\n};\n","import { nftApi } from 'client';\nimport { useMemo } from 'react';\nimport { useQuery, useQueryClient } from 'react-query';\nimport { encodeTokenId } from '../NftDropzone/utils/nftUtils';\n\n// get nft registry\n// used on global level and cache data are reused in other hooks\n// that's why we enable stale time and increase cache time\nexport function useGetNftRegistry() {\n return useQuery(['getRegistry'], async () => nftApi.getRegistry(), {\n enabled: !!nftApi,\n staleTime: 5 * 60 * 1000,\n cacheTime: 30 * 60 * 1000,\n });\n}\n\nexport function useGetAddressByNftUrl(nftIndex?: number, nftURL = '') {\n return useQuery(\n ['getMultiAssetURLByIndex', nftIndex, nftURL],\n async () => {\n if (!nftURL.includes(process.env.REACT_APP_NFT_CANISTER_ID))\n return undefined;\n const { Static } = await nftApi.getMultiAssetURLByIndex(nftIndex);\n const result = { POD: '', HELMET: '' };\n Static.forEach((item) => {\n result[item[0]] = item[1];\n });\n return result;\n },\n {\n enabled: !!nftIndex,\n staleTime: 30 * 60 * 1000, // using long stale time as nft url is not changing\n cacheTime: 30 * 60 * 1000,\n }\n );\n}\n","import React from 'react';\n\ninterface SwitchWrapperProps {\n condition: boolean;\n wrappers: {\n true: (children: JSX.Element) => JSX.Element;\n false: (children: JSX.Element) => JSX.Element;\n };\n children: JSX.Element;\n}\n\nexport const SwitchWrapper = ({\n condition,\n wrappers,\n children,\n}: SwitchWrapperProps) =>\n condition ? wrappers.true(children) : wrappers.false(children);\n\ntype SwitchWrapperPropsOmitted = 'wrappers';\n\ninterface ConditionalWrapperProps\n extends Omit {\n wrapper: (children: JSX.Element) => JSX.Element;\n}\n\nexport const ConditionalWrapper = ({\n condition,\n wrapper,\n children,\n}: ConditionalWrapperProps) => (\n children,\n }}\n >\n {children}\n \n);\n","import * as React from 'react';\nimport Typography from '@mui/material/Typography';\nimport { IconButton } from '@mui/material';\nimport { ShareIcon, CopyIcon } from '../icons';\nimport getExternalUrl from 'utils/getExternalUrl';\nimport { sendHeartbeat } from 'utils/heartbeat';\nimport { useCopyBtnStyles } from './styles';\nimport { Alert } from 'components';\n\ninterface Props {\n disabled?: boolean;\n url: string;\n variant?: 'copy-link' | 'copy-text' | 'copy-text-button' | 'copy-id';\n useExternalUrl?: boolean;\n copyText?: string;\n toastMessage?: string;\n}\n\nconst CopyButton = ({\n disabled,\n url,\n variant,\n useExternalUrl = true,\n copyText = '',\n toastMessage = 'Copied to Clipboard',\n}: Props) => {\n const classes = useCopyBtnStyles();\n const [tooltipOpen, toggleTooltip] = React.useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(useExternalUrl ? getExternalUrl(url) : url);\n sendHeartbeat();\n toggleTooltip(true);\n };\n\n return (\n <>\n {tooltipOpen ? (\n toggleTooltip(false)}\n />\n ) : null}\n {variant === 'copy-id' ? (\n \n ) : (\n \n {variant === 'copy-link' ||\n variant === 'copy-text' ||\n variant === 'copy-text-button' ? (\n \n ) : (\n \n )}\n \n )}\n \n );\n};\n\nexport default CopyButton;\n","import {\n InfiniteData,\n QueryKey,\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from 'react-query';\nimport { Principal } from '@dfinity/principal';\n\nimport api, {\n ApiItemFeed,\n Image,\n Profile,\n UpdateProfileRequestV2,\n assetsApi,\n} from 'client';\nimport { INITIAL_ITEMS_LIMIT } from 'constants/feed';\nimport { createImageId } from '../utils/profile';\nimport { extractApiDataOrThrow, flattenInfiniteData } from 'utils';\nimport { extractPostItemKey } from 'pages/post/utils/postItem';\n\nexport const getProfilePinnedPostsQueryKey: QueryKey = 'getProfilePinnedPosts';\n\nexport const useGetProfilePinnedPosts = (userId?: bigint) =>\n useQuery(\n [getProfilePinnedPostsQueryKey, userId],\n async () => {\n const res = await api.getPinnedItems(userId);\n return extractApiDataOrThrow(res)?.items;\n },\n {\n enabled: !!userId,\n initialData: [],\n }\n );\n\nexport const getPaginatedOptimizedProfileFeedQueryKey: QueryKey =\n 'getPaginatedOptimizedProfileFeedV2';\n\nexport function useGetPaginatedOptimizedProfileFeed(userId?: bigint) {\n const queryClient = useQueryClient();\n\n return useInfiniteQuery(\n [getPaginatedOptimizedProfileFeedQueryKey, userId],\n async ({ pageParam = 0 }) => {\n const auth = queryClient.getQueryData(['getSelf']);\n const data = queryClient.getQueryData<\n InfiniteData>\n >([getPaginatedOptimizedProfileFeedQueryKey, userId], { exact: true });\n // used to get fetched ids to pass to getPaginatedOptimizedUserFeed on load next\n // getting ids from cached data & only for previoues pages\n const previousIds = flattenInfiniteData(data, pageParam as number)\n .filter((item: ApiItemFeed) => !!item)\n .map((p) => extractPostItemKey(p));\n\n const res = await api.getPaginatedOptimizedProfileFeedV2(\n auth?.id || 0n,\n userId,\n BigInt(pageParam * INITIAL_ITEMS_LIMIT),\n BigInt(INITIAL_ITEMS_LIMIT),\n previousIds\n );\n\n return extractApiDataOrThrow(res)?.items;\n },\n {\n enabled: !!userId,\n getNextPageParam: (page, pages) =>\n page && page.length >= INITIAL_ITEMS_LIMIT ? pages.length : undefined,\n }\n );\n}\n\ninterface IPutAssetArgs {\n buffer: string;\n userId?: bigint;\n imageId?: string;\n}\n\nexport function usePutAsset() {\n return useMutation(async ({ buffer, userId, imageId }: IPutAssetArgs) => {\n const imageIdToUse = imageId || createImageId(userId);\n const photo = buffer.split(',')[1];\n\n const _base64ToArrayBuffer = (base64) => {\n const binary_string = atob(base64);\n const len = binary_string.length;\n const bytes = [];\n for (let i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n };\n\n return assetsApi.put(imageIdToUse, _base64ToArrayBuffer(photo));\n });\n}\n\ninterface IUpdateCoverImageArgs {\n newCover: string;\n oldCover?: string;\n userName?: string;\n}\n\nexport function useUpdateCoverImage() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ newCover, oldCover }: IUpdateCoverImageArgs) => {\n await api.updateCoverImage({\n canister_id: Principal.fromText(\n process.env.REACT_APP_ASSETS_CANISTER_ID\n ),\n image_id: newCover,\n timestamp: 0n,\n format: 'png',\n });\n\n if (oldCover) {\n await assetsApi.delete(oldCover);\n }\n },\n {\n onSuccess: (_, { userName }) => {\n queryClient.invalidateQueries('getSelf');\n userName && queryClient.invalidateQueries(['getUser', userName]);\n userName &&\n queryClient.invalidateQueries(['getUserByUsername', userName]);\n },\n }\n );\n}\n\ninterface IUpdateProfileArgs {\n values: UpdateProfileRequestV2;\n userName?: string;\n}\n\nexport function useUpdateProfile() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ values }: IUpdateProfileArgs) => {\n await api.updateProfileV3(values);\n },\n {\n onSuccess: (_, { userName }) => {\n queryClient.invalidateQueries('getSelf');\n userName && queryClient.invalidateQueries(['getUser', userName]);\n userName &&\n queryClient.invalidateQueries(['getUserByUsername', userName]);\n },\n }\n );\n}\n\ninterface IUpdateProfileImageArgs {\n image: Image;\n user?: Profile;\n}\n\nexport function useUpdateProfileImage() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ image }: IUpdateProfileImageArgs) => api.updateProfileImage(image),\n {\n onSuccess: async (_, { user }) => {\n await api.updateNFTProfileImage('');\n\n if (user?.image?.image_id) {\n await assetsApi.delete(user?.image.image_id);\n }\n\n queryClient.invalidateQueries('getSelf');\n if (user) {\n queryClient.invalidateQueries(['getUser', user.username]);\n // TODO instead of invalidating all queries, update the user's profile image in cache\n queryClient.invalidateQueries(['getUserPostsWithUserData', user.id]);\n }\n },\n }\n );\n}\n\ninterface IUpdateNFTProfileImageArgs {\n nftURL: string;\n userName?: string;\n}\n\nexport function useUpdateNFTProfileImage() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ nftURL }: IUpdateNFTProfileImageArgs) =>\n api.updateNFTProfileImage(nftURL),\n {\n onSuccess: (_, { userName }) => {\n queryClient.invalidateQueries('getSelf');\n userName && queryClient.invalidateQueries(['getUser', userName]);\n },\n }\n );\n}\n","// extract nft index from nft_url\nexport function extractNftIndex(nftUrl: string) {\n try {\n const parsedNftUrl = new URL(nftUrl);\n const urlParams = new URLSearchParams(parsedNftUrl?.search);\n if (urlParams && urlParams.has('index')) {\n return +urlParams.get('index') - 1;\n }\n } catch (e) {\n console.error(e);\n }\n\n return undefined;\n}\n\n// extract nft index and assets type from nftUrl\nexport function extractNftIndexIdAndAssetsType(nftUrl: string) {\n try {\n const parsedNftUrl = new URL(nftUrl);\n const urlParams = new URLSearchParams(parsedNftUrl?.search);\n if (urlParams) {\n return {\n index: +(urlParams.get('index') || 0) - 1,\n assetsType: urlParams.get('assetsType') || 'POD',\n tokenid: urlParams.get('tokenid') || '',\n };\n }\n } catch (e) {}\n return {\n index: -1,\n assetsType: '',\n tokenid: '',\n };\n}\n","const getExternalUrl = (path: string) => {\n const url = process.env.REACT_APP_EXTERNAL_URL || location.origin;\n\n return `${url}${path}`;\n};\n\nexport default getExternalUrl;\n","// Set how many items should be displayed on home page feed\nexport const INITIAL_ITEMS_LIMIT = 20;\n\n// Set how many items should be fetched with \"show more\"\nexport const LOAD_ITEMS_LIMIT = 20;\n","import { MAX_POLL_DURATION, MIN_POLL_DURATION } from '../../../constants';\nimport dayjs from 'dayjs';\nimport duration, { Duration } from 'dayjs/plugin/duration';\nimport { TimeUnit, timeUnits } from 'types';\n\ndayjs.extend(duration);\n\nexport const getHigherUnits = (unit: TimeUnit) =>\n getRelatedUnits(unit, 'higher');\nexport const getLowerUnits = (unit: TimeUnit) => getRelatedUnits(unit, 'lower');\n\nexport type TimeUnitRelation = 'higher' | 'lower';\n\nconst getRelatedUnits = (unit: TimeUnit, relation: TimeUnitRelation) => {\n const currentUnitIndex = timeUnits.findIndex(\n (currentUnit: TimeUnit) => currentUnit === unit\n );\n return timeUnits.filter(\n (_: TimeUnit, index: number) =>\n (relation === 'higher' && index < currentUnitIndex) ||\n (relation === 'lower' && index > currentUnitIndex)\n );\n};\n\nexport const checkAllLowerThanBound = (\n units: Array,\n targetUnit: TimeUnit,\n duration: Duration\n) => checkAllCompareToBound(units, targetUnit, duration, 'lower');\nexport const checkAllHigherThanBound = (\n units: Array,\n targetUnit: TimeUnit,\n duration: Duration\n) => checkAllCompareToBound(units, targetUnit, duration, 'higher');\n\nconst checkAllCompareToBound = (\n units: Array,\n targetUnit: TimeUnit,\n duration: Duration,\n relation: TimeUnitRelation\n) =>\n !units\n .filter((currentUnit: TimeUnit) => currentUnit !== targetUnit)\n .find(\n (currentUnit: TimeUnit) =>\n (relation === 'lower' &&\n duration[currentUnit]() > MIN_POLL_DURATION[currentUnit]()) ||\n (relation === 'higher' &&\n duration[currentUnit]() < MAX_POLL_DURATION[currentUnit]())\n );\n","export { default } from './Search';\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useCopyBtnStyles = makeStyles((theme) => ({\n tooltipStyle: {\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(12),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2.5),\n paddingRight: theme.spacing(2.5),\n },\n tooltipArrow: {\n color: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n },\n tooltipIcon: {\n height: 12,\n width: 12,\n },\n tooltipText: {\n fontSize: theme.typography.pxToRem(12),\n marginLeft: theme.spacing(1.5),\n },\n icon: {\n height: 16,\n width: 16,\n color: theme.palette.text.secondary,\n },\n copyIcon: {\n height: 18,\n width: 16,\n color: theme.palette.text.secondary,\n marginLeft: theme.spacing(0.75),\n },\n centeredContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n copyTextIconButton: {\n boxSizing: 'border-box',\n width: '40px',\n border: '1px solid',\n borderColor: theme.palette.colors.primary,\n borderRadius: '8px',\n marginLeft: theme.spacing(1),\n '& svg': {\n color: theme.palette.colors.primary,\n },\n },\n iconButton: {\n padding: theme.spacing(1),\n },\n linkButton: {\n border: 0,\n background: 'none',\n paddingBottom: theme.spacing(3),\n paddingTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n color: theme.palette.colors.primary,\n cursor: 'pointer',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n linkButtonContainer: {\n display: 'flex',\n paddingRight: theme.spacing(5),\n },\n}));\n\nexport const useRemoveFollowerStyles = makeStyles((theme) => ({\n button: {\n fontSize: theme.typography.pxToRem(11),\n marginLeft: theme.spacing(1),\n '& .hover': {\n display: 'none',\n },\n '&:hover': {\n '& .active': {\n display: 'none',\n },\n '& .hover': {\n display: 'inline-block',\n },\n },\n },\n}));\n\nexport const useSelectMenuStyles = makeStyles((theme) => ({\n checkIcon: {\n width: theme.spacing(2),\n right: theme.spacing(2),\n },\n menuPaper: {\n marginTop: theme.spacing(1),\n },\n menuItem: {\n width: 200,\n height: 40,\n },\n selectedMenuItem: {\n width: 200,\n background: theme.palette.colors.ui_04,\n marginTop: theme.spacing(-0.5),\n },\n selectedDangerMenuItem: {\n width: 200,\n background: theme.palette.colors.danger_ghost_pressed,\n color: theme.palette.colors.danger,\n marginTop: theme.spacing(-0.5),\n '&:hover': {\n background: `${theme.palette.colors.danger_ghost_hover} !important`,\n },\n },\n dangerMenuItem: {\n width: 200,\n height: 40,\n color: theme.palette.colors.danger,\n '&:hover': {\n background: `${theme.palette.colors.danger_ghost_hover} !important`,\n },\n },\n dangerIcon: {\n color: theme.palette.colors.danger,\n marginRight: theme.spacing(2),\n },\n icon: {\n marginRight: theme.spacing(2),\n },\n openRoundButton: {\n background: theme.palette.colors.ui_04,\n },\n}));\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { IconButton, SvgIcon, DialogTitle, Typography } from '@mui/material';\nimport { Close, Warning } from '../icons';\n\nconst useStyles = makeStyles((theme) => ({\n closeButton: {\n color: theme.palette.text.secondary,\n },\n closeButtonContainer: {\n justifyContent: 'flex-end !important',\n alignSelf: 'flex-end',\n padding: theme.spacing(1),\n paddingBottom: 0,\n },\n icon: {\n height: 16,\n width: 16,\n },\n titleContainer: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n heading: {\n fontSize: theme.typography.pxToRem(14),\n textTransform: 'uppercase',\n fontWeight: 600,\n color: theme.palette.text.primary,\n },\n subheading: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.primary,\n opacity: 0.44,\n },\n title: {\n display: 'flex',\n alignItems: 'center',\n },\n largeIcon: {\n height: 24,\n width: 24,\n },\n}));\n\ninterface Props {\n handleClose: () => void;\n title?: string;\n subtitle?: string;\n warning?: boolean;\n location?: string;\n disabled?: boolean;\n}\n\nconst DialogHeader = ({\n handleClose,\n title = '',\n subtitle = '',\n warning = false,\n location = '',\n disabled = false,\n}: Props) => {\n const classes = useStyles();\n\n return (\n <>\n \n \n \n \n \n {(title || subtitle) && (\n \n
\n {warning && (\n \n )}\n \n {title}\n \n
\n \n {subtitle}\n \n \n )}\n \n );\n};\n\nexport default DialogHeader;\n","import { FormikConfig, useFormik } from 'formik';\nimport { PollInfo } from './poll';\nimport { PostInfo } from './post';\nimport { ThreadInfo } from './thread';\n\nconst fakeFunctionPoll = (arg: FormikConfig) =>\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useFormik(arg);\nexport type PollFormik = ReturnType;\n\nconst fakeFunctionPost = (arg: FormikConfig) =>\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useFormik(arg);\nexport type PostFormik = ReturnType;\n\nconst fakeFunctionThread = (arg: FormikConfig) =>\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useFormik(arg);\nexport type ThreadFormik = ReturnType;\n\nexport type FormikErrors = Partial<\n {\n [key in keyof T]: any;\n }\n>;\n","import { Duration } from 'dayjs/plugin/duration';\nimport { EditorState } from 'draft-js';\n\nexport const timeUnits = ['days', 'hours', 'minutes'] as const;\nexport type TimeUnit = typeof timeUnits[number];\n\nexport interface UnitConfig {\n unit: TimeUnit;\n cap: number;\n}\n\nexport interface PollInfo {\n choices: Array;\n choicesVisible: Array;\n isMultichoice: boolean;\n pollLength: Duration;\n}\n","/**\n * encodes string to array of UTF-8 bytes\n */\nexport function stringToBytesArray(str: string): Array {\n const utf8Encode = new TextEncoder();\n return Array.from(utf8Encode.encode(str));\n}\n\n/**\n * decodes array of UTF-8 bytes to string\n */\nexport function bytesArrayToString(array: Array) {\n const utf8decoder = new TextDecoder();\n return utf8decoder.decode(new Uint8Array(array));\n}\n\n/**\n * checks, if input string is a valid url\n */\nexport function isUrl(text: string) {\n const regExp = /^((https?:www.)|(https?:\\/\\/)|(www.))[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9]{1,6}(\\/[-a-zA-Z0-9()@:%_+.~#?&\\/=]*)?$/;\n return regExp.test(text);\n}\n","import { List } from 'immutable';\nimport { EmojiSuggestionsState } from '@draft-js-plugins/emoji';\nimport { CSSProperties } from 'react';\n\nfunction getRelativeParent(element: HTMLElement | null): HTMLElement | null {\n if (!element) {\n return null;\n }\n\n const position = window\n .getComputedStyle(element)\n .getPropertyValue('position');\n if (position !== 'static') {\n return element;\n }\n\n return getRelativeParent(element.parentElement);\n}\n\ninterface RelativeRect {\n scrollLeft: number;\n scrollTop: number;\n left: number;\n top: number;\n}\n\ninterface PositionSuggestionsParams {\n decoratorRect: ClientRect;\n popover: Element;\n props: Record;\n state: EmojiSuggestionsState;\n filteredEmojis: List;\n}\n\nconst SUGGEST_POPUP_PADDING = 40;\n\n// Clone positionSuggestion function of the one used in @draft-js-plugins/emoji\n// with the addition of checking if popup will be fully visible\nexport function positionSuggestions({\n decoratorRect,\n popover,\n state,\n filteredEmojis,\n}: PositionSuggestionsParams): CSSProperties {\n const relativeParent = getRelativeParent(popover.parentElement);\n let relativeRect: RelativeRect;\n\n if (relativeParent) {\n const relativeParentRect = relativeParent.getBoundingClientRect();\n\n relativeRect = {\n scrollLeft: relativeParent.scrollLeft,\n scrollTop: relativeParent.scrollTop,\n left: decoratorRect.left - relativeParentRect.left,\n top: decoratorRect.top - relativeParentRect.top,\n };\n } else {\n relativeRect = {\n scrollLeft: window.pageXOffset || document.documentElement.scrollLeft,\n scrollTop: window.pageYOffset || document.documentElement.scrollTop,\n left: decoratorRect.left,\n top: decoratorRect.top,\n };\n }\n\n const left = relativeRect.left + relativeRect.scrollLeft;\n let top = relativeRect.top + relativeRect.scrollTop;\n\n const popoverHeight = popover.clientHeight;\n const distanceToElBottom = popover.parentElement.getBoundingClientRect()\n .bottom;\n\n // in case popup is not fully visible under the parent element, move it above it\n if (\n window.innerHeight <\n popoverHeight + distanceToElBottom + SUGGEST_POPUP_PADDING\n ) {\n top = top - popoverHeight - SUGGEST_POPUP_PADDING;\n }\n\n let transform;\n let transition;\n if (state.isActive) {\n if (filteredEmojis.size > 0) {\n transform = 'scale(1)';\n transition = 'all 0.25s cubic-bezier(.3,1.2,.2,1)';\n } else {\n transform = 'scale(0)';\n transition = 'all 0.35s cubic-bezier(.3,1,.2,1)';\n }\n }\n\n return {\n left: `${left}px`,\n top: `${top}px`,\n transform,\n transformOrigin: '1em 0%',\n transition,\n };\n}\n","import { Principal } from '@dfinity/principal';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport function createImageId(userId: bigint) {\n return `${userId}::${uuidv4()}`;\n}\n\ntype CreateImageWithImageId = {\n imageId: string;\n userId?: never;\n};\n\ntype CreateImageWithUserId = {\n imageId?: never;\n userId: bigint;\n};\n\nexport function createIcImage({\n imageId,\n userId,\n}: CreateImageWithImageId | CreateImageWithUserId) {\n return {\n canister_id: Principal.fromText(process.env.REACT_APP_ASSETS_CANISTER_ID),\n image_id: imageId || createImageId(userId),\n timestamp: 0n,\n format: 'png',\n };\n}\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport {\n Dialog,\n IconButton,\n DialogContent,\n SvgIcon,\n Badge,\n} from '@mui/material';\nimport { CircledClose } from '../icons';\nimport ImageLoader from '../ImageLoader';\nimport { Image } from 'types';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n [theme.breakpoints.down('sm')]: {\n width: ({ isAvatarPreview }) =>\n isAvatarPreview ? 'auto' : 'calc(100% - 32px)',\n },\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n icon: {\n height: 16,\n width: 16,\n },\n contentContainer: {\n padding: 0,\n overflow: 'hidden',\n },\n image: {\n width: 'auto',\n maxWidth: '100%',\n maxHeight: `calc(100vh - ${theme.spacing(9)})`,\n borderRadius: 10,\n objectFit: 'contain',\n },\n nftImage: {\n width: 'auto',\n maxWidth: '100%',\n maxHeight: `calc(100vh - ${theme.spacing(9)})`,\n borderRadius: 10,\n objectFit: 'contain',\n height: ({ isAvatarPreview }) => (isAvatarPreview ? 'auto' : 800),\n minWidth: 200,\n minHeight: 200,\n },\n anchorOriginBottomRightCircle: {\n right: 10,\n top: 10,\n padding: 0,\n bottom: 0,\n transform: 'none',\n },\n button: {\n background: 'rgb(255 255 255 / 22%)',\n borderRadius: '100%',\n padding: theme.spacing(0.75),\n\n '&:hover': {\n background: 'rgb(255 255 255 / 22%)',\n },\n },\n contentRoot: {\n paddingTop: '0 !important',\n },\n}));\n\ninterface Props {\n open: boolean;\n close: () => void;\n image?: Image;\n nftImageUrl?: string;\n isNft?: boolean;\n isAvatarPreview?: boolean;\n}\n\nconst FullImageModal = ({\n open,\n close,\n image,\n nftImageUrl,\n isNft,\n isAvatarPreview,\n}: Props) => {\n const classes = useStyles({ isAvatarPreview });\n\n return (\n close()}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n className={classes.dialog}\n maxWidth=\"xl\"\n >\n \n close()}\n size=\"large\"\n >\n \n \n }\n classes={{\n anchorOriginBottomRightCircular:\n classes.anchorOriginBottomRightCircle,\n }}\n >\n {image && (\n \n {({ src }) => (\n \"Dummy\n )}\n \n )}\n {nftImageUrl && (\n \n )}\n \n \n \n );\n};\n\nexport default FullImageModal;\n","import React from 'react';\nimport ToggleButton from '@mui/material/ToggleButton';\nimport { styled } from '@mui/material/styles';\n\ninterface INavigationButtonProps {\n value?: string;\n selected?: boolean;\n iconOnly?: boolean;\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n onClick: (event: React.MouseEvent, value: any) => void;\n}\n\nfunction NavigationButton({\n value,\n selected,\n iconOnly,\n startIcon = null,\n endIcon = null,\n onClick,\n}: INavigationButtonProps) {\n return (\n \n {startIcon}\n {!iconOnly && value}\n {endIcon}\n \n );\n}\n\nexport const StyledToggleButton = styled(ToggleButton)(({ theme }) => ({\n backgroundColor: theme.palette.colors.ui_03,\n border: 'none',\n\n '& .MuiTouchRipple-root': {\n color: theme.palette.colors.primary,\n },\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_01,\n },\n\n '&.Mui-selected': {\n backgroundColor: theme.palette.colors.ui_03,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_01,\n },\n },\n}));\n\nexport default NavigationButton;\n","import { ANDROID_APP_LINK, IOS_APP_LINK } from '../constants';\n\nconst getMobileOS = () => {\n const userAgent = navigator.userAgent || navigator.vendor;\n\n if (/android/i.test(userAgent)) {\n return 'Android';\n }\n\n if (/iPad|iPhone|iPod/.test(userAgent)) {\n return 'iOS';\n }\n\n return 'unknown';\n};\n\nconst redirectToStore = () => {\n const userOS = getMobileOS();\n switch (userOS) {\n case 'Android':\n window.open(ANDROID_APP_LINK);\n break;\n case 'iOS':\n window.open(IOS_APP_LINK);\n break;\n }\n};\n\nexport { getMobileOS, redirectToStore };\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Dialog, DialogContent } from '@mui/material';\nimport DialogHeader from './DialogHeader';\nimport { Loading } from 'components';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n contentContainer: {\n padding: 0,\n minWidth: 300,\n minHeight: 200,\n position: 'relative',\n },\n image: {\n maxWidth: '100%',\n },\n loading: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n}));\n\ninterface Props {\n open: boolean;\n close: any;\n}\n\nconst ICIdentityExplaierModal = ({ open, close }: Props) => {\n const classes = useStyles();\n const [loading, setLoading] = React.useState(true);\n return (\n close()}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n className={classes.dialog}\n maxWidth=\"xl\"\n >\n close()} />\n \n setLoading(false)}\n />\n {loading && (\n
\n \n
\n )}\n
\n \n );\n};\n\nexport default ICIdentityExplaierModal;\n","import React, {\n createContext,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Typography, Button } from '@mui/material';\nimport { useLocation } from 'react-router-dom';\nimport { emptyMethod } from 'utils';\nimport { Dialog, LoginSignupBox } from 'components';\nimport { DistriktIcon } from 'components/icons';\nimport ICIdentityExplaierModal from 'components/Dialogs/ICIdentityExplainer';\nimport { useQueryClient } from 'react-query';\nimport { createActor, Profile, setActor } from 'client';\nimport { useGetSelf } from 'services';\nimport { getMobileOS, redirectToStore } from 'utils/getMobileOS';\nimport { getIdentity } from 'utils/auth';\nimport { AnonymousIdentity } from '@dfinity/agent';\n\nconst useStyles = makeStyles((theme) => ({\n wrapper: {\n textAlign: 'center',\n maxWidth: 360,\n paddingLeft: theme.spacing(5),\n paddingRight: theme.spacing(5),\n paddingBottom: theme.spacing(2.25),\n boxSizing: 'content-box',\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n maxWidth: 'none',\n boxSizing: 'border-box',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n },\n logoIcon: {\n color: theme.palette.colors.primary,\n },\n title: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(4),\n },\n iiLink: {\n cursor: 'pointer',\n },\n description: {\n marginBottom: theme.spacing(4),\n [theme.breakpoints.down('sm')]: {\n marginBottom: theme.spacing(2),\n },\n },\n guestButton: {\n marginTop: theme.spacing(2.5),\n [theme.breakpoints.down('sm')]: {\n marginTop: theme.spacing(0),\n },\n },\n loginSignupBox: {\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n },\n },\n buttons: {\n display: 'flex',\n flexDirection: 'column',\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column-reverse',\n },\n },\n downloadButton: {\n display: 'none',\n [theme.breakpoints.down('sm')]: {\n display: 'block',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(-1),\n },\n },\n}));\n\nexport type OpenDistriktViewMode =\n | 'Unidentified Guest'\n | 'Identified Guest'\n | 'User';\n\ninterface OpenDistriktContextValues {\n mode: OpenDistriktViewMode;\n recomputeMode: (refetchIdentity?: boolean, user?: Profile) => void;\n handleAction: (action: () => any) => any;\n}\n\nconst initialValues: OpenDistriktContextValues = {\n mode: 'Unidentified Guest',\n recomputeMode: emptyMethod,\n handleAction: emptyMethod,\n};\n\nexport const OpenDistriktContext = createContext(\n initialValues\n);\n\ninterface OpenDistriktProviderProps {\n children: JSX.Element;\n}\n\ninterface ModeElements {\n isSignedUp: boolean;\n isIdentified: boolean;\n}\n\nexport const OpenDistriktProvider = (props: OpenDistriktProviderProps) => {\n const classes = useStyles();\n\n const [iiExplainerOpened, setIiExplainerOpened] = useState(false);\n const [loginModalOpened, setLoginModalOpened] = useState(\n undefined\n );\n\n const [mode, setMode] = useState('Unidentified Guest');\n\n const computeMode = useCallback(\n ({ isSignedUp, isIdentified }: ModeElements): OpenDistriktViewMode => {\n if (isSignedUp) {\n if (isIdentified) {\n return 'User';\n } else {\n throw Error('Impossible: User not identified but signed up');\n }\n } else {\n if (isIdentified) {\n return 'Identified Guest';\n } else {\n return 'Unidentified Guest';\n }\n }\n },\n []\n );\n\n const getModeElements = useCallback((): ModeElements => {\n switch (mode) {\n case 'User':\n return { isSignedUp: true, isIdentified: true };\n case 'Identified Guest':\n return { isSignedUp: false, isIdentified: true };\n case 'Unidentified Guest':\n return { isSignedUp: false, isIdentified: false };\n }\n }, [mode]);\n\n const handleAction = useCallback(\n (action: () => any) => {\n if (mode === 'User') {\n return action();\n } else {\n setLoginModalOpened(true);\n }\n },\n [mode]\n );\n\n const queryClient = useQueryClient();\n\n const { data: user, isLoading } = useGetSelf();\n\n const recomputeMode = useCallback(\n async (refetchIdentity?: boolean, profile?: Profile) => {\n const data = profile !== undefined ? profile : user;\n const isSignedUp = !!data?.id;\n\n let { isIdentified } = getModeElements();\n if (refetchIdentity) {\n const identity = await getIdentity();\n const api = createActor(identity);\n setActor(api);\n queryClient.invalidateQueries('getSelf');\n isIdentified = !(identity instanceof AnonymousIdentity);\n }\n\n setMode(computeMode({ isSignedUp, isIdentified }));\n },\n [computeMode, getModeElements, queryClient, user]\n );\n\n const location = useLocation();\n const userOS = getMobileOS();\n\n useEffect(() => {\n if (!isLoading && loginModalOpened === undefined) {\n setLoginModalOpened(\n () =>\n (location.pathname === '/' || location.pathname === '/stream') &&\n !queryClient.getQueryData(['getSelf'])?.id\n );\n\n const { isIdentified } = getModeElements();\n setMode(computeMode({ isSignedUp: !!user?.id, isIdentified }));\n }\n }, [\n computeMode,\n getModeElements,\n isLoading,\n location.pathname,\n loginModalOpened,\n queryClient,\n user?.id,\n ]);\n\n const onLoginSignupBoxAction = useCallback(() => {\n setLoginModalOpened(false);\n }, []);\n\n return (\n \n {props.children}\n {loginModalOpened && (\n setLoginModalOpened(false)}\n noBtns\n closeOnBackdropClick\n >\n
\n \n \n Join the distrikt community\n \n \n Login or Sign up with II (Internet Identity) to interact with\n distrikt.app\n
\n
\n Read more about the{' '}\n setIiExplainerOpened(true)}\n onKeyDown={() => setIiExplainerOpened(true)}\n role=\"button\"\n tabIndex={0}\n >\n Internet Identity here\n \n .\n
\n
\n \n \n userOS === 'unknown'\n ? window.open('/app-link')\n : redirectToStore()\n }\n >\n Download Mobile App\n \n setLoginModalOpened(false)}\n className={classes.guestButton}\n >\n Continue as Guest\n \n
\n
\n \n )}\n {iiExplainerOpened && (\n setIiExplainerOpened(false)}\n />\n )}\n \n );\n};\n","import { createTheme, ThemeOptions } from '@mui/material/styles';\nimport { getLightTheme } from './light';\nimport { getDarkTheme } from './dark';\nimport React from 'react';\nimport { RadioInsideIcon, RadioOutlineIcon } from 'components/icons';\n\ndeclare module '@mui/material/styles' {\n interface TypographyVariants {\n h1b: React.CSSProperties;\n h2b: React.CSSProperties;\n h3b: React.CSSProperties;\n body: React.CSSProperties;\n bodyb: React.CSSProperties;\n paragraph: React.CSSProperties;\n }\n\n // allow configuration using `createTheme`\n interface TypographyVariantsOptions {\n h1b?: React.CSSProperties;\n h2b?: React.CSSProperties;\n h3b?: React.CSSProperties;\n body?: React.CSSProperties;\n bodyb?: React.CSSProperties;\n paragraph?: React.CSSProperties;\n }\n}\n\n// Update the Typography's variant prop options\ndeclare module '@mui/material/Typography' {\n interface TypographyPropsVariantOverrides {\n h1b: true;\n h2b: true;\n h3b: true;\n body: true;\n bodyb: true;\n paragraph: true;\n }\n}\n\nconst baseTheme = {\n // breakpoints are based on: https://carbondesignsystem.com/guidelines/2x-grid/overview/#breakpoints\n breakpoints: {\n values: {\n xs: 0,\n sm: 672,\n md: 1056,\n lg: 1312,\n xl: 1584,\n },\n },\n sidebar: {\n width: {\n normal: 260,\n },\n },\n typography: {\n fontFamily: [\n 'Inter',\n '-apple-system',\n 'BlinkMacSystemFont',\n '\"Segoe UI\"',\n 'Roboto',\n '\"Helvetica Neue\"',\n '\"Noto Color Emoji Compat\"',\n 'Arial',\n 'sans-serif',\n '\"Apple Color Emoji\"',\n '\"Segoe UI Emoji\"',\n '\"Segoe UI Symbol\"',\n ].join(','),\n fontSize: 14,\n fontWeightRegular: 400,\n fontWeightBold: 600,\n h1: {\n fontSize: 32,\n fontWeight: 400,\n lineHeight: 1.25,\n },\n h1b: {\n fontSize: 32,\n fontWeight: 600,\n lineHeight: 1.25,\n },\n h2: {\n fontSize: 24,\n fontWeight: 400,\n lineHeight: 1.3333,\n },\n h2b: {\n fontSize: 24,\n fontWeight: 600,\n lineHeight: 1.3333,\n },\n h3: {\n fontSize: 18,\n fontWeight: 400,\n lineHeight: 1.3333,\n },\n h3b: {\n fontSize: 18,\n fontWeight: 600,\n lineHeight: 1.3333,\n },\n body: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: 1.1428,\n },\n bodyb: {\n fontSize: 14,\n fontWeight: 600,\n lineHeight: 1.1428,\n },\n paragraph: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: 1.4285,\n },\n },\n} as ThemeOptions;\n\nexport function getTheme(themeColor: 'light' | 'dark') {\n const theme =\n themeColor === 'light' ? getLightTheme(baseTheme) : getDarkTheme(baseTheme);\n return createTheme(theme, {\n palette: {\n background: {\n default: theme.palette.colors.ui_01,\n paper: theme.palette.colors.ui_03,\n },\n primary: {\n main: theme.palette.colors.primary,\n },\n secondary: {\n main: theme.palette.colors.ui_01,\n },\n text: {\n primary: theme.palette.colors.ui_07,\n secondary: theme.palette.colors.ui_01,\n },\n },\n\n components: {\n MuiCssBaseline: {\n styleOverrides: {\n html: {\n '& *::-webkit-scrollbar': {\n width: 6,\n height: 6,\n },\n '& *::-webkit-scrollbar-thumb': {\n backgroundColor: theme.palette.colors.ui_03,\n },\n scrollbarWidth: 'thin', // firefox fallback\n scrollbarColor: theme.palette.colors.ui_03, // firefox fallback\n },\n body: {\n background: `linear-gradient(to right, ${theme.palette.colors.ui_03} 0%, ${theme.palette.colors.ui_03} 50%, ${theme.palette.colors.ui_01} 50%, ${theme.palette.colors.ui_01} 100%)`,\n },\n },\n },\n\n MuiTypography: {\n defaultProps: {\n variantMapping: {\n h1: 'h1',\n h1b: 'h1',\n h2: 'h2',\n h2b: 'h2',\n h3: 'h3',\n h3b: 'h3',\n body: 'p',\n bodyb: 'p',\n paragraph: 'p',\n },\n },\n },\n\n MuiAppBar: {\n defaultProps: {\n position: 'sticky',\n },\n styleOverrides: {\n root: {\n alignItems: 'center',\n background: theme.palette.colors.ui_01,\n display: 'flex',\n height: 24 + 24 + 24, // content + bottom padding + top padding\n justifyContent: 'space-around',\n },\n },\n },\n\n MuiButton: {\n defaultProps: {\n disableElevation: true,\n },\n // Based on new design system, color variations are split into:\n // primary => contained variant\n // secondary => outlined variant\n // ghost => text variant\n // danger => contained variant with error color\n // danger secondary => outlined variant with error color\n // danger ghost => text variant with error color\n styleOverrides: {\n root: ({ ownerState }) => ({\n textTransform: 'none',\n borderRadius: 8,\n padding: '12px 24px',\n ...theme.typography.bodyb,\n\n '& .MuiButton-endIcon>*:nth-of-type(1)': {\n fontSize: 16,\n },\n '& .MuiButton-startIcon>*:nth-of-type(1)': {\n fontSize: 16,\n },\n\n // in case button contains icon but not text, adjust button size:\n ...(!ownerState.children &&\n (ownerState.startIcon || ownerState.endIcon) && {\n padding: '12px',\n minWidth: 'auto',\n\n '& .MuiButton-startIcon': {\n marginRight: '0',\n marginLeft: '0',\n },\n '& .MuiButton-endIcon': {\n marginRight: '0',\n marginLeft: '0',\n },\n }),\n }),\n contained: {\n backgroundColor: theme.palette.colors.primary,\n color: theme.palette.colors.ui_01,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.primary_hover,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.primary_pressed,\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_04,\n color: theme.palette.colors.ui_01,\n },\n },\n containedError: {\n backgroundColor: theme.palette.colors.danger,\n color: theme.palette.colors.ui_01,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.danger_hover,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.danger_pressed,\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.danger_disabled,\n color: theme.palette.colors.ui_01,\n },\n },\n outlined: {\n backgroundColor: 'transparent',\n border: `1px solid`,\n borderColor: theme.palette.colors.primary,\n color: theme.palette.colors.primary,\n height: 40,\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.ui_04,\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_01,\n color: theme.palette.colors.ui_05,\n borderColor: theme.palette.colors.ui_04,\n },\n },\n outlinedError: {\n backgroundColor: 'transparent',\n border: `1px solid`,\n borderColor: theme.palette.colors.danger,\n color: theme.palette.colors.danger,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.danger_ghost_hover,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.danger_ghost_pressed,\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_01,\n color: theme.palette.colors.danger_disabled,\n borderColor: theme.palette.colors.danger_disabled,\n },\n },\n text: {\n backgroundColor: 'transparent',\n color: theme.palette.colors.primary,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.ui_04,\n },\n\n '&.Mui-disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.colors.ui_05,\n },\n },\n textError: {\n backgroundColor: theme.palette.colors.ui_01,\n color: theme.palette.colors.danger,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.danger_ghost_hover,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.danger_ghost_pressed,\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_01,\n color: theme.palette.colors.danger_disabled,\n },\n },\n },\n },\n\n MuiIconButton: {\n // By default the ghost style for icon button is used unless color is set to 'primary'\n styleOverrides: {\n root: {\n padding: theme.spacing(1),\n backgroundColor: 'transparent',\n color: theme.palette.colors.ui_07,\n\n '& svg': {\n fontSize: 16,\n color: theme.palette.colors.ui_07,\n },\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.ui_04,\n },\n\n '&.Mui-disabled': {\n backgroundColor: 'transparent',\n borderColor: theme.palette.colors.ui_05,\n\n '& svg': {\n fontSize: 16,\n color: theme.palette.colors.ui_05,\n },\n },\n },\n colorPrimary: {\n backgroundColor: theme.palette.colors.primary,\n color: theme.palette.colors.ui_01,\n\n '& svg': {\n fontSize: 16,\n color: theme.palette.colors.ui_01,\n },\n\n '&:hover': {\n backgroundColor: theme.palette.colors.primary_hover,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.primary_pressed,\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_04,\n\n '& svg': {\n color: theme.palette.colors.ui_01,\n },\n },\n },\n },\n },\n\n MuiToggleButton: {\n styleOverrides: {\n root: ({ ownerState }) => ({\n ...theme.typography.bodyb,\n alignItems: 'center',\n backgroundColor: theme.palette.colors.ui_01,\n borderRadius: '8px',\n color: theme.palette.colors.ui_07,\n display: 'inline-flex',\n justifyContent: 'flex-start',\n padding: '8px 16px',\n textTransform: 'none',\n\n '& svg': {\n fontSize: 22.5,\n color: theme.palette.colors.ui_07,\n },\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.ui_04,\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_01,\n\n '& svg': {\n fontSize: 24,\n color: theme.palette.colors.ui_05,\n\n [theme.breakpoints.only('xs')]: {\n fontSize: 16,\n },\n },\n },\n\n '&.Mui-selected': {\n color: theme.palette.colors.primary,\n\n '& svg': {\n color: theme.palette.colors.primary,\n },\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.ui_04,\n },\n },\n\n '&.startIcon': {\n lineHeight: '0.875rem',\n\n ...(ownerState.children?.filter((c) => c).length > 1\n ? {\n '& svg': {\n marginRight: '16px',\n },\n }\n : { padding: '8px' }),\n },\n\n '&.endIcon': {\n lineHeight: '0.875rem',\n\n ...(ownerState.children?.filter((c) => c).length > 1\n ? {\n padding: '8px 16px',\n paddingRight: '56px',\n\n '& svg': {\n marginLeft: '16px',\n },\n }\n : { padding: '8px' }),\n },\n }),\n },\n },\n\n MuiOutlinedInput: {\n styleOverrides: {\n root: {\n '& > fieldset': {\n borderRadius: 8,\n borderColor: theme.palette.colors.ui_04,\n },\n '&:hover': {\n '& .MuiOutlinedInput-notchedOutline': {\n borderColor: theme.palette.colors.ui_05,\n },\n },\n '&.Mui-focused': {\n '& .MuiOutlinedInput-notchedOutline': {\n border: `1px solid ${theme.palette.colors.primary}`,\n },\n },\n '&.Mui-error': {\n '& .MuiOutlinedInput-notchedOutline': {\n border: `1px solid ${theme.palette.colors.danger}`,\n },\n },\n\n '&.Mui-disabled': {\n '& .MuiOutlinedInput-notchedOutline': {\n borderColor: theme.palette.colors.ui_04,\n },\n },\n },\n\n input: {\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_02,\n borderRadius: 8,\n\n '&::placeholder': {\n '-webkit-text-fill-color': theme.palette.colors.ui_05,\n opacity: 1,\n },\n },\n '&::placeholder': {\n color: theme.palette.colors.ui_05,\n opacity: 1,\n },\n '&:focus::placeholder': {\n opacity: 0,\n },\n },\n },\n },\n\n MuiInputAdornment: {\n styleOverrides: {\n root: {\n width: 16,\n height: 16,\n '& svg': {\n fontSize: 16,\n },\n '& button': {\n margin: '-16px',\n },\n },\n },\n },\n\n MuiFormHelperText: {\n styleOverrides: {\n root: {\n ...theme.typography.body,\n color: theme.palette.colors.ui_06,\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n marginLeft: '1px', // border size\n marginRight: theme.spacing(0),\n '&.Mui-error': {\n color: theme.palette.colors.error,\n },\n '&.Mui-disabled': {\n color: theme.palette.colors.ui_05,\n },\n },\n },\n },\n\n MuiRadio: {\n styleOverrides: {\n root: {\n color: theme.palette.colors.ui_04,\n marginRight: theme.spacing(1),\n '&:hover': {\n backgroundColor: 'transparent',\n color: theme.palette.colors.ui_05,\n },\n '&.Mui-checked': {\n '& .radioFill': {\n color: theme.palette.colors.primary,\n },\n '& .radioOutline': {\n color: theme.palette.colors.ui_04,\n },\n '&:hover': {\n '& .radioOutline': {\n color: theme.palette.colors.ui_05,\n },\n '& .radioFill': {\n color: theme.palette.colors.primary_hover,\n },\n },\n },\n '&.Mui-disabled': {\n width: theme.spacing(3),\n height: theme.spacing(3),\n color: theme.palette.colors.ui_04,\n background: theme.palette.colors.ui_02,\n '&.Mui-checked': {\n '& .radioFill': {\n color: theme.palette.colors.ui_04,\n },\n '& .radioOutline': {\n color: theme.palette.colors.ui_04,\n },\n },\n },\n },\n },\n defaultProps: {\n checkedIcon: ,\n icon: ,\n },\n },\n\n MuiAlert: {\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.colors.ui_01,\n border: `1px solid`,\n borderColor: theme.palette.colors.ui_04,\n borderRadius: '8px',\n color: theme.palette.colors.ui_07,\n minWidth: 320,\n padding: '16px',\n paddingLeft: '24px',\n position: 'relative',\n },\n action: {\n fontSize: 16,\n paddingRight: '8px',\n },\n icon: {\n fontSize: 24,\n marginRight: '24px',\n },\n message: {\n ...theme.typography.paragraph,\n\n color: theme.palette.colors.ui_06,\n wordBreak: 'break-word',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n },\n standardSuccess: {\n '& .MuiAlert-icon': {\n color: theme.palette.colors.success,\n },\n },\n standardInfo: {\n '& .MuiAlert-icon': {\n color: theme.palette.colors.info,\n },\n },\n standardWarning: {\n '& .MuiAlert-icon': {\n color: theme.palette.colors.warning,\n },\n },\n standardError: {\n '& .MuiAlert-icon': {\n color: theme.palette.colors.error,\n },\n },\n },\n },\n\n MuiAlertTitle: {\n styleOverrides: {\n root: {\n ...theme.typography.bodyb,\n color: theme.palette.colors.ui_07,\n },\n },\n },\n\n MuiSelect: {\n styleOverrides: {\n root: {\n ...theme.typography.body,\n fontSize: 16,\n minWidth: '120px',\n border: 'none',\n\n '& ~ .MuiFormHelperText-root': {\n ...theme.typography.body,\n color: theme.palette.colors.ui_06,\n marginTop: theme.spacing(1),\n marginLeft: '1px', // border size\n marginRight: theme.spacing(0),\n\n '&.Mui-error': {\n color: theme.palette.colors.error,\n },\n\n '&.Mui-disabled': {\n color: theme.palette.colors.ui_05,\n },\n },\n\n '& .MuiOutlinedInput-notchedOutline': {\n border: 'none',\n },\n\n // used for the arrow down icon only\n '&.Mui-error > .MuiSvgIcon-root': {\n color: theme.palette.colors.ui_07,\n },\n },\n\n iconOutlined: {\n color: theme.palette.colors.ui_07,\n },\n\n select: {\n alignItems: 'center',\n display: 'flex',\n padding: '7.5px 14px',\n\n '&.MuiOutlinedInput-input': {\n paddingRight: '40px',\n },\n },\n\n outlined: {\n backgroundColor: theme.palette.colors.ui_01,\n border: `1px solid`,\n borderColor: theme.palette.colors.ui_04,\n borderRadius: theme.spacing(1),\n color: theme.palette.colors.ui_07,\n\n '&:hover': {\n borderColor: theme.palette.colors.ui_05,\n },\n\n '&:active': {\n borderColor: theme.palette.colors.primary,\n },\n\n '&[aria-expanded=\"true\"]': {\n borderColor: theme.palette.colors.primary,\n },\n\n '& .MuiListItemIcon-root': {\n display: 'none',\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_02,\n color: theme.palette.colors.ui_05,\n '-webkit-text-fill-color': 'unset',\n\n '&:hover': {\n borderColor: theme.palette.colors.ui_04,\n },\n },\n\n '&.Mui-error': {\n borderColor: theme.palette.colors.error,\n },\n },\n },\n },\n\n MuiLinearProgress: {\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.colors.ui_01,\n height: '2px',\n },\n },\n },\n\n MuiPopper: {\n styleOverrides: {\n root: {\n // Only for cards that are under popper (alerts/modals/dialogs), set box shadow & different background color\n '& .MuiPaper-root': {\n backgroundColor: theme.palette.colors.ui_01,\n boxShadow: '0 2px 16px 0 rgba(44,40,75,0.12);',\n },\n },\n },\n },\n\n MuiModal: {\n styleOverrides: {\n root: {\n // Only for cards that are under popper (alerts/modals/dialogs), set box shadow & different background color\n '& .MuiPaper-root': {\n backgroundColor: theme.palette.colors.ui_01,\n boxShadow: '0 2px 16px 0 rgba(44, 40, 75, 0.12)',\n },\n },\n },\n },\n\n // same as MuiPopper\n MuiPopover: {\n defaultProps: {\n invisible: true,\n },\n styleOverrides: {\n root: {\n // Only for cards that are under popper (alerts/modals/dialogs), set box shadow & different background color\n '& .MuiPaper-root': {\n backgroundColor: theme.palette.colors.ui_01,\n boxShadow: '0 2px 16px 0 rgba(44, 40, 75, 0.12)',\n },\n },\n },\n },\n\n // same as MuiPopper\n MuiAutocomplete: {\n styleOverrides: {\n root: {\n '& .MuiInputBase-adornedStart.showIcon svg': {\n color: theme.palette.colors.ui_05,\n },\n\n '&.Mui-focused .MuiInputBase-adornedStart.showIcon svg': {\n color: theme.palette.colors.ui_07,\n },\n },\n paper: {\n backgroundColor: theme.palette.colors.ui_01,\n },\n },\n },\n\n // same as MuiPopper\n MuiSnackbar: {\n styleOverrides: {\n root: {\n // Only for cards that are under popper (alerts/modals/dialogs), set box shadow & different background color\n '& .MuiPaper-root': {\n backgroundColor: theme.palette.colors.ui_01,\n boxShadow: '0 2px 16px 0 rgba(44, 40, 75, 0.12)',\n },\n },\n },\n },\n\n MuiPaper: {\n defaultProps: {\n variant: 'outlined',\n },\n styleOverrides: {\n outlined: {\n border: 'none',\n\n '&.MuiPopover-paper': {\n border: '1px solid',\n borderRadius: '8px',\n borderColor: theme.palette.colors.ui_04,\n },\n },\n },\n },\n\n MuiMenuItem: {\n styleOverrides: {\n root: {\n ...theme.typography.body,\n padding: '12px 16px',\n\n '&[aria-selected=\"true\"]': {\n backgroundColor: theme.palette.colors.ui_04,\n },\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n },\n },\n },\n\n MuiCardActions: {\n styleOverrides: {\n root: {\n '&>:not(:first-of-type)': {\n marginLeft: '16px',\n },\n },\n },\n },\n\n MuiCard: {\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.colors.ui_02,\n borderRadius: '8px',\n padding: '16px',\n paddingTop: '20px',\n marginBottom: '16px',\n },\n },\n },\n\n MuiCardHeader: {\n styleOverrides: {\n root: {\n padding: 0,\n marginBottom: 20,\n },\n },\n },\n\n MuiCardContent: {\n styleOverrides: {\n root: {\n padding: 0,\n },\n },\n },\n\n MuiLink: {\n styleOverrides: {\n root: {\n ...theme.typography.body,\n },\n },\n },\n\n MuiCheckbox: {\n defaultProps: {\n disableRipple: true,\n },\n styleOverrides: {\n root: {\n color: theme.palette.colors.ui_04,\n backgroundColor: theme.palette.colors.ui_01,\n\n '&:hover': {\n color: theme.palette.colors.ui_05,\n backgroundColor: theme.palette.colors.ui_01,\n },\n\n '&.Mui-disabled': {\n color: theme.palette.colors.ui_04,\n\n '& .CheckboxEmptyBorder': {\n fill: theme.palette.colors.ui_02,\n },\n },\n\n '&.Mui-checked': {\n color: theme.palette.colors.primary,\n backgroundColor: theme.palette.colors.ui_01,\n\n '&.Mui-disabled': {\n color: theme.palette.colors.ui_04,\n\n '& path': {\n fill: theme.palette.colors.ui_01,\n },\n },\n\n '& path': {\n fill: theme.palette.colors.ui_01,\n },\n\n '&:hover': {\n color: theme.palette.colors.primary_hover,\n backgroundColor: theme.palette.colors.ui_01,\n\n '& path': {\n fill: theme.palette.colors.ui_01,\n },\n },\n },\n },\n },\n },\n\n MuiCalendarPicker: {\n styleOverrides: {\n root: {\n '.PrivatePickersFadeTransitionGroup-root': {\n ...theme.typography.bodyb,\n },\n\n '.PrivatePickersSlideTransition-root': {\n minHeight: '255px',\n },\n\n '.MuiTypography-root': {\n ...theme.typography.body,\n width: '40px',\n },\n\n // using generic button so that it can be used for both day & year picker\n '& button': {\n ...theme.typography.body,\n backgroundColor: theme.palette.colors.ui_01,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n '&.Mui-selected': {\n backgroundColor: theme.palette.colors.primary,\n color: theme.palette.colors.ui_01,\n\n '&:hover': {\n backgroundColor: theme.palette.colors.primary_hover,\n },\n\n '&:active': {\n backgroundColor: theme.palette.colors.primary,\n },\n\n '&:focus': {\n backgroundColor: theme.palette.colors.primary,\n },\n },\n },\n },\n\n viewTransitionContainer: {\n '& .MuiTypography-root': {\n ...theme.typography.body,\n width: '40px',\n },\n },\n },\n },\n\n MuiPickersDay: {\n styleOverrides: {\n root: {\n height: '40px',\n width: '40px',\n borderRadius: '50%',\n },\n },\n },\n\n MuiFormControl: {\n defaultProps: {\n fullWidth: true,\n },\n },\n\n MuiFormControlLabel: {\n styleOverrides: {\n label: {\n color: theme.palette.colors.ui_07,\n '&.Mui-disabled': {\n color: theme.palette.colors.ui_05,\n },\n },\n },\n },\n\n MuiInputBase: {\n styleOverrides: {\n root: {\n // this is needed to make sude input on MuiInput takes the full width when there in an icon at the end\n // needed in DatePicker because popup is aligned to center of input only\n '&.MuiInputBase-adornedEnd.MuiOutlinedInput-root input.isDatePicker': {\n marginRight: '-38px',\n paddingRight: '38px',\n },\n\n '&.MuiInputBase-adornedEnd.MuiOutlinedInput-root input.isDatePickerExtended': {\n marginRight: '-60px',\n paddingRight: '60px',\n },\n\n '& .MuiInputAdornment-positionStart': {\n marginLeft: '10px',\n marginRight: '2px',\n },\n\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_02,\n\n '& button': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n },\n\n '&.Mui-error .MuiSvgIcon-root': {\n color: theme.palette.colors.danger,\n },\n },\n },\n },\n\n MuiSvgIcon: {\n styleOverrides: {\n root: {\n fontSize: 24,\n },\n },\n },\n\n MuiTab: {\n defaultProps: {\n disableFocusRipple: true,\n disableRipple: true,\n },\n styleOverrides: {\n root: {\n borderBottom: `1px solid ${theme.palette.colors.ui_05}`,\n color: theme.palette.colors.ui_07,\n fontWeight: theme.typography.fontWeightBold,\n lineHeight: 1,\n marginRight: '32px',\n marginBottom: '-1px',\n minHeight: 30,\n minWidth: 'unset',\n paddingBottom: 12,\n paddingLeft: theme.spacing(0),\n paddingRight: theme.spacing(0),\n textTransform: 'none',\n\n '&:hover': {\n color: theme.palette.colors.ui_07,\n borderBottom: `2px solid ${theme.palette.colors.ui_07}`,\n paddingBottom: 11,\n minHeight: 30,\n lineHeight: 1,\n '&.Mui-selected': {\n color: theme.palette.colors.primary,\n },\n },\n\n [theme.breakpoints.down('md')]: {\n marginRight: '16px',\n },\n },\n },\n },\n MuiTabs: {\n defaultProps: {\n indicatorColor: 'primary',\n },\n styleOverrides: {\n root: {\n minHeight: '40px',\n\n span: {\n '&.MuiTabs-indicator': {\n bottom: 1,\n },\n },\n },\n flexContainer: {\n borderBottom: `1px solid ${theme.palette.colors.ui_05}`,\n },\n },\n },\n\n MuiDialog: {\n styleOverrides: {\n paper: {\n [theme.breakpoints.only('xs')]: {\n margin: '16px',\n maxHeight: 'calc(100% - 32px)',\n width: 'calc(100% - 32px)',\n },\n },\n },\n },\n\n MuiDialogTitle: {\n defaultProps: {\n variant: 'h3b',\n },\n },\n\n MuiDialogContentText: {\n defaultProps: {\n variant: 'paragraph',\n },\n styleOverrides: {\n root: {\n color: theme.palette.colors.ui_07,\n },\n },\n },\n\n MuiChip: {\n styleOverrides: {\n root: {\n ...theme.typography.bodyb,\n paddingLeft: 16,\n paddingRight: 8,\n '& .MuiChip-deleteIcon': {\n fontSize: 16,\n marginLeft: '4px',\n },\n '& .MuiChip-icon': {\n marginRight: '-4px',\n marginLeft: '4px',\n },\n },\n },\n },\n\n MuiDrawer: {\n defaultProps: {\n elevation: 0,\n },\n\n styleOverrides: {\n root: {\n '& .MuiPaper-root': {\n backgroundColor: theme.palette.colors.ui_03,\n },\n },\n modal: {\n '& .MuiBackdrop-root': {\n backgroundColor: 'unset',\n },\n },\n paper: {\n width: 'fit-content',\n minWidth: '300px',\n maxWidth: '100%',\n paddingLeft: '16px',\n paddingRight: '16px',\n },\n },\n },\n },\n });\n}\n\nexport { baseTheme };\n","import { createTheme, ThemeOptions } from '@mui/material/styles';\nimport { merge } from 'lodash';\n\ninterface Colors {\n primary: React.CSSProperties['color'];\n primary_hover: React.CSSProperties['color'];\n primary_pressed: React.CSSProperties['color'];\n danger: React.CSSProperties['color'];\n danger_hover: React.CSSProperties['color'];\n danger_pressed: React.CSSProperties['color'];\n danger_disabled: React.CSSProperties['color'];\n danger_ghost_hover: React.CSSProperties['color'];\n danger_ghost_pressed: React.CSSProperties['color'];\n success: React.CSSProperties['color'];\n warning: React.CSSProperties['color'];\n info: React.CSSProperties['color'];\n error: React.CSSProperties['color'];\n ui_background: React.CSSProperties['color'];\n ui_gradient: React.CSSProperties['color'];\n ui_01: React.CSSProperties['color'];\n ui_02: React.CSSProperties['color'];\n ui_03: React.CSSProperties['color'];\n ui_04: React.CSSProperties['color'];\n ui_05: React.CSSProperties['color'];\n ui_06: React.CSSProperties['color'];\n ui_07: React.CSSProperties['color'];\n}\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n colors: Colors;\n }\n}\n\nexport function getLightTheme(baseTheme: ThemeOptions) {\n // https://mui.com/material-ui/customization/theming/#api\n return createTheme(\n merge(\n {\n palette: {\n mode: 'light',\n colors: {\n primary: '#4C46D4',\n primary_hover: '#6F6BDC',\n primary_pressed: '#9390E5',\n danger: '#F34C57',\n danger_hover: '#F56F78',\n danger_pressed: '#F7939A',\n danger_disabled: '#E4CDCF',\n danger_ghost_hover: '#FDF6F6',\n danger_ghost_pressed: '#FDEEEF',\n success: '#0DBF84',\n warning: '#F3CC4C',\n info: '#4C46D4',\n error: '#F34C57',\n ui_background: '#F7F6FD',\n ui_gradient:\n 'linear-gradient(270deg, #FEFEFE 0%, rgba(255,255,255,0) 100%)',\n ui_01: '#FFFFFF',\n ui_02: '#F7F6FD',\n ui_03: '#F1F0FB',\n ui_04: '#D8D8E7',\n ui_05: '#B5B4CD',\n ui_06: '#9390AD',\n ui_07: '#2C284B',\n },\n },\n },\n baseTheme\n )\n );\n}\n","import { createTheme, ThemeOptions } from '@mui/material/styles';\nimport { merge } from 'lodash';\n\ninterface Colors {\n primary: React.CSSProperties['color'];\n primary_hover: React.CSSProperties['color'];\n primary_pressed: React.CSSProperties['color'];\n danger: React.CSSProperties['color'];\n danger_hover: React.CSSProperties['color'];\n danger_pressed: React.CSSProperties['color'];\n danger_disabled: React.CSSProperties['color'];\n danger_ghost_hover: React.CSSProperties['color'];\n danger_ghost_pressed: React.CSSProperties['color'];\n success: React.CSSProperties['color'];\n warning: React.CSSProperties['color'];\n info: React.CSSProperties['color'];\n error: React.CSSProperties['color'];\n ui_background: React.CSSProperties['color'];\n ui_gradient: React.CSSProperties['color'];\n ui_01: React.CSSProperties['color'];\n ui_02: React.CSSProperties['color'];\n ui_03: React.CSSProperties['color'];\n ui_04: React.CSSProperties['color'];\n ui_05: React.CSSProperties['color'];\n ui_06: React.CSSProperties['color'];\n ui_07: React.CSSProperties['color'];\n}\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n colors: Colors;\n }\n}\n\nexport function getDarkTheme(baseTheme: ThemeOptions) {\n // https://mui.com/material-ui/customization/theming/#api\n return createTheme(\n merge(\n {\n palette: {\n mode: 'dark',\n colors: {\n primary: '#8A7AFF',\n primary_hover: '#A599FF',\n primary_pressed: '#C9C2FF',\n danger: '#F34C57',\n danger_hover: '#F57078',\n danger_pressed: '#F89198',\n danger_disabled: '#5F454D',\n danger_ghost_hover: '#391823',\n danger_ghost_pressed: '#552535',\n success: '#0DBF84',\n warning: '#F3CC4C',\n info: '#8A7AFF',\n error: '#F34C57',\n ui_background: '#120F1C',\n ui_gradient:\n 'linear-gradient(270deg, #1F1D30 0%, rgba(31,29,48,0) 100%)',\n ui_01: '#1F1D30',\n ui_02: '#2B293D',\n ui_03: '#373550',\n ui_04: '#424262',\n ui_05: '#696699',\n ui_06: '#9F99C1',\n ui_07: '#FFFFFF',\n },\n },\n },\n baseTheme\n )\n );\n}\n","import * as React from 'react';\nimport {\n ThemeProvider as MuiThemeProvider,\n Theme,\n StyledEngineProvider,\n unstable_createMuiStrictModeTheme as createMuiStrictModeTheme,\n} from '@mui/material/styles';\nimport { CssBaseline } from '@mui/material';\nimport { getTheme } from 'theme/common';\n\ndeclare module '@mui/styles/defaultTheme' {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface DefaultTheme extends Theme {}\n}\n\ninterface Props {\n children: React.ReactNode;\n theme: 'light' | 'dark';\n}\n\nexport const StatelessThemeProvider = ({\n children,\n theme: themeColor,\n}: Props) => {\n const theme = React.useMemo(\n () => createMuiStrictModeTheme(getTheme(themeColor)),\n [themeColor]\n );\n\n return (\n \n \n \n {children}\n \n \n );\n};\n","import * as React from 'react';\nimport { useLocalStorage } from 'react-use';\nimport {\n ThemeProvider as MuiThemeProvider,\n Theme,\n StyledEngineProvider,\n} from '@mui/material/styles';\nimport { CssBaseline } from '@mui/material';\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';\nimport { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';\n\nimport { ColorModeContext } from './ColorModeContext';\nimport { getTheme } from 'theme/common';\n\ndeclare module '@mui/styles/defaultTheme' {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface DefaultTheme extends Theme {}\n}\n\ninterface Props {\n children: React.ReactNode;\n}\n\nexport const ThemeProvider = ({ children }: Props) => {\n const [themeLS, setThemeLS] = useLocalStorage('app.theme', 'system');\n\n const colorMode = React.useMemo(\n () => ({\n setColorMode: (newMode) => {\n setThemeLS(newMode);\n },\n colorValue: themeLS,\n }),\n [setThemeLS, themeLS]\n );\n\n const theme = React.useMemo(() => {\n if (\n colorMode.colorValue === 'dark' ||\n (colorMode.colorValue == 'system' &&\n window.matchMedia('(prefers-color-scheme: dark)').matches)\n ) {\n return getTheme('dark');\n }\n\n return getTheme('light');\n }, [colorMode.colorValue]);\n\n return (\n \n \n \n \n \n {children}\n \n \n \n \n );\n};\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Warning'\n);\n\nexport function WarningIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","export const IOS_APP_LINK =\n 'https://apps.apple.com/us/app/distrikt-social/id1590176124';\nexport const ANDROID_APP_LINK =\n 'https://play.google.com/store/apps/details?id=app.distrikt.distrikt';\n","// Set how many items should be displayed on comments on post page\nexport const COMMENTS_INITIAL_ITEMS_LIMIT = 20;\n\n// Set how many items should be fetched with \"show more\"\nexport const COMMENTS_LOAD_ITEMS_LIMIT = 20;\n","import { TimeUnit, timeUnits, UnitConfig } from 'types';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\nimport {\n getHigherUnits,\n getLowerUnits,\n} from '../components/Compose/ComposePoll/utils';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\n\ndayjs.extend(duration);\n\nexport const MAX_POLL_CHOICES = 5 as const;\nexport const MAX_POLL_CHOICE_CHAR_COUNT = 35 as const;\n\nexport const DEFAULT_POLL_DURATION = dayjs.duration({\n days: 1,\n hours: 0,\n minutes: 0,\n});\n\nconst minPollDuration = {\n days: 0,\n hours: 1,\n minutes: 0,\n} as const;\n\nconst maxPollDuration = {\n days: 7,\n hours: 0,\n minutes: 0,\n};\n\nexport const MIN_POLL_DURATION = dayjs.duration(minPollDuration);\nexport const MAX_POLL_DURATION = dayjs.duration(maxPollDuration);\n\nexport const TOP_SIGNIFICANT_POLL_UNIT = timeUnits.find(\n (key: TimeUnit) => minPollDuration[key] > 0\n);\nexport const lowerThanTopSignificantUnits = getLowerUnits(\n TOP_SIGNIFICANT_POLL_UNIT\n);\nexport const higherThanTopSignificantUnits = getHigherUnits(\n TOP_SIGNIFICANT_POLL_UNIT\n);\n\nexport const BOTTOM_SIGNIFICANT_POLL_UNIT = [...timeUnits]\n .reverse()\n .find((key: TimeUnit) => maxPollDuration[key] > 0);\nexport const lowerThanBottomSignificantUnits = getLowerUnits(\n BOTTOM_SIGNIFICANT_POLL_UNIT\n);\nexport const higherThanBottomSignificantUnits = getHigherUnits(\n BOTTOM_SIGNIFICANT_POLL_UNIT\n);\n\nexport const NB_POLL_MANDATORY_CHOICES = 2 as const;\n\nexport const POLL_LENGTH_TIME_UNITS: readonly UnitConfig[] = [\n {\n unit: 'days',\n cap: MAX_POLL_DURATION.days() + 1,\n },\n {\n unit: 'hours',\n cap: 24,\n },\n {\n unit: 'minutes',\n cap: 60,\n },\n] as const;\n\nexport const MAX_MENTIONS_WITH_POLL = 0 as const;\n\nexport const defaultPollInfo = {\n choices: Array.from(Array(MAX_POLL_CHOICES)).map((_) =>\n createEditorStateWithText('')\n ),\n choicesVisible: Array.from(Array(MAX_POLL_CHOICES)).map((_, index: number) =>\n index <= NB_POLL_MANDATORY_CHOICES ? true : false\n ),\n isMultichoice: false,\n pollLength: DEFAULT_POLL_DURATION,\n} as const;\n","// Set how many items should be displayed on home page feed\nexport const INITIAL_VERIFICATION_ITEMS_LIMIT = 30;\n\n// Set how many items should be fetched with \"show more\"\nexport const LOAD_VERIFICATION_ITEMS_LIMIT = 30;\n","import { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport { pick } from 'lodash';\nimport { PostInfo } from 'types';\n\nimport { MIME_TYPES, MIME_TYPE_KEYS } from './';\n\n// max file size in bytes for post attachments\nexport const MAX_FILE_SIZE = 1048576; // 1mb\n\n// allowed mime types for post attachments\nexport const MIME_TYPES_POST = pick(MIME_TYPES, [\n MIME_TYPE_KEYS.JPEG,\n MIME_TYPE_KEYS.JPG,\n MIME_TYPE_KEYS.GIF,\n MIME_TYPE_KEYS.PNG,\n]);\n\nexport const defaultPostInfo: PostInfo = {\n text: createEditorStateWithText(''),\n image: null,\n mentions: [],\n};\n","import { pick } from 'lodash';\n\nimport { MIME_TYPES, MIME_TYPE_KEYS } from './';\n\n// Set how many items should be displayed on profile page activities\nexport const PROFILE_ACTIVITIES_ITEMS_LIMIT = 20;\n\n// Set how many items should be fetched with \"show more\"\nexport const LOAD_PROFILE_ACTIVITIES_ITEMS_LIMIT = 20;\n\n// Profile picture aspect ratio used while uploading/cropping new image\nexport const PROFILE_PICTURE_ASPECT_RATIO = 1;\n\n// Profile cover picture aspect ratio used while uploading/cropping new image\nexport const PROFILE_COVER_PICTURE_ASPECT_RATIO = 4;\n\n// allowed mime types for profile picture attachments\nexport const MIME_TYPES_PROFILE = pick(MIME_TYPES, [\n MIME_TYPE_KEYS.JPEG,\n MIME_TYPE_KEYS.JPG,\n MIME_TYPE_KEYS.PNG,\n]);\n","import { ThreadInfo } from 'types/thread';\nimport { defaultPostInfo } from './post';\n\nexport const defaultThreadInfo: ThreadInfo = {\n items: [defaultPostInfo],\n};\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'ProfileMention'\n);\n\nexport function ProfileMentionIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import { styled } from '@mui/material/styles';\nimport { Box } from '@mui/material';\n\nexport const LinearProgressWrapper = styled(Box)({\n position: 'absolute',\n left: '7px',\n bottom: '7px',\n width: 'calc(100% - 14px)',\n});\n","import React, { useEffect, useMemo, useState } from 'react';\nimport Grow from '@mui/material/Grow';\nimport Snackbar, { SnackbarOrigin } from '@mui/material/Snackbar';\nimport {\n Alert as AlertComponent,\n AlertColor,\n AlertTitle,\n IconButton,\n LinearProgress,\n SvgIcon,\n} from '@mui/material';\nimport { Portal } from '@mui/material';\nimport {\n Close,\n ErrorFilledIcon,\n InfoFilledIcon,\n WarningFilledIcon,\n SuccessFilledIcon,\n} from 'components/icons';\nimport * as Styled from './styles';\n\ninterface IAlertProps {\n title?: string;\n message?: string;\n onClose: () => void;\n position?: SnackbarOrigin;\n severity?: AlertColor;\n}\n\n/*\n * Alert component\n *\n * Recommended use to avoid loading component functionality until alert is needed:\n *\n * {showAlert ? (\n * setShowAlert(false)}\n * />\n * ) : null}\n *\n **/\nfunction Alert({ title, message, onClose, position, severity }: IAlertProps) {\n const [progress, setProgress] = useState(100);\n const [open, setOpen] = useState(true);\n const el = document.getElementById('modal-root');\n\n // moves the progress bar from 100 to 0 in steps of 10 every 300ms\n useEffect(() => {\n const timer = setInterval(() => {\n setProgress((oldProgress) => {\n if (oldProgress === 0) {\n startExitAnimation();\n }\n return Math.max(oldProgress - 10, 0);\n });\n }, 300);\n\n return () => {\n clearInterval(timer);\n };\n }, []);\n\n // used to hide the snackbar which has an exit animation\n // when exit animation is done, the prop onClose function will be executed\n function startExitAnimation() {\n setOpen(false);\n }\n\n const icon = useMemo(() => icons[severity], [severity]);\n const color = colors[severity];\n\n return (\n \n {\n onClose();\n },\n }}\n >\n \n \n \n }\n >\n {title ? (\n \n {title}\n \n ) : null}\n\n {message || null}\n\n \n \n \n \n \n \n );\n}\n\nconst icons = {\n info: ,\n success: ,\n warning: ,\n error: ,\n};\nconst colors = {\n info: 'colors.info',\n success: 'colors.success',\n warning: 'colors.warning',\n error: 'colors.error',\n};\n\nexport default Alert;\n","import {\n useIsMutating,\n useMutation,\n useQuery,\n useQueryClient,\n} from 'react-query';\nimport { RECENT_USERS_INITIAL_ITEMS_LIMIT } from 'constants/user';\n\nimport api, { AllFollows, Profile } from 'client';\nimport { fromIcOpt } from 'utils';\nimport { getAllFollowersLiteData } from 'pages/profile/services/follower';\nimport { useContext } from 'react';\nimport { OpenDistriktContext } from 'providers';\n\nexport function useGetUserByUsername(username?: string) {\n return useQuery(\n ['getUser', username],\n async (): Promise => {\n const data = await api.getUser(username);\n\n return fromIcOpt(data);\n },\n {\n enabled: !!username,\n }\n );\n}\n\nexport function useGetUserIdById(userId?: bigint, disabled?: boolean) {\n return useQuery(\n ['getUserById', userId],\n async () => {\n const data = await api.getUserById(userId);\n\n return fromIcOpt(data);\n },\n {\n enabled: !!userId && !disabled,\n }\n );\n}\n\nexport function useGetUserIdByUsername(username?: string) {\n return useQuery(\n ['getUserByUsername', username],\n (): Promise => {\n return api.getUserByUsername(username);\n },\n {\n enabled: !!username,\n }\n );\n}\n\nexport function useGetArticles() {\n return useQuery(['getArticles'], () => api.getArticles(0n, 10n));\n}\n\nexport function useGetFollowCount(userId: bigint) {\n const queryClient = useQueryClient();\n\n return useQuery(\n ['getFollowCounts', userId],\n () => api.getFollowCounts(userId),\n {\n enabled: !!userId,\n onSuccess: () => {\n queryClient.invalidateQueries(getAllFollowersLiteData);\n },\n refetchInterval: 60 * 1000, // 1 minute,\n }\n );\n}\n\nexport function useGetCurrentProfileFollowCount(username: string) {\n const { data: userId } = useGetUserIdByUsername(username);\n return useGetFollowCount(userId);\n}\n\nexport function useGetLatestUsers() {\n return useQuery(\n ['getLatestUsers'],\n (): Promise => {\n return api.getLatestUsers(RECENT_USERS_INITIAL_ITEMS_LIMIT);\n }\n );\n}\n\nexport function useRemoveFollower() {\n const queryClient = useQueryClient();\n return useMutation(\n ({ userId }: { userId: bigint }) => api.removeFollower(userId),\n {\n onMutate: async (variables) => {\n await queryClient.cancelQueries({\n queryKey: ['isFollowedBy', variables.userId],\n });\n\n const previousValue = queryClient.getQueryData([\n 'isFollowedBy',\n variables.userId,\n ]);\n\n queryClient.setQueryData(['isFollowedBy', variables.userId], false);\n\n return { previousValue };\n },\n onError: (_, variables, context) => {\n queryClient.setQueryData(\n ['isFollowedBy', variables.userId],\n context.previousValue\n );\n },\n onSuccess: (_, variables) => {\n queryClient.invalidateQueries(['isFollowedBy', variables.userId]);\n },\n onSettled: (data, error, variables) => {\n queryClient.invalidateQueries(['isFollowedBy', variables.userId]);\n queryClient.invalidateQueries(['getFollowCounts']);\n },\n }\n );\n}\n\nexport function useFollow() {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const isMutatingFollow = useIsMutating(['followUser']);\n\n return useMutation(\n ({ userId }: { userId: bigint }) => api.followUser(userId),\n {\n mutationKey: ['followUser'],\n onMutate: ({ userId }) => {\n const previous = queryClient.getQueryData(['isFollowing', userId]);\n const previousCount = queryClient.getQueryData([\n 'getFollowCounts',\n userId,\n ]);\n const previousAuthCount =\n authUser &&\n queryClient.getQueryData(['getFollowCounts', authUser.id]);\n\n queryClient.setQueryData(['isFollowing', userId], () => {\n return true;\n });\n\n // set up follow count for userId\n if (previousCount) {\n queryClient.setQueryData(\n ['getFollowCounts', userId],\n (prev: { followed: bigint; followers: bigint }) => ({\n ...prev,\n followers: prev.followers + 1n,\n })\n );\n }\n\n // set up follow count for authUser\n if (previousAuthCount) {\n queryClient.setQueryData(\n ['getFollowCounts', authUser?.id],\n (prev: { followed: bigint; followers: bigint }) => ({\n ...prev,\n followed: prev.followed + 1n,\n })\n );\n }\n\n return () => {\n queryClient.setQueryData(['isFollowing', userId], previous);\n\n previousCount &&\n queryClient.setQueryData(\n ['getFollowCounts', userId],\n previousCount\n );\n previousAuthCount &&\n queryClient.setQueryData(\n ['getFollowCounts', userId],\n previousAuthCount\n );\n };\n },\n onSuccess: (_, variables) => {\n // if any other mutation is in progress, don't invalidate the query\n if (!isMutatingFollow) {\n queryClient.invalidateQueries(['isFollowing', variables.userId]);\n queryClient.invalidateQueries(['getFollowCounts']);\n }\n },\n onError: (_, __, rollback) => {\n // If the mutation fails, use the value returned from onMutate to roll back\n rollback instanceof Function && rollback();\n },\n }\n );\n}\n\nexport function useUnfollow() {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const isMutatingFollow = useIsMutating(['followUser']);\n\n return useMutation(\n ({ userId }: { userId: bigint }) => api.unfollowUser(userId),\n {\n mutationKey: ['followUser'],\n onMutate: ({ userId }) => {\n const previous = queryClient.getQueryData(['isFollowing', userId]);\n const previousCount = queryClient.getQueryData([\n 'getFollowCounts',\n userId,\n ]);\n const previousAuthCount =\n authUser &&\n queryClient.getQueryData(['getFollowCounts', authUser.id]);\n\n queryClient.setQueryData(['isFollowing', userId], () => {\n return false;\n });\n\n if (previousCount) {\n queryClient.setQueryData(\n ['getFollowCounts', userId],\n (prev: { followed: bigint; followers: bigint }) => ({\n ...prev,\n followers: prev.followers - 1n,\n })\n );\n }\n\n if (previousAuthCount) {\n queryClient.setQueryData(\n ['getFollowCounts', authUser?.id],\n (prev: { followed: bigint; followers: bigint }) => ({\n ...prev,\n followed: prev.followed - 1n,\n })\n );\n }\n\n return () => {\n queryClient.setQueryData(['isFollowing', userId], previous);\n queryClient.setQueryData(['getFollowCounts', userId], previousCount);\n previousAuthCount &&\n queryClient.setQueryData(\n ['getFollowCounts', userId],\n previousAuthCount\n );\n };\n },\n onSuccess: (_, variables) => {\n // if any other mutation is in progress, don't invalidate the query\n if (!isMutatingFollow) {\n queryClient.invalidateQueries(['isFollowing', variables.userId]);\n queryClient.invalidateQueries(['getFollowCounts']);\n }\n },\n onError: (_, __, rollback) => {\n rollback instanceof Function && rollback();\n },\n }\n );\n}\n\nexport function useRemoveUser() {\n return useMutation(async ({ id }: { id: bigint }) => {\n return api.removeUser(id);\n });\n}\n\nexport function useBlockUser() {\n return useMutation(async ({ id }: { id: bigint }) => {\n return api.blockUser(id);\n });\n}\n\nexport function useUnblockUser() {\n return useMutation(\n async ({ id }: { id: bigint }) => {\n return api.unblockUser(id);\n },\n {\n mutationKey: ['unblockUser'],\n }\n );\n}\n\nexport function useIsFollowedByNoInit(userId?: bigint) {\n const { mode } = useContext(OpenDistriktContext);\n\n return useQuery(\n ['isFollowedBy', userId],\n async () => api.isFollowedBy(userId),\n {\n enabled: !!userId && mode === 'User',\n }\n );\n}\n\nexport function useIsFollowedBy(userId?: bigint) {\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n const follows = queryClient.getQueryData([\n 'getAllFollows',\n auth?.id,\n ]);\n const { mode } = useContext(OpenDistriktContext);\n\n return useQuery(\n ['isFollowedBy', userId],\n () => api.isFollowedBy(userId),\n {\n initialData: () => {\n if (!follows) {\n return undefined;\n }\n\n return follows.followers.includes(userId);\n },\n enabled: !!userId && mode === 'User',\n }\n );\n}\n\nexport function useIsFollowing(userId?: bigint) {\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n const follows = queryClient.getQueryData([\n 'getAllFollows',\n auth?.id,\n ]);\n\n return useQuery(\n ['isFollowing', userId],\n () => api.isFollowing(userId),\n {\n initialData: () => {\n if (!follows) {\n return undefined;\n }\n\n return follows.followed.includes(userId);\n },\n enabled: !!userId && !follows,\n }\n );\n}\n","export { default } from './Loading';\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n tooltipStyle: {\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow:\n theme.palette.mode === 'light'\n ? '0 2px 16px 0 rgba(76,70,212,0.19)'\n : 'none',\n color: theme.palette.text.primary,\n fontSize: 12,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 20,\n paddingRight: 20,\n },\n tooltipArrow: {\n color: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n },\n}));\n","import { Tooltip } from '@mui/material';\nimport React from 'react';\nimport { useStyles } from './styles';\n\ninterface GetCustomExternalLinkProps {\n tooltip?: boolean;\n nbCharsDisplayed?: number;\n}\n\nconst defaultProps: GetCustomExternalLinkProps = {\n tooltip: false,\n nbCharsDisplayed: 40,\n};\n\ninterface ICustomExternalLinkProps {\n href: string;\n props: unknown;\n children?: React.ReactNode;\n}\n\nexport const getCustomExternalLink = ({\n tooltip,\n nbCharsDisplayed,\n} = defaultProps) => {\n // eslint-disable-next-line react/display-name\n return ({ children, href, ...props }: ICustomExternalLinkProps) => {\n const classes = useStyles();\n\n const regexString = `(.{${nbCharsDisplayed}})..+`;\n const regex = new RegExp(regexString, 'g');\n\n const link = (\n \n {children?.replace?.(regex, '$1…') || children}\n \n );\n\n return tooltip ? (\n \n {link}\n \n ) : (\n link\n );\n };\n};\n","import { styled } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport MuiDialog from '@mui/material/Dialog';\nimport MuiDialogActions from '@mui/material/DialogActions';\nimport MuiDialogContent from '@mui/material/DialogContent';\nimport MuiDialogTitle from '@mui/material/DialogTitle';\n\nexport const Dialog = styled(MuiDialog)(({ theme }) => ({\n '& .MuiDialog-paper': {\n border: '1px solid',\n borderColor: theme.palette.colors.ui_04,\n borderRadius: '16px',\n overflowY: 'initial',\n },\n}));\n\nexport const DialogTitle = styled(MuiDialogTitle)(({ theme }) => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'space-between',\n paddingBottom: '16px',\n paddingRight: '16px',\n verticalAlign: 'middle',\n\n [theme.breakpoints.only('xs')]: {\n padding: '12px 16px',\n paddingRight: '8px',\n paddingBottom: '16px',\n },\n\n '& button': {\n marginLeft: '32px',\n },\n}));\n\nexport const DialogContent = styled(MuiDialogContent)(({ theme }) => ({\n alignItems: 'flex-start',\n display: 'flex',\n flexDirection: 'column',\n padding: '24px',\n\n [theme.breakpoints.only('xs')]: {\n padding: '16px',\n },\n}));\n\nexport const DialogActions = styled(MuiDialogActions)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: '24px',\n\n [theme.breakpoints.only('xs')]: {\n padding: '16px',\n },\n}));\n\nexport const useStyles = makeStyles(() => ({\n ctaButtonBox: {\n display: 'flex',\n },\n}));\n","import React, { useState } from 'react';\n\nimport Button from '@mui/material/Button';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport { Divider, IconButton, SxProps, Theme } from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\nimport * as Styled from './styles';\nimport { useStyles } from './styles';\nimport { Close, RemoveIcon } from 'components/icons';\nimport Loading from 'components/Loading';\n\ninterface IDialogProps {\n children?: React.ReactNode;\n closeOnSubmit?: boolean;\n warning?: boolean;\n ctaText?: string;\n cancelText?: string;\n loading?: boolean;\n disabled?: boolean;\n hideDivider?: boolean;\n message?: string;\n onClose: () => void;\n onSubmit?: () => void | Promise;\n onCancel?: () => void;\n title?: string;\n fullWidth?: boolean;\n maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n cancelColor?: 'error' | 'primary';\n onlySubmit?: boolean;\n noBtns?: boolean;\n disableInlingLoading?: boolean;\n secondarySubmitIcon?: React.ReactNode;\n secondarySubmit?: string | React.ReactNode; // text on button or the whole Typography comp\n onSecondarySubmit?: () => void;\n secondarySubmitDisabled?: boolean;\n sx?: SxProps;\n form?: string;\n closeOnBackdropClick?: boolean;\n}\n\n/*\n * Dialog base component\n *\n * Recommended use to avoid loading component functionality until dialog is needed:\n *\n * {isOpen ? (\n * setIsOpen(false)}\n * />\n * ) : null}\n *\n **/\nfunction Dialog({\n title,\n ctaText = 'Subscribe',\n cancelText = 'Cancel',\n loading = false,\n disabled = false,\n closeOnSubmit = true,\n message,\n children,\n hideDivider,\n onSubmit,\n onCancel,\n onClose,\n warning,\n cancelColor,\n fullWidth,\n maxWidth = 'sm', // MuiDialog default\n onlySubmit = false,\n noBtns = false,\n sx,\n form,\n disableInlingLoading,\n secondarySubmitIcon,\n secondarySubmit,\n onSecondarySubmit,\n secondarySubmitDisabled,\n closeOnBackdropClick = false,\n}: IDialogProps) {\n const classes = useStyles();\n const [open, setOpen] = useState(true);\n // used to hide the snackbar which has an exit animation\n // when exit animation is done, the prop onClose function will be executed\n function startExitAnimation() {\n setOpen(false);\n }\n\n const handleSubmit = async (e) => {\n e.preventDefault();\n e.stopPropagation();\n\n await onSubmit();\n\n if (closeOnSubmit) {\n startExitAnimation();\n }\n };\n const hasSubmit = !!onSubmit || !!form;\n const theme = useTheme();\n return (\n \n (reason !== 'backdropClick' || closeOnBackdropClick) &&\n startExitAnimation() // used to disabled the backdrop click event\n }\n TransitionProps={{\n // when exit animation is done, call the prop onClose to destory the comp and clear any data\n onExited: () => {\n onClose();\n },\n }}\n >\n {title && (\n \n {title}\n \n \n \n \n )}\n\n \n {message ? {message} : null}\n\n {children}\n \n\n {!noBtns && (\n <>\n {!hideDivider ? : null}\n\n \n {!onlySubmit && (\n \n {!hasSubmit ? ctaText : cancelText}\n \n )}\n
\n {(secondarySubmit || secondarySubmitIcon) && (\n ({\n marginRight: 2,\n [theme.breakpoints.only('xs')]: {\n marginRight: 1.5,\n paddingLeft: '16px',\n paddingRight: '16px',\n },\n })}\n variant=\"outlined\"\n color=\"primary\"\n size=\"small\"\n startIcon={secondarySubmitIcon}\n disabled={secondarySubmitDisabled}\n onClick={onSecondarySubmit}\n >\n {secondarySubmit}\n \n )}\n {hasSubmit ? (\n
\n {!disableInlingLoading && loading ? : null}\n \n {ctaText}\n \n
\n ) : null}\n
\n \n \n )}\n \n );\n}\n\nexport default Dialog;\n","import React, { useCallback, useMemo } from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Link } from 'react-router-dom';\nimport { Box, ListItemAvatar, ListItemText, Typography } from '@mui/material';\nimport MoreButton, { IMoreButtonItem } from 'components/Buttons/MoreButton';\nimport FollowButton from '../../../components/Buttons/FollowButton';\nimport UserAvatar from '../../../components/UserAvatar/UserAvatar';\nimport { renderUserBadge } from '../../../utils/moderationShortcuts';\nimport { UserRemoveIcon, WalletIcon } from 'components/icons';\nimport { fromIcEnum } from 'utils';\nimport { Wallet } from 'client';\nimport { useIsFollowedBy, useRemoveFollower } from 'services';\n\nconst useStyles = makeStyles((theme) => ({\n name: {\n fontSize: 14,\n textDecoration: 'none',\n fontWeight: 'bold',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n display: 'block',\n paddingRight: theme.spacing(2),\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n listItemAvatar: {\n minWidth: 40,\n marginRight: theme.spacing(2),\n },\n}));\n\ninterface Props {\n user: any;\n allowMoreActions?: boolean;\n disabled?: boolean;\n}\n\nconst User = ({ user, allowMoreActions = false, disabled = false }: Props) => {\n const classes = useStyles();\n\n const preferredWalletAddress = useMemo(() => {\n const preferredWallet = fromIcEnum(user.preferred_wallet) as string;\n return preferredWallet && preferredWallet !== 'None'\n ? user.wallet_addresses?.find(\n (wallet: Wallet) => preferredWallet in wallet\n )?.[preferredWallet]\n : undefined;\n }, [user.preferred_wallet, user.wallet_addresses]);\n\n const { data: followed, isLoading: isFollowedLoading } = useIsFollowedBy(\n user?.id\n );\n\n const {\n mutate: removeFollower,\n isLoading: isRemovingFollower,\n } = useRemoveFollower();\n\n const handleRemoveFollower = useCallback(() => {\n if (followed) {\n removeFollower({\n userId: user?.id,\n });\n }\n }, [followed, removeFollower, user?.id]);\n\n const moreButtonItems: Array = useMemo(() => {\n if (!allowMoreActions) {\n return [];\n }\n\n return [\n {\n disabled: !preferredWalletAddress,\n title: preferredWalletAddress\n ? 'Copy Wallet Address'\n : 'No Wallet Address',\n icon: ,\n handleClick: async () => {\n navigator.clipboard.writeText(preferredWalletAddress);\n },\n alertMessage: 'Wallet Address copied to clipboard',\n },\n {\n disabled: !followed || isFollowedLoading || isRemovingFollower,\n title: followed ? 'Remove Follower' : 'Removed',\n icon: ,\n handleClick: handleRemoveFollower,\n danger: true,\n },\n ];\n }, [\n allowMoreActions,\n followed,\n handleRemoveFollower,\n isFollowedLoading,\n isRemovingFollower,\n preferredWalletAddress,\n ]);\n\n return (\n <>\n \n \n \n \n \n {user.display_name}\n {renderUserBadge(user, { className: classes.teamBadge })}\n \n }\n secondary={`@${user.username}`}\n primaryTypographyProps={{\n noWrap: true,\n }}\n secondaryTypographyProps={{\n noWrap: true,\n color: 'textPrimary',\n style: {\n opacity: 0.65,\n },\n }}\n />\n \n\n \n \n {allowMoreActions && (\n \n )}\n \n \n );\n};\n\nexport default User;\n","import React from 'react';\nimport { styled, SxProps } from '@mui/material/styles';\nimport { get } from 'lodash';\nimport { List, ListItem, Theme } from '@mui/material';\n\nimport User from 'pages/profile/Follows/User';\n\ninterface IUserListProps {\n data: Array;\n path?: string;\n disabledPath?: string;\n reversedDisabled?: boolean;\n children?: React.ReactNode;\n UserComponent?: React.ComponentType;\n allowMoreActions?: boolean;\n sx?: SxProps;\n}\n\nfunction UserList({\n allowMoreActions = false,\n data,\n path,\n disabledPath,\n reversedDisabled,\n UserComponent,\n sx,\n}: IUserListProps): JSX.Element {\n return (\n \n {data.map((d) => {\n const user = path ? get(d, path) : d;\n const disabledData = disabledPath ? get(d, disabledPath) : false;\n const disabled = reversedDisabled ? !disabledData : disabledData;\n\n return (\n \n {UserComponent ? (\n React.createElement(UserComponent, {\n user,\n disabled,\n })\n ) : (\n \n )}\n \n );\n })}\n \n );\n}\n\nconst StyledListItem = styled(ListItem)(({ theme }) => ({\n justifyContent: 'space-between',\n padding: theme.spacing(2),\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n overflow: 'auto',\n\n '&:nth-of-type(even)': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n [theme.breakpoints.only('xs')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n}));\n\nexport default UserList;\n","import {\n Box,\n Paper,\n Typography,\n Divider as MuiDivider,\n List as MuiList,\n Popper as MuiPopper,\n} from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\nexport const DropdownContainer = styled(Paper)(({ theme }) => ({\n backgroundColor: theme.palette.colors.ui_01,\n border: '1px solid',\n borderColor: theme.palette.colors.ui_04,\n borderRadius: '8px',\n boxShadow: '0 2px 16px 0 rgba(44, 40, 75, 0.12)',\n transition: 'none',\n height: 'auto',\n maxHeight: 500,\n marginTop: '4px',\n minHeight: 300,\n position: 'absolute',\n width: '100%',\n zIndex: 99,\n\n display: 'flex',\n flexDirection: 'column',\n\n [theme.breakpoints.down('md')]: {\n minHeight: 220,\n },\n\n [theme.breakpoints.only('xs')]: {\n width: 'calc(100vw - 16px)',\n left: 'calc(50 % - 50vw)',\n marginLeft: '8px',\n marginRight: '8px',\n },\n}));\n\nexport const ContainedContainer = styled(Paper)(({ theme }) => ({\n backgroundColor: theme.palette.colors.ui_01,\n transition: 'none',\n height: 'auto',\n marginTop: '4px',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n\n '& ul': {\n maxHeight: 'unset',\n },\n}));\n\nexport const HeaderContainer = styled(Box)({\n flex: '0 1 auto',\n});\n\nexport const LoadingContainer = styled(Box)({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nexport const Title = styled(Typography)(({ theme }) => ({\n color: theme.palette.colors.ui_05,\n padding: 16,\n paddingBottom: 12,\n}));\n\nexport const EmptyText = styled(Typography)(({ theme }) => ({\n textAlign: 'center',\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n color: theme.palette.colors.ui_06,\n}));\n\nexport const Divider = styled(MuiDivider)({\n marginTop: 4,\n marginBottom: 4,\n});\n\nexport const List = styled(MuiList)({\n maxHeight: 500,\n});\n\nexport const InlineLoadingContainer = styled('span')({\n alignItems: 'center',\n display: 'flex',\n paddingTop: 2,\n paddingRight: 16,\n\n '& svg': {\n transform: 'scale(2)!important',\n },\n});\n\nexport const Popper = styled(MuiPopper)(({ theme }) => ({\n // important needed because size is set by js\n [theme.breakpoints.only('xs')]: {\n width: '100% !important',\n left: '0px !important',\n },\n}));\n","import React, { ComponentType, useMemo } from 'react';\nimport { Box, ListItemButton, Typography } from '@mui/material';\nimport { Loading } from 'components';\n\nimport * as Styled from './styles';\n\ninterface IProps {\n title?: string;\n loading: boolean;\n itemCount: number;\n headerItems?: Array;\n emptyMessage?: string;\n contained?: boolean; // used to disable absolute paper\n ItemComponent?: ComponentType;\n getHeaderOptionLabel?: (headerItem: string) => string;\n onHeaderClick?: (key: string, index?: number) => void;\n children?: React.ReactNode;\n}\n\nfunction Dropdown({\n title,\n loading,\n itemCount,\n headerItems,\n emptyMessage,\n contained,\n getHeaderOptionLabel,\n onHeaderClick,\n children,\n}: IProps) {\n const Container = useMemo(() => {\n if (contained) {\n return Styled.ContainedContainer;\n }\n return Styled.DropdownContainer;\n }, [contained]);\n\n return (\n \n {title && (itemCount || headerItems?.length > 0) ? (\n \n \n {title}\n\n {loading && itemCount ? (\n \n \n \n ) : null}\n \n \n \n ) : null}\n\n {headerItems?.length > 0 && onHeaderClick ? (\n \n \n {headerItems.map((item, i) => (\n onHeaderClick(item, i)}\n >\n \n {getHeaderOptionLabel ? getHeaderOptionLabel(item) : item}\n \n \n ))}\n \n \n \n ) : null}\n\n {loading && !itemCount ? (\n \n \n \n ) : null}\n\n {children}\n\n {!loading && !itemCount ? (\n \n {emptyMessage || 'There are no results to display'}\n \n ) : null}\n \n );\n}\n\nexport default Dropdown;\n","import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { debounce } from 'lodash';\nimport {\n Autocomplete,\n AutocompleteRenderInputParams,\n Box,\n InputAdornment,\n useMediaQuery,\n Portal,\n} from '@mui/material';\nimport { Theme } from '@mui/material/styles';\nimport * as Styled from './styles';\nimport Dropdown from './Dropdown';\nimport TextField from 'components/TextInput/TextField';\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport { FollowerProfileLite } from 'client';\nimport { RemoveIcon, SearchIcon } from '../icons';\n\ninterface IProps {\n placeholder?: string;\n variant?: 'text' | 'outlined';\n disableIcon?: boolean;\n onClick: (value: FollowerProfileLite) => void;\n}\n\ninterface ISearchProps {\n placeholder?: string;\n variant?: 'text' | 'outlined';\n disableIcon?: boolean;\n onChange: (value: string) => void;\n results: Array;\n focusOnMount?: boolean;\n loading?: boolean;\n portalElementId?: string;\n headerItems?: string[];\n forceUsePortal?: boolean; // used when search is used inside a modal\n onClick: (value) => void;\n onHeaderClick?: (value: string) => void;\n getHeaderOptionLabel?: (headerItem: string) => string;\n onBlur?: (value?: string) => void;\n}\n\nfunction Search({\n portalElementId,\n focusOnMount,\n disableIcon,\n getHeaderOptionLabel,\n headerItems,\n loading, // isFetching is used instead of loading as it's used to indicate if there is background fetching as well\n onChange,\n onClick,\n onBlur,\n onHeaderClick,\n forceUsePortal,\n placeholder = 'What are you looking for?',\n results = [],\n variant = 'outlined',\n}: ISearchProps) {\n const ref = useRef(null);\n const mobileSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('xs')\n );\n const { pathname } = useLocation();\n const [term, setTerm] = useState('');\n const [searchTerm, setSearchTerm] = useState('');\n const [focus, setFocus] = useState(false);\n\n function clearSearch() {\n setTerm('');\n setSearchTerm('');\n }\n\n // used when conditionally rendering the search input. i.e. mobile app bar\n useEffect(() => {\n if (focusOnMount) {\n ref.current?.focus();\n }\n }, [focusOnMount]);\n\n useEffect(() => {\n clearSearch();\n }, [pathname]);\n\n const handleInputChange = (_, value, reason) => {\n if (reason === 'reset') {\n clearSearch();\n } else {\n // maximum length of a display name\n if (value.length < 50) {\n setTerm(value);\n debounceSearch(value);\n }\n }\n };\n\n const debounceSearch = useMemo(\n () =>\n debounce((value) => {\n setSearchTerm(value);\n onChange(value);\n }, 250),\n [onChange]\n );\n\n function handleHeaderClick(value) {\n if (onHeaderClick) {\n onHeaderClick(value);\n }\n\n setFocus(false);\n clearSearch();\n ref.current?.blur();\n }\n\n function DropdownPaperComp(props) {\n if (results.length === 0 && term.length === 0) {\n return null;\n }\n\n return (\n \n \n {props.children}\n \n \n );\n }\n\n function PopperComponent(props) {\n if (searchTerm.length < 2) {\n return null;\n }\n\n if (portalElementId) {\n const el = document.getElementById(portalElementId);\n\n return {props.children};\n }\n\n return ;\n }\n\n return (\n \n setFocus(true)}\n onClose={(e, reason) => {\n // used to allow passthrough of event to hash list item without closing drowdown\n if (reason === 'blur' && e.relatedTarget?.localName === 'li') {\n return;\n }\n\n onBlur instanceof Function && onBlur(term);\n setFocus(false);\n }}\n options={results}\n clearIcon={}\n // disabling the built-in filtering [https://mui.com/material-ui/react-autocomplete/#search-as-you-type]\n // in order to allow search query hook to handle filtering\n filterOptions={(o) => o}\n // isOptionEqualToValue={(option, value) => false}\n inputValue={term}\n getOptionLabel={(option) =>\n option.profile?.username || option.user_name\n }\n onInputChange={handleInputChange}\n onChange={(_, value) => {\n clearSearch();\n ref.current?.blur();\n\n // in case string is pass, it means no existing option is selected but instead,\n // enter was clicked while options are still loading\n if (typeof value === 'object') {\n onClick(value?.profile?.username || value?.user_name, value);\n }\n }}\n renderInput={(p) => (\n \n )}\n renderOption={(props, option) => {\n // match search enable\n return results.length || searchTerm.length >= 2 ? (\n
  • \n \n \n \n
  • \n ) : null;\n }}\n PopperComponent={PopperComponent}\n PaperComponent={DropdownPaperComp}\n />\n \n );\n}\n\nexport function Input({\n inputProps,\n InputProps,\n placeholder,\n variant,\n disableIcon,\n sx,\n ...props\n}: AutocompleteRenderInputParams & Partial) {\n return (\n {\n if (\n e.key === 'Enter' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowDown'\n ) {\n e.stopPropagation();\n }\n },\n }}\n InputProps={{\n ...InputProps,\n sx: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: 1.1428,\n '& input.MuiInputBase-input': {\n paddingTop: '10px',\n paddingBottom: '10px',\n },\n '& input.MuiAutocomplete-input.MuiAutocomplete-inputFocused': {\n paddingRight: '24px !important',\n paddingTop: '4px !important',\n paddingBottom: '4px !important',\n },\n ...(sx || {}),\n },\n className: 'showIcon',\n startAdornment: !disableIcon && (\n \n \n \n ),\n }}\n />\n );\n}\n\nexport default Search;\n","import React from 'react';\nimport { Checkbox as MuiCheckbox, CheckboxProps } from '@mui/material';\n\nimport { CheckboxChecked, CheckboxEmpty } from '../icons';\n\nfunction Checkbox(props: CheckboxProps) {\n return (\n }\n checkedIcon={}\n {...props}\n />\n );\n}\n\nexport default Checkbox;\n","import api, { Profile, VerificationRequest } from 'client';\nimport { fromIcOpt } from 'utils';\nimport { useQuery } from 'react-query';\nimport { useContext } from 'react';\nimport { OpenDistriktContext } from 'providers';\n\n// TODO revisit stale/cache time for this based on II\nexport function useGetSelf() {\n const { recomputeMode } = useContext(OpenDistriktContext);\n\n return useQuery(\n ['getSelf'],\n async (): Promise => {\n const data = await api.getSelf();\n\n const res = fromIcOpt(data);\n if (!res) {\n throw Error('User not logged in');\n }\n\n return res;\n },\n {\n staleTime: 5 * 60 * 1000,\n cacheTime: 30 * 60 * 1000,\n onSettled: async (data: Profile) => {\n recomputeMode(false, data);\n },\n }\n );\n}\n\nexport function useIsUserTrusted(userId?: bigint) {\n return useQuery(\n ['isUserTrusted', userId],\n () => api.isUserTrusted(userId),\n {\n enabled: !!userId,\n staleTime: 5 * 60 * 1000,\n cacheTime: 30 * 60 * 1000,\n }\n );\n}\n\nexport function useIsUserVerified() {\n return useQuery<[] | [VerificationRequest]>(\n ['isUserVerified'],\n async (): Promise<[] | [VerificationRequest]> => {\n const request = await api.getUserVerificationRequestMaybe();\n\n if (request.length === 0) return [];\n else return request[Object.keys(request)[0]];\n }\n );\n}\n\nexport function useGetSelfUserId() {\n return useQuery(['getSelfUserId'], () => api.getSelfUserId());\n}\n","import React from 'react';\nimport api from '../client';\n\n// TODO the f\nexport const sendHeartbeat = () => {\n api.tokenRefresh().catch(() => {\n console.log(`Unable to send heartbeat.`);\n });\n};\n\nexport const HeartbeatView = () => {\n React.useEffect(() => {\n sendHeartbeat();\n }, []);\n\n return null;\n};\n","import { Principal } from '@dfinity/principal';\nimport { useMemo } from 'react';\nimport { useQueryClient } from 'react-query';\n\nimport { extractNftIndex } from '../utils';\nimport { principalToAccountIdentifier } from '../NftDropzone/utils/nftUtils';\n\nexport function useIsUserNftOwner(\n principal?: Principal,\n nftUrl?: string\n): boolean {\n const queryClient = useQueryClient();\n const registry = queryClient.getQueryData<[number, string][] | undefined>([\n 'getRegistry',\n ]);\n\n return useMemo(() => {\n if (!principal || !nftUrl) {\n return false;\n }\n if (!nftUrl.includes(process.env.REACT_APP_NFT_CANISTER_ID)) return false;\n const nftIndex = extractNftIndex(nftUrl);\n if (nftIndex === undefined || !registry) {\n return false;\n }\n const accountIdentifier = principalToAccountIdentifier(principal);\n if (!registry[nftIndex]) return false;\n return registry[nftIndex][1] === accountIdentifier;\n }, [nftUrl, registry, principal]);\n}\n","import React from 'react';\n\nexport const ColorModeContext = React.createContext({\n colorValue: 'light',\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setColorMode: (newMode: string) => {},\n});\n","import { QueryKey, useQuery, useQueryClient } from 'react-query';\n\nimport api, { Profile, ProfileLiteWithPreferredWallet } from 'client';\nimport { EXPORT_FOLLOWERS_ITEMS_LIMIT } from '../constants';\n\ninterface GetAllFollowerLiteDataProps {\n enabled: boolean;\n onSettled: () => void;\n onSuccess: (data: Array) => void;\n}\n\nexport const getAllFollowersLiteData: QueryKey = 'getAllFollowersLiteData';\n\nexport function useGetAllFollowerLiteData({\n enabled,\n onSettled,\n onSuccess,\n}: GetAllFollowerLiteDataProps) {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n\n return useQuery(\n [getAllFollowersLiteData],\n async () => {\n const followCounts = queryClient.getQueryData<{\n followed: BigInt;\n followers: BigInt;\n }>(['getFollowCounts', authUser?.id || 0n]);\n\n const pageSize = BigInt(EXPORT_FOLLOWERS_ITEMS_LIMIT);\n\n const followers: Array = [];\n for (\n let offset = BigInt(0);\n offset < followCounts?.followers;\n offset += pageSize\n ) {\n const items = await api.getFollowersWithLitePreferredWallet(\n authUser?.id || 0n,\n offset,\n pageSize\n );\n\n followers.push(...items);\n }\n\n return followers;\n },\n {\n initialData: [],\n staleTime: 30 * 60 * 1000,\n cacheTime: 30 * 60 * 1000,\n enabled,\n onSuccess: onSuccess,\n onSettled: onSettled,\n }\n );\n}\n","import * as React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport {\n Typography,\n IconButton,\n Button,\n AppBar as MuiAppBar,\n styled,\n SxProps,\n Theme,\n useMediaQuery,\n} from '@mui/material';\nimport { useHistory } from 'react-router-dom';\n\nimport { ArrowBackIcon } from '../icons';\nimport { OpenDistriktContext } from 'providers';\n\nconst useStyles = makeStyles((theme) => ({\n header: {\n paddingTop: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n marginBottom: 0,\n },\n container: {\n display: 'flex',\n justifyContent: 'space-between',\n width: '100%',\n },\n titleContainer: {\n marginLeft: theme.spacing(1),\n width: '100%',\n marginTop: ({ withChildren }) => theme.spacing(withChildren ? 3 : 0),\n marginBottom: ({ withChildren }) => theme.spacing(withChildren ? 2 : 0),\n [theme.breakpoints.only('xs')]: {\n marginTop: ({ withChildren }) => theme.spacing(withChildren ? 2 : 0),\n },\n },\n leftContainer: {\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n width: '100%',\n [theme.breakpoints.down('sm')]: {\n marginLeft: theme.spacing(-1),\n },\n },\n button: {\n marginRight: theme.spacing(1),\n whiteSpace: 'nowrap',\n [theme.breakpoints.down('sm')]: {\n marginRight: theme.spacing(-1),\n },\n\n [theme.breakpoints.only('xs')]: {\n padding: '8px 16px',\n },\n },\n backButton: {\n '& svg': {\n fontSize: 20,\n },\n },\n appBar: {\n height: ({ withChildren }) => (withChildren ? 'auto' : 72),\n [theme.breakpoints.only('xs')]: {\n height: ({ withChildren }) => (withChildren ? 'auto' : 56),\n },\n },\n children: {\n color: theme.palette.colors.ui_07,\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n position: 'absolute',\n left: 0,\n right: 0,\n backgroundColor: theme.palette.colors.ui_01,\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n '&:before': {\n display: 'block',\n content: '\" \"',\n position: 'absolute',\n top: 0,\n bottom: theme.spacing(1),\n left: theme.spacing(3),\n width: theme.spacing(1),\n background:\n theme.palette.mode === 'light'\n ? 'linear-gradient(to right, #FFFF, #FFF0)'\n : 'linear-gradient(to right, #1F1D30FF, #1F1D3000)',\n zIndex: 1,\n },\n '&:after': {\n display: 'block',\n content: '\" \"',\n position: 'absolute',\n top: 0,\n bottom: theme.spacing(1),\n right: theme.spacing(3),\n width: theme.spacing(1),\n background:\n theme.palette.mode === 'light'\n ? 'linear-gradient(to left, #FFFF, #FFF0)'\n : 'linear-gradient(to left, #1F1D30FF, #1F1D3000)',\n zIndex: 1,\n },\n },\n}));\n\ninterface Props {\n title: string;\n showBackButton?: boolean;\n showRightButton?: boolean;\n showDivider?: boolean | Array<'xs' | 'sm' | 'md'>;\n showDividerOnlyOnScroll?: boolean;\n buttonTitle?: string;\n buttonVariant?: 'text' | 'outlined' | 'contained';\n buttonDisabled?: boolean;\n buttonComponent?: 'link' | 'button';\n sx?: SxProps;\n onClick?: any;\n children?: React.ReactNode;\n withChildren?: boolean;\n}\n\nconst PageHeader = ({\n title,\n showBackButton = true,\n showRightButton = false,\n showDivider,\n buttonTitle,\n onClick,\n buttonVariant = 'contained',\n buttonDisabled,\n sx,\n showDividerOnlyOnScroll = false,\n children,\n withChildren,\n}: Props) => {\n const classes = useStyles({ withChildren });\n const history = useHistory();\n const [scrollOnTop, setScrollOnTop] = React.useState(false);\n const onScroll = () => {\n setScrollOnTop(window.pageYOffset === 0);\n };\n React.useEffect(() => {\n window.addEventListener('scroll', onScroll);\n onScroll();\n return () => window.removeEventListener('scroll', onScroll);\n }, []);\n\n const { mode } = React.useContext(OpenDistriktContext);\n\n const guestView = React.useMemo(() => mode !== 'User', [mode]);\n\n const tabletSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('sm')\n );\n\n return (\n \n
    \n
    \n {showBackButton && history.length > 2 && (\n history.goBack()}\n size=\"small\"\n className={classes.backButton}\n >\n \n \n )}\n
    \n \n {title}\n \n {withChildren && !!children && (\n
    {children}
    \n )}\n
    \n
    \n\n {showRightButton && (\n \n {buttonTitle}\n \n )}\n
    \n \n );\n};\n\nconst Title = styled(Typography)(({ theme }) => ({\n display: 'block',\n width: 'calc(100% - 36px)',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n [theme.breakpoints.only('xs')]: {\n ...theme.typography.bodyb,\n },\n}));\n\nconst AppBar = styled(MuiAppBar)<\n Pick & { guestView: boolean }\n>(({ theme, showDivider, withChildren, guestView, sx }) => ({\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n height: 72,\n justifyContent: 'space-between',\n paddingLeft: '24px',\n paddingRight: '24px',\n\n '& svg': {\n fontSize: '20px',\n },\n\n [theme.breakpoints.only('xs')]: {\n position: withChildren ? 'fixed' : 'relative',\n top: sx?.top || (withChildren ? (guestView ? 112 : 56) : 0),\n height: withChildren ? 'auto' : 56,\n zIndex: 10,\n },\n ...(typeof showDivider === 'object' && showDivider.includes('xs')\n ? {\n [theme.breakpoints.only('xs')]: {\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n },\n }\n : {}),\n\n ...(typeof showDivider === 'object' && showDivider.includes('sm')\n ? {\n [theme.breakpoints.only('sm')]: {\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n },\n }\n : {}),\n\n ...(typeof showDivider === 'object' && showDivider.includes('md')\n ? {\n [theme.breakpoints.up('md')]: {\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n },\n }\n : {}),\n\n ...(showDivider === true\n ? {\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n }\n : {}),\n}));\n\nexport default PageHeader;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n root: {\n '& .MuiOutlinedInput-input': {\n fontSize: theme.typography.fontSize,\n },\n },\n inputTopLabel: {\n color: theme.palette.colors.ui_07,\n lineHeight: 1.41,\n },\n inputBottomLabel: {\n color: theme.palette.colors.ui_06,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n },\n inputDisabledLabel: {\n color: theme.palette.colors.ui_05,\n lineHeight: 1.41,\n },\n lengthLimitLabel: {\n color: theme.palette.colors.ui_07,\n },\n topLabelContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n errorIcon: {\n color: theme.palette.colors.danger,\n },\n noDisplay: {\n display: 'none',\n },\n}));\n","import { FormHelperText } from '@mui/material';\nimport React from 'react';\nimport { useTheme } from '@mui/material/styles';\nimport { useStyles } from './styles';\n\nfunction TextLimitCount({\n valueLength,\n lengthLimit,\n focused,\n}: {\n valueLength: number;\n lengthLimit: number;\n focused: boolean;\n}) {\n const theme = useTheme();\n const classes = useStyles();\n const helperText = React.useMemo(() => {\n if (focused) {\n return `${valueLength}/${lengthLimit}`;\n }\n return '';\n }, [focused, valueLength, lengthLimit]);\n\n return (\n = lengthLimit\n ? theme.palette.colors.danger\n : theme.palette.text.primary,\n }}\n >\n {helperText}\n \n );\n}\n\nexport default TextLimitCount;\n","import React, { useCallback, useMemo } from 'react';\nimport {\n Box,\n FormControl,\n FormHelperText,\n InputAdornment,\n InputBaseProps,\n OutlinedInputProps,\n SvgIcon,\n TextField,\n TextFieldProps,\n useTheme,\n} from '@mui/material';\n\nimport TextLimitCount from './TextLimitCount';\nimport { Warning } from 'components/icons';\nimport { useStyles } from './styles';\nimport CopyButton from 'components/Buttons/CopyButton';\nimport { EditorState, getDefaultKeyBinding, RichUtils } from 'draft-js';\nimport Editor from '@draft-js-plugins/editor';\n\ntype MUITextFieldVariant = TextFieldProps['variant'];\n\nexport interface DesignSystemTextFieldProps {\n gutters?: boolean;\n required?: boolean;\n name: string;\n onBlur?: (e: React.FocusEvent) => void;\n onChange?: any;\n onFocus?: any;\n placeholder: string;\n inputLabel?: string;\n bottomLabel?: string;\n disabled?: boolean;\n error?: boolean;\n errorText?: string;\n fullWidth?: boolean;\n lengthLimit?: number;\n multiline?: boolean;\n rows?: number;\n value?: string | EditorState;\n enableLimitCount?: boolean;\n variant?: MUITextFieldVariant | 'editor';\n InputProps?: Partial;\n inputProps?: InputBaseProps['inputProps'];\n props?: any;\n copyToClipboard?: boolean;\n copyToClipboardToastMessage?: string;\n plugins?: any;\n}\n\nconst DesignSystemTextField = ({\n gutters,\n required,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n inputLabel,\n name,\n value,\n errorText = 'This field is mandatory',\n rows,\n fullWidth = false,\n error = false,\n multiline = false,\n disabled = false,\n enableLimitCount = false,\n bottomLabel = undefined,\n lengthLimit = undefined,\n variant = 'outlined',\n InputProps,\n inputProps,\n copyToClipboard,\n copyToClipboardToastMessage,\n plugins,\n ...props\n}: DesignSystemTextFieldProps) => {\n const theme = useTheme();\n const classes = useStyles();\n const [focused, setFocused] = React.useState(false);\n\n const editor = React.useRef(null);\n\n const valueText = useMemo(\n () =>\n value\n ? typeof value === 'string'\n ? value\n : value.getCurrentContent().getPlainText()\n : '',\n [value]\n );\n\n const mapKeyToEditorCommand = React.useCallback(\n (e) => {\n const editorState = value as EditorState;\n if (e.keyCode === 9 /* TAB */) {\n const newEditorState = RichUtils.onTab(\n e,\n editorState,\n 4 /* maxDepth */\n );\n if (newEditorState !== editorState) {\n onChange(newEditorState);\n }\n return;\n }\n return getDefaultKeyBinding(e);\n },\n [value, onChange]\n );\n\n const makeFocused = useCallback(() => {\n setFocused(true);\n onFocus?.();\n }, [onFocus]);\n\n const makeBlurred = useCallback(\n (e: React.FocusEvent) => {\n onBlur?.(e);\n setFocused(false);\n },\n [onBlur]\n );\n\n return (\n \n {inputLabel ? (\n
    \n \n {inputLabel}\n \n {enableLimitCount ? (\n \n ) : null}\n
    \n ) : null}\n\n \n {(variant === 'editor' && (\n \n {\n editor.current = element;\n }}\n readOnly={disabled}\n plugins={plugins}\n onFocus={makeFocused}\n onBlur={makeBlurred}\n />\n \n )) || (\n \n \n \n ),\n ...(InputProps || {}),\n }}\n />\n )}\n {copyToClipboard && (\n \n )}\n \n {error && errorText && {errorText}}\n {!error && bottomLabel && (\n \n {bottomLabel}\n \n )}\n \n );\n};\n\nexport default DesignSystemTextField;\n","import { pick } from 'lodash';\n\nimport { MIME_TYPE_KEYS, MIME_TYPES } from 'constants/common';\n\n// allowed mime types for experience attachments\nexport const MIME_TYPES_PROJECT = pick(MIME_TYPES, [\n MIME_TYPE_KEYS.JPEG,\n MIME_TYPE_KEYS.JPG,\n MIME_TYPE_KEYS.PNG,\n]);\n\nexport const MIME_TYPES_PROFILE = pick(MIME_TYPES, [\n MIME_TYPE_KEYS.JPEG,\n MIME_TYPE_KEYS.JPG,\n MIME_TYPE_KEYS.PNG,\n]);\n\nexport const SHOW_ALL_STATUS_INIT = {\n experiences: false,\n experienceCollabs: false,\n milestones: false,\n milestoneCollabs: false,\n};\n\nexport const PROFILE_TABS = {\n ACTIVITY: 'activity',\n EXPERIENCE: 'experience',\n};\n\n// Set how many projects are allowed per user\nexport const MAX_PROJECTS_LIMIT = 10;\n\n// Set how many items should be displayed in experience tab\nexport const INITIAL_PROJECT_ITEMS_LIMIT = 3;\n\n// Set how many items should be fetched with \"show more\"\nexport const LOAD_PROJECT_ITEMS_LIMIT = 3;\n\n// Set how many milestones are allowed per user\nexport const MAX_MILESTONES_LIMIT = 30;\n\n// Set how many items should be displayed in experience tab\nexport const INITIAL_MILESTONE_ITEMS_LIMIT = 4;\n\n// Set how many items should be fetched with \"show more\"\nexport const LOAD_MILESTONE_ITEMS_LIMIT = 4;\n\n// Set how many items should be displayed on user following and followers tabs\nexport const PROFILE_FOLLOWS_ITEMS_LIMIT = 20;\n\n// Backend limit for response payload items count\nexport const EXPORT_FOLLOWERS_ITEMS_LIMIT = 4000;\n","import { sha224 as jsSha224 } from 'js-sha256';\n\nexport function sha224(data) {\n const shaObj = jsSha224.create();\n shaObj.update(data);\n return new Uint8Array(shaObj.array());\n}\n","import {\n InfiniteData,\n QueryKey,\n useInfiniteQuery,\n useQueryClient,\n} from 'react-query';\n\nimport api, { ApiItemFeed, Profile, ApiFeedFilterParameter } from 'client';\nimport { INITIAL_ITEMS_LIMIT } from './constants';\nimport { extractApiDataOrThrow, flattenInfiniteData } from 'utils';\nimport { extractPostItemKey } from 'pages/post/utils/postItem';\n\nexport const getPaginatedOptimizedDiscoveryFeedQueryKey: QueryKey =\n 'getPaginatedOptimizedDiscoveryFeedV3';\n\nexport function useGetPaginatedOptimizedDiscoveryFeed(\n filter: ApiFeedFilterParameter\n) {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n\n return useInfiniteQuery(\n [getPaginatedOptimizedDiscoveryFeedQueryKey, filter],\n async ({ pageParam = 0 }) => {\n const data = queryClient.getQueryData>>(\n [getPaginatedOptimizedDiscoveryFeedQueryKey, filter],\n { exact: true }\n );\n // used to get fetched ids to pass to getPaginatedOptimizedUserFeed on load next\n // getting ids from cached data & only for previoues pages\n const previousIds = flattenInfiniteData(\n data,\n pageParam as number\n ).map((p) => extractPostItemKey(p));\n\n const res = await api.getPaginatedOptimizedDiscoveryFeedV3(\n authUser?.id || 0n,\n BigInt(pageParam * INITIAL_ITEMS_LIMIT),\n BigInt(INITIAL_ITEMS_LIMIT),\n {\n ...filter,\n skip_ids: previousIds,\n }\n );\n\n return extractApiDataOrThrow(res)?.items;\n },\n {\n getNextPageParam: (page, pages) =>\n page && page.length >= INITIAL_ITEMS_LIMIT ? pages.length : undefined,\n }\n );\n}\n\nexport function resetStreamFilters() {\n window.localStorage.removeItem('app.stream.filter.hashtags');\n window.localStorage.removeItem('app.stream.filter.withCertifiedUsers');\n window.localStorage.removeItem('app.stream.filter.withImages');\n}\n","// Set how many items should be displayed on home page feed\nexport const INITIAL_ITEMS_LIMIT = 20;\n","import { MsgStatus } from 'client';\nimport { IcEnumToObject } from 'types';\n\nexport const MSG_STATUS: IcEnumToObject = {\n UnRead: 'UnRead',\n Read: 'Read',\n};\n\nexport const FILTER_OPTIONS = {\n ALL: 'All',\n READ: 'Read',\n UNREAD: 'Unread',\n} as const;\n\nexport const MESSAGE_PAGE_SIZE = 20;\n\nexport const MESSAGE_CHAR_LIMIT = 1200;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n ,\n 'AlertTriangle'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'CircledCheck'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Articles'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Bookmark'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Camera'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'CircledClose'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Close'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n ,\n 'DistriktBadge'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Message'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'CopyLink'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Error'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Success'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Info'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'EditItem'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'HamburgerMenu'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Happy'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Image'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'LikeFull'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'LikeOutline'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'LinkOutline'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Logo'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Message'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'MessageUnread'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Moderation'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'MoreHorizontal'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'Notification'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'NotificationAlert'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Plus'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n ,\n 'QuestionCircle'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'RefreshArrow'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Repost'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'SearchOutline'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Settings'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'Share'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Stream'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'TrashBin'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'UserProfile'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\n\nexport default createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'WarningOutlined'\n);\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Add'\n);\n\nexport function AddIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'AlarmBell'\n);\n\nexport function AlarmBellIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'AlarmBellFilled'\n);\n\nexport function AlarmBellFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'AlarmBellFilledUnread'\n);\n\nexport function AlarmBellFilledUnreadIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'AlarmBellOff'\n);\n\nexport function AlarmBellOffIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'AlarmBellOn'\n);\n\nexport function AlarmBellOnIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'AlarmBellUnread'\n);\n\nexport function AlarmBellUnreadIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'ArrowBack'\n);\n\nexport function ArrowBackIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'ArrowDown'\n);\n\nexport function ArrowDownIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'ArrowForward'\n);\n\nexport function ArrowForwardIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'ArrowLeft'\n);\n\nexport function ArrowLeftIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'ArrowRight'\n);\n\nexport function ArrowRightIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'ArrowUp'\n);\n\nexport function ArrowUpIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Avatar'\n);\n\nexport function AvatarIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'CheckboxChecked'\n);\n\nexport function CheckboxCheckedIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'CheckboxEmpty'\n);\n\nexport function CheckboxEmptyIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Calendar'\n);\n\nexport function CalendarIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Check'\n);\n\nexport function CheckIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Copy'\n);\n\nexport function CopyIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Discord'\n);\n\nexport function DiscordIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Discover'\n);\n\nexport function DiscoverIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'DiscoverFilled'\n);\n\nexport function DiscoverFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Distrikt'\n);\n\nexport function DistriktIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Distrikt Logo'\n);\n\nexport function DistriktLogoIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Edit'\n);\n\nexport function EditIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'ErrorFilled'\n);\n\nexport function ErrorFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Favorite'\n);\n\nexport function FavoriteIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'FavoriteFilled'\n);\n\nexport function FavoriteFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Flag'\n);\n\nexport function FlagIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Flash'\n);\n\nexport function FlashIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'FlashFilled'\n);\n\nexport function FlashFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'ThunderFilled'\n);\n\nexport function ThunderFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Help'\n);\n\nexport function HelpIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Home'\n);\n\nexport function HomeIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'HomeFilled'\n);\n\nexport function HomeFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Info'\n);\n\nexport function InfoIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'InfoFilled'\n);\n\nexport function InfoFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Layers'\n);\n\nexport function LayersIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Layout'\n);\n\nexport function LayoutIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Loading'\n);\n\nexport function LoadingIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Lock'\n);\n\nexport function LockIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'MarkAsRead'\n);\n\nexport function MarkAsReadIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Medium'\n);\n\nexport function MediumIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Menu'\n);\n\nexport function MenuIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Messages'\n);\n\nexport function MessagesIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'MessagesDouble'\n);\n\nexport function MessagesDoubleIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'MessagesFilled'\n);\n\nexport function MessagesFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n ,\n 'MessagesFilledUnread'\n);\n\nexport function MessagesFilledUnreadIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'MessagesUnread'\n);\n\nexport function MessagesUnreadIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'MoreInfo'\n);\n\nexport function MoreInfoIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Newspaper'\n);\n\nexport function NewspaperIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'NewspaperFilled'\n);\n\nexport function NewspaperFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Picture'\n);\n\nexport function PictureIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Pin'\n);\n\nexport function PinIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Poll'\n);\n\nexport function PollIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Profile'\n);\n\nexport function ProfileIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'ProfileFilled'\n);\n\nexport function ProfileFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Refresh'\n);\n\nexport function RefreshIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n ,\n 'RadioOutline'\n);\n\nexport function RadioOutlineIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n <>\n \n \n ,\n 'RadioInside'\n);\n\nexport function RadioInsideIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Remove'\n);\n\nexport function RemoveIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'RemoveBin'\n);\n\nexport function RemoveBinIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Search'\n);\n\nexport function SearchIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'SearchFilled'\n);\n\nexport function SearchFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Send'\n);\n\nexport function SendIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Setting'\n);\n\nexport function SettingIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'SettingFilled'\n);\n\nexport function SettingFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Share'\n);\n\nexport function ShareIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Share2'\n);\n\nexport function Share2Icon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'SmileFace'\n);\n\nexport function SmileFaceIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'SuccessFilled'\n);\n\nexport function SuccessFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Telegram'\n);\n\nexport function TelegramIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Transfer'\n);\n\nexport function TransferIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'Twitter'\n);\n\nexport function TwitterIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'Unblock'\n);\n\nexport function UnblockIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Unlock'\n);\n\nexport function UnlockIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n ,\n 'Unpin'\n);\n\nexport function UnpinIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'UserRemove'\n);\n\nexport function UserRemoveIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'Logo Header'\n);\n\nexport function LogoHeaderIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n ,\n 'ViewOff'\n);\n\nexport function ViewOffIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n ,\n 'ViewOn'\n);\n\nexport function ViewOnIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'VerificationBadge'\n);\n\nexport function VerificationBadgeIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n ,\n 'WarningFilled'\n);\n\nexport function WarningFilledIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Dark'\n);\n\nexport function DarkIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Light'\n);\n\nexport function LightIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Auto'\n);\n\nexport function AutoIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Send'\n);\n\nexport function ThreadIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ,\n 'Cake'\n);\n\nexport function CakeIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","import React from 'react';\nimport { createSvgIcon } from '@mui/material/utils';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\nconst Svg = createSvgIcon(\n \n \n \n \n \n \n \n \n \n ,\n 'Wallet'\n);\n\nexport function WalletIcon(props: SvgIconProps) {\n return ;\n}\n\nexport default Svg;\n","export * from './milestones';\nexport * from './profile';\nexport * from './projects';\n","import { assetsApi } from 'client';\n\nconst pendingCalls = new Map();\nconst cached = new Map();\n\nconst MIME_TYPES = {\n jpeg: 'image/jpeg',\n jpg: 'image/jpg',\n gif: 'image/gif',\n png: 'image/png',\n};\n\nconst Cache = {\n resolveImage: (image) => {\n const { image_id, format } = image;\n\n const data = cached.get(image_id);\n if (data) {\n return Promise.resolve(data);\n }\n\n let query = pendingCalls.get(image_id);\n if (query) {\n return query;\n }\n\n query = assetsApi.get(image_id).then(([imageBytes]) => {\n if (!imageBytes) {\n throw new Error('Image not found.');\n }\n\n return Cache.add(image_id, format, imageBytes);\n });\n\n pendingCalls.set(image_id, query);\n\n return query;\n },\n add: (image_id: string, mimeType: string, imageBytes) => {\n const blob = new Blob([new Uint8Array(imageBytes)], {\n type: MIME_TYPES[mimeType] || 'image/png',\n });\n\n cached.set(image_id, blob);\n pendingCalls.delete(image_id);\n\n return blob;\n },\n};\n\nexport default Cache;\n","import React, { Fragment } from 'react';\nimport Cache from './memoryLoader';\nimport { Image } from 'client';\n\ninterface ChildrenProps {\n src: string;\n loading: boolean;\n error: boolean;\n}\n\ninterface Props {\n children: (payload: ChildrenProps) => React.ReactNode;\n image: Image;\n}\n\nconst ImageLoader = ({ image: imageProp, children }: Props) => {\n const [src, setSrc] = React.useState(null);\n const [loading, setLoading] = React.useState(true);\n const [error, setError] = React.useState(false);\n\n const loadImage = React.useCallback(async () => {\n setLoading(true);\n Cache.resolveImage({ image_id: imageProp.image_id }).then(\n (blob) => {\n setSrc(URL.createObjectURL(blob));\n setLoading(false);\n },\n (err) => {\n console.error(err);\n setError(true);\n }\n );\n }, [imageProp.image_id]);\n\n React.useEffect(\n () => () => {\n if (src) {\n URL.revokeObjectURL(src);\n }\n },\n [src]\n );\n\n React.useEffect(() => {\n loadImage();\n }, [loadImage]);\n\n return (\n \n {children({ src, loading, error })}\n \n );\n};\n\nexport default React.memo(ImageLoader);\n\n//\n// const createImageLoader = (resolver, displayName) => {\n// const Component = (props, ref) => (\n// \n// );\n//\n// if (process.env.ENV_NAME !== 'production') {\n// Component.displayName = displayName;\n// }\n//\n// return React.useMemo(React.forwardRef(Component));\n// };\n//\n// const resolveUserImage = (userId: string) => {\n//\n// };\n//\n// const UserImage = createImageLoader(resolveUserImage, 'UserImage');\n","/* eslint-disable react/no-children-prop */\nimport React from 'react';\nimport { Skeleton } from '@mui/material';\nimport { SkeletonProps } from '@mui/lab';\nimport ImageLoader from './ImageLoader';\nimport { Image } from 'client';\n\ninterface ChildrenProps {\n src: string;\n}\n\ninterface Props {\n image?: Image;\n skeleton?: boolean;\n skeletonProps?: SkeletonProps;\n defaultImage?: string;\n children: (payload: ChildrenProps) => React.ReactNode;\n}\n\nconst ProfileImageLoader = ({\n image,\n skeleton = true,\n skeletonProps = {\n variant: 'circular',\n width: 40,\n height: 40,\n },\n defaultImage = '/assets/img/default_avatar.jpg',\n children,\n}: Props): React.ReactElement => {\n if (!image || !image.image_id) {\n return <>{children({ src: defaultImage })};\n }\n\n return (\n \n {(payload) => {\n if (payload.loading && skeleton) {\n return {children(payload)};\n }\n\n return <>{children(payload)};\n }}\n \n );\n};\n\nexport default ProfileImageLoader;\n","import * as React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport ImageLoader from '../ImageLoader';\nimport FullImageModal from '../Dialogs/FullImage';\nimport { Skeleton } from '@mui/material';\nimport clsx from 'clsx';\nimport { Image } from 'types';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\nimport { ValueOf } from 'types';\nimport { useGetAddressByNftUrl } from 'pages/profile/services/nft';\nimport { extractNftIndexIdAndAssetsType } from 'pages/profile/utils/nft';\n\n// workaround for not supported aspect-ratio was needed since support for it was added in all major browsers in early 2021\nconst useStyles = makeStyles((theme) => ({\n imgContainer: {\n display: 'flex',\n justifyContent: 'center',\n },\n imageFullsize: {\n width: 'auto',\n maxWidth: '100%',\n maxHeight: `calc(51vw - ${theme.spacing(15)})`,\n borderRadius: 10,\n objectFit: 'contain',\n marginTop: theme.spacing(2),\n [theme.breakpoints.down('lg')]: {\n maxHeight: `calc(85vw - ${theme.spacing(15)})`,\n },\n [theme.breakpoints.down('sm')]: {\n maxHeight: `calc(106vw - ${theme.spacing(15)})`,\n },\n },\n image: {\n borderRadius: 10,\n height: 'auto',\n marginTop: 16,\n objectFit: 'cover',\n width: '100%',\n\n '@supports (aspect-ratio: 5 / 3)': {\n aspectRatio: '5 / 3',\n },\n\n '@supports not (aspect-ratio: 5 / 3)': {\n display: 'block',\n maxWidth: '100%',\n maxHeight: '321px',\n width: '100%',\n },\n },\n nftImage: {\n borderBottomLeftRadius: '70px',\n borderTopLeftRadius: '70px',\n borderBottomRightRadius: '70px',\n aspectRatio: '232 / 174',\n [theme.breakpoints.up('sm')]: {\n aspectRatio: '568 / 342',\n },\n },\n nftImageQuotedResource: {\n [theme.breakpoints.down('sm')]: {\n borderBottomLeftRadius: '40px',\n borderTopLeftRadius: '40px',\n borderBottomRightRadius: '40px',\n },\n },\n imageQuotedResource: {\n borderRadius: 10,\n height: 'auto',\n marginTop: 16,\n objectFit: 'cover',\n width: '100%',\n maxWidth: '100%',\n maxHeight: '380px',\n },\n post: {\n cursor: 'pointer',\n pointerEvents: 'all',\n },\n withoutMarginTop: {\n marginTop: 0,\n },\n}));\n\ninterface Props {\n image?: Image;\n location?: ValueOf | 'quoted_resource';\n nft_image_url?: string;\n withoutMarginTop?: boolean;\n isQuotedResource?: boolean;\n}\n\nconst PostImageLoader = ({\n image,\n location,\n nft_image_url: nftImageUrl,\n withoutMarginTop,\n isQuotedResource,\n}: Props) => {\n const classes = useStyles();\n const [imageModal, setImageModal] = React.useState(false);\n const [nftError, setNftError] = React.useState(false);\n const [nft_image_url, setNft_image_url] = React.useState(nftImageUrl);\n const indexAndAssetsType = extractNftIndexIdAndAssetsType(nftImageUrl);\n const {\n data: addressByNftUrl,\n isLoading: isLoadingAddressByNftUrl,\n } = useGetAddressByNftUrl(indexAndAssetsType.index, nftImageUrl);\n let nftImageByIndex;\n if (addressByNftUrl) {\n nftImageByIndex = addressByNftUrl[indexAndAssetsType.assetsType];\n }\n React.useEffect(() => {\n if (nftImageByIndex) {\n setNft_image_url(nftImageByIndex);\n }\n }, [nftImageByIndex]);\n\n const ImageToDisplay = ({ url }: { url: string }) => (\n \n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\n setNftError(true)}\n onClick={() => setImageModal(true)}\n onKeyDown={() => setImageModal(true)}\n />\n \n );\n\n if (nftError) {\n return null;\n }\n\n return (\n <>\n {nft_image_url && isLoadingAddressByNftUrl && (\n \n )}\n {nft_image_url && !isLoadingAddressByNftUrl && (\n \n )}\n {image?.image_id && (\n \n {({ src, loading, error }) =>\n loading || error ? (\n \n ) : (\n \n )\n }\n \n )}\n {imageModal && (\n setImageModal(false)}\n image={image}\n nftImageUrl={nft_image_url}\n />\n )}\n \n );\n};\n\nexport default PostImageLoader;\n","import React from 'react';\nimport { Backdrop, Box } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Lottie from 'react-lottie-player';\nimport lottieJson from './LoadingAnimation.json';\n\nconst useStyles = makeStyles((theme) => ({\n backdrop: {\n zIndex: theme.zIndex.appBar + 1,\n backgroundColor: theme.palette.colors.ui_04,\n },\n root: {\n textAlign: 'center',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n box: {\n background: theme.palette.background.default,\n padding: `0 30px 0 0`,\n display: 'flex',\n fontSize: 16,\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 16,\n },\n}));\n\ninterface Props {\n size?: number;\n backdrop?: boolean;\n inline?: boolean;\n}\n\nconst Loading = ({ size = 40, backdrop = false, inline }: Props) => {\n const classes = useStyles();\n const formattedSize = inline ? size : size * 2;\n\n if (backdrop) {\n return (\n \n
    \n \n Good things come to those who wait...\n
    \n
    \n );\n }\n\n return (\n \n \n \n );\n};\n\nexport default Loading;\n","import React, { useRef } from 'react';\n\ntype DeferredPromise = {\n resolve: (value: DeferType) => void;\n reject: (value: unknown) => void;\n promise: Promise;\n};\n\nexport function useDeferredPromise() {\n const deferRef = useRef>(null);\n\n const defer = () => {\n const deferred = {} as DeferredPromise;\n\n const promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n\n deferred.promise = promise;\n deferRef.current = deferred;\n return deferRef.current;\n };\n\n return { defer, deferRef: deferRef.current };\n}\n","import { useMutation, UseMutationOptions, useQueryClient } from 'react-query';\nimport {\n cancelQueries,\n invalidateQueries,\n QueryKeyWithUpdateMethod,\n setQueries,\n snapshotQueries,\n updateQueries,\n} from 'utils';\n\ninterface UseOptimisticMutationOptions\n extends UseMutationOptions {\n relatedQueryKeys: Array;\n}\n\nexport interface UseOptimisticMutationContext {\n previousData: Array;\n}\n\nexport const useOptimisticMutation = <\n TData = unknown,\n TError = unknown,\n TVariables = void\n>({\n relatedQueryKeys,\n ...options\n}: UseOptimisticMutationOptions<\n TData,\n TError,\n TVariables,\n UseOptimisticMutationContext\n>) => {\n const queryClient = useQueryClient();\n\n return useMutation<\n TData,\n TError,\n TVariables,\n UseOptimisticMutationContext\n >({\n ...options,\n onMutate: (\n patch: TVariables\n ):\n | UseOptimisticMutationContext\n | Promise> => {\n cancelQueries(relatedQueryKeys);\n const previousData = snapshotQueries(relatedQueryKeys);\n updateQueries(relatedQueryKeys, patch);\n\n options.onMutate?.(patch);\n\n return { previousData };\n },\n onError: (\n error: TError,\n variables: TVariables,\n context: UseOptimisticMutationContext\n ) => {\n setQueries(relatedQueryKeys, context.previousData);\n\n options.onError?.(error, variables, context);\n },\n onSettled: (\n data: TData,\n error: TError,\n variables: TVariables,\n context: UseOptimisticMutationContext\n ) => {\n const { mutationKey } = options;\n if (!mutationKey || queryClient.isMutating({ mutationKey }) === 1) {\n invalidateQueries(relatedQueryKeys);\n }\n\n options.onSettled?.(data, error, variables, context);\n },\n });\n};\n","import React, { useRef } from 'react';\n\n// The ref object is a generic container whose current property is mutable\n// and can hold any value, similar to an instance property on a class\nexport function usePreviousValue(value) {\n const currentRef = useRef(value);\n const prevRef = useRef();\n\n if (currentRef.current !== value) {\n prevRef.current = currentRef.current;\n currentRef.current = value;\n }\n return prevRef.current;\n}\n","import { round } from 'lodash';\nimport { RefObject, useEffect, useState } from 'react';\nimport { useScroll } from 'react-use';\n\nexport interface State {\n x: number;\n y: number;\n}\n\n// Hook to return if scrolling is enabled in an element & if is scrolled to the bottom\n// itemLength is used to force a recheck in case items in container dynamically change\nexport function useScrollIsBottom(\n ref: RefObject,\n itemLength: number\n) {\n const [isBottom, setIsBottom] = useState(false);\n const [isTop, setIsTop] = useState(false);\n const [isScrollEnabled, setIsScrollEnabled] = useState(false);\n\n const { y } = useScroll(ref);\n\n useEffect(() => {\n if (ref?.current) {\n setIsScrollEnabled(ref.current.scrollHeight > ref.current.clientHeight);\n setIsBottom(\n ref.current.scrollHeight < round(ref.current.clientHeight + y + 2)\n );\n setIsTop(y < 5);\n }\n }, [ref, y, itemLength]);\n\n return { isBottom, isTop, isScrollEnabled };\n}\n","import React, { useMemo } from 'react';\nimport createEmojiPlugin, { defaultTheme } from '@draft-js-plugins/emoji';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport '@draft-js-plugins/emoji/lib/plugin.css';\nimport { Happy } from 'components/icons';\nimport { positionSuggestions } from 'components/Compose/emojiPositionSuggestion';\n\nexport const useStyles = makeStyles(({ palette }) => ({\n emojiSelectPopoverEntry: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n cursor: 'pointer',\n },\n emojiSelectPopoverEntryFocused: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n cursor: 'pointer',\n },\n emojiGroup: {\n cursor: 'pointer',\n\n color: 'rgb(204 204 204 / 50%)!important',\n },\n emojiSelectButton: {\n cursor: 'pointer',\n },\n emojiSuggestionsEntry: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n display: 'flex',\n flexDirection: 'row',\n alignContent: 'center',\n alignItems: 'center',\n },\n emojiSuggestionsEntryFocused: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n display: 'flex',\n flexDirection: 'row',\n alignContent: 'center',\n alignItems: 'center',\n backgroundColor: palette.background.paper,\n color: palette.primary.light,\n },\n commonEmojiContainer: {\n backgroundColor: palette.background.paper,\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19) !important',\n display: 'block',\n transformOrigin: '1em 0% 0px',\n transition: 'all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1)',\n },\n modalEmoji: {\n transform: 'scale(1) translateY(-50%)',\n },\n postEmoji: {\n transform: 'scale(1) translateY(-85%)',\n top: 0,\n },\n emoji: {\n backgroundImage: 'unset !important',\n display: 'unset',\n color: 'unset',\n },\n}));\n\nexport function useEmojiPlugin({ selectButtonContent }) {\n const classes = useStyles();\n\n return useMemo(() => {\n defaultTheme.emojiSelectPopover += ` ${classes.commonEmojiContainer}`;\n defaultTheme.emojiSuggestions += ` ${classes.commonEmojiContainer} `;\n defaultTheme.emojiSuggestionsEntry += ` ${classes.emojiSuggestionsEntry} `;\n defaultTheme.emojiSelectPopoverEntry += ` ${classes.emojiSelectPopoverEntry} `;\n defaultTheme.emojiSelectPopoverEntryFocused += ` ${classes.emojiSelectPopoverEntryFocused} `;\n defaultTheme.emojiSelectPopoverNavEntry += ` ${classes.emojiGroup} `;\n defaultTheme.emojiSelectPopoverNavEntryActive += ` ${classes.emojiSelectButton} `;\n\n defaultTheme.emojiSelectButton += ` ${classes.emojiSelectButton} `;\n defaultTheme.emojiSuggestionsEntryFocused += ` ${classes.emojiSuggestionsEntryFocused} `;\n\n defaultTheme.emoji += ` ${classes.emoji}`;\n defaultTheme.emojiSelectPopover += ` ${classes.postEmoji}`;\n\n const emojiPlugin = createEmojiPlugin({\n selectButtonContent,\n theme: defaultTheme,\n useNativeArt: true,\n toneSelectOpenDelay: 300,\n positionSuggestions,\n });\n\n return { emojiPlugin };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\n","import dayjs from 'dayjs';\n\nimport type {\n Collaborator,\n CollaboratorWithUser,\n Experience,\n ProjectWithUser,\n Milestone,\n MilestoneWithUser,\n Profile,\n} from 'client';\n\nexport function createPlaceholderProject(user: Profile) {\n return {\n id: 0n,\n title: 'Your role',\n present: true,\n company_name: 'The company',\n description: {\n text:\n 'Here you can add a short description about your role in this project/company and share it…',\n user_tags: [],\n hashtags: [],\n },\n end_date: null,\n user_id: user.id,\n links: ['Relevant link'],\n start_date: BigInt(dayjs().unix()),\n collaborators: [],\n company_handle: '',\n image: null,\n } as Experience;\n}\n\nexport function createPlaceholderMilestone(user: Profile) {\n return {\n id: 0n,\n title: 'Title of your Milestone goes here',\n company_name: 'Related project',\n description: {\n text: '',\n user_tags: [],\n hashtags: [],\n },\n end_date: 0n,\n one_day: true,\n user_id: user?.id,\n links: [],\n start_date: BigInt(dayjs().unix()),\n pinned: false,\n collaborators: [],\n company_handle: '',\n } as Milestone;\n}\n\nexport const getCollaborators = (\n collaborators: Array,\n authId: bigint,\n userId: bigint,\n approvedOnly = false\n) => {\n const isOwnCollab = authId === userId;\n if (isOwnCollab) {\n return collaborators;\n }\n\n return collaborators.reduce((memo, collab) => {\n const isUserCollab = collab.user.id === userId;\n\n if (approvedOnly && collab.approved) {\n memo.push(collab);\n\n return memo;\n }\n\n if (!isOwnCollab && (isUserCollab || collab.approved)) {\n memo.push(collab);\n\n return memo;\n }\n\n return memo;\n }, [] as Array);\n};\n\nexport const getCollaboratorsAdvanced = (\n collaborators: Array\n) => {\n return collaborators.reduce(\n (memo, collab) => {\n if (collab.approved === null) {\n memo.newCollab.push(collab);\n }\n\n if (collab.approved === false) {\n memo.pending.push(collab);\n }\n\n if (collab.approved) {\n memo.approved.push(collab);\n }\n\n return memo;\n },\n {\n newCollab: [],\n pending: [],\n approved: [],\n }\n );\n};\n","import * as React from 'react';\nimport dayjs from 'dayjs';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport updateLocale from 'dayjs/plugin/updateLocale';\n\nexport const formattedDate = (timestamp) => {\n const createdAt = dayjs(Number(timestamp)).format('YYYY-MM-DD HH:mm:ss');\n let date;\n const itemDate = Date.parse(createdAt);\n const nowDate = Date.now();\n\n dayjs.extend(relativeTime);\n dayjs.extend(updateLocale);\n\n if (nowDate - itemDate > 1000 * 60 * 60 * 24) {\n date = dayjs(createdAt).format('MMM D, YYYY');\n } else {\n dayjs.updateLocale('en', {\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n m: '1min',\n mm: '%dmin',\n h: '1h',\n hh: '%dh',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n });\n\n date = dayjs().to(dayjs(createdAt));\n }\n\n return date;\n};\n\nexport const formatMonthYear = (timestamp) => {\n return dayjs(Number(timestamp)).format('MMM YYYY');\n};\n\nexport const formatSimple = (timestamp) => {\n return dayjs(Number(timestamp)).format('MMM D, YYYY');\n};\n","import React, { useEffect, useState, useRef } from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { useHistory } from 'react-router-dom';\nimport { Avatar, Skeleton } from '@mui/material';\nimport { ProfileImageLoader } from '../ImageLoader';\nimport { FollowerProfileLite, Profile, ProfileLite } from 'client';\nimport { getUserName, loadSVGAvatar } from 'utils';\nimport { useIsUserNftOwner } from 'pages/profile/hooks/useIsUserNftOwner';\nimport { useGetAddressByNftUrl } from 'pages/profile/services/nft';\nimport { extractNftIndexIdAndAssetsType } from 'pages/profile/utils/nft';\nimport FullImageModal from 'components/Dialogs/FullImage';\n\nconst useStyles = makeStyles(() => ({\n isNft: {\n borderTopRightRadius: 4,\n },\n}));\n\ninterface Props {\n user: Profile | ProfileLite | FollowerProfileLite;\n size?: 'small' | 'big';\n className?: string;\n clickable?: boolean;\n onClick?: () => void;\n openAvatarInModal?: boolean;\n}\n\nconst UserAvatar = ({\n size,\n user,\n className = '',\n clickable = false,\n onClick,\n openAvatarInModal,\n}: Props) => {\n const classes = useStyles();\n const history = useHistory();\n const avatarRef = useRef(null);\n const [avatarModalOpened, setAvatarModalOpened] = useState(false);\n const [avatarError, setAvatarError] = useState(false);\n const [avatarSVG, setAvatarSVG] = useState('');\n const isNft = useIsUserNftOwner(user.principal, user.nft_url);\n const [nftCanisterImage, setNftCanisterImage] = React.useState('');\n const indexAndAssetsType = extractNftIndexIdAndAssetsType(user.nft_url || '');\n const { data: addressByNftUrl, isLoading } = useGetAddressByNftUrl(\n indexAndAssetsType.index,\n user.nft_url || ''\n );\n let nftImageByIndex;\n if (addressByNftUrl) {\n nftImageByIndex = addressByNftUrl[indexAndAssetsType.assetsType];\n }\n useEffect(() => {\n if (nftImageByIndex) {\n setNftCanisterImage(nftImageByIndex);\n }\n }, [nftImageByIndex]);\n\n if (isLoading) {\n return (\n \n );\n }\n return (\n \n {({ src }) => {\n const img = new Image();\n img.onload = async function () {\n if (isNft) return;\n if (!!avatarSVG) return;\n const svg = await loadSVGAvatar(this.src);\n setAvatarSVG(svg);\n };\n img.src = !!user?.nft_url ? nftCanisterImage || user.nft_url : src;\n return (\n <>\n {\n clickable && history.push(`/u/${getUserName(user)}`);\n onClick && onClick();\n if (\n avatarRef &&\n avatarRef.current &&\n !avatarError &&\n openAvatarInModal\n ) {\n const el = avatarRef.current.querySelector('img');\n if (!el) return;\n }\n if (!avatarError && openAvatarInModal) {\n setAvatarModalOpened(true);\n }\n }}\n style={{\n cursor: clickable ? 'pointer' : undefined,\n }}\n classes={{\n root: isNft && classes.isNft,\n }}\n imgProps={{\n onError: () => {\n setAvatarError(true);\n },\n }}\n ref={avatarRef}\n />\n {avatarModalOpened && (\n setAvatarModalOpened(false)}\n nftImageUrl={\n avatarSVG ||\n (!!user?.nft_url ? nftCanisterImage || user.nft_url : src)\n }\n isNft={!!user?.nft_url}\n isAvatarPreview\n />\n )}\n \n );\n }}\n \n );\n};\n\nexport default UserAvatar;\n","import * as React from 'react';\nimport { MoreInfoIcon } from 'components/icons';\nimport {\n Button,\n Typography,\n Menu,\n MenuItem,\n IconButton,\n Box,\n SxProps,\n Theme,\n} from '@mui/material';\nimport { useSelectMenuStyles } from './styles';\nimport Alert from 'components/Alert';\n\nexport interface IMoreButtonItem {\n alertMessage?: string;\n disabled?: boolean;\n title: string;\n icon?: JSX.Element;\n danger?: boolean;\n handleClick: () => void;\n}\n\ninterface Props {\n items: IMoreButtonItem[];\n disabled?: boolean;\n sx?: SxProps;\n variant?: 'square' | 'round' | 'square-no-outline';\n}\n\nconst SelectMenu = ({\n variant = 'round',\n items,\n disabled = false,\n sx,\n}: Props) => {\n const classes = useSelectMenuStyles();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const open = Boolean(anchorEl);\n\n const [toastMessage, setToastMessage] = React.useState(null);\n\n const handleMainButtonClick = (\n event: React.MouseEvent\n ) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleItemClick = React.useCallback((item: IMoreButtonItem) => {\n item.handleClick();\n if (item.alertMessage) {\n setToastMessage(item.alertMessage);\n }\n }, []);\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n return (\n \n {toastMessage && (\n setToastMessage(null)}\n />\n )}\n {variant === 'round' && (\n \n \n \n )}\n {(variant === 'square' || variant === 'square-no-outline') && (\n }\n />\n )}\n \n {items.map((item) => (\n {\n handleItemClick(item);\n handleClose();\n }}\n disabled={item.disabled}\n key={item.title}\n className={item.danger ? classes.dangerMenuItem : classes.menuItem}\n >\n {item.icon && (\n
    \n {item.icon}\n
    \n )}\n {item.title}\n \n ))}\n \n
    \n );\n};\n\nexport default SelectMenu;\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport clsx from 'clsx';\nimport { ListItemText, ListItemAvatar, Typography, Box } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport UserAvatar from '../UserAvatar/UserAvatar';\nimport reactStringReplace from 'react-string-replace';\nimport { renderUserBadge } from '../../utils/moderationShortcuts';\nimport { FollowerProfileLite, Profile, ProfileLite } from 'client';\nimport { getUserName } from 'utils';\n\n// TODO bug on firefox with user card updates\n\nconst useStyles = makeStyles((theme) => ({\n avatarContainer: {\n minWidth: 40,\n marginRight: theme.spacing(2),\n marginTop: 0,\n },\n text: {\n margin: 0,\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n username: {\n '& span': {\n color: theme.palette.text.primary,\n },\n },\n nameFullWidth: {\n // maxWidth: 'calc(100% - 20px)',\n alignItems: 'baseline',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n name: {\n // maxWidth: 'calc(100% - 100px)',\n alignItems: 'baseline',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n following: {\n color: theme.palette.colors.ui_06,\n display: 'inline-block',\n fontWeight: '400',\n paddingLeft: theme.spacing(1),\n\n '&::before': {\n content: '\"• \"',\n },\n },\n primary: {\n width: '100%',\n display: 'inline-flex',\n alignItems: 'center',\n },\n secondary: {\n '& .MuiTypography-root': {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n },\n clickable: {\n cursor: 'pointer',\n },\n}));\n\ninterface Props {\n user: Profile | ProfileLite | FollowerProfileLite;\n isFollowing?: boolean;\n enableFollowing?: boolean;\n clickable?: boolean;\n onClick?: () => void;\n highlightedUsername?: string;\n size?: 'small' | 'big';\n}\n\nconst UserPreviewCard = ({\n user,\n clickable,\n isFollowing,\n enableFollowing,\n highlightedUsername = '',\n onClick,\n size,\n}: Props) => {\n const classes = useStyles();\n const history = useHistory();\n let username = `@${getUserName(user)}`;\n if (highlightedUsername !== '')\n username = username.replace(\n highlightedUsername,\n (match) => `${match}`\n );\n const handleClick = () => {\n clickable && history.push(`/u/${getUserName(user)}`);\n onClick && onClick();\n };\n return (\n \n \n \n \n \n \n {user.display_name}\n \n {renderUserBadge(user, { className: classes.teamBadge })}\n {enableFollowing && isFollowing ? (\n Following\n ) : null}\n \n }\n secondary={\n \n \n {reactStringReplace(username, /<\\/?span[^>]*>/g, (match) => {\n return {match};\n })}\n \n \n }\n primaryTypographyProps={{\n noWrap: true,\n variant: 'bodyb',\n sx: {\n display: 'inline-block',\n alignItems: 'baseline',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n width: '100%',\n },\n }}\n secondaryTypographyProps={{\n noWrap: true,\n }}\n className={classes.text}\n />\n \n );\n};\n\nexport default UserPreviewCard;\n","import {\n OptimizedPost,\n ThreadPreview,\n ApiItemFeed,\n CommentPreview,\n} from 'client';\nimport { fromIcEnum } from 'utils';\n\nexport function extractPostItemKey(post: ApiItemFeed): bigint {\n const type = fromIcEnum(post);\n switch (type) {\n case 'ThreadPreview':\n return (post[type] as ThreadPreview).id;\n\n case 'OptimizedPost':\n return (post[type] as OptimizedPost).post.post_id;\n\n case 'CommentPreview':\n return (post[type] as CommentPreview).comment.post.post_id;\n\n default:\n const _exhaustiveCheck: never = type;\n return _exhaustiveCheck;\n }\n}\n\nexport function extractPostItemTimestamp(post: ApiItemFeed): bigint {\n const type = fromIcEnum(post);\n switch (type) {\n case 'ThreadPreview':\n return (post[type] as ThreadPreview).preview?.[0].post.post.timestamp;\n\n case 'OptimizedPost':\n return (post[type] as OptimizedPost).post.timestamp;\n\n case 'CommentPreview':\n return (post[type] as CommentPreview).comment.post.timestamp;\n\n default:\n const _exhaustiveCheck: never = type;\n return _exhaustiveCheck;\n }\n}\n","import { Principal } from '@dfinity/principal';\nimport { getIdentity } from 'utils/auth';\nimport { nftApi } from 'client';\nimport { sha224 } from './sha224';\nimport { from32bits, getCrc32, to32bits, toBlob, toHexString } from 'utils';\n\ninterface NftMetadata {\n attributes: {\n trait_type: string;\n value: string;\n }[];\n image: string;\n name: string;\n id: number;\n}\n\n// from stoic wallet's NFTList.js\n\nexport const principalToAccountIdentifier = (p: Principal) => {\n const padding = Buffer.from('\\x0Aaccount-id');\n const array = new Uint8Array([\n ...padding,\n ...toBlob(p.toUint8Array()),\n // we only support one sub-account, of 0, but as a 32-bit nr\n ...Array(32).fill(0),\n ]);\n const hash = sha224(array);\n const checksum = to32bits(getCrc32(hash));\n const array2 = new Uint8Array([...checksum, ...hash]);\n return toHexString(array2);\n};\n\nexport const decodeTokenIdToIndex = (tid: string) => {\n try {\n const p = [...Principal.fromText(tid).toUint8Array()];\n const padding = p.splice(0, 4);\n if (toHexString(padding) !== toHexString(new Buffer('\\x0Atid'))) {\n return 0;\n } else {\n return from32bits(p.splice(-4));\n }\n } catch (e) {\n return 0;\n }\n};\n\n// for testing purposes, but I've had to redo it 3 times now so I'm keeping it for future uses\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst getAccountNumberFromStringPrincipal = async (): Promise => {\n const enc = new TextEncoder(); // always utf-8\n const hash = sha224(\n new Uint8Array([\n ...Buffer.from('\\x0Aaccount-id'),\n ...toBlob(enc.encode('Put the Principal Here')),\n ...Array(32).fill(0),\n ])\n );\n const checksum = to32bits(getCrc32(hash));\n const arr = new Uint8Array([...checksum, ...hash]);\n console.log(toHexString(arr));\n};\n\nexport const encodeTokenId = (principal, index) => {\n const padding = Buffer.from('\\x0Atid');\n const array = new Uint8Array([\n ...padding,\n ...Principal.fromText(principal).toUint8Array(),\n ...to32bits(index),\n ]);\n return Principal.fromUint8Array(array).toText();\n};\n\nexport const loadNfts = async (): Promise<\n {\n urls: {\n POD: string;\n HELMET: string;\n };\n serialNumber: number;\n tokenId: string;\n metadata: NftMetadata;\n }[]\n> => {\n const identity = await getIdentity();\n const principal: Principal = identity.getPrincipal();\n const address: string = principalToAccountIdentifier(principal);\n const registry: [number, string][] = await nftApi.getRegistry();\n const myNfts = registry.filter((item) => {\n return item[1] === address;\n });\n\n const nftsAndMetadata: {\n serialNumber: number;\n tokenId: string;\n metadata: NftMetadata;\n urls: {\n POD: string;\n HELMET: string;\n };\n }[] = [];\n\n for (let i = 0; i < myNfts.length; i++) {\n try {\n const metadata = JSON.parse(await nftApi.getJSON(myNfts[i][0]));\n const tokenId = encodeTokenId(\n process.env.REACT_APP_NFT_CANISTER_ID,\n myNfts[i][0]\n );\n const multiAssetUrl = await nftApi.getMultiAssetURLByTokenID(tokenId);\n const nftsAndMetadataItem = {\n metadata,\n serialNumber: myNfts[i][0],\n tokenId,\n urls: {\n POD: '',\n HELMET: '',\n },\n };\n multiAssetUrl.Static.forEach((item) => {\n nftsAndMetadataItem.urls[item[0]] = item[1];\n });\n nftsAndMetadata.push(nftsAndMetadataItem);\n } catch (e) {\n console.log(e);\n }\n }\n\n if (myNfts.length === 0) {\n return [];\n }\n return nftsAndMetadata;\n};\n\nexport const getNftIndexUrl = (index, assetsType) =>\n `https://${process.env.REACT_APP_NFT_CANISTER_ID}.raw.ic0.app/?index=${index}&assetsType=${assetsType}`;\n\nexport const getNftTokenIdUrl = (tokenId, assetsType) =>\n `https://${process.env.REACT_APP_NFT_CANISTER_ID}.raw.ic0.app/?tokenid=${tokenId}&assetsType=${assetsType}`;\n\nexport const transferNft = async (\n to: string,\n idx: number\n): Promise => {\n const identity = await getIdentity();\n const from: string = principalToAccountIdentifier(identity.getPrincipal());\n const transferResult = await nftApi.transferDistrikt(from, to, idx);\n if (transferResult === false) {\n throw new Error('Transfer failed, try again later');\n }\n return transferResult;\n};\n\nexport const getMyPrincipal = async (): Promise => {\n const identity = await getIdentity();\n return identity.getPrincipal().toText();\n};\n","import React from 'react';\nimport { DistriktBadge, VerificationBadge } from '../components/icons';\n\nexport const getVerificationRequestStatus = (request: any) => {\n if (request.length === 0) return null;\n else {\n let status = null;\n if (request.status.Ignored === null) status = 'Ignored';\n else if (request.status.Unknown === null) status = 'Unknown';\n else if (request.status.Refused === null) status = 'Refused';\n else if (request.status.Verified === null) status = 'Verified';\n else if (request.status.Pending === null) status = 'Pending';\n return status;\n }\n};\n\nexport const isUserVerified = (user): boolean =>\n user.badges?.find((badge) => badge.name === 'verified') !== undefined;\n\nexport const isUserDistriktTeam = (user): boolean =>\n user.badges?.find((badge) => badge.name === 'distrikt_team') !== undefined;\n\nexport const renderUserBadge = (user, badgeProps = {}): React.ReactNode => {\n if (isUserDistriktTeam(user)) {\n return ;\n }\n\n if (isUserVerified(user)) {\n return ;\n }\n\n return null;\n};\n","import { Identity } from '@dfinity/agent';\nimport { AuthClient } from '@dfinity/auth-client';\n\nconst authClient = AuthClient.create({\n idleOptions: {\n disableIdle: true,\n },\n});\n\nexport async function getIdentity(): Promise {\n const ac = await authClient;\n return ac.getIdentity();\n}\n\nexport async function isAuthenticated(): Promise {\n const ac = await authClient;\n return await ac.isAuthenticated();\n}\n\nconst MAX_TIME_TO_LIVE = BigInt(30 * 24 * 60 * 60 * 1000 * 1000 * 1000); // 30 days\n// const MAX_TIME_TO_LIVE = BigInt(1 * 1 * 1 * 30 * 1000 * 1000 * 1000); // 30 sec\n\nexport async function login(\n options: { [key: string]: unknown } = {}\n): Promise {\n const ac = await authClient;\n return await ac.login({\n identityProvider: process.env.REACT_APP_INTERNET_IDENTITY_URL,\n maxTimeToLive: MAX_TIME_TO_LIVE,\n derivationOrigin: process.env.REACT_APP_FE_APP_ASSET_CANISTER_URL,\n ...options,\n });\n}\n\nexport async function logout(): Promise {\n const ac = await authClient;\n return ac.logout();\n}\n","import {\n InfiniteData,\n QueryKey,\n useInfiniteQuery,\n useQueryClient,\n} from 'react-query';\n\nimport api, { ApiItemFeed, Profile } from 'client';\nimport { INITIAL_ITEMS_LIMIT } from './constants';\nimport { extractApiDataOrThrow, flattenInfiniteData } from 'utils';\nimport { extractPostItemKey } from 'pages/post/utils/postItem';\n\nexport const getPaginatedOptimizedUserFeedQueryKey: QueryKey =\n 'getPaginatedOptimizedUserFeedV3';\n\nexport function useGetPaginatedOptimizedUserFeed() {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n\n return useInfiniteQuery(\n [getPaginatedOptimizedUserFeedQueryKey],\n async ({ pageParam = 0 }) => {\n const data = queryClient.getQueryData>>(\n [getPaginatedOptimizedUserFeedQueryKey],\n { exact: true }\n );\n // used to get fetched ids to pass to getPaginatedOptimizedUserFeed on load next\n // getting ids from cached data & only for previoues pages\n const previousIds = flattenInfiniteData(\n data,\n pageParam as number\n ).map((p) => extractPostItemKey(p));\n\n const res = await api.getPaginatedOptimizedUserFeedV3(\n authUser?.id || 0n,\n BigInt(pageParam * INITIAL_ITEMS_LIMIT),\n BigInt(INITIAL_ITEMS_LIMIT),\n previousIds\n );\n return extractApiDataOrThrow(res)?.items;\n },\n {\n getNextPageParam: (page, pages) =>\n page && page.length >= INITIAL_ITEMS_LIMIT ? pages.length : undefined,\n }\n );\n}\n","// Set how many items should be displayed on home page feed\nexport const INITIAL_ITEMS_LIMIT = 20;\n","import {\n mainApi,\n Milestone,\n MilestoneWithUser,\n NewMilestone,\n Profile,\n} from 'client';\nimport dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport { useOptimisticMutation } from 'hooks';\nimport { QueryKey, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { fromIcOpt, QueryKeyWithUpdateMethod } from 'utils';\nimport { IMilestoneForm } from '../components/MilestoneForm/MilestoneForm';\n\ndayjs.extend(customParseFormat);\n\nexport const getPinnedMilestonesQueryKey: QueryKey = 'getPinnedMilestones';\n\nexport function useGetPinnedMilestones(userId?: bigint) {\n return useQuery>(\n [getPinnedMilestonesQueryKey, userId],\n () => mainApi.getPinnedMilestones(userId),\n {\n initialData: [],\n enabled: !!userId,\n }\n );\n}\n\nexport const getMilestoneWithUserDataQueryKey: QueryKey =\n 'getMilestoneWithUserData';\n\nexport function useGetMilestoneWithUserData(id?: bigint) {\n return useQuery(\n [getMilestoneWithUserDataQueryKey, id],\n async () => {\n const res = await mainApi.getMilestoneWithUserData(id);\n\n return fromIcOpt(res);\n },\n {\n enabled: !!id,\n }\n );\n}\n\nexport const getMilestonesWithUserDataQueryKey: QueryKey =\n 'getMilestonesWithUserData';\n\nexport function useGetMilestonesWithUserData(userId?: bigint, options = {}) {\n return useQuery, Error>(\n [getMilestonesWithUserDataQueryKey, userId],\n () => mainApi.getMilestonesWithUserData(userId),\n {\n ...options,\n enabled: !!userId,\n }\n );\n}\n\nexport function useGetMilestoneCount(userId?: bigint) {\n return useQuery(\n ['getMilestoneCount', userId],\n () => mainApi.getMilestoneCount(userId),\n {\n enabled: !!userId,\n }\n );\n}\n\nexport interface INewMilestoneArgs {\n milestoneForm: IMilestoneForm;\n userId: bigint;\n}\n\nexport function useCreateNewMilestone() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ milestoneForm }: INewMilestoneArgs) => {\n const start_date = dayjs(milestoneForm.start, 'DD/MM/YYYY', true);\n const end_date = !milestoneForm.one_day\n ? dayjs(milestoneForm.end, 'DD/MM/YYYY', true)\n : null;\n\n const description = {\n user_tags: milestoneForm.descriptionData.user_tags,\n hashtags: milestoneForm.descriptionData.hashtags,\n text: milestoneForm.descriptionData.text,\n };\n\n const milestone = {\n title: milestoneForm.title,\n links: milestoneForm.links,\n company_name: milestoneForm.company_name,\n description,\n end_date: BigInt(milestoneForm.one_day ? 0 : end_date.valueOf()),\n start_date: BigInt(start_date.valueOf()),\n one_day: milestoneForm.one_day,\n collaborators: milestoneForm.collaborators,\n company_handle: milestoneForm.company_username,\n };\n\n return await mainApi.newMilestone(milestone);\n },\n {\n onSuccess: (_, { userId }) => {\n return queryClient.invalidateQueries([\n getMilestonesWithUserDataQueryKey,\n userId,\n ]);\n },\n }\n );\n}\n\nexport interface IUpdateMilestoneArgs {\n id: bigint;\n milestoneForm: IMilestoneForm;\n userId: bigint;\n}\n\nexport function useUpdateMilestone() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ id, milestoneForm }: IUpdateMilestoneArgs) => {\n const start_date = dayjs(milestoneForm.start, 'DD/MM/YYYY', true);\n const end_date = !milestoneForm.one_day\n ? dayjs(milestoneForm.end, 'DD/MM/YYYY', true)\n : null;\n\n const description = {\n user_tags: milestoneForm.descriptionData.user_tags,\n hashtags: milestoneForm.descriptionData.hashtags,\n text: milestoneForm.descriptionData.text,\n };\n\n const updatedMilestone = {\n title: milestoneForm.title,\n links: milestoneForm.links,\n company_name: milestoneForm.company_name,\n description,\n end_date: BigInt(milestoneForm.one_day ? 0 : end_date.valueOf()),\n start_date: BigInt(start_date.valueOf()),\n one_day: milestoneForm.one_day,\n collaborators: milestoneForm.collaborators,\n company_handle: milestoneForm.company_username,\n } as NewMilestone;\n\n return await mainApi.updateMilestone(id, updatedMilestone);\n },\n {\n onSuccess: (_, { userId }) => {\n // TODO single milestone\n return queryClient.invalidateQueries([\n getMilestonesWithUserDataQueryKey,\n userId,\n ]);\n },\n }\n );\n}\n\nexport function useUpdatePinnedMilestone(\n milestoneId: bigint,\n wasPinned: boolean\n) {\n const queryClient = useQueryClient();\n\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const getMilestone = (): Milestone => {\n const authUser = queryClient.getQueryData(['getSelf']);\n\n if (wasPinned) {\n return queryClient\n .getQueryData>([\n getPinnedMilestonesQueryKey,\n authUser?.id,\n ])\n .find((item: Milestone) => !!item && item.id === milestoneId);\n } else {\n return queryClient\n .getQueryData>([\n getMilestonesWithUserDataQueryKey,\n authUser?.id,\n ])\n .find(\n (item: MilestoneWithUser) =>\n !!item && item.milestone.id === milestoneId\n )?.milestone;\n }\n };\n\n const relatedQueryKeys: Array = [\n {\n queryKey: [getPinnedMilestonesQueryKey, authUser?.id],\n update: (data: Array, milestone: Milestone) =>\n wasPinned\n ? data.filter((m) => m.id !== milestone.id)\n : [...data, { ...milestone, pinned: !wasPinned }],\n },\n {\n queryKey: [getMilestonesWithUserDataQueryKey, authUser?.id],\n update: (data: Array, milestone: Milestone) =>\n data.map((item: MilestoneWithUser) =>\n item.milestone.id === milestone.id\n ? {\n ...item,\n milestone: {\n ...item.milestone,\n pinned: !wasPinned,\n },\n }\n : item\n ),\n },\n ];\n\n const mutation = useOptimisticMutation({\n relatedQueryKeys,\n mutationKey: 'pin-unpin-milestone',\n mutationFn: (milestone: Milestone) =>\n mainApi.updatePinnedMilestone(milestone.id, !wasPinned),\n });\n\n return {\n ...mutation,\n mutate: () => mutation.mutate(getMilestone()),\n };\n}\n\nexport interface IUpdateMilestoneCollabVisibilityArgs {\n id: bigint;\n visibility: boolean;\n userId: bigint;\n}\n\nexport function useUpdateMilestoneCollabVisibility() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ id, visibility }: IUpdateMilestoneCollabVisibilityArgs) => {\n return await mainApi.updateMilestoneCollabVisibility(id, visibility);\n },\n {\n onSuccess: (_, { id, userId }) => {\n queryClient.invalidateQueries([getMilestoneWithUserDataQueryKey, id]);\n return queryClient.invalidateQueries([\n getMilestonesWithUserDataQueryKey,\n userId,\n ]);\n },\n }\n );\n}\n\nexport interface IUpdateMilestoneCollabArgs {\n id: bigint;\n value: boolean;\n userId: bigint;\n}\n\nexport function useUpdateMilestoneCollab() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ id, value }: IUpdateMilestoneCollabArgs) => {\n return await mainApi.updateMilestoneCollab(id, value);\n },\n {\n onSuccess: (_, { id, userId }) => {\n queryClient.invalidateQueries([getMilestoneWithUserDataQueryKey, id]);\n return queryClient.invalidateQueries([\n getMilestonesWithUserDataQueryKey,\n userId,\n ]);\n },\n }\n );\n}\n\ninterface IRemoveMilestoneArgs {\n id: bigint;\n userId?: bigint;\n}\n\nexport function useRemoveMilestone() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ id }: IRemoveMilestoneArgs) => {\n return mainApi.removeMilestone(id);\n },\n {\n onSuccess: (_, { userId }) => {\n if (userId) {\n queryClient.invalidateQueries([getPinnedMilestonesQueryKey, userId]);\n queryClient.invalidateQueries([\n getMilestonesWithUserDataQueryKey,\n userId,\n ]);\n }\n },\n }\n );\n}\n","import { Button, ButtonProps } from '@mui/material';\nimport { Profile } from 'client';\nimport { noop } from 'lodash';\nimport { OpenDistriktContext } from 'providers';\nimport React, { Fragment, useContext, useMemo } from 'react';\nimport { useQueryClient } from 'react-query';\nimport {\n useFollow,\n useIsFollowedBy,\n useIsFollowing,\n useUnfollow,\n} from 'services';\nimport ConfirmModal from '../Dialogs/Confirm';\ninterface Props extends ButtonProps {\n userId: bigint;\n username: string;\n mode?: 'all' | 'followOnly' | 'followBack';\n minWidth?: string | number;\n followText?: string;\n onSuccess?: (following: boolean) => void;\n cancelVariant?: 'text' | 'outlined';\n}\n\nconst FollowButton = ({\n userId,\n username,\n mode = 'all',\n color = 'primary',\n variant: variantProp,\n cancelVariant = 'outlined',\n disabled,\n minWidth = 117,\n followText = 'Follow',\n onSuccess = noop,\n ...props\n}: Props) => {\n const queryClient = useQueryClient();\n const [confirmModal, setConfirmModal] = React.useState(false);\n const { data: following, isLoading: isFollowingLoading } = useIsFollowing(\n userId\n );\n const { data: followed, isLoading: isFollowedByLoading } = useIsFollowedBy(\n userId\n );\n const auth = queryClient.getQueryData(['getSelf']);\n const useFollowMutation = useFollow();\n const useUnfollowMutation = useUnfollow();\n const loading = isFollowingLoading || isFollowedByLoading;\n\n const handleClick = () => {\n if (following && username === 'distrikt') {\n setConfirmModal(true);\n } else {\n if (following) {\n useUnfollowMutation.mutate(\n { userId },\n {\n onSuccess: () => {\n onSuccess(false);\n },\n }\n );\n } else {\n useFollowMutation.mutate(\n { userId },\n {\n onSuccess: () => {\n onSuccess(true);\n },\n }\n );\n }\n }\n };\n\n const {\n mode: openDistriktMode,\n handleAction: openDistriktAction,\n } = useContext(OpenDistriktContext);\n\n const guestView = useMemo(() => openDistriktMode !== 'User', [\n openDistriktMode,\n ]);\n\n // variantProp refers to the 'follow' state\n let variant;\n if (!guestView && variantProp === 'contained' && Boolean(following)) {\n variant = cancelVariant;\n } else {\n variant = variantProp;\n }\n\n if (guestView || auth?.id !== userId) {\n return (\n \n openDistriktAction(handleClick)}\n color={color}\n disabled={\n disabled ||\n (mode === 'followOnly' && !guestView && Boolean(following)) ||\n loading\n }\n variant={variant}\n {...props}\n style={{\n minWidth: minWidth,\n }}\n >\n {guestView\n ? 'Follow'\n : loading\n ? 'Loading...'\n : following\n ? mode === 'followOnly'\n ? 'Following'\n : 'Unfollow'\n : followed && mode === 'followBack'\n ? 'Follow back'\n : followText}\n \n {confirmModal && (\n setConfirmModal(false)}\n confirm={async () => {\n setConfirmModal(false);\n useUnfollowMutation.mutateAsync({ userId });\n }}\n loading={useUnfollowMutation.isLoading}\n confirmButton=\"Yes, Unfollow\"\n content=\"Just kidding, it's totally ok.\"\n title=\"HOW DARE YOU UNFOLLOW US?!\"\n />\n )}\n \n );\n } else {\n return
    ;\n }\n};\n\nexport default FollowButton;\n","import React from 'react';\nimport Grow from '@mui/material/Grow';\nimport Snackbar, { SnackbarOrigin } from '@mui/material/Snackbar';\nimport { Alert as AlertComponent, AlertTitle } from '@mui/material';\nimport { Color } from '@mui/lab';\nimport { Portal } from '@mui/material';\n\ninterface IProps {\n title?: string;\n message: string;\n onClose: () => void;\n position?: SnackbarOrigin;\n severity?: Color;\n}\n\n/**\n * @deprecated This component is deprecated.\n *\n * Try using components/Alert.\n */\nfunction AlertOld({ title, message, onClose, position, severity }: IProps) {\n const el = document.getElementById('modal-root');\n\n return (\n \n \n \n {title ? (\n Error\n ) : null}\n\n {message}\n \n \n \n );\n}\n\nexport default AlertOld;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(() => ({\n avatar: {\n borderRadius: '50%',\n height: '40px',\n objectFit: 'cover',\n width: '40px',\n },\n}));\n","import React from 'react';\nimport { Skeleton } from '@mui/material';\n\nimport ImageLoader from '../ImageLoader';\nimport { useStyles } from './styles';\nimport type { Image } from 'client';\n\ninterface IProps {\n image: Image;\n}\n\nfunction Avatar({ image }: IProps) {\n const classes = useStyles();\n\n return (\n \n {({ src, loading }) =>\n loading ? (\n \n ) : (\n \"Avatar\"\n )\n }\n \n );\n}\n\nexport default Avatar;\n","import React from 'react';\nimport { Redirect, Route, RouteProps } from 'react-router-dom';\n\nexport interface ConditionalRouteProps extends RouteProps {\n condition: boolean;\n}\n\nexport const ConditionalRoute = ({\n component: Component,\n condition,\n ...routeProps\n}: ConditionalRouteProps) => (\n \n condition ? : \n }\n />\n);\n","import React, { useRef, useState } from 'react';\nimport {\n Badge,\n TextField,\n FormControl,\n FormHelperText,\n Typography,\n InputAdornment,\n} from '@mui/material';\nimport { DatePicker as MuiDatePicker } from '@mui/x-date-pickers/DatePicker';\nimport { PickersDay } from '@mui/x-date-pickers';\n\nimport {\n ArrowLeftIcon,\n ArrowRightIcon,\n ArrowDownIcon,\n CalendarIcon,\n WarningIcon,\n} from 'components/icons';\n\ninterface IDatePickerProps {\n value: Date;\n label: string;\n error?: boolean;\n errorText?: string;\n info?: string;\n disabled?: boolean;\n gutters?: boolean;\n onChange: (value: Date) => void;\n}\n\nfunction DatePicker({\n label,\n error,\n errorText,\n info,\n disabled,\n value,\n onChange,\n gutters,\n ...props\n}: IDatePickerProps) {\n const ref = useRef(null);\n const [open, setOpen] = useState(false);\n\n return (\n \n {label ? (\n \n {label}\n \n ) : null}\n\n setOpen(true)}\n onClose={() => setOpen(false)}\n components={{\n ...icons,\n OpenPickerIcon: error ? icons.ErrorPickerIcon : icons.OpenPickerIcon,\n }}\n DialogProps={{\n PaperProps: {\n sx: {\n border: '1px solid',\n borderColor: 'colors.ui_04',\n borderRadius: '8px',\n },\n },\n }}\n PaperProps={{\n sx: {\n border: '1px solid',\n borderColor: 'colors.ui_04',\n borderRadius: '8px',\n marginTop: '4px',\n marginBottom: '4px',\n minWidth: ref.current?.offsetWidth,\n },\n }}\n renderDay={(day, _value, DayComponentProps) => {\n const isToday = !DayComponentProps.today;\n const isSelected = !DayComponentProps.selected;\n\n return (\n \n \n \n );\n }}\n renderInput={(p) => {\n return disabled ? (\n \n ) : (\n \n \n \n \n \n \n \n \n ) : (\n p.InputProps?.endAdornment\n ),\n }}\n onMouseDown={() => setOpen(true)}\n />\n );\n }}\n />\n\n {error && {errorText}}\n\n {info ? (\n \n {info}\n \n ) : null}\n \n );\n}\n\nconst icons = {\n LeftArrowIcon: ArrowLeftIcon,\n RightArrowIcon: ArrowRightIcon,\n SwitchViewIcon: ArrowDownIcon,\n OpenPickerIcon: CalendarIcon,\n ErrorPickerIcon: WarningIcon,\n};\n\nexport default DatePicker;\n","import React from 'react';\nimport { Box, styled, SxProps, Theme } from '@mui/material';\n\ninterface IDotProps {\n visible?: boolean;\n}\n\nexport const StyledBox = styled(Box)(\n {\n minWidth: '8px',\n maxWidth: '8px',\n minHeight: '8px',\n maxHeight: '8px',\n borderRadius: '50%',\n background: '#7664FD',\n },\n (props) => ({\n opacity: props.visible ? 1 : 0,\n })\n);\n\ninterface IProps {\n className?: string;\n sx?: SxProps;\n visible?: boolean;\n}\n\nexport default function Dot({ visible = true, className = '', sx }: IProps) {\n return ;\n}\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n container: {\n minHeight: 300,\n maxHeight: 500,\n height: 'auto',\n position: 'absolute',\n width: '100%',\n zIndex: 50,\n boxShadow: '0 2px 16px 0 rgb(76 70 212 / 19%)',\n background: theme.palette.background.paper,\n borderRadius: 10,\n [theme.breakpoints.down('md')]: {\n minHeight: 220,\n },\n overflowY: 'auto',\n },\n list: {\n zIndex: 1,\n background: theme.palette.background.paper,\n borderRadius: 10,\n maxHeight: 500,\n },\n emptyText: {\n fontSize: theme.typography.pxToRem(12),\n opacity: 0.45,\n textAlign: 'center',\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n displayName: {\n display: 'flex',\n alignItems: 'baseline',\n fontSize: theme.typography.pxToRem(12),\n },\n bullet: {\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n color: theme.palette.text.secondary,\n fontSize: theme.typography.pxToRem(14),\n opacity: 0.35,\n },\n following: {\n fontSize: theme.typography.pxToRem(12),\n opacity: 0.35,\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n centeredContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n loading: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n resultsTitle: {\n fontSize: 12,\n opacity: 0.45,\n fontWeight: 600,\n paddingTop: 16,\n paddingLeft: 16,\n paddingRight: 16,\n paddingBottom: 4,\n },\n divider: {\n marginTop: 4,\n marginBottom: 4,\n },\n listItem: {\n pointerEvents: 'all',\n },\n}));\n","import React, { ComponentType } from 'react';\nimport { Link } from 'react-router-dom';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport { Box, Divider, Typography } from '@mui/material';\nimport { Loading } from 'components';\nimport { useStyles } from './styles';\nimport { FollowerProfileLite, Profile } from 'client';\n\ninterface IProps {\n title?: string;\n loading: boolean;\n inlineLoading: boolean;\n items: Array;\n headerItems?: Array;\n emptyMessage?: string;\n ItemComponent?: ComponentType;\n onClick: (value: unknown) => void;\n onHeaderClick: (key: string, index: number) => void;\n}\n\nfunction Dropdown({\n title,\n loading,\n inlineLoading,\n items = [],\n headerItems,\n emptyMessage,\n ItemComponent,\n onClick,\n onHeaderClick,\n}: IProps) {\n const classes = useStyles();\n\n if (loading && !inlineLoading && items.length === 0) {\n return (\n
    \n \n
    \n );\n }\n\n return (\n
    \n {title && (items.length > 0 || headerItems?.length > 0) ? (\n <>\n \n \n {title}\n \n\n {loading && items.length > 0 ? : null}\n \n \n \n ) : null}\n\n {headerItems?.length > 0 && onHeaderClick ? (\n <>\n \n {headerItems.map((item, i) => (\n onHeaderClick(item, i)}\n style={{\n fontSize: 12,\n fontWeight: 600,\n }}\n >\n {item}\n \n ))}\n \n \n \n ) : null}\n\n \n {loading && items.length === 0 ? (\n
    \n \n
    \n ) : null}\n\n {items.length > 0\n ? items.map((item, i) => (\n onClick(item)}\n >\n {ItemComponent\n ? React.createElement(ItemComponent, {\n data: item,\n })\n : item.profile?.username || item.user_name || ''}\n \n ))\n : null}\n\n {!loading && items.length === 0 ? (\n \n {emptyMessage || 'There are no results to display'}\n \n ) : null}\n
    \n
    \n );\n}\n\nexport default Dropdown;\n","import React, { ComponentType, useMemo } from 'react';\nimport { FollowerProfileLite, Profile, ProfileLite } from 'client';\nimport { Dropdown } from 'components';\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport { Box } from '@mui/material';\n\ninterface IProps {\n title?: string;\n loading: boolean;\n inlineLoading?: boolean;\n items: Array;\n headerItems?: Array;\n emptyMessage?: string;\n ItemComponent?: ComponentType;\n onClick: (user: T) => void;\n onHeaderClick?: (key: string) => void;\n}\n\nfunction ProfileDropdown({\n loading,\n inlineLoading,\n emptyMessage,\n items = [],\n headerItems,\n onClick,\n onHeaderClick,\n}: IProps) {\n const handleHeaderClick =\n onHeaderClick instanceof Function\n ? (_: never, index: number) => {\n onHeaderClick(headerItems[index]);\n }\n : undefined;\n\n const formattedHeaderItems = useMemo(\n () =>\n Array.isArray(headerItems)\n ? headerItems.map((item) => `#${item}`)\n : undefined,\n [headerItems]\n );\n\n return (\n \n );\n}\n\nfunction UserCard({ data }: { data: FollowerProfileLite }) {\n return (\n \n \n \n );\n}\n\nexport default ProfileDropdown;\n","import { styled } from '@mui/material/styles';\nimport MuiCard from '@mui/material/Card';\nimport MuiCardActions from '@mui/material/CardActions';\nimport MuiCardContent from '@mui/material/CardContent';\nimport { IEmptyStateProps } from './EmptyState';\n\nexport const Card = styled(MuiCard)<\n Pick\n>(({ theme, disableBorder, fullWidth }) => ({\n backgroundColor: theme.palette.colors.ui_01,\n border: disableBorder ? 'none' : '1px solid',\n borderColor: theme.palette.colors.ui_04,\n borderRadius: '8px',\n padding: theme.spacing(4),\n maxWidth: fullWidth ? 'unset' : '500px',\n}));\n\nexport const CardContent = styled(MuiCardContent)({\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n padding: '0px',\n});\n\nexport const CardActions = styled(MuiCardActions)({\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n marginTop: '32px',\n padding: '0px',\n});\n","import React from 'react';\nimport Button from '@mui/material/Button';\nimport Typography from '@mui/material/Typography';\nimport CardMedia from '@mui/material/CardMedia';\nimport { SxProps, Theme } from '@mui/material';\n\nimport * as Styled from './styles';\n\ninterface IEmptyStateButtonProps {\n text: string;\n variant?: 'contained' | 'outlined' | 'text';\n onClick: () => void;\n}\n\nexport interface IEmptyStateProps {\n title: string;\n description: string;\n image?: string;\n disableBorder?: boolean;\n height?: string;\n width?: string;\n fullWidth?: boolean;\n buttons?: IEmptyStateButtonProps[];\n sx?: SxProps;\n}\n\nfunction EmptyState({\n title,\n description,\n image,\n buttons,\n height,\n width,\n fullWidth,\n disableBorder,\n sx,\n}: IEmptyStateProps) {\n return (\n \n \n {image ? (\n \n ) : null}\n\n \n {title}\n \n \n {description}\n \n \n\n {buttons ? (\n \n {buttons.map((button, index) => (\n \n {button.text}\n \n ))}\n \n ) : null}\n \n );\n}\n\nexport default EmptyState;\n","import { Box, InputAdornment } from '@mui/material';\nimport { debounce } from 'lodash';\nimport React, { useCallback, useMemo, useState } from 'react';\n\nimport { Input } from 'components/Search/Search';\nimport { SearchIcon } from '../icons';\n\ninterface IProps {\n placeholder?: string;\n variant?: 'text' | 'outlined';\n disableIcon?: boolean;\n onChange: (value: string) => void;\n}\n\nexport default function FilterInput({\n placeholder = 'What are you looking for?',\n variant = 'outlined',\n disableIcon,\n onChange,\n}: IProps) {\n const [term, setTerm] = useState('');\n const handleChange = (e: React.SyntheticEvent) => {\n e.preventDefault();\n const content = e.currentTarget.value;\n\n setTerm(content);\n debounceSearch(content);\n };\n\n const debounceSearch = useMemo(\n () =>\n debounce((value) => {\n onChange(value);\n }, 250),\n [onChange]\n );\n\n return (\n \n ) =>\n handleChange(event)\n }\n inputProps={{\n onKeyDown: (e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n },\n }}\n sx={{\n paddingLeft: '0',\n\n '& .MuiInputAdornment-root': {\n color: 'colors.ui_05',\n marginLeft: '16px',\n marginRight: '8px',\n },\n\n '&.Mui-focused .MuiInputAdornment-root': {\n color: 'colors.ui_07',\n },\n\n '& input': {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n\n '& .MuiInputBase-adornedStart.showIcon svg': {\n color: 'colors.ui_05',\n },\n\n '& .Mui-focused .MuiInputBase-adornedStart.showIcon svg': {\n color: 'colors.ui_07',\n },\n }}\n InputProps={{\n className: 'showIcon',\n startAdornment: !disableIcon && (\n \n \n \n ),\n }}\n fullWidth\n />\n \n );\n}\n","import React, { useCallback, useContext } from 'react';\nimport { Box } from '@mui/material';\nimport { BoxProps, Button } from '@mui/material';\nimport { useHistory } from 'react-router-dom';\nimport { login } from 'utils/auth';\nimport { OpenDistriktContext } from 'providers';\n\ntype BoxPropsOmitted = 'title' | 'onClick';\n\nexport type LoginSignupBoxAction = 'Login' | 'Signup';\n\ninterface LoginSignupBoxProps extends Omit {\n title?: JSX.Element;\n description?: JSX.Element;\n fullWidth?: boolean;\n buttonsClassName?: string;\n onClick?: (action: LoginSignupBoxAction) => void;\n}\n\nexport const LoginSignupBox = (props: LoginSignupBoxProps) => {\n const {\n description,\n fullWidth,\n sx: propsSx,\n title,\n buttonsClassName,\n onClick,\n ...boxProps\n } = props;\n\n const sx = propsSx || {};\n const { recomputeMode } = useContext(OpenDistriktContext);\n const history = useHistory();\n\n const handleLogin = useCallback(async () => {\n localStorage.setItem('REDIRECT_AFTER_LOGIN', history.location.pathname);\n try {\n await login({\n onSuccess: async () => {\n await recomputeMode(true);\n history.push('/signup');\n },\n });\n } catch (err) {\n console.log(err);\n }\n onClick?.('Login');\n }, [history, onClick, recomputeMode]);\n\n return (\n \n {title}\n\n {description}\n\n \n \n Login\n \n\n \n Sign Up\n \n \n \n );\n};\n","import { ListItemIcon } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\nexport const ErrorListItemIcon = styled(ListItemIcon)({\n height: '16px',\n marginLeft: 'auto',\n minWidth: '24px!important', // for some reason lib has an !important here\n display: 'inline-flex!important',\n});\n\nexport const CheckListItemIcon = styled(ListItemIcon)({\n paddingLeft: '8px',\n marginLeft: 'auto',\n minWidth: '24px!important', // for some reason lib has an !important here\n});\n","import React, { useState } from 'react';\nimport { Fade, SvgIcon } from '@mui/material';\nimport {\n FormControl,\n FormHelperText,\n MenuItem,\n Select as MuiSelect,\n SelectChangeEvent,\n Typography,\n} from '@mui/material';\n\nimport { ArrowDownIcon, Check, Warning } from '../icons';\nimport * as Styled from './styles';\n\ninterface ISelectProps {\n name: string;\n label?: string;\n items: string[] | Array<{ name: string; value: any }>;\n value: string;\n defaultValue?: string;\n error?: boolean;\n disabled?: boolean;\n emptyLabel?: string;\n required?: boolean;\n hideEmptyLabelOnDropdown?: boolean;\n onChange: (value: string) => void;\n onFocus?: () => void;\n onMouseLeave?: () => void;\n info?: string;\n narrow?: boolean;\n showWarningIcon?: boolean;\n}\n\nfunction Select({\n required,\n name,\n label,\n items,\n value,\n error,\n disabled,\n emptyLabel,\n hideEmptyLabelOnDropdown,\n defaultValue,\n onChange,\n onFocus,\n onMouseLeave,\n info,\n narrow = false,\n showWarningIcon = true,\n}: ISelectProps) {\n const [open, setOpen] = useState(false);\n\n const handleChange = (event: SelectChangeEvent) => {\n onChange(event.target.value);\n };\n\n return (\n \n {label ? (\n \n {label}\n \n ) : null}\n\n setOpen(true)}\n onClose={() => setOpen(false)}\n onChange={handleChange}\n onFocus={() => {\n onFocus && onFocus();\n }}\n onMouseLeave={onMouseLeave}\n error={error}\n disabled={disabled}\n inputProps={{\n 'aria-label': label,\n className: error ? 'Mui-error' : disabled ? 'Mui-disabled' : '',\n }}\n sx={{ '& svg': { fontSize: 16, right: 16 } }}\n IconComponent={ArrowDownIcon}\n MenuProps={{\n sx: { marginTop: '4px' },\n\n PaperProps: {\n style: {\n maxHeight: '60vh',\n },\n },\n }}\n >\n {hideEmptyLabelOnDropdown && open ? null : emptyLabel ? (\n \n {emptyLabel}\n \n ) : null}\n\n {items.map((item, index: number) => (\n \n {item?.name || item}\n\n {showWarningIcon &&\n (item?.value || item) === value &&\n error &&\n !open ? (\n \n \n \n \n \n ) : null}\n\n {(item?.value || item) === value ? (\n \n \n \n ) : null}\n \n ))}\n \n\n {info ? (\n \n {info}\n \n ) : null}\n \n );\n}\n\nexport default Select;\n","// mime types used in app attachments\nexport const MIME_TYPE_KEYS = {\n JPEG: 'image/jpeg',\n JPG: 'image/jpg',\n GIF: 'image/gif',\n PNG: 'image/png',\n} as const;\n\nexport const MIME_TYPES = {\n [MIME_TYPE_KEYS.JPEG]: 'jpeg',\n [MIME_TYPE_KEYS.JPG]: 'jpg',\n [MIME_TYPE_KEYS.GIF]: 'gif',\n [MIME_TYPE_KEYS.PNG]: 'png',\n} as const;\n\nexport const MAX_PREVIEW_IMAGE_HEIGHT = 321;\n\nexport const MAX_DISPLAY_NAME_LENGTH = 50;\n","import React from 'react';\nimport { Box, Button, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n// import { DerEncodedPublicKey } from '@dfinity/agent';\nimport { DelegationIdentity, Ed25519PublicKey } from '@dfinity/identity';\nimport Loading from '../../components/Loading';\nimport { AuthClient, AuthClientStorage } from '@dfinity/auth-client';\nimport { SignIdentity } from '@dfinity/agent';\nimport { BinaryBlob } from '@dfinity/candid';\nimport { fromHexString } from 'utils';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: '100vh',\n fontFamily:\n '-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol',\n },\n icon: {\n fontSize: '96pt',\n },\n button: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n}));\n\nclass MobileSessionIdentity extends SignIdentity {\n constructor(protected _publicKey: Ed25519PublicKey) {\n super();\n }\n\n /**\n * Return the public key.\n * @returns {Ed25519PublicKey}\n */\n public getPublicKey(): Ed25519PublicKey {\n return this._publicKey;\n }\n\n sign(blob: BinaryBlob): Promise {\n throw new Error('Not implemented');\n }\n}\n\nclass MemoryClientStorage implements AuthClientStorage {\n private storage = [];\n\n get(key: string): Promise {\n return this.storage[key] || null;\n }\n\n set(key: string, value: string): Promise {\n this.storage[key] = value;\n return;\n }\n\n remove(key: string): Promise {\n delete this.storage[key];\n return;\n }\n}\n\nconst MobileAuth = () => {\n const classes = useStyles();\n const [appUrl, setAppUrl] = React.useState(null);\n\n React.useEffect(() => {\n setTimeout(getValue, 5000);\n }, []);\n\n async function getValue() {\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n const sessionPublicKey = urlParams.get('sessionPublicKey') as string;\n const callbackUri = urlParams.get('callback_uri');\n\n const authClient = await AuthClient.create({\n storage: new MemoryClientStorage(),\n identity: new MobileSessionIdentity(\n Ed25519PublicKey.fromDer(fromHexString(sessionPublicKey).buffer)\n ),\n idleOptions: {\n disableIdle: true,\n },\n });\n await authClient.login({\n identityProvider: process.env.REACT_APP_INTERNET_IDENTITY_URL,\n maxTimeToLive: BigInt(30 * 24 * 60 * 60 * 1000 * 1000 * 1000), // 30 days\n onSuccess: async () => {\n const identity = authClient.getIdentity() as DelegationIdentity;\n const delegationChain = identity.getDelegation();\n\n const json = JSON.stringify(delegationChain.toJSON());\n\n console.log(json);\n const redirectUrl = `${callbackUri}?success=true&&json=` + json;\n\n window.location.href = redirectUrl;\n setAppUrl(redirectUrl);\n },\n onError: async (error) => {\n console.log('error');\n const redirectUrl = `${callbackUri}?success=false&&json=` + error;\n\n window.location.href = redirectUrl;\n setAppUrl(redirectUrl);\n },\n });\n }\n\n return (\n <>\n
    \n \n \n \n Just a moment: We’re redirecting you!\n {appUrl ? (\n \n Take me to the app!\n \n ) : (\n \n Redirect me now\n \n )}\n
    \n \n );\n};\n\nexport default MobileAuth;\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Box, Container, Typography } from '@mui/material';\nimport { getMobileOS, redirectToStore } from '../../utils/getMobileOS';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100vh',\n padding: '50px',\n flexDirection: 'row',\n },\n wrapper: {\n background: '#fff url(/assets/landing_bg.jpg) center center no-repeat',\n backgroundSize: 'cover',\n minHeight: '100vh',\n height: '100%',\n width: '100%',\n position: 'relative',\n backgroundPosition: '25%',\n [theme.breakpoints.down('md')]: {\n background:\n '#fff url(/assets/landing_bg_tablet.jpg) center center no-repeat',\n backgroundSize: 'cover',\n },\n },\n container: {\n maxWidth: 400,\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n paddingTop: 24,\n paddingBottom: 12,\n maxHeight: 500,\n [theme.breakpoints.down('md')]: {\n maxHeight: 'unset',\n paddingTop: 48,\n paddingBottom: 64,\n alignItems: 'center',\n },\n },\n topContainer: {\n [theme.breakpoints.down('md')]: {\n flex: 1,\n },\n },\n imageContainer: {\n textAlign: 'center',\n paddingTop: theme.spacing(10),\n paddingBottom: theme.spacing(9),\n },\n image: {\n width: 210,\n height: 'auto',\n },\n title: {\n fontSize: theme.typography.pxToRem(36),\n textAlign: 'center',\n },\n contentContainer: {\n maxWidth: 448,\n marginLeft: 'auto',\n marginRight: 'auto',\n paddingTop: theme.spacing(4),\n },\n content: {\n fontSize: theme.typography.pxToRem(14),\n textAlign: 'center',\n color: theme.palette.primary.main,\n },\n bottomContainer: {\n [theme.breakpoints.down('md')]: {\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-around',\n paddingTop: 100,\n textAlign: 'center',\n },\n },\n logo: {\n width: '100%',\n maxWidth: 319,\n height: 'auto',\n [theme.breakpoints.down('md')]: {\n maxWidth: 200,\n },\n },\n textContainer: {\n paddingBottom: theme.spacing(7),\n paddingTop: theme.spacing(7),\n [theme.breakpoints.down('md')]: {\n paddingBottom: 0,\n paddingTop: 0,\n },\n },\n topText: {\n marginBottom: theme.spacing(5),\n },\n}));\n\nconst AppDownload = () => {\n const classes = useStyles();\n const userOS = getMobileOS();\n\n redirectToStore();\n\n if (userOS === 'unknown') {\n return (\n
    \n
    \n \"Error\"\n
    \n Oops!\n \n That didn't work.\n \n
    \n );\n } else {\n return (\n
    \n \n
    \n \n \n \n \n Thanks for downloading Distrikt app!\n \n
    \n
    \n
    \n );\n }\n};\n\nexport default AppDownload;\n","import React from 'react';\nimport {\n Paper,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n Typography,\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PageHeader from '../../components/PageHeader/PageHeader';\n\nconst useStyles = makeStyles((theme) => ({\n resourcesContainer: {\n padding: theme.spacing(4),\n display: 'flex',\n flexDirection: 'column',\n },\n text: {\n fontSize: theme.typography.pxToRem(14),\n },\n title: {\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 600,\n textTransform: 'uppercase',\n paddingBottom: theme.spacing(0.5),\n },\n}));\n\nconst CookiePolicy = () => {\n const classes = useStyles();\n\n return (\n <>\n \n
    \n \n The distrikt policy regarding data privacy and usage is\n straight-forward: we do not track you or use technologies to analyze\n your behavior while using distrikt. This Cookie Policy applies to any\n distrikt product or service that links to this policy or incorporates\n it by reference. We use cookies and similar technologies such as local\n storage over time (collectively referred to in this policy as\n “cookies”) to store and use data only as strictly necessary to enable\n functionality of part of our Services, as defined in our Privacy\n Policy (“Services”).\n \n
    \n \n What technologies are used?\n \n \n \n \n \n Type of technology\n Description\n \n \n \n \n \n Cookies\n \n \n \n A cookie is a small file placed onto your device that\n enables distrikt features and functionality.\n \n
    \n \n We currently do not use cookies to save any settings or\n preferences on your device.\n \n
    \n
    \n \n \n Local Storage\n \n \n \n Local storage enables a website or application to store\n information locally on your device(s). Local storage may be\n used to improve the distrikt experience, for example, by\n enabling features, remembering your preferences and speeding\n up site functionality.\n \n \n \n \n \n Other similar technologies\n \n \n \n We do not use any tracking technologies, such as mobile\n advertising IDs, tags or similar and will not track you\n while on the platform.\n \n \n \n
    \n
    \n
    \n
    \n \n What is Do Not Track (DNT)?\n \n \n DNT is a concept that has been promoted by regulatory agencies such as\n the U.S. Federal Trade Commission (FTC), for the Internet industry to\n develop and implement a mechanism for allowing Internet users to\n control the tracking of their online activities across websites by\n using browser settings. As such, distrikt does not generally respond\n to “do not track” signals.\n \n
    \n \n );\n};\n\nexport default CookiePolicy;\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Typography } from '@mui/material';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n textAlign: 'center',\n },\n imageContainer: {\n textAlign: 'center',\n paddingTop: theme.spacing(10),\n paddingBottom: theme.spacing(9),\n },\n image: {\n width: 310,\n height: 'auto',\n },\n title: {\n fontSize: theme.typography.pxToRem(36),\n },\n contentContainer: {\n maxWidth: 448,\n marginLeft: 'auto',\n marginRight: 'auto',\n paddingTop: theme.spacing(4),\n },\n content: {\n fontSize: theme.typography.pxToRem(14),\n },\n}));\n\nconst Error = () => {\n const classes = useStyles();\n\n return (\n
    \n
    \n \"Error\"\n
    \n Oops!\n
    \n \n That didn't work.\n \n \n For now, why not head off to explore somewhere else in distrikt?\n \n
    \n
    \n );\n};\n\nexport default Error;\n","export const ERRORS = {\n usernameNotFound: \"The typed username can't be found!\",\n tooManyUsernames: 'You can only tag up to 5 users.',\n canNotCheckMentions: 'Unable to check mentions.',\n pollUserTags: \"You can't tag users in a poll.\",\n};\n","import { ApiItemFeed } from 'client';\nimport { getPaginatedOptimizedDiscoveryFeedQueryKey } from 'pages/discover/services';\nimport { getPaginatedOptimizedUserFeedQueryKey } from 'pages/home/services';\nimport { InfiniteData, QueryClient, QueryKey } from 'react-query';\nimport { AllKeys } from 'types';\nimport { flattenInfiniteData } from 'utils';\n\nfunction getItemDataFromFeed(\n queryClient: QueryClient,\n queryProps: {\n queryKey: QueryKey;\n resourceId: bigint;\n parentResourceId?: bigint;\n type: AllKeys;\n }\n) {\n // in case user previously visited the home/stream page\n // we can get the post from the feed as initial datqa\n const data = queryClient.getQueryData<\n InfiniteData | undefined\n >(queryProps.queryKey);\n\n if (data) {\n const items = flattenInfiniteData(data);\n const post = items.find((item) => {\n if (queryProps.type === 'ThreadPreview' && 'ThreadPreview' in item) {\n return (\n item.ThreadPreview.id === queryProps.parentResourceId &&\n item.ThreadPreview.preview.some((p) => p.id === queryProps.resourceId)\n );\n }\n if (queryProps.type === 'OptimizedPost' && 'OptimizedPost' in item) {\n return item.OptimizedPost.post.post_id === queryProps.resourceId;\n }\n return false;\n });\n\n if (post) {\n return post;\n }\n }\n}\n\nexport function getInitialItemDataFromFeeds(\n queryClient: QueryClient,\n queryProps: {\n resourceId: bigint;\n parentResourceId?: bigint;\n type: AllKeys;\n }\n) {\n const post = getItemDataFromFeed(queryClient, {\n ...queryProps,\n queryKey: [getPaginatedOptimizedUserFeedQueryKey],\n });\n\n if (post) {\n return post;\n }\n\n return getItemDataFromFeed(queryClient, {\n ...queryProps,\n queryKey: [getPaginatedOptimizedDiscoveryFeedQueryKey],\n });\n}\n","import * as linkify from 'linkifyjs';\nimport { update } from 'lodash';\nimport {\n InfiniteData,\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n QueryClient,\n} from 'react-query';\n\nimport api, {\n ApiItem,\n ApiItemFeed,\n NewPostRequestV2,\n OptimizedComment,\n OptimizedPostV2,\n OptimizedThread,\n Profile,\n QuotedResourceById,\n assetsApi,\n ExtensionRequest,\n LinkMetadata,\n} from 'client';\nimport {\n COMMENTS_INITIAL_ITEMS_LIMIT,\n MIME_TYPES_POST,\n} from '../../../constants';\nimport { INITIAL_ITEMS_LIMIT, SORT_ORDER } from '../constants';\nimport { ValueOf } from 'types';\nimport { formatImage } from 'utils/image';\nimport {\n extractApiDataOrThrow,\n flattenInfiniteData,\n formatItemInInifiteData,\n toIcEnum,\n toIcOpt,\n toIcVariant,\n} from 'utils';\nimport { getInitialItemDataFromFeeds } from '../utils/initialData';\nimport { getPaginatedOptimizedUserFeedQueryKey } from 'pages/home/services';\nimport { getPaginatedOptimizedDiscoveryFeedQueryKey } from 'pages/discover/services';\nimport {\n getMilestonesWithUserDataQueryKey,\n getPaginatedOptimizedProfileFeedQueryKey,\n getProfilePinnedPostsQueryKey,\n} from 'pages/profile/services';\nimport { getPaginatedOptimizedHashtagFeedQueryKey } from 'pages/hashtag/services';\n\nexport function useBlockUser() {\n return useMutation(({ userId }: { userId: bigint }) => api.blockUser(userId));\n}\n\n/**\n * Fetches a single post or thread post by id.\n *\n * @param id - is a post id if theadId doesn't exist, otherwise it's a thread master id\n * @param [threadId] - optional thread id\n */\nexport function useGetPostOrThreadPost(id: string, threadId?: string) {\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n\n const getItemQuery = useQuery(\n ['getItem', id],\n async () => {\n const res = await api.getItem(BigInt(id), auth?.id || 0n);\n return extractApiDataOrThrow(res);\n },\n {\n // using select to extract the data from the response in order to keep ApiItem in store\n select: (data) => {\n // we are only sending in a post id, so result should only be a post\n if ('OptimizedPost' in data) {\n return data.OptimizedPost;\n }\n return undefined;\n },\n initialData: () => {\n const post = getInitialItemDataFromFeeds(queryClient, {\n resourceId: BigInt(id),\n parentResourceId: threadId ? BigInt(threadId) : undefined,\n type: 'OptimizedPost',\n });\n\n if (post && 'OptimizedPost' in post) {\n return post;\n }\n\n return undefined;\n },\n enabled: !threadId,\n }\n );\n\n const getThreadPostQuery = useQuery(\n ['getThreadPost', id, threadId],\n async () => {\n const res = await api.getThreadPost(BigInt(id), BigInt(threadId));\n return extractApiDataOrThrow(res);\n },\n {\n initialData: () => {\n // in case user previously visited the thread page\n // we can get the post from the thread as initial datqa\n const data = queryClient.getQueryData([\n 'getThread',\n id,\n ]);\n\n if (data) {\n return data.posts.find((p) => p.id === BigInt(threadId));\n }\n\n return undefined;\n },\n enabled: !!threadId,\n }\n );\n\n return threadId ? getThreadPostQuery : getItemQuery;\n}\n\n/**\n * @deprecated Service is deprecated.\n *\n * Use useGetPaginatedOptimizedCommentForResourceId instead\n */\nexport function useGetPaginatedCommentsWithUserDataAndSorting(\n postId: string,\n commentsSort: number\n) {\n return useInfiniteQuery(\n ['getPaginatedCommentsWithUserDataAndSorting', postId, commentsSort],\n async ({ pageParam = 0 }) =>\n api.getPaginatedCommentsWithUserDataAndSorting(\n BigInt(postId),\n BigInt(pageParam * COMMENTS_INITIAL_ITEMS_LIMIT),\n BigInt(COMMENTS_INITIAL_ITEMS_LIMIT),\n Number(commentsSort)\n ),\n {\n getNextPageParam: (page, pages) =>\n page && page.length >= COMMENTS_INITIAL_ITEMS_LIMIT\n ? pages.length\n : undefined,\n }\n );\n}\n\nexport function useGetPaginatedOptimizedCommentForResourceId(\n postId: bigint,\n commentsSort: ValueOf,\n disabled?: boolean\n) {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n\n return useInfiniteQuery(\n ['getPaginatedOptimizedCommentForResourceId', postId, commentsSort],\n async ({ pageParam = 0 }) => {\n const data = queryClient.getQueryData<\n InfiniteData>\n >(['getPaginatedOptimizedCommentForResourceId', postId, commentsSort], {\n exact: true,\n });\n // used to get fetched ids to pass to getPaginatedOptimizedUserFeed on load next\n // getting ids from cached data & only for previoues pages\n const previousIds = flattenInfiniteData(data, pageParam as number).map(\n (p) => p.comment.comment_id\n );\n\n const res = await api.getPaginatedOptimizedCommentForResourceId(\n authUser?.id || 0n,\n postId,\n BigInt(pageParam * INITIAL_ITEMS_LIMIT),\n BigInt(INITIAL_ITEMS_LIMIT),\n toIcEnum(commentsSort),\n previousIds\n );\n return extractApiDataOrThrow(res);\n },\n {\n enabled: !disabled,\n getNextPageParam: (page, pages) =>\n page && page.length >= INITIAL_ITEMS_LIMIT ? pages.length : undefined,\n }\n );\n}\n\nconst prepareAndSubmitComment = async (\n value: string,\n mentions: string[],\n image: string,\n postId: bigint\n) => {\n const match = linkify.find(value);\n\n const hashtags = match\n .filter((item) => item.type === 'hashtag')\n .map(({ value }) => value.substr(1));\n\n let user_tags = mentions.filter(\n (tag, index) => mentions.indexOf(tag) === index\n );\n user_tags = user_tags.slice(0, 5);\n\n const imageFormatted = await formatImage(image, MIME_TYPES_POST);\n\n const comment = {\n text: value.replace(/ /g, ' '),\n // make hash tag unique\n hashtags: hashtags.filter((tag, index) => hashtags.indexOf(tag) === index),\n user_tags: user_tags,\n image: imageFormatted,\n link_metadata: [] as [],\n };\n\n return api.newCommentV2(postId, comment);\n};\n\nexport function useNewCommentV2() {\n const queryClient = useQueryClient();\n return useMutation(\n ({\n value,\n mentions,\n image,\n postId,\n }: {\n value: string;\n mentions: string[];\n image: string;\n postId: bigint;\n threadMasterId?: bigint;\n }) => prepareAndSubmitComment(value, mentions, image, postId),\n {\n onSuccess: (_, variables) => {\n queryClient.invalidateQueries([\n 'getPaginatedOptimizedCommentForResourceId',\n variables.postId,\n ]);\n\n if (variables.threadMasterId) {\n queryClient.invalidateQueries(\n ['getThreadPost', variables.threadMasterId, variables.postId],\n { exact: true }\n );\n } else {\n queryClient.invalidateQueries(['getItem', variables.postId], {\n exact: true,\n });\n }\n },\n onError: (err) => {\n console.log({ err });\n },\n }\n );\n}\n\nexport function useHandleCommentDelete() {\n const queryClient = useQueryClient();\n return useMutation(\n ({\n commentId,\n }: {\n commentId: bigint;\n imageId: string;\n postId?: bigint;\n threadMasterId?: bigint;\n }) => api.removeComment(commentId),\n {\n onSuccess: (_, { threadMasterId, postId, imageId }) => {\n if (imageId) {\n assetsApi.delete(imageId);\n }\n\n queryClient.invalidateQueries([\n 'getPaginatedOptimizedCommentForResourceId',\n postId,\n ]);\n\n if (threadMasterId) {\n console.log('variables.threadMasterId', threadMasterId);\n queryClient.invalidateQueries(\n ['getThreadPost', threadMasterId, postId],\n { exact: true }\n );\n } else {\n queryClient.invalidateQueries(['getItem', postId], {\n exact: true,\n });\n }\n },\n }\n );\n}\n\ninterface ILinkifyFind {\n type: string;\n value: string;\n href: string;\n}\n\nexport interface IBasePreparePostData {\n value: string;\n mentions: string[];\n image: null | string;\n nft_image_url: string;\n quotedResourceById: QuotedResourceById;\n extension: [] | [ExtensionRequest];\n link_metadata: [] | [Array];\n}\n\nconst preparePostData = async ({\n value,\n mentions,\n quotedResourceById,\n image = null,\n nft_image_url = '',\n extension = undefined,\n link_metadata = [],\n}: IBasePreparePostData): Promise => {\n const match: ILinkifyFind[] = linkify.find(value);\n\n const hashtags = match\n .filter((item) => item.type === 'hashtag')\n .map(({ value }) => value.substr(1));\n\n let user_tags = mentions.filter(\n (tag, index) => mentions.indexOf(tag) === index\n );\n user_tags = user_tags.slice(0, 5);\n\n const imageFormatted = await formatImage(image, MIME_TYPES_POST);\n\n const quotedResource = quotedResourceById || toIcVariant('None', null);\n\n return {\n text: value.replace(/ /g, ' '),\n quoted_resource: quotedResource,\n // make hash tag unique\n hashtags: hashtags.filter((tag, index) => hashtags.indexOf(tag) === index),\n user_tags: user_tags,\n nft_image_urls: toIcOpt(nft_image_url),\n images: imageFormatted,\n extension,\n link_metadata,\n };\n};\n\nexport interface INewPostArgs {\n value: string;\n mentions: string[];\n image: string;\n nft_image_url: string;\n quotedResourceById: QuotedResourceById;\n threadMasterId?: bigint;\n extension: [] | [ExtensionRequest];\n link_metadata: [] | [Array];\n}\n\nexport function useNewPostV3() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({\n value,\n mentions,\n image,\n nft_image_url,\n quotedResourceById,\n extension,\n link_metadata,\n }: INewPostArgs) => {\n const data = await preparePostData({\n value,\n mentions,\n quotedResourceById,\n image,\n nft_image_url,\n extension,\n link_metadata,\n });\n\n const res = await api.newPostV3(data);\n\n return extractApiDataOrThrow(res);\n },\n {\n onSuccess: (\n _,\n { threadMasterId, quotedResourceById = toIcVariant('None', null) }\n ) => {\n queryClient.invalidateQueries(\n getPaginatedOptimizedDiscoveryFeedQueryKey\n );\n queryClient.invalidateQueries(getPaginatedOptimizedUserFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedProfileFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedHashtagFeedQueryKey);\n\n if ('Post' in quotedResourceById) {\n queryClient.invalidateQueries(['getItem', quotedResourceById.Post], {\n exact: true,\n });\n } else if (threadMasterId && 'ThreadPost' in quotedResourceById) {\n queryClient.invalidateQueries(\n ['getThread', threadMasterId, quotedResourceById.ThreadPost],\n {\n exact: true,\n }\n );\n queryClient.invalidateQueries(\n [\n 'getThreadPost',\n quotedResourceById.ThreadPost[0],\n quotedResourceById.ThreadPost[0],\n ],\n {\n exact: true,\n }\n );\n } else if ('Article' in quotedResourceById) {\n queryClient.invalidateQueries(['getArticles']);\n queryClient.invalidateQueries(\n ['getArticleWithUserData', quotedResourceById.Article],\n {\n exact: true,\n }\n );\n } else if ('Milestone' in quotedResourceById) {\n queryClient.invalidateQueries([getMilestonesWithUserDataQueryKey]);\n } else if ('Experience' in quotedResourceById) {\n queryClient.invalidateQueries(['getExperiencesWithUserData']);\n }\n },\n }\n );\n}\n\nexport interface IPostThreadArgs {\n thread: Array;\n userId: bigint;\n}\n\nexport function usePostThread() {\n const queryClient = useQueryClient();\n\n return useMutation(\n async ({ thread, userId }: IPostThreadArgs) => {\n if (!userId) {\n return;\n }\n\n const data = await Promise.all(\n thread.map(\n ({\n value,\n mentions,\n quotedResourceById,\n image,\n nft_image_url,\n extension,\n link_metadata,\n }) =>\n preparePostData({\n value,\n mentions,\n quotedResourceById,\n image,\n nft_image_url,\n extension,\n link_metadata,\n })\n )\n );\n\n const res = await api.postThread({\n new_posts: data,\n author_id: userId,\n });\n return extractApiDataOrThrow(res);\n },\n {\n onSuccess: () => {\n queryClient.invalidateQueries(\n getPaginatedOptimizedDiscoveryFeedQueryKey\n );\n queryClient.invalidateQueries(getPaginatedOptimizedUserFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedProfileFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedHashtagFeedQueryKey);\n },\n }\n );\n}\n\nexport interface IRemoveItemArgs {\n postId: bigint;\n threadMasterId?: bigint;\n}\n\nexport function useRemoveItem() {\n const queryClient = useQueryClient();\n\n return useMutation(({ postId }: IRemoveItemArgs) => api.removePost(postId), {\n onSuccess: async (_, { threadMasterId }) => {\n const auth = queryClient.getQueryData(['getSelf']);\n\n if (threadMasterId) {\n queryClient.invalidateQueries(['getThread', threadMasterId], {\n exact: true,\n });\n }\n queryClient.invalidateQueries(getPaginatedOptimizedDiscoveryFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedUserFeedQueryKey);\n queryClient.invalidateQueries([getProfilePinnedPostsQueryKey, auth?.id]);\n queryClient.invalidateQueries(getPaginatedOptimizedProfileFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedHashtagFeedQueryKey);\n },\n });\n}\n\nexport function increasePostShareCount(\n queryClient: QueryClient,\n queryProps: {\n queryKey: string;\n resourceId: bigint;\n parentResourceId?: bigint;\n }\n) {\n const { queryKey, resourceId, parentResourceId } = queryProps;\n\n // used in case of like data coming from optimized post in home feed\n queryClient.setQueryData(\n [queryKey],\n (prev: InfiniteData>) => {\n if (!prev) return;\n\n return formatItemInInifiteData(\n prev,\n parentResourceId || resourceId,\n {\n OptimizedPost: 'OptimizedPost.post.post_id',\n ThreadPreview: 'ThreadPreview.id',\n },\n (item: ApiItem | ApiItemFeed) => {\n if ('ThreadPreview' in item) {\n const index = item.ThreadPreview.preview.findIndex(\n (p) => p.id === resourceId\n );\n\n if (index === -1) {\n return item;\n }\n\n return update(\n item,\n `ThreadPreview.preview[${index}].post`,\n (p) => ({\n ...p,\n reshared_counter: p.reshared_counter + 1,\n })\n );\n }\n\n if ('OptimizedPost' in item) {\n return update(item, `OptimizedPost`, (p) => ({\n ...p,\n like_counter: p.like_counter + 1,\n reshared_counter: p.reshared_counter + 1,\n }));\n }\n\n return item;\n }\n );\n }\n );\n}\n","import { Theme } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst baseOptionsContainer = (theme: Theme) => ({\n display: 'flex',\n width: 'calc(100% - 40px)',\n justifyContent: 'space-between',\n marginLeft: '40px',\n [theme.breakpoints.down('sm')]: {\n alignItems: 'baseline',\n flexWrap: 'wrap',\n },\n});\n\nexport const useStyles = makeStyles((theme) => ({\n plusThreadButton: {\n marginRight: theme.spacing(2),\n marginLeft: theme.spacing(2),\n },\n editorContainerModal: {\n width: '94%',\n maxWidth: '560px',\n marginRight: theme.spacing(0),\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n maxWidth: `calc(100% - ${theme.spacing(5)})`,\n },\n },\n editorContainer: {\n width: ({ component }) =>\n component === 'comment' || component?.startsWith?.('reply')\n ? '100%'\n : 'calc(100% - 40px)',\n height: '100%',\n [theme.breakpoints.between('sm', 'md')]: {\n paddingRight: theme.spacing(1),\n },\n },\n editorAndDelete: {\n display: 'flex',\n flexDirection: 'row-reverse',\n justifyContent: 'space-between',\n minHeight: ({ component }) => (component === 'comment' ? undefined : 36),\n [theme.breakpoints.between('sm', 'md')]: {\n marginRight: theme.spacing(-1),\n },\n },\n contentSidedesk: {\n width: '40px',\n flex: '0 0 auto',\n justifyContent: 'center',\n alignItems: 'center',\n },\n verticalDividerContainer: {\n position: 'relative',\n left: '-20px',\n bottom: '-40px',\n },\n verticalDivider: {\n width: '2px',\n backgroundColor: theme.palette.colors.ui_04,\n height: '100%',\n margin: 'auto',\n },\n editorContainerComment: {\n width: '100%',\n [theme.breakpoints.between('sm', 'md')]: {\n paddingRight: theme.spacing(1),\n },\n },\n commentEditor: {\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: theme.spacing(1),\n padding: theme.spacing(1),\n paddingTop: 4,\n paddingBottom: 4,\n minHeight: 41,\n '&:focus-within': {\n border: `1px solid ${theme.palette.colors.primary}`,\n },\n },\n photoContainer: {\n marginBottom: theme.spacing(3),\n width: '100%',\n height: '100%',\n },\n photoContainerComment: {\n marginBottom: theme.spacing(1),\n paddingRight: theme.spacing(1),\n width: '100%',\n height: '100%',\n },\n button: {\n paddingLeft: theme.spacing(5),\n paddingRight: theme.spacing(5),\n },\n optionsContainer: {\n ...baseOptionsContainer(theme),\n },\n optionsContainerComment: {\n marginTop: theme.spacing(1),\n display: 'flex',\n width: '100%',\n justifyContent: 'space-between',\n },\n toolbarContainer: {\n minWidth: 80,\n display: 'flex',\n flexGrow: 1,\n [theme.breakpoints.down('sm')]: {\n marginBottom: theme.spacing(1),\n minWidth: 60,\n },\n },\n toolbarContainerComment: {\n marginTop: theme.spacing(0.5),\n minWidth: 80,\n marginLeft: theme.spacing(-2),\n },\n postBtns: {\n justifyContent: 'flex-end',\n display: 'flex',\n [theme.breakpoints.down('sm')]: {\n flexGrow: 1,\n marginBottom: theme.spacing(1),\n },\n },\n rightContainer: {\n alignItems: 'baseline',\n marginBottom: theme.spacing(1),\n display: 'flex',\n [theme.breakpoints.down('sm')]: {\n justifyContent: 'space-between',\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(-1.5),\n },\n },\n rightContainerWithCounter: {\n alignItems: 'baseline',\n marginBottom: theme.spacing(1),\n display: 'flex',\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n justifyContent: 'space-between',\n marginLeft: theme.spacing(2),\n },\n },\n rightContainerComment: {\n display: 'flex',\n alignItems: 'center',\n },\n counter: {\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-end',\n alignSelf: 'center',\n fontSize: theme.typography.fontSize,\n marginRight: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n flexGrow: 20,\n marginTop: theme.spacing(1),\n },\n },\n usernameError: {\n marginLeft: theme.spacing(1),\n fontSize: theme.typography.fontSize,\n marginRight: theme.spacing(1),\n color: theme.palette.colors.danger,\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n usernameErrorMobile: {\n marginLeft: 0,\n display: 'block',\n marginTop: theme.spacing(1),\n [theme.breakpoints.up('sm')]: {\n display: 'none',\n },\n },\n emojiSelectPopoverEntry: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n cursor: 'pointer',\n },\n emojiSelectPopoverEntryFocused: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n cursor: 'pointer',\n },\n emojiGroup: {\n cursor: 'pointer',\n color: 'rgb(204 204 204 / 50%)!important',\n },\n emojiSelectButton: {\n cursor: 'pointer',\n },\n emojiSuggestionsEntry: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n display: 'flex',\n flexDirection: 'row',\n alignContent: 'center',\n alignItems: 'center',\n },\n emojiSuggestionsEntryFocused: {\n fontSize: '1.2em',\n lineHeight: '1.2em',\n display: 'flex',\n flexDirection: 'row',\n alignContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.background.paper,\n color: theme.palette.primary.light,\n },\n commonEmojiContainer: {\n backgroundColor: theme.palette.background.paper,\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19) !important',\n display: 'block',\n transformOrigin: '1em 0% 0px',\n transition: 'all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1)',\n },\n emojiPopup: {\n transform: 'scale(1) translateY(-20%)',\n [theme.breakpoints.down('sm')]: {\n transform: 'scale(1) translateX(-20%) translateY(-30%)',\n },\n },\n emojiPopupModal: {\n position: 'absolute',\n bottom: theme.spacing(8),\n [theme.breakpoints.down('sm')]: {\n bottom: theme.spacing(-8),\n },\n },\n emoji: {\n backgroundImage: 'unset !important',\n display: 'unset',\n color: 'unset',\n },\n hide: {\n visibility: 'hidden',\n marginTop: theme.spacing(-6),\n },\n emojiButton: {\n '&:active': {\n backgroundColor: `${theme.palette.colors.ui_04} !important`,\n '& .MuiTouchRipple-root': {\n display: 'none',\n },\n },\n },\n checkboxLabel: {\n fontSize: theme.typography.pxToRem(14),\n },\n checkboxLabelDisabled: {\n fontSize: theme.typography.pxToRem(14),\n color: theme.palette.colors.ui_05,\n },\n checkbox: {\n padding: 0,\n marginRight: theme.spacing(1.5),\n },\n linkPreview: {},\n}));\n","/**\n * Source https://github.com/draft-js-plugins/draft-js-plugins/blob/master/packages/mention/src/defaultRegExp.ts\n */\nexport default '[' +\n '\\\\w-' +\n // Latin-1 Supplement (letters only) - https://en.wikipedia.org/wiki/List_of_Unicode_characters#Latin-1_Supplement\n '\\u00C0-\\u00D6' +\n '\\u00D8-\\u00F6' +\n '\\u00F8-\\u00FF' +\n // Latin Extended-A (without deprecated character) - https://en.wikipedia.org/wiki/List_of_Unicode_characters#Latin_Extended-A\n '\\u0100-\\u0148' +\n '\\u014A-\\u017F' +\n // Cyrillic symbols: \\u0410-\\u044F - https://en.wikipedia.org/wiki/Cyrillic_script_in_Unicode\n '\\u0410-\\u044F' +\n // hiragana (japanese): \\u3040-\\u309F - https://gist.github.com/ryanmcgrath/982242#file-japaneseregex-js\n '\\u3040-\\u309F' +\n // katakana (japanese): \\u30A0-\\u30FF - https://gist.github.com/ryanmcgrath/982242#file-japaneseregex-js\n '\\u30A0-\\u30FF' +\n // For an advanced explaination about Hangul see https://github.com/draft-js-plugins/draft-js-plugins/pull/480#issuecomment-254055437\n // Hangul Jamo (korean): \\u3130-\\u318F - https://en.wikipedia.org/wiki/Korean_language_and_computers#Hangul_in_Unicode\n // Hangul Syllables (korean): \\uAC00-\\uD7A3 - https://en.wikipedia.org/wiki/Korean_language_and_computers#Hangul_in_Unicode\n '\\u3130-\\u318F' +\n '\\uAC00-\\uD7A3' +\n // common chinese symbols: \\u4e00-\\u9eff - http://stackoverflow.com/a/1366113/837709\n // extended to \\u9fa5 https://github.com/draft-js-plugins/draft-js-plugins/issues/1888\n '\\u4e00-\\u9fa5' +\n // Arabic https://en.wikipedia.org/wiki/Arabic_(Unicode_block)\n '\\u0600-\\u06ff' +\n // Vietnamese http://vietunicode.sourceforge.net/charset/\n '\\u00C0-\\u1EF9' +\n '.' +\n ']';\n","import React from 'react';\nimport { SxProps, Theme } from '@mui/material/styles';\nimport { WithStyles } from '@mui/styles';\nimport createStyles from '@mui/styles/createStyles';\nimport withStyles from '@mui/styles/withStyles';\nimport Editor from '@draft-js-plugins/editor';\nimport api from '../../client';\nimport { debounce } from 'lodash';\nimport { EditorState, getDefaultKeyBinding, RichUtils } from 'draft-js';\nimport createMentionPlugin from '@draft-js-plugins/mention';\nimport '@draft-js-plugins/inline-toolbar/lib/plugin.css';\nimport '@draft-js-plugins/mention/lib/plugin.css';\nimport UserPreviewCard from '../Cards/UserPreviewCard';\nimport UserAvatar from '../UserAvatar/UserAvatar';\nimport { EntryComponentProps } from '@draft-js-plugins/mention/lib/MentionSuggestions/Entry/Entry';\nimport { Box, ListItem } from '@mui/material';\nimport mentionRegex from './mentionRegex';\nimport clsx from 'clsx';\nimport { EmojiSuggestionsPubParams } from '@draft-js-plugins/emoji/lib/components/EmojiSuggestions';\n\nconst styles = (theme: Theme) =>\n createStyles({\n rootEditor: {\n boxSizing: 'border-box',\n cursor: 'text',\n width: '100%',\n paddingLeft: theme.spacing(2),\n paddingBottom: theme.spacing(0.5),\n paddingTop: theme.spacing(0.5),\n minWidth: 0,\n height: '100%',\n fontSize: theme.typography.fontSize,\n overflow: 'hidden',\n },\n comment: {\n paddingLeft: theme.spacing(1),\n fontSize: 14,\n lineHeight: '20px',\n paddingTop: theme.spacing(0),\n marginTop: theme.spacing(0.5),\n '& .DraftEditor-root .public-DraftEditorPlaceholder-root': {\n color: theme.palette.colors.ui_05,\n },\n },\n placeholderThread: {\n '& .DraftEditor-root .public-DraftEditorPlaceholder-root': {\n color: theme.palette.colors.ui_07,\n },\n },\n disabled: {\n cursor: 'default',\n },\n avatar: {\n width: 40,\n height: 40,\n },\n userCard: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(1.5),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n },\n listItemContainer: {\n backgroundColor: theme.palette.colors.ui_02,\n cursor: 'pointer',\n },\n suggestionsContainer: {\n zIndex: 5,\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: 8,\n backgroundColor: theme.palette.colors.ui_01,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n width: 'calc(100% - 34px)',\n maxWidth: 300,\n },\n modalSuggestionsContainer: {\n maxHeight: 185,\n backgroundColor: theme.palette.colors.ui_01,\n overflowY: 'scroll',\n },\n });\n\ninterface ComposeProps extends WithStyles {\n placeholder: string;\n editorState: EditorState;\n setEditorState: (newState: EditorState) => void;\n processing?: boolean;\n location: string;\n setLoadingSearch?: any;\n emojiPlugin: any;\n onEnter?: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n disableMentions?: boolean;\n emojiSuggestionProps?: Partial;\n sx?: SxProps;\n glowingPlaceholder?: boolean;\n inputFocused?: boolean;\n inputFocusedForce?: boolean;\n}\n\nconst Compose = ({\n classes,\n placeholder,\n editorState,\n setEditorState,\n processing = false,\n location,\n setLoadingSearch,\n emojiPlugin,\n onEnter,\n onFocus,\n onBlur,\n disableMentions,\n emojiSuggestionProps = {},\n sx,\n glowingPlaceholder,\n inputFocused,\n inputFocusedForce,\n}: ComposeProps) => {\n //const [mentions, setMentions] = React.useState([]);\n const editor = React.useRef(null);\n const [open, setOpen] = React.useState(false);\n const [suggestions, setSuggestions] = React.useState([]);\n\n React.useEffect(() => {\n if (\n location === 'modal' ||\n (location || '').includes('reply_') ||\n location === 'post-home'\n ) {\n //mentions break if there is no timeout - issue with forcing focus in the draftjs package\n setTimeout(() => editor.current && editor.current.focus(), 50);\n }\n }, [location]);\n\n React.useEffect(() => {\n if (inputFocused) {\n setTimeout(() => editor.current && editor.current.focus(), 100);\n }\n }, [inputFocused]);\n\n React.useEffect(() => {\n if (inputFocusedForce) {\n setTimeout(() => editor.current && editor.current.focus(), 100);\n }\n }, [inputFocusedForce]);\n\n function Entry(props: EntryComponentProps): React.ReactElement {\n const {\n mention,\n searchValue, // eslint-disable-line @typescript-eslint/no-unused-vars\n isFocused, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...parentProps\n } = props;\n\n return (\n
    \n \n \n \n
    \n );\n }\n\n const mapKeyToEditorCommand = React.useCallback(\n (e) => {\n if (e.keyCode === 9 /* TAB */) {\n const newEditorState = RichUtils.onTab(\n e,\n editorState,\n 4 /* maxDepth */\n );\n if (newEditorState !== editorState) {\n setEditorState(newEditorState);\n }\n return;\n }\n\n // used to allow up [40]/down [38] navigation in emoji suggestions\n if (e.keyCode === 38 || e.keyCode === 40) {\n return;\n }\n\n return getDefaultKeyBinding(e);\n },\n [editorState, setEditorState]\n );\n\n const { MentionSuggestions, plugins } = React.useMemo(() => {\n const mentionPlugin = createMentionPlugin({\n mentionRegExp: mentionRegex,\n entityMutability: 'IMMUTABLE',\n mentionPrefix: '@',\n supportWhitespace: false,\n theme: {\n mentionSuggestionsPopupVisible: `${classes.suggestionsContainer} ${\n location === 'modal' ? classes.modalSuggestionsContainer : ''\n }`,\n mentionSuggestionsEntryFocused: classes.listItemContainer,\n },\n });\n // eslint-disable-next-line no-shadow\n const { MentionSuggestions } = mentionPlugin;\n // eslint-disable-next-line no-shadow\n const plugins = [mentionPlugin, emojiPlugin];\n\n return { plugins, MentionSuggestions };\n }, []);\n\n const debounceSearch = React.useCallback(\n debounce((value) => {\n api\n .autoSuggest(value, 0n, 5n)\n .then((response) => {\n const newSuggestions = [];\n response.map((suggestion) => {\n const newSuggestion = {\n id: suggestion.id,\n name: suggestion.username,\n title: suggestion.display_name,\n avatar: ,\n profile: suggestion,\n };\n newSuggestions.push(newSuggestion);\n });\n setSuggestions(newSuggestions);\n })\n .finally(\n () => setLoadingSearch instanceof Function && setLoadingSearch(false)\n );\n }, 1000),\n [setLoadingSearch]\n );\n\n const onOpenChange = React.useCallback((_open: boolean) => {\n setOpen(_open);\n }, []);\n\n const onSearchChange = React.useCallback(\n ({ value }: { value: string }) => {\n if (value.length >= 2 && value.length <= 20) {\n setLoadingSearch instanceof Function && setLoadingSearch(true);\n debounceSearch(value);\n } else {\n setSuggestions([]);\n setLoadingSearch instanceof Function && setLoadingSearch(false);\n }\n },\n [setLoadingSearch, debounceSearch]\n );\n const { EmojiSuggestions, EmojiSelect } = emojiPlugin;\n\n function handleKeyDown(e: React.KeyboardEvent) {\n editor.current.focus();\n\n if (\n onEnter instanceof Function &&\n !e.nativeEvent.shiftKey &&\n e.key === 'Enter'\n ) {\n onEnter();\n }\n }\n\n return (\n {\n editor.current.focus();\n }}\n sx={sx}\n >\n {\n editor.current = element;\n }}\n readOnly={processing}\n plugins={plugins}\n />\n \n\n {!disableMentions ? (\n {\n // get the mention object selected\n }}\n entryComponent={Entry}\n renderEmptyPopup={false}\n />\n ) : null}\n \n );\n};\n\nexport default withStyles(styles)(Compose);\n","import { useMemo } from 'react';\n\nimport { Collaborator } from 'client';\n\ninterface IProps {\n authUserId: bigint;\n collaborators: Collaborator[];\n isCollab?: boolean;\n isOwner?: boolean;\n}\n\nexport function useIsVisibleExperience({\n authUserId,\n collaborators,\n isCollab,\n isOwner,\n}: IProps) {\n return useMemo(() => {\n if (!isCollab || isOwner) {\n return false;\n }\n\n return collaborators.find((c) => c.user_id === authUserId)?.visible;\n }, [authUserId, collaborators, isCollab, isOwner]);\n}\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n rootContainer: {},\n rootContainerMilestone: {\n backgroundColor: theme.palette.colors.ui_02,\n borderRadius: theme.spacing(1),\n },\n rootContainerProject: {\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: theme.spacing(1),\n },\n root: {\n borderRadius: theme.spacing(1),\n height: '100%',\n },\n rootProjectContent: {\n padding: theme.spacing(2),\n paddingTop: theme.spacing(1),\n },\n rootMilestone: {\n backgroundColor: theme.palette.colors.ui_02,\n },\n rootProject: {\n border: `1px solid ${theme.palette.colors.ui_04}`,\n padding: theme.spacing(2),\n paddingTop: theme.spacing(1),\n },\n milestoneContainer: {\n display: 'flex',\n backgroundColor: theme.palette.colors.ui_02,\n padding: theme.spacing(1),\n borderRadius: theme.spacing(1),\n cursor: 'pointer',\n // TODO testing for mobile web\n '-webkit-tap-highlight-color': 'transparent',\n\n '&:hover': {\n backgroundColor: theme.palette.colors.ui_03,\n },\n },\n collabHidden: {\n '& p': {\n color: theme.palette.colors.ui_04,\n opacity: '0.36',\n },\n '& img': {\n opacity: '0.55',\n },\n '& a': {\n opacity: '0.65',\n },\n },\n addButtonContainer: {\n display: 'flex',\n justifyContent: 'center',\n padding: theme.spacing(1),\n borderTop: `1px solid ${theme.palette.colors.ui_04}`,\n },\n addButton: {\n minWidth: '200px',\n },\n collaboratorContainerProject: {\n display: 'flex',\n justifyContent: 'start',\n padding: theme.spacing(2),\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n },\n collaboratorContainerMilestone: {\n display: 'flex',\n justifyContent: 'start',\n padding: theme.spacing(1),\n paddingTop: theme.spacing(1.5),\n paddingBottom: theme.spacing(1.5),\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n },\n collaboratorText: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n '& a': {\n color: theme.palette.primary.main,\n cursor: 'pointer',\n },\n },\n}));\n","import * as React from 'react';\nimport { Box, Button } from '@mui/material';\n\ninterface Props {\n isFetching: any;\n fetchNextPage: any;\n margin?: number;\n}\n\nconst LoadMoreButton = ({ isFetching, fetchNextPage, margin = 2 }: Props) => {\n return (\n \n {isFetching ? (\n \n ) : (\n \n )}\n \n );\n};\n\nexport default LoadMoreButton;\n","import React from 'react';\nimport * as linkify from 'linkifyjs';\n\nconst useMentionsParser = () => {\n return React.useCallback(({ content, trimEnd = true }): [string] => {\n const match = linkify.find(content);\n\n // check if there are any finished mentions - added space, ,.!? after\n // this should be updated to use regex and cover more signs\n return match\n .filter((item) => item.type === 'mention')\n .map((tag) => {\n if (!trimEnd) {\n return tag.value.trim().substr(1);\n }\n\n if (\n content.charAt(tag.end) === ' ' ||\n content.substring(tag.end, tag.end + 2) === '. ' ||\n content.substring(tag.end, tag.end + 2) === ', ' ||\n content.substring(tag.end, tag.end + 2) === '! ' ||\n content.substring(tag.end, tag.end + 2) === '? ' ||\n content.substring(tag.end, tag.end + 1) === '\\n'\n ) {\n return tag.value.substr(1);\n }\n })\n .filter((value) => typeof value !== 'undefined')\n .filter((value, index, self) => self.indexOf(value) === index); // remove duplicates\n }, []);\n};\n\nexport default useMentionsParser;\n","import React from 'react';\nimport api from '../../client';\n\nconst useMentionsParser = () => {\n const cache = React.useRef({});\n\n return React.useCallback(\n async ({\n mentions,\n maxMentions = 5,\n }: {\n mentions: string[];\n maxMentions?: number;\n }): Promise<{ username: string; user_id: bigint; exists: boolean }[]> => {\n if (mentions.length < 1) {\n return [];\n }\n\n const resolveMention = async (\n mention: string\n ): Promise<{ username: string; user_id: bigint; exists: boolean }> => {\n if (mention in cache.current) {\n const user_id = cache.current[mention];\n return {\n username: mention,\n user_id,\n exists: !!cache.current[mention],\n };\n }\n\n let user_id: bigint | undefined;\n try {\n user_id = await api.getUserByUsername(mention);\n } catch (err) {\n console.log(err);\n }\n\n cache.current[mention] = user_id;\n\n return {\n username: mention,\n user_id,\n exists: !!user_id,\n };\n };\n\n let required =\n mentions.length > maxMentions ? maxMentions : mentions.length; // users per iteration\n let checked = 0;\n let ret = [];\n while (true) {\n const resolved = await Promise.all(\n mentions.slice(checked, checked + required).map(resolveMention)\n );\n\n const exists = resolved.filter(({ exists }) => exists).length;\n ret = [...ret, ...resolved];\n checked += required;\n\n if (required - exists === 0 || resolved.length !== required) {\n break;\n }\n\n required -= exists;\n }\n\n return ret;\n },\n []\n );\n};\n\nexport default useMentionsParser;\n","import { Theme } from '@mui/material/styles';\nimport { makeStyles } from '@mui/styles';\n\nimport createStyles from '@mui/styles/createStyles';\n\nexport const styles = (theme: Theme) =>\n createStyles({\n root: {\n width: '100%',\n color: theme.palette.text.primary,\n alignItems: 'start',\n paddingLeft: 0,\n paddingRight: theme.spacing(3),\n marginLeft: theme.spacing(2),\n marginBottom: theme.spacing(3),\n minWidth: 0,\n minHeight: 32,\n [theme.breakpoints.down('sm')]: {\n paddingRight: theme.spacing(1),\n marginBottom: theme.spacing(2),\n },\n },\n container: {\n display: 'flex',\n justifyContent: 'space-between',\n marginTop: theme.spacing(2),\n },\n centeredContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n toolbarContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n marginTop: theme.spacing(2),\n },\n photoContainer: {\n paddingLeft: theme.spacing(1.5),\n paddingTop: theme.spacing(1.5),\n },\n commentContainer: {\n marginLeft: theme.spacing(3),\n },\n replyRoot: {\n paddingRight: 0,\n },\n });\nexport const commentStyles = makeStyles((theme) => ({\n postContainer: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n padding: theme.spacing(3),\n paddingBottom: theme.spacing(1),\n width: '100%',\n background: theme.palette.common.white,\n border: '1px solid #e2e1ec',\n },\n postHeader: {\n display: 'flex',\n alignItems: 'center',\n marginBottom: theme.spacing(3),\n justifyContent: 'space-between',\n },\n userInfo: {\n display: 'flex',\n alignItems: 'center',\n },\n headerText: {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(2),\n },\n nameText: {\n fontSize: theme.typography.pxToRem(14),\n color: theme.palette.text.primary,\n fontWeight: 500,\n },\n smallText: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.primary,\n opacity: 0.35,\n },\n bullet: {\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n color: theme.palette.text.secondary,\n fontSize: theme.typography.pxToRem(14),\n opacity: 0.35,\n },\n content: {\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n '& a': {\n color: theme.palette.primary.main,\n textDecoration: 'none',\n },\n },\n imageContainer: {\n marginTop: theme.spacing(2),\n textAlign: 'center',\n },\n imageContainerComment: {\n marginBottom: theme.spacing(-1),\n },\n imageOnlyContainerComment: {\n marginBottom: theme.spacing(-1),\n marginTop: theme.spacing(-2),\n },\n image: {\n maxWidth: '100%',\n borderRadius: 10,\n },\n postFooter: {\n display: 'flex',\n justifyContent: 'space-between',\n marginTop: theme.spacing(1),\n },\n buttonContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n buttonText: {\n fontSize: theme.typography.pxToRem(14),\n color: theme.palette.text.primary,\n opacity: 0.35,\n },\n card: {\n marginTop: 0,\n marginBottom: 0,\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n avatar: {\n marginRight: 0,\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: theme.spacing(7),\n marginTop: theme.spacing(2),\n },\n actions: {\n paddingTop: theme.spacing(1),\n paddingRight: theme.spacing(4),\n paddingBottom: 0,\n paddingLeft: theme.spacing(6),\n\n [theme.breakpoints.down('xs')]: {\n paddingLeft: theme.spacing(6),\n paddingRight: theme.spacing(2),\n paddingTop: theme.spacing(2),\n },\n },\n icon: {\n height: 16,\n width: 16,\n },\n commentHeader: {\n paddingTop: theme.spacing(1),\n },\n verificationBadge: {\n fontSize: theme.typography.pxToRem(10),\n marginLeft: theme.spacing(0.6),\n },\n nameLink: {\n display: 'flex',\n alignItems: 'center',\n },\n commentContainer: {\n marginTop: theme.spacing(3),\n marginRight: theme.spacing(4),\n [theme.breakpoints.down('sm')]: {\n marginRight: theme.spacing(2),\n },\n },\n comment: {\n backgroundColor: theme.palette.colors.ui_02,\n display: 'inline-block',\n padding: '6px 8px',\n borderRadius: 8,\n wordBreak: 'break-word',\n },\n replyWrapper: {\n marginLeft: theme.spacing(7),\n },\n repliesWrapper: {\n marginLeft: theme.spacing(7),\n marginRight: theme.spacing(-4),\n [theme.breakpoints.down('sm')]: {\n marginRight: theme.spacing(-2),\n },\n },\n replyButton: {\n color: theme.palette.colors.ui_07,\n fontWeight: 400,\n },\n showRepliesButton: {\n marginLeft: theme.spacing(4),\n },\n}));\n","import createStyles from '@mui/styles/createStyles';\nimport { Theme } from '@mui/material/styles';\n\nexport const styles = (theme: Theme) => {\n const iconButton = {\n padding: theme.spacing(1),\n marginLeft: theme.spacing(1),\n '&:active': {\n backgroundColor: `${theme.palette.colors.ui_04} !important`,\n '& .MuiTouchRipple-root': {\n display: 'none',\n },\n },\n };\n\n return createStyles({\n toolbar: {\n paddingLeft: theme.spacing(1),\n flex: 1,\n width: 'fit-content',\n color: theme.palette.text.secondary,\n },\n icon: {\n height: 16,\n width: 16,\n },\n iconButtonActive: {\n ...iconButton,\n '&.Mui-disabled': {\n backgroundColor: theme.palette.colors.ui_04,\n '& svg': {\n color: theme.palette.colors.ui_07,\n },\n },\n },\n iconButton,\n input: {\n display: 'none',\n },\n emojiContainer: {\n '& button': {\n color: theme.palette.primary.main,\n width: theme.spacing(4),\n height: theme.spacing(4),\n border: 'none',\n background: 'transparent',\n fontFamily: theme.typography.fontFamily,\n\n '&:hover': {\n background:\n theme.palette.mode === 'light'\n ? 'rgba(76, 70, 212, 0.04)'\n : 'rgba(255, 255, 255, 0.08)',\n },\n '&:active': {\n background:\n theme.palette.mode === 'light'\n ? 'rgba(76, 70, 212, 0.04)'\n : 'rgba(255, 255, 255, 0.08)',\n },\n },\n '& div': {\n boxShadow: 'none',\n border: 'none',\n },\n },\n // disabling icons through css because emoji lib does not allow disabling the button\n disabled: {\n '& button': {\n pointerEvents: 'none',\n cursor: 'default!important',\n\n '& svg': {\n color:\n theme.palette.mode === 'light'\n ? 'rgba(0, 0, 0, 0.26)'\n : 'rgba(255, 255, 255, 0.3)',\n },\n },\n },\n });\n};\n\nexport const allPostAddons = ['Emojis', 'Image', 'Poll'] as const;\nexport type PostAddonType = typeof allPostAddons[number];\n\nexport interface PostAddonConfig {\n isActivated?: () => boolean;\n isDisabled?: () => boolean;\n}\n","import React from 'react';\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport '@draft-js-plugins/emoji/lib/plugin.css';\nimport { PostAddonConfig, styles } from './utils';\nimport clsx from 'clsx';\n\nexport interface EmojisAddonProps extends PostAddonConfig {\n EmojiSelect: any;\n onCloseEmoji?: () => void;\n onOpenEmoji?: () => void;\n}\n\ninterface EmojisAddonPropsExtended\n extends EmojisAddonProps,\n WithStyles {}\n\nconst EmojisAddon = ({\n classes,\n EmojiSelect,\n isDisabled,\n onCloseEmoji,\n onOpenEmoji,\n}: EmojisAddonPropsExtended) => (\n <>\n \n \n
    \n \n);\n\nexport default withStyles(styles)(EmojisAddon);\n","import React from 'react';\nimport { IconButton } from '@mui/material';\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport { PictureIcon } from '../../icons';\nimport { formatReaderDataToImage } from '../../../utils/image';\nimport { Dialog } from 'components';\nimport { PostAddonConfig, styles } from './utils';\n\nexport interface ImageAddonProps extends PostAddonConfig {\n location: string;\n setPhoto: (data: string) => void;\n}\n\ninterface ImageAddonPropsExtended\n extends ImageAddonProps,\n WithStyles {}\n\nconst ImageAddon = ({\n classes,\n isActivated,\n isDisabled,\n location,\n setPhoto,\n}: ImageAddonPropsExtended) => {\n const [errorMessage, setErrorMessage] = React.useState('');\n\n const handleUploadFile = React.useCallback(\n async (event) => {\n if (\n !event.currentTarget.files ||\n event.currentTarget.files.length === 0\n ) {\n return;\n }\n\n const file = event.currentTarget.files[0];\n\n const reader = new FileReader();\n\n reader.onload = async () => {\n try {\n const imageFormatted = await formatReaderDataToImage(\n reader.result as string\n );\n\n setPhoto(imageFormatted);\n } catch (err) {\n setErrorMessage(\n err.message ||\n `Something went wrong. Please try again and check image format (jpg, jpeg, png or gif) and size (max. 1MB)'`\n );\n }\n };\n\n reader.readAsDataURL(file);\n event.target.value = '';\n },\n [setPhoto]\n );\n\n return (\n <>\n \n \n {!!errorMessage && (\n setErrorMessage('')}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"That didn't work\"\n message={errorMessage}\n ctaText=\"Ok\"\n cancelColor=\"primary\"\n onCancel={() => setErrorMessage('')}\n />\n )}\n \n );\n};\n\nexport default withStyles(styles)(ImageAddon);\n","import React from 'react';\nimport { IconButton } from '@mui/material';\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport { PostAddonConfig, styles } from './utils';\nimport { PollIcon } from 'components/icons';\n\nexport interface PollAddonProps extends PostAddonConfig {\n createPoll: () => any;\n}\n\nexport interface PollAddonPropsExtended\n extends PollAddonProps,\n WithStyles {}\n\nconst PollAddon = ({\n classes,\n createPoll,\n isActivated,\n isDisabled,\n}: PollAddonPropsExtended) => (\n <>\n \n \n \n \n);\n\nexport default withStyles(styles)(PollAddon);\n","import React from 'react';\nimport { Grid } from '@mui/material';\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport '@draft-js-plugins/emoji/lib/plugin.css';\nimport clsx from 'clsx';\nimport {\n ImageAddonProps,\n EmojisAddon,\n EmojisAddonProps,\n ImageAddon,\n PollAddon,\n PollAddonProps,\n styles,\n} from './Addons';\n\nexport type PostAddonConfigs = Partial<{\n Emojis: EmojisAddonProps;\n Image: ImageAddonProps;\n Poll: PollAddonProps;\n}>;\n\ninterface ComposeProps extends WithStyles {\n addons?: PostAddonConfigs;\n className?: string;\n}\n\nconst PostToolbar = ({\n addons = {},\n classes,\n className = '',\n}: ComposeProps) => (\n <>\n \n {addons.Emojis && }\n\n {addons.Image && }\n\n {addons.Poll && }\n \n \n);\n\nexport default withStyles(styles)(PostToolbar);\n","import '@draft-js-plugins/inline-toolbar/lib/plugin.css';\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport React, { useCallback, useMemo } from 'react';\nimport clsx from 'clsx';\nimport { useMentionsChecker, useMentionsParser } from 'hooks/rich-editor';\nimport UserAvatar from 'components/UserAvatar/UserAvatar';\nimport { styles } from './styles';\nimport { useNewCommentV2 } from 'pages/post/services';\nimport { useQueryClient } from 'react-query';\nimport { Profile } from 'client';\nimport { Dialog, Loading } from 'components';\nimport { FormikErrors, PostInfo } from 'types';\nimport PostToolbar from 'components/Compose/Toolbar';\nimport {\n Box,\n Button,\n IconButton,\n Typography,\n useTheme,\n useMediaQuery,\n Theme,\n} from '@mui/material';\nimport { useStyles as useComposeStyles } from 'components/Compose/styles';\nimport createEmojiPlugin, { defaultTheme } from '@draft-js-plugins/emoji';\nimport { positionSuggestions } from 'components/Compose/emojiPositionSuggestion';\nimport { SmileFaceIcon } from 'components/icons';\nimport {\n ComposeContainer,\n ComposeEvent,\n} from 'components/Compose/ComposeContainer';\nimport { defaultPostInfo } from '../../../../constants';\nimport { useFormik } from 'formik';\nimport { useDeferredPromise } from 'hooks';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\n\ninterface ComposeProps extends WithStyles {\n author: Profile;\n postId: bigint;\n threadMasterId?: bigint;\n reply?: boolean;\n replyToReply?: boolean;\n onCommentCreated?: () => void;\n onCommentCreateStart?: () => void;\n onEditorClose?: () => void;\n}\n\nconst CreateComment = ({\n classes,\n author,\n postId,\n threadMasterId,\n reply = false,\n replyToReply = false,\n onCommentCreated,\n onCommentCreateStart,\n onEditorClose,\n}: ComposeProps) => {\n const location = useMemo(\n () => (reply ? `reply_${postId.toString()}` : 'comment'),\n [postId, reply]\n );\n\n const theme = useTheme();\n const composeClasses = useComposeStyles({ component: location });\n const mobileSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('xs')\n );\n\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n\n const [focus, setFocus] = React.useState(false);\n\n const [usernameErrorModal, setUsernameErrorModal] = React.useState(false);\n const [exceededErrorModal, setExceededErrorModal] = React.useState(false);\n\n const [errorModal, setErrorModal] = React.useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n\n const newCommentV2Mutation = useNewCommentV2();\n\n const mentionsParser = useMentionsParser();\n const mentionsChecker = useMentionsChecker();\n\n const { emojiPlugin } = React.useMemo(() => {\n defaultTheme.emojiSelectPopover += ` ${composeClasses.commonEmojiContainer}`;\n defaultTheme.emojiSuggestions += ` ${composeClasses.commonEmojiContainer} `;\n defaultTheme.emojiSuggestionsEntry += ` ${composeClasses.emojiSuggestionsEntry} `;\n defaultTheme.emojiSelectPopoverEntry += ` ${composeClasses.emojiSelectPopoverEntry} `;\n defaultTheme.emojiSelectPopoverEntryFocused += ` ${composeClasses.emojiSelectPopoverEntryFocused} `;\n defaultTheme.emojiSelectPopoverNavEntry += ` ${composeClasses.emojiGroup} `;\n defaultTheme.emojiSelectPopoverNavEntryActive += ` ${composeClasses.emojiSelectButton} `;\n\n defaultTheme.emojiSelectButton += ` ${composeClasses.emojiSelectButton} `;\n defaultTheme.emojiSuggestionsEntryFocused += ` ${composeClasses.emojiSuggestionsEntryFocused} `;\n\n defaultTheme.emoji += ` ${composeClasses.emoji}`;\n defaultTheme.emojiSelectPopover += ` ${composeClasses.emojiPopup}`;\n\n const emojiPlugin = createEmojiPlugin({\n selectButtonContent: (\n setEmojiOpened(true)}\n className={composeClasses.emojiButton}\n >\n \n \n ),\n theme: defaultTheme,\n useNativeArt: true,\n toneSelectOpenDelay: 300,\n positionSuggestions,\n });\n return { emojiPlugin };\n }, []);\n\n const [emojiOpened, setEmojiOpened] = React.useState(false);\n const [inputFocused, setInputFocused] = React.useState(false);\n\n const placeholder = useMemo(() => {\n let text = '';\n\n switch (location) {\n case 'comment':\n text = mobileSize\n ? `Comment on @${\n author?.username?.length > 9\n ? `${author.username.substring(0, 8)}…`\n : author.username.trim()\n }'s post`\n : `Comment on @${\n author?.username?.length > 15\n ? `${author.username.substring(0, 20)}…`\n : author.username.trim()\n }'s post`;\n break;\n default:\n text = mobileSize\n ? `Reply to @${\n author?.username?.length > 5\n ? `${author.username.substring(0, 4)}…`\n : author.username.trim()\n }'s comment`\n : `Reply to @${\n author?.username?.length > 15\n ? `${author.username.substring(0, 20)}…`\n : author.username.trim()\n }'s comment`;\n break;\n }\n\n return text;\n }, [author?.username, location, mobileSize]);\n\n const formikValidate = useCallback((values: PostInfo) => {\n const errors: FormikErrors = {};\n\n const { image, text } = values;\n\n const textLength = text.getCurrentContent().getPlainText().trim().length;\n if (textLength > 300 || (textLength === 0 && !image)) {\n errors.text = true;\n }\n\n return errors;\n }, []);\n\n const {\n defer: preSubmitChecksPromise,\n deferRef: preSubmitChecksPromiseRef,\n } = useDeferredPromise();\n\n const preSubmitChecks = useCallback(\n async (values) => {\n let promise = Promise.resolve(true);\n\n const { text } = values;\n\n const content = text.getCurrentContent().getPlainText('');\n const mentions = mentionsParser({ content, trimEnd: false });\n const checkedMentions = await mentionsChecker({ mentions });\n\n if (checkedMentions.some(({ exists }) => exists === false)) {\n promise = preSubmitChecksPromise().promise;\n setUsernameErrorModal(true);\n } else if (mentions.length > 5) {\n promise = preSubmitChecksPromise().promise;\n setExceededErrorModal(true);\n }\n\n return promise;\n },\n [mentionsChecker, mentionsParser, preSubmitChecksPromise]\n );\n\n const toICCommentRequest = useCallback(\n (values: PostInfo) => ({\n value: values.text.getCurrentContent().getPlainText(),\n mentions: values.mentions,\n image: values.image,\n postId,\n threadMasterId,\n }),\n [postId, threadMasterId]\n );\n\n const formikSubmit = useCallback(\n (values, { setSubmitting, resetForm }) => {\n preSubmitChecks(values).then(async (resolution: boolean) => {\n setSubmitting(true);\n\n onCommentCreateStart && onCommentCreateStart();\n setExceededErrorModal(false);\n setUsernameErrorModal(false);\n\n if (resolution) {\n await newCommentV2Mutation.mutate(toICCommentRequest(values), {\n onSuccess: () => {\n resetForm();\n onCommentCreated && onCommentCreated();\n },\n onError: (err: any) => {\n const message = !err?.message\n ? 'Something went wrong. Please try again and check image format (jpg, jpeg, png or gif) and size (max. 1MB)'\n : err.message.includes('Hashtag limit exceeded')\n ? 'Hashtag is too long. Please keep to max. 50 characters.'\n : err.message.includes('Hashtags limit exceeded')\n ? 'We only support up to 5 hashtags in comments for now.'\n : err.message.includes('Invalid hashtag')\n ? 'Hashtag contains unsupported characters. Please use only alphanumeric characters, numbers, or underlines.'\n : err.message;\n setErrorMessage(message);\n setErrorModal(true);\n },\n });\n }\n\n setSubmitting(false);\n });\n\n setSubmitting(false);\n },\n [\n newCommentV2Mutation,\n onCommentCreateStart,\n onCommentCreated,\n preSubmitChecks,\n toICCommentRequest,\n ]\n );\n\n const formik = useFormik({\n initialValues: {\n ...defaultPostInfo,\n text: createEditorStateWithText(\n replyToReply ? `@${author.username} ` : ''\n ),\n },\n validate: formikValidate,\n onSubmit: formikSubmit,\n });\n\n const { text, image } = formik.values;\n\n const contentLength = text.getCurrentContent().getPlainText().length;\n\n const [isComposerLoading, setIsComposerLoading] = React.useState(false);\n\n const isProccessing = useMemo(\n () => newCommentV2Mutation.isLoading || formik.isSubmitting,\n [formik.isSubmitting, newCommentV2Mutation.isLoading]\n );\n\n const onComposeEvent = useCallback(\n (event: ComposeEvent) => {\n switch (event) {\n case 'remove':\n onEditorClose?.();\n break;\n default:\n break;\n }\n },\n [onEditorClose]\n );\n\n return (\n
    \n {user && }\n\n setFocus(true)}\n onBlur={() => setFocus(false)}\n style={{ borderColor: focus && '#4C46D4' }}\n >\n
    \n {\n setTimeout(() => {\n setInputFocused(false);\n }, 2500);\n }}\n onFocus={() => setInputFocused(true)}\n setIsLoading={setIsComposerLoading}\n emojiOpened={emojiOpened}\n />\n \n
    \n isProccessing,\n EmojiSelect: emojiPlugin.EmojiSelect,\n onCloseEmoji: () => setEmojiOpened(false),\n onOpenEmoji: () => setEmojiOpened(true),\n },\n Image: {\n isActivated: () => !!image,\n isDisabled: () => isProccessing || !!image,\n setPhoto: (image: string) => {\n formik.setFieldValue(`image`, image);\n },\n location,\n },\n }}\n />\n
    \n
    \n {(isComposerLoading || isProccessing) && }\n {contentLength > 0 && (\n = 300\n ? theme.palette.colors.danger\n : theme.palette.text.primary,\n }}\n >\n {contentLength}\n /300\n \n )}\n\n \n {isProccessing ? 'Sending' : 'Add'}\n \n
    \n \n \n
    \n {usernameErrorModal && (\n preSubmitChecksPromiseRef.resolve(false)}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"There's no one with that name\"\n message=\"Sorry, we’ve searched everywhere and can’t find anyone with that username. Try checking the spelling.\"\n ctaText=\"Review Comment\"\n onSubmit={() => preSubmitChecksPromiseRef.resolve(false)}\n cancelColor=\"primary\"\n cancelText=\"Post Anyway\"\n onCancel={() => preSubmitChecksPromiseRef.resolve(true)}\n />\n )}\n {exceededErrorModal && (\n preSubmitChecksPromiseRef.resolve(false)}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"You tagged more than 5 users\"\n message=\"Sorry, 5 is the limit.\n You can still post this but only the first 5 users will be tagged.\"\n ctaText=\"Review Comment\"\n onSubmit={() => preSubmitChecksPromiseRef.resolve(false)}\n cancelColor=\"primary\"\n cancelText=\"Post Anyway\"\n onCancel={() => preSubmitChecksPromiseRef.resolve(true)}\n />\n )}\n {errorModal && (\n {\n setErrorModal(false);\n setErrorMessage('');\n }}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"That didn't work\"\n message={errorMessage}\n ctaText=\"Ok\"\n cancelColor=\"primary\"\n onCancel={() => {\n setErrorModal(false);\n setErrorMessage('');\n }}\n />\n )}\n \n );\n};\n\nexport default withStyles(styles)(CreateComment);\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport clsx from 'clsx';\nimport { useLocation } from 'react-router-dom';\nimport makeStyles from '@mui/styles/makeStyles';\nimport {\n Box,\n CardHeader,\n Typography,\n Link,\n SxProps,\n Theme,\n} from '@mui/material';\nimport { Link as RouterLink } from 'react-router-dom';\nimport UserAvatar from '../UserAvatar/UserAvatar';\nimport { renderUserBadge } from '../../utils/moderationShortcuts';\n\nconst useStyles = makeStyles((theme) => ({\n nameText: {\n textDecoration: 'none',\n textOverflow: 'ellipsis',\n display: 'inline-block',\n alignItems: 'baseline',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n smallText: {\n textDecoration: 'none',\n\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n clickableDate: {\n textDecoration: 'none',\n },\n bullet: {\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n color: theme.palette.colors.ui_05,\n [theme.breakpoints.down('md')]: {\n display: 'none',\n },\n },\n headerText: {\n display: 'flex',\n paddingLeft: theme.spacing(2),\n paddingBottom: theme.spacing(0.5),\n paddingRight: theme.spacing(2),\n textOverflow: 'ellipsis',\n justifyContent: 'flex-start',\n },\n secondRow: {\n paddingBottom: '0',\n\n [theme.breakpoints.down('sm')]: {\n alignItems: 'start !important',\n },\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n avatar: {\n marginRight: 0,\n },\n cardRoot: {\n padding: 0,\n marginBottom: 0,\n },\n // saving for threads\n // commentAvatar: {\n // padding: 0,\n // marginLeft: theme.spacing(-4.5),\n // marginTop: theme.spacing(-3),\n // },\n cardAction: {\n alignSelf: 'center',\n alignItems: 'center',\n display: 'flex',\n paddingBottom: '4px',\n },\n content: {\n overflowX: 'hidden',\n width: 'calc(100% - 189px)',\n [theme.breakpoints.down('sm')]: {\n width: ({ singlePost, sharedPost, threadPreview }) =>\n singlePost || sharedPost || threadPreview\n ? `calc(100vw - ${threadPreview ? 96 : singlePost ? 213 : 162}px)`\n : 'calc(100% - 189px)',\n },\n },\n commentedPostUsername: {\n marginLeft: theme.spacing(7),\n marginTop: theme.spacing(0.5),\n width: '100%',\n maxWidth: `calc(100vw - ${theme.spacing(10.5)})`,\n },\n}));\n\ninterface Props {\n user: any;\n includeAction?: boolean;\n action?: any;\n date?: any;\n url?: string;\n sx?: SxProps;\n commentedPostUsername?: string;\n singlePost?: boolean;\n sharedPost?: boolean;\n threadPreview?: boolean;\n}\n\nconst ExtendedUserCard = ({\n user,\n includeAction = false,\n action = {},\n url = '',\n date = '',\n sx,\n commentedPostUsername,\n singlePost,\n sharedPost,\n threadPreview,\n}: Props) => {\n const classes = useStyles({ singlePost, sharedPost, threadPreview });\n const routerLocation = useLocation();\n return (\n
    \n }\n title={\n \n \n \n {user.display_name}\n \n \n {renderUserBadge(user, { className: classes.teamBadge })}\n \n }\n subheader={\n \n \n \n @{user.username}\n \n {!!date && (\n \n {'\\u00a0\\u00a0'}•{'\\u00a0\\u00a0'}\n \n )}\n {routerLocation.pathname.includes('/post/') ? (\n {date}\n ) : (\n \n {date}\n \n )}\n \n \n }\n action={includeAction && <>{action}}\n classes={{\n avatar: classes.avatar,\n root: classes.cardRoot,\n // saving for threads\n // root:\n // location === 'comment' ? classes.commentAvatar : classes.cardRoot,\n action: classes.cardAction,\n content: classes.content,\n }}\n sx={sx}\n />\n {commentedPostUsername && (\n \n commented on{' '}\n \n @{commentedPostUsername}\n \n 's post\n \n )}\n
    \n );\n};\n\nexport default ExtendedUserCard;\n","import { Box, Typography } from '@mui/material';\nimport React from 'react';\nimport { Dialog, UserList } from 'components';\nimport { Profile } from '../../../client';\nimport { LIKED_USERS_INITIAL_ITEMS_LIMIT } from '../../../constants/user';\nimport LoadMoreButton from '../../Buttons/LoadMoreButton';\nimport Loading from '../../Loading';\n\ninterface Props {\n close: any;\n title?: string;\n users: Profile[];\n isLoading: boolean;\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n fetchNextPage: any;\n}\n\nconst UserListModal = ({\n close,\n title,\n users,\n isLoading,\n hasNextPage,\n isFetchingNextPage,\n fetchNextPage,\n}: Props) => {\n const variant = title.includes('Like') ? 'like' : 'share';\n return (\n close()}\n sx={{\n '& .MuiDialogContent-root': {\n paddingLeft: 0,\n paddingRight: 0,\n },\n }}\n >\n \n {isLoading ? (\n \n \n \n ) : users.length > 0 ? (\n <>\n \n\n {users.length >= LIKED_USERS_INITIAL_ITEMS_LIMIT && hasNextPage && (\n \n )}\n \n ) : (\n \n {`No one ${variant}d this yet`}\n \n )}\n \n \n );\n};\n\nexport default UserListModal;\n","import React, { useMemo } from 'react';\nimport { useInfiniteQuery } from 'react-query';\nimport { flattenInfiniteData } from 'utils';\nimport api from 'client';\nimport { LIKED_USERS_INITIAL_ITEMS_LIMIT } from '../../../constants/user';\nimport { sendHeartbeat } from '../../../utils/heartbeat';\nimport UserListComponent from './UserListComponent';\n\ninterface Props {\n close: any;\n resourceId: bigint;\n}\n\nconst UserListModal = ({ close, resourceId }: Props) => {\n const fetchUsersLike = React.useCallback(\n async ({ pageParam = 0 }) => {\n const likes = await api.getLikesUsers(\n resourceId,\n BigInt(pageParam),\n BigInt(LIKED_USERS_INITIAL_ITEMS_LIMIT)\n );\n sendHeartbeat();\n return likes;\n },\n [resourceId]\n );\n\n // TODO make sure it's actually paginated\n const {\n data: pagedUsersLike,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n isLoading,\n } = useInfiniteQuery(['getLikesUsers', resourceId], fetchUsersLike, {\n getNextPageParam: (lastPage, pages) =>\n pages.length * LIKED_USERS_INITIAL_ITEMS_LIMIT,\n });\n\n const users = useMemo(() => flattenInfiniteData(pagedUsersLike), [\n pagedUsersLike,\n ]);\n\n return (\n \n );\n};\nexport default UserListModal;\n","import React from 'react';\nimport { Dialog } from 'components';\n\ninterface Props {\n open: boolean;\n close: any;\n title?: string;\n content: string;\n confirmButton?: string;\n}\n\nconst WarningModal = ({\n open,\n close,\n title = `That didn't work`,\n content,\n confirmButton = 'Ok',\n}: Props) => {\n if (!open) {\n return null;\n }\n\n return (\n close()}\n />\n );\n};\n\nexport default WarningModal;\n","// export const RESOURCE_TYPE: IcEnumToObjectType = {\nexport const RESOURCE_TYPE = {\n // as of <2022-09-21 Wed> API_ITEM can be either a post or a thread post\n // but in a few cases we want to have different implementation if it's api_item than with post because data structure is different\n FEED_ITEM: 'feed_item',\n ANNOUNCEMENT: 'announcement',\n ARTICLE: 'article',\n COMMENT: 'comment',\n MILESTONE: 'milestone',\n POST: 'post',\n PROJECT: 'project',\n THREAD: 'thread',\n THREAD_POST: 'thread_post',\n USER: 'user',\n NONE: 'none',\n} as const;\n\n// Set how many items should be displayed on report page\nexport const REPORT_ITEMS_LIMIT = 20;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n buttonText: {\n paddingLeft: theme.spacing(0.5),\n paddingRight: theme.spacing(0.5),\n },\n iconButton: {\n padding: theme.spacing(1),\n },\n likedIcon: {\n height: 16,\n width: 16,\n color: `${theme.palette.colors.danger} !important`,\n },\n icon: {\n height: 16,\n width: 16,\n },\n linkText: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n}));\n","import React, { useCallback, useContext, useState } from 'react';\nimport { useQueryClient } from 'react-query';\nimport Typography from '@mui/material/Typography';\nimport { IconButton, Link } from '@mui/material';\n\nimport UserLikedModal from 'components/Dialogs/UserListModal/UserListLikes';\nimport WarningModal from 'components/Dialogs/Warning';\nimport { FavoriteIcon, FavoriteFilledIcon } from 'components/icons';\nimport { LikeCounter, Profile } from 'client';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\nimport { ValueOf } from 'types';\nimport { useStyles } from './styles';\nimport {\n useGetLikes,\n useLikeUnlikeArticle,\n useLikeUnlikeComment,\n useLikeUnlikePost,\n} from '../../services';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IBaseProps {\n resource_id: bigint;\n // id of parent resource id.\n // i.e. in case of resource_id being a comment, parentResourceId is post id\n parentResourceId?: bigint;\n postUserId?: bigint;\n resourceType?: ValueOf;\n}\n\ninterface ILikeProps extends IBaseProps {\n likeCounter?: never;\n isLiked?: never;\n}\n\n// used when like info are already fetched through OptimizedPost/OptimizedComment\ninterface ILikePostItemProps extends IBaseProps {\n likeCounter: LikeCounter;\n isLiked: boolean;\n}\n\n// TODO after liking an item, if we navigate to another page before BE call is done, the refetch of new page will not have the updated like info\nconst LikeResource = ({\n resource_id,\n likeCounter,\n isLiked: isLikedProp,\n parentResourceId,\n resourceType,\n postUserId,\n}: ILikeProps | ILikePostItemProps) => {\n const classes = useStyles();\n const queryClient = useQueryClient();\n const [likedModal, setLikedModal] = useState(false);\n const [warningModal, setWarningModal] = useState(false);\n\n const handleLikeUnlikePost = useLikeUnlikePost(resource_id, {\n onError: () => {\n setWarningModal(true);\n },\n });\n\n const handleLikeUnlikeArticle = useLikeUnlikeArticle(resource_id, {\n onError: () => {\n setWarningModal(true);\n },\n });\n\n const handleLikeUnlikeComment = useLikeUnlikeComment(\n resource_id,\n parentResourceId,\n {\n onError: () => {\n setWarningModal(true);\n },\n }\n );\n\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const { mode, handleAction: openDistriktAction } = useContext(\n OpenDistriktContext\n );\n\n const likeCounterExists = typeof likeCounter !== 'undefined';\n const { data: likesData = [] } = useGetLikes(\n resource_id,\n !likeCounterExists && mode === 'User'\n );\n const likes = likeCounterExists ? likeCounter : likesData?.length;\n const isLiked =\n typeof isLikedProp !== 'undefined'\n ? isLikedProp\n : likesData.includes(authUser?.id);\n\n const toggleLike = () => {\n if (resourceType === RESOURCE_TYPE.COMMENT) {\n handleLikeUnlikeComment.mutate(isLiked ? 'Unlike' : 'Like');\n } else if (resourceType === RESOURCE_TYPE.ARTICLE) {\n handleLikeUnlikeArticle.mutate(isLiked ? 'Unlike' : 'Like');\n } else {\n handleLikeUnlikePost.mutate(isLiked ? 'Unlike' : 'Like');\n }\n };\n\n const toggleLikeModal = useCallback(() => {\n setLikedModal((value) => !value);\n }, []);\n\n return (\n <>\n openDistriktAction(toggleLike)}\n size=\"large\"\n >\n {isLiked ? (\n \n ) : (\n \n )}\n \n \n openDistriktAction(toggleLikeModal)}\n color=\"inherit\"\n className={classes.linkText}\n >\n {likes}\n \n \n {likedModal && (\n openDistriktAction(toggleLikeModal)}\n resourceId={resource_id}\n />\n )}\n {\n setWarningModal(false);\n }}\n content={'Something went wrong. Please try again.'}\n />\n \n );\n};\n\nexport default LikeResource;\n","enum FEATURES {\n POST = 'POST',\n COMMENTS = 'COMMENTS',\n USERS = 'USERS',\n PROJECTS = 'PROJECTS',\n MILESTONES = 'MILESTONES',\n}\n\nexport const REPORT_CATEGORIES = {\n VIOLENCE: {\n key: 1,\n value: 'Violence',\n label: 'Violence/Hate speech',\n },\n IMPERSONATION: {\n key: 2,\n value: 'Impersonation',\n label: 'Impersonation',\n },\n SPAM: {\n key: 3,\n value: 'Spam',\n label: 'Spam',\n },\n PORNOGRAPHY: {\n key: 4,\n value: 'Pornography',\n label: 'Nudity/Pornography',\n },\n INAPPROPRIATE_CONTENT: {\n key: 5,\n value: 'InappropriateContent',\n label: 'Inappropriate content',\n },\n SCAM: {\n key: 6,\n value: 'Scam',\n label: 'Scam (links, etc)',\n },\n UNKNOWN: {\n key: '_',\n value: 'Unknown',\n label: 'Unknown',\n },\n};\n\nconst FEATURE_CATEGORIES = {\n POST: [\n REPORT_CATEGORIES.VIOLENCE,\n REPORT_CATEGORIES.IMPERSONATION,\n REPORT_CATEGORIES.SPAM,\n REPORT_CATEGORIES.PORNOGRAPHY,\n REPORT_CATEGORIES.SCAM,\n ],\n COMMENTS: [\n REPORT_CATEGORIES.VIOLENCE,\n REPORT_CATEGORIES.IMPERSONATION,\n REPORT_CATEGORIES.SPAM,\n REPORT_CATEGORIES.PORNOGRAPHY,\n REPORT_CATEGORIES.SCAM,\n ],\n USERS: [\n REPORT_CATEGORIES.VIOLENCE,\n REPORT_CATEGORIES.IMPERSONATION,\n REPORT_CATEGORIES.SPAM,\n REPORT_CATEGORIES.PORNOGRAPHY,\n REPORT_CATEGORIES.SCAM,\n ],\n PROJECTS: [\n REPORT_CATEGORIES.IMPERSONATION,\n REPORT_CATEGORIES.SPAM,\n REPORT_CATEGORIES.INAPPROPRIATE_CONTENT,\n REPORT_CATEGORIES.SCAM,\n ],\n MILESTONES: [\n REPORT_CATEGORIES.IMPERSONATION,\n REPORT_CATEGORIES.SPAM,\n REPORT_CATEGORIES.INAPPROPRIATE_CONTENT,\n REPORT_CATEGORIES.SCAM,\n ],\n};\n\nconst getReportCategoriesByFeature = (feature: FEATURES) => {\n return FEATURE_CATEGORIES[feature];\n};\n\nexport { FEATURES, getReportCategoriesByFeature };\n","import { UseMutationOptions, useQuery, useQueryClient } from 'react-query';\n\nimport api, { Profile } from 'client';\nimport { useOptimisticMutation, UseOptimisticMutationContext } from 'hooks';\nimport { useCallback, useMemo } from 'react';\nimport {\n useArticleRelatedQueryKeys,\n useCommentRelatedQueryKeys,\n usePostRelatedQueryKeys,\n} from 'utils';\n\nexport const useGetLikes = (resource_id: bigint, enabled = true) => {\n return useQuery(\n ['getLikes', resource_id],\n async (): Promise => {\n // TODO corrently BE does not generate the correct ts type, which is BigUint64Array instead of Array\n return await api.getLikes(resource_id);\n },\n {\n enabled,\n }\n );\n};\n\nexport type LikeOperationType = 'Like' | 'Unlike';\n\ntype UseLikeUnlikeOptions = UseMutationOptions<\n void,\n unknown,\n LikeOperationType,\n UseOptimisticMutationContext\n>;\n\nexport const useLikeUnlikePost = (\n resourceId: bigint,\n options: UseLikeUnlikeOptions\n) => {\n const updatePostLikes = useMemo(\n () => (post: any, operation: LikeOperationType) => {\n const likeCounter = post?.OptimizedPost?.like_counter;\n\n return !!post\n ? {\n ...post,\n OptimizedPost: {\n ...post.OptimizedPost,\n like_counter:\n operation === 'Like' ? likeCounter + 1 : likeCounter - 1,\n is_liked_by_request_user: operation === 'Like' ? true : false,\n },\n }\n : post;\n },\n []\n );\n\n const relatedQueryKeys = usePostRelatedQueryKeys(resourceId, updatePostLikes);\n\n const likeUnlike = useCallback(\n (operation: LikeOperationType) => {\n switch (operation) {\n case 'Like':\n return api.likeResource(resourceId);\n case 'Unlike':\n return api.unlikeResource(resourceId);\n }\n },\n [resourceId]\n );\n\n return useOptimisticMutation({\n relatedQueryKeys,\n mutationKey: 'like-unlike',\n mutationFn: likeUnlike,\n ...options,\n });\n};\n\nexport const useLikeUnlikeComment = (\n resourceId: bigint,\n parentResourceId: bigint,\n options: UseLikeUnlikeOptions\n) => {\n const queryClient = useQueryClient();\n\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const updateCommentLikes = useMemo(\n () => (comment: any, operation: LikeOperationType) => ({\n ...comment,\n likes:\n operation === 'Like'\n ? [...comment.likes, authUser?.id]\n : comment.likes.filter((l) => l !== authUser?.id),\n }),\n [authUser?.id]\n );\n\n const relatedQueryKeys = useCommentRelatedQueryKeys(\n resourceId,\n parentResourceId,\n updateCommentLikes\n );\n\n const likeUnlike = useCallback(\n (operation: LikeOperationType) => {\n switch (operation) {\n case 'Like':\n return api.likeResource(resourceId);\n case 'Unlike':\n return api.unlikeResource(resourceId);\n }\n },\n [resourceId]\n );\n\n return useOptimisticMutation({\n relatedQueryKeys,\n mutationKey: 'like-unlike',\n mutationFn: likeUnlike,\n ...options,\n });\n};\n\nexport const useLikeUnlikeArticle = (\n resourceId: bigint,\n options: UseLikeUnlikeOptions\n) => {\n const queryClient = useQueryClient();\n\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const updateArticleLikes = useMemo(\n () => (articleLikes: any, operation: LikeOperationType) => {\n switch (operation) {\n case 'Like':\n return [...articleLikes, authUser?.id];\n case 'Unlike':\n return articleLikes.filter((l) => l !== authUser?.id);\n default:\n return articleLikes;\n }\n },\n [authUser?.id]\n );\n\n const relatedQueryKeys = useArticleRelatedQueryKeys(\n resourceId,\n updateArticleLikes\n );\n\n const likeUnlike = useCallback(\n (operation: LikeOperationType) => {\n switch (operation) {\n case 'Like':\n return api.likeResource(resourceId);\n case 'Unlike':\n return api.unlikeResource(resourceId);\n }\n },\n [resourceId]\n );\n\n return useOptimisticMutation({\n relatedQueryKeys,\n mutationKey: 'like-unlike',\n mutationFn: likeUnlike,\n ...options,\n });\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { Typography, FormControl, FormHelperText } from '@mui/material';\nimport DistriktTextField from 'components/TextInput/TextField';\nimport { sendHeartbeat } from '../../utils/heartbeat';\nimport {\n FEATURES,\n getReportCategoriesByFeature,\n} from '../../constants/reportCategories';\nimport { Dialog, Select } from 'components';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: 480,\n [theme.breakpoints.down('sm')]: {\n width: 280,\n },\n '& .MuiOutlinedInput-input': {\n fontSize: theme.typography.fontSize,\n },\n },\n}));\n\ninterface Props {\n open: boolean;\n close: any;\n formik: any;\n loading: boolean;\n title: string;\n content: string;\n confirmButton: any;\n warning: boolean;\n length?: number;\n feature: FEATURES;\n}\n\nconst ReportModal = ({\n open,\n close,\n formik,\n loading,\n title,\n content,\n confirmButton,\n warning,\n feature,\n}: Props) => {\n React.useEffect(() => {\n if (open) {\n sendHeartbeat();\n }\n }, [open]);\n const [value, setValue] = React.useState('');\n const [openWarning, setOpenWarning] = React.useState(false);\n const classes = useStyles();\n const reportLabelToValue = (label: string) => {\n const reportCategories = getReportCategoriesByFeature(feature);\n return reportCategories.find(\n (reportCategory) => reportCategory.label === label\n )?.value;\n };\n const handleClose = React.useCallback(() => {\n if (formik.values.text) {\n setOpenWarning(true);\n } else {\n close();\n }\n }, [close, formik.values.text]);\n return (\n <>\n {open ? (\n <>\n 0 ? close : handleClose}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n onSubmit={formik.handleSubmit}\n ctaText={confirmButton}\n disabled={loading || !value || !formik.values.text}\n warning={warning}\n cancelColor=\"primary\"\n closeOnSubmit={false}\n loading={loading}\n >\n
    \n
    \n \n {content}\n \n \n reportCategory.label\n )}\n emptyLabel=\"Choose category of violation\"\n value={value}\n onChange={(v) => {\n setValue(v);\n formik.setFieldValue('category', reportLabelToValue(v));\n }}\n disabled={loading}\n />\n {formik.errors.category ? (\n \n {formik.errors.category}\n \n ) : null}\n \n \n \n
    \n \n {openWarning && (\n setOpenWarning(false)}\n onSubmit={() => {\n setOpenWarning(false);\n formik.resetForm();\n close();\n }}\n />\n )}\n \n ) : null}\n \n );\n};\n\nexport default ReportModal;\n","import * as React from 'react';\nimport client from '../../client';\nimport { useFormik } from 'formik';\nimport ReportModal from '../Dialogs/Report';\nimport { FEATURES } from '../../constants/reportCategories';\nimport { Alert } from 'components';\n\ninterface ReportForm {\n text: string;\n category: string;\n}\n\ninterface Props {\n resource_id: BigInt;\n resource_type: string;\n openInputModal: boolean;\n setInputModal: any;\n feature: FEATURES;\n}\n\nconst ReportResource = ({\n resource_id,\n resource_type,\n openInputModal,\n setInputModal,\n feature,\n}: Props) => {\n const [successReport, setSuccessReport] = React.useState(false);\n const [reportedError, setReportedErrorModal] = React.useState(false);\n const [reportLoading, setReportLoading] = React.useState(false);\n\n const formik = useFormik({\n initialValues: {\n text: '',\n category: '',\n },\n validateOnChange: false,\n validate: (values) => {\n const errors: Partial = {};\n\n if (!values.text) {\n errors.text = 'This field is mandatory';\n }\n if (!values.category) errors.category = 'This field is mandatory';\n\n return errors;\n },\n onSubmit: (values) => {\n setReportLoading(true);\n\n const report = {\n text: values.text,\n resource_id: resource_id,\n category: { [values.category]: null },\n };\n\n client\n .newReportV2(report)\n .then(() => {\n setInputModal(false);\n setReportLoading(false);\n setSuccessReport(true);\n setTimeout(() => setSuccessReport(false), 3000);\n })\n .catch(() => {\n setReportedErrorModal(true);\n setInputModal(false);\n })\n .finally(() => {\n setReportLoading(false);\n formik.resetForm();\n });\n },\n });\n\n return (\n <>\n {openInputModal && (\n setInputModal(false)}\n formik={formik}\n loading={reportLoading}\n title={`Report ${resource_type}`}\n content=\"Thank you for helping to keep our community safe and inclusive.\"\n confirmButton=\"Report\"\n warning={true}\n feature={feature}\n />\n )}\n {reportedError && (\n setReportedErrorModal(false)}\n title={`You have already reported this ${resource_type}`}\n severity=\"error\"\n />\n )}\n {successReport && (\n setSuccessReport(false)}\n title=\"Your report has been sent\"\n severity=\"success\"\n />\n )}\n \n );\n};\n\nexport default ReportResource;\n","import { registerPlugin } from 'linkifyjs';\n\nexport const hashtag = ({ scanner, parser, utils }) => {\n // Various tokens that may compose a hashtag\n const { POUND, DOMAIN, TLD, LOCALHOST, UNDERSCORE, NUM } = scanner.tokens;\n\n // The start state\n const START_STATE = parser.start;\n\n // Create a new token that class that the parser emits when it finds a hashtag\n const Hashtag = utils.createTokenClass('hashtag', { isLink: true });\n\n // Take or create a transition from start to the '#' sign (non-accepting)\n const HASH_STATE = START_STATE.tt(POUND);\n\n // Take transition from '#' to any text token to yield valid hashtag state\n const HASHTAG_STATE = HASH_STATE.tt(DOMAIN, Hashtag);\n\n // Now that we have the hashtag state, no need to create new states\n HASH_STATE.tt(TLD, HASHTAG_STATE);\n HASH_STATE.tt(LOCALHOST, HASHTAG_STATE);\n HASH_STATE.tt(NUM, HASHTAG_STATE);\n\n // Account for leading underscore (non-accepting unless followed by number or domain)\n const HASH_UNDERSCORE_STATE = HASH_STATE.tt(UNDERSCORE);\n HASH_UNDERSCORE_STATE.tt(UNDERSCORE, HASH_UNDERSCORE_STATE);\n HASH_UNDERSCORE_STATE.tt(NUM, HASHTAG_STATE);\n HASH_UNDERSCORE_STATE.tt(DOMAIN, HASHTAG_STATE);\n HASH_UNDERSCORE_STATE.tt(TLD, HASHTAG_STATE);\n HASH_UNDERSCORE_STATE.tt(LOCALHOST, HASHTAG_STATE);\n\n // Accept #{domain}_{tld}\n const HASHT_DIVIDER_SYMS_STATE = HASH_STATE.tt(DOMAIN);\n HASHT_DIVIDER_SYMS_STATE.tt(DOMAIN, HASHT_DIVIDER_SYMS_STATE);\n HASHT_DIVIDER_SYMS_STATE.tt(UNDERSCORE, HASHT_DIVIDER_SYMS_STATE);\n HASHT_DIVIDER_SYMS_STATE.tt(NUM, HASHT_DIVIDER_SYMS_STATE);\n HASHT_DIVIDER_SYMS_STATE.tt(TLD, HASHTAG_STATE);\n HASHT_DIVIDER_SYMS_STATE.tt(LOCALHOST, HASHTAG_STATE);\n\n // Trailing underscore is okay\n HASHTAG_STATE.tt(UNDERSCORE, HASHTAG_STATE);\n};\n\nregisterPlugin('hashtag', hashtag);\n","import * as React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Linkify from 'linkifyjs/react';\nimport { Typography } from '@mui/material';\nimport '../Linkify/hashtag';\nimport 'linkifyjs/plugins/mention';\nimport { SxProps, Theme } from '@mui/material';\nimport { getCustomExternalLink } from 'components/CustomExternalLink';\nimport { Link } from 'react-router-dom';\n\nconst useStyles = makeStyles((theme) => ({\n tag: {\n textDecoration: 'none !important',\n '&:hover': {\n textDecoration: 'underline !important',\n },\n },\n badTag: {\n pointerEvents: 'none',\n textDecoration: 'none !important',\n color: `${theme.palette.colors.ui_07} !important`,\n },\n badTagThreadPreview: {\n pointerEvents: 'none',\n textDecoration: 'none !important',\n color: `${theme.palette.colors.ui_05} !important`,\n },\n tooltipStyle: {\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow:\n theme.palette.mode === 'light'\n ? '0 2px 16px 0 rgba(76,70,212,0.19)'\n : 'none',\n color: theme.palette.text.primary,\n fontSize: 12,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 20,\n paddingRight: 20,\n },\n tooltipArrow: {\n color: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n },\n}));\n\nconst RichTextFormat = ({\n content,\n user_tags = [],\n threadPreview = false,\n onContentClick,\n sx = {},\n}: {\n content: string;\n user_tags?: { username: string; user_id: bigint }[];\n threadPreview?: boolean;\n onContentClick?: React.MouseEventHandler;\n sx?: SxProps;\n}) => {\n const classes = useStyles();\n\n return (\n <>\n Link,\n hashtag: () => Link,\n url: () =>\n getCustomExternalLink({ tooltip: true, nbCharsDisplayed: 60 }),\n },\n attributes: (href, type) => {\n const includes = user_tags.filter(\n (mention) => mention.username === href.substring(1)\n );\n\n if (type === 'hashtag') {\n return {\n to: '/hashtag/' + href.substring(1),\n className: classes.tag,\n };\n } else if (type === 'mention' && includes.length > 0) {\n return {\n to: '/u/' + href.substring(1),\n className: classes.tag,\n };\n } else if (type === 'mention' && includes.length === 0) {\n if (threadPreview) {\n return { className: classes.badTagThreadPreview };\n } else {\n return { className: classes.badTag };\n }\n }\n return {\n rel: 'noopener noreferrer',\n };\n },\n formatHref: (href, type) => {\n if (type === 'hashtag') {\n href = '/hashtag/' + href.substring(1);\n } else if (type === 'mention') {\n href = '/u/' + href.substring(1);\n }\n return href;\n },\n validate: (href, type) => {\n if (type === 'hashtag' && href.substring(1).includes('#'))\n return false;\n else if (type === 'mention' && href.substring(1).includes('@'))\n return false;\n return true;\n },\n }}\n >\n \n {content}\n \n \n \n );\n};\n\nexport default RichTextFormat;\n","import React, { useCallback, useContext } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport { Typography, CardActions, Button } from '@mui/material';\nimport { useLocalStorage } from 'react-use';\nimport CopyButton from 'components/Buttons/CopyButton';\nimport ExtendedUserCard from 'components/Cards/ExtendedUserCard';\nimport FollowButton from 'components/Buttons/FollowButton';\nimport LikeResource from '../Like/Like';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport ReportResource from 'components/Report/ReportResource';\nimport { Alert, Dialog } from 'components';\nimport { FEATURES } from 'constants/reportCategories';\nimport {\n FlagIcon,\n LockIcon,\n RemoveBinIcon,\n ArrowUpIcon,\n ArrowDownIcon,\n} from 'components/icons';\nimport { OptimizedComment } from 'client';\nimport { PostImageLoader } from 'components/ImageLoader';\nimport { Profile } from 'client';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport { commentStyles } from './styles';\nimport { formattedDate } from 'utils/formatDate';\nimport { useBlockUser, useHandleCommentDelete } from '../../services';\nimport CreateComment from './CreateComment';\nimport { SORT_ORDER } from '../../constants';\nimport { useGetPaginatedOptimizedCommentForResourceId } from '../../services';\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\nimport { getPaginatedOptimizedUserFeedQueryKey } from 'pages/home/services';\nimport { getPaginatedOptimizedDiscoveryFeedQueryKey } from 'pages/discover/services';\nimport { getPaginatedOptimizedHashtagFeedQueryKey } from 'pages/hashtag/services';\nimport { getPaginatedOptimizedProfileFeedQueryKey } from 'pages/profile/services';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IProps {\n commentItem: OptimizedComment;\n onCommentDelete?: () => void;\n threadMasterId?: bigint;\n replyId?: bigint;\n postId?: bigint;\n onShowCommentReply?: (postId: bigint) => void;\n showCommentReplyPostId?: bigint;\n parentResourceId?: bigint;\n}\n\nconst SingleComment = ({\n commentItem,\n onCommentDelete,\n threadMasterId,\n replyId,\n postId,\n onShowCommentReply,\n showCommentReplyPostId,\n parentResourceId,\n}: IProps) => {\n const classes = commentStyles();\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const authUser = queryClient.getQueryData(['getSelf']);\n const isTrusted: boolean =\n queryClient.getQueryData(['isUserTrusted', authUser?.id]) || false;\n const [processing, setProcessing] = React.useState(false);\n const routerLocation = useLocation();\n const blockUserMutation = useBlockUser();\n const commentDeleteMutation = useHandleCommentDelete();\n const [showRepliesLS, setShowRepliesLS] = useLocalStorage(\n `app.showReplies_${commentItem.comment.comment_id.toString()}`,\n false\n );\n const [openInputModal, setInputModal] = React.useState(false);\n const [deleteModal, setDeleteModal] = React.useState(false);\n const [showBlockUserAlert, setShowBlockUserAlert] = React.useState(false);\n const [showWarningAlert, setShowWarningAlert] = React.useState(false);\n const [showCommentReply, setShowCommentReply] = React.useState(false);\n const [showReplies, setShowReplies] = React.useState(showRepliesLS);\n const [replyDisabled, setReplyDisabled] = React.useState(false);\n const commentBottomRef = React.useRef(null);\n\n const comment = commentItem.comment;\n const author = commentItem.author_profile;\n const date = formattedDate(comment.created_at);\n\n React.useEffect(() => {\n setShowReplies(showRepliesLS);\n }, [showRepliesLS]);\n\n React.useEffect(() => {\n setShowCommentReply(comment.comment_id === showCommentReplyPostId);\n }, [showCommentReplyPostId, comment.comment_id]);\n\n // Auto-scroll commennt reply component to the top\n // React.useEffect(() => {\n // if (showCommentReply && commentBottomRef.current) {\n // setTimeout(() => {\n // const element = commentBottomRef.current;\n // const headerOffset = 88;\n // const { top } = element.getBoundingClientRect();\n // const offsetPosition = top + window.pageYOffset - headerOffset;\n // window.scrollTo({\n // top: offsetPosition,\n // behavior: 'smooth',\n // });\n // }, 250);\n // }\n // }, [showCommentReply]);\n\n const { mode, handleAction: openDistriktAction } = useContext(\n OpenDistriktContext\n );\n\n const blockUser = useCallback(async () => {\n await blockUserMutation.mutateAsync(\n {\n userId: comment.author,\n },\n {\n onSuccess: () => {\n setShowBlockUserAlert(true);\n setTimeout(() => {\n setShowBlockUserAlert(false);\n routerLocation.pathname === '/stream'\n ? document.location.reload()\n : (document.location.href = '/');\n }, 3000);\n },\n onError: () => {\n setShowWarningAlert(true);\n },\n }\n );\n }, [blockUserMutation, comment.author, routerLocation.pathname]);\n\n const MoreCommentButton = () => {\n const items = [];\n\n if (mode === 'User' && author.id === user?.id) {\n const item = {\n title: 'Delete',\n danger: true,\n icon: ,\n handleClick: () => setDeleteModal(true),\n };\n items.push(item);\n } else {\n let deleteOrReportItem;\n if (isTrusted) {\n deleteOrReportItem = {\n title: 'Delete this comment',\n danger: true,\n icon: ,\n handleClick: () => setDeleteModal(true),\n };\n } else {\n deleteOrReportItem = {\n title: 'Report',\n danger: true,\n icon: ,\n handleClick: () => openDistriktAction(() => setInputModal(true)),\n };\n }\n\n const blockUserItem = {\n title: 'Block this user',\n icon: ,\n handleClick: () => openDistriktAction(blockUser),\n };\n items.push(deleteOrReportItem, blockUserItem);\n }\n\n return ;\n };\n\n const updateCounters = () => {\n queryClient.invalidateQueries('getPaginatedOptimizedCommentForResourceId');\n queryClient.invalidateQueries(getPaginatedOptimizedDiscoveryFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedUserFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedProfileFeedQueryKey);\n queryClient.invalidateQueries(getPaginatedOptimizedHashtagFeedQueryKey);\n queryClient.invalidateQueries('getThread');\n queryClient.invalidateQueries('getItem');\n queryClient.invalidateQueries('getThreadPost');\n queryClient.invalidateQueries('getCommentCount');\n };\n\n const handleCommentDeleteFromModal = async () => {\n setProcessing(true);\n await commentDeleteMutation.mutateAsync(\n {\n commentId: comment.comment_id,\n imageId: comment.image?.image_id,\n postId: comment.resource_id,\n threadMasterId,\n },\n {\n onSettled: () => {\n setProcessing(false);\n setDeleteModal(false);\n onCommentDelete && onCommentDelete();\n updateCounters();\n },\n }\n );\n };\n\n const {\n data: replies,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n } = useGetPaginatedOptimizedCommentForResourceId(\n BigInt(comment.comment_id || 0),\n SORT_ORDER.DESCENDING,\n !comment.comment_id\n );\n\n const repliesCount = commentItem.comment.replies_counter;\n\n const replyToComment = useCallback(() => {\n setShowCommentReply(!showCommentReply);\n onShowCommentReply &&\n onShowCommentReply(!showCommentReply ? comment.comment_id : BigInt(0));\n }, [comment.comment_id, onShowCommentReply, showCommentReply]);\n\n return (\n
    \n \n \n \n \n }\n date={date}\n />\n\n
    \n {comment.text.trim() !== '' && (\n \n
    \n \n
    \n
    \n )}\n {comment.image.image_id !== '' && (\n 0\n ? classes.imageContainerComment\n : classes.imageOnlyContainerComment\n }\n >\n \n
    \n )}\n
    \n\n \n
    \n \n
    \n
    \n
    \n {!replyId && (\n \n )}\n
    \n openDistriktAction(replyToComment)}\n classes={{ root: classes.replyButton }}\n disabled={replyDisabled || showCommentReply}\n >\n Reply\n \n
    \n
    \n\n {showCommentReply && (\n setReplyDisabled(true)}\n onCommentCreated={() => {\n setShowCommentReply(false);\n updateCounters();\n setShowReplies(true);\n setShowRepliesLS(true);\n setReplyDisabled(false);\n }}\n onEditorClose={() => setShowCommentReply(false)}\n />\n )}\n\n {replies && repliesCount > 0 && (\n {\n setShowReplies(!showReplies);\n setShowRepliesLS(!showReplies);\n }}\n className={classes.showRepliesButton}\n >\n {showReplies ? (\n \n ) : (\n \n )}\n {showReplies ? 'Hide' : 'Show'} {repliesCount}{' '}\n {repliesCount === 1 ? 'reply' : 'replies'}\n \n )}\n\n
    \n {showReplies &&\n replies &&\n replies.pages.map((page) =>\n page.map((reply) => (\n
    \n \n
    \n ))\n )}\n
    \n\n {showReplies && hasNextPage && (\n fetchNextPage()}\n isFetching={isFetchingNextPage}\n />\n )}\n\n \n\n {deleteModal && (\n setDeleteModal(false)}\n onSubmit={handleCommentDeleteFromModal}\n ctaText={!isTrusted ? `Delete` : `Yes, delete`}\n message={\n !isTrusted\n ? `Sure you want to delete your comment? You won't be able to get it back once it's gone.`\n : `Are you sure you want to delete this comment?\n Remember that once you perform this action, you cannot undo it and the comment will be deleted forever.`\n }\n title={!isTrusted ? `Delete comment` : `Are you sure?`}\n disabled={commentDeleteMutation.isLoading}\n cancelColor=\"primary\"\n warning\n maxWidth=\"sm\"\n loading={processing}\n />\n )}\n\n {showBlockUserAlert ? (\n setShowBlockUserAlert(false)}\n />\n ) : null}\n\n {showWarningAlert && (\n {\n setShowWarningAlert(false);\n }}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"That didn't work\"\n message={'Please try again later'}\n ctaText=\"Ok\"\n cancelColor=\"primary\"\n onCancel={() => {\n setShowWarningAlert(false);\n }}\n />\n )}\n \n );\n};\n\nexport default SingleComment;\n","import { styled } from '@mui/material/styles';\nimport { Box } from '@mui/material';\n\nexport const Container = styled(Box)(({ theme }) => ({\n paddingTop: 0,\n paddingBottom: 0,\n}));\n\nexport const Content = styled(Box)(({ theme, isQuotedResource }) => ({\n fontSize: theme.typography.pxToRem(14),\n color: theme.palette.text.primary,\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n\n '& a': {\n color: theme.palette.primary.main,\n textDecoration: 'none',\n },\n}));\n\nexport const PostImageWrapper = styled(Box)(({ theme }) => ({}));\n\nexport const PostNftImageWrapper = styled(Box)(\n ({ theme, isQuotedResource }) => ({\n ...(isQuotedResource\n ? {\n marginLeft: theme.spacing(1),\n }\n : {}),\n })\n);\n","import React, {\n ChangeEvent,\n MouseEvent,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport {\n Box,\n Button,\n CheckboxProps,\n FormControlLabel,\n LinearProgress,\n Radio,\n RadioGroup,\n RadioProps,\n Typography,\n useMediaQuery,\n useTheme,\n} from '@mui/material';\nimport api, {\n OptionId,\n Poll as APIPoll,\n PollInfo as APIPollInfo,\n PollOption,\n PollRequest as APIPollRequest,\n} from 'client';\nimport Checkbox from 'components/Checkbox';\nimport { ConditionalWrapper } from 'components/ConditionalWrapper';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\nimport {\n extractApiDataOrThrow,\n humanizeTimeToVote,\n usePostRelatedQueryKeys,\n} from 'utils';\nimport { useFormik } from 'formik';\nimport CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline';\nimport Dialog from 'components/Dialog';\nimport { useOptimisticMutation } from 'hooks';\nimport { OpenDistriktContext } from 'providers';\n\ndayjs.extend(duration);\n\ninterface BasePollOptionProps {\n isMultichoice: boolean;\n}\n\ntype PollOptionControlProps = (CheckboxProps | RadioProps) &\n BasePollOptionProps;\n\nconst PollOptionControl = ({\n isMultichoice,\n ...props\n}: PollOptionControlProps) => {\n return isMultichoice ? : ;\n};\n\ninterface BasePollProps {\n disabled?: boolean;\n isInteractive: boolean;\n postId: bigint;\n}\n\ntype PollVoteControlSectionProps = APIPoll &\n BasePollProps & {\n onError?: (error: any) => void;\n updateTimeLeftToVote: () => void;\n };\n\ninterface OptionInfo {\n intPercentage: number;\n votes: bigint;\n remainder: number;\n id: OptionId;\n}\n\nconst PollVoteControlSection = ({\n disabled,\n isInteractive,\n onError,\n options,\n postId,\n votes_per_user,\n poll_end_timestamp,\n updateTimeLeftToVote,\n}: PollVoteControlSectionProps) => {\n const theme = useTheme();\n\n const isMultichoice = useMemo(() => votes_per_user !== 1, [votes_per_user]);\n\n const initialChoices = useMemo(() => options.map(() => false), [options]);\n\n const updateOptimizedPost = useCallback(\n (optimizedPost: any, selectedOptions: Array) => {\n const totalVoteCounter =\n (optimizedPost?.OptimizedPost?.post?.extension?.Poll\n ?.total_vote_counter || 0n) + BigInt(selectedOptions.length);\n\n let optionsInfo: Array = optimizedPost?.OptimizedPost?.post?.extension?.Poll?.options?.map(\n (option: PollOption) => {\n const votes =\n option.votes + (selectedOptions.includes(option.id) ? 1n : 0n);\n\n const percentage = (Number(votes) / Number(totalVoteCounter)) * 100;\n const intPercentage = Math.floor(percentage);\n const remainder = percentage - intPercentage;\n\n return {\n intPercentage,\n remainder,\n votes,\n id: option.id,\n };\n }\n );\n\n const sumIntPercentages = optionsInfo.reduce(\n (sum: number, info: OptionInfo) => sum + info.intPercentage,\n 0\n );\n\n let remainingPercentages = 100 - sumIntPercentages;\n\n if (remainingPercentages > 0) {\n optionsInfo = optionsInfo.sort(\n (info1: OptionInfo, info2: OptionInfo) =>\n info2.remainder - info1.remainder\n );\n\n for (let i = 0; i < optionsInfo.length; i++) {\n const currentInfo = optionsInfo[i];\n const countSameUntilTheEnd = optionsInfo\n .slice(i)\n .reduce(\n (count: number, info: OptionInfo) =>\n count + (info.remainder === currentInfo.remainder ? 1 : 0),\n 0\n );\n\n if (countSameUntilTheEnd > remainingPercentages) {\n break;\n }\n\n currentInfo.intPercentage += 1;\n remainingPercentages -= 1;\n }\n }\n\n return optionsInfo\n ? {\n ...optimizedPost,\n OptimizedPost: {\n ...optimizedPost.OptimizedPost,\n extension_info: {\n ...optimizedPost.OptimizedPost.extension_info,\n Poll: {\n ...optimizedPost.OptimizedPost.extension_info.Poll,\n request_user_votes: selectedOptions,\n },\n },\n post: {\n ...optimizedPost.OptimizedPost.post,\n extension: {\n ...optimizedPost.OptimizedPost.post.extension,\n Poll: {\n ...optimizedPost.OptimizedPost.post.extension.Poll,\n options: optimizedPost.OptimizedPost.post.extension.Poll.options.map(\n (option: PollOption) => {\n const info = optionsInfo.find(\n (info: OptionInfo) => option.id === info.id\n );\n\n return {\n ...option,\n votes: info.votes,\n vote_percentage: info.intPercentage,\n };\n }\n ),\n total_vote_counter: totalVoteCounter,\n },\n },\n },\n },\n }\n : optimizedPost;\n },\n []\n );\n\n const relatedQueryKeys = usePostRelatedQueryKeys(postId, updateOptimizedPost);\n\n const vote = React.useCallback(\n async (selectedOptions: Array) => {\n const res = await api.postPollVote(postId, selectedOptions);\n const data = extractApiDataOrThrow(res);\n return data;\n },\n [postId]\n );\n\n const voteMutation = useOptimisticMutation({\n relatedQueryKeys,\n mutationKey: 'vote',\n mutationFn: vote,\n onError,\n });\n\n const isValidTimeLeftToVote = () => {\n const voteEndDate = dayjs(Number(poll_end_timestamp));\n const millisecondsLeftToVote = voteEndDate.diff(dayjs());\n return millisecondsLeftToVote >= 0;\n };\n\n const { handleAction: openDistriktAction } = useContext(OpenDistriktContext);\n\n const formik = useFormik({\n initialValues: {\n selectedChoices: initialChoices,\n },\n validate: () => ({}),\n onSubmit: (values, { setSubmitting }) => {\n if (!isValidTimeLeftToVote()) {\n updateTimeLeftToVote();\n onError?.({ message: 'PollExpired' });\n return;\n }\n const selectedOptions = values.selectedChoices\n .map((isSelected: boolean, index: number) => ({\n isSelected,\n option: options[index] as PollOption,\n }))\n .filter(({ isSelected }) => isSelected)\n .map(({ option }) => option.id);\n\n openDistriktAction(() => voteMutation.mutate(selectedOptions));\n\n setSubmitting(false);\n },\n });\n\n const isAnyOptionSelected = useMemo(\n () => formik.values.selectedChoices.find((value: boolean) => value),\n [formik.values.selectedChoices]\n );\n\n const isDisabled = useMemo(\n () =>\n disabled ||\n formik.isSubmitting ||\n voteMutation.isLoading ||\n voteMutation.isSuccess,\n [\n disabled,\n formik.isSubmitting,\n voteMutation.isLoading,\n voteMutation.isSuccess,\n ]\n );\n\n const onRadioButtonChange = useCallback(\n (e: ChangeEvent) => {\n if (isInteractive) {\n e.stopPropagation();\n const selectedChoices = [...initialChoices];\n selectedChoices[e.target.value] = true;\n formik.setFieldValue('selectedChoices', selectedChoices);\n }\n },\n [formik, initialChoices, isInteractive]\n );\n\n const onCheckboxChange = useCallback(\n (e: ChangeEvent) => {\n if (isInteractive) {\n e.stopPropagation();\n formik.handleChange(e);\n }\n },\n [formik, isInteractive]\n );\n\n const onOptionClick = useCallback(\n (e: MouseEvent) => {\n if (isInteractive) {\n e.stopPropagation();\n }\n },\n [isInteractive]\n );\n\n return (\n
    \n \n (\n \n {children}\n \n )}\n >\n \n {options.map((option: PollOption | string, index: number) => (\n \n }\n label={\n \n {typeof option === 'string' ? option : option.content}\n \n }\n />\n ))}\n \n \n\n \n Vote\n \n \n \n );\n};\n\nconst PollResults = ({\n options,\n request_user_votes,\n}: APIPoll & APIPollInfo) => {\n const theme = useTheme();\n\n const maxVotes = options.reduce(\n (max: bigint, option: PollOption) =>\n max < option.votes ? option.votes : max,\n 0n\n );\n\n const hasVotedForTheOption = useCallback(\n (option: PollOption) =>\n request_user_votes.find(\n (votedOptionId: OptionId) => votedOptionId === option.id\n ) !== undefined,\n [request_user_votes]\n );\n\n return (\n \n {options.map((option: PollOption, index: number) => (\n \n \n {option.content}\n {hasVotedForTheOption(option) && (\n \n )}\n \n {option.vote_percentage}%\n \n \n \n \n ))}\n \n );\n};\n\ntype PollProps = ((APIPoll & APIPollInfo) | APIPollRequest) & BasePollProps;\n\nexport const Poll = ({ disabled, ...props }: PollProps) => {\n const { total_vote_counter, poll_end_timestamp } = props as APIPoll;\n\n const theme = useTheme();\n\n const POLL_REFRESH_TIME_SECONDS = 60 as const;\n\n const totalVotes = useMemo(() => total_vote_counter.toString(), [\n total_vote_counter,\n ]);\n\n const userVotes = useMemo(\n () => ('request_user_votes' in props && props.request_user_votes) || [],\n [props]\n );\n\n const hasAlreadyVoted = useMemo(() => userVotes.length > 0, [\n userVotes.length,\n ]);\n\n const voteEndDate = useMemo(() => dayjs(Number(poll_end_timestamp)), [\n poll_end_timestamp,\n ]);\n\n const calculateTimeLeftToVote = useCallback(\n (millisecondsLeftToVote: number) => dayjs.duration(millisecondsLeftToVote),\n []\n );\n\n const [timeLeftToVote, setTimeLeftToVote] = useState(\n calculateTimeLeftToVote(voteEndDate.diff(dayjs()))\n );\n\n const updateTimeLeftToVote = useCallback(() => {\n const millisecondsLeftToVote = voteEndDate.diff(dayjs());\n setTimeLeftToVote(calculateTimeLeftToVote(millisecondsLeftToVote));\n }, [calculateTimeLeftToVote, voteEndDate]);\n\n useEffect(() => {\n const handle = setInterval(\n updateTimeLeftToVote,\n POLL_REFRESH_TIME_SECONDS * 1000\n );\n return () => clearInterval(handle);\n }, [updateTimeLeftToVote]);\n\n const isVotingEnded = timeLeftToVote.asMilliseconds() <= 0;\n\n const timeLeftToVoteHumanized = useMemo(() => {\n if (isVotingEnded) {\n return 'Final Results';\n } else {\n return (humanizeTimeToVote(timeLeftToVote) || '1 minute') + ' left';\n }\n }, [isVotingEnded, timeLeftToVote]);\n\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));\n\n const [pollExpiredDialogOpen, setPollExpiredDialogOpen] = useState(false);\n\n const onVotingError = useCallback((error: any) => {\n if (error?.message === 'PollExpired') {\n setPollExpiredDialogOpen(true);\n }\n }, []);\n\n return (\n \n {hasAlreadyVoted || isVotingEnded ? (\n \n ) : (\n \n )}\n\n \n {totalVotes} vote{totalVotes !== '1' ? 's' : ''}\n {!isSmallScreen || isVotingEnded ? ' • ' :
    }\n {timeLeftToVoteHumanized}\n \n\n {pollExpiredDialogOpen && (\n setPollExpiredDialogOpen(false)}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"Poll has ended\"\n message=\"Sorry, time's up for voting to this Poll. Gotta be faster next time!\"\n ctaText=\"Ok\"\n cancelColor=\"primary\"\n onSubmit={() => setPollExpiredDialogOpen(false)}\n onlySubmit\n />\n )}\n \n );\n};\n","import React, { useMemo } from 'react';\nimport { Typography } from '@mui/material';\n\nimport * as Styled from './styles';\nimport { ISharedPostResource } from '../SharedPost/SharedPost';\nimport { PostImageLoader } from 'components/ImageLoader';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport { ExtensionInfo, Post } from 'client';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\nimport { ValueOf } from 'types';\nimport { commentStyles } from '../Comment/styles';\nimport { isPoll, toIcOpt } from 'utils';\nimport { Poll } from 'components/Poll';\n\ninterface IPostContentProps {\n post?: never;\n quotedResource: ISharedPostResource;\n resourceType?: ValueOf;\n commentPreview?: boolean;\n previewPost?: boolean;\n extension_info: ExtensionInfo;\n}\n\ninterface IQuotedResourceContentProps {\n post: Post;\n quotedResource?: never;\n resourceType?: ValueOf;\n commentPreview?: boolean;\n previewPost?: boolean;\n extension_info: ExtensionInfo;\n}\n\nfunction PostContent({\n post,\n quotedResource,\n resourceType,\n commentPreview,\n previewPost,\n extension_info,\n}: IPostContentProps | IQuotedResourceContentProps) {\n const isQuotedResource = !!quotedResource;\n const data = quotedResource || post;\n const classes = commentStyles();\n\n const isPostPoll = useMemo(() => isPoll(toIcOpt(data.extension)), [\n data.extension,\n ]);\n\n const requestUserVotes = useMemo(\n () =>\n (extension_info &&\n 'Poll' in extension_info &&\n extension_info?.Poll?.request_user_votes) ||\n [],\n [extension_info]\n );\n\n return (\n \n {data.text.trim() && (\n \n \n
    \n \n
    \n
    \n
    \n )}\n {data.image.image_id !== '' && (\n \n \n \n )}\n {data.nft_image_url !== '' && (\n \n \n \n )}\n {isPostPoll && (\n \n )}\n
    \n );\n}\n\nexport default PostContent;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n contentContainer: {\n marginTop: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n flex: '1 1 auto',\n overflow: 'auto',\n },\n contentSidedesk: {\n width: '40px',\n flex: '0 0 auto',\n justifyContent: 'center',\n alignItems: 'center',\n },\n verticalDivider: {\n width: '2px',\n backgroundColor: theme.palette.colors.ui_04,\n height: '100%',\n margin: 'auto',\n },\n}));\n","import { Box, Divider } from '@mui/material';\nimport React from 'react';\nimport { useStyles } from './styles';\n\ninterface IPostContentVerticalConnectProps {\n enableLeftSideVerticalConnection?: boolean;\n children?: React.ReactNode;\n}\n\nfunction PostContentVerticalConnect({\n enableLeftSideVerticalConnection,\n children,\n}: IPostContentVerticalConnectProps) {\n const classes = useStyles();\n\n return (\n \n \n {enableLeftSideVerticalConnection ? (\n \n ) : null}\n \n \n {children}\n \n \n );\n}\n\nexport default PostContentVerticalConnect;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n noPadding: {},\n verticalDeviderEnabled: {},\n withoutMarginTop: {\n marginTop: theme.spacing(-2),\n },\n card: {\n backgroundColor: theme.palette.colors.ui_01,\n marginBottom: 0,\n padding: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n cursor: 'pointer',\n\n [theme.breakpoints.only('xs')]: {\n padding: theme.spacing(2),\n },\n\n '&$noPadding': {\n padding: 0,\n overflow: 'unset',\n },\n\n '&$verticalDeviderEnabled': {\n // TODO enable when we design team decides on hover colos\n // '&:hover': {\n // backgroundColor: theme.palette.colors.ui_02,\n // borderRadius: theme.spacing(0),\n // },\n // TODO test for mobile web when background color on hover is set\n // '-webkit-tap-highlight-color': 'transparent',\n\n marginLeft: theme.spacing(-4),\n marginRight: theme.spacing(-4),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n\n '&:first-child': {\n marginTop: theme.spacing(-2),\n paddingTop: theme.spacing(2),\n\n '& $contentSidedesk2': {\n display: 'none',\n },\n },\n\n '&:last-child': {\n '& $contentSidedesk $verticalDivider': {\n display: 'none',\n },\n },\n },\n },\n pinned: {\n backgroundColor: theme.palette.colors.ui_02,\n },\n contentContainer: {\n marginTop: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n flex: '1 1 auto',\n overflow: 'auto',\n },\n contentSidedesk2: {\n height: '16px',\n width: '40px',\n flex: '0 0 auto',\n justifyContent: 'center',\n alignItems: 'center',\n },\n contentSidedesk: {\n width: '40px',\n flex: '0 0 auto',\n justifyContent: 'center',\n alignItems: 'center',\n },\n verticalDivider: {\n width: '2px',\n backgroundColor: theme.palette.colors.ui_04,\n height: '100%',\n margin: 'auto',\n },\n}));\n","import React from 'react';\n\nimport ExtendedUserCard from 'components/Cards/ExtendedUserCard';\nimport FollowButton from 'components/Buttons/FollowButton';\nimport MoreButton, { IMoreButtonItem } from 'components/Buttons/MoreButton';\nimport { Post, Profile } from 'client';\nimport { Box, Divider, Typography } from '@mui/material';\nimport { useStyles } from '../SinglePost/styles';\nimport { useTheme } from '@mui/material';\n\ninterface IPostHeaderProps {\n threadMasterId?: bigint;\n author: Profile;\n post: Post;\n date: string;\n buttonItems?: Array;\n isMyPost?: boolean;\n enableActions?: boolean;\n enableLeftSideVerticalConnection?: boolean;\n previewPost?: boolean;\n commentedPostUsername?: string;\n singlePost?: boolean;\n sharedPost?: boolean;\n isPinned?: boolean;\n}\n\nfunction PostHeader({\n threadMasterId,\n author,\n date,\n post,\n buttonItems,\n isMyPost,\n enableActions,\n enableLeftSideVerticalConnection,\n previewPost,\n commentedPostUsername,\n singlePost,\n sharedPost,\n isPinned = false,\n}: IPostHeaderProps) {\n const theme = useTheme();\n const classes = useStyles();\n\n const postUrl = !threadMasterId\n ? `/post/${post.post_id}`\n : `/thread/${threadMasterId}/post/${post.post_id}`;\n\n return (\n <>\n {enableLeftSideVerticalConnection ? (\n \n \n \n ) : null}\n\n \n {isPinned && (\n \n Pinned\n \n )}\n\n {!isMyPost && !previewPost ? (\n \n ) : null}\n\n {!previewPost && }\n \n }\n singlePost={singlePost}\n sharedPost={sharedPost}\n threadPreview={!!threadMasterId}\n />\n \n );\n}\n\nexport default PostHeader;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n buttonText: {\n paddingLeft: theme.spacing(0.5),\n paddingRight: theme.spacing(0.5),\n },\n iconButton: {\n padding: theme.spacing(1),\n },\n reshareIcon: {\n height: 16,\n width: 16,\n color: `${theme.palette.colors.danger} !important`,\n },\n icon: {\n height: 16,\n width: 16,\n },\n linkText: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n}));\n","import React, { useMemo } from 'react';\n\nimport { useInfiniteQuery, useQueryClient } from 'react-query';\nimport { extractApiDataOrThrow, flattenInfiniteData } from 'utils';\nimport api, { Profile } from '../../../client';\nimport { LIKED_USERS_INITIAL_ITEMS_LIMIT } from '../../../constants/user';\nimport UserListComponent from './UserListComponent';\n\ninterface Props {\n close: any;\n resourceId: bigint;\n}\n\nconst UserListResharesModal = ({ close, resourceId }: Props) => {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const fetchUsersReshare = React.useCallback(\n async ({ pageParam = 0 }) => {\n const res = await api.getPaginatedUsersWhoResharedPost(\n resourceId,\n authUser?.id,\n BigInt(pageParam),\n BigInt(LIKED_USERS_INITIAL_ITEMS_LIMIT)\n );\n const reshareData = extractApiDataOrThrow(res);\n return reshareData;\n },\n [resourceId]\n );\n\n const {\n data: pagedUsersReshare,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n isLoading,\n } = useInfiniteQuery(\n ['getPaginatedUsersWhoResharedPost', resourceId],\n fetchUsersReshare,\n {\n getNextPageParam: (lastPage, pages) =>\n pages.length * LIKED_USERS_INITIAL_ITEMS_LIMIT,\n }\n );\n\n const users = useMemo(() => flattenInfiniteData(pagedUsersReshare), [\n pagedUsersReshare,\n ]);\n\n return (\n \n );\n};\n\nexport default UserListResharesModal;\n","import React, { useCallback, useContext } from 'react';\nimport { IconButton, Link, Typography } from '@mui/material';\nimport WarningModal from 'components/Dialogs/Warning';\nimport { useStyles } from './styles';\nimport { useState } from 'react';\nimport { RefreshIcon } from 'components/icons';\nimport UserListResharesModal from 'components/Dialogs/UserListModal/UserListReshares';\nimport { OpenDistriktContext } from 'providers';\n\ninterface ReshareProps {\n resource_id: bigint;\n reshareCounter?: number;\n setPostModal: (value: boolean) => void;\n}\n\nconst ReshareResource = ({\n resource_id,\n reshareCounter,\n setPostModal,\n}: ReshareProps) => {\n const classes = useStyles();\n const [resharedModal, setResharedModal] = useState(false);\n const [warningModal, setWarningModal] = useState(false);\n\n const { handleAction: openDistriktAction } = useContext(OpenDistriktContext);\n\n const toggleReshareModal = useCallback(() => {\n setResharedModal((value) => !value);\n }, []);\n\n const resharePost = useCallback(() => {\n setPostModal(true);\n }, [setPostModal]);\n\n return (\n <>\n openDistriktAction(resharePost)}\n className={classes.iconButton}\n size=\"large\"\n >\n \n \n \n openDistriktAction(toggleReshareModal)}\n color=\"inherit\"\n className={classes.linkText}\n >\n {reshareCounter}\n \n \n {resharedModal && (\n openDistriktAction(toggleReshareModal)}\n resourceId={resource_id}\n />\n )}\n {\n setWarningModal(false);\n }}\n content={'Something went wrong. Please try again.'}\n />\n \n );\n};\n\nexport default ReshareResource;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useToolbarStyles = makeStyles((theme) => ({\n content: {\n fontSize: theme.typography.pxToRem(14),\n color: theme.palette.text.primary,\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n '& a': {\n color: theme.palette.primary.main,\n textDecoration: 'none',\n },\n },\n buttonContainer: {\n display: 'flex',\n alignItems: 'center',\n marginRight: theme.spacing(3),\n width: theme.spacing(7),\n [theme.breakpoints.down('md')]: {\n width: theme.spacing(3),\n },\n },\n buttonText: {\n color: theme.palette.text.primary,\n paddingLeft: theme.spacing(0.5),\n paddingRight: theme.spacing(0.5),\n },\n card: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: theme.spacing(8),\n paddingRight: theme.spacing(5),\n },\n actions: {\n paddingTop: theme.spacing(1),\n paddingLeft: theme.spacing(0),\n paddingBottom: 0,\n marginLeft: '-8px',\n display: 'inline-flex',\n },\n tooltipStyle: {\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(12),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2.5),\n paddingRight: theme.spacing(2.5),\n },\n tooltipArrow: {\n color: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n },\n tooltipIcon: {\n height: 12,\n width: 12,\n },\n tooltipText: {\n fontSize: theme.typography.pxToRem(12),\n marginLeft: theme.spacing(1.5),\n },\n icon: {\n height: 16,\n width: 16,\n },\n centeredContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n iconButton: {\n padding: theme.spacing(1),\n },\n goToPostButton: {\n fontWeight: 400,\n color: theme.palette.colors.ui_07,\n },\n}));\n","import React from 'react';\nimport { useQuery, useQueryClient } from 'react-query';\nimport { Link as RouterLink, useHistory } from 'react-router-dom';\nimport {\n Typography,\n Box,\n CardActions,\n IconButton,\n Button,\n} from '@mui/material';\n\nimport CopyButton from 'components/Buttons/CopyButton';\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\nimport LikeResource from '../../Like/Like';\nimport ReportResource from 'components/Report/ReportResource';\nimport ReshareResource from '../../Reshare/Reshare';\nimport WarningModal from 'components/Dialogs/Warning';\nimport api, { OptimizedPostV2, Post, Profile } from 'client';\nimport { Alert, Dialog } from 'components';\nimport { FEATURES } from 'constants/reportCategories';\nimport { MessagesDoubleIcon } from 'components/icons';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\nimport { ValueOf } from 'types';\nimport { formattedDate } from 'utils/formatDate';\nimport { fromIcOpt, toIcVariant } from 'utils';\nimport { useRemoveItem } from 'pages/post/services';\nimport { useToolbarStyles } from './styles';\n\ninterface IBaseProps {\n threadMasterId?: bigint;\n openInputModal: boolean;\n setInputModal: React.Dispatch>;\n deleteModal: boolean;\n setDeleteModal: React.Dispatch>;\n resourceType?: ValueOf;\n onPostDelete?: (id: bigint) => void;\n commentPreview?: boolean;\n commentPreviewPostId?: bigint;\n}\n\ninterface IPostToolbarProps extends IBaseProps {\n post: Post;\n author: Profile;\n postItem?: never;\n}\n\ninterface IPostItemToolbarProps extends IBaseProps {\n postItem: OptimizedPostV2;\n author?: Profile;\n post?: never;\n}\n\nfunction PostToolbar({\n threadMasterId,\n post: postData,\n author: authorData,\n postItem,\n openInputModal,\n setInputModal,\n deleteModal,\n setDeleteModal,\n resourceType,\n onPostDelete,\n commentPreview,\n commentPreviewPostId,\n}: IPostToolbarProps | IPostItemToolbarProps) {\n const classes = useToolbarStyles();\n const history = useHistory();\n const [errorMessage, setErrorMessage] = React.useState('');\n const [postModal, setPostModal] = React.useState(false);\n const [warningModal, setWarningModal] = React.useState(false);\n const [processing, setProcessing] = React.useState(false);\n\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const isTrusted: boolean =\n queryClient.getQueryData(['isUserTrusted', authUser?.id]) || false;\n const removeItemMutate = useRemoveItem();\n\n const post = postItem ? postItem.post : postData;\n const author = fromIcOpt(postItem?.author_profile) || authorData;\n const commentCounterExists =\n postItem && typeof postItem.comment_counter !== 'undefined';\n const date = formattedDate(post.timestamp);\n\n const { data: commentCountData } = useQuery(\n ['getCommentCount', post.post_id],\n async () => api.getCommentCount(post.post_id),\n {\n enabled: !commentCounterExists,\n }\n );\n const commentCount = commentCounterExists\n ? postItem.comment_counter\n : commentCountData;\n\n async function handleDeletePost() {\n setProcessing(true);\n\n await removeItemMutate.mutateAsync(\n { postId: post.post_id, threadMasterId },\n {\n onSuccess: (_, { postId }) => {\n setProcessing(false);\n setDeleteModal(false);\n onPostDelete && onPostDelete(postId);\n },\n onError: () => {\n setProcessing(false);\n setWarningModal(true);\n },\n }\n );\n }\n\n const postUrl = !threadMasterId\n ? `/post/${post.post_id}`\n : `/thread/${threadMasterId}/post/${post.post_id}`;\n\n return (\n <>\n \n \n \n \n {!commentPreview && (\n <>\n \n {history.location.pathname.includes('/post/') ? (\n \n \n \n ) : (\n \n \n \n )}\n \n {commentCount && commentCount.toString()}\n \n \n\n \n \n \n\n
    \n \n
    \n \n )}\n {commentPreviewPostId && (\n \n history.push(\n !!threadMasterId\n ? `/thread/${threadMasterId}/post/${commentPreviewPostId}`\n : `/post/${commentPreviewPostId}`\n )\n }\n className={classes.goToPostButton}\n >\n Go to Post\n \n )}\n
    \n\n \n\n {deleteModal && (\n setDeleteModal(false)}\n onSubmit={handleDeletePost}\n ctaText={!isTrusted ? `Delete` : `Yes, delete`}\n message={\n !isTrusted\n ? `Sure you want to delete your ${\n commentPreview ? 'comment' : 'post'\n }? You won't be able to get it back once it's gone.`\n : `Are you sure you want to delete this ${\n commentPreview ? 'comment' : 'post'\n }?\n Remember that once you perform this action, you cannot undo it and the ${\n commentPreview ? 'comment' : 'post'\n } will be deleted forever.`\n }\n title={\n !isTrusted\n ? `Delete ${commentPreview ? 'comment' : 'post'}`\n : `Are you sure?`\n }\n disabled={removeItemMutate.isLoading}\n cancelColor=\"primary\"\n warning\n loading={processing}\n />\n )}\n\n {postModal && (\n setPostModal(false)}\n author={author}\n date={date}\n quotedResource={\n threadMasterId\n ? toIcVariant('ThreadPost', {\n id: post.post_id,\n master_id: threadMasterId,\n post: post,\n })\n : toIcVariant('Post', post)\n }\n />\n )}\n\n {setWarningModal && (\n {\n setWarningModal(false);\n }}\n content={'Please try again later'}\n />\n )}\n\n {errorMessage ? (\n setErrorMessage('')}\n content={errorMessage}\n />\n ) : null}\n \n );\n}\n\nexport default PostToolbar;\n","import { styled } from '@mui/material/styles';\nimport { Box, Button as MuiButton } from '@mui/material';\n\nexport const Toolbar = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'flex-start',\n marginTop: theme.spacing(1),\n}));\n\nexport const ThreadIconContainer = styled(Box)({\n display: 'flex',\n justifyContent: 'center',\n width: '40px',\n alignItems: 'center',\n});\n\nexport const Button = styled(MuiButton)({\n marginTop: '-12px',\n marginBottom: '-4px',\n padding: '12px 16px',\n});\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\n\nimport { ThreadIcon } from 'components/icons';\nimport * as Styled from './styles';\n\ninterface IFullThreadButtonProps {\n url: string;\n text?: string;\n}\n\nfunction FullThreadButton({\n url,\n text = 'View Full Thread',\n}: IFullThreadButtonProps) {\n const history = useHistory();\n\n return (\n \n \n \n \n history.push(url)}>\n {text}\n \n \n );\n}\n\nexport default FullThreadButton;\n","import React from 'react';\n\nimport { SharedPost } from 'pages/post/components';\nimport { Post, Profile } from 'client';\n\ninterface ISharedThreadProps {\n author: Profile;\n date: string;\n quotedResource: Post;\n threadMasterId: bigint;\n clickable?: boolean;\n}\n\nfunction SharedThreadPost({\n author,\n date,\n quotedResource,\n threadMasterId,\n clickable = false,\n}: ISharedThreadProps) {\n return (\n <>\n \n \n );\n}\n\nexport default SharedThreadPost;\n","import { Box } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\nexport const Container = styled(Box)(({ theme }) => ({\n padding: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('xs')]: {\n padding: theme.spacing(2),\n },\n}));\n","import React, { Fragment } from 'react';\nimport { Alert } from 'components';\nimport { OptimizedThread } from 'client';\nimport * as Styled from './styles';\nimport SinglePost from 'pages/post/components/SinglePost/SinglePost';\nimport { useHistory } from 'react-router-dom';\n\ninterface IThreadProps {\n thread: OptimizedThread;\n error?: unknown;\n loading?: boolean;\n}\n\n// Thread is used only for the full thread page\n// A separated component was used, because in the future could have additional functionality\n// like scrolling to specific thread post, hovering/clicking on the thread post etc\nfunction Thread({ error, loading, thread }: IThreadProps) {\n const history = useHistory();\n const [successPostDelete, setSuccessPostDelete] = React.useState(false);\n\n function handlePostDelete(postId: bigint) {\n setSuccessPostDelete(true);\n if (thread.posts.length <= 2) {\n const lastPost = thread.posts.find((post) => post.id !== postId);\n if (lastPost) {\n history.push(`/post/${lastPost.post.post.post_id}`);\n }\n }\n }\n\n return (\n \n {thread.posts.map((threadPost, index) => (\n \n \n \n ))}\n {successPostDelete && (\n setSuccessPostDelete(false)}\n />\n )}\n \n );\n}\n\nexport default Thread;\n","import { Box } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\ninterface IContainerProps {\n disabledSpacing?: boolean;\n}\n\nexport const Container = styled(Box)(\n ({ theme, disabledSpacing }) => ({\n padding: disabledSpacing ? 0 : theme.spacing(4),\n paddingBottom: disabledSpacing ? 0 : theme.spacing(2),\n\n [theme.breakpoints.only('xs')]: {\n padding: disabledSpacing ? 0 : theme.spacing(2),\n },\n })\n);\n","import React from 'react';\n\nimport * as Styled from './styles';\nimport FullThreadButton from '../FullThreadButton';\nimport SinglePost from 'pages/post/components/SinglePost/SinglePost';\nimport { OptimizedThreadPost as IThreadPost } from 'client';\n\ninterface IThreadPreviewProps {\n threadPost: IThreadPost;\n error?: unknown;\n loading?: boolean;\n showSingleThreadPost?: boolean;\n onPostDelete?: () => void;\n disabledSpacing?: boolean;\n previewPost?: boolean;\n isPinned?: boolean;\n}\n\nfunction ThreadPost({\n error,\n loading,\n threadPost,\n onPostDelete,\n disabledSpacing,\n previewPost,\n isPinned = false,\n}: IThreadPreviewProps): JSX.Element {\n return (\n \n \n\n \n \n );\n}\n\nexport default ThreadPost;\n","import { Box } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\nexport const Container = styled(Box)(({ theme }) => ({\n padding: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('xs')]: {\n padding: theme.spacing(2),\n },\n}));\n","import React, { Fragment } from 'react';\n\nimport * as Styled from './styles';\nimport FullThreadButton from '../FullThreadButton';\nimport SinglePost from 'pages/post/components/SinglePost/SinglePost';\nimport { ThreadPreview as IThreadPreview } from 'client';\n\ninterface IThreadPreviewProps {\n thread: IThreadPreview;\n error?: unknown;\n loading?: boolean;\n showSingleThreadPost?: boolean;\n onPostDelete?: () => void;\n isPinned?: boolean;\n}\n\n// Thread Preview is used for feed thread posts and Post page\nfunction ThreadPreview({\n error,\n loading,\n thread,\n showSingleThreadPost,\n onPostDelete,\n isPinned = false,\n}: IThreadPreviewProps): JSX.Element {\n const hasMoreThreadPosts = showSingleThreadPost || thread.len > 2;\n\n return (\n \n {thread.preview\n .slice(0, showSingleThreadPost ? 1 : 2)\n .map((post, index) => (\n \n \n \n ))}\n\n {hasMoreThreadPosts ? (\n \n ) : null}\n \n );\n}\n\nexport default ThreadPreview;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n quotedContainer: {\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: theme.spacing(1),\n padding: theme.spacing(2),\n },\n}));\n","import React from 'react';\nimport { Theme } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { LinkMetadata } from 'client';\nimport { IconButton, SvgIcon, useMediaQuery } from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\nimport { Remove, ArrowRight, WarningIcon } from 'components/icons';\nimport Loading from 'components/Loading';\n\nconst useStyles = makeStyles((theme: Theme) => ({\n href: {\n textDecoration: 'none',\n },\n root: {\n backgroundColor: ({ isPinned }) =>\n isPinned ? theme.palette.colors.ui_02 : theme.palette.colors.ui_01,\n border: ({ preview }) =>\n preview ? 'none' : `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: ({ preview }) => theme.spacing(preview ? 0 : 1),\n paddingLeft: ({ preview }) => theme.spacing(preview ? 0 : 2),\n paddingRight: ({ preview }) => theme.spacing(preview ? 0 : 2),\n paddingTop: ({ preview }) => (preview ? 0 : 12),\n paddingBottom: ({ preview }) => (preview ? 0 : 14),\n marginTop: ({ preview }) => theme.spacing(preview ? 2 : 1),\n overflow: 'hidden',\n fontSize: '14px',\n position: 'relative',\n height: ({ preview }) => (preview ? 'auto' : 80),\n width: ({ hasImage, preview }) =>\n hasImage ? 'auto' : 'calc(100% - 105px)',\n [theme.breakpoints.down('sm')]: {\n height: 'auto !important',\n width: 'auto !important',\n },\n },\n leftAside: {\n width: ({ hasImage, preview }) =>\n hasImage ? `calc(100% - ${preview ? 128 : 89}px)` : '100%',\n paddingRight: ({ hasImage }) => (hasImage ? theme.spacing(1.5) : 0),\n [theme.breakpoints.down('sm')]: {\n paddingRight: '0 !important',\n width: '100% !important',\n },\n },\n topWrapper: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n wrapper: {\n display: 'flex',\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n },\n },\n titleWrapper: {\n display: 'flex',\n alignItems: 'center',\n maxWidth: ({ preview }) => `calc(100% - ${preview ? 0 : 70}px)`,\n },\n logo: {\n width: theme.spacing(2),\n height: theme.spacing(2),\n marginRight: theme.spacing(1),\n [theme.breakpoints.down('sm')]: {\n marginTop: 3,\n },\n },\n authorWrapper: {\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n },\n author: {\n position: 'relative',\n paddingLeft: 20,\n color: theme.palette.colors.ui_06,\n '&:after': {\n display: 'block',\n content: '\" \"',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 10,\n width: 1,\n backgroundColor: theme.palette.colors.ui_04,\n },\n [theme.breakpoints.down('sm')]: {\n paddingLeft: ({ preview }) => (!preview ? 0 : 20),\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n display: ({ preview }) => (preview ? 'inline' : 'block'),\n '&:after': {\n display: ({ preview }) => (preview ? 'block' : 'none'),\n },\n },\n },\n icons: {\n flexShrink: 0,\n },\n iconButton: {\n '& svg': {\n width: 12,\n height: 12,\n },\n },\n iconButtonNext: {\n marginRight: theme.spacing(1),\n },\n title: {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n display: '-webkit-box',\n WebkitLineClamp: 1,\n WebkitBoxOrient: 'vertical',\n color: theme.palette.colors.primary,\n fontWeight: 600,\n paddingTop: ({ preview }) => theme.spacing(preview ? 1 : 0.5),\n [theme.breakpoints.down('sm')]: {\n WebkitLineClamp: 2,\n },\n },\n publisher: {\n fontWeight: 600,\n color: theme.palette.colors.ui_07,\n [theme.breakpoints.down('sm')]: {\n width: '100%',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n },\n },\n content: {\n color: theme.palette.colors.ui_06,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n marginTop: theme.spacing(0.5),\n [theme.breakpoints.down('sm')]: {\n WebkitLineClamp: 3,\n },\n },\n image: {\n width: ({ preview }) => (preview ? 128 : 105),\n height: ({ preview }) => (preview ? 96 : 80),\n marginTop: ({ preview }) => (preview ? 0 : -12),\n marginRight: ({ preview }) => theme.spacing(preview ? 0 : -2),\n marginBottom: ({ preview }) => (preview ? 0 : -14),\n objectFit: 'cover',\n borderRadius: ({ preview }) => theme.spacing(preview ? 1 : 0),\n [theme.breakpoints.down('sm')]: {\n marginTop: '12px !important',\n width: 'auto !important',\n height: '168px !important',\n marginLeft: ({ preview }) => theme.spacing(preview ? 0 : -2),\n },\n },\n loaderWrapper: {\n padding: '0 !important',\n },\n iconsLoader: {\n position: 'absolute',\n top: theme.spacing(1.5),\n right: theme.spacing(2),\n },\n error: {\n color: theme.palette.colors.ui_06,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n },\n}));\n\ninterface LinkPreviewProps {\n data: {\n status: string;\n loading: boolean;\n data: LinkMetadata | null;\n };\n hasNext?: boolean;\n onNextClick?: () => void;\n onCloseClick?: () => void;\n preview?: boolean;\n disabled?: boolean;\n isPinned?: boolean;\n}\n\nconst LinkPreview = ({\n data,\n hasNext,\n onNextClick,\n onCloseClick,\n preview,\n disabled,\n isPinned,\n}: LinkPreviewProps) => {\n const theme = useTheme();\n const mobileSize = useMediaQuery(() => theme.breakpoints.only('xs'));\n const [failedImage, setFailedImage] = React.useState(false);\n const [failedIco, setFailedIco] = React.useState(false);\n const classes = useStyles({\n hasImage: !!data.data?.image_url[0] && !failedImage,\n preview,\n isPinned,\n });\n return (\n \n \n {(data.loading ||\n !data.data ||\n (!data.loading && data.status !== 'success')) && (\n <>\n {data.loading && }\n {!data.loading && (data.status !== 'success' || !data.data) && (\n
    \n \n Link preview not available\n
    \n )}\n {onCloseClick && (\n
    \n {hasNext && (\n {\n event.stopPropagation();\n event.preventDefault();\n onNextClick();\n }}\n className={clsx(classes.iconButton, classes.iconButtonNext)}\n disabled={disabled}\n >\n \n \n )}\n {\n event.stopPropagation();\n event.preventDefault();\n onCloseClick();\n }}\n className={classes.iconButton}\n disabled={disabled}\n >\n \n \n
    \n )}\n \n )}\n {!data.loading && data.status === 'success' && data.data && (\n
    \n
    \n
    \n
    \n {!failedIco && data.data.logo_url && (\n setFailedIco(true)}\n />\n )}\n \n {data.data.publisher && (\n \n )}\n {data.data.author &&\n ((!preview && !mobileSize) || preview) && (\n \n )}\n \n
    \n {onCloseClick && (\n
    \n {hasNext && (\n {\n event.stopPropagation();\n event.preventDefault();\n onNextClick();\n }}\n className={clsx(\n classes.iconButton,\n classes.iconButtonNext\n )}\n disabled={disabled}\n >\n \n \n )}\n {\n event.stopPropagation();\n event.preventDefault();\n onCloseClick();\n }}\n className={classes.iconButton}\n disabled={disabled}\n >\n \n \n
    \n )}\n
    \n {data.data.author && !preview && mobileSize && (\n \n )}\n {data.data.title && (\n \n )}\n {preview && data.data.content && (\n \n )}\n
    \n {!failedImage && data.data.image_url[0] && (\n setFailedImage(true)}\n />\n )}\n
    \n )}\n \n \n );\n};\n\nexport default LinkPreview;\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { Box } from '@mui/material';\n\nimport PostContent from '../PostContent';\nimport PostContentVerticalConnect from '../PostContentVerticalConnect';\nimport PostHeader from '../PostHeader';\nimport { FullThreadButton } from 'pages/thread/components';\nimport { Post, Profile } from 'client';\nimport { useStyles } from './styles';\nimport { stopPropagationOnEventTags } from 'utils';\nimport LinkPreview from 'components/Compose/LinkPreview';\n\ninterface IProps {\n author: Profile;\n date: string;\n quotedResource: Post;\n clickable?: boolean;\n threadMasterId?: bigint;\n isPinned?: boolean;\n}\n\nconst SharedPost = ({\n quotedResource,\n threadMasterId,\n clickable = false,\n author,\n date,\n isPinned,\n}: IProps) => {\n const classes = useStyles();\n const history = useHistory();\n const postRef = React.useRef();\n\n return (\n {\n if (clickable) {\n e.stopPropagation();\n\n !!threadMasterId\n ? history.push(\n `/thread/${threadMasterId}/post/${quotedResource.post_id}`\n )\n : history.push(`/post/${quotedResource.post_id}`);\n }\n }}\n style={{\n cursor: clickable ? 'pointer' : 'auto',\n }}\n >\n {\n // used to stop event propagation to the container since the whole card is clickable\n clickable && stopPropagationOnEventTags(e, postRef);\n }}\n >\n \n\n \n \n {quotedResource.link_metadata &&\n quotedResource.link_metadata[0] &&\n quotedResource.link_metadata[0][0] && (\n \n )}\n \n\n {threadMasterId ? (\n \n ) : null}\n \n \n );\n};\n\nexport default SharedPost;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n container: {\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n\n [theme.breakpoints.only('xs')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n },\n bullet: {\n color: theme.palette.colors.ui_06,\n },\n card: {\n padding: 0,\n backgroundColor: theme.palette.colors.ui_01,\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n title: {\n marginBottom: theme.spacing(4),\n marginTop: theme.spacing(2),\n },\n content: {\n '& h5': {\n fontSize: theme.typography.pxToRem(14),\n marginBottom: 0,\n },\n '& i': {\n display: 'flex',\n justifyContent: 'center',\n opacity: 0.6,\n fontSize: theme.typography.pxToRem(12),\n },\n '& img': {\n maxWidth: 336,\n display: 'flex',\n marginLeft: 'auto',\n marginRight: 'auto',\n marginTop: theme.spacing(4),\n marginBottom: theme.spacing(4),\n },\n },\n infoContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n paddingTop: theme.spacing(1),\n paddingBottom: `${theme.spacing(1)} !important`,\n paddingLeft: theme.spacing(0.5),\n paddingRight: theme.spacing(0.5),\n width: 250,\n float: 'right',\n },\n actionsContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n relatedContainer: {\n paddingBottom: `${theme.spacing(2)} !important`,\n },\n backdrop: {\n zIndex: 1001,\n },\n subheader: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: 0,\n },\n author: {\n display: 'block',\n textDecoration: 'none',\n color: theme.palette.colors.ui_07,\n\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n infoText: {\n color: theme.palette.colors.ui_06,\n },\n userInfoContainer: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n userContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n userInfo: {\n marginLeft: theme.spacing(2),\n },\n centeredContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n tooltipStyle: {\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(12),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2.5),\n paddingRight: theme.spacing(2.5),\n },\n tooltipArrow: {\n color: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n },\n tooltipIcon: {\n height: 12,\n width: 12,\n },\n tooltipText: {\n fontSize: theme.typography.pxToRem(12),\n marginLeft: theme.spacing(1.5),\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n}));\n","import { Box, Typography } from '@mui/material';\nimport { Link } from 'react-router-dom';\nimport FollowButton from 'components/Buttons/FollowButton';\nimport UserAvatar from 'components/UserAvatar/UserAvatar';\nimport { renderUserBadge } from 'utils/moderationShortcuts';\nimport { useStyles } from '../styles';\nimport React from 'react';\nimport { Article } from 'types/actorInterface';\nimport { Profile } from 'client';\n\ninterface Props {\n article: Article;\n author: Profile;\n date: any;\n}\n\nexport const UserInfo = ({ article, author, date }: Props) => {\n const classes = useStyles();\n\n return (\n
    \n
    \n \n
    \n \n \n {author.display_name}\n \n {renderUserBadge(author, { className: classes.teamBadge })}\n \n \n {date}\n \n \n {'\\u00a0\\u00a0'}•{'\\u00a0\\u00a0'}\n \n \n {`${article.time_to_read}min read`}\n \n
    \n
    \n \n
    \n );\n};\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport regexifyString from 'regexify-string';\nimport reactStringReplace from 'react-string-replace';\nimport ImageLoader from '../components/ImageLoader';\n\nexport const parseImagesFromArticleText = (text, smallImage = false) => {\n let matched = text;\n\n matched = reactStringReplace(\n matched,\n /(]+>(?:<\\/img>)?)/g,\n (match) => {\n let test = match.match(/(alt|title|src)=\"([^\"]*)\"/i);\n if (!test) {\n test = match.match(/(alt|title|src)='([^']*)'/i);\n if (!test) {\n return match;\n }\n }\n\n const index = test.findIndex((attr) => attr === 'src');\n if (index === -1) {\n return match;\n }\n\n const src = test[index + 1];\n if (!src) {\n return match;\n }\n\n const params = src.match(\n /(.*)\\/ic-img\\/([a-zA-Z0-9-]+)\\/([a-zA-Z0-9-]+)+/\n );\n if (!params) {\n return match;\n }\n\n const image = {\n canister_id: params[2],\n image_id: params[3],\n format: 'png',\n };\n\n return (\n \n {({ src }) => (\n \n )}\n \n );\n }\n );\n\n const getLink = (match) => {\n let test = match.match(/href=\"([^\"]*)\"/i);\n if (!test) {\n test = match.match(/href='([^']*)'/i);\n }\n\n const href = test[1];\n const text = match.split('>')[1];\n\n return (\n \n {text}\n \n );\n };\n\n matched = reactStringReplace(matched, /<\\/?strong[^>]*>/g, (match) => {\n return {match.replace('&', '&')};\n });\n\n matched = reactStringReplace(matched, /<\\/?p[^>]*>/g, (match) => {\n return (\n

    \n {reactStringReplace(match, //g, (matchLink) => {\n const link = getLink(matchLink);\n return link;\n })}\n

    \n );\n });\n\n matched = reactStringReplace(matched, /<\\/?span[^>]*>/g, (match) => {\n return {match};\n });\n\n matched = reactStringReplace(matched, /<\\/?li[^>]*>/g, (match) => {\n return
  • {match}
  • ;\n });\n\n matched = reactStringReplace(matched, /<\\/?ul[^>]*>/g, (match) => {\n return
      {match}
    ;\n });\n\n matched = reactStringReplace(matched, /<\\/?h5[^>]*>/g, (match) => {\n return
    {match}
    ;\n });\n\n matched = reactStringReplace(matched, /<\\/?h4[^>]*>/g, (match) => {\n return

    {match}

    ;\n });\n\n matched = reactStringReplace(matched, /<\\/?i[^>]*>/g, (match) => {\n return {match};\n });\n\n //matched = reactStringReplace(matched, /\\n/g, () =>
    );\n\n return matched;\n};\n\nexport const parseRichText = (text) => {\n let index = 0;\n return regexifyString({\n pattern: /([@#])([a-z\\d_]+)(?=\\s|$)/gim,\n // eslint-disable-next-line react/display-name\n decorator: (match) => {\n if (match[0] === '@') {\n return (\n \n {match}\n \n );\n } else if (match[0] === '#') {\n return (\n \n {match}\n \n );\n }\n return null;\n },\n input: text,\n });\n};\n\nexport const extractRichText = (text) => {\n const tags = [];\n const mentions = [];\n\n const regex = /([@#])([a-z\\d_]+)(?=\\s|$)/gim;\n const matches = text.match(regex);\n\n if (Array.isArray(matches)) {\n matches.forEach((match) => {\n if (match[0] === '@') {\n mentions.push(match.substr(1));\n } else if (match[0] === '#') {\n tags.push(match.substr(1));\n }\n });\n }\n\n return { tags, mentions };\n};\n","import React, { useContext } from 'react';\nimport dayjs from 'dayjs';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport { useHistory } from 'react-router-dom';\nimport { useQuery } from 'react-query';\nimport {\n Box,\n Card,\n CardContent,\n CardHeader,\n Divider,\n IconButton,\n Typography,\n} from '@mui/material';\nimport { OpenDistriktContext } from 'providers';\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\nimport LikeResource from 'pages/post/components/Like/Like';\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport WarningModal from 'components/Dialogs/Warning';\nimport getExternalUrl from 'utils/getExternalUrl';\nimport { Alert, Loading } from 'components';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { RefreshIcon, ShareIcon } from 'components/icons';\nimport { UserInfo } from './components/UserInfo';\nimport { formattedDate } from 'utils/formatDate';\nimport { mainApi } from 'client';\nimport { parseImagesFromArticleText } from 'utils/parseRichText';\nimport { useStyles } from './styles';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\n\ninterface Props {\n articleId: bigint;\n}\n\nconst Article = ({ articleId }: Props) => {\n const {\n data: articleObject = {},\n isFetching,\n } = useQuery('getArticleWithUserData', () =>\n mainApi.getArticleWithUserData(articleId)\n );\n const { handleAction: openDistriktAction } = useContext(OpenDistriktContext);\n const classes = useStyles();\n const [postModal, setPostModal] = React.useState(false);\n const [toggleCopied, setToggleCopied] = React.useState(false);\n const [warningModal, setWarningModal] = React.useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n\n React.useEffect(() => {\n window.scrollTo(0, 0);\n }, []);\n\n if (isFetching) {\n return (\n \n \n \n );\n }\n\n const article = articleObject.article;\n const author = articleObject.user;\n const date = formattedDate(article.updated_at);\n const sharedArticle = {\n ...article,\n };\n\n dayjs.extend(relativeTime);\n\n return (\n <>\n \n \n \n \n \n {article.title}\n \n }\n subheader={\n \n }\n />\n \n \n {parseImagesFromArticleText(\n article.content,\n article.title === 'Meet the team'\n )}\n \n \n \n \n \n \n \n \n \n \n openDistriktAction(() => setPostModal(true))}\n size=\"large\"\n >\n \n \n \n {\n navigator.clipboard.writeText(\n getExternalUrl(`/article/${article.article_id}`)\n );\n setToggleCopied(true);\n }}\n size=\"large\"\n >\n \n \n \n \n \n \n
    \n \n
    \n
    \n \n {postModal && (\n setPostModal(false)}\n author={author}\n date={date}\n quotedResource={{ Article: article }}\n />\n )}\n {\n setWarningModal(false);\n setErrorMessage('');\n }}\n content={errorMessage}\n />\n\n {toggleCopied && (\n setToggleCopied(false)}\n />\n )}\n
    \n \n );\n};\n\nexport default Article;\n","export default {\n error: (...msg) => console.error(...msg),\n debug: (...msg) => console.debug(...msg),\n info: (...msg) => console.info(...msg),\n};\n","import React from 'react';\nimport Error from '../../../components/Error';\nimport logger from '../../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass ArticleErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default ArticleErrorBoundary;\n","import React from 'react';\nimport { useRouteMatch } from 'react-router-dom';\nimport Article from './Article';\nimport { Box } from '@mui/material';\nimport Loading from '../../../components/Loading/Loading';\nimport ArticleErrorBoundary from './ArticleErrorBoundary';\n\ninterface RouteParams {\n id: string;\n}\n\nconst SingleArticleContainer = () => {\n const {\n params: { id },\n } = useRouteMatch();\n\n React.useLayoutEffect(() => {\n window.scrollTo(0, 0);\n }, []);\n\n return (\n \n \n \n \n }\n >\n
    \n \n \n );\n};\n\nexport default SingleArticleContainer;\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport {\n EditorState,\n RichUtils,\n getDefaultKeyBinding,\n DraftHandleValue,\n} from 'draft-js';\nimport Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport { convertToHTML } from 'draft-convert';\nimport createInlineToolbarPlugin from '@draft-js-plugins/inline-toolbar';\nimport 'draft-js/dist/Draft.css';\nimport '@draft-js-plugins/inline-toolbar/lib/plugin.css';\nimport {\n Box,\n Paper,\n Button,\n IconButton,\n Menu,\n MenuItem,\n TextField,\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport {\n TextFields as TextFieldsIcon,\n List as ListIcon,\n AlternateEmail as AlternateEmailIcon,\n PanoramaOutlined as PanoramaOutlinedIcon,\n CodeOutlined as CodeOutlinedIcon,\n FormatListNumbered as FormatListNumberedIcon,\n} from '@mui/icons-material';\nimport PopupState, { bindTrigger, bindMenu } from 'material-ui-popup-state';\nimport api from '../../../client';\n\ninterface StyledButtonProps {\n style: string;\n onToggle: (style: string) => void;\n label: string;\n active?: boolean;\n}\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n boxSizing: 'border-box',\n cursor: 'text',\n minHeight: 700,\n '& :global(.public-DraftEditor-content)': {\n minHeight: 700,\n },\n },\n styledButton: {\n minWidth: 'unset',\n padding: 0,\n fontSize: theme.typography.pxToRem(12),\n },\n inlineStyleControls: {\n display: 'flex',\n justifyContent: 'space-between',\n width: '50%',\n },\n blockStyleControls: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n header: {\n paddingTop: theme.spacing(3),\n paddingRight: theme.spacing(2),\n paddingBottom: theme.spacing(3),\n paddingLeft: theme.spacing(2),\n },\n title: {\n marginBottom: theme.spacing(3),\n },\n mainContainer: {\n display: 'flex',\n position: 'relative',\n },\n sideControls: {\n flex: '55px 0 0',\n position: 'sticky',\n top: 200,\n marginTop: theme.spacing(12.5),\n left: 0,\n width: 55,\n backgroundColor: '#EBEBEB',\n height: 300,\n zIndex: 1,\n borderTopRightRadius: 20,\n borderBottomRightRadius: 20,\n },\n addContainer: {\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(2),\n marginLeft: theme.spacing(1.5),\n },\n addButton: {\n padding: 0,\n minWidth: 'unset',\n },\n editorContainer: {\n flex: 'auto',\n marginTop: theme.spacing(2),\n marginLeft: theme.spacing(1),\n },\n}));\n\nconst StyledButton = (props: StyledButtonProps): React.ReactElement => {\n const classes = useStyles();\n const onToggle = React.useCallback(\n (e) => {\n e.preventDefault();\n props.onToggle(props.style);\n },\n [props]\n );\n\n return (\n \n {props.label}\n \n );\n};\n\nconst INLINE_STYLES = [\n { label: 'Bold', style: 'BOLD' },\n { label: 'Italic', style: 'ITALIC' },\n { label: 'Underline', style: 'UNDERLINE' },\n { label: 'Monospace', style: 'CODE' },\n];\n\nconst InlineStyleControls = (props: any) => {\n const classes = useStyles();\n const currentStyle = props.editorState.getCurrentInlineStyle();\n\n return (\n
    \n {INLINE_STYLES.map((type) => (\n \n ))}\n
    \n );\n};\n\nconst BLOCK_TYPES = [\n { label: 'H1', style: 'header-one' },\n { label: 'H2', style: 'header-two' },\n { label: 'H3', style: 'header-three' },\n { label: 'H4', style: 'header-four' },\n { label: 'H5', style: 'header-five' },\n { label: 'H6', style: 'header-six' },\n { label: 'Blockquote', style: 'blockquote' },\n { label: 'UL', style: 'unordered-list-item' },\n { label: 'OL', style: 'ordered-list-item' },\n { label: 'Code Block', style: 'code-block' },\n];\n\ninterface BlockStyleControlsProps {\n editorState: EditorState;\n onToggle: (style: string) => void;\n}\n\nconst BlockStyleControls = ({\n editorState,\n onToggle,\n}: BlockStyleControlsProps) => {\n const classes = useStyles();\n const selection = editorState.getSelection();\n const blockType = editorState\n .getCurrentContent()\n .getBlockForKey(selection.getStartKey())\n .getType();\n\n return (\n
    \n {BLOCK_TYPES.map((type) => (\n \n ))}\n
    \n );\n};\n\nconst ArticleCreate = () => {\n const classes = useStyles();\n const history = useHistory();\n\n const [title, setTitle] = React.useState('');\n const editor = React.useRef(null);\n const [editorState, setEditorState] = React.useState(() =>\n createEditorStateWithText('')\n );\n\n const toggleBlockType = React.useCallback(\n (blockType) => {\n setEditorState(RichUtils.toggleBlockType(editorState, blockType));\n },\n [editorState]\n );\n\n const toggleInlineStyle = React.useCallback(\n (inlineStyle) => {\n setEditorState(RichUtils.toggleInlineStyle(editorState, inlineStyle));\n },\n [editorState]\n );\n\n const handleKeyCommand = React.useCallback(\n (command, editorState): DraftHandleValue => {\n const newState = RichUtils.handleKeyCommand(editorState, command);\n if (newState) {\n setEditorState(newState);\n return true;\n }\n return false;\n },\n []\n );\n\n const mapKeyToEditorCommand = React.useCallback(\n (e) => {\n if (e.keyCode === 9 /* TAB */) {\n const newEditorState = RichUtils.onTab(\n e,\n editorState,\n 4 /* maxDepth */\n );\n if (newEditorState !== editorState) {\n setEditorState(newEditorState);\n }\n return;\n }\n return getDefaultKeyBinding(e);\n },\n [editorState]\n );\n\n // There is a problem with useMemo :(\n const [[plugins, InlineToolbar]] = React.useState(() => {\n const inlineToolbarPlugin = createInlineToolbarPlugin();\n return [[inlineToolbarPlugin], inlineToolbarPlugin.InlineToolbar];\n });\n\n const handleCreate = React.useCallback(async () => {\n try {\n const article = await api.newArticle({\n title: title,\n content: convertToHTML(editorState.getCurrentContent()),\n hashtags: [],\n time_to_read: 0,\n published: true,\n });\n\n history.push(`/article/${article.article_id.toString()}`);\n } catch (err) {\n console.log(err);\n }\n }, [editorState, title, history]);\n\n return (\n <>\n \n \n Saved as draft\n \n Publish\n \n \n \n \n \n setTitle(event.target.value)}\n fullWidth\n className={classes.title}\n label=\"Title\"\n inputProps={{ style: { fontSize: 14 } }}\n InputLabelProps={{ style: { fontSize: 14 } }}\n />\n \n \n \n \n
    \n
    \n
    \n \n
    \n \n \n \n \n {(popupState) => (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n \n \n \n \n \n \n \n \n \n \n
    \n
    \n editor.current.focus()}\n >\n {\n editor.current = element;\n }}\n />\n \n
    \n
    \n \n
    \n
    \n \n );\n};\n\nexport default ArticleCreate;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n content: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.primary,\n },\n displayName: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.primary,\n paddingRight: theme.spacing(0.6),\n },\n title: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.primary,\n whiteSpace: 'pre-wrap',\n fontWeight: 600,\n },\n contentContainer: {\n padding: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(1),\n },\n },\n quotedContainer: {\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: theme.spacing(1),\n },\n divider: {\n backgroundColor: theme.palette.colors.ui_04,\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginRight: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n}));\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { Typography, Box, Divider } from '@mui/material';\n\nimport { renderUserBadge } from 'utils/moderationShortcuts';\nimport { useStyles } from './styles';\nimport { Article, Profile } from 'client';\n\ninterface Props {\n author: Profile;\n date: string;\n quotedResource: Article;\n clickable?: boolean;\n}\n\nconst SharedArticle = ({\n author,\n date,\n quotedResource,\n clickable = false,\n}: Props) => {\n const classes = useStyles();\n const history = useHistory();\n\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n {\n if (clickable) {\n e.stopPropagation();\n history.push(`/article/${quotedResource.article_id}`);\n }\n }}\n style={{\n cursor: clickable ? 'pointer' : 'auto',\n }}\n >\n
    \n \n \n {quotedResource.title}\n \n \n
    \n \n
    \n \n \n \n {author.display_name}\n \n {renderUserBadge(quotedResource?.author, {\n className: classes.teamBadge,\n })}\n \n @{author.username}\n \n \n \n {date}\n \n \n
    \n \n );\n};\n\nexport default SharedArticle;\n","import React from 'react';\nimport { Switch, Route, useRouteMatch } from 'react-router-dom';\n\nimport Article from './SingleArticle';\nimport ArticleCreate from './ArticleCreate';\n\nexport { default as SharedArticle } from './SharedArticle';\n\nconst ArticleRoutes = () => {\n const { path } = useRouteMatch();\n\n return (\n \n \n \n \n );\n};\n\nexport default ArticleRoutes;\n","import api, {\n ArticleWithUser,\n CommentWithUser,\n MilestoneWithUser,\n PostWithUser,\n ProjectWithUser,\n Profile,\n Report,\n ReportResource,\n} from 'client';\nimport { RESOURCE_TYPE } from './constants';\nimport { ValueOf } from 'types';\nimport { formattedDate, fromIcOpt } from 'utils';\nimport { getMilestoneWithUserDataQueryKey } from 'pages/profile/services';\n\n/*\n * find resource type from quoted resource id\n */\nexport const findResourceType = (\n resourceId: bigint\n): ValueOf => {\n // bitwise operators:\n // right shift operator (>>) shifts the first operand the specified number of bits, modulo 32, to the right. Excess bits shifted off to the right are discarded\n // bitwise AND operator (&) returns a 1 in each bit position for which the corresponding bits of both operands are 1s\n const resourceIdentifier: bigint =\n (BigInt(resourceId) & BigInt(4177920)) >> BigInt(14);\n\n const mapResourceToId = {\n '1': RESOURCE_TYPE.USER,\n '4': RESOURCE_TYPE.PROJECT,\n '5': RESOURCE_TYPE.POST,\n '7': RESOURCE_TYPE.ARTICLE,\n '8': RESOURCE_TYPE.COMMENT,\n '9': RESOURCE_TYPE.MILESTONE,\n };\n\n return mapResourceToId[resourceIdentifier.toString()];\n};\n\nexport const findResourceTypeByProperty = (\n resource: ReportResource\n): ValueOf => {\n if (resource.Post) return RESOURCE_TYPE.POST;\n if (resource.Comment) return RESOURCE_TYPE.COMMENT;\n if (resource.User) return RESOURCE_TYPE.USER;\n if (resource.Milestone) return RESOURCE_TYPE.MILESTONE;\n if (resource.Experience) return RESOURCE_TYPE.PROJECT;\n if (resource.ThreadPost) return RESOURCE_TYPE.THREAD_POST;\n};\n\ntype ResourceValueMap = {\n ARTICLE: ArticleWithUser;\n MILESTONE: MilestoneWithUser;\n POST: PostWithUser;\n PROJECT: ProjectWithUser;\n USER: Profile;\n COMMENT: CommentWithUser;\n};\n\ntype ResourceMap = {\n [R in keyof typeof RESOURCE_TYPE]: ResourceValueMap[R];\n};\n\n/*\n * util used in useQuery to get proper request query key\n * so that the cache of query can be used outside of resources\n */\nexport const getResourceQueryKey = (\n id: bigint,\n resourceType?: ValueOf\n) => {\n const type = resourceType || findResourceType(id);\n\n switch (type) {\n case RESOURCE_TYPE.POST:\n return 'getPostWithUserData';\n case RESOURCE_TYPE.ARTICLE:\n return 'getArticleWithUserData';\n case RESOURCE_TYPE.COMMENT:\n return 'getCommentWithUserData';\n case RESOURCE_TYPE.USER:\n return 'getUserById';\n case RESOURCE_TYPE.MILESTONE:\n return getMilestoneWithUserDataQueryKey;\n case RESOURCE_TYPE.PROJECT:\n return 'getExperienceWithUserData';\n default:\n return 'getResourceById';\n }\n};\n\n/**\n * @deprecated Service is deprecated.\n *\n * Use optimized endpoints for getting quoted resources instead\n */\nexport const getResource = async (\n id: bigint,\n resourceType?: ValueOf\n): Promise]> => {\n const type = resourceType || findResourceType(id);\n\n switch (type) {\n case RESOURCE_TYPE.POST: {\n return await api.getPostWithUserData(id);\n }\n\n case RESOURCE_TYPE.ARTICLE: {\n return await api.getArticleWithUserData(id);\n }\n\n case RESOURCE_TYPE.COMMENT: {\n return await api.getCommentWithUserData(id);\n }\n\n case RESOURCE_TYPE.USER: {\n const res = await api.getUserById(id);\n return fromIcOpt(res);\n }\n\n case RESOURCE_TYPE.MILESTONE: {\n const res = await api.getMilestoneWithUserData(id);\n return fromIcOpt(res) as MilestoneWithUser;\n }\n\n case RESOURCE_TYPE.PROJECT: {\n const res = await api.getExperienceWithUserData(id);\n return fromIcOpt(res) as ProjectWithUser;\n }\n\n default:\n return undefined;\n }\n};\n\nexport const getReportResource = async (\n id: bigint,\n resourceType?: ValueOf\n) => {\n const type = resourceType || findResourceType(id);\n\n const res = await getResource(id);\n\n if (!res) {\n return;\n }\n\n switch (type) {\n case RESOURCE_TYPE.POST: {\n const { post, user } = res as ResourceMap[Uppercase];\n const date = formattedDate(post.timestamp);\n\n return {\n ...post,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.ARTICLE: {\n const { article, user } = res as ResourceMap[Uppercase];\n const date = formattedDate(article.updated_at);\n return {\n ...article,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.COMMENT: {\n const { comment, user } = res as ResourceMap[Uppercase];\n const date = formattedDate(comment.updated_at);\n return {\n ...comment,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.USER: {\n return {\n author: res as ResourceMap[Uppercase],\n date: '',\n };\n }\n\n case RESOURCE_TYPE.MILESTONE: {\n const { milestone, user } = res as ResourceMap[Uppercase];\n return {\n milestone: res,\n author: user,\n text: milestone?.description.text,\n date: '',\n };\n }\n\n case RESOURCE_TYPE.PROJECT: {\n const { experience, user } = res as ResourceMap[Uppercase];\n return {\n project: res,\n author: user,\n text: experience?.description.text,\n date: '',\n };\n }\n\n default:\n return undefined;\n }\n};\n\nexport const getReports = async () => {\n const BASICALLY_INFINITY = BigInt(100000000);\n const res: {\n report: Report;\n user: Profile;\n }[] = await api.getReportsWithUserData(BigInt(0), BASICALLY_INFINITY, true);\n return res;\n};\n\nexport const removeReportInApi = async (\n shouldIKeepResource: boolean, // false to remove, true to leave\n reportId: bigint\n): Promise => {\n api.processReport(reportId, shouldIKeepResource);\n};\n\nexport const getReportCategory = (report: Report) => {\n let status = null;\n const reportCategory = Object.keys(report.category)[0];\n if (reportCategory === 'InappropriateContent')\n status = 'Inappropriate Content';\n else status = reportCategory;\n return status;\n};\n","import { useQuery } from 'react-query';\n\nimport { ValueOf } from 'types';\nimport { RESOURCE_TYPE } from './constants';\nimport {\n findResourceType,\n getReportResource,\n getResource,\n getResourceQueryKey,\n} from './utils';\n\nexport function useGetResource(\n id?: bigint,\n resourceType?: ValueOf\n) {\n const type = resourceType || findResourceType(id);\n const queryKey = getResourceQueryKey(id, type);\n\n return useQuery([queryKey, id], () => getResource(id, type), {\n enabled: !!id && !!type,\n });\n}\n\nexport function useGetReportResource(\n id?: bigint,\n resourceType?: ValueOf,\n disabled?: boolean\n) {\n const type = resourceType || findResourceType(id);\n const queryKey = getResourceQueryKey(id, type);\n\n return useQuery([queryKey, id], () => getReportResource(id, type), {\n enabled: !!id && !!type && !disabled,\n });\n}\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n sharedContainer: {\n marginTop: theme.spacing(2),\n marginRight: theme.spacing(0),\n marginLeft: theme.spacing(0),\n },\n quotedContainer: {\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: theme.spacing(1),\n },\n}));\n","import React, { useMemo } from 'react';\n\nimport SharedPost from '../SharedPost';\nimport { Loading, Alert } from 'components';\nimport { Milestone, SharedProject } from 'pages/profile/components';\nimport { SharedArticle } from 'pages/article';\nimport { Post, Profile, QuotedResource as IQuotedResource } from 'client';\nimport { findResourceType } from 'pages/moderation/reports/utils';\nimport { fromIcEnum } from 'utils';\nimport { useGetReportResource } from 'pages/moderation/reports/services';\nimport { useStyles } from './styles';\nimport { SharedThreadPost } from 'pages/thread/components';\nimport {\n extractAuthorIdFromQuotedResourceData,\n extractTypeFromQuotedResourceData,\n formatQuotedResourceToReport,\n} from 'pages/post/utils/quotedResources';\nimport { useGetUserIdById } from 'services';\n\ninterface Props {\n post: Post;\n quotedResource?: IQuotedResource;\n // TODO currently not in use as BE endpoint is not returning user yet. Will be used in future\n user?: Profile;\n isPinned?: boolean;\n}\n\nconst QuotedResource = ({ post, quotedResource, isPinned }: Props) => {\n const classes = useStyles();\n const [successExperienceDelete, setSuccessExperienceDelete] = React.useState(\n ''\n );\n // used to disable using quotedResource data for milestone/project\n // as they currently <2022-08-30 Tue> do not include collab information\n const enableQuotedResourceDataSource =\n quotedResource &&\n fromIcEnum(quotedResource) !== 'Milestone' &&\n fromIcEnum(quotedResource) !== 'Experience';\n\n const resourceType = enableQuotedResourceDataSource\n ? extractTypeFromQuotedResourceData(quotedResource)\n : findResourceType(post.quoted_resource);\n\n // TODO currently QuotedResource data do not include user information. When it will be added, we can remove this call\n const { data: userData, isLoading: userIsLoading } = useGetUserIdById(\n extractAuthorIdFromQuotedResourceData(quotedResource),\n !enableQuotedResourceDataSource\n );\n\n const { data, isLoading } = useGetReportResource(\n post.quoted_resource,\n resourceType,\n !!enableQuotedResourceDataSource\n );\n\n const resource = enableQuotedResourceDataSource\n ? formatQuotedResourceToReport(quotedResource, resourceType, userData)\n : data;\n\n const extendedQuotedResource = useMemo(\n () => ({\n ...resource,\n extension_info: quotedResource?.extension_info,\n }),\n [quotedResource?.extension_info, resource]\n );\n\n if (!resourceType) {\n return null;\n }\n\n return (\n
    \n {isLoading || userIsLoading ? (\n
    \n \n
    \n ) : (\n <>\n {resource ? (\n <>\n {resourceType === 'post' ? (\n \n ) : null}\n\n {resourceType === 'thread_post' ? (\n \n ) : null}\n\n {resourceType === 'article' ? (\n \n ) : null}\n\n {resourceType === 'project' ? (\n setSuccessExperienceDelete('Project')}\n />\n ) : null}\n\n {resourceType === 'milestone' ? (\n \n setSuccessExperienceDelete('Milestone')\n }\n />\n ) : null}\n \n ) : null}\n {successExperienceDelete !== '' && (\n setSuccessExperienceDelete('')}\n />\n )}\n \n )}\n
    \n );\n};\n\nexport default QuotedResource;\n","import { Profile, QuotedResource, QuotedResourceById } from 'client';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\nimport { ValueOf } from 'types';\nimport { formattedDate, fromIcEnum, toIcVariant } from 'utils';\n\n// extract type from quotedResource data included on OptimizedPost and match RESOURCE_TYPE case\nexport function extractTypeFromQuotedResourceData(\n q: QuotedResource\n): ValueOf {\n // Note: can either use switch & fromIcEnum along with exhaustive check to make sure all cases are handled\n // or use if/else if/else along with in operator to automatically get types. more helpful for future BE changes\n const type = fromIcEnum(q);\n switch (type) {\n case 'Announcement':\n return RESOURCE_TYPE.ANNOUNCEMENT;\n case 'Article':\n return RESOURCE_TYPE.ARTICLE;\n case 'ThreadPost':\n return RESOURCE_TYPE.THREAD_POST;\n case 'Post':\n return RESOURCE_TYPE.POST;\n case 'Comment':\n return RESOURCE_TYPE.COMMENT;\n case 'Milestone':\n return RESOURCE_TYPE.MILESTONE;\n case 'Experience':\n return RESOURCE_TYPE.PROJECT;\n case 'None':\n return RESOURCE_TYPE.NONE;\n default:\n const _exhaustiveCheck: never = type;\n return _exhaustiveCheck;\n }\n}\n\nexport function convertQuotedResourceToQuotedResourceById(\n quotedResource?: QuotedResource\n): QuotedResourceById {\n if (!quotedResource) {\n return toIcVariant('None');\n }\n\n if ('Post' in quotedResource) {\n return toIcVariant('Post', quotedResource.Post.post_id);\n } else if ('ThreadPost' in quotedResource) {\n return toIcVariant('ThreadPost', quotedResource.ThreadPost.post.post_id);\n } else if ('Announcement' in quotedResource) {\n return toIcVariant(\n 'Announcement',\n quotedResource.Announcement.announcement_id\n );\n } else if ('Article' in quotedResource) {\n return toIcVariant('Article', quotedResource.Article.article_id);\n } else if ('Comment' in quotedResource) {\n return toIcVariant('Comment', quotedResource.Comment.comment_id);\n } else if ('Milestone' in quotedResource) {\n return toIcVariant('Milestone', quotedResource.Milestone.id);\n } else if ('Experience' in quotedResource) {\n return toIcVariant('Experience', quotedResource.Experience.id);\n }\n\n return toIcVariant('None');\n}\n\n// extract author id from quotedResource data\n// this util is used temporarilty until BE includes author data in QuotedResource & OptimizedPost\nexport function extractAuthorIdFromQuotedResourceData(\n quotedResource?: QuotedResource\n): bigint {\n if (!quotedResource) {\n return undefined;\n }\n\n // Note: can either use switch & fromIcEnum along with exhaustive check to make sure all cases are handled\n // or use if/else if/else along with in operator to automatically get types. more helpful for future BE changes\n if ('Post' in quotedResource) {\n return quotedResource.Post.user_id;\n } else if ('ThreadPost' in quotedResource) {\n return quotedResource.ThreadPost.post.user_id;\n } else if ('Announcement' in quotedResource) {\n return quotedResource.Announcement.user_id;\n } else if ('Article' in quotedResource) {\n return quotedResource.Article.author;\n } else if ('Comment' in quotedResource) {\n return quotedResource.Comment.author;\n } else if ('Milestone' in quotedResource) {\n return quotedResource.Milestone.user_id;\n } else if ('Experience' in quotedResource) {\n return quotedResource.Experience.user_id;\n }\n}\n\n// TODO this shouldn't need to match the custom \"report\" data type but instead much BE values\n// format quotedResource data coming from OptimizingPost to match the currently used Report format\nexport const formatQuotedResourceToReport = (\n quotedResource: QuotedResource,\n type: ValueOf,\n user?: Profile\n) => {\n // TODO when extractAuthorIdFromQuotedResourceData is removed, this can be removed as well\n if (!user) {\n return undefined;\n }\n\n switch (type) {\n case RESOURCE_TYPE.POST: {\n const post = quotedResource['Post'];\n const date = formattedDate(post.timestamp);\n\n return {\n ...post,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.THREAD_POST: {\n const threadPost = quotedResource['ThreadPost'];\n const date = formattedDate(threadPost.post.timestamp);\n\n return {\n ...threadPost.post,\n threadMasterId: threadPost.master_id,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.ANNOUNCEMENT: {\n const announcement = quotedResource['Announcement'];\n const date = formattedDate(announcement.updated_at);\n\n return {\n ...announcement,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.ARTICLE: {\n const article = quotedResource['Article'];\n const date = formattedDate(article.updated_at);\n\n return {\n ...article,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.COMMENT: {\n const comment = quotedResource['Comment'];\n const date = formattedDate(comment.updated_at);\n return {\n ...comment,\n author: user,\n date: date,\n };\n }\n\n case RESOURCE_TYPE.MILESTONE: {\n const milestone = quotedResource['Milestone'];\n // TODO turn api to send collab & user\n return {\n milestone: { milestone, user, collaborators: [] },\n author: user,\n text: milestone?.description.text,\n date: '',\n };\n }\n\n case RESOURCE_TYPE.PROJECT: {\n const experience = quotedResource['Experience'];\n // TODO turn api to send collab & user\n return {\n project: { experience, user, collaborators: [] },\n author: user,\n text: experience?.description.text,\n date: '',\n };\n }\n\n case RESOURCE_TYPE.USER:\n case RESOURCE_TYPE.NONE:\n return undefined;\n\n default:\n const _exhaustiveCheck: never = type;\n return _exhaustiveCheck;\n }\n};\n","import api, { ApiItemFeed, ItemId, Profile } from 'client';\nimport { useOptimisticMutation } from 'hooks';\nimport {\n extractPostItemKey,\n extractPostItemTimestamp,\n} from 'pages/post/utils/postItem';\nimport { useCallback } from 'react';\nimport { InfiniteData, MutationKey, useQueryClient } from 'react-query';\nimport { extractApiDataOrThrow, QueryKeyWithUpdateMethod } from 'utils';\nimport {\n getPaginatedOptimizedProfileFeedQueryKey,\n getProfilePinnedPostsQueryKey,\n} from './profile';\n\nexport function useGetPinnedPostsIds() {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const pinnedPosts: Array =\n queryClient.getQueryData>([\n getProfilePinnedPostsQueryKey,\n authUser?.id,\n ]) || [];\n\n return pinnedPosts\n .filter((item: ApiItemFeed | null) => !!item)\n .map((item: ApiItemFeed) => extractPostItemKey(item));\n}\n\nexport const pinUnpinPostMutationKey: MutationKey = 'pinUnpinPost';\n\nexport function usePinUnpinPost(postId: ItemId, wasPinned: boolean) {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const getPost = () => {\n const authUser = queryClient.getQueryData(['getSelf']);\n\n if (wasPinned) {\n return queryClient\n .getQueryData>([\n getProfilePinnedPostsQueryKey,\n authUser?.id,\n ])\n .find(\n (item: ApiItemFeed | null) =>\n !!item && extractPostItemKey(item) === postId\n );\n } else {\n const pages =\n queryClient.getQueryData>>([\n getPaginatedOptimizedProfileFeedQueryKey,\n authUser?.id,\n ])?.pages || [];\n\n for (let i = 0; i < pages.length; i++) {\n const post = pages[i].find(\n (item: ApiItemFeed | null) =>\n !!item && extractPostItemKey(item) === postId\n );\n\n if (!!post) {\n return post;\n }\n }\n\n return undefined;\n }\n };\n\n const relatedQueryKeys: Array = [\n {\n queryKey: [getProfilePinnedPostsQueryKey, authUser?.id],\n update: (data: Array, post: ApiItemFeed) => {\n if (!wasPinned) {\n const firstOlderItemIndex = data.findIndex(\n (item: ApiItemFeed | null) =>\n !!item &&\n extractPostItemTimestamp(item) > extractPostItemTimestamp(post)\n );\n if (firstOlderItemIndex >= 0) {\n const dataClone = [...data];\n dataClone.splice(firstOlderItemIndex, 0, post);\n return dataClone;\n } else {\n return data.concat(post);\n }\n } else {\n return data.map((item: ApiItemFeed | null) =>\n !!item && extractPostItemKey(item) === postId ? null : item\n );\n }\n },\n },\n {\n queryKey: [getPaginatedOptimizedProfileFeedQueryKey, authUser?.id],\n update: (\n data: InfiniteData>,\n post: ApiItemFeed\n ) => {\n let pages;\n if (!wasPinned) {\n pages = data.pages.map((page: Array) =>\n page.map((item: ApiItemFeed | null) =>\n !!item && extractPostItemKey(item) === postId ? null : item\n )\n );\n } else {\n pages = [...data.pages];\n\n for (let i = 0; i < pages.length; i++) {\n const pageClone: Array = [...pages[i]];\n\n const firstOlderItemIndex = pageClone.findIndex(\n (item: ApiItemFeed | null) =>\n !!item &&\n extractPostItemTimestamp(item) < extractPostItemTimestamp(post)\n );\n\n if (firstOlderItemIndex >= 0) {\n pageClone.splice(firstOlderItemIndex, 0, post);\n\n if (i === data.pages.length - 1) {\n pageClone.splice(pageClone.length - 1, 1);\n }\n\n pages[i] = pageClone;\n\n break;\n }\n }\n }\n\n return {\n ...data,\n pages,\n };\n },\n },\n ];\n\n const setPinPosts = useCallback(\n async (post: ApiItemFeed) => {\n const pinnedPostsIds = (\n queryClient.getQueryData>([\n getProfilePinnedPostsQueryKey,\n authUser?.id,\n ]) || []\n )\n .filter((item: ApiItemFeed | null) => !!item)\n .map((item: ApiItemFeed) => extractPostItemKey(item));\n\n const isPinned = pinnedPostsIds.includes(extractPostItemKey(post));\n if (wasPinned === isPinned) {\n throw Error(\n 'Pinned posts not optimistically updated. Please check relatedQueryKeys update methods.'\n );\n }\n\n const res = await api.updateProfilePinnedPosts(pinnedPostsIds);\n return extractApiDataOrThrow(res);\n },\n [authUser?.id, wasPinned, queryClient]\n );\n\n const mutation = useOptimisticMutation({\n relatedQueryKeys,\n mutationKey: pinUnpinPostMutationKey,\n mutationFn: setPinPosts,\n });\n\n return {\n ...mutation,\n mutate: () => mutation.mutate(getPost()),\n };\n}\n","import React, { useCallback } from 'react';\nimport clsx from 'clsx';\nimport { useHistory, useLocation, useParams } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport { Card, Box } from '@mui/material';\nimport Error from 'components/Error/Error';\nimport Loading from 'components/Loading';\nimport PostContent from '../PostContent';\nimport PostContentVerticalConnect from '../PostContentVerticalConnect';\nimport PostHeader from '../PostHeader';\nimport PostToolbar from './components/Toolbar';\nimport QuotedResource from '../QuotedResource';\nimport { Alert, Dialog } from 'components';\nimport {\n FlagIcon,\n LockIcon,\n Pin,\n RemoveBinIcon,\n Unpin,\n} from 'components/icons';\nimport { OptimizedPostV2, Post, Profile } from 'client';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\nimport { RouteParams as ProfileRouteParams } from 'pages/profile';\nimport { ValueOf } from 'types';\nimport { formattedDate } from 'utils/formatDate';\nimport { fromIcEnum, fromIcOpt, stopPropagationOnEventTags } from 'utils';\nimport { useBlockUser } from 'pages/post/services';\nimport { useMemo, useState } from 'react';\nimport { useStyles } from './styles';\nimport {\n useGetPinnedPostsIds,\n usePinUnpinPost,\n} from 'pages/profile/services/posts';\nimport LinkPreview from 'components/Compose/LinkPreview';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IBaseProps {\n error: unknown;\n disabledSpacing?: boolean;\n enableLeftSideVerticalConnection?: boolean;\n loading?: boolean;\n resourceType?: ValueOf;\n threadMasterId?: bigint;\n onPostDelete?: () => void;\n children?: React.ReactNode;\n previewPost?: boolean;\n commentPreview?: boolean;\n commentPreviewPostId?: bigint;\n commentedPostUsername?: string;\n isPinned?: boolean;\n}\n\ninterface IPostProps extends IBaseProps {\n post: Post;\n author: Profile;\n postItem?: never;\n}\n\ninterface IPostItemProps extends IBaseProps {\n postItem: OptimizedPostV2;\n // author is passed along only for thread page in which case the thread posts don't include author but instead have a separate author in the thread layer\n author?: Profile;\n post?: never;\n}\n\nconst SinglePost = ({\n threadMasterId,\n enableLeftSideVerticalConnection,\n disabledSpacing,\n post: postData,\n author: authorData,\n loading,\n error,\n postItem,\n resourceType,\n onPostDelete,\n children,\n previewPost,\n commentPreview,\n commentPreviewPostId,\n commentedPostUsername,\n isPinned = false,\n}: IPostProps | IPostItemProps) => {\n const routerLocation = useLocation();\n const classes = useStyles();\n const queryClient = useQueryClient();\n const blockUserMutation = useBlockUser();\n const history = useHistory();\n const authUser = queryClient.getQueryData(['getSelf']);\n const postRef = React.useRef();\n const isTrusted: boolean =\n queryClient.getQueryData(['isUserTrusted', authUser?.id]) || false;\n const [openInputModal, setInputModal] = useState(false);\n const [deleteModal, setDeleteModal] = useState(false);\n const [showBlockUserAlert, setShowBlockUserAlert] = useState(false);\n const [showWarningAlert, setShowWarningAlert] = useState(false);\n const [cantPinModalOpen, setCantPinModalOpen] = useState(false);\n\n const post = postItem ? postItem.post : postData;\n const author = fromIcOpt(postItem?.author_profile) || authorData;\n\n const pinUnpinPostMutation = usePinUnpinPost(post.post_id, isPinned);\n const nbPinnedPosts = useGetPinnedPostsIds().length;\n\n const pinPost = React.useCallback(() => {\n if (nbPinnedPosts >= 3) {\n setCantPinModalOpen(true);\n } else {\n pinUnpinPostMutation.mutate();\n }\n }, [nbPinnedPosts, pinUnpinPostMutation]);\n\n const routeParams = useParams() as Partial;\n\n const { mode, handleAction: openDistriktAction } = React.useContext(\n OpenDistriktContext\n );\n\n const guestView = useMemo(() => mode !== 'User', [mode]);\n\n const blockUser = useCallback(async () => {\n blockUserMutation.mutate(\n {\n userId: post.user_id,\n },\n {\n onSuccess: () => {\n setShowBlockUserAlert(true);\n setTimeout(() => {\n routerLocation.pathname === '/stream'\n ? document.location.reload()\n : (document.location.href = '/');\n }, 4000);\n },\n onError: () => {\n setShowWarningAlert(true);\n },\n }\n );\n }, [blockUserMutation, post.user_id, routerLocation.pathname]);\n\n const buttonItems = useMemo(() => {\n const items = [];\n\n if (!guestView && post.user_id === authUser?.id) {\n if (!!routeParams.username && !threadMasterId) {\n if (isPinned) {\n items.push({\n title: 'Unpin Post',\n handleClick: () => pinUnpinPostMutation.mutate(),\n icon: (\n \n ),\n });\n } else {\n items.push({\n title: 'Pin Post',\n handleClick: pinPost,\n icon: (\n \n ),\n });\n }\n }\n\n const item = {\n title: 'Delete',\n handleClick: () => setDeleteModal(true),\n danger: true,\n icon: ,\n };\n items.push(item);\n } else {\n let deleteOrReportItem;\n if (isTrusted) {\n deleteOrReportItem = {\n title: `Delete this ${commentPreview ? 'comment' : 'post'}`,\n handleClick: () => openDistriktAction(() => setDeleteModal(true)),\n danger: true,\n icon: ,\n };\n } else {\n deleteOrReportItem = {\n title: 'Report',\n handleClick: () => openDistriktAction(() => setInputModal(true)),\n icon: ,\n danger: true,\n };\n }\n\n const blockUserItem = {\n title: 'Block this user',\n icon: ,\n handleClick: () => openDistriktAction(blockUser),\n };\n items.push(deleteOrReportItem, blockUserItem);\n }\n\n return items;\n }, [\n authUser?.id,\n blockUser,\n commentPreview,\n guestView,\n isPinned,\n isTrusted,\n openDistriktAction,\n pinPost,\n pinUnpinPostMutation,\n post.user_id,\n routeParams.username,\n threadMasterId,\n ]);\n\n if (loading) {\n return ;\n }\n\n if (error) {\n setShowWarningAlert(true);\n return ;\n }\n\n const date = formattedDate(post.timestamp);\n\n return (\n <>\n {\n if (previewPost) return;\n const historyUrl = !!threadMasterId\n ? `/thread/${threadMasterId}/post/${\n commentPreviewPostId || post.post_id\n }`\n : `/post/${commentPreviewPostId || post.post_id}`;\n if (history.location.pathname !== historyUrl) {\n history.push(historyUrl);\n }\n }}\n >\n {\n // used to stop event propagation to the container since the whole card is clickable\n stopPropagationOnEventTags(e, postRef);\n }}\n >\n \n\n \n \n\n {!previewPost && fromIcEnum(post.quoted_resource_by_id) !== 'None' && (\n \n \n \n )}\n\n {post.link_metadata &&\n post.link_metadata[0] &&\n post.link_metadata[0][0] && (\n \n )}\n\n {children}\n\n {!previewPost && (\n \n )}\n \n \n \n\n {showBlockUserAlert ? (\n setShowBlockUserAlert(false)}\n />\n ) : null}\n\n {showWarningAlert && (\n {\n setShowWarningAlert(false);\n }}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"That didn't work\"\n message={'Please try again later'}\n ctaText=\"Ok\"\n cancelColor=\"primary\"\n onCancel={() => {\n setShowWarningAlert(false);\n }}\n />\n )}\n\n {cantPinModalOpen && (\n {\n setCantPinModalOpen(false);\n }}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"Pin Posts\"\n message={\n \"You can only pin up to 3 of your posts from your Activity. To pin another, you'll first need to unpin an existing pinned post.\"\n }\n ctaText=\"Ok\"\n cancelColor=\"primary\"\n onCancel={() => {\n setCantPinModalOpen(false);\n }}\n />\n )}\n \n );\n};\n\nexport default SinglePost;\n","import { makeStyles } from '@mui/styles';\n\nexport const styles = makeStyles((theme) => ({\n previewPost: {\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: 8,\n padding: theme.spacing(2),\n marginTop: theme.spacing(2),\n overflow: 'hidden',\n },\n previewPostButtonWrapper: {\n marginTop: theme.spacing(1.5),\n },\n previewPostButton: {\n textDecoration: 'none',\n },\n}));\n","import React, { useState } from 'react';\nimport { CommentPreview as CommentPreviewType } from 'client';\nimport { Link } from '@mui/material';\nimport { useHistory } from 'react-router-dom';\nimport { useLocalStorage } from 'react-use';\nimport SinglePost from '../SinglePost/SinglePost';\nimport { ThreadPost } from 'pages/thread/components';\nimport { styles } from './styles';\n\ninterface CommentPreviewProps {\n commentPreview: CommentPreviewType;\n}\n\nfunction CommentPreview({ commentPreview }: CommentPreviewProps) {\n const classes = styles();\n const history = useHistory();\n const [previewPostLS, setPreviewPostLS] = useLocalStorage(\n 'app.previewPost',\n ''\n );\n const [previewPost, setPreviewPost] = useState(\n previewPostLS ===\n ('Post' in commentPreview?.commented_post\n ? `/post/${commentPreview?.commented_post?.Post?.post?.post_id}`\n : `/thread/${commentPreview?.commented_post?.ThreadPost?.master_id}/post/${commentPreview?.commented_post?.ThreadPost?.post?.post?.post_id}`)\n );\n React.useEffect(() => {\n return history.listen((location) => {\n if (previewPost && location.pathname.includes('/post/')) {\n setPreviewPostLS(location.pathname);\n } else {\n setPreviewPostLS('');\n }\n });\n }, [history, setPreviewPostLS, previewPost]);\n if (!commentPreview?.comment?.post) return null;\n let commentPreviewPostId =\n 'Post' in commentPreview.commented_post\n ? commentPreview.commented_post.Post.post.post_id\n : undefined;\n if ('ThreadPost' in commentPreview.commented_post) {\n commentPreviewPostId =\n commentPreview.commented_post.ThreadPost.post.post.post_id;\n }\n let commentedPostUsername =\n 'Post' in commentPreview.commented_post\n ? commentPreview.commented_post.Post.author_profile[0].username\n : undefined;\n if ('ThreadPost' in commentPreview.commented_post) {\n commentedPostUsername =\n commentPreview.commented_post.ThreadPost.post.author_profile[0].username;\n }\n return (\n \n {previewPost && (\n
    \n {'Post' in commentPreview.commented_post && (\n \n )}\n {'ThreadPost' in commentPreview.commented_post && (\n \n )}\n
    \n )}\n
    \n setPreviewPost(!previewPost)}\n className={classes.previewPostButton}\n >\n {previewPost ? 'Hide post' : 'Preview post'}\n \n
    \n \n );\n}\n\nexport default CommentPreview;\n","import React from 'react';\n\nimport SinglePost from '../SinglePost/SinglePost';\nimport { ApiItemFeed, OptimizedThreadPost } from 'client';\nimport { RESOURCE_TYPE } from 'pages/moderation/reports/constants';\nimport { ThreadPost, ThreadPreview } from 'pages/thread/components';\nimport CommentPreview from '../CommentPreview';\nimport { ValueOf } from 'types';\n\ninterface IPostItemProps {\n postItem: ApiItemFeed | { OptimizedThreadPost: OptimizedThreadPost } | null;\n loading?: boolean;\n error: unknown;\n resourceType?: ValueOf;\n onPostDelete?: () => void;\n disabledSpacing?: boolean;\n isPinned?: boolean;\n}\n\nfunction PostItem({\n postItem,\n loading,\n error,\n resourceType,\n onPostDelete,\n disabledSpacing,\n isPinned = false,\n}: IPostItemProps) {\n if (postItem === null) {\n return null;\n }\n\n if ('ThreadPreview' in postItem) {\n return (\n \n );\n }\n\n if ('OptimizedThreadPost' in postItem) {\n return (\n \n );\n }\n\n if ('OptimizedPost' in postItem) {\n return (\n \n );\n }\n if ('CommentPreview' in postItem) {\n return ;\n }\n return null;\n}\n\nexport default PostItem;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n container: {\n marginLeft: theme.spacing(-4),\n marginRight: theme.spacing(-4),\n width: 'calc(100% + 64px)',\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(-2),\n marginRight: theme.spacing(-2),\n width: 'calc(100% + 32px)',\n },\n },\n centeredContainer: {\n paddingTop: theme.spacing(8),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n [theme.breakpoints.down('sm')]: {\n paddingTop: theme.spacing(0),\n paddingBottom: theme.spacing(8),\n },\n },\n emptyText: {\n color: theme.palette.colors.ui_06,\n },\n placeholderImage: {\n width: 256,\n height: 'auto',\n paddingBottom: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n paddingBottom: theme.spacing(0),\n },\n },\n}));\n","import React, { Fragment, useCallback, useMemo } from 'react';\nimport { useQueryClient, UseQueryResult } from 'react-query';\nimport { useRouteMatch } from 'react-router-dom';\nimport { Box, Divider, Typography } from '@mui/material';\n\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\nimport Loading from 'components/Loading';\nimport { Alert } from 'components';\nimport { PostItem } from 'pages/post/components';\nimport { ApiItemFeed, Profile } from 'client';\nimport { flattenInfiniteData } from 'utils';\nimport {\n useGetPaginatedOptimizedProfileFeed,\n useGetProfilePinnedPosts,\n} from 'pages/profile/services';\nimport { useGetUserIdByUsername } from 'services';\nimport { useStyles } from './styles';\nimport { useTheme } from '@mui/material/styles';\n\ninterface RouteParams {\n username: string;\n}\n\ninterface IActivityTabContentProps {\n children?: React.ReactNode;\n}\n\ninterface FeedProps {\n error: unknown;\n loading: boolean;\n onPostDelete: () => void;\n posts: ApiItemFeed[];\n isPinned?: boolean;\n}\n\nconst Feed = ({\n error,\n isPinned = false,\n loading,\n onPostDelete,\n posts,\n}: FeedProps) => {\n const theme = useTheme();\n return (\n \n {posts.map((item, index) => (\n \n \n\n {index < posts.length - 1 && item && }\n \n ))}\n \n );\n};\n\ninterface PinnedPostsProps {\n onPostDelete: () => void;\n queryResults: UseQueryResult;\n}\n\nconst PinnedPosts = ({ onPostDelete, queryResults }: PinnedPostsProps) => {\n const { data: pinnedPosts, error, isLoading } = queryResults;\n\n return !error && !!pinnedPosts ? (\n \n \n {pinnedPosts.filter((item: ApiItemFeed | null) => !!item).length > 0 && (\n \n )}\n \n ) : null;\n};\n\nfunction ActivityTab({}: IActivityTabContentProps) {\n const classes = useStyles();\n const [successPostDelete, setSuccessPostDelete] = React.useState(false);\n const theme = useTheme();\n const queryClient = useQueryClient();\n const {\n params: { username },\n } = useRouteMatch();\n const authUser = queryClient.getQueryData(['getSelf']);\n const { data: userId } = useGetUserIdByUsername(username);\n\n const {\n data: pagedPostItems,\n error,\n isLoading,\n isFetched,\n isFetching,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n } = useGetPaginatedOptimizedProfileFeed(userId);\n const postItems = useMemo(() => flattenInfiniteData(pagedPostItems), [\n pagedPostItems,\n ]);\n\n const onPostDelete = useCallback(() => {\n setSuccessPostDelete(true);\n }, []);\n\n const pinnedPostsQueryResults = useGetProfilePinnedPosts(userId);\n const {\n data: pinnedPosts,\n isFetched: isPinnedPostsFetched,\n isFetching: isPinnedPostsFetching,\n } = pinnedPostsQueryResults;\n\n return (\n \n {isLoading && (\n \n \n \n )}\n\n \n \n \n\n {isFetched &&\n isPinnedPostsFetched &&\n postItems?.length + pinnedPosts?.length === 0 && (\n
    \n \n \n There's nothing here...\n \n \n {userId === authUser?.id\n ? 'Post, like or comment to see your activity feed fill up.'\n : `${username} has no activity yet!`}\n \n
    \n )}\n\n {!error && (\n <>\n \n\n {hasNextPage && (\n fetchNextPage()}\n isFetching={\n isFetchingNextPage || isFetching || isPinnedPostsFetching\n }\n />\n )}\n \n )}\n\n {successPostDelete && (\n setSuccessPostDelete(false)}\n />\n )}\n
    \n );\n}\n\nexport default ActivityTab;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n name: {\n fontSize: 14,\n fontWeight: 'bold',\n textDecoration: 'none',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n listItemAvatar: {\n minWidth: 40,\n marginRight: theme.spacing(2),\n },\n userWrapper: {\n display: 'contents',\n },\n unblocking: {\n ...theme.typography.body,\n fontWeight: 600,\n display: 'flex',\n alignItems: 'center',\n marginLeft: theme.spacing(1),\n },\n button: {\n marginLeft: theme.spacing(1),\n },\n}));\n","import React, { useState } from 'react';\nimport {\n Box,\n Button,\n ListItemAvatar,\n ListItemText,\n Typography,\n} from '@mui/material';\n\nimport { Alert } from 'components';\nimport { Dialog, UserAvatar, Loading } from 'components';\nimport { renderUserBadge } from 'utils/moderationShortcuts';\nimport { useStyles } from './styles';\nimport { useBlockUser, useUnblockUser } from 'services';\nimport { Profile } from 'client';\n\ninterface IBlockUserProps {\n user: Profile;\n disabled?: boolean;\n setUnblockedUsers?: any;\n handleUnblockAlert?: any;\n processing?: boolean;\n setUnblockingUserId: (id: bigint) => void;\n unblockingUserId: bigint;\n}\n\nfunction BlockedUser({\n user,\n disabled = false,\n setUnblockedUsers,\n handleUnblockAlert,\n processing = false,\n setUnblockingUserId,\n unblockingUserId,\n}: IBlockUserProps) {\n const classes = useStyles();\n const blockUserMutate = useBlockUser();\n const unblockUserMutate = useUnblockUser();\n\n const [isBlocked, setIsBlocked] = useState(true);\n const [confirmationModal, setConfirmationModal] = useState(false);\n const blockedUnblockedState = isBlocked ? 'Unblock' : 'Block';\n\n return (\n <>\n \n \n \n \n \n {user.display_name}\n {renderUserBadge(user, { className: classes.teamBadge })}\n \n }\n secondary={`@${user.username}`}\n primaryTypographyProps={{\n noWrap: true,\n }}\n secondaryTypographyProps={{\n noWrap: true,\n color: 'textPrimary',\n style: {\n opacity: 0.65,\n },\n }}\n />\n \n
    \n {unblockingUserId === user.id ? (\n
    \n Unblocking...\n
    \n ) : (\n {\n setConfirmationModal(true);\n }}\n color=\"primary\"\n variant=\"outlined\"\n style={{\n minWidth: 117,\n }}\n disabled={processing}\n >\n {blockedUnblockedState}\n \n )}\n
    \n {confirmationModal && (\n setConfirmationModal(false)}\n onSubmit={async () => {\n setUnblockingUserId(user.id);\n setIsBlocked(!isBlocked);\n setConfirmationModal(false);\n if (isBlocked) {\n await unblockUserMutate.mutateAsync({ id: user.id });\n handleUnblockAlert(user);\n setUnblockedUsers(user.id);\n setUnblockingUserId(null);\n } else {\n await blockUserMutate.mutateAsync({ id: user.id });\n setUnblockedUsers(user.id);\n setUnblockingUserId(null);\n }\n }}\n />\n )}\n \n );\n}\n\nexport default BlockedUser;\n","import { GetMsg, PostMsg } from 'client';\n\nexport function postMessageToGetMessage(message: PostMsg): GetMsg {\n const timestamp = BigInt(new Date().getTime());\n\n return {\n id: `temp_${timestamp}`,\n ...message,\n status: { UnRead: null },\n timestamp,\n };\n}\n","import { ApiErrorKind } from 'client';\nimport { AllKeys } from 'types';\n\nexport function errorMessage(errorKind: AllKeys): string | null {\n switch (errorKind) {\n case 'ProfileNotFoundInCanister':\n return 'Ooops, I can’t find that person. Please try again!';\n\n case 'InterCanisterCallFailed':\n return 'Try again later';\n\n case 'MissingRoom':\n return 'Conversation can’t be found';\n\n case 'UserNotAParticipantToThisRoom':\n return 'Conversation can’t be found';\n\n case 'MissingRoomForUsers':\n return 'Conversation can’t be found';\n\n case 'UserNotFound':\n return 'Ooops, I can’t find that person. Please try again!';\n\n default:\n return null;\n }\n}\n","import { ApiErrorKind, RoomId, UserId } from 'client';\nimport { QueryClient } from 'react-query';\nimport { AllKeys } from 'types';\nimport { errorMessage } from '../utils';\n\nexport function errorHandler(\n errorKind: AllKeys,\n queryClient: QueryClient,\n queryProps: {\n userId?: UserId;\n authUserId?: UserId;\n roomId?: RoomId;\n } = {},\n skipOnErrorDisplay?: boolean,\n resetError?: () => void\n) {\n // skip if error message exists & if skipOnErrorDisplay is enabled\n // error handler is used both in extractApiDataOrThrow handler & in error alert's on close\n // we usually skip on extractApiDataOrThrow and handle it on error alert's on close\n if (skipOnErrorDisplay && errorMessage(errorKind)) {\n return;\n }\n\n // TODO in case getPaginatedRoomCardLitesFromUserId has one of these errors, an infinite loops occurs\n if (queryClient) {\n switch (errorKind) {\n case 'MissingRoom':\n case 'UserNotAParticipantToThisRoom':\n case 'MissingRoomForUsers':\n case 'ForbiddenAnonymousCaller':\n case 'RoomAlreadyExists':\n case 'UserHasNoRoom':\n queryClient.invalidateQueries([\n 'getPaginatedRoomCardLitesFromUserId',\n queryProps.authUserId,\n ]);\n break;\n\n default:\n break;\n }\n }\n\n if (resetError instanceof Function) {\n resetError();\n }\n}\n","import { QueryClient } from 'react-query';\n\nimport {\n FollowerProfileLite,\n GetMsg,\n MsgId,\n RoomCardLite,\n RoomId,\n UserId,\n} from 'client';\nimport { fromIcOpt } from 'utils';\n\nexport function updateRoomCardLastMsgStatus(\n queryClient: QueryClient,\n queryProps: {\n authUserId: UserId;\n roomId: RoomId;\n messageId: MsgId;\n }\n) {\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', queryProps.authUserId],\n (prev: Array) => {\n const roomIndex = prev.findIndex(\n (r) => r.room_header.id === queryProps.roomId\n );\n\n if (\n roomIndex === -1 ||\n fromIcOpt(prev[roomIndex].last_msg)?.id !== queryProps.messageId\n ) {\n return prev;\n }\n\n return [\n ...prev.slice(0, roomIndex),\n {\n ...prev[roomIndex],\n last_msg: [\n { ...prev[roomIndex].last_msg[0], status: { Read: null } },\n ],\n },\n ...prev.slice(roomIndex + 1),\n ];\n }\n );\n}\n\nexport function updateAllRoomCardLastMsgStatus(\n queryClient: QueryClient,\n queryProps: {\n userId: UserId;\n }\n) {\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', queryProps.userId],\n (prev: Array) => {\n return prev.map((r) => ({\n ...r,\n last_msg: r.last_msg.map((m) => ({\n ...m,\n status: { Read: null },\n })),\n }));\n }\n );\n}\n\nexport function unshiftTempRoomCardLite(\n queryClient: QueryClient,\n queryProps: {\n authUserId: UserId;\n userId: UserId;\n message: GetMsg;\n followerUser: FollowerProfileLite;\n }\n) {\n const { authUserId, userId, message, followerUser } = queryProps;\n const { is_followed, ...followerUserBaseData } = followerUser;\n\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', authUserId],\n (prev: Array) => {\n return [\n {\n other_user_profile: {\n ...followerUserBaseData,\n is_following: is_followed,\n },\n room_header: {\n id: 'temp',\n participants: [userId, authUserId],\n statuses: [{ Read: null }, { Read: null }],\n msgs_len: 0,\n blocked_by: [],\n },\n last_msg: [message],\n },\n ...prev,\n ];\n }\n );\n}\n\nexport function unshiftRoomAndRemoveRoomCardByUserId(\n queryClient: QueryClient,\n queryProps: {\n authUserId: UserId;\n userId: UserId;\n room: RoomCardLite;\n }\n) {\n const { authUserId, userId, room } = queryProps;\n\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', authUserId],\n (prev: Array) => {\n return [\n room,\n ...prev.filter((r) => !r.room_header.participants.includes(userId)),\n ];\n }\n );\n}\n\nexport function updateLastMsgInRoomCard(\n queryClient: QueryClient,\n queryProps: {\n roomId: RoomId;\n message: GetMsg;\n }\n) {\n const { message, roomId } = queryProps;\n\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', message.user_id],\n (prev: Array) => {\n const roomIndex = prev.findIndex((r) => r.room_header.id === roomId);\n\n if (roomIndex === -1) {\n return prev;\n }\n\n return [\n {\n ...prev[roomIndex],\n last_msg: [message],\n },\n ...prev.slice(0, roomIndex),\n ...prev.slice(roomIndex + 1),\n ];\n }\n );\n}\n\nexport function updateLastMsgInRoomCardByUserId(\n queryClient: QueryClient,\n queryProps: {\n userId: UserId;\n message: GetMsg;\n }\n) {\n const { message, userId } = queryProps;\n\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', message.user_id],\n (prev: Array) => {\n const roomIndex = prev.findIndex((r) =>\n r.room_header.participants.includes(userId)\n );\n\n if (roomIndex === -1) {\n return prev;\n }\n\n return [\n ...prev.slice(0, roomIndex),\n {\n ...prev[roomIndex],\n last_msg: [message],\n },\n ...prev.slice(roomIndex + 1),\n ];\n }\n );\n}\n","import { InfiniteData, QueryClient } from 'react-query';\n\nimport { GetMsg, UserId } from 'client';\nimport { replaceItemInInifiteData, unshiftItemToInifiteData } from 'utils';\nimport { MESSAGE_PAGE_SIZE } from '../constants';\n\nexport function unshiftPostMessage(\n queryClient: QueryClient,\n queryProps: {\n authUserId: UserId;\n userId: UserId;\n message: GetMsg;\n }\n) {\n const { authUserId, userId, message } = queryProps;\n\n queryClient.setQueryData(\n ['getPaginatedMsgsInRoomForUserIds', userId, authUserId],\n (prev: InfiniteData>) => {\n return unshiftItemToInifiteData(prev, message, MESSAGE_PAGE_SIZE, true);\n }\n );\n}\n\nexport function unshiftNewMessage(\n queryClient: QueryClient,\n queryProps: {\n authUserId: UserId;\n userId: UserId;\n message: GetMsg;\n disableCreatingNewPage: boolean;\n }\n) {\n const { authUserId, userId, message, disableCreatingNewPage } = queryProps;\n\n queryClient.setQueryData(\n ['getPaginatedMsgsInRoomForUserIds', userId, authUserId],\n () => {\n return unshiftItemToInifiteData(\n undefined,\n message,\n MESSAGE_PAGE_SIZE,\n disableCreatingNewPage\n );\n }\n );\n}\n\nexport function replaceMsgByToken(\n queryClient: QueryClient,\n queryProps: {\n authUserId: UserId;\n userId: UserId;\n message: GetMsg;\n }\n) {\n const { authUserId, userId, message } = queryProps;\n\n queryClient.setQueryData(\n ['getPaginatedMsgsInRoomForUserIds', userId, authUserId],\n (prev: InfiniteData>) => {\n return replaceItemInInifiteData(prev, message, 'token', 'id');\n }\n );\n}\n\nexport function refetchMsgList(\n queryClient: QueryClient,\n queryProps: {\n authUserId: UserId;\n userId: UserId;\n firstPageOnly?: boolean;\n }\n) {\n const { authUserId, userId, firstPageOnly } = queryProps;\n\n queryClient.invalidateQueries(\n ['getPaginatedMsgsInRoomForUserIds', userId, authUserId],\n {\n refetchPage: firstPageOnly ? (_, index) => index === 0 : undefined,\n }\n );\n}\n","import { QueryClient } from 'react-query';\n\nimport { RoomCardLite, UserId } from 'client';\nimport { fromIcEnum, fromIcOpt } from 'utils';\n\nexport function updateUnreadRoomCounter(\n queryClient: QueryClient,\n queryProps: {\n userId: UserId;\n }\n) {\n const { userId } = queryProps;\n\n const rooms = queryClient.getQueryData>([\n 'getPaginatedRoomCardLitesFromUserId',\n userId,\n ]);\n\n queryClient.setQueryData(['getUnReadMsgCounterForUserId', userId], () => {\n return rooms.filter((r) => {\n const lastMsg = fromIcOpt(r.last_msg);\n if (lastMsg && lastMsg.user_id !== userId) {\n return fromIcEnum(lastMsg.status) === 'UnRead';\n }\n\n return false;\n }).length;\n });\n}\n","import { useState } from 'react';\nimport { useQuery, useMutation, useQueryClient } from 'react-query';\nimport { useIdleTimer } from 'react-idle-timer';\n\nimport {\n FollowerProfileLite,\n messagingApi,\n MsgId,\n PostMsg,\n RoomCardLite,\n RoomId,\n UserId,\n} from 'client';\nimport { extractApiDataOrThrow, fromIcOpt } from 'utils';\nimport {\n unshiftRoomAndRemoveRoomCardByUserId,\n unshiftTempRoomCardLite,\n updateAllRoomCardLastMsgStatus,\n updateRoomCardLastMsgStatus,\n updateUnreadRoomCounter,\n} from '../effects';\nimport { unshiftNewMessage, unshiftPostMessage } from '../effects/messages';\nimport { postMessageToGetMessage } from '../utils';\n\nexport function useGetRoomsByUserId(userId: bigint) {\n const queryClient = useQueryClient();\n const [isIdle, setIsIdle] = useState(false);\n\n useIdleTimer({\n timeout: 1000 * 60 * 5, // 5 minute\n onIdle: () => setIsIdle(true),\n onActive: () => setIsIdle(false),\n });\n\n return useQuery, Error>(\n ['getPaginatedRoomCardLitesFromUserId', userId],\n async () => {\n const res = await messagingApi.getPaginatedRoomCardLitesFromUserId(\n userId,\n 0n,\n 9999n\n );\n\n return extractApiDataOrThrow(res);\n },\n {\n initialData: [],\n enabled: !!userId,\n refetchOnWindowFocus: true,\n refetchInterval: !isIdle\n ? 1 * 30 * 1000 // 30sec\n : 1 * 60 * 1000, // 60sec\n onSuccess: () => {\n // set unread msg counter\n updateUnreadRoomCounter(queryClient, {\n userId,\n });\n },\n }\n );\n}\n\nexport interface ICreateRoomWithMessageArgs {\n userId: UserId;\n authId: UserId;\n message: PostMsg;\n followerUser: FollowerProfileLite;\n}\n\nexport function useCreateRoomBetweenUserIdsAndPushMsg() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ userId, authId, message }: ICreateRoomWithMessageArgs) => {\n return messagingApi.createRoomBetweenUserIdsAndPushMsgReturnRoomCardLite(\n authId,\n userId,\n message\n );\n },\n {\n onMutate: ({ authId, userId, message, followerUser }) => {\n const previousRooms = queryClient.getQueryData([\n 'getPaginatedRoomCardLitesFromUserId',\n authId,\n ]);\n\n const previousMessages = queryClient.getQueryData([\n 'getPaginatedMsgsInRoomForUserIds',\n userId,\n authId,\n ]);\n\n const formattedMessage = postMessageToGetMessage(message);\n // push temp room card to the top of the list\n unshiftTempRoomCardLite(queryClient, {\n authUserId: authId,\n userId,\n message: formattedMessage,\n followerUser,\n });\n\n // unshift temp message to message list\n unshiftPostMessage(queryClient, {\n authUserId: authId,\n userId,\n message: formattedMessage,\n });\n\n // used in case of error to revert to previous state\n return () => {\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', authId],\n previousRooms\n );\n queryClient.setQueryData(\n ['getPaginatedMsgsInRoomForUserIds', userId, authId],\n previousMessages\n );\n };\n },\n onSuccess: (data, { authId, userId }) => {\n // used to handle the case that the response is an error\n const room = extractApiDataOrThrow(data);\n\n // remove temp room card of user and unsfhift new room card\n unshiftRoomAndRemoveRoomCardByUserId(queryClient, {\n authUserId: authId,\n userId,\n room,\n });\n\n const newMessage = fromIcOpt(room.last_msg);\n if (newMessage) {\n // optimistically updates room message list to add new message\n unshiftNewMessage(queryClient, {\n authUserId: authId,\n userId,\n message: newMessage,\n });\n }\n },\n onError: (_, __, rollback) => {\n rollback instanceof Function && rollback();\n },\n }\n );\n}\n\nexport interface IDeleteRoomArgs {\n roomId: RoomId;\n authId: bigint;\n}\n\nexport function useDeleteRoom() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ roomId }: IDeleteRoomArgs) => {\n return messagingApi.deleteRoom(roomId);\n },\n {\n onSettled: (_, __, { authId }) => {\n queryClient.invalidateQueries([\n 'getPaginatedRoomCardLitesFromUserId',\n authId,\n ]);\n },\n }\n );\n}\n\nexport interface ISetLastMsgsReadStatusUserIdArgs {\n authUserId: bigint;\n roomId: RoomId;\n messageId: MsgId;\n}\n\nexport function useSetLastMsgsReadStatusUserId() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ authUserId, roomId }: ISetLastMsgsReadStatusUserIdArgs) => {\n return messagingApi.setLastMsgsStatusForUserIdInRoomId(\n roomId,\n authUserId,\n {\n Read: null,\n }\n );\n },\n {\n onMutate: ({ authUserId, messageId, roomId }) => {\n const previousRooms = queryClient.getQueryData([\n 'getPaginatedRoomCardLitesFromUserId',\n authUserId,\n ]);\n\n // optimistically updates room card to set read status in message\n updateRoomCardLastMsgStatus(queryClient, {\n authUserId,\n roomId,\n messageId,\n });\n\n // used in case of error to revert to previous state\n return () => {\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', authUserId],\n previousRooms\n );\n\n // update unread msg counter\n updateUnreadRoomCounter(queryClient, {\n userId: authUserId,\n });\n };\n },\n\n onSuccess: (res) => {\n extractApiDataOrThrow(res);\n },\n\n onError: (_, __, rollback) => {\n rollback instanceof Function && rollback();\n },\n }\n );\n}\n\nexport function useSetAllLastMsgsReadStatusUserId() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ userId }: { userId: bigint }) => {\n return messagingApi.setAllRoomStatusForUserId(userId, {\n Read: null,\n });\n },\n {\n onMutate: ({ userId }) => {\n const previousRooms = queryClient.getQueryData([\n 'getPaginatedRoomCardLitesFromUserId',\n userId,\n ]);\n\n // optimistically updates room card to set status as read\n updateAllRoomCardLastMsgStatus(queryClient, {\n userId,\n });\n\n const prevUnreadCounter = queryClient.getQueryData([\n 'getUnReadMsgCounterForUserId',\n userId,\n ]);\n\n queryClient.setQueryData(\n ['getUnReadMsgCounterForUserId', userId],\n () => 0\n );\n\n // Return the snapshotted values\n return () => {\n queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', userId],\n previousRooms\n );\n queryClient.setQueryData(\n ['getUnReadMsgCounterForUserId', userId],\n prevUnreadCounter\n );\n };\n },\n\n onSuccess: (res) => {\n extractApiDataOrThrow(res);\n },\n\n onError: (_, __, rollback) => {\n // If the mutation fails, use the value returned from onMutate to roll back\n rollback instanceof Function && rollback();\n },\n\n onSettled: (_, __, { userId }) => {\n queryClient.invalidateQueries([\n 'getPaginatedRoomCardLitesFromUserId',\n userId,\n ]);\n },\n }\n );\n}\n","import React, { useState } from 'react';\n\nimport Search from 'components/Search';\nimport { useCollabSearch } from 'pages/messages/services';\nimport { FollowerProfileLite } from 'client';\n\ninterface ICollaboratorSearchProps {\n onClick: (value: string) => void;\n}\n\nfunction CollaboratorSearch({ onClick }: ICollaboratorSearchProps) {\n const [searchTerm, setSearchTerm] = useState('');\n const { data: searchData = [], isFetching } = useCollabSearch(searchTerm);\n\n function handleClick(_, user: FollowerProfileLite) {\n setSearchTerm('');\n onClick(user);\n }\n\n return (\n setSearchTerm(v)}\n />\n );\n}\n\nexport default CollaboratorSearch;\n","import { useQuery, useQueryClient } from 'react-query';\n\nimport api, { FollowerProfileLite } from 'client';\nimport { MAX_DISPLAY_NAME_LENGTH } from 'constants/common';\nimport { usePreviousValue } from 'hooks';\n\nexport function useSearchFollowers(userId: bigint, searchTerm: string) {\n const queryClient = useQueryClient();\n const prevSearchTerm = usePreviousValue(searchTerm);\n\n // TODO in case of 0 results, extension search should not fire a call\n return useQuery, Error>(\n ['searchFollowers', searchTerm],\n async () => {\n const data = await api.searchFollowersProfileLiteFirst10StartWith(\n userId,\n searchTerm\n );\n return data;\n },\n {\n placeholderData: () => {\n // Adding placeholder data if new search is an extension of previous search\n // by applying the same filtering to prev data that BE does\n if (searchTerm.startsWith(prevSearchTerm)) {\n return queryClient\n .getQueryData>([\n 'searchFollowers',\n prevSearchTerm,\n ])\n ?.filter(\n (f) =>\n f.user_name\n .toLocaleLowerCase()\n .startsWith(searchTerm.toLocaleLowerCase()) ||\n f.display_name\n .toLocaleLowerCase()\n .startsWith(searchTerm.toLocaleLowerCase())\n );\n }\n\n return [];\n },\n enabled:\n searchTerm.length >= 2 && searchTerm.length <= MAX_DISPLAY_NAME_LENGTH,\n }\n );\n}\n\nexport function useCollabSearch(searchTerm: string) {\n const queryClient = useQueryClient();\n const prevSearchTerm = usePreviousValue(searchTerm);\n\n return useQuery, Error>(\n ['paginatedSearchWithFollowerData', searchTerm],\n async () => {\n const data = await api.paginatedSearchWithFollowerData(\n searchTerm,\n 0n,\n 5n\n );\n return data;\n },\n {\n placeholderData: () => {\n // Adding placeholder data if new search is an extension of previous search\n // by applying the same filtering to prev data that BE does\n if (searchTerm.startsWith(prevSearchTerm)) {\n return queryClient\n .getQueryData>([\n 'searchFollowers',\n prevSearchTerm,\n ])\n ?.filter(\n (f) =>\n f.user_name\n .toLocaleLowerCase()\n .startsWith(searchTerm.toLocaleLowerCase()) ||\n f.display_name\n .toLocaleLowerCase()\n .startsWith(searchTerm.toLocaleLowerCase())\n );\n }\n\n return [];\n },\n enabled:\n searchTerm.length >= 2 && searchTerm.length <= MAX_DISPLAY_NAME_LENGTH,\n }\n );\n}\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n minHeight: 500,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n cancelButton: {},\n coverPreview: {\n objectFit: 'cover',\n width: '100%',\n height: 150,\n border: '1px solid #e2e1ec',\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n alignItems: 'center',\n padding: theme.spacing(2),\n },\n heading: {\n fontSize: theme.typography.pxToRem(14),\n textTransform: 'uppercase',\n fontWeight: 600,\n },\n content: {\n fontSize: theme.typography.pxToRem(12),\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n borderTop: 'none',\n },\n largeIcon: {\n height: 22,\n width: 22,\n },\n confirmContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: `${theme.spacing(3)} !important`,\n paddingBottom: theme.spacing(3),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n },\n confirmContent: {\n marginRight: theme.spacing(2.5),\n fontSize: theme.typography.pxToRem(12),\n },\n titleContainer: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n paddingLeft: 0,\n paddingRight: 0,\n },\n text: {\n fontSize: theme.typography.pxToRem(14),\n paddingBottom: theme.spacing(0.5),\n },\n icon: {\n height: 16,\n width: 16,\n },\n iconButton: {\n background: 'rgb(255 255 255 / 42%)',\n borderRadius: '100%',\n padding: theme.spacing(0.75),\n },\n infoText: {\n color: theme.palette.colors.ui_06,\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n textAlign: 'center',\n },\n searchContainer: {\n top: 5,\n width: '100%',\n left: '8%',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n alignSelf: 'center',\n borderRadius: 10,\n zIndex: 50,\n },\n resultsContainer: {\n zIndex: 1,\n marginTop: theme.spacing(3),\n width: '100%',\n },\n userAside: {\n maxWidth: 'calc(100% - 150px)',\n },\n}));\n","import React from 'react';\nimport { useQueryClient } from 'react-query';\nimport { Box, Typography, ListItem, IconButton } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\nimport CollaboratorSearch from '../CollaboratorSearch';\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport { Alert, Dialog } from 'components';\nimport { Collaborator, Profile } from 'client';\nimport { RemoveBinIcon } from 'components/icons';\nimport { useStyles } from './styles';\n\ninterface IChooseCollaboratorsModalProps {\n close: () => void;\n confirm: (collaborators: string[]) => void;\n initialCollaborators?: Collaborator[];\n confirmButton?: string;\n closeButton?: string;\n loading?: boolean;\n children?: React.ReactNode;\n}\n\nfunction ChooseCollaboratorsModal({\n close,\n confirm,\n confirmButton,\n closeButton = 'Cancel',\n loading = false,\n initialCollaborators = [],\n}: IChooseCollaboratorsModalProps) {\n const classes = useStyles();\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const [collaborators, setCollaborators] = React.useState(\n initialCollaborators\n );\n const [reachedLimit, setReachedLimit] = React.useState(false);\n\n const handleAddCollaborator = (user) => {\n if (collaborators.length >= 25) setReachedLimit(true);\n else {\n const exists = collaborators.find(\n (collaborator) => collaborator.user.id === user.profile?.id\n );\n\n if (!exists && user.profile?.id !== authUser.id) {\n const newCollaborator = {\n user: user.profile,\n approved: null,\n };\n setCollaborators((prevState) => [...prevState, newCollaborator]);\n }\n }\n };\n\n const handleRemoveCollaborator = (user) => {\n const updatedItems = collaborators.filter(\n (collaborator) => collaborator.user.id !== user.id\n );\n\n setCollaborators(updatedItems);\n };\n\n const handleClose = () => {\n close();\n setCollaborators(initialCollaborators);\n };\n\n return (\n confirm(collaborators)}\n sx={{ minHeight: '560px', maxHeight: '560px' }}\n >\n <>\n \n \n \n \n \n \n {collaborators.length === 1\n ? '1 User Selected'\n : `${collaborators.length} Users Selected`}\n \n\n {collaborators.map((collaborator) => (\n \n \n \n \n \n {collaborator.approved ? (\n \n Accepted\n \n ) : collaborator.approved === null ? (\n \n Request will be sent\n \n ) : (\n \n Request sent\n \n )}\n handleRemoveCollaborator(collaborator.user)}\n >\n \n \n \n \n ))}\n \n \n\n {reachedLimit ? (\n setReachedLimit(false)}\n />\n ) : null}\n \n \n );\n}\n\nconst StyledListItem = styled(ListItem)(({ theme }) => ({\n justifyContent: 'space-between',\n padding: theme.spacing(2),\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n width: 'calc(100% + 48px)',\n marginLeft: '-24px',\n marginRight: '-24px',\n\n '&:nth-of-type(even)': {\n backgroundColor: theme.palette.colors.ui_02,\n },\n\n [theme.breakpoints.only('xs')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n justifyContent: 'space-between',\n width: 'calc(100% + 32px)',\n marginLeft: '-16px',\n marginRight: '-16px',\n },\n}));\n\nexport default ChooseCollaboratorsModal;\n","import React from 'react';\nimport { Typography, List, ListItem, Box } from '@mui/material';\n\nimport User from 'pages/profile/Follows/User';\nimport { CollaboratorWithUser } from 'client';\nimport { Dialog, UserList } from 'components';\n\ninterface ICollaboratorsListModalProps {\n collaborators: CollaboratorWithUser[];\n onClose: () => void;\n}\n\nfunction CollaboratorsListModal({\n onClose,\n collaborators,\n}: ICollaboratorsListModalProps) {\n return (\n \n \n {collaborators.length > 0 ? (\n \n ) : (\n \n \n {`This project doesn't have collaborators`}\n \n \n )}\n \n \n );\n}\n\nexport default CollaboratorsListModal;\n","import React, { useState } from 'react';\n\nimport { CollaboratorWithUser, Milestone } from 'client';\nimport { MilestoneForm } from 'pages/profile/components';\nimport { Dialog } from 'components';\n\ninterface ICreateMilestoneModalProps {\n isLoading: boolean;\n milestone?: Milestone;\n collaborators?: CollaboratorWithUser[];\n onClose: () => void;\n onSubmit: (milestone: Milestone) => void;\n}\n\nfunction CreateMilestoneModal({\n collaborators,\n isLoading,\n milestone,\n onClose,\n onSubmit,\n}: ICreateMilestoneModalProps) {\n const [isChanged, setIsChanged] = useState(false);\n const [openWarning, setOpenWarning] = useState(false);\n\n const handleClose = () => {\n if (isChanged) {\n setOpenWarning(true);\n } else {\n onClose();\n }\n };\n\n return (\n <>\n \n \n\n {openWarning ? (\n setOpenWarning(false)}\n onSubmit={() => {\n setOpenWarning(false);\n onClose();\n }}\n />\n ) : null}\n \n \n );\n}\n\nexport default CreateMilestoneModal;\n","import React from 'react';\nimport { Theme } from '@mui/material/styles';\nimport { WithStyles } from '@mui/styles';\nimport createStyles from '@mui/styles/createStyles';\nimport withStyles from '@mui/styles/withStyles';\nimport Editor from '@draft-js-plugins/editor';\nimport api from '../../../client';\nimport { debounce } from 'lodash';\nimport { EditorState, getDefaultKeyBinding, RichUtils } from 'draft-js';\nimport createMentionPlugin from '@draft-js-plugins/mention';\nimport 'draft-js/dist/Draft.css';\nimport '@draft-js-plugins/inline-toolbar/lib/plugin.css';\nimport '@draft-js-plugins/mention/lib/plugin.css';\nimport UserPreviewCard from '../../Cards/UserPreviewCard';\nimport UserAvatar from '../../UserAvatar/UserAvatar';\nimport { EntryComponentProps } from '@draft-js-plugins/mention/lib/MentionSuggestions/Entry/Entry';\nimport { ListItem } from '@mui/material';\nimport mentionRegex from '../mentionRegex';\n\nconst styles = (theme: Theme) =>\n createStyles({\n rootEditor: {\n boxSizing: 'border-box',\n cursor: 'text',\n width: '100%',\n minWidth: 0,\n padding: theme.spacing(2),\n fontSize: 14,\n '& span': {\n opacity: 0.9,\n },\n },\n avatar: {\n width: 40,\n height: 40,\n },\n userCard: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(1.5),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n },\n listItemContainer: {\n backgroundColor: theme.palette.colors.ui_02,\n cursor: 'pointer',\n },\n suggestionsContainer: {\n zIndex: 5,\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: 8,\n background: theme.palette.background.paper,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n width: 'calc(100% - 34px)',\n maxWidth: 300,\n },\n modalSuggestionsContainer: {\n maxHeight: 185,\n backgroundColor: theme.palette.colors.ui_01,\n overflowY: 'scroll',\n },\n });\n\ninterface ComposeProps extends WithStyles {\n placeholder: string;\n editorState: EditorState;\n setEditorState: (newState: EditorState) => void;\n processing?: boolean;\n location: string;\n onChange: any;\n maxLength: number;\n onFocus?: () => void;\n onBlur?: () => void;\n}\n\nconst CreateBio = ({\n classes,\n placeholder,\n editorState,\n setEditorState,\n processing = false,\n location,\n maxLength,\n onFocus,\n onBlur,\n}: ComposeProps) => {\n const editor = React.useRef(null);\n const [open, setOpen] = React.useState(false);\n const [suggestions, setSuggestions] = React.useState([]);\n\n function Entry(props: EntryComponentProps): React.ReactElement {\n const {\n mention,\n searchValue, // eslint-disable-line @typescript-eslint/no-unused-vars\n isFocused, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...parentProps\n } = props;\n\n return (\n
    \n \n \n \n
    \n );\n }\n\n const mapKeyToEditorCommand = React.useCallback(\n (e) => {\n if (e.keyCode === 9 /* TAB */) {\n const newEditorState = RichUtils.onTab(\n e,\n editorState,\n 4 /* maxDepth */\n );\n if (newEditorState !== editorState) {\n setEditorState(newEditorState);\n }\n return;\n }\n return getDefaultKeyBinding(e);\n },\n [editorState, setEditorState]\n );\n\n const { MentionSuggestions, plugins } = React.useMemo(() => {\n const mentionPlugin = createMentionPlugin({\n mentionRegExp: mentionRegex,\n entityMutability: 'IMMUTABLE',\n mentionPrefix: '@',\n supportWhitespace: false,\n theme: {\n mentionSuggestionsPopupVisible: `${classes.suggestionsContainer} ${\n location === 'modal' ? classes.modalSuggestionsContainer : ''\n }`,\n mentionSuggestionsEntryFocused: classes.listItemContainer,\n },\n });\n // eslint-disable-next-line no-shadow\n const { MentionSuggestions } = mentionPlugin;\n // eslint-disable-next-line no-shadow\n const plugins = [mentionPlugin];\n\n return { plugins, MentionSuggestions };\n }, []);\n\n const debounceSearch = React.useCallback(\n debounce((value) => {\n api.autoSuggest(value, 0n, 5n).then((response) => {\n const newSuggestions = [];\n response.map((suggestion) => {\n const newSuggestion = {\n id: suggestion.id,\n name: suggestion.username,\n title: suggestion.display_name,\n avatar: ,\n profile: suggestion,\n };\n newSuggestions.push(newSuggestion);\n });\n setSuggestions(newSuggestions);\n });\n }, 1000),\n []\n );\n\n const onOpenChange = React.useCallback((_open: boolean) => {\n setOpen(_open);\n }, []);\n const onSearchChange = React.useCallback(\n ({ value }: { value: string }) => {\n if (value.length >= 2 && value.length <= 20) debounceSearch(value);\n else {\n setSuggestions([]);\n }\n },\n [debounceSearch]\n );\n\n return (\n editor.current.focus()}\n onClick={() => {\n editor.current!.focus();\n }}\n >\n {\n editor.current = element;\n }}\n readOnly={processing}\n plugins={plugins}\n onFocus={onFocus}\n onBlur={onBlur}\n />\n {\n // get the mention object selected\n }}\n entryComponent={Entry}\n renderEmptyPopup={false}\n />\n \n );\n};\n\nexport default withStyles(styles)(CreateBio);\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n minWidth: 400,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n padding: theme.spacing(2),\n },\n heading: {\n fontSize: theme.typography.pxToRem(14),\n textTransform: 'uppercase',\n fontWeight: 500,\n },\n form: {\n width: '100%',\n },\n inputContainerTop: {\n marginTop: theme.spacing(-1),\n '& .MuiOutlinedInput-root': {\n fontSize: theme.typography.fontSize,\n },\n },\n descriptionCounter: {\n position: 'absolute',\n top: theme.spacing(1),\n right: 0,\n },\n descriptionCounterDanger: {\n position: 'absolute',\n top: theme.spacing(1),\n right: 0,\n color: theme.palette.colors.danger,\n },\n inputContainer: {\n position: 'relative',\n marginTop: theme.spacing(2),\n '& .MuiOutlinedInput-root': {\n fontSize: theme.typography.fontSize,\n },\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: theme.spacing(3),\n borderTop: 'none',\n },\n disabledField: {\n '& .MuiInput-underline.Mui-disabled:before': {\n borderBottomStyle: 'solid',\n opacity: 0.38,\n },\n '& .MuiInputBase-root.Mui-disabled': {\n background: 'rgba(154,154,154,0.1)',\n },\n },\n helperText: {\n opacity: 0.6,\n fontSize: theme.typography.pxToRem(10),\n textAlign: 'right',\n },\n inputIcon: {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n },\n titleContainer: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n paddingLeft: 0,\n paddingRight: 0,\n },\n label: {\n width: '100%',\n transform: 'translate(0, 1.5px) scale(1)',\n },\n errorText: {\n fontSize: theme.typography.pxToRem(12),\n },\n errorContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n errorIcon: {\n height: 16,\n width: 16,\n marginRight: theme.spacing(1),\n },\n labelContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n\n '& .MuiFormLabel-root.Mui-error': {\n color: theme.palette.primary.main,\n },\n '& .MuiInput-root.Mui-error': {\n background:\n theme.palette.mode === 'light'\n ? 'rgba(224,0,0, 0.07)'\n : 'rgba(224,0,0,0.39)',\n },\n '& .MuiInput-underline.Mui-error:after': {\n borderBottomColor: '#1E1A2D',\n opacity: 0.25,\n },\n },\n icon: {\n height: 16,\n width: 16,\n },\n deleteIcon: {\n marginTop: 2,\n '& svg': {\n color: theme.palette.colors.danger,\n },\n },\n checkboxLabel: {\n fontSize: theme.typography.pxToRem(14),\n },\n checkboxLabelDisabled: {\n fontSize: theme.typography.pxToRem(14),\n color: theme.palette.colors.ui_05,\n },\n}));\n","import { Box, Button, Typography, FormControlLabel } from '@mui/material';\nimport { Wallet } from 'client';\nimport { TextFieldProps, TextField, Checkbox } from 'components';\nimport { FormikConfig, setIn, useFormik } from 'formik';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { UseMutationResult } from 'react-query';\nimport {\n fromIcEnum,\n toIcEnum,\n isValidWalletAddress,\n WalletKind,\n walletKinds,\n walletKindToNamesMapping,\n PreferredWalletKind,\n countRepetitions,\n} from 'utils';\nimport { EditForm } from '../EditProfile';\nimport { useStyles } from '../styles';\n\ntype TextFieldOmitted = 'inputLabel' | 'placeholder';\n\ninterface WalletInfoProps\n extends WalletsInfoProps,\n Omit {\n isPreferred: boolean;\n kind: WalletKind;\n}\n\ntype ChangeType = 'Add' | 'Update' | 'Remove';\n\nexport enum WalletAddressError {\n Invalid,\n Duplicate,\n}\n\ntype WalletAddressErrorToMessageMapping = {\n [key in WalletAddressError]: string;\n};\n\nconst walletAddressErrorMapping: WalletAddressErrorToMessageMapping = {\n [WalletAddressError.Invalid]: 'Please enter a valid wallet address',\n [WalletAddressError.Duplicate]: 'Please enter a different wallet address',\n};\n\nconst EditWalletInfo = (props: WalletInfoProps) => {\n const { formik, isPreferred, mutation, kind, ...textFieldProps } = props;\n const { name } = textFieldProps;\n\n const findWalletIndex = useCallback(\n (kind: WalletKind) =>\n formik.values.wallet_addresses.findIndex(\n (wallet: Wallet) => kind in wallet\n ),\n [formik.values.wallet_addresses]\n );\n\n const walletIndex = useMemo(() => findWalletIndex(kind), [\n findWalletIndex,\n kind,\n ]);\n\n const value = useMemo(\n () => formik.values.wallet_addresses?.[walletIndex]?.[kind] || '',\n [kind, formik.values.wallet_addresses, walletIndex]\n );\n\n const errorText = useMemo(() => {\n let message = undefined;\n\n if (!!formik.touched.wallet_addresses?.[name]) {\n const errorType: WalletAddressError =\n formik.errors.wallet_addresses?.[name];\n\n switch (errorType) {\n case WalletAddressError.Invalid:\n message = walletAddressErrorMapping[errorType];\n break;\n case WalletAddressError.Duplicate:\n const lastChangedKind =\n formik.values.last_wallet_kind_address_changed;\n\n const isLastChanged = () => kind === lastChangedKind;\n\n const walletAddressRepetitions = countRepetitions(\n formik.values.wallet_addresses\n );\n\n const duplicatedKinds = walletAddressRepetitions[value]?.kinds || [];\n\n const isLastChangedNotDuplicated = () =>\n !duplicatedKinds.includes(\n formik.values.last_wallet_kind_address_changed\n );\n\n const isFirstTouchedDuplicated = () => {\n return (\n duplicatedKinds.find(\n (kind: WalletKind) => !!formik.touched.wallet_addresses?.[kind]\n ) === kind\n );\n };\n\n if (\n isLastChanged() ||\n (isLastChangedNotDuplicated() && isFirstTouchedDuplicated())\n ) {\n message = walletAddressErrorMapping[errorType];\n }\n break;\n default:\n break;\n }\n }\n\n return message;\n }, [\n formik.errors.wallet_addresses,\n formik.touched.wallet_addresses,\n formik.values.last_wallet_kind_address_changed,\n formik.values.wallet_addresses,\n kind,\n name,\n value,\n ]);\n\n const preferredWallet = useMemo(\n () => fromIcEnum(formik.values.preferred_wallet),\n [formik.values.preferred_wallet]\n );\n\n const hasPreferredWallet = useMemo(() => preferredWallet !== 'None', [\n preferredWallet,\n ]);\n\n const [preferredWalletDirty, setPreferredWalletDirty] = useState(false);\n\n const getPreferredWalletCandidates = useCallback(\n (wallets: Array) =>\n wallets.filter((wallet: Wallet) => {\n const walletAddress = Object.values(wallet)[0];\n\n return (\n Object.keys(wallet)[0] !== 'Nns' &&\n isValidWalletAddress(walletAddress)\n );\n }),\n []\n );\n\n const computePreferredWallet = useCallback(\n (wallets: Array) => {\n const preferredWalletCandidates = getPreferredWalletCandidates(wallets);\n\n let newPreferredWallet = formik.values.preferred_wallet;\n\n const stillValidPreferredWallet = () =>\n preferredWalletCandidates.find(\n (wallet: Wallet) =>\n Object.keys(wallet)[0] === Object.keys(newPreferredWallet)[0]\n );\n\n if (!hasPreferredWallet || !stillValidPreferredWallet()) {\n newPreferredWallet = toIcEnum(\n preferredWalletCandidates.length > 0\n ? (Object.keys(\n preferredWalletCandidates[0]\n )[0] as PreferredWalletKind)\n : 'None'\n );\n }\n\n return newPreferredWallet;\n },\n [\n formik.values.preferred_wallet,\n getPreferredWalletCandidates,\n hasPreferredWallet,\n ]\n );\n\n const onMouseLeave = useCallback(() => {\n if (preferredWalletDirty) {\n setPreferredWalletDirty(false);\n\n formik.setFieldTouched('wallet_addresses', ({\n ...((formik.touched.wallet_addresses as unknown) as Record<\n WalletKind,\n boolean\n >),\n [kind]: true,\n } as unknown) as boolean);\n\n formik.setFieldValue(\n 'preferred_wallet',\n computePreferredWallet(formik.values.wallet_addresses)\n );\n }\n }, [computePreferredWallet, formik, kind, preferredWalletDirty]);\n\n const computeChangeType = useCallback(\n (value: string): ChangeType => {\n if (walletIndex >= 0) {\n if (value) {\n return 'Update';\n } else {\n return 'Remove';\n }\n } else {\n return 'Add';\n }\n },\n [walletIndex]\n );\n\n const onChange = useCallback(\n (e: React.ChangeEvent) => {\n const newValue = e.target.value;\n\n let newWalletAdddresses = formik.values.wallet_addresses;\n const changeType = computeChangeType(newValue);\n switch (changeType) {\n case 'Update':\n const newValues = setIn(\n formik.values,\n `wallet_addresses[${walletIndex}][${kind}]`,\n newValue\n );\n newWalletAdddresses = newValues.wallet_addresses;\n break;\n case 'Remove':\n newWalletAdddresses = [...formik.values.wallet_addresses];\n newWalletAdddresses.splice(walletIndex, 1);\n break;\n case 'Add':\n newWalletAdddresses = [\n ...formik.values.wallet_addresses,\n { [kind]: newValue } as Wallet,\n ];\n break;\n default:\n return;\n }\n\n formik.setValues(\n setIn(\n setIn(formik.values, 'wallet_addresses', newWalletAdddresses),\n 'last_wallet_kind_address_changed',\n kind\n )\n );\n\n setPreferredWalletDirty(true);\n },\n [formik, computeChangeType, kind, walletIndex]\n );\n\n const walletName = walletKindToNamesMapping[kind];\n\n const preferredWalletCandidates = useMemo(\n () => getPreferredWalletCandidates(formik.values.wallet_addresses),\n [formik.values.wallet_addresses, getPreferredWalletCandidates]\n );\n\n const isPreferredWalletCandidate = !!preferredWalletCandidates.find(\n (wallet: Wallet) => Object.keys(wallet)[0] === kind\n );\n\n return (\n \n \n\n {isPreferred ? (\n \n Primary wallet\n \n ) : (\n hasPreferredWallet &&\n isPreferredWalletCandidate && (\n \n formik.setFieldValue('preferred_wallet', toIcEnum(kind))\n }\n >\n Make primary\n \n )\n )}\n \n );\n};\n\n// eslint-disable-next-line react-hooks/rules-of-hooks\nconst fakeFunction = (arg: FormikConfig) => useFormik(arg);\n\ninterface WalletsInfoProps {\n formik: ReturnType;\n mutation: UseMutationResult;\n}\n\nexport const EditWalletsInfo = (props: WalletsInfoProps) => {\n const { formik } = props;\n\n const classes = useStyles();\n\n const preferredWallet = useMemo(\n () => fromIcEnum(formik.values.preferred_wallet),\n [formik.values.preferred_wallet]\n );\n\n return (\n \n \n My Wallets\n \n\n \n \n Enter external wallet addresses here for display on your profile. Set\n one as “Primary Wallet” and it’ll be shown on the followers list of\n anybody you follow and can also be exported for airdrops, for example.\n \n \n\n \n }\n label={\n \n Show Wallet addresses on My Profile\n \n }\n />\n\n \n {walletKinds.map((kind) => (\n
    \n \n
    \n ))}\n
    \n
    \n );\n};\n","import React, { useMemo } from 'react';\nimport '@draft-js-plugins/inline-toolbar/lib/plugin.css';\nimport '@draft-js-plugins/mention/lib/plugin.css';\nimport 'draft-js/dist/Draft.css';\nimport * as linkify from 'linkifyjs';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport { useFormik } from 'formik';\nimport { useQueryClient } from 'react-query';\nimport {\n Box,\n Typography,\n InputLabel,\n Grid,\n Button,\n useMediaQuery,\n IconButton,\n SvgIcon,\n} from '@mui/material';\nimport { Theme } from '@mui/material/styles';\nimport { RemoveBin } from 'components/icons';\nimport TextField from 'components/TextInput/TextField';\nimport CreateBio from 'components/Compose/Bio/CreateBio';\nimport { Profile, Wallet, WalletKind as APIWalletKind } from 'client';\nimport { sendHeartbeat } from 'utils/heartbeat';\nimport { useMentionsChecker, useMentionsParser } from 'hooks/rich-editor';\nimport { useStyles } from './styles';\nimport { useUpdateProfile } from 'pages/profile/services';\nimport { Dialog, Alert, Select } from 'components';\nimport { values } from 'lodash';\nimport {\n countRepetitions,\n isValidWalletAddress,\n WalletKind,\n WalletKindsMapping,\n} from 'utils';\nimport { EditWalletsInfo, WalletAddressError } from './components';\n\nconst validMonts = {\n 1: 31,\n 2: 29,\n 3: 31,\n 4: 30,\n 5: 31,\n 6: 30,\n 7: 31,\n 8: 31,\n 9: 30,\n 10: 31,\n 11: 30,\n 12: 31,\n};\n\ntype WalletAddresses = Partial>;\n\nexport interface EditForm {\n display_name: string;\n description: string;\n birthday: {\n day: number;\n month: number;\n };\n wallet_addresses: Array;\n preferred_wallet: APIWalletKind;\n last_wallet_kind_address_changed?: WalletKind;\n wallets_are_public: boolean;\n}\n\ntype WalletAddressesErrors = {\n [key in keyof WalletAddresses]: string;\n};\n\ntype EditFormErrors = {\n [key in keyof EditForm]: string | WalletAddressesErrors;\n};\n\ninterface IEditProfileProps {\n open: boolean;\n close: any;\n title: string;\n confirmButton: string;\n cancelButton: string;\n onSave?: () => void;\n}\n\nfunction EditProfile({\n close,\n title,\n confirmButton,\n onSave,\n}: IEditProfileProps) {\n const classes = useStyles();\n const queryClient = useQueryClient();\n const updateProfileMutate = useUpdateProfile();\n const user = queryClient.getQueryData(['getSelf']);\n const mobileSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('xs')\n );\n const [error, setError] = React.useState(null);\n const [usernameErrorModal, setUsernameErrorModal] = React.useState(false);\n const [exceededErrorModal, setExceededErrorModal] = React.useState(false);\n const [skipMentionsCheck, setSkipMentionsCheck] = React.useState(false);\n const [skipMentionsLimit, setSkipMentionsLimit] = React.useState(false);\n const [descriptionFocused, setDescriptionFocused] = React.useState(false);\n const [birthdayError, setBirthdayError] = React.useState(false);\n const [birthdayDayError, setBirthdayDayError] = React.useState(false);\n const [birthdayMonthError, setBirthdayMonthError] = React.useState(false);\n const [openWarning, setOpenWarning] = React.useState(false);\n const [editorState, setEditorState] = React.useState(() =>\n createEditorStateWithText(\n user?.description === ' ' ? '' : user?.description\n )\n );\n const maxDescription = 300;\n\n const mentionsParser = useMentionsParser();\n const mentionsChecker = useMentionsChecker();\n\n React.useEffect(() => {\n if (open) {\n sendHeartbeat();\n }\n }, [open]);\n\n const months = [\n { value: 1, name: 'January' },\n { value: 2, name: 'February' },\n { value: 3, name: 'March' },\n { value: 4, name: 'April' },\n { value: 5, name: 'May' },\n { value: 6, name: 'June' },\n { value: 7, name: 'July' },\n { value: 8, name: 'August' },\n { value: 9, name: 'September' },\n { value: 10, name: 'October' },\n { value: 11, name: 'November' },\n { value: 12, name: 'December' },\n ];\n\n const days = [];\n for (let i = 1; i <= 31; i++) {\n const item = { value: i, name: i };\n days.push(item);\n }\n\n const formik = useFormik({\n initialValues: {\n display_name: user?.display_name,\n description: user?.description === ' ' ? '' : user?.description,\n birthday: {\n day: user?.birthday?.day || 0,\n month: user?.birthday?.month || 0,\n },\n wallet_addresses: user?.wallet_addresses,\n preferred_wallet: user?.preferred_wallet,\n wallets_are_public: user?.wallets_are_public,\n },\n validate: async (values) => {\n const errors: Partial = {};\n\n setError(null);\n if (!values.display_name) {\n errors.display_name = 'This field is mandatory';\n } else if (values.display_name.length > 50) {\n errors.display_name =\n 'The display name cannot be longer than 50 characters';\n }\n\n if (values.description.length > maxDescription) {\n errors.description = `The description cannot be longer than ${maxDescription} characters`;\n }\n\n const walletAddressRepetitions = countRepetitions(\n values.wallet_addresses\n );\n\n const setWalletAddressError = (\n kind: WalletKind,\n errorText: WalletAddressError\n ) => {\n if (!errors.wallet_addresses) {\n errors.wallet_addresses = {};\n }\n\n errors.wallet_addresses[kind] = errorText;\n };\n\n for (let i = 0; i < values.wallet_addresses.length; i++) {\n const wallet = values.wallet_addresses[i];\n const kind = Object.keys(wallet)[0] as WalletKind;\n const walletAddress = Object.values(wallet)[0];\n\n if (walletAddress) {\n if (!isValidWalletAddress(walletAddress)) {\n setWalletAddressError(kind, WalletAddressError.Invalid);\n } else if (walletAddressRepetitions[walletAddress].count > 1) {\n setWalletAddressError(kind, WalletAddressError.Duplicate);\n }\n }\n }\n\n return errors;\n },\n onSubmit: React.useCallback(\n async (values) => {\n setExceededErrorModal(false);\n setUsernameErrorModal(false);\n setBirthdayError(false);\n setBirthdayDayError(false);\n setBirthdayMonthError(false);\n\n const { day, month } = values.birthday;\n if (day === 0 && month > 0) {\n setBirthdayDayError(true);\n }\n if (day > 0 && month === 0) {\n setBirthdayMonthError(true);\n }\n if ((day === 0 && month > 0) || (day > 0 && month === 0)) {\n setBirthdayError(true);\n return;\n }\n\n if (day > 0 && month > 0 && day > validMonts[month]) {\n setBirthdayError(true);\n setBirthdayDayError(true);\n return;\n }\n\n const content = values.description;\n const mentions = mentionsParser({ content, trimEnd: false });\n const checkedMentions = await mentionsChecker({ mentions });\n\n if (!skipMentionsLimit && mentions.length > 5) {\n setExceededErrorModal(true);\n return;\n }\n\n if (\n !skipMentionsCheck &&\n checkedMentions.some(({ exists }) => exists === false)\n ) {\n setUsernameErrorModal(true);\n return;\n }\n\n const mentionsArray = checkedMentions\n .filter(({ exists }) => exists)\n .map(({ username }) => username)\n .slice(0, 5);\n\n const match = linkify.find(content);\n\n const hashtags = match\n .filter((item) => item.type === 'hashtag')\n .map(({ value }) => value.substr(1));\n\n const description = {\n text: content,\n // make hash tag unique\n hashtags: hashtags.filter(\n (tag, index) => hashtags.indexOf(tag) === index\n ),\n user_tags: mentionsArray,\n };\n\n setSkipMentionsLimit(false);\n setSkipMentionsCheck(false);\n\n updateProfileMutate.mutate(\n {\n values: {\n display_name: values.display_name,\n title: user?.title,\n company: user?.company,\n description: description,\n education: user?.education,\n location: user?.location,\n link: user?.link,\n img_url: '',\n birthday: values.birthday,\n wallet_addresses: values.wallet_addresses,\n preferred_wallet: values.preferred_wallet,\n wallets_are_public: [values.wallets_are_public],\n },\n userName: user?.username,\n },\n {\n onSuccess: () => {\n close();\n onSave && onSave();\n },\n }\n );\n },\n [\n mentionsChecker,\n mentionsParser,\n user,\n skipMentionsCheck,\n skipMentionsLimit,\n ]\n ),\n });\n\n React.useEffect(() => {\n const updateFormik = async () => {\n const text = editorState.getCurrentContent().getPlainText('');\n formik.setFieldValue('description', text);\n };\n updateFormik();\n }, [editorState]);\n\n const handleClose = React.useCallback(() => {\n if (formik.dirty) {\n setOpenWarning(true);\n } else {\n close();\n }\n }, [formik.dirty, close]);\n\n const hasErrors = useMemo(\n () => !formik.errors || Object.keys(formik.errors).length > 0,\n [formik.errors]\n );\n\n return (\n <>\n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n Birthday\n \n \n \n \n {\n formik.setFieldValue('birthday.day', v);\n setBirthdayError(false);\n setBirthdayDayError(false);\n }}\n />\n \n \n {\n formik.setFieldValue('birthday.month', v);\n setBirthdayError(false);\n setBirthdayMonthError(false);\n }}\n />\n \n \n {mobileSize ? (\n {\n formik.setFieldValue('birthday', { day: 0, month: 0 });\n setBirthdayError(false);\n setBirthdayDayError(false);\n setBirthdayMonthError(false);\n }}\n disabled={updateProfileMutate.isLoading}\n >\n \n \n ) : (\n {\n formik.setFieldValue('birthday', { day: 0, month: 0 });\n setBirthdayError(false);\n setBirthdayDayError(false);\n setBirthdayMonthError(false);\n }}\n disabled={updateProfileMutate.isLoading}\n >\n Remove Birthday\n \n )}\n \n \n {birthdayError && (\n \n \n Please enter the correct date in DD / MM format.\n \n \n )}\n
    \n
    \n {descriptionFocused && (\n \n {editorState.getCurrentContent().getPlainText('').length}/\n {maxDescription}\n \n )}\n setDescriptionFocused(true),\n onBlur: () => setDescriptionFocused(false),\n },\n inputComponent: CreateBio,\n }}\n />\n
    \n \n \n \n
    \n \n {usernameErrorModal && (\n {\n setUsernameErrorModal(false);\n }}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"User does not exist\"\n message=\"The user you tagged in your bio can't be found. Please go back, review your content and make sure you typed it correctly. You can post it anyway, but it might confuse your community.\"\n onCancel={() => {\n setSkipMentionsCheck(true);\n formik.handleSubmit();\n }}\n cancelColor=\"primary\"\n cancelText=\"Post Anyway\"\n ctaText=\"Review Bio\"\n onSubmit={() => setUsernameErrorModal(false)}\n />\n )}\n {exceededErrorModal && (\n {\n setExceededErrorModal(false);\n }}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"You tagged more than 5 users\"\n message=\"Sorry, 5 is the limit.\n You can still post this but only the first 5 users will be tagged.\"\n ctaText=\"Review Bio\"\n onCancel={() => {\n setExceededErrorModal(false);\n setSkipMentionsCheck(true);\n setSkipMentionsLimit(true);\n formik.handleSubmit();\n }}\n cancelColor=\"primary\"\n cancelText=\"Post Anyway\"\n onSubmit={() => setExceededErrorModal(false)}\n />\n )}\n {openWarning && (\n setOpenWarning(false)}\n onSubmit={() => {\n setOpenWarning(false);\n formik.resetForm();\n close();\n }}\n />\n )}\n \n );\n}\n\nexport default EditProfile;\n","import React from 'react';\nimport { Button, Box, Typography } from '@mui/material';\n\ninterface IExperienceSectionHeaderProps {\n type: 'project' | 'milestone';\n readOnly: boolean;\n count: number;\n limit: number;\n onClick: (value: boolean) => void;\n}\n\nfunction ExperienceSectionHeader({\n type,\n readOnly,\n count,\n limit,\n onClick,\n}: IExperienceSectionHeaderProps) {\n return (\n <>\n \n \n {type === 'project' ? 'My Projects' : 'My Milestones'}\n \n {`(${count}/${limit})`}\n \n \n \n\n {!readOnly ? (\n onClick(true)}\n variant=\"outlined\"\n disabled={count >= limit}\n >\n {`Add ${type === 'project' ? 'Project' : 'Milestone'}`}\n \n ) : null}\n \n );\n}\n\nexport default ExperienceSectionHeader;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n dialogPaper: {\n borderRadius: 20,\n minWidth: 600,\n background:\n theme.palette.mode === 'light'\n ? 'linear-gradient(211deg, rgb(242 242 250) 0%, rgb(224 224 243) 100%)'\n : 'linear-gradient(344deg, rgb(65 39 100) 0%, rgb(30 26 45) 100%)',\n [theme.breakpoints.down('sm')]: {\n minWidth: 'calc(100vw - 50px)',\n },\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: theme.spacing(5),\n paddingRight: theme.spacing(7),\n border: 'none',\n [theme.breakpoints.down('sm')]: {\n paddingRight: theme.spacing(3),\n },\n },\n description: {\n flex: '0 0 auto',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n marginBottom: theme.spacing(3),\n },\n link: {\n color: theme.palette.primary.main,\n cursor: 'pointer',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n date: {\n color: theme.palette.colors.ui_06,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n marginBottom: theme.spacing(1),\n },\n subtitleContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n\n [theme.breakpoints.down('sm')]: {\n display: 'block',\n },\n },\n companyName: {\n textAlign: 'right',\n\n [theme.breakpoints.down('sm')]: {\n paddingTop: theme.spacing(1),\n },\n },\n closeButton: {\n color: theme.palette.text.secondary,\n },\n closeButtonContainer: {\n justifyContent: 'flex-end !important',\n alignSelf: 'flex-end',\n padding: theme.spacing(1),\n paddingBottom: 0,\n },\n icon: {\n height: 16,\n width: 16,\n },\n mainTitle: {\n display: 'flex',\n alignItems: 'center',\n },\n userCard: {\n paddingLeft: 0,\n paddingRight: 0,\n paddingTop: theme.spacing(0.5),\n paddingBottom: theme.spacing(0.5),\n display: 'flex',\n justifyContent: 'space-between',\n },\n approveButton: {},\n rejectButton: {\n marginRight: theme.spacing(1),\n [theme.breakpoints.down('sm')]: {\n marginRight: 0,\n marginBottom: theme.spacing(1),\n },\n },\n approveRejectBox: {\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n alignItems: 'flex-end',\n },\n },\n userWrapper: {\n [theme.breakpoints.down('sm')]: {\n width: 'calc(100% - 125px)',\n },\n },\n links: {\n fontSize: theme.typography.fontSize,\n },\n}));\n","import React, { useState } from 'react';\nimport Linkify from 'linkifyjs/react';\nimport {\n Typography,\n DialogContent,\n Box,\n DialogTitle,\n IconButton,\n SvgIcon,\n ListItem,\n Button,\n useMediaQuery,\n} from '@mui/material';\n\nimport { useStyles } from './styles';\nimport { CollaboratorWithUser, Milestone, Profile } from 'client';\nimport { Close } from 'components/icons';\nimport { formatSimple } from 'utils';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport { useHistory } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport { useUpdateMilestoneCollab } from 'pages/profile/services/milestones';\nimport WarningModal from 'components/Dialogs/Warning';\nimport CollaboratorsListModal from '../CollaboratorsListModal';\nimport { Dialog, UserList } from 'components';\n\ninterface IMilestonePreviewModalProps {\n author: Profile | undefined;\n collaborators?: CollaboratorWithUser[];\n milestone: Milestone;\n profileUserId: bigint;\n onClose: () => void;\n}\n\nfunction MilestonePreviewModal({\n author,\n collaborators,\n milestone,\n profileUserId,\n onClose,\n}: IMilestonePreviewModalProps) {\n const classes = useStyles();\n const history = useHistory();\n const queryClient = useQueryClient();\n const updateMilestoneCollabMutate = useUpdateMilestoneCollab();\n const authUser = queryClient.getQueryData(['getSelf']);\n const mobileSize = useMediaQuery((theme) => theme.breakpoints.only('xs'));\n const [collaboratorsModal, setCollaboratorsModal] = useState(false);\n const [expandedCollaborators, setExpandedCollaborators] = useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n\n function handleCompanyClick() {\n history.push(`/u/${milestone.company_handle}`);\n window.scrollTo(0, 0);\n }\n\n function handleCollabClick(value: boolean) {\n updateMilestoneCollabMutate.mutate(\n {\n id: milestone.id,\n value,\n userId: profileUserId,\n },\n {\n onSuccess: () => {\n onClose();\n },\n onError: () => {\n setErrorMessage('Oops, something went wrong. Try again later');\n },\n }\n );\n }\n\n return (\n \n {milestone ? (\n <>\n \n \n \n @{author?.username}\n {'\\u00a0\\u00a0'}•{'\\u00a0\\u00a0'}\n {`${formatSimple(milestone.start_date)}${\n !milestone.one_day\n ? ` - ${formatSimple(milestone.end_date)}`\n : ''\n }`}\n \n {milestone.company_name ? (\n \n {milestone.company_name}\n \n ) : null}\n \n \n {milestone.company_handle && (\n \n Linked to:\n handleCompanyClick()}\n >\n @{milestone.company_handle}\n \n \n )}\n \n \n \n \n \n \n {milestone.links?.map((link, index) => (\n {\n return {\n rel: 'noopener noreferrer',\n };\n },\n }}\n >\n {link}\n \n ))}\n \n {collaborators.length > 0 && (\n <>\n 0 ? 4 : 2}>\n Collaborators\n \n ({\n width: 'calc(100% + 48px)',\n marginLeft: '-24px',\n marginRight: '-24px',\n overflow: 'auto',\n [theme.breakpoints.only('xs')]: {\n width: 'calc(100% + 32px)',\n marginLeft: '-16px',\n marginRight: '-16px',\n },\n })}\n >\n (\n <>\n \n \n \n {user.id === authUser?.id && (\n <>\n {disabled ? (\n \n handleCollabClick(false)}\n disabled={updateMilestoneCollabMutate.isLoading}\n >\n Reject\n \n handleCollabClick(true)}\n disabled={updateMilestoneCollabMutate.isLoading}\n >\n Approve\n \n \n ) : (\n \n handleCollabClick(false)}\n disabled={updateMilestoneCollabMutate.isLoading}\n >\n Remove{mobileSize ? '' : ' mention'}\n \n \n )}\n \n )}\n \n )}\n />\n {collaborators.length > 3 && !expandedCollaborators && (\n ({\n pt: 1,\n marginLeft: '24px',\n [theme.breakpoints.only('xs')]: {\n marginLeft: '16px',\n },\n })}\n onClick={() => setExpandedCollaborators(true)}\n >\n {`and ${collaborators.length - 3} ${\n collaborators.length - 3 === 1 ? 'other' : 'others'\n }`}\n \n )}\n \n \n )}\n \n ) : (\n <>\n \n \n Oops, milestone not found!\n \n \n \n )}\n\n {collaboratorsModal && (\n setCollaboratorsModal(false)}\n />\n )}\n\n {!!errorMessage ? (\n setErrorMessage(null)}\n content={errorMessage}\n />\n ) : null}\n \n );\n}\n\nexport default MilestonePreviewModal;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(() => ({\n grid: {\n marginTop: -4,\n },\n}));\n","import React, { Fragment, useMemo, useState } from 'react';\nimport { useQueryClient } from 'react-query';\nimport { Box, Button, Grid, Typography } from '@mui/material';\n\nimport Milestone from '../Milestone';\nimport WarningModal from 'components/Dialogs/Warning';\nimport { LOAD_MILESTONE_ITEMS_LIMIT } from 'pages/profile/constants';\nimport { MilestoneWithUser, Profile } from 'client';\nimport { TShowAllStatus } from '../ExperienceTab/ExperienceTab';\nimport { useStyles } from './styles';\nimport { EmptyState, Alert } from 'components';\n\ninterface MilestoneCount {\n milestones: number;\n collabs: number;\n}\n\ninterface IProps {\n userId: bigint;\n milestones: MilestoneWithUser[];\n showAllStatus: TShowAllStatus;\n readOnly?: boolean;\n toggleShowAllStatus: (key: keyof TShowAllStatus) => void;\n counts?: MilestoneCount;\n onAddMilestoneClick?: () => void;\n}\n\nconst Milestones = ({\n userId,\n milestones,\n readOnly,\n showAllStatus,\n toggleShowAllStatus,\n counts,\n onAddMilestoneClick,\n}: IProps) => {\n const classes = useStyles();\n const queryClient = useQueryClient();\n\n const [errorMessage, setErrorMessage] = useState('');\n const [successMilestoneDelete, setSuccessMilestoneDelete] = useState(false);\n const authUser = queryClient.getQueryData(['getSelf']);\n const ownProfile = userId === authUser?.id;\n\n const milestoneCount = useMemo(() => {\n if (counts) {\n return counts;\n }\n\n const milestoneCount = milestones.filter((milestone) => {\n return milestone.milestone.user_id === userId;\n }).length;\n\n return {\n milestones: milestoneCount,\n collabs: milestones.length - milestoneCount,\n };\n }, [counts, milestones, userId]);\n\n const myMilestones = useMemo(\n () =>\n milestones\n .filter((milestone) => {\n const collab = milestone.milestone.collaborators.filter((collab) => {\n return collab.user_id === userId;\n });\n\n return collab.length === 0;\n })\n .slice(\n 0,\n !showAllStatus.milestones ? LOAD_MILESTONE_ITEMS_LIMIT : undefined\n ),\n [milestones, userId, showAllStatus.milestones]\n );\n\n const myCollabs = useMemo(\n () =>\n milestones\n .filter((milestone) => {\n const collab = milestone.milestone.collaborators.filter((collab) => {\n return collab.user_id === userId && collab.approved;\n });\n\n return collab.length > 0;\n })\n .slice(\n 0,\n !showAllStatus.milestoneCollabs\n ? LOAD_MILESTONE_ITEMS_LIMIT\n : undefined\n ),\n [milestones, userId, showAllStatus.milestoneCollabs]\n );\n\n return (\n <>\n {milestoneCount.milestones > 0 || ownProfile ? (\n <>\n \n {milestoneCount.milestones > 0 ? (\n myMilestones.map((milestone) => (\n \n \n setSuccessMilestoneDelete(true)}\n />\n \n \n ))\n ) : (\n \n onAddMilestoneClick(),\n variant: 'outlined',\n },\n ]}\n />\n \n )}\n\n {milestoneCount.milestones > LOAD_MILESTONE_ITEMS_LIMIT ? (\n \n \n \n ) : null}\n \n \n ) : null}\n\n {milestoneCount.collabs > 0 && myCollabs.length > 0 ? (\n <>\n \n Collaboration Milestones\n \n\n \n {myCollabs.map((milestone) => (\n \n \n \n \n \n ))}\n\n {milestoneCount.collabs > LOAD_MILESTONE_ITEMS_LIMIT ? (\n \n \n \n ) : null}\n \n \n ) : null}\n\n {!!errorMessage ? (\n setErrorMessage(null)}\n content={errorMessage}\n />\n ) : null}\n {successMilestoneDelete && (\n setSuccessMilestoneDelete(false)}\n />\n )}\n \n );\n};\n\nexport default Milestones;\n","import makeStyles from '@mui/styles/makeStyles';\nimport { styled } from '@mui/material';\nimport { RemoveIcon as MuiRemoveIcon } from 'components/icons';\n\nexport const useStyles = makeStyles((theme) => ({\n contentContainer: {},\n headerContainer: {\n display: 'flex',\n justifyContent: 'flex-start',\n width: '100%',\n marginBottom: theme.spacing(3),\n },\n title: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n flex: '1 1 auto',\n },\n subtitle: {\n marginBottom: theme.spacing(1),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n username: {\n marginBottom: theme.spacing(1),\n color: theme.palette.colors.ui_06,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n date: {\n color: theme.palette.colors.ui_06,\n },\n image: {\n height: 64,\n width: 64,\n borderRadius: 21,\n objectFit: 'cover',\n },\n description: {\n flex: '0 0 auto',\n marginBottom: theme.spacing(2),\n\n [theme.breakpoints.down('sm')]: {\n marginBottom: theme.spacing(1),\n },\n },\n link: {\n color: theme.palette.colors.primary,\n cursor: 'pointer',\n textDecoration: 'none',\n flex: '1 1 auto',\n\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n url: {\n color: theme.palette.primary.main,\n cursor: 'pointer',\n textDecoration: 'none',\n paddingBottom: theme.spacing(1.25),\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n linkContainer: {\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n\n [theme.breakpoints.down('sm')]: {\n paddingLeft: 0,\n paddingTop: theme.spacing(2),\n },\n },\n userCard: {\n paddingLeft: 0,\n paddingRight: 0,\n paddingTop: theme.spacing(0.5),\n paddingBottom: theme.spacing(0.5),\n display: 'flex',\n justifyContent: 'space-between',\n },\n approveRejectBox: {\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n alignItems: 'flex-end',\n },\n },\n rejectButton: {\n marginRight: theme.spacing(1),\n [theme.breakpoints.down('sm')]: {\n marginRight: 0,\n marginBottom: theme.spacing(1),\n },\n },\n userWrapper: {\n [theme.breakpoints.down('sm')]: {\n width: 'calc(100% - 125px)',\n marginRight: 0,\n },\n },\n removeMention: {\n marginLeft: theme.spacing(1),\n },\n}));\n\nexport const RemoveIcon = styled(MuiRemoveIcon)(({ theme }) => ({\n width: theme.spacing(1.5),\n height: theme.spacing(1.5),\n}));\n","import React, { useState } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport Linkify from 'linkifyjs/react';\nimport { IconButton, Skeleton, useMediaQuery } from '@mui/material';\nimport { Box, Button, Typography } from '@mui/material';\n\nimport ImageLoader from 'components/ImageLoader';\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport { Alert, Dialog, getCustomExternalLink, UserList } from 'components';\nimport { CollaboratorWithUser, Profile, Project } from 'client';\nimport { RemoveIcon } from 'components/icons';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport { formatMonthYear } from 'utils';\nimport { useStyles } from './styles';\nimport { useUpdateProjectCollab } from 'pages/profile/services/projects';\nimport * as Styled from './styles';\n\ninterface IProjectPreviewModalProps {\n author: Profile | undefined;\n collaborators?: CollaboratorWithUser[];\n project: Project;\n profileUserId: bigint;\n onClose: () => void;\n}\n\nfunction ProjectPreviewModal({\n author,\n collaborators,\n profileUserId,\n project,\n onClose,\n}: IProjectPreviewModalProps) {\n const classes = useStyles();\n const history = useHistory();\n const queryClient = useQueryClient();\n const updateProjectCollabMutate = useUpdateProjectCollab();\n const authUser = queryClient.getQueryData(['getSelf']);\n const mobileSize = useMediaQuery((theme) => theme.breakpoints.only('xs'));\n const [expandedCollaborators, setExpandedCollaborators] = useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n\n function handleCollabClick(value: boolean) {\n updateProjectCollabMutate.mutate(\n {\n id: project.id,\n value,\n userId: profileUserId,\n },\n {\n onSuccess: () => {\n onClose();\n },\n onError: () => {\n setErrorMessage('Oops, something went wrong. Try again later');\n },\n }\n );\n }\n\n function handleCompanyClick() {\n history.push(`/u/${project.company_handle}`);\n window.scrollTo(0, 0);\n }\n\n return (\n \n {project ? (\n <>\n \n \n {!project.image || !project.image.image_id ? (\n \n ) : (\n \n {({ src, loading }) =>\n loading ? (\n \n ) : (\n \n )\n }\n \n )}\n \n \n \n \n {project.title}\n \n \n \n \n \n\n \n {project.company_name}\n \n\n {project.company_handle && (\n \n handleCompanyClick()}\n variant=\"body\"\n >\n @{project.company_handle}\n \n \n )}\n\n \n @{author?.username}\n \n\n \n {formatMonthYear(project.start_date)}\n {'\\u00a0\\u00a0'}•{'\\u00a0\\u00a0'}\n {project.present\n ? 'Present'\n : formatMonthYear(project.end_date)}\n \n \n \n\n \n \n \n\n {project.links?.length > 0 ? (\n \n \n {project?.links?.map((link, index) => (\n getCustomExternalLink(),\n },\n className: classes.url,\n target: {\n url: '_blank',\n },\n ignoreTags: ['style'],\n attributes: (href, type) => {\n return {\n rel: 'noopener noreferrer',\n };\n },\n }}\n >\n \n {link}\n \n \n ))}\n \n \n ) : null}\n\n {collaborators.length > 0 && (\n <>\n 0 ? 4 : 2}>\n Collaborators\n \n ({\n width: 'calc(100% + 48px)',\n marginLeft: '-24px',\n marginRight: '-24px',\n overflow: 'auto',\n [theme.breakpoints.only('xs')]: {\n width: 'calc(100% + 32px)',\n marginLeft: '-16px',\n marginRight: '-16px',\n },\n })}\n >\n (\n <>\n \n \n \n {user.id === authUser?.id && (\n <>\n {disabled ? (\n \n handleCollabClick(false)}\n disabled={updateProjectCollabMutate.isLoading}\n className={classes.rejectButton}\n >\n Reject\n \n handleCollabClick(true)}\n disabled={updateProjectCollabMutate.isLoading}\n >\n Approve\n \n \n ) : (\n \n handleCollabClick(false)}\n disabled={updateProjectCollabMutate.isLoading}\n className={classes.removeMention}\n >\n Remove{mobileSize ? '' : ' mention'}\n \n \n )}\n \n )}\n \n )}\n />\n {collaborators.length > 3 && !expandedCollaborators && (\n ({\n pt: 1,\n marginLeft: '24px',\n [theme.breakpoints.only('xs')]: {\n marginLeft: '16px',\n },\n })}\n onClick={() => setExpandedCollaborators(true)}\n >\n {`and ${collaborators.length - 3} ${\n collaborators.length - 3 === 1 ? 'other' : 'others'\n }`}\n \n )}\n \n \n )}\n \n ) : null}\n\n {!!errorMessage ? (\n setErrorMessage(null)}\n message={errorMessage}\n />\n ) : null}\n \n );\n}\n\nexport default ProjectPreviewModal;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n image: {\n height: 64,\n width: 64,\n borderRadius: 32,\n objectFit: 'cover',\n },\n headerContainer: {\n height: '32px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n title: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n flex: '1 1 auto',\n },\n subtitle: {\n marginBottom: theme.spacing(1),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n description: {\n marginBottom: theme.spacing(2),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n marginLeft: theme.spacing(10),\n [theme.breakpoints.down('sm')]: {\n marginLeft: theme.spacing(9),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n },\n link: {\n alignItems: 'baseline',\n color: theme.palette.colors.primary,\n display: 'inline-block',\n flex: '1 1 auto',\n overflow: 'hidden',\n textDecoration: 'none',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n url: {\n marginBottom: theme.spacing(1),\n color: theme.palette.colors.primary,\n cursor: 'pointer',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n readMore: {\n color: theme.palette.colors.primary,\n cursor: 'pointer',\n textDecoration: 'none',\n marginLeft: theme.spacing(10),\n '&:hover': {\n textDecoration: 'underline',\n },\n [theme.breakpoints.down('sm')]: {\n marginLeft: theme.spacing(9),\n },\n },\n date: {\n color: theme.palette.colors.ui_06,\n marginBottom: theme.spacing(2),\n },\n avatarContainer: {\n flex: '0 0 auto',\n paddingTop: theme.spacing(1),\n },\n titleContainer: {\n paddingLeft: theme.spacing(2),\n overflow: 'auto',\n flex: '1 1 auto',\n\n [theme.breakpoints.down('sm')]: {\n paddingLeft: theme.spacing(1),\n },\n },\n mainContainer: {\n display: 'flex',\n [theme.breakpoints.down('sm')]: {},\n },\n username: {\n marginBottom: theme.spacing(1),\n color: theme.palette.colors.ui_06,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n ellipsis: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n}));\n","import React from 'react';\nimport { Theme } from '@mui/material/styles';\nimport { WithStyles } from '@mui/styles';\nimport createStyles from '@mui/styles/createStyles';\nimport withStyles from '@mui/styles/withStyles';\nimport Editor from '@draft-js-plugins/editor';\nimport api from '../../../client';\nimport { debounce } from 'lodash';\nimport { EditorState, getDefaultKeyBinding, RichUtils } from 'draft-js';\nimport createMentionPlugin from '@draft-js-plugins/mention';\nimport 'draft-js/dist/Draft.css';\nimport '@draft-js-plugins/inline-toolbar/lib/plugin.css';\nimport '@draft-js-plugins/mention/lib/plugin.css';\nimport UserPreviewCard from '../../Cards/UserPreviewCard';\nimport UserAvatar from '../../UserAvatar/UserAvatar';\nimport { EntryComponentProps } from '@draft-js-plugins/mention/lib/MentionSuggestions/Entry/Entry';\nimport { ListItem } from '@mui/material';\nimport {\n handleBeforeInput,\n handlePastedText,\n} from '../../../utils/editorShortcuts';\nimport mentionRegex from '../mentionRegex';\n\nconst styles = (theme: Theme) =>\n createStyles({\n rootEditor: {\n boxSizing: 'border-box',\n cursor: 'text',\n width: '100%',\n minWidth: 0,\n paddingTop: '8.5px',\n paddingBottom: '8.5px',\n fontSize: 14,\n '& span': {\n opacity: 0.9,\n },\n },\n avatar: {\n width: 40,\n height: 40,\n },\n userCard: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(1.5),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n },\n listItemContainer: {\n backgroundColor: theme.palette.colors.ui_02,\n cursor: 'pointer',\n },\n suggestionsContainer: {\n zIndex: 5,\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: 8,\n background: theme.palette.background.paper,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n width: 'calc(100% - 34px)',\n maxWidth: 300,\n },\n modalSuggestionsContainer: {\n maxHeight: 298,\n backgroundColor: theme.palette.colors.ui_01,\n overflowY: 'scroll',\n },\n });\n\ninterface ComposeProps extends WithStyles {\n placeholder: string;\n editorState: EditorState;\n setEditorState: (newState: EditorState) => void;\n processing?: boolean;\n location: string;\n onChange: any;\n maxLength: number;\n setLoadingUsername?: any;\n onFocus?: () => void;\n onBlur?: () => void;\n}\n\nconst UsernameTextField = ({\n classes,\n placeholder,\n editorState,\n setEditorState,\n processing = false,\n location,\n maxLength,\n setLoadingUsername,\n onFocus,\n onBlur,\n}: ComposeProps) => {\n const editor = React.useRef(null);\n const [open, setOpen] = React.useState(false);\n const [suggestions, setSuggestions] = React.useState([]);\n\n function Entry(props: EntryComponentProps): React.ReactElement {\n const {\n mention,\n searchValue, // eslint-disable-line @typescript-eslint/no-unused-vars\n isFocused, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...parentProps\n } = props;\n\n return (\n
    \n \n \n \n
    \n );\n }\n\n const mapKeyToEditorCommand = React.useCallback(\n (e) => {\n if (e.keyCode === 9 /* TAB */) {\n const newEditorState = RichUtils.onTab(\n e,\n editorState,\n 4 /* maxDepth */\n );\n if (newEditorState !== editorState) {\n setEditorState(newEditorState);\n }\n return;\n }\n return getDefaultKeyBinding(e);\n },\n [editorState, setEditorState]\n );\n\n const { MentionSuggestions, plugins } = React.useMemo(() => {\n const mentionPlugin = createMentionPlugin({\n mentionRegExp: mentionRegex,\n entityMutability: 'IMMUTABLE',\n //mentionPrefix: '@',\n mentionTrigger: [''],\n supportWhitespace: false,\n //mentionRegExp: `/^[a-zA-Z0-9._-]+$/`,\n\n theme: {\n mentionSuggestionsPopupVisible: `${classes.suggestionsContainer} ${\n location === 'modal' ? classes.modalSuggestionsContainer : ''\n }`,\n mentionSuggestionsEntryFocused: classes.listItemContainer,\n },\n });\n // eslint-disable-next-line no-shadow\n const { MentionSuggestions } = mentionPlugin;\n // eslint-disable-next-line no-shadow\n const plugins = [mentionPlugin];\n\n return { plugins, MentionSuggestions };\n }, []);\n\n const debounceSearch = React.useCallback(\n debounce((value) => {\n api\n .autoSuggest(value, 0n, 5n)\n .then((response) => {\n const newSuggestions = [];\n response.map((suggestion) => {\n const newSuggestion = {\n id: suggestion.id,\n name: suggestion.username,\n title: suggestion.display_name,\n avatar: ,\n profile: suggestion,\n };\n newSuggestions.push(newSuggestion);\n });\n setSuggestions(newSuggestions);\n })\n .catch((err) => console.log(err))\n .finally(() => setLoadingUsername(false));\n }, 1000),\n []\n );\n\n const onOpenChange = React.useCallback((_open: boolean) => {\n setOpen(_open);\n }, []);\n const onSearchChange = React.useCallback(\n ({ value }: { value: string }) => {\n if (value.length >= 2 && value.length <= 20) {\n setLoadingUsername(true);\n debounceSearch(value);\n } else {\n setOpen(false);\n setSuggestions([]);\n }\n },\n [debounceSearch]\n );\n\n return (\n editor.current.focus()}\n onClick={() => {\n editor.current!.focus();\n }}\n >\n handleBeforeInput(editorState, maxLength)}\n //handlePastedText={(pastedText) => handlePastedText(pastedText, editorState, maxLength)}\n spellCheck={true}\n ref={(element) => {\n editor.current = element;\n }}\n readOnly={processing}\n plugins={plugins}\n onFocus={onFocus}\n onBlur={onBlur}\n />\n {\n // get the mention object selected\n }}\n entryComponent={Entry}\n renderEmptyPopup={false}\n />\n \n );\n};\n\nexport default withStyles(styles)(UsernameTextField);\n","import React from 'react';\nimport { useTheme } from '@mui/material/styles';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Typography, SvgIcon, InputAdornment } from '@mui/material';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport Username from '../Compose/TextField/Username';\nimport { WarningIcon } from '../icons';\nimport Loading from '../Loading';\nimport TextField from './TextField';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n minWidth: 400,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n padding: theme.spacing(2),\n },\n inputContainer: {\n marginTop: theme.spacing(2),\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: theme.spacing(3),\n borderTop: 'none',\n },\n disabledField: {\n '& .MuiInput-underline.Mui-disabled:before': {\n borderBottomStyle: 'solid',\n opacity: 0.38,\n },\n '& .MuiInputBase-root.Mui-disabled': {\n background: theme.palette.colors.ui_04,\n },\n },\n inputIcon: {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n },\n titleContainer: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n paddingLeft: 0,\n paddingRight: 0,\n },\n label: {\n width: '100%',\n transform: 'translate(0, 1.5px) scale(1)',\n },\n errorText: {\n fontSize: theme.typography.pxToRem(12),\n },\n errorContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n errorIcon: {\n height: 16,\n width: 16,\n marginRight: theme.spacing(1),\n },\n labelContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n\n '& .MuiFormLabel-root.Mui-error': {\n color: theme.palette.primary.main,\n },\n '& .MuiInput-root.Mui-error': {\n background: theme.palette.colors.danger,\n },\n '& .MuiInput-underline.Mui-error:after': {\n borderBottomColor: '#1E1A2D',\n opacity: 0.25,\n },\n },\n icon: {\n height: 16,\n width: 16,\n },\n startAdornment: {\n height: 'auto',\n },\n startText: {\n paddingTop: theme.spacing(0.25),\n paddingBottom: theme.spacing(0.75),\n opacity: 0.4,\n fontSize: theme.typography.fontSize,\n },\n iconContainer: {\n marginRight: theme.spacing(1.5),\n },\n}));\n\n// TODO kill it with fire\n// use search instead\nconst MentionsInputField = ({\n formik,\n lengthLimit,\n inputLabel,\n valueName,\n initialValue,\n error,\n loading,\n placeholder,\n startAdornment = null,\n onChange,\n}) => {\n const classes = useStyles();\n const theme = useTheme();\n const [loadingUsername, setLoadingUsername] = React.useState(false);\n const [editorState, setEditorState] = React.useState(() =>\n createEditorStateWithText(initialValue)\n );\n\n const { overLengthLimit } = React.useMemo(() => {\n const contentLength = editorState\n .getCurrentContent()\n .getPlainText('')\n .replace(/\\s|@/g, '').length;\n const reachedLenghtLimit = contentLength >= lengthLimit;\n const overLengthLimit = contentLength > lengthLimit;\n return { reachedLenghtLimit, overLengthLimit };\n }, [editorState]);\n\n React.useEffect(() => {\n const updateFormik = async () => {\n const text = editorState\n .getCurrentContent()\n .getPlainText('')\n .replace(/\\s|@/g, '');\n formik.setFieldValue(valueName, text);\n onChange && onChange(text);\n };\n updateFormik();\n }, [editorState]);\n\n return (\n <>\n \n \n {startAdornment}\n \n \n ),\n endAdornment: (\n <>\n {typeof error !== 'undefined' ? (\n \n \n \n ) : (\n loadingUsername && (\n \n \n \n )\n )}\n \n ),\n inputProps: {\n placeholder: placeholder,\n editorState,\n setEditorState,\n processing: loading,\n setLoadingUsername: setLoadingUsername,\n location: 'modal', //look into this\n lengthLimit: lengthLimit,\n },\n inputComponent: Username,\n }}\n classes={{\n root: classes.labelContainer,\n }}\n />\n \n );\n};\n\nexport default MentionsInputField;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n container: {\n '& .MuiOutlinedInput-root': {\n fontSize: theme.typography.fontSize,\n },\n },\n label: {\n width: '100%',\n transform: 'translate(0, 1.5px) scale(1)',\n },\n labelContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n menuItem: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.secondary,\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n },\n menu: {\n borderRadius: 10,\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n marginTop: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n maxHeight: 300,\n },\n menuList: {\n padding: 0,\n },\n icon: {\n height: 16,\n width: 16,\n top: 'unset',\n marginRight: theme.spacing(0.5),\n },\n checkboxContainer: {\n display: 'flex',\n alignItems: 'center',\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n checkbox: {\n padding: 0,\n marginRight: theme.spacing(1.5),\n },\n checkboxLabel: {\n fontSize: theme.typography.pxToRem(14),\n },\n logoContainer: {\n display: 'flex',\n flexDirection: 'column',\n },\n logo: {\n height: 64,\n width: 64,\n borderRadius: '50%',\n objectFit: 'cover',\n },\n trashIcon: {\n height: 14,\n width: 14,\n },\n error: {\n marginTop: theme.spacing(0.5),\n textAlign: 'center',\n },\n selectContainer: {\n '& .MuiFormLabel-root.Mui-error': {\n color: theme.palette.primary.main,\n },\n '& .MuiInput-root.Mui-error': {\n background:\n theme.palette.mode === 'light'\n ? 'rgba(224,0,0, 0.07)'\n : 'rgba(224,0,0,0.39)',\n },\n '& .MuiInput-underline.Mui-error:after': {\n borderBottomColor: '#1E1A2D',\n opacity: 0.25,\n },\n },\n input: {\n display: 'none',\n },\n iconButton: {\n marginLeft: theme.spacing(1),\n },\n}));\n","import React from 'react';\nimport * as linkify from 'linkifyjs';\nimport { useFormik } from 'formik';\nimport dayjs from 'dayjs';\nimport {\n Button,\n Typography,\n Box,\n InputLabel,\n IconButton,\n FormHelperText,\n Grid,\n} from '@mui/material';\nimport { Skeleton } from '@mui/material';\n\nimport { AddIcon, RemoveBinIcon } from '../../../../components/icons';\nimport WarningModal from '../../../../components/Dialogs/Warning';\nimport api, {\n Collaborator,\n CollaboratorWithUser,\n Project,\n} from '../../../../client';\nimport ImageLoader from '../../../../components/ImageLoader';\nimport MentionsInputField from '../../../../components/TextInput/MentionsInputField';\nimport { MIME_TYPES_PROJECT as MIME_TYPES } from '../../constants';\nimport {\n formatReaderDataToImage,\n convertBlobToBase64,\n fetchAsBlob,\n} from '../../../../utils/image';\nimport { useStyles } from './styles';\nimport ChooseCollaboratorsModal from '../ChooseCollaboratorsModal';\nimport { getCollaboratorsAdvanced } from 'pages/profile/utils';\nimport TextField from 'components/TextInput/TextField';\nimport { Checkbox, Select } from 'components';\nimport { isUrl } from 'utils/strings';\n\ninterface IProjectFormProps {\n project?: Project;\n collaborators?: CollaboratorWithUser[];\n loading?: boolean;\n onSubmit: (values: any) => void;\n setIsChanged?: (values: any) => void;\n}\n\nfunction ProjectForm({\n project = null,\n collaborators = [],\n loading,\n onSubmit,\n setIsChanged,\n}: IProjectFormProps) {\n const classes = useStyles();\n const year = new Date().getFullYear();\n const [photo, setPhoto] = React.useState(null);\n const [removePhoto, setRemovePhoto] = React.useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n const [collaboratorsModal, setCollaboratorsModal] = React.useState(false);\n const [collaboratorsAdvanced, setCollaboratorsAdvanced] = React.useState({\n newCollab: [],\n pending: [],\n approved: [],\n });\n const usernamesCache = React.useRef({});\n\n const checkUsername = React.useCallback(async (username) => {\n if (usernamesCache.current[username]) {\n return usernamesCache.current[username];\n }\n\n try {\n usernamesCache.current[username] = await api.getUserByUsername(username);\n\n return usernamesCache.current[username];\n } catch (err) {\n usernamesCache.current[username] = null;\n\n return usernamesCache.current[username];\n }\n }, []);\n\n const months = [\n { value: 1, name: 'January' },\n { value: 2, name: 'February' },\n { value: 3, name: 'March' },\n { value: 4, name: 'April' },\n { value: 5, name: 'May' },\n { value: 6, name: 'June' },\n { value: 7, name: 'July' },\n { value: 8, name: 'August' },\n { value: 9, name: 'September' },\n { value: 10, name: 'October' },\n { value: 11, name: 'November' },\n { value: 12, name: 'December' },\n ];\n\n const years = [];\n for (let i = 0; i <= year - 1900; i++) {\n const item = { value: year - i, name: year - i };\n years.push(item);\n }\n\n const submitProject = React.useCallback(\n async (values) => {\n const content = values.description;\n\n const match = linkify.find(content);\n\n const hashtags = match\n .filter((item) => item.type === 'hashtag')\n .map(({ value }) => value.substr(1));\n\n const company_username = values.company_username.replace(/\\s|@/g, '');\n\n await onSubmit({\n ...values,\n company_username,\n photo,\n removePhoto,\n descriptionData: {\n user_tags: [],\n hashtags,\n text: values.description,\n },\n });\n },\n [onSubmit, photo, removePhoto]\n );\n\n const formik = useFormik({\n initialValues: makeInitialValues(collaborators, project),\n validateOnChange: false,\n validate: async (values) => {\n const errors: Partial<{\n role: string;\n company_username: string;\n company_name: string;\n description: string;\n start: string;\n end: string;\n present: string;\n logo: any;\n links: Array;\n collaborators: Array;\n }> = {};\n\n if (!values.role) {\n errors.role = 'This field is mandatory';\n } else if (values.role.length > 50) {\n errors.role = 'The role cannot be longer than 50 characters';\n }\n\n const company_username = values.company_username.replace(/\\s|@/g, '');\n\n if (company_username.length > 20) {\n errors.company_username =\n 'The company username cannot be longer than 20 characters';\n } else if (\n company_username.length > 0 &&\n (await checkUsername(company_username)) === null\n ) {\n errors.company_username = `The typed username can't be found!`;\n }\n\n if (!values.company_name) {\n errors.company_name = 'This field is mandatory';\n } else if (values.company_name.length > 50) {\n errors.company_name =\n 'The company name cannot be longer than 50 characters';\n }\n\n if (!values.description) {\n errors.description = 'This field is mandatory';\n } else if (values.description.length > 400) {\n errors.description =\n 'The description cannot be longer than 400 characters';\n }\n\n if (values.start.month === 0 || values.start.year === 0) {\n errors.start = 'These fields are mandatory';\n }\n\n if (\n !values.present &&\n (values.end.month === 0 || values.end.year === 0)\n ) {\n errors.end = 'These fields are mandatory';\n }\n\n const start_date = new Date(\n `${values.start.year}-${values.start.month}-1`\n );\n\n let end_date = null;\n if (!values.present) {\n end_date = new Date(`${values.end.year}-${values.end.month}-1`);\n }\n\n const earliestText = '1900/01/01';\n const earliest = new Date(earliestText);\n\n if (start_date > new Date()) {\n errors.start = `Start date can't be after present day`;\n } else if (start_date < earliest) {\n errors.start = `Start date can't be before ${earliestText}`;\n } else if (end_date && start_date > end_date) {\n errors.end = `End date can't be before start date`;\n } else if (end_date && end_date > new Date()) {\n errors.end = `End date can't be after present day`;\n } else if (end_date && end_date < earliest) {\n errors.end = `End date can't be before ${earliestText}`;\n }\n\n const linkErrors = [];\n values.links.map((value, index) => {\n if (value.length > 0 && !isUrl(value)) {\n linkErrors.push(index);\n }\n });\n\n if (linkErrors.length > 0) errors.links = linkErrors;\n\n return errors;\n },\n onSubmit: (values) => {\n const formattedValues = { ...values };\n const formattedCollaborators = [];\n\n values.collaborators.map((collaborator) => {\n formattedCollaborators.push(collaborator.user.id);\n });\n\n formattedValues.collaborators = formattedCollaborators;\n\n submitProject(formattedValues).then(() => formik.resetForm());\n },\n });\n\n React.useEffect(() => {\n if (setIsChanged) setIsChanged(formik.dirty);\n }, [formik.dirty, setIsChanged]);\n\n React.useEffect(() => {\n if (formik.values.collaborators.length > 0) {\n const formatted = getCollaboratorsAdvanced(formik.values.collaborators);\n setCollaboratorsAdvanced(formatted);\n }\n }, [formik.values.collaborators]);\n\n const handleUploadFile = React.useCallback((event) => {\n if (!event.currentTarget.files || event.currentTarget.files.length === 0) {\n return;\n }\n\n const file = event.currentTarget.files[0];\n\n const reader = new FileReader();\n reader.onload = async () => {\n try {\n const imageFormatted = await formatReaderDataToImage(\n reader.result as string,\n 200,\n 200,\n MIME_TYPES\n );\n\n setPhoto(imageFormatted);\n } catch (err) {\n setErrorMessage(\n err.message ||\n `Oops, it looks like this image format isn't supported! Please upload jpg, jpeg and png images only.`\n );\n }\n };\n reader.readAsDataURL(file);\n event.target.value = '';\n }, []);\n\n const handleAddCollaborators = (collaborators) => {\n formik.setFieldValue('collaborators', collaborators);\n setCollaboratorsModal(false);\n };\n\n const handleErrorsChange = (fieldName) =>\n formik.setErrors({\n ...formik.errors,\n [fieldName]: undefined,\n });\n\n const handleLinkChange = (linkIndex) => {\n const links = [...(formik.errors.links || [])];\n const index = links.indexOf(linkIndex);\n links.splice(index, 1);\n formik.setErrors({\n ...formik.errors,\n links,\n });\n };\n\n return (\n <>\n \n handleErrorsChange('role')}\n placeholder=\"Type your role here\"\n value={formik.values.role}\n />\n handleErrorsChange('company_username')}\n />\n handleErrorsChange('company_name')}\n placeholder=\"Type company name here\"\n value={formik.values.company_name}\n />\n handleErrorsChange('description')}\n placeholder=\"Tell us something about the project\"\n value={formik.values.description}\n />\n \n \n Start date\n \n \n\n \n \n {\n formik.setFieldValue('start.month', v);\n handleErrorsChange('start');\n }}\n />\n \n \n {\n formik.setFieldValue('start.year', v);\n handleErrorsChange('start');\n }}\n />\n \n \n\n {formik.errors.start ? (\n \n \n {formik.errors.start}\n \n \n ) : null}\n\n
    \n handleErrorsChange('end')}\n disabled={loading}\n name=\"present\"\n id=\"present\"\n color=\"primary\"\n size=\"small\"\n classes={{\n root: classes.checkbox,\n }}\n />\n \n I still work here\n \n
    \n\n \n \n End date\n \n \n\n \n \n {\n formik.setFieldValue('end.month', v);\n handleErrorsChange('end');\n }}\n />\n \n\n \n {\n formik.setFieldValue('end.year', v);\n handleErrorsChange('end');\n }}\n />\n \n \n\n {formik.errors.end ? (\n \n \n {formik.errors.end}\n \n \n ) : null}\n\n \n Company Logo (optional)\n\n \n {photo ? (\n \"Logo\"\n ) : !project || project.image.image_id === '' || removePhoto ? (\n \n ) : (\n \n {({ src, loading }) => {\n if (!!src) {\n fetchAsBlob(src)\n .then(convertBlobToBase64)\n .then((res) => {\n setPhoto(res);\n });\n }\n\n return loading ? (\n \n ) : (\n \"Dummy\n );\n }}\n \n )}\n \n \n Max. size 800 x 800 px or max. 1MB.\n \n \n \n {\n setPhoto(null);\n setRemovePhoto(true);\n }}\n size=\"large\"\n >\n \n \n \n \n \n\n {Array.from({ length: 4 }, (_, i) => (\n 0 && formik.errors.links.includes(i)\n }\n errorText={\n formik.errors.links?.length > 0 && formik.errors.links.includes(i)\n ? 'Link is invalid'\n : undefined\n }\n lengthLimit={200}\n name={`links[${i}]`}\n onChange={formik.handleChange}\n onFocus={() => handleLinkChange(i)}\n placeholder=\"Add company link here\"\n value={formik.values.links[i]}\n />\n ))}\n\n \n \n Collaborators\n \n \n Who worked on this project with you? Give them the credit they\n deserve by adding them here.\n \n \n \n }\n disabled={loading}\n sx={{\n display: 'inline-flex',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n onClick={() => setCollaboratorsModal(true)}\n >\n {formik.values?.collaborators?.length > 0\n ? `Manage collaborators`\n : `Add collaborators`}\n \n \n {formik.values.collaborators.length > 0 && (\n \n {collaboratorsAdvanced.newCollab.length > 0 && (\n \n {`${collaboratorsAdvanced.newCollab.length} ${\n collaboratorsAdvanced.newCollab.length === 1\n ? `request`\n : `requests`\n } will be sent`}\n \n )}\n {collaboratorsAdvanced.pending.length > 0 && (\n \n {`${collaboratorsAdvanced.pending.length} ${\n collaboratorsAdvanced.pending.length === 1\n ? `request`\n : `requests`\n } sent`}\n \n )}\n {collaboratorsAdvanced.approved.length > 0 && (\n \n {`${collaboratorsAdvanced.approved.length} ${\n collaboratorsAdvanced.approved.length === 1\n ? `request`\n : `requests`\n } approved`}\n \n )}\n \n )}\n \n \n \n\n {!!errorMessage ? (\n setErrorMessage('')}\n content={errorMessage}\n />\n ) : null}\n\n {collaboratorsModal ? (\n setCollaboratorsModal(false)}\n confirm={handleAddCollaborators}\n confirmButton=\"Update collaborators\"\n loading={false}\n initialCollaborators={formik.values.collaborators}\n />\n ) : null}\n \n );\n}\n\nexport interface IExperienceForm {\n role: string;\n company_username: string;\n company_name: string;\n description: string;\n start: {\n day: number;\n month: number;\n year: number;\n };\n end: {\n day: number;\n month: number;\n year: number;\n };\n present: boolean;\n logo: any;\n links: Array;\n collaborators: Array;\n}\n\nconst makeInitialValues = (\n collaborators: Array,\n project?: Experience\n): IExperienceForm => {\n if (!project) {\n return {\n role: '',\n company_username: '',\n company_name: '',\n description: '',\n start: {\n day: 1,\n month: 0,\n year: 0,\n },\n end: {\n day: 1,\n month: 0,\n year: 0,\n },\n present: false,\n logo: '',\n links: ['', '', '', ''],\n collaborators: [],\n };\n }\n\n const start = dayjs(Number(project.start_date));\n const end = project.present ? null : dayjs(Number(project.end_date));\n\n return {\n role: project.title,\n company_username: project.company_handle,\n company_name: project.company_name,\n description: project.description.text,\n start: {\n day: 1,\n month: project.start_date ? start.month() + 1 : 0,\n year: project.start_date ? start.year() : 0,\n },\n end: end\n ? {\n day: 1,\n month: project.end_date ? end.month() + 1 : 0,\n year: project.end_date ? end.year() : 0,\n }\n : {\n day: 1,\n month: 0,\n year: 0,\n },\n present: project.present,\n logo: '',\n links: Array(4)\n .fill({})\n .map((_, i) => project.links[i] || ''),\n collaborators: collaborators,\n };\n};\n\nexport default ProjectForm;\n","import React from 'react';\nimport ProjectForm from '../ProjectForm';\nimport { CollaboratorWithUser, Project } from 'client';\nimport { Dialog } from 'components';\n\ninterface IProjectEditModalProps {\n project: Project;\n collaborators?: CollaboratorWithUser[];\n loading?: boolean;\n onClose: () => void;\n onSubmit: (values: any, project: Project) => Promise;\n}\n\nfunction ProjectEditModal({\n project,\n collaborators,\n loading,\n onClose,\n onSubmit,\n}: IProjectEditModalProps) {\n return (\n \n onSubmit(values, project)}\n />\n \n );\n}\n\nexport default ProjectEditModal;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n header: {\n display: 'flex',\n justifyContent: 'flex-end',\n alignItems: 'center',\n flex: '0 0 auto',\n },\n iconButton: {\n padding: theme.spacing(1),\n marginRight: theme.spacing(1),\n color: theme.palette.primary.main,\n },\n}));\n","import React, { useContext, useMemo, useState } from 'react';\nimport { Box, IconButton } from '@mui/material';\nimport { useQueryClient } from 'react-query';\nimport { useParams } from 'react-router-dom';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\nimport type {\n Collaborator,\n CollaboratorWithUser,\n Profile,\n Project,\n} from 'client';\nimport {\n ViewOnIcon,\n ViewOffIcon,\n Share2Icon,\n RemoveBinIcon,\n EditIcon,\n FlagIcon,\n} from 'components/icons';\nimport ReportResource from 'components/Report/ReportResource';\nimport { FEATURES } from 'constants/reportCategories';\nimport {\n useEditProject,\n useRemoveProject,\n useUpdateProjectCollabVisibility,\n} from 'pages/profile/services/projects';\nimport ConfirmModal from 'components/Dialogs/Confirm';\nimport ProjectEditModal from '../ProjectEditModal';\nimport { Alert, Dialog } from 'components';\nimport { formattedDate } from 'utils';\nimport { getCollaboratorsAdvanced } from 'pages/profile/utils';\nimport { useStyles } from './styles';\nimport { getPaginatedOptimizedDiscoveryFeedQueryKey } from 'pages/discover/services';\nimport { getPaginatedOptimizedUserFeedQueryKey } from 'pages/home/services';\nimport { getPaginatedOptimizedProfileFeedQueryKey } from 'pages/profile/services';\nimport { getPaginatedOptimizedHashtagFeedQueryKey } from 'pages/hashtag/services';\nimport { RouteParams as ProfileRouteParams } from 'pages/profile';\nimport { OpenDistriktContext } from 'providers';\n\nexport const INIT_ACTION_STATES = {\n reportProject: false,\n deleteProject: false,\n editProject: false,\n shareProject: false,\n showProject: false,\n hideProject: false,\n};\n\ninterface IProjectHeaderProps {\n authUser: Profile | undefined;\n author?: Profile | undefined;\n collaborators?: CollaboratorWithUser[];\n project: Project;\n profileUserId: bigint;\n isCollab?: boolean;\n isVisible?: boolean;\n readOnly?: boolean;\n showMenu?: boolean;\n onProjectDelete?: () => void;\n}\n\nfunction ProjectHeader({\n authUser,\n author,\n collaborators,\n isCollab,\n isVisible,\n project,\n profileUserId,\n readOnly = false,\n showMenu = true,\n onProjectDelete,\n}: IProjectHeaderProps) {\n const classes = useStyles();\n const queryClient = useQueryClient();\n const removeProjectMutate = useRemoveProject();\n const isTrusted: boolean =\n queryClient.getQueryData(['isUserTrusted', authUser?.id]) || false;\n const editProjectMutate = useEditProject();\n const updateProjectCollabVisibilityMutate = useUpdateProjectCollabVisibility();\n const groupedCollaborators = useMemo(\n () =>\n getCollaboratorsAdvanced((collaborators as unknown) as Collaborator[]),\n [collaborators]\n );\n const isApprovedCollab = useMemo(() => {\n if (!isCollab) {\n return false;\n }\n\n return groupedCollaborators.approved.some(\n (collaborator) => collaborator.user.id === authUser?.id\n );\n }, [authUser?.id, groupedCollaborators.approved, isCollab]);\n\n const [actionStates, setActionStates] = useState(INIT_ACTION_STATES);\n const [errorMessage, setErrorMessage] = useState('');\n const [successEdit, setSuccessEdit] = useState(false);\n\n const { mode, handleAction: openDistriktAction } = useContext(\n OpenDistriktContext\n );\n\n const isOwner = mode === 'User' && authUser?.id === project.user_id;\n\n const moreItems = useMemo(() => {\n const items = [];\n\n items.push({\n title: `Share Project`,\n icon: ,\n handleClick: () =>\n openDistriktAction(() =>\n setActionStates({ ...INIT_ACTION_STATES, shareProject: true })\n ),\n });\n\n if (isOwner || isTrusted) {\n items.push({\n title: `Delete Project`,\n icon: ,\n danger: true,\n\n handleClick: () =>\n setActionStates({ ...INIT_ACTION_STATES, deleteProject: true }),\n });\n } else {\n items.push({\n title: `Report Project`,\n icon: ,\n danger: true,\n handleClick: () =>\n openDistriktAction(() =>\n setActionStates({ ...INIT_ACTION_STATES, reportProject: true })\n ),\n });\n }\n return items;\n }, [isOwner, isTrusted, openDistriktAction]);\n\n async function handleDelete() {\n await removeProjectMutate.mutateAsync(\n { id: project.id },\n {\n onSuccess: () => {\n queryClient.invalidateQueries([\n 'getExperiencesWithUserData',\n profileUserId,\n ]);\n queryClient.invalidateQueries(\n getPaginatedOptimizedDiscoveryFeedQueryKey\n );\n queryClient.invalidateQueries(getPaginatedOptimizedUserFeedQueryKey);\n queryClient.invalidateQueries(\n getPaginatedOptimizedProfileFeedQueryKey\n );\n queryClient.invalidateQueries(\n getPaginatedOptimizedHashtagFeedQueryKey\n );\n setActionStates(INIT_ACTION_STATES);\n onProjectDelete && onProjectDelete();\n },\n onError: () => {\n setErrorMessage('Oops, something went wrong. Try again later');\n },\n }\n );\n }\n\n async function handleEditSubmit(values: any, _: never) {\n await editProjectMutate.mutateAsync(\n {\n projectForm: values,\n project,\n userId: profileUserId,\n },\n {\n onSuccess: () => {\n setActionStates(INIT_ACTION_STATES);\n setSuccessEdit(true);\n },\n onError: (error: any) => {\n setErrorMessage(\n error?.message || 'Oops, something went wrong. Try again later'\n );\n },\n }\n );\n }\n\n function submitVisibilityChange(visibility: boolean) {\n updateProjectCollabVisibilityMutate.mutate(\n { id: project.id, visibility, userId: profileUserId },\n {\n onError: () => {\n setErrorMessage('Oops, something went wrong. Try again later');\n },\n onSettled: () => {\n setActionStates(INIT_ACTION_STATES);\n },\n }\n );\n }\n\n const routeParams = useParams() as Partial;\n\n const isPrivateProfile = useMemo(\n () => routeParams.username === authUser?.username,\n [authUser?.username, routeParams.username]\n );\n\n return (\n <>\n \n {showMenu ? (\n \n {isPrivateProfile &&\n isApprovedCollab &&\n isVisible !== undefined &&\n !readOnly ? (\n <>\n \n setActionStates({\n ...INIT_ACTION_STATES,\n showProject: !isVisible,\n hideProject: isVisible,\n })\n }\n size=\"large\"\n >\n {isVisible ? (\n \n ) : (\n \n )}\n \n \n ) : null}\n\n {!isCollab && isOwner && !readOnly ? (\n \n setActionStates({\n ...INIT_ACTION_STATES,\n editProject: true,\n })\n }\n size=\"large\"\n >\n \n \n ) : null}\n\n {!isOwner || !readOnly ? (\n \n ) : null}\n \n ) : null}\n \n\n \n setActionStates({ ...actionStates, reportProject: value })\n }\n resource_id={project.id}\n feature={FEATURES.PROJECTS}\n />\n\n {actionStates.hideProject ? (\n \n Are you sure you want to hide this Project on your Profile?\n
    \n
    \n You can always toggle between show/hide projects and milestones\n where you’re listed as a collaborator.\n

    \n }\n confirmButton=\"Yes, hide\"\n loading={updateProjectCollabVisibilityMutate.isLoading}\n confirm={() => submitVisibilityChange(false)}\n close={() => setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n\n {actionStates.showProject ? (\n \n Are you sure you want to display this Project publicly on your\n Profile?\n
    \n
    \n You can always toggle between show/hide projects and milestones\n where you’re listed as a collaborator.\n

    \n }\n confirmButton=\"Yes, display\"\n loading={updateProjectCollabVisibilityMutate.isLoading}\n confirm={() => submitVisibilityChange(true)}\n close={() => setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n\n {actionStates.deleteProject ? (\n setActionStates(INIT_ACTION_STATES)}\n onSubmit={handleDelete}\n />\n ) : null}\n\n {actionStates.editProject ? (\n setActionStates(INIT_ACTION_STATES)}\n onSubmit={handleEditSubmit}\n />\n ) : null}\n\n {actionStates.shareProject ? (\n setActionStates(INIT_ACTION_STATES)}\n resource_type=\"project\"\n quoted_resource={{\n project: {\n experience: project,\n collaborators,\n user: author,\n },\n author: authUser,\n date: formattedDate(project.start_date),\n }}\n />\n ) : null}\n\n {!!errorMessage ? (\n setErrorMessage('')}\n />\n ) : null}\n {successEdit && (\n setSuccessEdit(false)}\n />\n )}\n \n );\n}\n\nexport default ProjectHeader;\n","import React, { useCallback, useContext, useMemo, useState } from 'react';\nimport { Box, Skeleton } from '@mui/material';\nimport { Link, Typography } from '@mui/material';\nimport { Link as RouterLink } from 'react-router-dom';\nimport Linkify from 'linkifyjs/react';\n\nimport CollaboratorsListModal from '../CollaboratorsListModal';\nimport ImageLoader from 'components/ImageLoader';\nimport { Collaborator, CollaboratorWithUser, Profile, Project } from 'client';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport { formatMonthYear } from 'utils/formatDate';\nimport { useStyles } from './styles';\nimport ProjectPreviewModal from '../ProjectPreviewModal';\nimport { getCollaboratorsAdvanced } from 'pages/profile/utils';\nimport ProjectHeader from '../ProjectHeader';\nimport { getCustomExternalLink } from 'components';\nimport { OpenDistriktContext } from 'providers';\n\nexport const INIT_ACTION_STATES = {\n previewProject: false,\n showCollaborators: false,\n};\n\ninterface IProjectContentProps {\n authUser: Profile | undefined;\n author: Profile | undefined;\n collaborators: CollaboratorWithUser[];\n profileUserId: bigint;\n project: Project;\n isCollab?: boolean;\n isVisible?: boolean;\n readOnly?: boolean;\n showMenu?: boolean;\n onProjectDelete?: () => void;\n}\n\nfunction ProjectContent({\n author,\n collaborators,\n profileUserId,\n project,\n authUser,\n isCollab,\n isVisible,\n readOnly,\n showMenu,\n onProjectDelete,\n}: IProjectContentProps) {\n const classes = useStyles();\n\n const [actionStates, setActionStates] = useState(INIT_ACTION_STATES);\n const groupedCollaborators = useMemo(\n () =>\n getCollaboratorsAdvanced((collaborators as unknown) as Collaborator[]),\n [collaborators]\n );\n\n const { handleAction: openDistriktAction } = useContext(OpenDistriktContext);\n\n const openCollaboratorsModal = useCallback(\n (e) => {\n e.stopPropagation();\n e.preventDefault();\n\n openDistriktAction(() =>\n setActionStates({\n ...INIT_ACTION_STATES,\n showCollaborators: true,\n })\n );\n },\n [openDistriktAction]\n );\n\n return (\n <>\n
    \n
    \n {!project.image || !project.image.image_id ? (\n \n ) : (\n \n {({ src, loading }) =>\n loading ? (\n \n ) : (\n \"Dummy\n )\n }\n \n )}\n
    \n
    \n \n \n \n {isCollab ? project.company_name : project.title}\n \n\n \n \n\n {!isCollab ? (\n \n {project.company_name}\n \n ) : null}\n\n {project.company_handle && (\n \n \n @{project.company_handle}\n \n \n )}\n \n\n \n \n @{author?.username}\n \n {groupedCollaborators.approved.length > 0 && (\n \n +{groupedCollaborators.approved.length}\n \n )}\n \n
    \n \n {formatMonthYear(project.start_date)}\n {'\\u00a0\\u00a0'}•{'\\u00a0\\u00a0'}\n {project.present ? 'Present' : formatMonthYear(project.end_date)}\n \n
    \n
    \n
    \n
    \n \n \n \n ({\n '& > span:first-child': {\n overflow: 'auto',\n flex: '1 1 auto',\n },\n '& > span:second-child': {\n overflow: 'auto',\n flex: '0 0 auto',\n },\n ml: 10,\n\n [theme.breakpoints.only('xs')]: {\n ml: 9,\n },\n })}\n >\n getCustomExternalLink(),\n },\n className: classes.link,\n target: {\n url: '_blank',\n },\n ignoreTags: ['style'],\n attributes: (href, type) => {\n return {\n rel: 'noopener noreferrer',\n };\n },\n }}\n >\n \n
    \n {project.links.length > 0 ? project.links[0] : ''}\n
    \n \n \n {\n setActionStates({\n ...INIT_ACTION_STATES,\n previewProject: true,\n });\n }}\n >\n Read more\n \n \n
    \n\n {actionStates.previewProject ? (\n setActionStates(INIT_ACTION_STATES)}\n project={project}\n collaborators={collaborators}\n />\n ) : null}\n\n {actionStates.showCollaborators ? (\n setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n \n );\n}\n\nexport default ProjectContent;\n","import React, { useMemo } from 'react';\nimport { useQueryClient } from 'react-query';\n\nimport { Profile, Project as IProject, ProjectWithUser } from 'client';\nimport { useIsVisibleExperience } from 'pages/profile/hooks/useIsVisibleExperience';\nimport {\n createPlaceholderProject,\n getCollaborators,\n} from 'pages/profile/utils';\nimport ExperienceCard from '../ExperienceCard';\nimport ProjectContent from '../ProjectContent';\n\nexport interface IProjectProps {\n profileUserId: bigint;\n children?: React.ReactNode;\n isCollab?: boolean;\n project?: ProjectWithUser;\n readOnly?: boolean;\n showMenu?: boolean;\n onProjectDelete?: () => void;\n}\n\nfunction Project({\n isCollab,\n profileUserId,\n project,\n readOnly,\n showMenu,\n onProjectDelete,\n}: IProjectProps) {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const isOwner = authUser?.id === project?.experience.user_id;\n\n const [data, collaborators] = useMemo(() => {\n const data: IProject =\n project?.experience || createPlaceholderProject(authUser);\n\n const collaborators = project\n ? getCollaborators(\n project.collaborators,\n project.user.id,\n authUser?.id,\n true\n )\n : [];\n\n return [data, collaborators];\n }, [authUser, project]);\n\n const isVisible = useIsVisibleExperience({\n collaborators: data.collaborators,\n isCollab,\n isOwner,\n authUserId: authUser?.id,\n });\n\n return (\n \n \n \n );\n}\n\nexport default Project;\n","import React, { Fragment, useMemo, useState } from 'react';\nimport { useQueryClient } from 'react-query';\nimport { Box, Button, Grid, Typography } from '@mui/material';\n\nimport Project from '../Project/Project';\nimport WarningModal from '../../../../components/Dialogs/Warning';\nimport { Collaborator, Profile, ProjectWithUser } from 'client';\nimport { LOAD_PROJECT_ITEMS_LIMIT } from 'pages/profile/constants';\nimport { TShowAllStatus } from '../ExperienceTab/ExperienceTab';\nimport { EmptyState, Alert } from 'components';\n\ninterface ProjectCount {\n projects: number;\n collabs: number;\n}\n\ninterface IExperiencesProps {\n userId: bigint;\n projects?: ProjectWithUser[];\n readOnly?: boolean;\n showAllStatus: TShowAllStatus;\n toggleShowAllStatus: (key: keyof TShowAllStatus) => void;\n onAddProjectClick: () => void;\n counts?: ProjectCount;\n}\n\nfunction Experiences({\n userId,\n projects,\n readOnly,\n showAllStatus,\n toggleShowAllStatus,\n onAddProjectClick,\n counts,\n}: IExperiencesProps) {\n const queryClient = useQueryClient();\n\n const [errorMessage, setErrorMessage] = useState(null);\n const [successProjectDelete, setSuccessProjectDelete] = useState(false);\n const authUser = queryClient.getQueryData(['getSelf']);\n const ownProfile = userId === authUser?.id;\n\n const projectCount = useMemo(() => {\n if (counts) {\n return counts;\n }\n\n const projectCount = projects.filter((experience) => {\n return experience.experience.user_id === userId;\n }).length;\n\n const collabCount = projects\n .filter((experience) => {\n return experience.experience.user_id !== userId;\n })\n .filter((experience) => {\n return experience.experience.collaborators.some(\n (collab: Collaborator) => {\n return collab.user_id === userId && collab.approved;\n }\n );\n }).length;\n\n return {\n projects: projectCount,\n collabs: collabCount,\n };\n }, [counts, projects, userId]);\n\n const myProjects = useMemo(\n () =>\n projects\n .filter((experience) => {\n return experience.experience.user_id === userId;\n })\n .slice(\n 0,\n !showAllStatus.experiences ? LOAD_PROJECT_ITEMS_LIMIT : undefined\n ),\n [projects, userId, showAllStatus.experiences]\n );\n\n const myCollabs = useMemo(() => {\n return projects\n .filter((experience) => {\n const collab = experience.experience.collaborators.filter(\n (collab: Collaborator) => {\n return collab.user_id === userId && collab.approved;\n }\n );\n\n return collab.length > 0;\n })\n .slice(\n 0,\n !showAllStatus.experienceCollabs ? LOAD_PROJECT_ITEMS_LIMIT : undefined\n );\n }, [projects, userId, showAllStatus.experienceCollabs]);\n\n return (\n <>\n {projectCount.projects > 0 || ownProfile ? (\n <>\n \n {projectCount.projects > 0 ? (\n myProjects.map((project) => (\n \n \n setSuccessProjectDelete(true)}\n />\n \n \n ))\n ) : (\n \n onAddProjectClick(),\n variant: 'outlined',\n },\n ]}\n />\n \n )}\n\n {projectCount.projects > LOAD_PROJECT_ITEMS_LIMIT ? (\n \n \n \n ) : null}\n \n \n ) : null}\n\n {projectCount.collabs > 0 ? (\n <>\n \n Collaboration Projects\n \n\n \n {myCollabs.map((project) => (\n \n \n \n \n \n ))}\n\n {projectCount.collabs > LOAD_PROJECT_ITEMS_LIMIT ? (\n \n toggleShowAllStatus('experienceCollabs')}\n >\n {showAllStatus.experienceCollabs ? 'Show Less' : 'Show More'}\n \n \n ) : null}\n \n \n ) : null}\n\n {!!errorMessage && (\n setErrorMessage(null)}\n content={errorMessage}\n />\n )}\n {successProjectDelete && (\n setSuccessProjectDelete(false)}\n />\n )}\n \n );\n}\n\nexport default Experiences;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n root: {\n padding: `28px 10px 54px`,\n margin: 'auto',\n textAlign: 'center',\n },\n placeholderImage: {\n width: 256,\n height: 'auto',\n paddingBottom: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n paddingBottom: theme.spacing(0),\n },\n },\n subtitle: {\n color: theme.palette.colors.ui_06,\n },\n button: {\n marginTop: 12,\n paddingLeft: 45,\n paddingRight: 45,\n },\n icon: {\n height: 12,\n width: 12,\n },\n addButton: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n background:\n theme.palette.mode === 'light'\n ? `#EFEDFE !important`\n : `#40367E !important`,\n color:\n theme.palette.mode === 'light' //TODO: Buttons should have one component so that it is consistent across the entire codebase\n ? `#40367E !important`\n : `#EFEDFE !important`,\n justifyContent: 'flex-start',\n '& .MuiButton-root.Mui-disabled': {\n color: theme.palette.action.disabled,\n },\n },\n sectionTitle: {\n fontSize: theme.typography.pxToRem(14),\n textTransform: 'uppercase',\n fontWeight: 500,\n },\n endIcon: {\n marginLeft: theme.spacing(2),\n },\n}));\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { useQueryClient } from 'react-query';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { Box, Typography } from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\nimport ExperienceSectionHeader from '../ExperienceSectionHeader';\nimport MilestonePreviewModal from '../MilestonePreviewModal';\nimport Milestones from '../Milestones';\nimport ProjectPreviewModal from '../ProjectPreviewModal';\nimport Projects from '../Projects';\nimport WarningModal from 'components/Dialogs/Warning';\nimport {\n useCreateNewMilestone,\n useGetMilestonesWithUserData,\n useGetMilestoneWithUserData,\n} from 'pages/profile/services/milestones';\nimport {\n useCreateNewProject,\n useGetProjectsWithUserData,\n useGetProjectWithUserData,\n} from 'pages/profile/services/projects';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { Loading, Alert } from 'components';\nimport { Collaborator, Profile } from 'client';\nimport {\n MAX_MILESTONES_LIMIT,\n MAX_PROJECTS_LIMIT,\n SHOW_ALL_STATUS_INIT,\n} from 'pages/profile/constants';\nimport { useStyles } from './styles';\nimport CreateMilestoneModal from '../CreateMilestoneModal';\nimport CreateProjectModal from '../CreateProjectModal';\nimport { getCollaborators } from 'pages/profile/utils';\n\nexport type TShowAllStatus = typeof SHOW_ALL_STATUS_INIT;\n\nconst ExperienceTab = () => {\n const theme = useTheme();\n const classes = useStyles();\n const history = useHistory();\n const queryClient = useQueryClient();\n const { username } = useParams>();\n const user = queryClient.getQueryData([\n 'getUser',\n username,\n ]);\n\n const {\n data: projects = [],\n isLoading: isProjectsLoading,\n } = useGetProjectsWithUserData(user?.id, {\n onError: () =>\n setErrorMessage('Oops, something went wrong. Try again later'),\n });\n\n const {\n data: milestones = [],\n isLoading: isMilestonesLoading,\n } = useGetMilestonesWithUserData(user?.id, {\n onError: () =>\n setErrorMessage('Oops, something went wrong. Try again later'),\n });\n\n const authUser = queryClient.getQueryData(['getSelf']);\n const isOwnProfile = authUser && authUser?.id === user?.id;\n\n const [errorMessage, setErrorMessage] = useState('');\n const [openedProjectId, setOpenedProjectId] = useState(null);\n const [openedMilestoneId, setOpenedMilestoneId] = useState(null);\n const [successExperienceCreated, setSuccessExperienceCreated] = useState('');\n const [addProjectModal, setAddProject] = useState(false);\n const [addMilestoneModal, setAddMilestone] = useState(false);\n const [showAllStatus, setShowAllStatus] = useState(SHOW_ALL_STATUS_INIT);\n\n // used to fetch opened project/milestone in case id is passed in url\n const { data: project } = useGetProjectWithUserData(openedProjectId);\n const { data: milestone } = useGetMilestoneWithUserData(openedMilestoneId);\n const createNewProjectMutate = useCreateNewProject();\n const createNewMilestoneMutate = useCreateNewMilestone();\n\n const projectCount = useMemo(() => {\n if (!user || !projects) {\n return { projects: 0, collabs: 0 };\n }\n\n const projectCount = projects.filter((experience) => {\n return experience.experience.user_id === user.id;\n }).length;\n\n const collabCount = projects\n .filter((experience) => {\n return experience.experience.user_id !== user.id;\n })\n .filter((experience) => {\n return experience.experience.collaborators.some(\n (collab: Collaborator) => {\n return collab.user_id === user.id && collab.approved;\n }\n );\n }).length;\n\n return {\n projects: projectCount,\n collabs: collabCount,\n };\n }, [projects, user]);\n\n const milestoneCount = useMemo(() => {\n if (!user || !milestones) {\n return { milestones: 0, collabs: 0 };\n }\n\n const milestoneCount = milestones.filter((milestone) => {\n return milestone.milestone.user_id === user.id;\n }).length;\n\n return {\n milestones: milestoneCount,\n collabs: milestones.length - milestoneCount,\n };\n }, [milestones, user]);\n\n useEffect(() => {\n if (history.location.hash) {\n const name = history.location.hash.split('-')[0];\n if (name === '#project' || name === '#milestone') {\n if (name === '#project') {\n const projectId = BigInt(history.location.hash.split('-')[1]);\n setOpenedProjectId(projectId);\n } else if (name === '#milestone') {\n const milestoneId = BigInt(history.location.hash.split('-')[1]);\n setOpenedMilestoneId(milestoneId);\n }\n\n history.replace(`/u/${user.username}`);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [history.location.hash, user.username]);\n\n function toggleShowAllStatus(key: keyof typeof showAllStatus) {\n setShowAllStatus((prev) => ({\n ...prev,\n [key]: !prev[key],\n }));\n }\n\n if (!user || isProjectsLoading || isMilestonesLoading) {\n return ;\n }\n\n return (\n <>\n \n \n {!isOwnProfile &&\n projectCount.projects === 0 &&\n milestoneCount.milestones === 0 &&\n projectCount.collabs === 0 &&\n milestoneCount.collabs === 0 ? (\n <>\n
    \n \n \n {`Stay tuned for ${user.display_name}'s projects and milestones.`}\n \n
    \n \n ) : (\n <>\n {((!isOwnProfile &&\n (projectCount.projects > 0 || projectCount.collabs > 0)) ||\n isOwnProfile) && (\n <>\n {!!projectCount.projects ? (\n \n {\n setAddProject(true);\n }}\n />\n
    \n ) : null}\n\n setAddProject(true)}\n />\n \n )}\n\n {((!isOwnProfile &&\n (milestoneCount.milestones > 0 || milestoneCount.collabs > 0)) ||\n isOwnProfile) && (\n <>\n {!!milestoneCount.milestones ? (\n \n {\n setAddMilestone(true);\n }}\n />\n \n ) : null}\n\n setAddMilestone(true)}\n />\n \n )}\n \n )}\n \n\n {addProjectModal ? (\n setAddProject(false)}\n onSubmit={async (values) =>\n await createNewProjectMutate.mutateAsync(\n { projectForm: values, userId: user.id },\n {\n onSuccess: () => {\n setAddProject(false);\n setSuccessExperienceCreated('Project');\n },\n }\n )\n }\n />\n ) : null}\n\n {addMilestoneModal ? (\n setAddMilestone(false)}\n onSubmit={async (values) =>\n await createNewMilestoneMutate.mutateAsync(\n {\n milestoneForm: values,\n userId: user.id,\n },\n {\n onSuccess: () => {\n setAddMilestone(false);\n setSuccessExperienceCreated('Milestone');\n },\n }\n )\n }\n isLoading={createNewMilestoneMutate.isLoading}\n />\n ) : null}\n\n {!!openedProjectId && project ? (\n setOpenedProjectId(null)}\n />\n ) : null}\n\n {!!openedMilestoneId && milestone ? (\n setOpenedMilestoneId(null)}\n />\n ) : null}\n\n {!!errorMessage && (\n setErrorMessage('')}\n content={errorMessage}\n />\n )}\n {successExperienceCreated !== '' && (\n setSuccessExperienceCreated('')}\n />\n )}\n \n );\n};\n\nexport default ExperienceTab;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n title: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n companyNameText: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n textAlign: 'right',\n paddingRight: theme.spacing(1.25),\n },\n link: {\n cursor: 'pointer',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n username: {\n color: theme.palette.colors.ui_06,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n addButtonContainer: {\n display: 'flex',\n justifyContent: 'center',\n padding: theme.spacing(1),\n },\n addButton: {\n minWidth: '200px',\n },\n collaboratorContainer: {\n display: 'flex',\n justifyContent: 'start',\n padding: theme.spacing(1),\n },\n collaboratorText: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n '& a': {\n color: theme.palette.primary.main,\n cursor: 'pointer',\n },\n },\n}));\n","import React, { useCallback, useContext, useMemo, useState } from 'react';\nimport { Box, Link, Typography } from '@mui/material';\n\nimport { Collaborator, CollaboratorWithUser, Milestone, Profile } from 'client';\nimport { useStyles } from './styles';\nimport CollaboratorsListModal from '../CollaboratorsListModal';\nimport MilestonePreviewModal from '../MilestonePreviewModal';\nimport { getCollaboratorsAdvanced } from 'pages/profile/utils';\nimport { OpenDistriktContext } from 'providers';\n\nexport const INIT_ACTION_STATES = {\n previewMilestone: false,\n showCollaborators: false,\n};\n\ninterface IMilestoneContentProps {\n author: Profile | undefined;\n collaborators?: CollaboratorWithUser[];\n milestone: Milestone;\n profileUserId: bigint;\n previewMilestone?: boolean;\n closePreviewMilestone?: () => void;\n}\n\nfunction MilestoneContent({\n author,\n collaborators,\n milestone,\n profileUserId,\n previewMilestone,\n closePreviewMilestone,\n}: IMilestoneContentProps) {\n const classes = useStyles();\n\n const [actionStates, setActionStates] = useState(INIT_ACTION_STATES);\n const groupedCollaborators = useMemo(\n () =>\n getCollaboratorsAdvanced((collaborators as unknown) as Collaborator[]),\n [collaborators]\n );\n\n const { handleAction: openDistriktAction } = useContext(OpenDistriktContext);\n\n const openCollaboratorsModal = useCallback(\n (e) => {\n e.stopPropagation();\n e.preventDefault();\n\n openDistriktAction(() =>\n setActionStates({\n ...INIT_ACTION_STATES,\n showCollaborators: true,\n })\n );\n },\n [openDistriktAction]\n );\n\n return (\n <>\n \n {\n setActionStates({\n ...INIT_ACTION_STATES,\n previewMilestone: true,\n });\n }}\n >\n {milestone.title}\n \n \n\n \n 0 ? '50%' : '100%'}\n >\n \n @{author?.username}\n \n\n {/* TODO update to use milestone collaborators because pinned milestones endpoint only returns Milestone not MilestoneWithCollaborators */}\n {groupedCollaborators.approved.length > 0 && (\n \n +{groupedCollaborators.approved.length}\n \n )}\n \n \n\n {actionStates.showCollaborators ? (\n {\n e.stopPropagation();\n e.preventDefault();\n\n setActionStates(INIT_ACTION_STATES);\n }}\n />\n ) : null}\n\n {previewMilestone ? (\n {\n e.stopPropagation();\n e.preventDefault();\n closePreviewMilestone();\n }}\n />\n ) : null}\n \n );\n}\n\nexport default MilestoneContent;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n container: {\n '& .MuiOutlinedInput-input': {\n fontSize: theme.typography.fontSize,\n },\n },\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n width: 500,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n alignItems: 'center',\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n heading: {\n fontSize: theme.typography.pxToRem(14),\n textTransform: 'uppercase',\n fontWeight: 600,\n },\n subheading: {\n fontSize: theme.typography.pxToRem(12),\n opacity: 0.44,\n },\n content: {\n fontSize: theme.typography.pxToRem(12),\n },\n contentContainer: {\n padding: theme.spacing(3),\n paddingTop: 0,\n borderTop: 'none',\n },\n titleContainer: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n paddingLeft: 0,\n paddingRight: 0,\n },\n inputContainer: {\n marginTop: theme.spacing(2),\n },\n icon: {\n height: 16,\n width: 16,\n top: 'unset',\n marginRight: theme.spacing(0.5),\n },\n checkboxContainer: {\n display: 'flex',\n alignItems: 'center',\n paddingTop: theme.spacing(4),\n\n [theme.breakpoints.only('xs')]: {\n paddingTop: theme.spacing(0),\n marginTop: '-16px',\n },\n },\n checkbox: {\n padding: 0,\n marginRight: theme.spacing(1.5),\n },\n checkboxLabel: {\n fontSize: theme.typography.pxToRem(14),\n },\n plusIcon: {\n height: 14,\n width: 14,\n },\n addButton: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n endIcon: {\n marginRight: theme.spacing(2),\n },\n error: {\n fontSize: theme.typography.pxToRem(10),\n marginTop: theme.spacing(0.5),\n color: '#f44336',\n textAlign: 'center',\n },\n input: {\n display: 'none',\n },\n collaborator: {\n fontSize: theme.typography.pxToRem(12),\n opacity: 0.81,\n textAlign: 'right',\n },\n}));\n","import React, { useMemo } from 'react';\nimport { Button, Typography, Box, Grid } from '@mui/material';\nimport * as linkify from 'linkifyjs';\nimport { useFormik } from 'formik';\nimport { AddIcon } from '../../../../components/icons';\nimport WarningModal from '../../../../components/Dialogs/Warning';\nimport api, {\n Collaborator,\n CollaboratorWithUser,\n Milestone,\n} from '../../../../client';\nimport dayjs from 'dayjs';\nimport MentionsInputField from '../../../../components/TextInput/MentionsInputField';\nimport { useStyles } from './styles';\nimport ChooseCollaboratorsModal from '../ChooseCollaboratorsModal';\nimport { getCollaboratorsAdvanced } from 'pages/profile/utils';\nimport TextField from 'components/TextInput/TextField';\nimport { Checkbox, DatePicker } from 'components';\nimport { isUrl } from 'utils/strings';\n\ninterface IMilestoneFormProps {\n milestone?: Milestone;\n collaborators?: CollaboratorWithUser[];\n loading?: boolean;\n onSubmit: (values: any) => void;\n setIsChanged?: (values: any) => void;\n}\n\nfunction MilestoneForm({\n milestone = null,\n collaborators = [],\n loading,\n onSubmit,\n setIsChanged,\n}: IMilestoneFormProps) {\n const classes = useStyles();\n\n const [collaboratorsModal, setCollaboratorsModal] = React.useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n const [collaboratorsAdvanced, setCollaboratorsAdvanced] = React.useState({\n newCollab: [],\n pending: [],\n approved: [],\n });\n\n const usernamesCache = React.useRef({});\n\n const checkUsername = React.useCallback(async (username) => {\n if (usernamesCache.current[username]) {\n return usernamesCache.current[username];\n }\n\n try {\n usernamesCache.current[username] = await api.getUserByUsername(username);\n\n return usernamesCache.current[username];\n } catch (err) {\n usernamesCache.current[username] = null;\n\n return usernamesCache.current[username];\n }\n }, []);\n\n const submitMilestone = React.useCallback(\n async (values) => {\n try {\n const content = values.description;\n\n const match = linkify.find(content);\n\n const hashtags = match\n .filter((item) => item.type === 'hashtag')\n .map(({ value }) => value.substr(1));\n\n const company_username = values.company_username.replace(/\\s/g, '');\n\n await onSubmit({\n ...values,\n company_username,\n descriptionData: {\n user_tags: [],\n hashtags,\n text: values.description,\n },\n });\n } catch (err) {\n console.error(err);\n setErrorMessage(\n err.message ||\n 'Something went wrong. Please try again and check image format (jpg, jpeg, png or gif) and size (max. 1MB)'\n );\n }\n },\n [onSubmit]\n );\n\n const formik = useFormik({\n initialValues: makeInitialValues(collaborators, milestone),\n validateOnChange: false,\n validate: async (values) => {\n const errors: Partial<{\n title: string;\n company_username: string;\n company_name: string;\n description: string;\n start: string;\n end: string;\n present: string;\n links: Array;\n collaborators: Array;\n }> = {};\n\n if (!values.title) {\n errors.title = 'This field is mandatory';\n } else if (values.title.length > 200) {\n errors.title = 'The role cannot be longer than 200 characters';\n }\n\n const company_username = values.company_username.replace(/\\s|@/g, '');\n if (company_username.length > 20) {\n errors.company_username =\n 'The company username cannot be longer than 20 characters';\n } else if (\n company_username.length > 0 &&\n (await checkUsername(company_username)) === null\n ) {\n errors.company_username = `The typed username can't be found!`;\n }\n\n if (values.company_name.length > 50) {\n errors.company_name =\n 'The company name cannot be longer than 50 characters';\n }\n\n if (!values.description) {\n errors.description = 'This field is mandatory';\n } else if (values.description.length > 400) {\n errors.description =\n 'The description cannot be longer than 400 characters';\n }\n\n const start_date = dayjs(values.start, 'DD/MM/YYYY', true);\n let end_date = null;\n if (!values.one_day) end_date = dayjs(values.end, 'DD/MM/YYYY', true);\n\n const earliestText = `01/01/1900`;\n const earliest = dayjs(earliestText, 'DD/MM/YYYY', true);\n\n if (values.start.length === 0) {\n errors.start = 'This field is mandatory';\n } else if (!start_date.isValid()) {\n errors.start = `The date looks wrong. Please check it and reenter.`;\n } else if (start_date.isAfter(dayjs())) {\n errors.start = `Start date can't be after present day`;\n } else if (start_date.isBefore(earliest)) {\n errors.start = `Start date can't be before ${earliestText}`;\n }\n\n if (!values.one_day && values.end.length === 0) {\n errors.end = 'This field is mandatory';\n } else if (end_date && !end_date.isValid()) {\n errors.end = `The date looks wrong. Please check it and reenter.`;\n } else if (end_date && start_date.isAfter(end_date)) {\n errors.end = `End date can't be before start date`;\n } else if (end_date && end_date.isAfter(dayjs())) {\n errors.end = `End date can't be after present day`;\n } else if (end_date && end_date.isBefore(earliest)) {\n errors.end = `End date can't be before ${earliestText}`;\n }\n\n const linkErrors = [];\n values.links.map((value, index) => {\n if (value.length > 0 && !isUrl(value)) {\n linkErrors.push(index);\n }\n });\n if (linkErrors.length > 0) errors.links = linkErrors;\n\n return errors;\n },\n onSubmit: (values) => {\n const formattedValues = { ...values };\n const formattedCollaborators = [];\n\n values.collaborators.map((collaborator) => {\n formattedCollaborators.push(collaborator.user.id);\n });\n\n formattedValues.collaborators = formattedCollaborators;\n\n submitMilestone(formattedValues).then(() => formik.resetForm());\n },\n });\n\n React.useEffect(() => {\n if (setIsChanged) setIsChanged(formik.dirty);\n }, [formik.dirty, setIsChanged]);\n\n React.useEffect(() => {\n if (formik.values.collaborators.length > 0) {\n const formatted = getCollaboratorsAdvanced(formik.values.collaborators);\n setCollaboratorsAdvanced(formatted);\n }\n }, [formik.values.collaborators]);\n\n const handleChangeDate = (date, name) => {\n const newValue = dayjs(date).format('DD/MM/YYYY');\n if (newValue.match(/[0-9/]/g) || newValue === '') {\n formik.setFieldValue(name, newValue);\n formik.setFieldError(name, undefined);\n }\n };\n\n const handleAddCollaborators = (collaborators) => {\n formik.setFieldValue('collaborators', collaborators);\n setCollaboratorsModal(false);\n };\n\n const startDateValue = useMemo(() => {\n return dayjs(formik.values.start, 'DD/MM/YYYY');\n }, [formik.values.start]);\n\n const endDateValue = useMemo(() => {\n return dayjs(formik.values.end, 'DD/MM/YYYY');\n }, [formik.values.end]);\n\n const handleErrorsChange = (fieldName) =>\n formik.setErrors({\n ...formik.errors,\n [fieldName]: undefined,\n });\n\n const handleLinkChange = (linkIndex) => {\n const links = [...(formik.errors.links || [])];\n const index = links.indexOf(linkIndex);\n links.splice(index, 1);\n formik.setErrors({\n ...formik.errors,\n links,\n });\n };\n\n return (\n <>\n \n handleErrorsChange('title')}\n placeholder=\"What was the milestone?\"\n value={formik.values.title}\n />\n handleErrorsChange('description')}\n placeholder=\"Tell us something about the milestone\"\n value={formik.values.description}\n />\n \n handleErrorsChange('company_username')}\n />\n\n \n \n \n {\n handleChangeDate(v, 'start');\n handleErrorsChange('start');\n }}\n />\n {\n handleChangeDate(v, 'end');\n handleErrorsChange('end');\n }}\n />\n \n \n
    \n handleErrorsChange('end')}\n disabled={loading}\n name=\"one_day\"\n id=\"one_day\"\n color=\"primary\"\n size=\"small\"\n classes={{\n root: classes.checkbox,\n }}\n />\n \n One day event\n \n
    \n
    \n
    \n
    \n\n \n {Array.from({ length: 2 }, (_, i) => (\n \n 0 &&\n formik.errors.links.includes(i)\n }\n errorText={\n formik.errors.links?.length > 0 &&\n formik.errors.links.includes(i)\n ? 'Link is invalid'\n : undefined\n }\n lengthLimit={200}\n name={`links[${i}]`}\n onChange={formik.handleChange}\n onFocus={() => handleLinkChange(i)}\n placeholder=\"Add company link here\"\n value={formik.values.links[i]}\n />\n \n ))}\n \n\n
    \n \n Collaborators\n \n \n Who else was part of this milestone? Give them the credit they\n deserve by adding them here.\n \n \n \n }\n sx={{\n display: 'inline-flex',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n onClick={() => setCollaboratorsModal(true)}\n >\n {formik.values.collaborators.length > 0\n ? `Manage collaborators`\n : `Add collaborators`}\n \n \n {formik.values.collaborators.length > 0 && (\n \n {collaboratorsAdvanced.newCollab.length > 0 && (\n \n {`${collaboratorsAdvanced.newCollab.length} ${\n collaboratorsAdvanced.newCollab.length === 1\n ? `request`\n : `requests`\n } will be sent`}\n \n )}\n {collaboratorsAdvanced.pending.length > 0 && (\n \n {`${collaboratorsAdvanced.pending.length} ${\n collaboratorsAdvanced.pending.length === 1\n ? `request`\n : `requests`\n } sent`}\n \n )}\n {collaboratorsAdvanced.approved.length > 0 && (\n \n {`${collaboratorsAdvanced.approved.length} ${\n collaboratorsAdvanced.approved.length === 1\n ? `request`\n : `requests`\n } approved`}\n \n )}\n \n )}\n \n
    \n \n\n {!!errorMessage ? (\n setErrorMessage('')}\n content={errorMessage}\n />\n ) : null}\n\n {collaboratorsModal ? (\n setCollaboratorsModal(false)}\n confirm={handleAddCollaborators}\n confirmButton=\"Update collaborators\"\n loading={loading}\n initialCollaborators={formik.values.collaborators}\n />\n ) : null}\n \n );\n}\n\nexport interface IMilestoneForm {\n title: string;\n company_username: string;\n company_name: string;\n description: string;\n start: string;\n end: string;\n one_day: boolean;\n links: Array;\n collaborators: Array;\n}\n\nconst makeInitialValues = (\n collaborators: Array,\n milestone?: Milestone\n): IMilestoneForm => {\n if (!milestone) {\n return {\n title: '',\n company_username: '',\n company_name: '',\n description: '',\n start: '',\n end: '',\n one_day: false,\n links: ['', ''],\n collaborators: [],\n };\n }\n\n const start = dayjs(Number(milestone.start_date)).format('DD/MM/YYYY');\n const end = milestone.one_day\n ? ''\n : dayjs(Number(milestone.end_date)).format('DD/MM/YYYY');\n\n return {\n title: milestone.title,\n company_username: milestone.company_username,\n company_name: milestone.company_name,\n description: milestone.description.text,\n start: start,\n end: end,\n one_day: milestone.one_day,\n links: Array(2)\n .fill({})\n .map((_, i) => milestone.links[i] || ''),\n collaborators: collaborators,\n };\n};\n\nexport default MilestoneForm;\n","import React from 'react';\n\nimport MilestoneForm from '../MilestoneForm';\nimport { CollaboratorWithUser, Milestone } from 'client';\nimport { Dialog } from 'components';\n\ninterface IMilestoneEditModalProps {\n open: boolean;\n loading?: boolean;\n milestone: Milestone;\n collaborators?: CollaboratorWithUser[];\n onClose: () => void;\n onSubmit: (values: any, milestone: Milestone) => Promise;\n}\n\nfunction MilestoneEditModal({\n collaborators,\n loading,\n milestone,\n onClose,\n onSubmit,\n}: IMilestoneEditModalProps) {\n return (\n \n await onSubmit(values, milestone)}\n />\n \n );\n}\n\nexport default MilestoneEditModal;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n header: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n title: {\n display: '-webkit-box',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 1,\n\n cursor: 'pointer',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n date: {\n color: theme.palette.colors.ui_06,\n },\n iconButton: {\n padding: theme.spacing(1),\n },\n}));\n","import React, { useContext, useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport { Box, IconButton, Typography } from '@mui/material';\n\nimport ConfirmModal from 'components/Dialogs/Confirm';\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport ReportResource from 'components/Report/ReportResource';\nimport WarningModal from 'components/Dialogs/Warning';\nimport type {\n Collaborator,\n CollaboratorWithUser,\n Milestone,\n Profile,\n} from 'client';\nimport {\n EditIcon,\n PinIcon,\n UnpinIcon,\n ViewOnIcon,\n ViewOffIcon,\n Share2Icon,\n RemoveBinIcon,\n FlagIcon,\n} from 'components/icons';\nimport { FEATURES } from 'constants/reportCategories';\nimport { formatSimple, formattedDate } from 'utils/formatDate';\nimport {\n useUpdateMilestone,\n useUpdateMilestoneCollabVisibility,\n useUpdatePinnedMilestone,\n useRemoveMilestone,\n getPinnedMilestonesQueryKey,\n} from 'pages/profile/services/milestones';\nimport { useStyles } from './styles';\nimport MilestoneEditModal from '../MilestoneEditModal';\nimport { getCollaboratorsAdvanced } from 'pages/profile/utils';\nimport { Alert, Dialog } from 'components';\nimport { getPaginatedOptimizedUserFeedQueryKey } from 'pages/home/services';\nimport { getPaginatedOptimizedProfileFeedQueryKey } from 'pages/profile/services';\nimport { getPaginatedOptimizedDiscoveryFeedQueryKey } from 'pages/discover/services';\nimport { getPaginatedOptimizedHashtagFeedQueryKey } from 'pages/hashtag/services';\nimport { RouteParams as ProfileRouteParams } from 'pages/profile';\nimport { OpenDistriktContext } from 'providers';\n\nexport const INIT_ACTION_STATES = {\n deleteMilestone: false,\n editMilestone: false,\n showMilestone: false,\n hideMilestone: false,\n previewMilestone: false,\n reportMilestone: false,\n shareMilestone: false,\n pinnedLimitReached: false,\n};\n\ninterface IMilestoneHeaderProps {\n authUser: Profile;\n author: Profile | undefined;\n disabled: boolean;\n milestone: Milestone;\n profileUserId: bigint;\n collaborators?: CollaboratorWithUser[];\n isCollab?: boolean;\n isVisible?: boolean;\n readOnly?: boolean;\n showMenu?: boolean;\n onMilestoneDelete?: () => void;\n}\n\nfunction MilestoneHeader({\n authUser,\n author,\n disabled,\n isCollab,\n isVisible,\n milestone,\n collaborators,\n profileUserId,\n readOnly = false,\n showMenu = true,\n onMilestoneDelete,\n}: IMilestoneHeaderProps) {\n const classes = useStyles();\n const queryClient = useQueryClient();\n const pinnedMilestones =\n queryClient.getQueryData>([\n getPinnedMilestonesQueryKey,\n profileUserId,\n ]) || [];\n const isTrusted: boolean =\n queryClient.getQueryData(['isUserTrusted', authUser?.id]) || false;\n const removeMilestoneMutate = useRemoveMilestone();\n const updatePinnedMilestoneMutate = useUpdatePinnedMilestone(\n milestone.id,\n milestone.pinned\n );\n const updateMilestoneMutate = useUpdateMilestone();\n const updateMilestoneCollabVisibilityMutate = useUpdateMilestoneCollabVisibility();\n const groupedCollaborators = useMemo(\n () =>\n getCollaboratorsAdvanced((collaborators as unknown) as Collaborator[]),\n [collaborators]\n );\n const isApprovedCollab = useMemo(() => {\n if (!isCollab) {\n return false;\n }\n\n return groupedCollaborators.approved.some(\n (collaborator) => collaborator.user.id === authUser?.id\n );\n }, [authUser?.id, groupedCollaborators.approved, isCollab]);\n\n const [actionStates, setActionStates] = useState(INIT_ACTION_STATES);\n const [errorMessage, setErrorMessage] = useState('');\n const [successEdit, setSuccessEdit] = useState(false);\n\n const { mode, handleAction: openDistriktAction } = useContext(\n OpenDistriktContext\n );\n\n const isOwner = mode === 'User' && authUser?.id === milestone.user_id;\n\n const moreItems = useMemo(() => {\n const items = [];\n\n if (!disabled) {\n items.push({\n title: `Share Milestone`,\n icon: ,\n handleClick: () =>\n openDistriktAction(() =>\n setActionStates({ ...INIT_ACTION_STATES, shareMilestone: true })\n ),\n });\n\n if (isOwner || isTrusted) {\n items.push({\n title: `Delete Milestone`,\n icon: ,\n danger: true,\n handleClick: () =>\n setActionStates({ ...INIT_ACTION_STATES, deleteMilestone: true }),\n });\n } else {\n items.push({\n title: `Report Milestone`,\n icon: ,\n danger: true,\n handleClick: () =>\n openDistriktAction(() =>\n setActionStates({ ...INIT_ACTION_STATES, reportMilestone: true })\n ),\n });\n }\n }\n return items;\n }, [disabled, isOwner, isTrusted, openDistriktAction]);\n\n const date = useMemo(\n () =>\n milestone.end_date\n ? `${formatSimple(milestone.start_date)}-${formatSimple(\n milestone.end_date\n )}`\n : formatSimple(milestone.start_date),\n [milestone.end_date, milestone.start_date]\n );\n\n function submitVisibilityChange(visibility: boolean) {\n updateMilestoneCollabVisibilityMutate.mutate(\n { id: milestone.id, visibility, userId: profileUserId },\n {\n onError: () => {\n setErrorMessage('Oops, something went wrong. Try again later');\n },\n onSettled: () => {\n setActionStates(INIT_ACTION_STATES);\n },\n }\n );\n }\n\n function handlePinClick() {\n if (!milestone.pinned && pinnedMilestones?.length >= 6) {\n setActionStates({ ...INIT_ACTION_STATES, pinnedLimitReached: true });\n return;\n }\n\n updatePinnedMilestoneMutate.mutate();\n }\n\n async function handleEditMilestoneSubmit(values: any, milestone: Milestone) {\n await updateMilestoneMutate.mutateAsync(\n { id: milestone.id, milestoneForm: values, userId: profileUserId },\n {\n onError: () => {\n setErrorMessage('Oops, something went wrong. Try again later');\n },\n onSettled: () => {\n setActionStates(INIT_ACTION_STATES);\n setSuccessEdit(true);\n },\n }\n );\n }\n\n async function handleDelete() {\n await removeMilestoneMutate.mutateAsync(\n { id: milestone.id, userId: profileUserId },\n {\n onError: () => {\n setErrorMessage('Oops, something went wrong. Try again later');\n },\n onSettled: () => {\n queryClient.invalidateQueries(\n getPaginatedOptimizedDiscoveryFeedQueryKey\n );\n queryClient.invalidateQueries(getPaginatedOptimizedUserFeedQueryKey);\n queryClient.invalidateQueries(\n getPaginatedOptimizedProfileFeedQueryKey\n );\n queryClient.invalidateQueries(\n getPaginatedOptimizedHashtagFeedQueryKey\n );\n setActionStates(INIT_ACTION_STATES);\n onMilestoneDelete && onMilestoneDelete();\n },\n }\n );\n }\n\n const routeParams = useParams() as Partial;\n\n const isPrivateProfile = useMemo(\n () => routeParams.username === authUser?.username,\n [authUser?.username, routeParams.username]\n );\n\n return (\n <>\n \n \n \n {date}\n \n \n\n {showMenu && (\n {\n // used to stop event propagation to the milestone header container since the whole container is clickable\n e.stopPropagation();\n }}\n style={{\n display: 'flex',\n flexWrap: 'nowrap',\n }}\n >\n {isPrivateProfile &&\n isApprovedCollab &&\n isVisible !== undefined &&\n !readOnly ? (\n <>\n {\n setActionStates({\n ...INIT_ACTION_STATES,\n showMilestone: !isVisible,\n hideMilestone: isVisible,\n });\n }}\n size=\"large\"\n >\n {isVisible ? (\n \n ) : (\n \n )}\n \n \n ) : null}\n\n {!isCollab && isOwner && !readOnly ? (\n <>\n \n {(milestone as Milestone).pinned ? (\n \n ) : (\n \n )}\n \n\n {\n setActionStates({\n ...INIT_ACTION_STATES,\n editMilestone: true,\n });\n }}\n disabled={disabled || updateMilestoneMutate.isLoading}\n size=\"large\"\n >\n \n \n \n ) : null}\n\n {!isOwner || !readOnly ? (\n \n ) : null}\n\n {actionStates.hideMilestone ? (\n \n Are you sure you want to hide this Milestone on your\n Profile?\n
    \n
    \n You can always toggle between show/hide projects and\n milestones where you’re listed as a collaborator.\n

    \n }\n confirmButton=\"Yes, hide\"\n loading={updateMilestoneCollabVisibilityMutate.isLoading}\n confirm={() => submitVisibilityChange(false)}\n close={() => setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n\n {actionStates.showMilestone ? (\n \n Are you sure you want to display this Milestone publicly on\n your Profile?\n
    \n
    \n You can always toggle between show/hide projects and\n milestones where you’re listed as a collaborator.\n

    \n }\n confirmButton=\"Yes, display\"\n loading={updateMilestoneCollabVisibilityMutate.isLoading}\n confirm={() => submitVisibilityChange(true)}\n close={() => setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n\n \n !value && setActionStates(INIT_ACTION_STATES)\n }\n resource_id={milestone.id}\n resource_type=\"milestone\"\n feature={FEATURES.MILESTONES}\n />\n\n {actionStates.deleteMilestone ? (\n setActionStates(INIT_ACTION_STATES)}\n onSubmit={handleDelete}\n ctaText={!isTrusted ? `Delete` : `Yes, delete`}\n message={\n !isTrusted\n ? `Sure you want to delete your milestone? You won't be able to get it back once it's gone.`\n : `Are you sure you want to delete this milestone?\n Remember that once you perform this action, you cannot undo it and the milestone will be deleted forever.`\n }\n title={!isTrusted ? `Delete milestone` : `Are you sure?`}\n loading={removeMilestoneMutate.isLoading}\n />\n ) : null}\n\n {actionStates.shareMilestone ? (\n setActionStates(INIT_ACTION_STATES)}\n quoted_resource={{\n milestone: {\n milestone,\n collaborators,\n user: author,\n },\n author: authUser,\n date: formattedDate(milestone.start_date),\n }}\n />\n ) : null}\n\n {actionStates.hideMilestone ? (\n \n Are you sure you want to hide this Milestone on your\n Profile?\n
    \n
    \n You can always toggle between show/hide projects and\n milestones where you’re listed as a collaborator.\n

    \n }\n confirmButton=\"Yes, hide\"\n loading={updateMilestoneCollabVisibilityMutate.isLoading}\n confirm={() => submitVisibilityChange(false)}\n close={() => setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n\n {actionStates.editMilestone ? (\n setActionStates(INIT_ACTION_STATES)}\n onSubmit={handleEditMilestoneSubmit}\n />\n ) : null}\n\n setActionStates(INIT_ACTION_STATES)}\n content=\"You can add max 6 pinned milestones\"\n />\n\n {!!errorMessage ? (\n setErrorMessage('')}\n />\n ) : null}\n {successEdit && (\n setSuccessEdit(false)}\n />\n )}\n
    \n )}\n \n \n );\n}\n\nexport default MilestoneHeader;\n","import React, { useCallback, useMemo, useState } from 'react';\nimport { Typography, Box } from '@mui/material';\nimport LoadMoreButton from '../Buttons/LoadMoreButton';\nimport Loading from '../Loading';\nimport UserList from 'components/UserList';\nimport api from '../../client';\nimport { BlockedUser } from '../../pages/profile/components';\nimport { Dialog } from 'components';\nimport { LIKED_USERS_INITIAL_ITEMS_LIMIT } from '../../constants/user';\nimport { flattenInfiniteData } from 'utils';\nimport { sendHeartbeat } from '../../utils/heartbeat';\nimport { useInfiniteQuery, useIsMutating } from 'react-query';\n\ninterface Props {\n close: any;\n title?: string;\n handleUnblockAlert?: any;\n}\n\nconst BlockedUsersModal = ({\n close,\n title = 'Blocked Users',\n handleUnblockAlert,\n}: Props) => {\n const [unblockedUsers, setUnblockedUsers] = useState([]);\n const [unblockingUserId, setUnblockingUserId] = useState(null);\n const isMutatingUnblockUser = useIsMutating(['unblockUser']);\n const fetchBlockedUsers = useCallback(async ({ pageParam = 0 }) => {\n const likes = await api.getBlockedListWithUserData(\n BigInt(pageParam),\n BigInt(LIKED_USERS_INITIAL_ITEMS_LIMIT)\n );\n sendHeartbeat();\n return likes;\n }, []);\n\n const {\n data: pagedUsers,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n isLoading,\n } = useInfiniteQuery(['getBlockedListWithUserData'], fetchBlockedUsers, {\n getNextPageParam: (lastPage, pages) =>\n pages.length * LIKED_USERS_INITIAL_ITEMS_LIMIT,\n });\n const users = useMemo(() => {\n const allUsers = flattenInfiniteData(pagedUsers);\n return allUsers.filter((user) => !unblockedUsers.includes(user.id));\n }, [pagedUsers, unblockedUsers]);\n\n return (\n close()}\n sx={{\n '& .MuiDialogContent-root': {\n paddingLeft: 0,\n paddingRight: 0,\n },\n }}\n loading={!!isMutatingUnblockUser}\n >\n \n {isLoading ? (\n \n \n \n ) : users.length > 0 ? (\n <>\n (\n \n setUnblockedUsers([...unblockedUsers, id])\n }\n processing={!!isMutatingUnblockUser}\n setUnblockingUserId={setUnblockingUserId}\n unblockingUserId={unblockingUserId}\n />\n )}\n />\n\n {users.length >= LIKED_USERS_INITIAL_ITEMS_LIMIT && hasNextPage && (\n \n )}\n \n ) : (\n \n \n There's nobody on your blocked list at the moment.\n \n \n )}\n \n \n );\n};\n\nexport default BlockedUsersModal;\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport {\n Button,\n Dialog,\n Typography,\n DialogContent,\n DialogActions,\n} from '@mui/material';\nimport DialogHeader from './DialogHeader';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n minWidth: 400,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n },\n actions: {\n justifyContent: 'space-evenly',\n display: 'flex',\n alignItems: 'center',\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n content: {\n fontSize: theme.typography.pxToRem(12),\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: theme.spacing(5),\n borderTop: 'none',\n },\n}));\n\ninterface Props {\n onClose: any;\n title: string;\n content: string;\n confirm: any;\n confirmButton: string;\n loading?: boolean;\n}\n\nconst Buttons = ({\n confirm,\n confirmButton,\n onClose,\n loading,\n}: {\n confirm: any;\n confirmButton: string;\n loading: boolean;\n onClose: any;\n}) => {\n const classes = useStyles();\n\n return (\n \n onClose()}\n className={classes.button}\n disabled={loading}\n >\n Cancel\n \n confirm()}\n className={classes.button}\n disabled={loading}\n >\n {confirmButton}\n \n \n );\n};\n\n/**\n * @deprecated This component is deprecated.\n *\n * Try using components/Dialog directly.\n */\nconst RemoveModal = ({\n onClose,\n title,\n content,\n confirm,\n confirmButton,\n loading = false,\n}: Props) => {\n const classes = useStyles();\n\n return (\n onClose()}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n className={classes.dialog}\n maxWidth=\"xs\"\n >\n onClose()} />\n\n \n {content}\n \n\n \n \n );\n};\n\nexport default RemoveModal;\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Dialog, Typography, DialogContent, SvgIcon } from '@mui/material';\nimport { CircledCheck } from '../icons';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n largeIcon: {\n height: 22,\n width: 22,\n color: theme.palette.primary.main,\n },\n confirmContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n paddingTop: `${theme.spacing(3)} !important`,\n paddingBottom: theme.spacing(3),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n },\n confirmContent: {\n marginRight: theme.spacing(2.5),\n fontSize: theme.typography.pxToRem(12),\n },\n}));\n\ninterface Props {\n open: boolean;\n close: any;\n content: string;\n}\n\nconst SuccessModal = ({ open, close, content }: Props) => {\n const classes = useStyles();\n\n return (\n close()}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n className={classes.dialog}\n maxWidth=\"xs\"\n >\n \n {content}\n \n \n \n );\n};\n\nexport default SuccessModal;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n editButtonContainer: {\n alignItems: 'center',\n display: 'flex',\n marginRight: theme.spacing(3),\n marginTop: 0,\n flexWrap: 'wrap-reverse',\n justifyContent: 'end',\n\n [theme.breakpoints.only('xs')]: {\n marginRight: theme.spacing(2),\n },\n },\n button: {},\n followContainer: {\n '& button': {\n marginLeft: theme.spacing(0),\n },\n },\n iconButton: {\n marginRight: theme.spacing(1),\n },\n centeredContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'fixed',\n top: 150,\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(12),\n paddingTop: theme.spacing(1.5),\n paddingBottom: theme.spacing(1.5),\n paddingLeft: theme.spacing(5),\n paddingRight: theme.spacing(5),\n borderRadius: 16,\n left: '50%',\n transform: 'translate(-50%, 0)',\n },\n tooltipIcon: {\n height: 12,\n width: 12,\n },\n tooltipText: {\n fontSize: theme.typography.pxToRem(12),\n marginLeft: theme.spacing(1.5),\n },\n}));\n","import React, { useCallback, useContext, useMemo, useState } from 'react';\nimport { useHistory } from 'react-router';\nimport { useQueryClient } from 'react-query';\nimport { useParams } from 'react-router-dom';\nimport {\n Button,\n Grid,\n Hidden,\n IconButton,\n SvgIcon,\n Typography,\n} from '@mui/material';\nimport { Alert } from 'components';\nimport BlockedUsersModal from 'components/Dialogs/BlockedUsersModal';\nimport FollowButton from 'components/Buttons/FollowButton';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport RemoveModal from 'components/Dialogs/Remove';\nimport ReportResource from 'components/Report/ReportResource';\nimport SuccessModal from 'components/Dialogs/Success';\nimport { FEATURES } from 'constants/reportCategories';\nimport {\n LinkOutline,\n Messages as MessageIcon,\n CopyIcon,\n LockIcon,\n FlagIcon,\n RemoveBinIcon,\n} from 'components/icons';\nimport { Profile } from 'client';\nimport { useIsFollowedBy, useRemoveUser } from 'services';\nimport { useStyles } from './styles';\nimport getExternalUrl from 'utils/getExternalUrl';\nimport { useBlockUser } from 'pages/post/services';\nimport { EditProfileModal } from '..';\nimport { OpenDistriktContext } from 'providers';\n\nexport const INIT_ACTION_STATES = {\n editProfile: false,\n openInput: false,\n toggleCopied: false,\n showDeleteUser: false,\n showSuccess: false,\n showBlockUser: false,\n showBlockedUser: false,\n showUnblockUser: false,\n};\n\ninterface IProfileActionsProps {\n children?: React.ReactNode;\n}\n\nfunction ProfileActions({}: IProfileActionsProps) {\n const classes = useStyles();\n const history = useHistory();\n\n const queryClient = useQueryClient();\n const { username } = useParams>();\n const user = queryClient.getQueryData([\n 'getUser',\n username,\n ]);\n const { data: isFollowed } = useIsFollowedBy(user?.id);\n const authUser = queryClient.getQueryData(['getSelf']);\n\n const { mode, handleAction: openDistriktAction } = useContext(\n OpenDistriktContext\n );\n\n const guestView = useMemo(() => mode !== 'User', [mode]);\n\n const isOwnProfile = !guestView && authUser && authUser?.id === user?.id;\n const isTrusted: boolean =\n queryClient.getQueryData(['isUserTrusted', authUser?.id]) || false;\n const removeUserMutate = useRemoveUser();\n const blockUserMutation = useBlockUser();\n const [successSave, setSuccessSave] = useState(false);\n const [actionStates, setActionStates] = useState(INIT_ACTION_STATES);\n const [unblockedUser, setUnblockedUser] = useState(null);\n const handleDelete = () => {\n removeUserMutate.mutate(\n { id: user.id },\n {\n onSuccess: () => {\n setActionStates({ ...INIT_ACTION_STATES, showSuccess: true });\n setTimeout(() => {\n setActionStates(INIT_ACTION_STATES);\n history.push(`/`);\n }, 3000);\n },\n }\n );\n };\n\n function handleMessageClick() {\n history.push(`/messages/${user.username}`);\n }\n\n const blockUser = useCallback(async () => {\n setTimeout(() => {\n setActionStates(INIT_ACTION_STATES);\n document.location.href = '/';\n }, 4000);\n setActionStates({ ...INIT_ACTION_STATES, showBlockUser: true });\n\n await blockUserMutation.mutateAsync({\n userId: user.id,\n });\n }, [blockUserMutation, user.id]);\n\n const items = useMemo(() => {\n const items = [\n {\n title: 'Copy Profile URL',\n icon: ,\n handleClick: () => {\n navigator.clipboard.writeText(getExternalUrl(`/u/${user.username}`));\n\n // TODO replace with toast\n setActionStates({ ...INIT_ACTION_STATES, toggleCopied: true });\n setTimeout(() => setActionStates(INIT_ACTION_STATES), 2000);\n },\n },\n ];\n\n if (isOwnProfile) {\n const item = {\n title: 'Blocked users',\n icon: ,\n handleClick: () =>\n setActionStates({ ...INIT_ACTION_STATES, showBlockedUser: true }),\n };\n items.push(item);\n }\n\n if (!isOwnProfile) {\n if (isTrusted) {\n const item = {\n title: 'Delete this user',\n danger: true,\n icon: ,\n handleClick: () =>\n setActionStates({ ...INIT_ACTION_STATES, showDeleteUser: true }),\n };\n items.push(item);\n } else {\n const item = {\n title: 'Report user',\n danger: true,\n icon: ,\n handleClick: () =>\n openDistriktAction(() =>\n setActionStates({ ...INIT_ACTION_STATES, openInput: true })\n ),\n };\n items.push(item);\n }\n\n const item = {\n title: 'Block this user',\n icon: ,\n handleClick: () => openDistriktAction(blockUser),\n };\n items.push(item);\n }\n\n return items;\n }, [blockUser, isOwnProfile, isTrusted, openDistriktAction, user.username]);\n\n return (\n <>\n \n {isOwnProfile ? (\n <>\n \n \n setActionStates({ ...INIT_ACTION_STATES, editProfile: true })\n }\n className={classes.button}\n >\n Edit info\n \n \n \n ) : (\n <>\n \n \n \n {!guestView && isFollowed ? (\n <>\n \n \n }\n />\n \n \n ) : null}\n \n )}\n \n \n \n \n\n \n setActionStates({ ...actionStates, openInput: open })\n }\n resource_id={user.id}\n resource_type=\"user\"\n feature={FEATURES.USERS}\n />\n\n {actionStates.toggleCopied ? (\n setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n\n {actionStates.editProfile ? (\n setActionStates(INIT_ACTION_STATES)}\n cancelButton=\"Cancel\"\n confirmButton=\"Save\"\n title=\"Edit Info\"\n onSave={() => setSuccessSave(true)}\n />\n ) : null}\n\n {actionStates.showDeleteUser ? (\n setActionStates(INIT_ACTION_STATES)}\n confirm={handleDelete}\n confirmButton={!isTrusted ? `Delete` : `Yes, delete`}\n content={\n !isTrusted\n ? `Sure you want to delete your user? You won't be able to get it back once it's gone.`\n : `Are you sure you want to delete this user?\n Remember that once you perform this action, you cannot undo it and the user will be deleted forever.`\n }\n title={!isTrusted ? `Delete user` : `Are you sure?`}\n loading={removeUserMutate.isLoading}\n />\n ) : null}\n\n {actionStates.showSuccess ? (\n setActionStates(INIT_ACTION_STATES)}\n content=\"The user has been deleted.\"\n />\n ) : null}\n\n {actionStates.showBlockUser ? (\n setActionStates(INIT_ACTION_STATES)}\n />\n ) : null}\n {actionStates.showUnblockUser ? (\n {\n setUnblockedUser(null);\n setActionStates({ ...actionStates, showUnblockUser: false });\n }}\n />\n ) : null}\n {successSave && (\n setSuccessSave(false)}\n />\n )}\n {actionStates.showBlockedUser ? (\n \n setActionStates({ ...actionStates, showBlockedUser: false })\n }\n handleUnblockAlert={(user) => {\n setUnblockedUser(user);\n setActionStates({ ...actionStates, showUnblockUser: true });\n }}\n />\n ) : null}\n \n );\n}\n\nexport default ProfileActions;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n description: {\n fontSize: theme.typography.pxToRem(14),\n whiteSpace: 'pre-line',\n wordBreak: 'break-word',\n '& a': {\n color: theme.palette.primary.main,\n textDecoration: 'none',\n },\n },\n cardContainer: {\n paddingTop: 0,\n },\n detailsFooter: {\n display: 'flex',\n alignItems: 'center',\n },\n footerText: {\n fontSize: theme.typography.pxToRem(14),\n marginRight: theme.spacing(4.5),\n marginLeft: theme.spacing(2),\n },\n section: {\n paddingBottom: theme.spacing(3),\n paddingTop: theme.spacing(3),\n },\n content: {\n display: 'flex',\n },\n follow: {\n fontSize: theme.typography.pxToRem(14),\n marginRight: theme.spacing(3),\n },\n followCount: {\n fontWeight: 500,\n },\n link: {\n textDecoration: 'none',\n },\n icon: {\n height: 12,\n width: 12,\n },\n emptyText: {\n fontSize: theme.typography.pxToRem(14),\n opacity: 0.4,\n textAlign: 'left',\n },\n badge: {\n width: 24,\n },\n}));\n","import React, { Fragment } from 'react';\nimport { useQueryClient } from 'react-query';\nimport { Box, CardContent, Tooltip, Typography } from '@mui/material';\nimport { Profile } from 'client';\nimport { RichTextFormat } from 'components/RichTextFormat';\n\nimport { useStyles } from './styles';\n\ninterface IProfileInfoProps {\n user: Profile;\n}\n\nfunction ProfileInfo({ user }: IProfileInfoProps) {\n const classes = useStyles();\n const queryClient = useQueryClient();\n\n const authUser = queryClient.getQueryData(['getSelf']);\n\n return (\n <>\n
    \n {user.badges.length !== 0 && (\n \n {user.badges.map((badge) => (\n \n {badge.name === 'early_adopter' && (\n \n \n \n )}\n \n ))}\n \n )}\n
    \n
    \n {user.id === authUser?.id && user.description.trim().length === 0 ? (\n \n Add a bio to let people know who you are and what you do.\n \n ) : (\n \n \n \n )}\n
    \n \n );\n}\n\nexport default ProfileInfo;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n tabsContainer: {\n flexGrow: 1,\n boxShadow: 'none',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n },\n tabs: {\n minHeight: 32,\n height: 32,\n },\n tab: {\n paddingTop: theme.spacing(0.5),\n paddingBottom: theme.spacing(0.5),\n fontSize: theme.typography.pxToRem(12),\n fontWeight: 400,\n textTransform: 'none',\n minHeight: 32,\n height: 32,\n },\n tabPanelAbout: {\n padding: 0,\n },\n tabPanelActivity: {\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(4),\n paddingLeft: 0,\n paddingRight: 0,\n\n [theme.breakpoints.only('xs')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n },\n flexContainer: {\n borderBottomColor: theme.palette.colors.ui_04,\n '& .MuiButtonBase-root': {\n borderBottomColor: theme.palette.colors.ui_04,\n },\n },\n}));\n","import React, { useEffect, useState } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { Tab, Tabs } from '@mui/material';\nimport { TabContext, TabPanel } from '@mui/lab';\n\nimport { ActivityTab, ExperienceTab } from '../';\nimport { PROFILE_TABS } from 'pages/profile/constants';\nimport { ValueOf } from 'types';\nimport { useStyles } from './styles';\n\nconst ProfileTabs = () => {\n const history = useHistory();\n const classes = useStyles();\n const [activeTab, setActiveTab] = useState>(\n PROFILE_TABS.ACTIVITY\n );\n\n // TODO if experience loading is done and opened id not there, throw err\n // TODO add back the single project fetch in case the paginated version does not include it\n\n useEffect(() => {\n if (history.location.hash) {\n const name = history.location.hash.split('-')[0];\n if (name === '#project' || name === '#milestone') {\n setActiveTab('experience');\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [history.location.hash]);\n\n const handleChangeTab = (_: never, value: ValueOf) => {\n setActiveTab(value);\n };\n\n return (\n <>\n \n \n \n \n \n\n \n \n \n\n ({\n padding: 0,\n mt: 5,\n\n [theme.breakpoints.only('xs')]: {\n mt: 4,\n },\n })}\n >\n \n \n \n \n );\n};\n\nexport default ProfileTabs;\n","import React from 'react';\nimport { Box } from '@mui/material';\n\nimport Project, { IProjectProps } from './Project';\nimport { stopPropagationOnEventTags } from 'utils';\n\nfunction SharedProject(props: IProjectProps) {\n const postRef = React.useRef();\n\n return (\n {\n // used to stop event propagation to the container since the whole card is clickable\n stopPropagationOnEventTags(e, postRef);\n }}\n >\n \n \n );\n}\n\nexport default SharedProject;\n","import React from 'react';\nimport { Button, Backdrop, CircularProgress, Box } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport 'cropperjs/dist/cropper.css';\nimport Cropper from 'cropperjs';\nimport clsx from 'clsx';\nimport {\n PROFILE_COVER_PICTURE_ASPECT_RATIO,\n PROFILE_PICTURE_ASPECT_RATIO,\n} from '../../constants';\nimport { Dialog } from 'components';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n borderRadius: 16,\n },\n dialogCover: {\n maxWidth: 656,\n },\n dialogContent: {\n borderTop: 0,\n paddingBottom: theme.spacing(3.5),\n },\n dialogActions: {\n justifyContent: 'space-between',\n padding: `${theme.spacing(2)} ${theme.spacing(1.875)}`,\n },\n dialogTitle: {\n paddingTop: 50,\n },\n title: {\n color: theme.palette.text.primary,\n textTransform: 'uppercase',\n fontWeight: 700,\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n closeButton: {\n position: 'absolute',\n right: theme.spacing(1),\n top: theme.spacing(1),\n color: theme.palette.grey[500],\n fontSize: theme.typography.pxToRem(1),\n },\n actionButton: {\n minWidth: 110,\n },\n backdrop: {\n position: 'absolute',\n zIndex: 1,\n borderRadius: 16,\n },\n cropper: {\n maxHeight: 303,\n maxWidth: 228,\n margin: 'auto',\n '& .cropper-view-box, & .cropper-face': {\n borderRadius: '50%',\n },\n\n '& .cropper-modal': {\n backgroundColor: theme.palette.primary.main,\n },\n\n '& img': {\n width: '100%',\n },\n },\n cropperCover: {\n height: 306,\n maxWidth: 544,\n margin: 'auto',\n\n '& .cropper-modal': {\n backgroundColor: theme.palette.primary.main,\n },\n\n '& img': {\n width: '100%',\n },\n },\n image: {\n display: 'block',\n width: '100%',\n },\n disabled: {\n pointerEvents: 'none',\n opacity: 0.7,\n },\n}));\n\ninterface Props {\n loading?: boolean;\n open: boolean;\n onCancel: () => void;\n onSave: (buffer: string) => void;\n photo: string;\n mode?: 'profile' | 'cover';\n onChangeFile: (event) => void;\n}\n\nconst UploadPhotoModal = ({\n onCancel,\n open,\n photo,\n onSave,\n mode = 'profile',\n onChangeFile,\n loading: backgroundLoading = false,\n}: Props) => {\n const classes = useStyles();\n const cropperRef = React.useRef(null);\n const [loading, setLoading] = React.useState(false);\n\n React.useEffect(() => {\n return () => {\n if (cropperRef.current) {\n cropperRef.current.destroy();\n }\n };\n }, []);\n\n const setImageRef = React.useCallback(\n (element) => {\n if (element === null) {\n return;\n }\n\n // destroy current cropper instance\n if (cropperRef.current) {\n cropperRef.current.destroy();\n }\n\n cropperRef.current = new Cropper(element, {\n aspectRatio:\n mode === 'profile'\n ? PROFILE_PICTURE_ASPECT_RATIO\n : PROFILE_COVER_PICTURE_ASPECT_RATIO,\n viewMode: 1,\n background: false,\n zoomable: true,\n autoCropArea: 1, // 100%\n\n movable: true,\n rotatable: false,\n scalable: false,\n });\n },\n [mode]\n );\n\n const handleSaveClick = React.useCallback(async () => {\n if (!cropperRef.current) {\n return;\n }\n\n setLoading(true);\n try {\n let canvas;\n if (mode === 'cover') {\n canvas = cropperRef.current.getCroppedCanvas({\n width: 1344,\n height: 336,\n });\n } else {\n canvas = cropperRef.current.getCroppedCanvas({\n width: 200,\n height: 200,\n });\n }\n\n await onSave(canvas.toDataURL());\n } catch (err) {\n console.log(err);\n } finally {\n setLoading(false);\n }\n }, [onSave]);\n\n return (\n <>\n {open && (\n \n \n \n \n {mode === 'cover' && (\n \n \n \n \n )}\n \n )}\n \n );\n};\n\nexport default UploadPhotoModal;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n minWidth: 400,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n minWidth: 110,\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n padding: theme.spacing(2),\n },\n subheading: {\n color: theme.palette.colors.primary,\n },\n checkIcon: {\n height: 24,\n width: 24,\n marginLeft: theme.spacing(3),\n },\n placeholderImage: {\n width: 320,\n height: 80,\n borderRadius: 8,\n },\n selectedImage: {\n width: 320,\n height: 80,\n borderRadius: 8,\n border: `4px solid ${theme.palette.colors.primary}`,\n },\n imageContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(0),\n '&:hover': {\n cursor: 'pointer',\n },\n },\n imageContainerUpload: {\n height: 40,\n border: `1px solid ${theme.palette.colors.primary}`,\n justifyContent: 'center',\n borderRadius: 6,\n width: '100%',\n paddingBottom: theme.spacing(2),\n },\n cardContainer: {\n paddingTop: 0,\n paddingBottom: theme.spacing(1.5),\n borderTop: 'none',\n },\n placeholderLoading: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'transparent',\n },\n backdrop: {\n position: 'absolute',\n zIndex: 10,\n borderRadius: 16,\n },\n disabled: {\n pointerEvents: 'none',\n opacity: 0.7,\n },\n}));\n","import React, { useState } from 'react';\nimport clsx from 'clsx';\nimport { useQueryClient } from 'react-query';\nimport { v4 as uuidv4 } from 'uuid';\nimport { Box, Typography, Backdrop, CircularProgress } from '@mui/material';\nimport { Dialog } from 'components';\nimport UploadPhotoModal from 'components/UploadPhotoModal';\nimport { Loading } from 'components';\nimport { Profile } from 'client';\nimport { ProfileImageLoader } from 'components/ImageLoader';\nimport { usePutAsset } from 'pages/profile/services';\nimport { useStyles } from './styles';\nimport { createImageId } from 'pages/profile/utils/profile';\nimport { Principal } from '@dfinity/principal';\n\nconst MIME_TYPES = {\n 'image/jpeg': 'jpeg',\n 'image/jpg': 'jpg',\n 'image/png': 'png',\n};\n\ninterface IUpdateCoverProps {\n cover: any;\n setCover: any;\n coverModal: boolean;\n close: any;\n}\n\nfunction UpdateCover({\n cover,\n setCover,\n coverModal,\n close,\n}: IUpdateCoverProps) {\n const classes = useStyles();\n const [newCover, setNewCover] = useState(isNaN(cover) ? 1 : cover);\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const [loading, setLoading] = useState(false);\n const [photo, setPhoto] = useState(null);\n const [errorMessage, setErrorMessage] = useState('');\n const putAssetMutate = usePutAsset();\n\n const covers = React.useMemo(() => {\n const defaultCovers = [\n 'cover-1-thedistrikt',\n 'cover-2-thechain',\n 'cover-3-thecube',\n ];\n\n if (\n user?.cover.image_id &&\n defaultCovers.indexOf(user?.cover.image_id) === -1\n ) {\n return [user?.cover.image_id, ...defaultCovers];\n }\n\n return defaultCovers;\n }, [user]);\n\n const save = () => {\n let oldCover = null;\n const newCoverImage = covers[newCover - 1];\n if (user?.cover.image_id && user?.cover.image_id !== newCoverImage) {\n oldCover = user?.cover.image_id;\n }\n\n setLoading(true);\n setCover(newCoverImage, oldCover);\n };\n\n async function handleSave(buffer: string) {\n const imageId = createImageId(user.id);\n setLoading(true);\n await putAssetMutate.mutateAsync(\n {\n buffer,\n userId: user.id,\n imageId,\n },\n {\n onSuccess: () => {\n setCover(imageId, user.cover.image_id);\n },\n }\n );\n }\n\n const handleUploadFile = React.useCallback((event) => {\n if (!event.currentTarget.files || event.currentTarget.files.length === 0) {\n return;\n }\n\n const file = event.currentTarget.files[0];\n\n const reader = new FileReader();\n reader.onload = () => {\n setLoading(true);\n const image = reader.result.toString();\n const base64ContentArray = image.split(',');\n\n // base64 content cannot contain whitespaces but nevertheless skip if there are!\n const mimeType = base64ContentArray[0].match(\n /[^:\\s*]\\w+\\/[\\w-+\\d.]+(?=[;| ])/\n )[0];\n\n if (!MIME_TYPES[mimeType]) {\n setErrorMessage(\n `Oops, it looks like this image format isn't supported! Please upload jpg, jpeg and png images only.`\n );\n setLoading(false);\n } else {\n setPhoto(reader.result as string);\n setLoading(false);\n }\n };\n reader.readAsDataURL(file);\n event.target.value = '';\n }, []);\n\n return (\n <>\n {coverModal && !Boolean(photo) && (\n \n \n \n \n \n Upload your Image\n \n \n {covers.map((image_id, index) => (\n setNewCover(index + 1)}\n >\n \n {({ src }) => {\n if (!src) {\n return (\n \n \n \n );\n } else {\n return (\n \n );\n }\n }}\n \n \n ))}\n \n \n )}\n setPhoto(false)}\n photo={photo}\n onSave={handleSave}\n mode=\"cover\"\n onChangeFile={handleUploadFile}\n loading={loading}\n />\n {!!errorMessage && (\n {\n setErrorMessage('');\n }}\n warning\n closeOnSubmit\n title={`That didn't work`}\n ctaText={'Ok'}\n >\n
    \n {errorMessage}\n
    \n \n )}\n \n );\n}\n\nexport default UpdateCover;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n minWidth: 320,\n maxWidth: 500,\n width: '100%',\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n padding: theme.spacing(2),\n },\n inputContainer: {\n width: '100%',\n },\n formContainer: {\n width: '100%',\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: theme.spacing(3),\n borderTop: 'none',\n },\n orBorderRight: {\n width: 556,\n position: 'absolute',\n bottom: 230,\n left: 85,\n borderTop: `1px solid ${theme.palette.colors.ui_04}`,\n [theme.breakpoints.down('sm')]: {\n bottom: 206,\n width: 210,\n left: 75,\n },\n },\n orBorderLeft: {\n position: 'absolute',\n bottom: 230,\n width: theme.spacing(3),\n borderTop: `1px solid ${theme.palette.colors.ui_04}`,\n [theme.breakpoints.down('sm')]: {\n bottom: 206,\n },\n },\n orLabel: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n input: {\n display: 'none',\n },\n imageError: {\n color: theme.palette.error.main,\n fontSize: theme.typography.pxToRem(12),\n paddingTop: theme.spacing(1),\n },\n chooseImage: {\n paddingBottom: theme.spacing(1),\n },\n labelStyle: {\n fontSize: theme.typography.pxToRem(12),\n },\n browseButton: {\n width: '137px',\n },\n backdrop: {\n position: 'absolute',\n zIndex: 1,\n borderRadius: 16,\n },\n nftImages: {\n marginTop: theme.spacing(2),\n display: 'flex',\n },\n nftImagesDisabled: {\n pointerEvents: 'none',\n position: 'relative',\n opacity: 0.5,\n },\n nftImage: {\n width: 96,\n height: 96,\n borderRadius: 8,\n objectFit: 'cover',\n display: 'block',\n },\n nftImageWrapperSelected: {\n position: 'relative',\n marginRight: theme.spacing(2),\n cursor: 'pointer',\n },\n nftImageSelected: {\n '&:before': {\n zIndex: 2,\n pointerEvents: 'none',\n content: '\" \"',\n display: 'block',\n border: `4px solid ${theme.palette.colors.primary}`,\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 8,\n },\n '&:after': {\n zIndex: 2,\n pointerEvents: 'none',\n content: '\" \"',\n display: 'block',\n border: `1px solid ${theme.palette.colors.ui_01}`,\n position: 'absolute',\n top: 5,\n left: 5,\n right: 5,\n bottom: 5,\n borderRadius: 4,\n },\n },\n}));\n","import React, { useState, useCallback, useEffect } from 'react';\nimport clsx from 'clsx';\nimport { useFormik } from 'formik';\nimport { useQueryClient } from 'react-query';\nimport { Box, Button, Typography } from '@mui/material';\nimport { Dialog } from 'components';\nimport TextField from 'components/TextInput/TextField';\nimport UploadPhotoModal from 'components/UploadPhotoModal';\nimport {\n usePutAsset,\n useUpdateNFTProfileImage,\n useUpdateProfileImage,\n} from 'pages/profile/services';\nimport { MIME_TYPES_PROFILE as MIME_TYPES } from '../../constants';\nimport { Profile } from 'client';\nimport { createIcImage } from 'pages/profile/utils/profile';\nimport { formatReaderDataToImage, testImage } from 'utils/image';\nimport { useStyles } from './styles';\nimport { sendHeartbeat } from 'utils/heartbeat';\nimport WarningModal from 'components/Dialogs/Warning';\nimport { extractNftIndexIdAndAssetsType } from 'pages/profile/utils/nft';\nimport { useIsUserNftOwner } from 'pages/profile/hooks/useIsUserNftOwner';\nimport { useGetAddressByNftUrl } from 'pages/profile/services/nft';\nimport {\n getNftIndexUrl,\n getNftTokenIdUrl,\n decodeTokenIdToIndex,\n} from 'pages/profile/NftDropzone/utils/nftUtils';\n\ninterface EditForm {\n nftURL: string;\n}\n\ninterface IProfileImageProps {\n open: boolean;\n close: any;\n title: string;\n confirmButton: string;\n cancelButton: string;\n}\n\nfunction ProfileImage({\n open,\n close,\n title,\n confirmButton,\n cancelButton,\n}: IProfileImageProps) {\n const classes = useStyles();\n const queryClient = useQueryClient();\n const putAssetMutate = usePutAsset();\n const updateProfileImageMutate = useUpdateProfileImage();\n const updateNFTProfileImageMutate = useUpdateNFTProfileImage();\n const user = queryClient.getQueryData(['getSelf']);\n const [loading, setLoading] = useState(false);\n const [photo, setPhoto] = useState(null);\n const [showImageError, setShowImageError] = useState(false);\n const [disableBrowse, setDisableBrowse] = useState(false);\n const [nftCanisterUrl, setNftCanisterUrl] = useState('');\n const [nftTokenIdUrl, setNftTokenIdUrl] = useState('');\n const [errorMessage, setErrorMessage] = useState('');\n\n useEffect(() => {\n if (open) {\n sendHeartbeat();\n }\n }, [open]);\n\n const indexAndAssetsType = extractNftIndexIdAndAssetsType(\n nftTokenIdUrl || nftCanisterUrl\n );\n const { data: addressByNftUrl } = useGetAddressByNftUrl(\n indexAndAssetsType.tokenid !== ''\n ? decodeTokenIdToIndex(indexAndAssetsType.tokenid)\n : indexAndAssetsType.index,\n nftTokenIdUrl || nftCanisterUrl\n );\n const isMyNft = useIsUserNftOwner(\n user.principal,\n indexAndAssetsType.tokenid !== ''\n ? getNftIndexUrl(\n decodeTokenIdToIndex(indexAndAssetsType.tokenid) + 1,\n indexAndAssetsType.assetsType\n )\n : nftTokenIdUrl || nftCanisterUrl\n );\n async function handleSave(buffer) {\n const image = createIcImage({ userId: user.id });\n\n try {\n await putAssetMutate.mutateAsync({\n buffer,\n imageId: image.image_id,\n });\n await updateProfileImageMutate.mutateAsync({ image, user });\n } catch (_) {\n setErrorMessage('Oops, something went wrong. Try again later');\n } finally {\n close();\n setPhoto(null);\n }\n }\n\n const handleUploadFile = useCallback((event) => {\n if (!event.currentTarget.files || event.currentTarget.files.length === 0) {\n return;\n }\n\n const file = event.currentTarget.files[0];\n\n const reader = new FileReader();\n reader.onload = async () => {\n try {\n const imageFormatted = await formatReaderDataToImage(\n reader.result as string,\n 200,\n 200,\n MIME_TYPES\n );\n\n setPhoto(imageFormatted);\n } catch (err) {\n setErrorMessage(\n err.message ||\n `Oops, it looks like this image format isn't supported! Please upload jpg, jpeg and png images only.`\n );\n }\n };\n reader.readAsDataURL(file);\n event.target.value = '';\n }, []);\n\n const formik = useFormik({\n initialValues: {\n nftURL: '',\n },\n validate: async (values) => {\n const errors: Partial = {};\n\n if (values.nftURL.length > 200) {\n errors.nftURL = 'The NFT URL cannot be longer than 200 characters';\n }\n\n if (!!values.nftURL.length) {\n setDisableBrowse(true);\n } else {\n setDisableBrowse(false);\n setShowImageError(false);\n }\n\n return errors;\n },\n onSubmit: useCallback(\n async (values) => {\n setLoading(true);\n\n if (values?.nftURL === '') {\n setShowImageError(true);\n setLoading(false);\n } else {\n saveNFTURL(values?.nftURL, indexAndAssetsType);\n }\n },\n [user, saveNFTURL, indexAndAssetsType]\n ),\n });\n\n async function saveNFTURL(nftURL: string, indexAndAssetsType) {\n setLoading(true);\n try {\n if (nftURL !== '') await testImage(nftURL as string);\n let url = nftURL;\n if (\n indexAndAssetsType.tokenid !== '' &&\n nftURL.includes(process.env.REACT_APP_NFT_CANISTER_ID)\n ) {\n url = getNftIndexUrl(\n decodeTokenIdToIndex(indexAndAssetsType.tokenid) + 1,\n indexAndAssetsType.assetsType\n );\n }\n await updateNFTProfileImageMutate.mutateAsync({\n nftURL: url,\n userName: user.username,\n });\n close();\n } catch (e) {\n setShowImageError(true);\n setLoading(false);\n }\n }\n\n const handleChangeAssetsType = (formik, assetsType, indexAndAssetsType) => {\n if (indexAndAssetsType.tokenid !== '') {\n const url = getNftTokenIdUrl(indexAndAssetsType.tokenid, assetsType);\n setNftTokenIdUrl(url);\n } else {\n const url = getNftIndexUrl(indexAndAssetsType.index + 1, assetsType);\n formik.setFieldValue('nftURL', url);\n setNftCanisterUrl(url);\n }\n };\n\n return (\n <>\n {open && (\n close()}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title={title}\n onlySubmit={!cancelButton}\n onCancel={() => close()}\n cancelColor=\"primary\"\n ctaText={loading ? 'Loading...' : confirmButton}\n onSubmit={formik.handleSubmit}\n fullWidth\n disabled={\n formik.isSubmitting ||\n (!photo && !formik.values.nftURL) ||\n formik.values.nftURL.length > 200\n }\n >\n \n
    \n \n Paste IC NFT URL\n \n {\n formik.handleChange(evt);\n setNftCanisterUrl(evt.target.value);\n }}\n placeholder=\"Paste NFT URL here\"\n readOnly={loading}\n autoComplete=\"off\"\n disabled={loading}\n />\n setShowImageError(false)}\n />\n {isMyNft && addressByNftUrl && (\n \n \n handleChangeAssetsType(formik, 'POD', indexAndAssetsType)\n }\n onKeyDown={() =>\n handleChangeAssetsType(formik, 'POD', indexAndAssetsType)\n }\n >\n \n
    \n \n handleChangeAssetsType(\n formik,\n 'HELMET',\n indexAndAssetsType\n )\n }\n onKeyDown={() =>\n handleChangeAssetsType(\n formik,\n 'HELMET',\n indexAndAssetsType\n )\n }\n >\n \n \n \n )}\n \n
    \n
    \n \n OR\n \n \n \n Choose image from your files\n \n \n Browse\n \n \n \n \n \n )}\n {!!errorMessage && (\n {\n setErrorMessage('');\n }}\n warning\n closeOnSubmit\n title={`That didn't work`}\n ctaText={'Ok'}\n >\n
    \n {errorMessage}\n
    \n \n )}\n {Boolean(photo) ? (\n setPhoto(false)}\n photo={photo}\n onSave={handleSave}\n onChangeFile={handleUploadFile}\n />\n ) : null}\n \n );\n}\n\nexport default ProfileImage;\n","import React, { useCallback, useContext, useMemo } from 'react';\nimport { Box, Theme, Typography, useMediaQuery } from '@mui/material';\nimport { fromIcEnum, WalletKind, walletKinds, WalletKindsMapping } from 'utils';\nimport CopyButton from 'components/Buttons/CopyButton';\nimport { Profile, Wallet } from 'client';\nimport { OpenDistriktContext } from 'providers';\n\ninterface WalletInfoProps {\n kind: WalletKind;\n value: string;\n isPreferred: boolean;\n}\n\nconst walletKindToImageNameMapping: WalletKindsMapping = {\n Stoic: 'stoic',\n Plug: 'plug',\n Nns: 'ii',\n};\n\nconst WalletInfo = ({ kind, value, isPreferred }: WalletInfoProps) => {\n const isSmallScreen = useMediaQuery((theme: Theme) =>\n theme.breakpoints.down('sm')\n );\n\n return (\n \n \n\n \n {value}\n \n\n \n {isPreferred ? '(primary)' : ''}\n \n\n {\n \n \n \n }\n \n );\n};\n\ninterface IProfileInfoProps {\n user: Profile;\n}\n\nconst WalletsList = ({ user }: IProfileInfoProps) => {\n const preferredWallet = useMemo(() => fromIcEnum(user.preferred_wallet), [\n user.preferred_wallet,\n ]);\n\n const walletAddresses = useCallback(\n (kind: WalletKind) =>\n user.wallet_addresses?.find((wallet: Wallet) => kind in wallet)?.[kind],\n [user.wallet_addresses]\n );\n\n const { mode } = useContext(OpenDistriktContext);\n\n if (mode !== 'User' || !user.wallets_are_public) return null;\n\n return (\n \n \n {walletKinds.map(\n (kind: WalletKind) =>\n walletAddresses(kind) && (\n
    \n \n
    \n )\n )}\n
    \n
    \n );\n};\n\nexport default WalletsList;\n","import React from 'react';\n\nimport { Dialog } from 'components';\nimport { Project, CollaboratorWithUser } from 'client';\nimport { ProjectForm } from 'pages/profile/components';\n\ninterface ICreateProjectModalProps {\n collaborators?: CollaboratorWithUser[];\n loading?: boolean;\n onClose: () => void;\n onSubmit: (values: any, project: Project) => void;\n project?: Project;\n}\n\nfunction CreateProjectModal({\n project = null,\n collaborators = [],\n loading,\n onClose,\n onSubmit,\n}: ICreateProjectModalProps) {\n const [isChanged, setIsChanged] = React.useState(false);\n const [openWarning, setOpenWarning] = React.useState(false);\n\n const handleClose = React.useCallback(() => {\n if (isChanged) {\n setOpenWarning(true);\n } else {\n onClose();\n }\n }, [onClose, isChanged]);\n\n return (\n <>\n \n onSubmit(values, project)}\n />\n \n\n {openWarning && (\n setOpenWarning(false)}\n onSubmit={() => {\n setOpenWarning(false);\n onClose();\n }}\n />\n )}\n \n );\n}\n\nexport default CreateProjectModal;\n","import React, { useState } from 'react';\nimport clsx from 'clsx';\nimport { useHistory } from 'react-router-dom';\nimport { Box, Button, Divider, Link, Typography } from '@mui/material';\n\nimport { Experience, Milestone, Profile } from 'client';\nimport { useCreateNewMilestone } from 'pages/profile/services/milestones';\nimport { useCreateNewProject } from 'pages/profile/services/projects';\nimport { useStyles } from './styles';\nimport CreateProjectModal from '../CreateProjectModal';\nimport CreateMilestoneModal from '../CreateMilestoneModal';\n\nexport const INIT_ACTION_STATES = {\n addAsOwn: false,\n previewMilestone: false,\n};\n\ninterface IExperienceCardBaseProps {\n authUser: Profile;\n author: Profile | undefined;\n children: React.ReactNode;\n isCollab?: boolean;\n isVisible?: boolean;\n profileUserId: bigint;\n style?: unknown;\n type: 'project' | 'milestone';\n}\n\ninterface IExperienceCardProjectProps extends IExperienceCardBaseProps {\n project: Experience;\n milestone?: never;\n}\n\ninterface IExperienceCardMilestoneProps extends IExperienceCardBaseProps {\n milestone: Milestone;\n project?: never;\n}\n\nfunction ExperienceCard({\n authUser,\n author,\n children,\n isCollab,\n milestone,\n profileUserId,\n project,\n style,\n type,\n}: IExperienceCardMilestoneProps | IExperienceCardProjectProps) {\n const history = useHistory();\n const classes = useStyles();\n const createNewMilestoneMutate = useCreateNewMilestone();\n const createNewProjectMutate = useCreateNewProject();\n\n const [actionStates, setActionStates] = useState(INIT_ACTION_STATES);\n\n const isOwnProfile = profileUserId === authUser?.id;\n\n if (!isCollab) {\n return (\n \n {type === 'milestone' ? (\n \n {React.Children.map(children, (el) => {\n return React.cloneElement(el, {\n previewMilestone: actionStates.previewMilestone,\n closePreviewMilestone: () =>\n setActionStates({\n ...INIT_ACTION_STATES,\n previewMilestone: false,\n }),\n });\n })}\n \n ) : (\n <>{children}\n )}\n \n );\n }\n\n if (isOwnProfile) {\n return (\n \n \n {type === 'milestone' ? (\n \n {React.Children.map(children, (el) => {\n return React.cloneElement(el, {\n previewMilestone: actionStates.previewMilestone,\n closePreviewMilestone: () =>\n setActionStates({\n ...INIT_ACTION_STATES,\n previewMilestone: false,\n }),\n });\n })}\n \n ) : (\n <>{children}\n )}\n \n\n \n \n \n setActionStates({ ...INIT_ACTION_STATES, addAsOwn: true })\n }\n >\n {`Add as my own ${type}`}\n \n \n \n\n {actionStates.addAsOwn ? (\n <>\n {type === 'milestone' ? (\n setActionStates(INIT_ACTION_STATES)}\n milestone={milestone}\n collaborators={[]}\n onSubmit={async (values) => {\n await createNewMilestoneMutate.mutateAsync(\n {\n milestoneForm: values,\n userId: profileUserId,\n },\n {\n onSettled: () => {\n setActionStates(INIT_ACTION_STATES);\n },\n }\n );\n }}\n />\n ) : (\n setActionStates(INIT_ACTION_STATES)}\n onSubmit={async (values) => {\n await createNewProjectMutate.mutateAsync(\n {\n projectForm: values,\n userId: profileUserId,\n },\n {\n onSettled: () => {\n setActionStates(INIT_ACTION_STATES);\n },\n }\n );\n }}\n />\n )}\n \n ) : null}\n \n );\n }\n\n return (\n \n \n \n Marked as a collaborator by:{' '}\n history.push(`/u/${author?.username}`)}\n >\n {`@${author?.username}`}\n \n \n \n\n \n {type === 'milestone' ? (\n \n {React.Children.map(children, (el) => {\n return React.cloneElement(el, {\n previewMilestone: actionStates.previewMilestone,\n closePreviewMilestone: () =>\n setActionStates({\n ...INIT_ACTION_STATES,\n previewMilestone: false,\n }),\n });\n })}\n \n ) : (\n <>{children}\n )}\n \n \n );\n}\n\nfunction MilestoneContainer({\n children,\n actionStates,\n setActionStates,\n classes,\n}: any) {\n return (\n {\n e.stopPropagation();\n\n setActionStates({\n ...INIT_ACTION_STATES,\n previewMilestone: true,\n });\n }}\n >\n \n \n {React.Children.map(children, (el) => {\n return React.cloneElement(el, {\n previewMilestone: actionStates.previewMilestone,\n closePreviewMilestone: () =>\n setActionStates({\n ...INIT_ACTION_STATES,\n previewMilestone: false,\n }),\n });\n })}\n \n \n );\n}\n\nexport default ExperienceCard;\n","import React, { useMemo } from 'react';\nimport { useQueryClient } from 'react-query';\n\nimport { MilestoneWithUser, Milestone as IMilestone, Profile } from 'client';\nimport { useIsVisibleExperience } from 'pages/profile/hooks/useIsVisibleExperience';\nimport {\n createPlaceholderMilestone,\n getCollaborators,\n} from 'pages/profile/utils';\nimport ExperienceCard from '../ExperienceCard';\nimport MilestoneContent from '../MilestoneContent';\nimport MilestoneHeader from '../MilestoneHeader';\n\ninterface IMilestoneProps {\n profileUserId: bigint;\n children?: React.ReactNode;\n isCollab?: boolean;\n milestone?: MilestoneWithUser;\n readOnly?: boolean;\n showMenu?: boolean;\n onMilestoneDelete?: () => void;\n}\n\nfunction Milestone({\n isCollab,\n milestone,\n profileUserId,\n readOnly,\n showMenu,\n onMilestoneDelete,\n}: IMilestoneProps) {\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const isOwner = authUser?.id === milestone?.milestone.user_id;\n\n const [data, collaborators] = useMemo(() => {\n const data: IMilestone =\n milestone?.milestone || createPlaceholderMilestone(authUser);\n\n const collaborators = milestone\n ? getCollaborators(\n milestone.collaborators,\n milestone.user.id,\n authUser?.id,\n true\n )\n : [];\n\n return [data, collaborators];\n }, [authUser, milestone]);\n\n const isVisible = useIsVisibleExperience({\n collaborators: data.collaborators,\n isCollab,\n isOwner,\n authUserId: authUser?.id,\n });\n\n return (\n \n \n \n \n );\n}\n\nexport default Milestone;\n","import React, { useRef, useState, useEffect } from 'react';\nimport { Theme } from '@mui/material/styles';\nimport { WithStyles } from '@mui/styles';\nimport withStyles from '@mui/styles/withStyles';\nimport createStyles from '@mui/styles/createStyles';\nimport { Badge, IconButton, Skeleton } from '@mui/material';\nimport { RemoveBinIcon } from '../icons';\nimport { MAX_PREVIEW_IMAGE_HEIGHT } from '../../constants';\nimport clsx from 'clsx';\nimport { useTheme } from '@mui/material/styles';\nimport { useGetAddressByNftUrl } from 'pages/profile/services/nft';\nimport { extractNftIndexIdAndAssetsType } from 'pages/profile/utils/nft';\n\nconst styles = (theme: Theme) =>\n createStyles({\n image: {\n borderRadius: 10,\n height: 'auto',\n marginTop: 16,\n objectFit: 'cover',\n width: '100%',\n },\n nftImage: {\n borderBottomLeftRadius: '70px',\n borderTopLeftRadius: '70px',\n borderBottomRightRadius: '70px',\n aspectRatio: '232 / 174',\n [theme.breakpoints.up('sm')]: {\n aspectRatio: '568 / 342',\n },\n },\n imageCrop: {\n '@supports (aspect-ratio: 5 / 3)': {\n aspectRatio: '5 / 3',\n },\n\n '@supports not (aspect-ratio: 5 / 3)': {\n display: 'block',\n maxWidth: '100%',\n maxHeight: '321px',\n width: '100%',\n height: 'auto',\n },\n },\n anchorOriginBottomRightCircle: {\n right: theme.spacing(1),\n top: theme.spacing(3),\n padding: 0,\n bottom: 0,\n transform: 'none',\n },\n icon: {\n height: 16,\n width: 16,\n },\n button: {\n background: 'rgb(255 255 255 / 75%)',\n borderRadius: '100%',\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n color: theme.palette.primary.light,\n padding: theme.spacing(0.75),\n },\n input: {\n display: 'none',\n },\n text: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.primary.light,\n },\n textContainer: {\n background: 'rgb(255 255 255 / 75%)',\n padding: theme.spacing(1.5),\n borderRadius: 16,\n position: 'absolute',\n bottom: 12,\n right: 12,\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n },\n });\n\ninterface Props extends WithStyles {\n photo: any;\n removePhoto?: any;\n isNft?: boolean;\n}\n\nconst PostImage = ({ photo, removePhoto, classes, isNft }: Props) => {\n const theme = useTheme();\n const [height, setHeight] = useState(0);\n const ref = useRef(null);\n const [nftCanisterImage, setNftCanisterImage] = useState('');\n\n const indexAndAssetsType = extractNftIndexIdAndAssetsType(photo);\n const {\n data: addressByNftUrl,\n isLoading: isLoadingAddressByNftUrl,\n } = useGetAddressByNftUrl(indexAndAssetsType.index, photo);\n let nftImageByIndex;\n if (\n addressByNftUrl &&\n photo.includes(process.env.REACT_APP_NFT_CANISTER_ID)\n ) {\n nftImageByIndex = addressByNftUrl[indexAndAssetsType.assetsType];\n }\n useEffect(() => {\n if (nftImageByIndex) {\n setNftCanisterImage(nftImageByIndex);\n }\n }, [nftImageByIndex]);\n\n const onImageLoad = (e) => {\n if (e.target.src && ref.current && !height) {\n setHeight(ref.current.clientHeight);\n }\n };\n\n const enableCropping = height > MAX_PREVIEW_IMAGE_HEIGHT;\n\n if (indexAndAssetsType.index > -1 && isLoadingAddressByNftUrl)\n return (\n \n );\n\n return (\n <>\n \n {removePhoto && (\n \n \n \n )}\n \n }\n classes={{\n anchorOriginBottomRightCircular:\n classes.anchorOriginBottomRightCircle,\n }}\n >\n \n \n \n );\n};\n\nexport default withStyles(styles)(PostImage);\n","import React, { useCallback, useMemo, useState } from 'react';\nimport {\n Checkbox,\n Dialog,\n Select,\n TextField,\n TextFieldProps,\n} from 'components';\nimport { useStyles } from '../styles';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport {\n Box,\n Button,\n FormControlLabel,\n InputLabel,\n Typography,\n useMediaQuery,\n useTheme,\n SxProps,\n Theme,\n} from '@mui/material';\nimport {\n higherThanTopSignificantUnits,\n lowerThanTopSignificantUnits,\n TOP_SIGNIFICANT_POLL_UNIT,\n MAX_POLL_CHOICE_CHAR_COUNT,\n MAX_POLL_DURATION,\n MIN_POLL_DURATION,\n NB_POLL_MANDATORY_CHOICES,\n POLL_LENGTH_TIME_UNITS,\n lowerThanBottomSignificantUnits,\n higherThanBottomSignificantUnits,\n BOTTOM_SIGNIFICANT_POLL_UNIT,\n} from '../../../constants';\nimport { PollFormik, PollInfo, TimeUnit, UnitConfig } from 'types';\nimport { setIn } from 'formik';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\nimport {\n checkAllHigherThanBound,\n checkAllLowerThanBound,\n getHigherUnits,\n getLowerUnits,\n} from './utils';\n\ndayjs.extend(duration);\nimport { EditorState } from 'draft-js';\nimport { EmojiPlugin } from '@draft-js-plugins/emoji';\nimport { humanizeUnit } from 'utils';\n\ntype TextFieldOmitted = 'name' | 'inputLabel' | 'placeholder';\n\ninterface ChoiceProps extends Omit {\n emojiPlugins?: Array;\n formik?: Partial;\n index: number;\n values: PollInfo;\n}\n\nconst Choice = ({\n emojiPlugins,\n formik,\n index,\n onFocus: onFocusProp,\n values,\n ...textFieldProps\n}: ChoiceProps) => {\n const theme = useTheme();\n\n const value = values.choices?.[index] || createEditorStateWithText('');\n\n const errorText =\n formik?.touched.choices?.[index] && formik?.errors.choices?.[index];\n\n const onChange = useCallback(\n (newValue: EditorState) => {\n let newValues = setIn(values, `choices[${index}]`, newValue);\n\n if (newValue.getCurrentContent().hasText()) {\n newValues = setIn(newValues, `choicesVisible[${index + 1}]`, true);\n }\n\n formik?.setValues(newValues);\n },\n [formik, index, values]\n );\n\n const onBlur = useCallback(() => {\n setFocused(false);\n formik?.setTouched(setIn(formik.touched, `choices[${index}]`, true));\n }, [formik, index]);\n\n const onFocus = useCallback(() => {\n setFocused(true);\n onFocusProp?.();\n }, [onFocusProp]);\n\n const [isFocused, setFocused] = useState(false);\n\n const isOptionalChoice = useMemo(() => index >= NB_POLL_MANDATORY_CHOICES, [\n index,\n ]);\n\n return (\n \n \n\n {isFocused && (\n \n {value.getCurrentContent().getPlainText().length}/\n {MAX_POLL_CHOICE_CHAR_COUNT}\n \n )}\n \n );\n};\n\ninterface PollLengthSelectProps {\n disabled?: boolean;\n formik?: Partial;\n unitConfig: UnitConfig;\n values: PollInfo;\n}\n\nconst PollLengthSelect = ({\n disabled,\n formik,\n unitConfig,\n values,\n}: PollLengthSelectProps) => {\n const pollLength = values.pollLength;\n\n const allLowerThanBound = useCallback(\n (units: Array) =>\n checkAllLowerThanBound(units, unitConfig.unit, pollLength),\n [pollLength, unitConfig.unit]\n );\n\n const allHigherThanBound = useCallback(\n (units: Array) =>\n checkAllHigherThanBound(units, unitConfig.unit, pollLength),\n [pollLength, unitConfig.unit]\n );\n\n const higherUnits = useMemo(() => getHigherUnits(unitConfig.unit), [\n unitConfig.unit,\n ]);\n\n const lowerUnits = useMemo(() => getLowerUnits(unitConfig.unit), [\n unitConfig.unit,\n ]);\n\n const isOptionAllowed = useCallback(\n (value: number) => {\n const isNotBellowMin =\n ![TOP_SIGNIFICANT_POLL_UNIT, ...lowerThanTopSignificantUnits].includes(\n unitConfig.unit\n ) ||\n value >= MIN_POLL_DURATION[unitConfig.unit]() ||\n !allLowerThanBound(higherUnits);\n\n const isNotAboveMax =\n ![\n BOTTOM_SIGNIFICANT_POLL_UNIT,\n ...higherThanBottomSignificantUnits,\n ].includes(unitConfig.unit) ||\n value <= MAX_POLL_DURATION[unitConfig.unit]() ||\n !allHigherThanBound(higherUnits);\n\n return isNotBellowMin && isNotAboveMax;\n },\n [allHigherThanBound, allLowerThanBound, higherUnits, unitConfig.unit]\n );\n\n const pollLengthChoices = useMemo(\n () =>\n Array.from(Array(unitConfig.cap))\n .map((_: any, index: number) => index)\n .filter((value: number) => isOptionAllowed(value))\n .map((value: number) => ({\n value: value.toString(),\n name: `${value} ${humanizeUnit(unitConfig.unit, value)}`,\n })),\n [isOptionAllowed, unitConfig.cap, unitConfig.unit]\n );\n\n const onChange = useCallback(\n (value: string) => {\n const unit = unitConfig.unit;\n\n let newPollLength = pollLength.clone();\n newPollLength = newPollLength\n .subtract({ [unit]: newPollLength[unit]() })\n .add({ [unit]: parseInt(value) });\n\n let i = 0;\n while (\n newPollLength.asMilliseconds() < MIN_POLL_DURATION.asMilliseconds()\n ) {\n const targetUnit = lowerUnits[i];\n const targetValue = higherThanTopSignificantUnits.includes(targetUnit)\n ? 1\n : MIN_POLL_DURATION[targetUnit]();\n\n newPollLength = newPollLength\n .subtract({ [targetUnit]: newPollLength[targetUnit]() })\n .add({ [targetUnit]: targetValue });\n\n i++;\n }\n\n if (newPollLength.asMilliseconds() > MAX_POLL_DURATION.asMilliseconds()) {\n newPollLength = MAX_POLL_DURATION;\n }\n\n formik?.setFieldValue(`pollLength`, newPollLength);\n },\n [formik, lowerUnits, pollLength, unitConfig.unit]\n );\n\n const isDisabled = useMemo(() => {\n const isMaxDuration = () =>\n values.pollLength.asMilliseconds() === MAX_POLL_DURATION.asMilliseconds();\n\n const isNonSignificant = () =>\n lowerThanBottomSignificantUnits.includes(unitConfig.unit);\n\n return disabled || (isNonSignificant() && isMaxDuration());\n }, [disabled, values.pollLength, unitConfig.unit]);\n\n return (\n \n formik?.setFieldTouched(`pollLength`)}\n onChange={onChange}\n showWarningIcon={false}\n />\n \n );\n};\n\ninterface ComposePollProps {\n disabled?: boolean;\n emojiPlugins: Array;\n onRemovePoll: () => void;\n formik: Partial;\n isDirty: boolean;\n setFocusedChoice: (index: number) => void;\n sx?: SxProps;\n}\n\nexport const ComposePoll = ({\n disabled,\n emojiPlugins,\n formik,\n isDirty,\n onRemovePoll,\n setFocusedChoice,\n sx,\n}: ComposePollProps) => {\n const theme = useTheme();\n const classes = useStyles();\n\n const [openWarning, setOpenWarning] = React.useState(false);\n\n const removePoll = useCallback(() => {\n setOpenWarning(false);\n onRemovePoll?.();\n }, [onRemovePoll]);\n\n const { values } = formik;\n\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'));\n\n return (\n \n {values.choices.map((_, i: number) =>\n values.choicesVisible[i] ? (\n setFocusedChoice?.(i)}\n values={values}\n />\n ) : null\n )}\n\n \n formik?.setFieldValue('isMultichoice', e.target.checked)\n }\n onBlur={() => formik?.setFieldTouched('isMultichoice')}\n disabled={disabled}\n name=\"isMultichoice\"\n id=\"isMultichoice\"\n color=\"primary\"\n size=\"small\"\n classes={{\n root: classes.checkbox,\n }}\n />\n }\n label={\n \n Allow multiple answers in poll\n \n }\n />\n\n \n \n \n Poll Length (min 1h)\n \n \n \n {POLL_LENGTH_TIME_UNITS.map((unitConfig: UnitConfig) => (\n \n ))}\n \n \n\n (isDirty ? setOpenWarning(true) : removePoll())}\n disabled={disabled}\n >\n Remove Poll\n \n\n {openWarning && (\n setOpenWarning(false)}\n onSubmit={removePoll}\n />\n )}\n \n );\n};\n","import { useEffect, useState } from 'react';\nimport * as linkify from 'linkifyjs';\nimport { loadLinkPreview } from 'utils/loadLinkPreview';\n\nexport function useLinkPreview(editorState, onLinkMetadataChange) {\n const [links, setLinks] = useState([]);\n const [linkMetadata, setLinkMetadata] = useState({});\n const [linkPreviewIdx, setLinkPreviewIdx] = useState(0);\n const [selectedLinkPreview, setSelectedLinkPreview] = useState('');\n const [selectedLinkPreviewData, setSelectedLinkPreviewData] = useState(null);\n const [linksLength, setLinksLength] = useState(0);\n\n useEffect(() => {\n if (editorState.getCurrentContent().getPlainText() === '') {\n setLinks([]);\n setLinkPreviewIdx(0);\n setSelectedLinkPreview('');\n setLinkMetadata({});\n }\n const match = linkify.find(editorState.getCurrentContent().getPlainText());\n const links = match\n .filter((item) => item.type === 'url')\n .map((item) => item.href)\n .reduce(\n (aggr, item) => (aggr.includes(item) ? aggr : [...aggr, item]),\n []\n )\n .filter((url) => {\n const urlToCheck = url.replace('https://', '').replace('http://', '');\n if (\n urlToCheck.startsWith('distrikt.app') ||\n urlToCheck.startsWith('az5sd-cqaaa-aaaae-aaarq-cai.ic0.app') ||\n urlToCheck.startsWith('distrikt.work') ||\n urlToCheck.startsWith('am2do-dyaaa-aaaae-aaasa-cai.ic0.app')\n ) {\n return false;\n }\n return true;\n });\n setLinks(links);\n }, [editorState]);\n\n useEffect(() => {\n if (links.length > linksLength && selectedLinkPreview === '') {\n setSelectedLinkPreview(links[links.length - 1]);\n setLinkPreviewIdx(links.length - 1);\n }\n if (links.length !== linksLength) {\n setLinksLength(links.length);\n }\n }, [links, linksLength, selectedLinkPreview]);\n\n useEffect(() => {\n async function fetchData() {\n let newLinkMetadata = { ...linkMetadata };\n let newSelectedLinkPreview = '';\n await Promise.all(\n links.map(async (url) => {\n if (url === links[linkPreviewIdx]) {\n newSelectedLinkPreview = url;\n }\n if (newLinkMetadata[url]) return;\n newLinkMetadata = {\n ...newLinkMetadata,\n [url]: {\n loading: true,\n },\n };\n try {\n const { data, status } = await loadLinkPreview(url);\n const selectedData =\n status === 'success' && data.publisher && data.title\n ? {\n url,\n publisher: data.publisher || '',\n author: data.author || '',\n title: data.title.substr(0, 100),\n content: (data.description || '').substr(0, 300),\n image_url: data.image_url ? [data.image_url] : [''],\n logo_url: data.logo_url || '',\n timestamp: new Date().getTime(),\n }\n : null;\n newLinkMetadata = {\n ...newLinkMetadata,\n [url]: {\n loading: false,\n status,\n data: selectedData,\n },\n };\n } catch (err) {\n newLinkMetadata = {\n ...newLinkMetadata,\n [url]: {\n loading: false,\n status: 'error',\n data: null,\n },\n };\n }\n })\n );\n if (newSelectedLinkPreview !== selectedLinkPreview) {\n setSelectedLinkPreview(newSelectedLinkPreview);\n }\n if (JSON.stringify(newLinkMetadata) !== JSON.stringify(linkMetadata)) {\n setLinkMetadata(newLinkMetadata);\n }\n }\n fetchData();\n }, [links, linkMetadata, linkPreviewIdx, selectedLinkPreview]);\n\n useEffect(() => {\n if (selectedLinkPreview !== '' && linkMetadata[selectedLinkPreview]) {\n if (links.includes(selectedLinkPreview)) {\n setSelectedLinkPreviewData(\n linkMetadata[selectedLinkPreview].data || null\n );\n } else if (\n links.length > 0 &&\n linkMetadata[links[0]] &&\n linkMetadata[links[0]].data\n ) {\n setSelectedLinkPreviewData(linkMetadata[links[0]].data);\n setSelectedLinkPreview(links[0]);\n setLinkPreviewIdx(0);\n } else {\n setSelectedLinkPreview('');\n setSelectedLinkPreviewData(null);\n setLinkPreviewIdx(0);\n }\n } else if (\n selectedLinkPreview !== '' &&\n links.length > 0 &&\n linkMetadata[links[0]] &&\n linkMetadata[links[0]].data\n ) {\n setSelectedLinkPreviewData(linkMetadata[links[0]].data);\n setSelectedLinkPreview(links[0]);\n setLinkPreviewIdx(0);\n } else {\n setSelectedLinkPreviewData(null);\n }\n }, [linkMetadata, links, selectedLinkPreview]);\n\n useEffect(() => {\n if (onLinkMetadataChange) {\n onLinkMetadataChange(\n selectedLinkPreviewData ? [[selectedLinkPreviewData]] : []\n );\n }\n }, [onLinkMetadataChange, selectedLinkPreviewData]);\n\n return {\n links,\n setLinks,\n linkMetadata,\n setLinkMetadata,\n linkPreviewIdx,\n setLinkPreviewIdx,\n selectedLinkPreview,\n setSelectedLinkPreview,\n selectedLinkPreviewData,\n setSelectedLinkPreviewData,\n };\n}\n","export const loadLinkPreview = async (url: string) => {\n const urlToCheck = url.replace('https://', '').replace('http://', '');\n if (\n urlToCheck.startsWith('distrikt.app') ||\n urlToCheck.startsWith('az5sd-cqaaa-aaaae-aaarq-cai.ic0.app') ||\n urlToCheck.startsWith('distrikt.work') ||\n urlToCheck.startsWith('am2do-dyaaa-aaaae-aaasa-cai.ic0.app')\n ) {\n return {\n data: null,\n status: 'success',\n };\n }\n try {\n const data = await fetch(`${process.env.REACT_APP_LINK_PREVIEW}${url}`, {\n method: 'GET',\n // Allows cross-origin requests, for example to access various APIs offered by 3rd party vendors.\n mode: 'cors',\n // The no-cache response directive indicates that the response can be stored in caches, but the response must be validated with the origin server before each reuse, even when the cache is disconnected from the origin server.\n cache: 'no-cache',\n // Send user credentials (cookies, basic http auth, etc..) if the URL is on the same origin as the calling script. This is the default value.\n credentials: 'same-origin', // include, *same-origin, omit\n // Representation header is used to indicate the original media type of the resource\n headers: {\n 'Content-Type': 'application/json',\n },\n // Indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion).\n redirect: 'follow',\n // The Referer header will be omitted: sent requests do not include any referrer information.\n referrerPolicy: 'no-referrer',\n });\n const body = await data.json();\n return {\n data: body,\n status: 'success',\n };\n } catch (e) {\n return {\n data: null,\n status: 'error',\n };\n }\n};\n","import React, { useCallback, useEffect, useMemo } from 'react';\nimport '@draft-js-plugins/emoji/lib/plugin.css';\nimport {\n Box,\n Theme,\n Typography,\n IconButton,\n useMediaQuery,\n Divider,\n} from '@mui/material';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport { useQueryClient } from 'react-query';\nimport { useTheme } from '@mui/material/styles';\n\nimport Compose from './Compose';\nimport Milestone from 'pages/profile/components/Milestone';\nimport PostImage from './Image';\nimport Project from 'pages/profile/components/Project';\nimport UserAvatar from '../UserAvatar/UserAvatar';\nimport { ERRORS } from './types';\nimport { Profile } from 'client';\nimport { RemoveIcon } from '../icons';\nimport { SharedArticle } from 'pages/article';\nimport { SharedPost } from 'pages/post/components';\nimport { useMentionsChecker, useMentionsParser } from '../../hooks/rich-editor';\nimport { useStyles } from './styles';\nimport clsx from 'clsx';\nimport { ConditionalWrapper } from 'components/ConditionalWrapper';\nimport { ComposePoll } from './ComposePoll';\nimport { EditorState } from 'draft-js';\nimport { MAX_MENTIONS_WITH_POLL } from '../../constants';\nimport { PostFormik } from 'types';\nimport { formattedDate, formikPostToPoll } from 'utils';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport { setIn } from 'formik';\nimport { useLinkPreview } from 'hooks/useLinkPreview';\nimport LinkPreview from './LinkPreview';\n\ntype Location = 'post-home' | 'modal' | 'comment' | string;\n\nexport type ComposeEvent = 'error' | 'remove' | 'parsing-mentions';\n\nexport interface ComposeProps {\n author?: Profile;\n disabled?: boolean;\n emojiPlugins: Array;\n formik: Partial;\n glowingPlaceholder?: boolean;\n isLastThreadItem?: boolean;\n location: Location;\n onBlur?: React.FocusEventHandler;\n onFocus?: React.FocusEventHandler;\n onEvent?: (event: ComposeEvent, data?: any) => void;\n placeholder: string;\n quotedResource?: any;\n resourceType?: any;\n setFocusedEditor?: (index: number) => void;\n setIsLoading: (value: boolean) => void;\n textFocused?: boolean;\n emojiOpened?: boolean;\n}\n\nexport const ComposeContainer = ({\n author,\n disabled,\n emojiPlugins,\n formik,\n glowingPlaceholder,\n isLastThreadItem = true,\n location,\n onBlur,\n onFocus,\n onEvent,\n placeholder,\n quotedResource,\n resourceType,\n setFocusedEditor,\n setIsLoading,\n textFocused = true,\n emojiOpened,\n}: ComposeProps) => {\n const theme = useTheme();\n const classes = useStyles({ component: location });\n\n const mobileSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('xs')\n );\n\n const [error, setInternalError] = React.useState(null);\n const setError = useCallback(\n (error) => {\n setInternalError(error);\n onEvent?.('error', error);\n },\n [onEvent]\n );\n\n const {\n text,\n mentions,\n image,\n link_metadata: formikLinkMetadata,\n nftImageUrl,\n poll,\n } = formik.values;\n\n const onLinkMetadataChange = useCallback(\n (arg) => {\n if (\n !poll &&\n location !== 'comment' &&\n !location.startsWith('reply_') &&\n JSON.stringify(formikLinkMetadata) !== JSON.stringify(arg)\n ) {\n formik.setFieldValue('link_metadata', arg);\n }\n },\n [formik, formikLinkMetadata, poll, location]\n );\n\n const {\n links,\n linkMetadata,\n linkPreviewIdx,\n setLinkPreviewIdx,\n selectedLinkPreview,\n setSelectedLinkPreview,\n } = useLinkPreview(text, onLinkMetadataChange);\n\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n\n const mentionsParser = useMentionsParser();\n const mentionsChecker = useMentionsChecker();\n\n React.useEffect(() => {\n const checkContentForMentions = async () => {\n try {\n setError(null);\n onEvent?.('parsing-mentions', true);\n setIsLoading(true);\n const content = text.getCurrentContent().getPlainText('') + ' ';\n const mentions = mentionsParser({ content });\n const checkedMentions = await mentionsChecker({ mentions });\n\n const newMentions = checkedMentions\n .filter(({ exists }) => exists)\n .map(({ username }) => username)\n .slice(0, !!poll ? MAX_MENTIONS_WITH_POLL : 5);\n formik.setFieldValue('mentions', newMentions);\n\n if (!!poll && mentions.length > MAX_MENTIONS_WITH_POLL) {\n setError(ERRORS.pollUserTags);\n } else if (\n checkedMentions.filter(({ exists }) => !exists).length !== 0\n ) {\n setError(ERRORS.usernameNotFound);\n } else if (mentions.length > 5) {\n setError(ERRORS.tooManyUsernames);\n }\n } catch (err) {\n setError(ERRORS.canNotCheckMentions);\n console.log(err);\n } finally {\n setIsLoading(false);\n onEvent?.('parsing-mentions', false);\n }\n };\n checkContentForMentions();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [text]);\n\n const isMainComment = useMemo(() => location === 'comment', [location]);\n\n const isComment = useMemo(\n () => isMainComment || location.startsWith('reply'),\n [isMainComment, location]\n );\n\n const [focusComposeForce, setFocusComposeForce] = React.useState(false);\n\n const onClearPost = useCallback(\n (shouldRemove = true) => {\n formik.setValues(\n setIn(\n setIn(formik.values, 'poll', null),\n 'text',\n createEditorStateWithText('')\n )\n );\n setFocusComposeForce(false);\n setTimeout(() => setFocusComposeForce(true), 100);\n\n if (shouldRemove) {\n onEvent?.('remove');\n } else {\n formik.setTouched({});\n }\n },\n [formik, onEvent]\n );\n\n const allChoicesEmpty = useMemo(\n () =>\n !poll ||\n !poll.choices.find((choice: EditorState) =>\n choice.getCurrentContent().hasText()\n ),\n [poll]\n );\n\n const isQuotedResource = !!quotedResource && !('None' in quotedResource);\n\n const [showRemoveButton, setShowRemoveButtonInternal] = React.useState(\n mobileSize ? true : false\n );\n\n const setShowRemoveButton = useCallback(\n (visible: boolean) => {\n setShowRemoveButtonInternal((previouslyVisible: boolean) => {\n const allowedToShowRemoveIcon = !isMainComment;\n const allowedToHideRemoveIcon = !mobileSize;\n\n if (\n (visible && allowedToShowRemoveIcon) ||\n (!visible && allowedToHideRemoveIcon)\n ) {\n return visible;\n }\n\n return previouslyVisible;\n });\n },\n [isMainComment, mobileSize]\n );\n\n useEffect(() => {\n setShowRemoveButton(mobileSize);\n }, [mobileSize, setShowRemoveButton]);\n\n const onRemoveImage = useCallback(() => {\n formik.setValues(\n setIn(setIn(formik.values, 'image', null), 'nftImageUrl', null)\n );\n }, [formik]);\n\n const [preview, setPreview] = React.useState(false);\n\n const userTags = useMemo(\n () =>\n mentions.map((item) => {\n return { username: item, user_id: null };\n }),\n [mentions]\n );\n\n const photo = image || nftImageUrl;\n\n return (\n setShowRemoveButton(true)}\n onMouseLeave={() => setShowRemoveButton(false)}\n onFocus={onFocus}\n onBlur={onBlur}\n sx={isComment ? undefined : { minHeight: '66px' }}\n >\n (\n \n {children}\n \n )}\n >\n \n {!isComment && (\n \n
    \n {user && }\n
    \n {!isLastThreadItem && (\n \n \n \n )}\n
    \n )}\n (\n \n {children}\n \n )}\n >\n \n (\n \n
    {children}
    \n \n )}\n >\n \n
    \n {onClearPost && (\n \n {showRemoveButton && (\n \n )}\n \n )}\n {preview ? (\n {\n setPreview(false);\n }}\n >\n \n \n ) : (\n {\n formik.setFieldValue('text', newState);\n setPreview(false);\n }}\n processing={disabled}\n setLoadingSearch={setIsLoading}\n emojiPlugin={emojiPlugins[0]}\n placeholder={placeholder}\n location={location}\n onFocus={() => {\n setFocusedEditor?.(0);\n }}\n onBlur={() => {\n setPreview(true);\n }}\n inputFocused={textFocused}\n inputFocusedForce={focusComposeForce}\n disableMentions={!!poll}\n sx={{\n mt: isComment ? 0.75 : 0.5,\n color:\n emojiOpened &&\n text.getCurrentContent().getPlainText() !== ''\n ? theme.palette.colors.ui_07\n : theme.palette.colors.ui_05,\n '&:focus-within': {\n color: theme.palette.colors.ui_07,\n },\n }}\n glowingPlaceholder={glowingPlaceholder}\n />\n )}\n
    \n {photo && (\n \n \n \n \n )}\n {quotedResource && 'ThreadPost' in quotedResource && (\n
    \n \n
    \n )}\n {quotedResource && 'Article' in quotedResource && (\n
    \n \n
    \n )}\n {quotedResource && resourceType === 'project' && (\n
    \n \n
    \n )}\n {quotedResource && resourceType === 'milestone' && (\n
    \n \n
    \n )}\n {!poll &&\n location !== 'comment' &&\n !location.startsWith('reply_') &&\n links.length > 0 &&\n selectedLinkPreview !== '' &&\n linkMetadata[links[linkPreviewIdx]] && (\n
    \n 1}\n onNextClick={() => {\n const nextLinkPreviewIds =\n linkPreviewIdx === links.length - 1 ||\n linkPreviewIdx === 4\n ? 0\n : linkPreviewIdx + 1;\n setLinkPreviewIdx(nextLinkPreviewIds);\n setSelectedLinkPreview(links[nextLinkPreviewIds]);\n }}\n onCloseClick={() => {\n setLinkPreviewIdx(10000);\n setSelectedLinkPreview('');\n }}\n disabled={disabled}\n />\n
    \n )}\n \n
    \n \n
    \n \n\n \n
    \n
    \n \n );\n};\n","import React, { useCallback, useEffect, useMemo } from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { useHistory } from 'react-router-dom';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport { useQueryClient } from 'react-query';\nimport { Typography, useTheme, useMediaQuery, Theme } from '@mui/material';\nimport { useLocalStorage } from 'react-use';\nimport { AddIcon, SmileFaceIcon } from 'components/icons';\nimport { Alert, Dialog, Loading } from 'components';\nimport { ERRORS } from 'components/Compose/types';\nimport { INewPostArgs, useNewPostV3, usePostThread } from 'pages/post/services';\nimport { Profile, QuotedResource } from 'client';\nimport {\n formikThreadToPost,\n isIterable,\n toIcVariant,\n toPollExtension,\n} from 'utils';\nimport { setIn, useFormik } from 'formik';\nimport {\n MAX_POLL_CHOICE_CHAR_COUNT,\n MAX_POLL_DURATION,\n MIN_POLL_DURATION,\n NB_POLL_MANDATORY_CHOICES,\n defaultPollInfo,\n MAX_POLL_CHOICES,\n defaultThreadInfo,\n defaultPostInfo,\n} from '../../constants';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\nimport { FormikErrors, PollInfo, PostInfo, ThreadInfo } from 'types';\nimport { useDeferredPromise } from 'hooks';\nimport { useStyles as useComposeStyles } from 'components/Compose/styles';\nimport {\n ComposeEvent,\n ComposeContainer,\n} from 'components/Compose/ComposeContainer';\nimport createEmojiPlugin, { defaultTheme } from '@draft-js-plugins/emoji';\nimport { IconButton } from '@mui/material';\nimport { positionSuggestions } from 'components/Compose/emojiPositionSuggestion';\nimport { Box } from '@mui/material';\nimport PostToolbar from 'components/Compose/Toolbar';\nimport { convertQuotedResourceToQuotedResourceById } from 'pages/post/utils/quotedResources';\nimport { extractNftIndexIdAndAssetsType } from 'pages/profile/utils';\nimport { useGetAddressByNftUrl } from 'pages/profile/services/nft';\nimport { ConditionalWrapper } from 'components/ConditionalWrapper';\nimport { Button } from '@mui/material';\nimport { resetStreamFilters } from 'pages/discover/services';\n\ndayjs.extend(duration);\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: '100%',\n color: theme.palette.text.primary,\n alignItems: 'start',\n padding: theme.spacing(4),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(2),\n paddingTop: theme.spacing(1),\n paddingBottom: 0,\n },\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n alignItems: 'center',\n padding: theme.spacing(2),\n },\n mainContainer: {\n paddingTop: 0,\n borderTop: 'none',\n width: '100%',\n maxWidth: '620px',\n minWidth: '600px',\n [theme.breakpoints.down('sm')]: {\n maxWidth: '100%',\n minWidth: '190px',\n },\n },\n sharedPostContainer: {\n marginLeft: theme.spacing(7),\n [theme.breakpoints.down('sm')]: {\n marginLeft: 0,\n },\n },\n sharedProjectContainer: {\n marginLeft: theme.spacing(7),\n [theme.breakpoints.down('sm')]: {\n marginLeft: 0,\n },\n },\n sharedMilestoneContainer: {\n marginLeft: theme.spacing(7),\n },\n sharedArticleContainer: {\n marginLeft: theme.spacing(7),\n },\n}));\n\ntype CreatePostType = 'modal' | 'embedded';\n\ninterface Props {\n open?: boolean;\n close?: () => void;\n // used for milestones and projects where QuotedResource is missing data for now\n quoted_resource?: any;\n // used for milestones and projects where QuotedResource is missing data for now\n resource_type?: any;\n quotedResource?: QuotedResource;\n prefilled_content?: { text?: string; imageUrl?: string };\n location?: string;\n author?: Profile;\n date?: string;\n type?: CreatePostType;\n}\n\ninterface BaseSubmitArgs {\n onError?: (arg: any) => void;\n onSuccess?: () => void;\n onSettled?: () => void;\n}\n\ninterface SubmitPostArgs extends BaseSubmitArgs {\n post: PostInfo;\n}\n\ninterface SubmitThreadArgs extends BaseSubmitArgs {\n thread: ThreadInfo;\n}\n\nconst CreatePostModal = ({\n open,\n author,\n close,\n resource_type: resourceTypeRawProp,\n quoted_resource: quotedResourceRawProp,\n quotedResource: quotedResourceProp = toIcVariant('None'),\n prefilled_content,\n location,\n type = 'modal',\n}: Props) => {\n const composeClasses = useComposeStyles({ component: location });\n const classes = useStyles();\n const theme = useTheme();\n const history = useHistory();\n\n const [, setScrollYLS] = useLocalStorage('app.scrollY', 0);\n\n const newPostV3Mutation = useNewPostV3();\n const postThreadMutation = usePostThread();\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const ref = React.useRef(null);\n\n const [postModal, setPostModal] = React.useState(!!open);\n const [discardModal, setDiscardModal] = React.useState(false);\n const [focus, setFocus] = React.useState(false);\n const [usernameErrorModal, setUsernameErrorModal] = React.useState(false);\n const [exceededErrorModal, setExceededErrorModal] = React.useState(false);\n const [successToast, setSuccessToast] = React.useState(false);\n const [errorModal, setErrorModal] = React.useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n\n const goToHome = useCallback(() => {\n const isRedirect = !history.location.pathname.endsWith('/nft');\n if (isRedirect) {\n history.push('/');\n setScrollYLS(0);\n window.scrollTo(0, 0);\n resetStreamFilters();\n }\n }, [history, setScrollYLS]);\n\n const quotedResourceIdentifier = useCallback(\n (resourceToIdentify) => {\n if (resourceTypeRawProp === 'project') {\n const id = resourceToIdentify.project?.experience?.id;\n if (id) {\n return toIcVariant('Experience', id);\n }\n } else if (resourceTypeRawProp === 'milestone') {\n const id = resourceToIdentify.milestone?.milestone?.id;\n if (id) {\n return toIcVariant('Milestone', id);\n }\n }\n return toIcVariant('None');\n },\n [resourceTypeRawProp]\n );\n\n const createEmojiPluginsForThreadItem = React.useCallback(() => {\n defaultTheme.emojiSelectPopover += ` ${composeClasses.commonEmojiContainer}`;\n defaultTheme.emojiSuggestions += ` ${composeClasses.commonEmojiContainer} `;\n defaultTheme.emojiSuggestionsEntry += ` ${composeClasses.emojiSuggestionsEntry} `;\n defaultTheme.emojiSelectPopoverEntry += ` ${composeClasses.emojiSelectPopoverEntry} `;\n defaultTheme.emojiSelectPopoverEntryFocused += ` ${composeClasses.emojiSelectPopoverEntryFocused} `;\n defaultTheme.emojiSelectPopoverNavEntry += ` ${composeClasses.emojiGroup} `;\n defaultTheme.emojiSelectPopoverNavEntryActive += ` ${composeClasses.emojiSelectButton} `;\n\n defaultTheme.emojiSelectButton += ` ${composeClasses.emojiSelectButton} `;\n defaultTheme.emojiSuggestionsEntryFocused += ` ${composeClasses.emojiSuggestionsEntryFocused} `;\n\n defaultTheme.emoji += ` ${composeClasses.emoji}`;\n defaultTheme.emojiSelectPopover += ` ${\n type === 'modal'\n ? composeClasses.emojiPopupModal\n : composeClasses.emojiPopup\n }`;\n\n const emojiPlugins = Array.from(Array(MAX_POLL_CHOICES + 1)).map(() =>\n createEmojiPlugin({\n selectButtonContent: (\n \n \n \n ),\n theme: defaultTheme,\n useNativeArt: true,\n toneSelectOpenDelay: 300,\n positionSuggestions,\n })\n );\n\n return emojiPlugins;\n }, []);\n\n const [emojiPlugins, setEmojiPlugins] = React.useState([\n createEmojiPluginsForThreadItem(),\n ]);\n\n const pushEmojiPlugins = useCallback(() => {\n setEmojiPlugins((emojiPlugins) =>\n emojiPlugins.concat([createEmojiPluginsForThreadItem()])\n );\n }, [createEmojiPluginsForThreadItem]);\n\n const spliceEmojiPlugins = useCallback(\n (start: number, deleteCount: number) => {\n setEmojiPlugins((emojiPlugins) => {\n const newEmojiPlugins = [...emojiPlugins];\n newEmojiPlugins.splice(start, deleteCount);\n return newEmojiPlugins;\n });\n },\n []\n );\n\n const [warnings, setWarnings] = React.useState>([]);\n\n const setWarning = useCallback((index: number, warning: string) => {\n setWarnings((warnings) => {\n const newWarnings = [...warnings];\n newWarnings[index] = warning;\n return newWarnings;\n });\n }, []);\n\n const pollFormikValidate = useCallback((values: PollInfo) => {\n const errors: FormikErrors = {};\n\n const setChoiceError = (i: number, text: string) => {\n if (!errors.choices) {\n errors.choices = [];\n }\n\n errors.choices[i] = text;\n };\n\n for (let i = 0; i < values.choices.length; i++) {\n if (i < NB_POLL_MANDATORY_CHOICES) {\n if (!values.choices[i].getCurrentContent().getPlainText().trim()) {\n setChoiceError(i, 'This field is mandatory');\n }\n }\n\n if (\n values.choices[i]?.getCurrentContent().getPlainText().length >\n MAX_POLL_CHOICE_CHAR_COUNT\n ) {\n setChoiceError(i, 'Choice can have maximum 35 characters');\n }\n }\n\n if (\n values.pollLength.asMilliseconds() < MIN_POLL_DURATION.asMilliseconds() ||\n values.pollLength.asMilliseconds() > MAX_POLL_DURATION.asMilliseconds()\n ) {\n errors.pollLength = true;\n }\n\n return errors;\n }, []);\n\n const isPostItemEmpty = useCallback((values: PostInfo) => {\n const { image, nftImageUrl, quotedResourceId, text, poll } = values;\n const textLength = text.getCurrentContent().getPlainText().trim().length;\n return (\n textLength === 0 && !image && !nftImageUrl && !quotedResourceId && !poll\n );\n }, []);\n\n const postFormikValidate = useCallback(\n (values: PostInfo) => {\n const errors: FormikErrors = {};\n\n const { text, poll } = values;\n\n const textLength = text.getCurrentContent().getPlainText().trim().length;\n if (textLength > 300 || (!!poll && textLength === 0)) {\n errors.text = true;\n }\n\n if (poll) {\n const pollErrors = pollFormikValidate(poll);\n if (Object.keys(pollErrors).length > 0) {\n errors.poll = pollErrors;\n }\n }\n\n return errors;\n },\n [pollFormikValidate]\n );\n\n const threadFormikValidate = useCallback(\n (values: ThreadInfo) => {\n const errors: FormikErrors = {};\n\n let allItemsTextInvalid = true;\n for (let i = 0; i < values.items.length; i++) {\n const item = values.items[i];\n const itemErrors = postFormikValidate(item);\n if (Object.keys(itemErrors).length > 0) {\n if (!errors.items) {\n errors.items = [];\n }\n\n errors.items[i] = itemErrors;\n }\n\n allItemsTextInvalid = allItemsTextInvalid && isPostItemEmpty(item);\n }\n\n if (errors.items === undefined && allItemsTextInvalid) {\n errors.items = [];\n }\n\n return errors;\n },\n [isPostItemEmpty, postFormikValidate]\n );\n\n const prefilledQuotedResource = useMemo(\n () =>\n resourceTypeRawProp\n ? quotedResourceIdentifier(quotedResourceRawProp)\n : convertQuotedResourceToQuotedResourceById(quotedResourceProp),\n [\n quotedResourceIdentifier,\n quotedResourceProp,\n quotedResourceRawProp,\n resourceTypeRawProp,\n ]\n );\n\n const prefilledQuotedResourceId = useMemo(\n () =>\n prefilledQuotedResource\n ? (Object.values(prefilledQuotedResource)[0] as bigint)\n : null,\n [prefilledQuotedResource]\n );\n\n const prefilledQuotedResourceType: any = useMemo(\n () =>\n prefilledQuotedResource ? Object.keys(prefilledQuotedResource)[0] : null,\n [prefilledQuotedResource]\n );\n\n const toICPostRequest = useCallback(\n (post: PostInfo, index = 0): INewPostArgs => ({\n value: post.text.getCurrentContent().getPlainText(),\n mentions: post.mentions,\n image: post.image,\n nft_image_url: post.nftImageUrl,\n quotedResourceById:\n index === 0 && post.quotedResourceId\n ? toIcVariant(prefilledQuotedResourceType, prefilledQuotedResourceId)\n : toIcVariant('None'),\n extension: toPollExtension(post.poll),\n threadMasterId:\n index === 0 && 'ThreadPost' in quotedResourceProp\n ? quotedResourceProp.ThreadPost.master_id\n : undefined,\n link_metadata: post.link_metadata,\n }),\n [prefilledQuotedResourceId, prefilledQuotedResourceType, quotedResourceProp]\n );\n\n const submitPost = useCallback(\n async ({ post, onError, onSuccess, onSettled }: SubmitPostArgs) => {\n newPostV3Mutation.mutate(toICPostRequest(post), {\n onSettled,\n onSuccess,\n onError,\n });\n },\n [newPostV3Mutation, toICPostRequest]\n );\n\n const submitThread = useCallback(\n async ({ thread, onError, onSuccess, onSettled }: SubmitThreadArgs) => {\n const items = thread.items\n .filter((post: PostInfo) => !isPostItemEmpty(post))\n .map((post: PostInfo, index: number) => toICPostRequest(post, index));\n\n postThreadMutation.mutate(\n { thread: items, userId: user?.id },\n {\n onSettled,\n onSuccess,\n onError,\n }\n );\n },\n [isPostItemEmpty, postThreadMutation, toICPostRequest, user?.id]\n );\n\n const {\n defer: preSubmitChecksPromise,\n deferRef: preSubmitChecksPromiseRef,\n } = useDeferredPromise();\n\n const preSubmitChecks = useCallback(() => {\n let promise = Promise.resolve(true);\n\n const warning = warnings.find((value: string) => !!value);\n if (\n warning === ERRORS.tooManyUsernames ||\n warning === ERRORS.pollUserTags\n ) {\n promise = preSubmitChecksPromise().promise;\n setExceededErrorModal(true);\n } else if (warning === ERRORS.usernameNotFound) {\n promise = preSubmitChecksPromise().promise;\n setUsernameErrorModal(true);\n } else if (warning === ERRORS.canNotCheckMentions) {\n promise = preSubmitChecksPromise().promise;\n setErrorMessage(warning);\n setErrorModal(true);\n }\n\n return promise;\n }, [preSubmitChecksPromise, warnings]);\n\n const threadFormikSubmit = useCallback(\n (values, { setSubmitting, resetForm }) => {\n const { items } = values;\n if (items.length > 0) {\n preSubmitChecks().then((resolution: boolean) => {\n setSubmitting(true);\n\n setUsernameErrorModal(false);\n setExceededErrorModal(false);\n\n if (resolution) {\n setWarnings([]);\n\n const onSuccess = () => {\n goToHome();\n setSuccessToast(true);\n setFocusedEditor(0);\n setFocusedThreadItem(0);\n resetForm();\n spliceEmojiPlugins(1, emojiPlugins.length - 1);\n setPostModal(false);\n close?.();\n window.scrollTo(0, 0);\n };\n\n const onError = (err: any) => {\n const message = !err?.message\n ? 'Something went wrong. Please try again and check image format (jpg, jpeg, png or gif) and size (max. 1MB)'\n : err.message.includes('Hashtag limit exceeded')\n ? 'Hashtag is too long. Please keep to max. 50 characters.'\n : err.message.includes('Hashtags limit exceeded')\n ? 'We only support up to 5 hashtags in posts for now.'\n : err.message.includes('Invalid hashtag')\n ? 'Hashtag contains unsupported characters. Please use only alphanumeric characters, numbers, or underlines.'\n : err.message;\n setErrorMessage(message);\n setErrorModal(true);\n };\n\n if (items.length === 1) {\n submitPost({\n post: items[0],\n onError,\n onSuccess,\n });\n } else {\n submitThread({\n thread: values,\n onError,\n onSuccess,\n });\n }\n }\n\n setSubmitting(false);\n });\n }\n\n setSubmitting(false);\n },\n [\n preSubmitChecks,\n goToHome,\n spliceEmojiPlugins,\n emojiPlugins.length,\n close,\n submitPost,\n submitThread,\n ]\n );\n\n const threadFormik = useFormik({\n initialValues: {\n ...defaultThreadInfo,\n items: [\n {\n ...defaultPostInfo,\n text: createEditorStateWithText(prefilled_content?.text || ''),\n quotedResourceId: prefilledQuotedResourceId,\n },\n ],\n },\n validate: threadFormikValidate,\n onSubmit: threadFormikSubmit,\n });\n\n const { items } = threadFormik.values;\n const { items: itemsTouched } = threadFormik.touched;\n\n const indexAndAssetsType = extractNftIndexIdAndAssetsType(\n (prefilled_content || {}).imageUrl\n );\n\n const { data: addressByNftUrl } = useGetAddressByNftUrl(\n indexAndAssetsType.index,\n (prefilled_content || {}).imageUrl\n );\n\n let nftImageByIndex;\n if (addressByNftUrl) {\n nftImageByIndex = addressByNftUrl[indexAndAssetsType.assetsType];\n }\n\n const [nftImageInit, setNftImageInit] = React.useState(false);\n useEffect(() => {\n if (\n !nftImageInit &&\n nftImageByIndex &&\n nftImageByIndex !== items[0].nftImageUrl\n ) {\n setNftImageInit(true);\n threadFormik.setFieldValue('items[0].nftImageUrl', nftImageByIndex);\n }\n }, [items, nftImageByIndex, nftImageInit, threadFormik]);\n\n const [isComposerLoading, setIsComposerLoading] = React.useState(false);\n\n const isProccessing = useMemo(\n () =>\n threadFormik.isSubmitting ||\n newPostV3Mutation.isLoading ||\n postThreadMutation.isLoading,\n [\n newPostV3Mutation.isLoading,\n postThreadMutation.isLoading,\n threadFormik.isSubmitting,\n ]\n );\n\n const [focusedEditor, setFocusedEditor] = React.useState(0);\n const [focusedThreadItem, setFocusedThreadItem] = React.useState(0);\n const [emojiOpened, setEmojiOpened] = React.useState(false);\n\n const focusedTextLength = useMemo(\n () =>\n items[focusedThreadItem].text.getCurrentContent().getPlainText('').length,\n [focusedThreadItem, items]\n );\n\n const focusedHasImage = useMemo(\n () =>\n !!items[focusedThreadItem].image ||\n !!items[focusedThreadItem].nftImageUrl,\n [focusedThreadItem, items]\n );\n\n const focusedIsPoll = useMemo(() => !!items[focusedThreadItem].poll, [\n focusedThreadItem,\n items,\n ]);\n\n const focusedIsQuotedResource = useMemo(\n () => !!items[focusedThreadItem].quotedResourceId,\n [focusedThreadItem, items]\n );\n\n const focusedNbMentions = useMemo(\n () => items[focusedThreadItem].mentions.length,\n [focusedThreadItem, items]\n );\n\n const focusedMarkAsTouched = useCallback(() => {\n if (focusedIsPoll) {\n let touched = threadFormik.touched;\n for (let i = 0; i < NB_POLL_MANDATORY_CHOICES; i++) {\n touched = setIn(\n touched,\n `items[${focusedThreadItem}].poll.choices[${i}]`,\n true\n );\n }\n threadFormik.setTouched(touched);\n }\n }, [focusedIsPoll, focusedThreadItem, threadFormik]);\n\n const mobileSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('xs')\n );\n\n const onThreadItemRemoveIcon = useCallback(\n (index: number) => {\n if (items.length > 1) {\n setFocusedThreadItem(items.length - 2);\n setFocusedEditor(0);\n\n const newItems = [...items];\n newItems.splice(index, 1);\n threadFormik.setFieldValue('items', newItems);\n\n if (isIterable(itemsTouched)) {\n const newItemsTouched = [...itemsTouched];\n newItemsTouched.splice(index, 1);\n threadFormik.setFieldTouched(\n 'items',\n (newItemsTouched as unknown) as boolean\n );\n }\n\n spliceEmojiPlugins(index, 1);\n }\n },\n [items, itemsTouched, spliceEmojiPlugins, threadFormik]\n );\n\n const onComposeEvent = useCallback(\n (itemIndex: number, event: ComposeEvent, data?: any) => {\n switch (event) {\n case 'error':\n setWarning(itemIndex, data);\n break;\n case 'remove':\n onThreadItemRemoveIcon(itemIndex);\n break;\n default:\n break;\n }\n },\n [onThreadItemRemoveIcon, setWarning]\n );\n\n const onEditorFocus = useCallback(\n (editorIndex: number, itemIndex: number) => {\n if (focusedThreadItem !== itemIndex) {\n focusedMarkAsTouched();\n }\n setFocusedEditor(editorIndex);\n setFocusedThreadItem(itemIndex);\n },\n [focusedMarkAsTouched, focusedThreadItem]\n );\n\n const onAddThreadItem = useCallback(() => {\n pushEmojiPlugins();\n threadFormik.setFieldValue('items', items.concat(defaultPostInfo));\n }, [items, pushEmojiPlugins, threadFormik]);\n\n const addPostItemIconColor =\n !threadFormik.isValid || isProccessing\n ? theme.palette.colors.ui_05\n : items.length > 19\n ? theme.palette.colors.danger\n : theme.palette.colors.primary;\n\n const composerLocation = useMemo(\n () => (type === 'modal' ? 'modal' : 'post-home'),\n [type]\n );\n\n const formId = useMemo(\n () => (composerLocation === 'post-home' ? 'post-modal' : composerLocation),\n [composerLocation]\n );\n\n return (\n (\n setFocus(true)}\n onBlur={() => setFocus(false)}\n style={{ borderColor: focus && '#4C46D4' }}\n >\n {children}\n \n )}\n >\n \n \n (\n {\n if (items.length > 0) {\n setDiscardModal(true);\n } else {\n close?.();\n }\n }}\n form={formId}\n ctaText={\n isProccessing\n ? 'Posting'\n : items.length > 1\n ? 'Post All'\n : 'Post'\n }\n cancelText=\"Discard\"\n closeOnSubmit={false}\n secondarySubmit={\n items.length > 0 ? (\n \n {items.length}\n /20\n \n ) : null\n }\n secondarySubmitIcon={\n \n }\n onSecondarySubmit={onAddThreadItem}\n loading={isProccessing}\n disabled={!threadFormik.isValid || isProccessing}\n secondarySubmitDisabled={\n items.length > 19 || !threadFormik.isValid || isProccessing\n }\n >\n {children}\n \n )}\n >\n \n (\n
    {children}
    \n )}\n >\n \n {items.map((item: PostInfo, itemIndex: number) => {\n const isFirstThreadItem = itemIndex === 0;\n const isLastThreadItem = itemIndex === items.length - 1;\n\n const placeholder = !!item.poll\n ? 'Ask a question...'\n : itemIndex === 0\n ? 'What’s on your mind?'\n : itemIndex === 1\n ? 'Start a thread'\n : 'Add another one';\n\n return (\n 1}\n isLastThreadItem={isLastThreadItem}\n key={itemIndex}\n location={composerLocation}\n textFocused={isLastThreadItem}\n placeholder={placeholder}\n setFocusedEditor={(editorIndex: number) =>\n onEditorFocus(editorIndex, itemIndex)\n }\n setIsLoading={setIsComposerLoading}\n onEvent={(e: ComposeEvent, data?: any) =>\n onComposeEvent(itemIndex, e, data)\n }\n author={author}\n resourceType={\n isFirstThreadItem ? resourceTypeRawProp : undefined\n }\n quotedResource={\n isFirstThreadItem\n ? resourceTypeRawProp\n ? quotedResourceRawProp\n : quotedResourceProp\n : undefined\n }\n emojiOpened={emojiOpened}\n />\n );\n })}\n {\n \n
    \n isProccessing,\n EmojiSelect:\n emojiPlugins[focusedThreadItem][focusedEditor]\n .EmojiSelect,\n onOpenEmoji: () => setEmojiOpened(true),\n onCloseEmoji: () => setEmojiOpened(false),\n },\n Image: {\n isActivated: () => focusedHasImage,\n isDisabled: () =>\n isProccessing ||\n focusedHasImage ||\n focusedIsPoll,\n setPhoto: (image: string) => {\n threadFormik.setFieldValue(\n `items[${focusedThreadItem}].image`,\n image\n );\n },\n location: composerLocation,\n },\n Poll: {\n createPoll: () => {\n threadFormik.setFieldValue(\n `items[${focusedThreadItem}].poll`,\n defaultPollInfo\n );\n threadFormik.setFieldValue(\n `items[${focusedThreadItem}].link_metadata`,\n []\n );\n },\n isActivated: () => focusedIsPoll,\n isDisabled: () =>\n isProccessing ||\n focusedHasImage ||\n focusedIsPoll ||\n focusedNbMentions > 0 ||\n focusedIsQuotedResource,\n },\n }}\n />\n
    \n\n {(isComposerLoading || isProccessing) && (\n \n )}\n\n
    \n {focusedTextLength > 0 && (\n 1 ? '16px' : '0',\n color:\n focusedTextLength >= 300\n ? theme.palette.colors.danger\n : theme.palette.text.primary,\n }}\n >\n {focusedTextLength}\n /300\n \n )}\n
    \n {type === 'embedded' && (\n
    \n \n }\n disabled={\n items.length > 19 ||\n !threadFormik.isValid ||\n isProccessing\n }\n onClick={onAddThreadItem}\n >\n {items.length > 1 ? (\n \n {items.length}\n /20\n \n ) : null}\n \n \n {isProccessing\n ? 'Posting'\n : items.length > 1\n ? 'Post All'\n : 'Post'}\n \n
    \n )}\n \n }\n
    \n
    \n \n {discardModal && (\n {\n setPostModal(true);\n setDiscardModal(false);\n }}\n onSubmit={close}\n ctaText=\"Yes, discard\"\n message=\"You sure? Doing this will completely delete your post.\"\n title=\"Discard\"\n disabled={isProccessing}\n cancelColor=\"primary\"\n />\n )}\n\n {usernameErrorModal && (\n preSubmitChecksPromiseRef.resolve(false)}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title=\"User does not exist\"\n message=\"The user you tagged in this post can't be found. Please go back, review your\n post and make sure you typed it correctly. You can post it anyway, but it might\n confuse your community.\"\n ctaText=\"Review Post\"\n onSubmit={() => preSubmitChecksPromiseRef.resolve(false)}\n cancelColor=\"primary\"\n cancelText=\"Post Anyway\"\n onCancel={() => preSubmitChecksPromiseRef.resolve(true)}\n />\n )}\n {exceededErrorModal && (\n preSubmitChecksPromiseRef.resolve(false)}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n title={\n focusedIsPoll\n ? 'You tagged some users'\n : 'You tagged more than 5 users'\n }\n message={\n focusedIsPoll\n ? \"Sorry, you can't tag users in a poll. You can still post this but users won't be tagged.\"\n : 'Sorry, 5 is the limit. You can still post this but only the first 5 users will be tagged.'\n }\n ctaText=\"Review Post\"\n onSubmit={() => preSubmitChecksPromiseRef.resolve(false)}\n cancelColor=\"primary\"\n cancelText=\"Post Anyway\"\n onCancel={() => preSubmitChecksPromiseRef.resolve(true)}\n />\n )}\n {errorModal && (\n {\n setErrorModal(false);\n setErrorMessage('');\n close?.();\n }}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n warning\n closeOnSubmit\n title=\"That didn't work\"\n message={errorMessage}\n ctaText=\"Ok\"\n cancelColor=\"primary\"\n onCancel={() => {\n setErrorModal(false);\n setErrorMessage('');\n }}\n />\n )}\n
    \n \n \n {successToast ? (\n {\n setSuccessToast(null);\n close?.();\n }}\n />\n ) : null}\n
    \n \n );\n};\n\nexport default CreatePostModal;\n","import React from 'react';\nimport { Typography, Box } from '@mui/material';\nimport { QRCode } from 'react-qrcode-logo';\n\nimport getExternalUrl from '../../utils/getExternalUrl';\nimport { Dialog } from 'components';\nimport { HeartbeatView } from '../../utils/heartbeat';\n\ninterface Props {\n open: boolean;\n onClose: any;\n}\n\nconst GetMobileAppModal = ({ onClose }: Props) => {\n return (\n <>\n \n onClose()}\n >\n \n Scan the QR code with your phone to download the app from the App\n Store or Google Play - or search for “distrikt”.\n \n \n Looking forward to seeing you in there. Don’t forget to say hello!\n \n \n \n \n \n \n );\n};\n\nexport default GetMobileAppModal;\n","import React, { useMemo } from 'react';\nimport { Link as RouterLink } from 'react-router-dom';\nimport api from 'client';\nimport { resetStreamFilters } from 'pages/discover/services';\nimport { useQuery } from 'react-query';\nimport {\n Box,\n Card,\n CardContent,\n CardHeader,\n IconButton,\n Link,\n Typography,\n} from '@mui/material';\nimport { ArrowRightIcon } from 'components/icons';\nimport Loading from 'components/Loading';\n\ninterface IAnnouncementsProps {\n children?: React.ReactNode;\n}\n\nfunction Announcements({}: IAnnouncementsProps) {\n const { data: announcementData = [], isLoading } = useQuery(\n ['getLatestAnnouncements'],\n () => api.getLatestAnnouncements()\n );\n const announcements = useMemo(\n () => announcementData.filter((a) => a.announcement_type !== 'feedback'),\n [announcementData]\n );\n\n return (\n \n {\n window.scrollTo(0, 0);\n resetStreamFilters();\n }}\n >\n \n \n }\n />\n\n \n {isLoading ? (\n \n \n \n ) : null}\n\n {announcements.map((announcement, i) => (\n \n \n {announcement.title}\n \n \n {announcement.content}\n \n {\n window.scrollTo(0, 0);\n resetStreamFilters();\n }}\n >\n {announcement.button_name}\n \n \n ))}\n \n \n );\n}\n\nexport default Announcements;\n","import styled from '@emotion/styled';\nimport { AppBar as MuiAppBar, Box } from '@mui/material';\n\nimport { LogoHeaderIcon } from 'components/icons';\n\nexport const Container = styled(Box)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n justifyContent: 'space-between',\n paddingBottom: '32px',\n paddingTop: '8px',\n width: '100%',\n\n [theme.breakpoints.only('xs')]: {\n paddingTop: '24px',\n },\n}));\n\nexport const NavigationContainer = styled(Box)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n\n [theme.breakpoints.only('xs')]: {\n padding: '16px',\n paddingBottom: '32px',\n justifyContent: 'space-between',\n },\n}));\n","import React, { useContext, useMemo } from 'react';\nimport { useQueryClient } from 'react-query';\nimport { Button } from '@mui/material';\n\nimport { AddIcon } from 'components/icons';\nimport { UserAvatar } from 'components';\nimport { UserInfo, Navigation } from '../../components';\nimport { Profile } from 'client';\nimport { resetStreamFilters } from 'pages/discover/services';\nimport * as Styled from './styles';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IDesktopNavigationBarProps {\n tabletSize?: boolean;\n onPostClick: () => void;\n}\n\nfunction DesktopNavigationBar({\n tabletSize,\n onPostClick,\n}: IDesktopNavigationBarProps) {\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const { mode } = useContext(OpenDistriktContext);\n\n const guestView = useMemo(() => mode !== 'User', [mode]);\n\n return (\n \n \n \n {!guestView &&\n (!tabletSize ? (\n onPostClick()}\n >\n Add a Post\n \n ) : (\n }\n onClick={() => onPostClick()}\n />\n ))}\n \n {!guestView &&\n (tabletSize ? (\n resetStreamFilters()}\n />\n ) : (\n resetStreamFilters()} />\n ))}\n \n );\n}\n\nexport default DesktopNavigationBar;\n","import React from 'react';\nimport { Box, Backdrop, CircularProgress } from '@mui/material';\n\nimport { Dialog } from 'components';\nimport TextField from 'components/TextInput/TextField';\nimport makeStyles from '@mui/styles/makeStyles';\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n '& .MuiOutlinedInput-input': {\n fontSize: theme.typography.fontSize,\n },\n },\n backdrop: {\n position: 'absolute',\n zIndex: 1,\n borderRadius: 16,\n },\n}));\ninterface Props {\n close: any;\n formik: any;\n loading: boolean;\n title: string;\n content: string;\n label: string;\n}\n\nconst FeedbackDialog = ({\n close,\n label,\n formik,\n title,\n content,\n loading,\n}: Props) => {\n const classes = useStyles();\n const [discardModal, setDiscardModal] = React.useState(false);\n const handleClose = () => {\n if (formik.values.text) {\n setDiscardModal(true);\n } else {\n close();\n }\n };\n return (\n <>\n \n \n \n \n \n {discardModal && (\n setDiscardModal(false)}\n onSubmit={close}\n ctaText=\"Yes, discard\"\n message=\"You sure? Doing this will delete your feedback.\"\n title=\"Discard\"\n warning\n cancelColor=\"primary\"\n />\n )}\n \n );\n};\n\nexport default FeedbackDialog;\n","import React, { useState } from 'react';\nimport { useFormik } from 'formik';\nimport {\n Card,\n CardContent,\n CardHeader,\n IconButton,\n Link,\n Typography,\n} from '@mui/material';\n\nimport FeedbackDialog from './FeedbackDialog';\nimport api from 'client';\nimport { Alert } from 'components';\nimport { ArrowRightIcon } from 'components/icons';\nimport { sendHeartbeat } from 'utils/heartbeat';\nimport { useMutation } from 'react-query';\n\ninterface FeedbackForm {\n text: string;\n}\n\ninterface IAnnouncementsProps {\n children?: React.ReactNode;\n}\n\n// Contribute announcement id\nconst CONTRIBUTE_ANNOUNCEMENT_ID =\n process.env.NODE_ENV === 'production'\n ? 37840373162344448n\n : 50257652739112960n;\n\nfunction Feedback({}: IAnnouncementsProps) {\n const [openFeedbackForm, setOpenFeedbackForm] = useState(false);\n const [successFeedback, setSuccessFeedback] = useState(false);\n const [errorFeedback, setErrorFeedback] = useState(false);\n\n const provideAnnouncementFeedbackV2Mutation = useMutation(\n async ({ values }: { values: FeedbackForm }) => {\n return await api.provideAnnouncementFeedbackV2(\n CONTRIBUTE_ANNOUNCEMENT_ID,\n values.text,\n 1\n );\n },\n {\n onSuccess: () => {\n setOpenFeedbackForm(false);\n setSuccessFeedback(true);\n formik.resetForm();\n },\n onError: (err) => {\n console.log(err);\n setErrorFeedback(true);\n },\n }\n );\n\n const handleClick = () => {\n setOpenFeedbackForm(true);\n sendHeartbeat();\n };\n\n const formik = useFormik({\n initialValues: {\n text: '',\n },\n validate: (values) => {\n const errors: Partial = {};\n\n if (!values.text || values.text === '') {\n errors.text = 'This field is mandatory';\n }\n\n return errors;\n },\n onSubmit: async (values) => {\n if (values.text) {\n await provideAnnouncementFeedbackV2Mutation.mutateAsync({ values });\n setOpenFeedbackForm(false);\n }\n },\n });\n\n return (\n \n \n \n \n }\n />\n\n \n \n Tell us how you feel about the app and rate some features.\n \n \n Contribute\n \n \n\n {openFeedbackForm ? (\n {\n setOpenFeedbackForm(false);\n formik.resetForm();\n }}\n formik={formik}\n loading={provideAnnouncementFeedbackV2Mutation.isLoading}\n title=\"Give us your feedback\"\n content=\"Got some ideas to make distrikt better? We’re always\n looking to improve the platform for the whole community.\"\n label=\"Leave your feedback below\"\n />\n ) : null}\n\n {successFeedback ? (\n setSuccessFeedback(false)}\n />\n ) : null}\n\n {errorFeedback ? (\n setSuccessFeedback(false)}\n />\n ) : null}\n \n );\n}\n\nexport default Feedback;\n","import { QueryKey, useQuery, useQueryClient } from 'react-query';\n\nimport api, { ProfileWithFollowerData } from 'client';\nimport { MAX_DISPLAY_NAME_LENGTH } from 'constants/common';\nimport { usePreviousValue } from 'hooks';\n\nexport function useSearchWithFollowerData(searchTerm: string) {\n const queryClient = useQueryClient();\n const prevSearchTerm = usePreviousValue(searchTerm);\n\n // TODO in case of 0 results, extension search should not fire a call\n return useQuery, Error>(\n ['searchWithFollowerData', searchTerm],\n async () => {\n // TODO match the full search result optimizations\n /// Search user names based on four combined approaches :\n /// 1. Search 'display_name' based on a \"start_with' pattern matching\n /// approach.\n /// 2. If there is not enough result, then search 'user_name'\n /// based on a \"start_with' pattern matching approach.\n /// 3. If there is not enough result, then search 'display_name' based on a\n /// \"contains' pattern matching approach.\n /// 4. If there is not enough result, then search 'user_name' based on a\n /// \"contains' pattern matching approach.\n const data = await api.searchWithFollowerData(searchTerm);\n return data;\n },\n {\n placeholderData: () => {\n // Adding placeholder data if new search is an extension of previous search\n // by applying the same filtering to prev data that BE does\n if (prevSearchTerm && searchTerm.startsWith(prevSearchTerm)) {\n return queryClient\n .getQueryData>([\n 'searchWithFollowerData',\n prevSearchTerm,\n ])\n ?.filter(\n (f) =>\n f.profile.username\n .toLocaleLowerCase()\n .startsWith(searchTerm.toLocaleLowerCase()) ||\n f.profile.display_name\n .toLocaleLowerCase()\n .startsWith(searchTerm.toLocaleLowerCase())\n );\n }\n\n return [];\n },\n enabled:\n searchTerm.length >= 2 && searchTerm.length <= MAX_DISPLAY_NAME_LENGTH,\n }\n );\n}\n\nexport function useGetAllFollows(userId?: bigint) {\n return useQuery(\n ['getAllFollows', userId],\n async () => {\n const data = await api.getAllFollows(userId);\n\n return data;\n },\n {\n staleTime: 5 * 1000,\n cacheTime: 30 * 1000,\n enabled: !!userId,\n }\n );\n}\n\nexport function useGetLastWeekLeaderBoardResult(userId?: bigint) {\n return useQuery(\n ['getLastWeekLeaderBoardResult', userId],\n async () => {\n const data = await api.getLastWeekLeaderBoardResultsV1(userId || 0n);\n return data;\n },\n {\n staleTime: 5 * 1000,\n cacheTime: 30 * 1000,\n }\n );\n}\n\nexport const getLastWeekLeaderBoardResultV2QueryKey: QueryKey =\n 'getLastWeekLeaderBoardResultV2';\n\nexport function useGetLastWeekLeaderBoardResultV2(userId?: bigint) {\n return useQuery(\n [getLastWeekLeaderBoardResultV2QueryKey, userId],\n async () => {\n const data = await api.getLastWeekLeaderBoardResultV2(userId || 0n);\n return data;\n },\n {\n staleTime: 5 * 1000,\n cacheTime: 30 * 1000,\n }\n );\n}\n","import React, { useEffect, useState } from 'react';\n\nimport Search from 'components/Search';\nimport { useSearchWithFollowerData } from '../../services';\nimport { useHistory } from 'react-router-dom';\n\ninterface IGlobalSearchProps {\n focusOnMount?: boolean;\n portalElementId?: string;\n focused?: boolean;\n enableScrollLock?: boolean;\n onBlur: (value?: string) => void;\n onClick: (value: string) => void;\n}\n\nfunction GlobalSearch({\n portalElementId,\n focused,\n enableScrollLock,\n focusOnMount,\n onBlur,\n onClick,\n}: IGlobalSearchProps) {\n const history = useHistory();\n const [searchTerm, setSearchTerm] = useState('');\n const { data: searchData = [], isFetching } = useSearchWithFollowerData(\n searchTerm\n );\n\n useEffect(() => {\n if (!enableScrollLock) {\n return;\n }\n\n if (focused && searchTerm.length >= 2) {\n if (document.body.style.overflow !== 'hidden') {\n document.body.style.overflow = 'hidden';\n }\n } else {\n if (document.body.style.overflow === 'hidden') {\n document.body.style.overflow = 'auto';\n }\n }\n\n return () => {\n document.body.style.overflow = 'auto';\n };\n }, [focused, enableScrollLock, searchTerm.length]);\n\n function handleClick(value: string) {\n setSearchTerm('');\n onClick(value);\n onBlur instanceof Function && onBlur();\n }\n\n function handleHeaderClick(v) {\n history.push(`/hashtag/${v}`);\n onBlur instanceof Function && onBlur();\n }\n\n return (\n `#${v}`}\n onHeaderClick={handleHeaderClick}\n onChange={(v) => setSearchTerm(v)}\n />\n );\n}\n\nexport default GlobalSearch;\n","import styled from '@emotion/styled';\nimport { AppBar as MuiAppBar, Box } from '@mui/material';\n\nimport { LogoHeaderIcon } from 'components/icons';\n\nexport const NavigationContainer = styled(Box)(({ theme }) => ({\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n\n [theme.breakpoints.only('xs')]: {\n padding: '16px',\n paddingBottom: '32px',\n justifyContent: 'space-between',\n },\n}));\n\nexport const AppBar = styled(MuiAppBar)(({ theme }) => ({\n height: 56,\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'row',\n padding: '16px',\n justifyContent: 'space-between',\n\n [theme.breakpoints.only('xs')]: {\n borderBottom: `1px solid ${theme.palette.colors.ui_04}`,\n },\n}));\n\nexport const LogoIcon = styled(LogoHeaderIcon)(({ theme }) => ({\n color: theme.palette.colors.ui_07,\n width: '66px',\n height: '16px',\n marginLeft: '16px',\n}));\n","import React, { useContext, useMemo, useState } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport { Box, Button, Drawer, IconButton } from '@mui/material';\n\nimport { MenuIcon, SearchIcon } from 'components/icons';\nimport * as Styled from './styles';\nimport { UserAvatar } from 'components';\nimport { GlobalSearch, NotificationButton } from '../../components';\nimport { Navigation } from '../../components';\nimport { Profile } from 'client';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IMobileNavigationBarProps {\n onPostClick: () => void;\n onGetMobileClick: () => void;\n}\n\nfunction MobileNavigationBar({\n onPostClick,\n onGetMobileClick,\n}: IMobileNavigationBarProps) {\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const history = useHistory();\n\n const [searchFocused, setSearchFocused] = useState(false);\n const [openDrawer, setOpenDrawer] = useState(false);\n\n const { mode } = useContext(OpenDistriktContext);\n\n const guestView = useMemo(() => mode !== 'User', [mode]);\n\n return (\n \n \n setOpenDrawer((v) => !v)}>\n \n \n\n {!searchFocused ? (\n history.push(`/`)} />\n ) : null}\n \n\n \n {!searchFocused ? (\n setSearchFocused((v) => !v)}\n >\n \n \n ) : null}\n\n {searchFocused ? (\n history.push(`/u/${user}`)}\n onBlur={() => setTimeout(() => setSearchFocused(false), 300)}\n />\n ) : null}\n\n {!guestView && (\n \n \n\n \n \n )}\n \n\n setOpenDrawer(false)}\n >\n \n \n setOpenDrawer(false)} />\n {!guestView && (\n onPostClick()}\n >\n Add a Post\n \n )}\n \n\n onGetMobileClick()}\n >\n Get the mobile App\n \n \n \n \n );\n}\n\nexport default MobileNavigationBar;\n","export const NOTIFICATIONS_PAGE_SIZE = 20;\n\nexport const NOTIFICATION_TYPE = {\n NEW_FOLLOWER: 1,\n POST_LIKE: 2,\n NEW_COMMENT: 3,\n COMMENT_LIKE: 4,\n TAG: 5,\n POST_SHARE: 6,\n ARTICLE_SHARE: 7,\n VERIFICATION_APPROVED: 8,\n VERIFICATION_REFUSED: 9,\n EXPERIENCE_COLLABORATOR: 10,\n MILESTONE_COLLABORATOR: 11,\n EXPERIENCE_EDITED: 12,\n MILESTONE_EDITED: 13,\n EXPERIENCE_SHARE: 14,\n MILESTONE_SHARE: 15,\n THREAD_POST_SHARE: 16,\n THREAD_POST_LIKE: 17,\n THREAD_POST_COMMENT: 18,\n THREAD_POST_TAG: 19,\n THREAD_POST_COMMENT_LIKE: 20,\n COMMENT_REPLY: 21,\n COMMENT_REPLY_TAG: 22,\n UNKNOWN: 255,\n} as const;\n","import { mainApi, Notification } from 'client';\nimport { NOTIFICATIONS_PAGE_SIZE } from './constants';\nimport {\n InfiniteData,\n QueryKey,\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from 'react-query';\nimport { QueryKeyWithUpdateMethod, replaceFieldInInifiteData } from 'utils';\nimport { useOptimisticMutation } from 'hooks';\n\nexport const getNotificationsQueryKey: QueryKey = 'getNotifications';\n\nexport function useGetNotifications(disabled: boolean) {\n return useInfiniteQuery(\n getNotificationsQueryKey,\n ({ pageParam = 0 }) =>\n mainApi.getNotifications(\n BigInt(pageParam * NOTIFICATIONS_PAGE_SIZE),\n BigInt(NOTIFICATIONS_PAGE_SIZE)\n ),\n {\n enabled: !disabled,\n getNextPageParam: (page, pages) =>\n page && page.length >= NOTIFICATIONS_PAGE_SIZE\n ? pages.length\n : undefined,\n }\n );\n}\n\nconst getUnreadNotificationCountQueryKey: QueryKey =\n 'getUnreadNotificationCount';\n\nexport function useGetUnreadNotificationCount(disabled?: boolean) {\n return useQuery(\n getUnreadNotificationCountQueryKey,\n () => mainApi.getUnreadNotificationCount(),\n {\n initialData: 0n,\n enabled: !disabled,\n refetchInterval: 5 * 1000, // 5 seconds,\n refetchOnWindowFocus: true,\n refetchIntervalInBackground: true,\n }\n );\n}\n\nexport function useMarkAllAsRead() {\n const relatedQueryKeys: Array = [\n {\n queryKey: getUnreadNotificationCountQueryKey,\n update: () => 0n,\n },\n {\n queryKey: getNotificationsQueryKey,\n update: (prev: InfiniteData>) =>\n replaceFieldInInifiteData(prev, 'seen', true),\n },\n ];\n\n return useOptimisticMutation({\n relatedQueryKeys,\n mutationFn: () => mainApi.markAllAsRead(),\n });\n}\n\nexport function useSetNotificationsStatus() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ ids }: { ids: bigint[] }) => mainApi.setNotificationsStatus(ids),\n {\n onSuccess: () => {\n queryClient.invalidateQueries([getNotificationsQueryKey]);\n },\n }\n );\n}\n","import { styled } from '@mui/material/styles';\n\nimport {\n DistriktLogoIcon as MuiDistriktLogoIcon,\n DistriktIcon as MuiDistriktIcon,\n} from 'components/icons';\n\nexport const DistriktIcon = styled(MuiDistriktIcon)(({ theme }) => ({\n color: theme.palette.colors.primary,\n marginLeft: '2px',\n}));\n\nexport const DistriktLogoIcon = styled(MuiDistriktLogoIcon)(({ theme }) => ({\n width: '138px',\n height: '24px',\n cursor: 'pointer',\n marginLeft: '16px',\n\n '& .primaryColor': {\n fill: theme.palette.colors.primary,\n },\n}));\n","import { List, ListItem, SvgIconProps } from '@mui/material';\nimport { NavigationButton } from 'components';\nimport {\n AlarmBellFilledIcon,\n AlarmBellFilledUnreadIcon,\n AlarmBellIcon,\n AlarmBellUnreadIcon,\n DiscoverFilledIcon,\n DiscoverIcon,\n FlashFilledIcon,\n FlashIcon,\n HomeFilledIcon,\n HomeIcon,\n MessagesFilledIcon,\n MessagesIcon,\n MessagesUnreadIcon,\n NewspaperFilledIcon,\n NewspaperIcon,\n ProfileFilledIcon,\n ProfileIcon,\n SearchIcon,\n SearchFilledIcon,\n SettingFilledIcon,\n SettingIcon,\n} from 'components/icons';\nimport React, { useContext, useMemo } from 'react';\n\nimport { Profile } from 'client';\nimport { useGetUnReadMsgCounter } from 'pages/messages/services';\nimport {\n getNotificationsQueryKey,\n useGetUnreadNotificationCount,\n} from 'pages/notifications/services';\nimport { QueryKey, useQueryClient } from 'react-query';\nimport { useHistory, useLocation } from 'react-router-dom';\nimport * as Styled from './styles';\nimport { getPaginatedOptimizedUserFeedQueryKey } from 'pages/home/services';\nimport { getPaginatedOptimizedDiscoveryFeedQueryKey } from 'pages/discover/services';\nimport { resetStreamFilters } from 'pages/discover/services';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IProps {\n size?: 'mobile' | 'tablet' | 'desktop';\n onClick?: () => void;\n}\n\ninterface NavigationMenuItem {\n urls: Array;\n title: string;\n Icon: (props: SvgIconProps) => JSX.Element;\n FilledIcon: (props: SvgIconProps) => JSX.Element;\n exact?: boolean;\n skip?: boolean;\n queryKeys?: Array;\n}\n\nconst Navigation = ({ size, onClick }: IProps) => {\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const isTrusted: boolean =\n queryClient.getQueryData(['isUserTrusted', user?.id]) || false;\n\n const { mode } = useContext(OpenDistriktContext);\n\n const guestView = useMemo(() => mode !== 'User', [mode]);\n\n const { data: notificationCounter } = useGetUnreadNotificationCount(\n size === 'mobile' || guestView\n );\n\n const { data: unreadMsgCounter } = useGetUnReadMsgCounter(user?.id);\n const { pathname = '' } = useLocation();\n\n const history = useHistory();\n\n const homeNavigationItem: NavigationMenuItem = React.useMemo(\n () => ({\n urls: ['/'],\n title: 'Home',\n Icon: HomeIcon,\n FilledIcon: HomeFilledIcon,\n exact: true,\n queryKeys: [[getPaginatedOptimizedUserFeedQueryKey]],\n skip: guestView,\n }),\n [guestView]\n );\n\n const streamNavigationItem = React.useMemo(\n () => ({\n urls: ['/stream', ...(guestView ? ['/'] : [])],\n title: 'Stream',\n Icon: DiscoverIcon,\n FilledIcon: DiscoverFilledIcon,\n queryKeys: [[getPaginatedOptimizedDiscoveryFeedQueryKey]],\n }),\n [guestView]\n );\n\n const nav: Array = React.useMemo(\n () =>\n [\n homeNavigationItem,\n {\n urls: ['/search'],\n title: 'Search',\n Icon: SearchIcon,\n FilledIcon: SearchFilledIcon,\n skip: size !== 'tablet',\n },\n {\n urls: ['/notifications'],\n title: 'Notifications',\n Icon: notificationCounter ? AlarmBellUnreadIcon : AlarmBellIcon,\n FilledIcon: notificationCounter\n ? AlarmBellFilledUnreadIcon\n : AlarmBellFilledIcon,\n skip: size === 'mobile' || guestView,\n queryKeys: [[getNotificationsQueryKey], ['isFollowedBy']],\n },\n streamNavigationItem,\n {\n urls: ['/articles'],\n title: 'Articles',\n Icon: NewspaperIcon,\n FilledIcon: NewspaperFilledIcon,\n queryKeys: [['getArticles']],\n },\n {\n urls: [`/u/${user?.username}`],\n title: 'Profile',\n Icon: ProfileIcon,\n FilledIcon: ProfileFilledIcon,\n queryKeys: [['getFollowCounts', user?.id]],\n skip: guestView,\n },\n {\n urls: ['/messages'],\n title: 'Messages',\n Icon: unreadMsgCounter === 0 ? MessagesIcon : MessagesUnreadIcon,\n FilledIcon:\n unreadMsgCounter === 0 ? MessagesFilledIcon : MessagesUnreadIcon,\n queryKeys: [['getPaginatedRoomCardLitesFromUserId', user?.id]],\n skip: guestView,\n },\n {\n urls: ['/settings'],\n title: 'Settings',\n Icon: SettingIcon,\n FilledIcon: SettingFilledIcon,\n },\n {\n urls: ['/moderation'],\n title: 'Moderation',\n Icon: FlashIcon,\n FilledIcon: FlashFilledIcon,\n skip: !isTrusted || guestView,\n queryKeys: [['getModerationStats']],\n },\n ].filter(({ skip }: NavigationMenuItem) => !skip),\n [\n homeNavigationItem,\n size,\n notificationCounter,\n guestView,\n streamNavigationItem,\n user?.username,\n user?.id,\n unreadMsgCounter,\n isTrusted,\n ]\n );\n\n function handleNavigationClick(item: NavigationMenuItem) {\n if (item.urls.includes(pathname) && item.queryKeys) {\n item.queryKeys.forEach((queryKey: QueryKey) =>\n queryClient.invalidateQueries(queryKey)\n );\n }\n if (streamNavigationItem.title === item.title) {\n resetStreamFilters();\n }\n setTimeout(() => window.scrollTo(0, 0));\n onClick instanceof Function && onClick();\n history.push(item.urls[0] || '/');\n }\n\n return (\n \n {size !== 'mobile' ? (\n handleNavigationClick(homeNavigationItem)}\n >\n {size === 'tablet' ? (\n \n ) : (\n \n )}\n \n ) : null}\n\n {nav.map((item, index) => (\n \n \n ) : (\n \n )\n }\n aria-label={item.title}\n onClick={() => handleNavigationClick(item)}\n />\n \n ))}\n \n );\n};\n\nexport default Navigation;\n","import { messagingApi, UnReadCounter } from 'client';\nimport { useQuery } from 'react-query';\n\nimport { extractApiDataOrThrow } from 'utils';\n\nexport function useGetUnReadMsgCounter(userId: bigint, enable = false) {\n return useQuery(\n ['getUnReadMsgCounterForUserId', userId],\n async () => {\n const res = await messagingApi.getUnReadMsgCounterForUserId(userId);\n\n return extractApiDataOrThrow(res);\n },\n {\n initialData: 0,\n enabled: !!userId,\n refetchOnWindowFocus: true,\n refetchInterval: 5 * 60 * 1000, // 5 minutes\n }\n );\n}\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n userPreviewCard: {\n maxWidth: 224,\n overflow: 'hidden',\n marginRight: theme.spacing(1),\n },\n userPlaceholder: {\n height: 56,\n },\n pins: {\n display: 'flex',\n justifyContent: 'center',\n marginTop: theme.spacing(1.5),\n },\n pin: {\n width: 10,\n height: 10,\n backgroundColor: theme.palette.colors.ui_04,\n borderRadius: '50%',\n cursor: 'pointer',\n borderWidth: 4,\n borderStyle: 'solid',\n borderColor: theme.palette.colors.ui_02,\n boxSizing: 'content-box',\n },\n activePin: {\n backgroundColor: theme.palette.colors.ui_06,\n },\n}));\n","import React, { useState } from 'react';\nimport clsx from 'clsx';\nimport { Profile } from 'client';\nimport { useQueryClient } from 'react-query';\nimport { Box, Card, CardContent, CardHeader } from '@mui/material';\nimport { useGetLastWeekLeaderBoardResult } from 'pages/app/services';\nimport FollowButton from 'components/Buttons/FollowButton';\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport { resetStreamFilters } from 'pages/discover/services';\nimport { useStyles } from './styles';\n\ninterface INewToDistriktProps {\n children?: React.ReactNode;\n}\n\nfunction NewToDistrikt({}: INewToDistriktProps) {\n const classess = useStyles();\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n const { data } = useGetLastWeekLeaderBoardResult(auth?.id);\n const users = data && data[0] && data[0].profiles ? data[0].profiles : [];\n const [startIdx, setStartIdx] = useState(0);\n if (users.length === 0) return null;\n return (\n \n \n \n {Array.from({ length: 5 }).map((_, i) => {\n const user = users[startIdx + i];\n return user ? (\n div': {\n width: '100%',\n },\n }}\n >\n
    \n {\n window.scrollTo(0, 0);\n resetStreamFilters();\n }}\n />\n
    \n \n \n ) : (\n \n );\n })}\n {users.length > 5 && (\n
    \n setStartIdx(0)}\n onKeyDown={() => setStartIdx(0)}\n tabIndex={0}\n role=\"button\"\n />\n setStartIdx(5)}\n onKeyDown={() => setStartIdx(5)}\n tabIndex={0}\n role=\"button\"\n />\n
    \n )}\n
    \n
    \n );\n}\n\nexport default NewToDistrikt;\n","import React from 'react';\nimport { Link as RouterLink } from 'react-router-dom';\n\nimport { AlarmBellIcon, AlarmBellUnreadIcon } from 'components/icons';\nimport { useGetUnreadNotificationCount } from 'pages/notifications/services';\nimport { IconButton } from '@mui/material';\n\ninterface INotificationButtonProps {\n showLeftSpacing?: boolean;\n children?: React.ReactNode;\n}\n\nfunction NotificationButton({ showLeftSpacing }: INotificationButtonProps) {\n const { data: notificationCounter } = useGetUnreadNotificationCount(true);\n\n return (\n \n {notificationCounter ? : }\n \n );\n}\n\nexport default NotificationButton;\n","import React, { useContext } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { Box, Link, Typography } from '@mui/material';\n\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport { Profile } from 'client';\nimport { useGetFollowCount } from 'services';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IUserInfoProps {\n user: Profile;\n onClick?: () => void;\n}\n\nfunction UserInfo({ user, onClick }: IUserInfoProps) {\n const history = useHistory();\n const { data: followCounts } = useGetFollowCount(user?.id);\n\n const { mode } = useContext(OpenDistriktContext);\n\n return mode === 'User' ? (\n \n \n\n \n {\n history.push(`/u/${user?.username}/followers`);\n onClick && onClick();\n }}\n >\n \n {!!followCounts ? followCounts.followers.toString() : '~'}\n {' '}\n Followers\n \n\n {\n history.push(`/u/${user?.username}/following`);\n onClick && onClick();\n }}\n >\n \n {!!followCounts ? followCounts.followed.toString() : '~'}\n {' '}\n Following\n \n \n \n ) : null;\n}\n\nexport default UserInfo;\n","import React, { AppBarProps, Typography } from '@mui/material';\nimport { Link } from '@mui/material';\nimport { useTheme } from '@mui/material';\nimport { OpenDistriktContext } from 'providers';\nimport { useCallback, useContext } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { login } from 'utils/auth';\nimport * as Styled from '../MobileNavigationBar/styles';\n\nexport const LoginSignupBanner = (props: AppBarProps) => {\n const theme = useTheme();\n\n const { sx: sxProps, ...appBarProps } = props;\n\n const sx = sxProps || {};\n\n const { recomputeMode } = useContext(OpenDistriktContext);\n const history = useHistory();\n const handleLogin = useCallback(async () => {\n try {\n await login({\n onSuccess: async () => {\n await recomputeMode(true);\n history.push('/signup');\n },\n });\n } catch (err) {\n console.log(err);\n }\n }, [history, recomputeMode]);\n\n return (\n \n \n \n Login\n {' '}\n or{' '}\n \n Sign Up\n {' '}\n to join the fun!{' '}\n \n ✨\n \n \n \n );\n};\n","import React, { useContext, useMemo, useState } from 'react';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\nimport GetMobileAppModal from 'components/Dialogs/GetMobileApp';\nimport { Alert } from 'components';\nimport { DesktopNavigationBar, MobileNavigationBar } from './components';\nimport { LoginSignupBanner } from './components/LoginSignupBanner';\nimport { OpenDistriktContext } from 'providers';\n\ninterface IProps {\n mobileSize?: boolean;\n}\n\nfunction NavigationBar({ mobileSize }: IProps) {\n const tabletSize = useMediaQuery((theme) => theme.breakpoints.only('sm'));\n\n const [errorMessage, setErrorMessage] = useState('');\n const [getMobileAppModal, setGetMobileAppModal] = useState(false);\n const [postModal, setPostModal] = useState(false);\n\n const { mode } = useContext(OpenDistriktContext);\n\n return (\n <>\n {mobileSize ? (\n \n setPostModal(true)}\n onGetMobileClick={() => setGetMobileAppModal(true)}\n />\n\n {mode !== 'User' && }\n \n ) : (\n setPostModal(true)}\n />\n )}\n\n {postModal ? (\n setPostModal(false)} />\n ) : null}\n\n {getMobileAppModal && (\n setGetMobileAppModal(false)}\n />\n )}\n\n {!!errorMessage ? (\n setErrorMessage('')}\n />\n ) : null}\n \n );\n}\n\nexport default NavigationBar;\n","import * as React from 'react';\n\nconst THRESHOLD = 50;\n\n/*\n * Hook which return the direction a user is scrolling in.\n **/\nexport const useScrollDirection = () => {\n const [scrollDirection, setScrollDirection] = React.useState('down');\n\n const blocking = React.useRef(false);\n const prevScrollY = React.useRef(0);\n\n React.useEffect(() => {\n prevScrollY.current = window.pageYOffset;\n\n const updateScrollDirection = () => {\n const scrollY = window.pageYOffset;\n\n if (Math.abs(scrollY - prevScrollY.current) >= THRESHOLD) {\n const newScrollDirection =\n scrollY > prevScrollY.current ? 'down' : 'up';\n\n setScrollDirection(newScrollDirection);\n\n prevScrollY.current = scrollY > 0 ? scrollY : 0;\n }\n\n blocking.current = false;\n };\n\n const onScroll = () => {\n if (!blocking.current) {\n blocking.current = true;\n window.requestAnimationFrame(updateScrollDirection);\n }\n };\n\n window.addEventListener('scroll', onScroll);\n\n return () => window.removeEventListener('scroll', onScroll);\n }, [scrollDirection]);\n\n return scrollDirection;\n};\n","import React, { useCallback } from 'react';\nimport { Profile } from 'client';\nimport { useQueryClient } from 'react-query';\nimport { Box, Card, CardContent, CardHeader, Typography } from '@mui/material';\nimport { abbreviate } from 'utils';\nimport { useHistory } from 'react-router-dom';\nimport { useGetLastWeekLeaderBoardResultV2 } from 'pages/app/services';\nimport { resetStreamFilters } from 'pages/discover/services';\n\ntype Hashtag = [string, number];\n\ninterface HashtagProps {\n info: Hashtag;\n onClick?: () => void;\n}\n\nconst Hashtag = ({ info, onClick: onClickProp }: HashtagProps) => {\n const [value, postsCount] = info;\n\n const history = useHistory();\n\n const onClick = useCallback(() => {\n window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });\n history.push(`/hashtag/${value}`);\n onClickProp && onClickProp();\n }, [history, value, onClickProp]);\n\n return (\n \n \n #{value}\n \n \n {abbreviate(postsCount)} {postsCount === 1 ? 'post' : 'posts'}\n \n \n );\n};\n\nexport const TrendingThisWeek = () => {\n const queryClient = useQueryClient();\n\n const auth = queryClient.getQueryData(['getSelf']);\n const { data } = useGetLastWeekLeaderBoardResultV2(auth?.id);\n\n const hashtags = data?.[0]?.hashtags || [];\n\n return hashtags.length > 0 ? (\n \n \n \n {hashtags.map((hashtag: Hashtag, index: number) => (\n resetStreamFilters()}\n />\n ))}\n \n \n ) : null;\n};\n","import { Box, useTheme } from '@mui/material';\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { useWindowScroll, useWindowSize } from 'react-use';\n\nimport GetMobileAppModal from 'components/Dialogs/GetMobileApp';\nimport { useScrollDirection } from 'hooks/useScrollDirection';\nimport { Announcements, Feedback, NewToDistrikt } from './components';\nimport { TrendingThisWeek } from './components/TrendingThisWeek';\nimport { LoginSignupBox } from 'components';\nimport { OpenDistriktContext } from 'providers';\nimport { Typography } from '@mui/material';\n\ninterface IProps {\n children?: React.ReactNode;\n}\n\n// height of the appbar\n// 16px top spacing + 16px bottom\n// 32px spacing between inputs + 2 buttons of 40px\n// 16px empty space covered in card container\nconst DISTANCE_TOP = 160;\n\nfunction Sidebar({ children }: IProps) {\n const theme = useTheme();\n\n const [getMobileAppModal, setGetMobileAppModal] = useState(false);\n const ref = useRef(null);\n const emptyBoxRef = useRef(null);\n const scrollDirection = useScrollDirection();\n const { y: windowScrollY = 0 } = useWindowScroll();\n const { height: visibleWindowHeight } = useWindowSize();\n const refHeight = ref.current?.getBoundingClientRect().height || 0;\n const fullPageHeight = document.body.clientHeight;\n\n // used to set up sidebar smooth scrolling\n // when sidebar is scrolled to the bottom, as soon as user starts scrolling to the top, the sidebar should start scrolling up as well\n // when user starts scrolling to the bottom, the sidebar should start scrolling down again and became sticky when the bottom of sidebar becames visible\n useEffect(() => {\n if (ref.current) {\n if (scrollDirection === 'down') {\n // make sticky sidebar scrollable until the bottom of sidebar is visible\n if (refHeight) {\n // refHeight check needed for first load when not all components are rendered yet\n const top = visibleWindowHeight - refHeight;\n ref.current.style.top = `${top < 0 ? top : 0}px`;\n }\n ref.current.style.bottom = 'unset';\n\n // in case user is scrolled to the bottom, to avoid adding additional space to the bottom of the page\n const marginTop =\n windowScrollY + refHeight + DISTANCE_TOP > fullPageHeight\n ? fullPageHeight - refHeight - DISTANCE_TOP\n : windowScrollY;\n\n emptyBoxRef.current.style.marginTop = `${\n windowScrollY !== 0 ? marginTop : 0\n }px`;\n } else {\n // make sticky sidebar scrollable until the top of sidebar is visible\n ref.current.style.top = 'unset';\n ref.current.style.bottom = `${\n visibleWindowHeight - refHeight - DISTANCE_TOP\n }px`;\n\n // check if the bottom of the sidebar is visible\n if (\n ref.current.offsetTop + refHeight <\n windowScrollY + visibleWindowHeight\n ) {\n // adjust marginTop of emptyBox to make the sidebar be at bottom & scrollable up\n emptyBoxRef.current.style.marginTop = `${\n windowScrollY - refHeight + visibleWindowHeight - DISTANCE_TOP\n }px`;\n }\n }\n }\n // scroll windowScrollY position excluded from effect dependencies\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [refHeight, scrollDirection, visibleWindowHeight]);\n\n const { mode } = useContext(OpenDistriktContext);\n\n return (\n <>\n \n \n {!children ? (\n <>\n {mode !== 'User' ? (\n \n Connect on your own terms\n \n }\n description={\n \n distrikt is a decentralized social media network that\n empowers users. 100% on the blockchain.\n \n }\n sx={{ marginTop: 2, marginBottom: 4 }}\n />\n ) : (\n \n )}\n\n \n \n \n \n ) : (\n children\n )}\n \n\n {getMobileAppModal && (\n setGetMobileAppModal(false)}\n />\n )}\n \n );\n}\n\nexport default Sidebar;\n","import { AppBar, Button } from '@mui/material';\nimport React, { useState } from 'react';\n\nimport GetMobileAppModal from 'components/Dialogs/GetMobileApp';\nimport { useHistory } from 'react-router-dom';\nimport { GlobalSearch } from './components';\n\nfunction Sidebar() {\n const history = useHistory();\n const [getMobileAppModal, setGetMobileAppModal] = useState(false);\n\n return (\n \n setGetMobileAppModal(true)}\n >\n Get the mobile App\n \n\n history.push(`/u/${user}`)} />\n\n {getMobileAppModal && (\n setGetMobileAppModal(false)}\n />\n )}\n \n );\n}\n\nexport default Sidebar;\n","import React from 'react';\nimport { Box, Container as MuiContainer } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\n// For new design system, a grid layout display was used.\n// ---\n// Key distinction between grid and flex:\n// Grid puts layout first. Grid will take your content, and change its shape so that it fits your desired layout.\n// Flexbox puts content first.Flexbox will take your layout, and change its shape so that it fits the desired size of your content.\n// Moreover our new designs were set up on a 16 point grid instead of 12 that mui uses.\n// https://projects.invisionapp.com/d/main#/console/22063533/467947070/preview\n//\n// So since the layout sizes needed to be set up manually instead of using mui's methods, might as well use grid over flex for it.\n\nexport const Container = styled(MuiContainer)(({ theme }) => ({\n [theme.breakpoints.between('xs', 'sm')]: {\n padding: 0,\n },\n\n [theme.breakpoints.between('sm', 'md')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n\n [theme.breakpoints.up('md')]: {\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(2),\n },\n}));\n\n// TODO set min height equal to right bar height & height at 100%\nexport const Layout = styled(Box)(({ theme }) => ({\n display: 'grid',\n gridColumnGap: theme.spacing(2),\n minHeight: '100vh',\n width: '100%',\n\n [theme.breakpoints.between('xs', 'sm')]: {\n gridTemplateColumns: 'repeat(4, 1fr)',\n },\n\n [theme.breakpoints.between('sm', 'md')]: {\n gridTemplateColumns: 'repeat(8, 1fr)',\n },\n\n [theme.breakpoints.up('md')]: {\n gridTemplateColumns: 'repeat(16, 1fr)',\n gridColumnGap: theme.spacing(4),\n },\n}));\n\ninterface IContainerProps {\n extendedDesktopSize?: boolean;\n}\n\nexport const LeftContainer = styled(Box)(({ theme }) => ({\n background: theme.palette.colors.ui_03,\n height: '100vh',\n position: 'sticky',\n top: 0,\n width: '100%',\n overflow: 'hidden',\n\n [theme.breakpoints.between('xs', 'sm')]: {\n display: 'none',\n },\n\n [theme.breakpoints.between('sm', 'md')]: {\n gridColumn: 'span 1',\n },\n\n [theme.breakpoints.up('md')]: {\n gridColumn: 'span 3',\n },\n}));\n\nexport const CenterContainer = styled(Box)(\n ({ theme, extendedDesktopSize }) => ({\n background: theme.palette.colors.ui_01,\n width: '100%',\n\n [theme.breakpoints.between('xs', 'sm')]: {\n gridColumn: 'span 4',\n },\n\n [theme.breakpoints.between('sm', 'md')]: {\n gridColumn: 'span 7',\n },\n\n [theme.breakpoints.up('md')]: {\n gridColumn: extendedDesktopSize ? 'span 13' : 'span 9',\n borderRight: !extendedDesktopSize\n ? `1px solid ${theme.palette.colors.ui_04}`\n : 'none',\n },\n })\n);\n\nexport const RightContainer = styled(Box)(\n ({ theme, extendedDesktopSize }) => ({\n background: theme.palette.colors.ui_01,\n height: '100%',\n\n [theme.breakpoints.between('xs', 'sm')]: {\n display: 'none',\n },\n\n [theme.breakpoints.between('sm', 'md')]: {\n display: 'none',\n },\n\n [theme.breakpoints.up('md')]: {\n gridColumn: 'span 4',\n display: extendedDesktopSize ? 'none' : 'block',\n },\n })\n);\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n userDataContainer: {\n marginBottom: '8px',\n },\n avatarContainer: {\n marginRight: '16px',\n minWidth: '40px',\n },\n title: {\n marginBottom: '4px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n alignItems: 'center',\n },\n content: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n color: theme.palette.colors.ui_06,\n },\n date: {\n color: theme.palette.colors.ui_06,\n whiteSpace: 'nowrap',\n },\n subtitle: {\n color: theme.palette.colors.ui_05,\n whiteSpace: 'nowrap',\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n ml: {\n marginLeft: theme.spacing(1),\n },\n}));\n","import React from 'react';\nimport clsx from 'clsx';\nimport { Box, Typography } from '@mui/material';\n\nimport { UserAvatar } from 'components';\nimport type { RoomCardLite } from 'client';\nimport { getUserName } from 'utils';\nimport { renderUserBadge } from 'utils/moderationShortcuts';\nimport { useStyles } from './styles';\n\ninterface IProps {\n date?: string;\n user: RoomCardLite['other_user_profile'];\n hideUserName?: boolean;\n subtitle?: string;\n className?: string;\n}\n\nfunction AvatarCard({\n user,\n hideUserName,\n subtitle,\n date,\n className = '',\n}: IProps) {\n const classes = useStyles();\n\n return (\n \n \n \n \n\n \n \n \n \n {user.display_name}\n \n\n {renderUserBadge(user, { className: classes.teamBadge })}\n \n\n {date ? (\n \n {date}\n \n ) : null}\n \n\n {!hideUserName ? (\n \n \n @{getUserName(user)}\n \n \n ) : null}\n\n {subtitle ? (\n \n {subtitle}\n \n ) : null}\n \n \n );\n}\n\nfunction Subtitle({ subtitle, classes }) {\n if (typeof subtitle !== 'string') {\n return <>{subtitle};\n }\n\n return (\n \n {subtitle}\n \n );\n}\n\nexport default AvatarCard;\n","import React from 'react';\nimport { Box, useTheme } from '@mui/material';\n\nimport { EmptyState } from 'components';\n\ninterface IProps {\n roomsAvailable?: boolean;\n hideButton?: boolean;\n onClick: () => void;\n}\n\nfunction EmptyMessage({ hideButton, roomsAvailable, onClick }: IProps) {\n const theme = useTheme();\n\n return (\n \n \n \n );\n}\n\nexport default EmptyMessage;\n","import React from 'react';\n\nimport { ApiErrorKind } from 'client';\nimport { AllKeys } from 'types';\nimport { Alert } from 'components';\nimport { errorMessage } from 'pages/messages/utils';\n\ninterface IProps {\n errorKind: AllKeys;\n content?: string;\n onClose: () => void;\n}\n\nfunction ErrorAlert({ content, errorKind, onClose }: IProps) {\n const message = content || errorMessage(errorKind);\n\n if (!message) {\n return null;\n }\n\n return ;\n}\n\nexport default ErrorAlert;\n","import React, { useEffect, useState } from 'react';\nimport { useQueryClient } from 'react-query';\n\nimport Search from 'components/Search';\nimport { useSearchFollowers } from 'pages/messages/services';\nimport { Profile, FollowerProfileLite } from 'client';\n\ninterface IFollowerSearchProps {\n focusOnMount?: boolean;\n portalElementId?: string;\n onBlur: (value?: string) => void;\n onClick: (value: string) => void;\n}\n\nfunction FollowerSearch({\n portalElementId,\n focusOnMount,\n onBlur,\n onClick,\n}: IFollowerSearchProps) {\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const [searchTerm, setSearchTerm] = useState('');\n const { data: searchData = [], isFetching } = useSearchFollowers(\n user?.id,\n searchTerm\n );\n\n function handleClick(_, user: FollowerProfileLite) {\n setSearchTerm('');\n onClick(user);\n onBlur instanceof Function && onBlur();\n }\n\n return (\n setSearchTerm(v)}\n />\n );\n}\n\nexport default FollowerSearch;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(({ typography, palette, spacing }) => ({\n container: {\n padding: spacing(0),\n paddingBottom: spacing(1),\n position: 'relative',\n\n '&$containerDisabled': {\n opacity: 0.55,\n '& button': {\n opacity: 0.55,\n },\n },\n },\n containerDisabled: {},\n editorContainer: {\n width: '100%',\n height: '100%',\n\n '& .public-DraftEditor-content': {\n ...typography.paragraph,\n paddingTop: 5,\n paddingBottom: 5,\n wordBreak: 'break-word',\n },\n },\n photoContainer: {\n paddingTop: spacing(1.5),\n marginBottom: spacing(3),\n width: '100%',\n height: '100%',\n },\n button: {\n paddingLeft: spacing(5),\n paddingRight: spacing(5),\n },\n optionsContainer: {\n display: 'flex',\n width: '100%',\n },\n rightContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n counter: {\n marginRight: spacing(2),\n marginLeft: spacing(2),\n WebkitTouchCallout: 'none' /* iOS Safari */,\n WebkitUserSelect: 'none' /* Safari */,\n KhtmlUserSelect: 'none' /* Konqueror HTML */,\n MozUserSelect: 'none' /* Old versions of Firefox */,\n MsUserSelect: 'none' /* Internet Explorer/Edge */,\n userSelect:\n 'none' /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */,\n },\n usernameError: {\n color: palette.colors.error,\n fontSize: typography.pxToRem(14),\n },\n emojiWrapper: {\n marginLeft: spacing(-2.5),\n },\n}));\n","import React, { useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\nimport { Box, Button, Typography } from '@mui/material';\nimport { createEditorStateWithText } from '@draft-js-plugins/editor';\nimport { trim } from 'lodash';\nimport { useTheme } from '@mui/material/styles';\n\nimport Compose from 'components/Compose/Compose';\nimport Toolbar from 'components/Compose/Toolbar';\nimport { MESSAGE_CHAR_LIMIT } from 'pages/messages/constants';\nimport { Profile, RoomCardLite } from 'client';\nimport { SmileFaceIcon } from 'components/icons';\nimport { fromIcEnum, fromIcOpt } from 'utils';\nimport { useEmojiPlugin } from 'hooks';\nimport { useSetLastMsgsReadStatusUserId } from 'pages/messages/services/rooms';\nimport { useStyles } from './styles';\n\ninterface IProps {\n disabled?: boolean;\n authUser: Profile;\n room: RoomCardLite;\n onSubmit: (value: string) => void;\n}\n\nfunction Input({ room, authUser, disabled, onSubmit }: IProps) {\n const classes = useStyles();\n const theme = useTheme();\n const [focused, setFocused] = useState(false);\n const [editorState, setEditorState] = useState(() =>\n createEditorStateWithText('')\n );\n const [isEmojiOpen, setIsEmojiOpen] = useState(false);\n const setLastMsgsReadStatusMutate = useSetLastMsgsReadStatusUserId();\n const lastMessage = fromIcOpt(room?.last_msg);\n\n const placeholder = 'Send a message';\n\n const { contentEmpty, reachedLengthLimit, overLenghtLimit } = useMemo(() => {\n const content = trim(editorState.getCurrentContent().getPlainText(''));\n const contentLength = content.length;\n const reachedLengthLimit = contentLength >= MESSAGE_CHAR_LIMIT;\n const overLenghtLimit = contentLength > MESSAGE_CHAR_LIMIT;\n return {\n reachedLengthLimit,\n overLenghtLimit,\n contentEmpty: contentLength === 0,\n };\n }, [editorState]);\n\n const { emojiPlugin } = useEmojiPlugin({\n selectButtonContent: (\n \n ),\n });\n\n useEffect(() => {\n // clear input value when room changes\n if (!contentEmpty) {\n setEditorState(createEditorStateWithText(''));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [room?.room_header.id]);\n\n function handleSubmit() {\n // in case emoji suggestions are open, don't submit on enter\n if (isEmojiOpen) {\n return;\n }\n\n // don't submit if content is empty or Input is disabled\n if (contentEmpty || disabled) {\n setEditorState(createEditorStateWithText('')); // workaround to block creating new lines on enter if disbled\n return;\n }\n\n const content = editorState.getCurrentContent().getPlainText('');\n\n if (!overLenghtLimit) {\n if (onSubmit instanceof Function) {\n onSubmit(trim(content));\n\n setEditorState(createEditorStateWithText(''));\n }\n }\n }\n\n const isBlocked = fromIcOpt(room?.room_header.blocked_by) === authUser.id;\n\n function handleFocus() {\n if (isBlocked) {\n return;\n }\n\n setFocused(true);\n\n if (!room) {\n return;\n }\n\n const unread =\n lastMessage?.user_id !== authUser.id &&\n fromIcEnum(lastMessage.status) === 'UnRead';\n\n if (unread) {\n setLastMsgsReadStatusMutate.mutate({\n authUserId: authUser.id,\n roomId: room.room_header.id,\n messageId: lastMessage.id,\n });\n }\n }\n\n return (\n \n \n \n {/* TODO set it up to disable mentions */}\n setFocused(false)}\n emojiSuggestionProps={{\n onOpen: () => setIsEmojiOpen(true),\n onClose: () => setIsEmojiOpen(false),\n }}\n />\n \n \n\n \n
    \n disabled || isBlocked,\n EmojiSelect: emojiPlugin.EmojiSelect,\n },\n }}\n className={classes.emojiWrapper}\n />\n
    \n \n {editorState.getCurrentContent().getPlainText('').length}/\n {MESSAGE_CHAR_LIMIT}\n \n \n MESSAGE_CHAR_LIMIT\n }\n onClick={handleSubmit}\n >\n Send\n \n
    \n
    \n
    \n \n );\n}\n\nexport default Input;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(({ typography, palette }) => ({\n container: {\n width: '100%',\n },\n avatarContainer: {\n maxWidth: '40px',\n maxHeight: '40px',\n marginRight: '8px',\n },\n contentContainer: {\n marginBottom: '8px',\n alignItems: 'end',\n },\n contentContainerLeft: {\n justifyContent: 'flex-start',\n },\n contentContainerRight: {\n justifyContent: 'flex-end',\n },\n content: {\n padding: '10px 8px',\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-all',\n },\n contentLeft: {\n borderRadius: '16px 16px 16px 0',\n backgroundColor: palette.colors.ui_02,\n color: palette.colors.ui_07,\n '& a': {\n color: palette.colors.ui_07,\n },\n },\n contentRight: {\n borderRadius: '16px 16px 0 16px',\n backgroundColor: palette.colors.primary,\n color: palette.colors.ui_01,\n '& a': {\n color: palette.colors.ui_01,\n },\n },\n contentError: {\n backgroundColor: palette.colors.error,\n color: palette.colors.ui_07,\n },\n date: {\n ...typography.body,\n alignSelf: 'end',\n textAlign: 'right',\n color: palette.colors.ui_05,\n },\n error: {\n color: '#F34C57',\n opacity: '1',\n },\n}));\n","import React, { RefObject, useMemo } from 'react';\nimport clsx from 'clsx';\nimport { Grid, Typography } from '@mui/material';\n\nimport { GetMsg, RoomCardLite } from 'client';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport { UserAvatar } from 'components';\nimport { bytesArrayToString, getDateTimeString } from 'utils';\nimport { useStyles } from './styles';\n\ninterface IProps {\n messageRef: RefObject;\n user: RoomCardLite['other_user_profile'];\n data: GetMsg;\n showAvatar?: boolean;\n ownMessage?: boolean;\n hideDate?: boolean;\n isLast?: boolean;\n}\n\nfunction MessageBox({\n user,\n messageRef,\n data,\n showAvatar = true,\n ownMessage = false,\n hideDate,\n isLast,\n}: IProps) {\n const classes = useStyles();\n const isTempMessage = data.id?.startsWith('temp_');\n\n const date = useMemo(() => {\n if (data.failedToSend) {\n return 'Send failed!';\n }\n\n if (isTempMessage) {\n return 'Sending...';\n }\n\n return getDateTimeString(data.timestamp);\n }, [data.failedToSend, data.timestamp, isTempMessage]);\n\n return (\n \n \n \n \n {!ownMessage && showAvatar ? : null}\n \n \n \n \n \n \n \n\n {!hideDate || data.failedToSend ? (\n \n {date}\n \n ) : null}\n \n \n );\n}\n\nexport default MessageBox;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(\n ({ breakpoints, typography, spacing, palette }) => ({\n container: {\n padding: '0 32px 0 32px',\n // 93px - height of the conversation header container\n height: 'calc(100vh - 57px - 16px - 56px - 93px)',\n overflowY: 'auto',\n\n [breakpoints.only('sm')]: {\n padding: '8px 24px 0 24px',\n },\n\n [breakpoints.only('xs')]: {\n padding: '8px 16px 0 24px',\n },\n },\n messageList: {\n overflowY: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-end',\n minHeight: '100%',\n paddingTop: spacing(2),\n },\n iconButton: {\n background: `${palette.colors.ui_01} !important`,\n borderRadius: '10px',\n border: `1px solid ${palette.colors.primary}`,\n padding: spacing(1),\n position: 'absolute',\n right: spacing(4),\n\n [breakpoints.only('sm')]: {\n right: spacing(3),\n },\n\n [breakpoints.only('xs')]: {\n right: spacing(2),\n },\n },\n button: {\n ...typography.bodyb,\n padding: '8px 24px',\n color: palette.colors.primary,\n border: 'none',\n\n '&$disabled': {\n color: palette.colors.ui_02,\n },\n },\n disabledList: {\n opacity: 0.55,\n },\n })\n);\n","import React, {\n Fragment,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useQueryClient } from 'react-query';\nimport clsx from 'clsx';\nimport { flattenDeep, isEqual } from 'lodash';\nimport { Box, Button, Grid, IconButton } from '@mui/material';\n\nimport ErrorAlert from '../ErrorAlert/ErrorAlert';\nimport { ArrowDownIcon } from 'components/icons';\nimport { GetMsg, Profile, RoomCardLite } from 'client';\nimport { Loading } from 'components';\nimport { MessageBox, SystemMessage } from '../';\nimport { errorHandler } from 'pages/messages/effects/errors';\nimport { getDateString, fromIcOpt, isAfterDiff, isSameDay } from 'utils';\nimport { useGetMessagesByUserId } from 'pages/messages/services/messages';\nimport { useScrollIsBottom } from 'hooks';\nimport { useStyles } from './styles';\n\ninterface IProps {\n authUser: Profile;\n room: RoomCardLite;\n}\n\nfunction MessageList({ authUser, room }: IProps) {\n const classes = useStyles();\n const [focusedMessageId, setFocusedMessageId] = useState(null);\n const focusedMessageRef = useRef();\n const latestMessageRef = useRef();\n const containerRef = useRef();\n const queryClient = useQueryClient();\n const {\n data: pagedMessages = {\n pages: [[]],\n },\n isFetching,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n error,\n isError,\n remove,\n } = useGetMessagesByUserId(room.other_user_profile.id, authUser.id);\n\n // in useEffect dependancies, objects have to be the exact same object in order for useEffect to skip running the effect,\n // so even though the content is the same, because the object itself isn't, we manually check for content equality and use ref as a dependancy in useEffect\n const messagesRef = useRef(pagedMessages);\n if (!isEqual(pagedMessages, messagesRef.current)) {\n messagesRef.current = pagedMessages;\n }\n\n const messages: Array = useMemo(() => {\n if (!pagedMessages) {\n return [];\n }\n\n return flattenDeep(pagedMessages.pages).reverse();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messagesRef.current]);\n\n const focusedMessageIndex = useMemo(\n () => messages.findIndex((m) => m.id === focusedMessageId),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [focusedMessageId, messagesRef.current]\n );\n\n const messageShouldShowTimeList = useMemo(\n () =>\n messages.map((message, i, arr) => {\n if (i === arr.length - 1) {\n return false;\n }\n\n // if different user, show time\n if (message.user_id !== arr[i + 1].user_id) {\n return false;\n }\n\n return isAfterDiff(\n message.timestamp,\n arr[i + 1].timestamp,\n 'minutes',\n 2\n );\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [messagesRef.current]\n );\n\n const { isBottom, isScrollEnabled } = useScrollIsBottom(\n containerRef,\n messages.length\n );\n\n const isBlocked = fromIcOpt(room.room_header.blocked_by) === authUser.id;\n\n // using layout effect to scroll to bottom before first paint when loading messages\n useLayoutEffect(() => {\n if (isScrollEnabled && focusedMessageIndex !== -1) {\n handleScrollToFocused();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isScrollEnabled, focusedMessageIndex, messagesRef.current]);\n\n // used to set latest message as focused message and scroll to it on first load of messages\n useLayoutEffect(() => {\n if ((isScrollEnabled && focusedMessageIndex === -1) || isBottom) {\n setFocusedMessageId(messages[messages.length - 1]?.id);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isScrollEnabled, messagesRef.current]);\n\n function handleScrollToFocused() {\n const hasTempMessage = messages[messages.length - 1]?.id.startsWith(\n 'temp_'\n );\n\n if (!hasTempMessage && focusedMessageRef.current) {\n focusedMessageRef.current.scrollIntoView(false);\n } else {\n handleScrollToBottom(false);\n }\n }\n\n function handleScrollToBottom(smooth: boolean) {\n if (latestMessageRef.current) {\n latestMessageRef.current.scrollIntoView(\n smooth\n ? {\n block: 'center',\n behavior: 'smooth',\n }\n : false\n );\n }\n }\n\n function handleLoadMore() {\n setFocusedMessageId(messages[0]?.id);\n fetchNextPage();\n }\n\n function handleErrorClose() {\n const errorKind = error?.message;\n\n // handle errors which an alert was set up for\n // was skipped on initial error handle in service's on error\n errorHandler(\n errorKind,\n queryClient,\n { authUserId: authUser.id },\n false,\n () => {\n remove();\n }\n );\n }\n\n return (\n <>\n \n {isError ? (\n \n ) : null}\n\n \n {messages.length === 0 && isFetching ? : null}\n\n {hasNextPage ? (\n \n \n Load Earlier\n \n \n ) : null}\n\n {messages.map((message, i) => {\n const ownMessage = authUser.id === message.user_id;\n\n return (\n \n {!isSameDay(message.timestamp, messages[i - 1]?.timestamp) ? (\n \n \n \n ) : null}\n\n \n \n \n \n );\n })}\n \n\n {focusedMessageIndex !== -1 && isScrollEnabled && !isBottom ? (\n handleScrollToBottom(true)}\n className={classes.iconButton}\n size=\"large\"\n sx={{ bottom: isBlocked ? '80px' : '16px' }}\n >\n \n \n ) : null}\n \n\n {isBlocked ? (\n \n \n \n ) : null}\n \n );\n}\n\nexport default MessageList;\n","import { useState } from 'react';\nimport { useIdleTimer } from 'react-idle-timer';\nimport { useInfiniteQuery, useMutation, useQueryClient } from 'react-query';\n\nimport {\n messagingApi,\n GetMsg,\n RoomCardLite,\n RoomId,\n PostMsg,\n ApiResultPushMsgResponse,\n UserId,\n} from 'client';\nimport { extractApiDataOrThrow, fromIcEnum, fromIcOpt } from 'utils';\nimport { postMessageToGetMessage } from '../utils/messages';\nimport { MESSAGE_PAGE_SIZE } from '../constants';\nimport {\n refetchMsgList,\n replaceMsgByToken,\n unshiftPostMessage,\n updateLastMsgInRoomCard,\n updateLastMsgInRoomCardByUserId,\n} from '../effects';\n\nexport function useGetMessagesByUserId(userId: bigint, authUserId: bigint) {\n const queryClient = useQueryClient();\n const [isIdle, setIsIdle] = useState(false);\n\n useIdleTimer({\n timeout: 1000 * 60 * 5, // 5 minute\n onIdle: () => setIsIdle(true),\n onActive: () => setIsIdle(false),\n });\n\n // const [test, setTest] = useState(null);\n\n // NOTE in case more than 20 messges exist and a new message is send, when this query is called again, even if load more was not called\n // both the 1st & 2nd page will be fetched. since the 20th message of the previous call is now on the 2nd page\n return useInfiniteQuery, Error>(\n ['getPaginatedMsgsInRoomForUserIds', userId, authUserId],\n async ({ pageParam = 0 }) => {\n const res = await messagingApi.getPaginatedMsgsInRoomForUserIds(\n userId,\n authUserId,\n BigInt(pageParam * MESSAGE_PAGE_SIZE),\n BigInt(MESSAGE_PAGE_SIZE)\n );\n\n return extractApiDataOrThrow(res);\n },\n {\n enabled: !!userId && !!authUserId,\n cacheTime: 0,\n refetchOnWindowFocus: true,\n refetchInterval: !isIdle\n ? 1 * 30 * 1000 // 30sec\n : 1 * 60 * 1000, // 60sec\n getNextPageParam: (page, pages) =>\n page && page.length >= MESSAGE_PAGE_SIZE ? pages.length : undefined,\n onSuccess: (data = { pageParams: [], pages: [] }) => {\n const { pages } = data;\n\n // NOTE test on persisting error messages\n // to be implemented in next iteration\n\n // const messages = flattenDeep(pages);\n // const temp = messages.find((message) => message.failedToSend);\n\n // if (test) {\n // queryClient.setQueryData(\n // ['getPaginatedMsgsInRoomForUserIds', userId, authUserId],\n // (prev: InfiniteData>) => {\n // return unshiftItemToInifiteData(prev, test, MESSAGE_PAGE_SIZE);\n // }\n // );\n // setTest(null);\n // }\n // if (temp && temp.id !== test?.id) {\n // setTest(temp);\n // }\n\n // in case new messages come in before refetching rooms, update last_msg in room card\n if (\n pages.length > 0 &&\n pages[0].length > 0 &&\n fromIcEnum(pages[0][0].status) === 'UnRead'\n ) {\n const rooms = queryClient.getQueryData>([\n 'getPaginatedRoomCardLitesFromUserId',\n authUserId,\n ]);\n const room = rooms.find((r) =>\n r.room_header.participants.includes(userId)\n );\n\n if (room && fromIcOpt(room.last_msg)?.id !== pages[0][0].id) {\n const lastMsg = pages[0][0];\n\n updateLastMsgInRoomCardByUserId(queryClient, {\n userId,\n message: lastMsg,\n });\n }\n }\n },\n }\n );\n}\n\ninterface IUsers {\n userId: UserId;\n authUserId: UserId;\n}\n\nexport interface IPushMessageArgs {\n roomId: RoomId;\n message: PostMsg;\n users: IUsers;\n}\n\nexport function usePushMessageToRoomId() {\n const queryClient = useQueryClient();\n\n return useMutation(\n ({ roomId, message }: IPushMessageArgs) => {\n return messagingApi.pushMessageToRoomId(roomId, message);\n },\n {\n onMutate: ({ message, users, roomId }) => {\n // Snapshot the previous room values\n const previousRooms = queryClient.getQueryData([\n 'getPaginatedRoomCardLitesFromUserId',\n users.authUserId,\n ]);\n\n const formattedMessage = postMessageToGetMessage(message);\n unshiftPostMessage(queryClient, {\n authUserId: users.authUserId,\n userId: users.userId,\n message: formattedMessage,\n });\n\n // optimistically updates room card to set new message as last message\n updateLastMsgInRoomCard(queryClient, {\n message: formattedMessage,\n roomId,\n });\n\n // Return the snapshotted values\n return async () => {\n replaceMsgByToken(queryClient, {\n authUserId: users.authUserId,\n userId: users.userId,\n message: { ...formattedMessage, failedToSend: true },\n });\n\n await queryClient.setQueryData(\n ['getPaginatedRoomCardLitesFromUserId', users.authUserId],\n previousRooms\n );\n };\n },\n onSuccess: (\n res: ApiResultPushMsgResponse,\n { message: cachedMessage, users, roomId },\n rollback\n ) => {\n const message = extractApiDataOrThrow(res);\n // If tokens don't match, rollback to values returned from onMutate to roll back and invalidate cache\n if (message.token !== cachedMessage.token) {\n rollback instanceof Function && rollback();\n\n refetchMsgList(queryClient, {\n userId: users.userId,\n authUserId: users.authUserId,\n });\n\n return;\n }\n\n replaceMsgByToken(queryClient, {\n authUserId: users.authUserId,\n userId: users.userId,\n message,\n });\n\n updateLastMsgInRoomCard(queryClient, {\n message: message,\n roomId,\n });\n\n // TODO disabling for now until we set up peristing temp/error messages because it causes temp messages to be lost if enabled\n // refetch first page of messages\n // refetchMsgList(queryClient, {\n // userId: users.userId,\n // authUserId: users.authUserId,\n // firstPageOnly: true,\n // });\n },\n\n onError: (_, __, rollback) => {\n // If the mutation fails, use the value returned from onMutate to roll back\n rollback instanceof Function && rollback();\n },\n }\n );\n}\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(({ breakpoints, palette, spacing }) => ({\n container: {\n width: '100%',\n padding: '8px 32px 8px 32px',\n flexWrap: 'nowrap',\n\n [breakpoints.only('sm')]: {\n flexWrap: 'wrap',\n padding: '8px 24px 8px 16px',\n },\n\n [breakpoints.only('xs')]: {\n padding: '8px 16px 8px 16px',\n },\n },\n newConvTitle: {\n display: 'none',\n\n [breakpoints.only('sm')]: {\n display: 'block',\n },\n },\n noWrapWhitespace: {\n whiteSpace: 'nowrap',\n minWidth: 0,\n flexShrink: 0,\n },\n avatarWrapper: {\n maxWidth: `calc(100% - ${spacing(2)})`,\n },\n gridItem: {\n minWidth: 0, // By default, flex items won’t shrink below their minimum content size\n\n flex: '1 1 0',\n },\n gridFixedItem: {\n minWidth: 0,\n flex: '0 0 auto',\n },\n buttons: {\n alignItems: 'center',\n height: '100%',\n\n '& button': {\n color: palette.colors.primary,\n },\n },\n button: {\n padding: '12px 16px',\n },\n searchLabel: {\n color: palette.colors.ui_07,\n marginRight: '16px',\n },\n search: {\n flexGrow: 1,\n\n [breakpoints.only('sm')]: {\n marginTop: '8px',\n },\n },\n iconButton: {\n padding: spacing(1),\n margin: spacing(1),\n marginLeft: spacing(0),\n marginRight: spacing(0),\n },\n icon: {\n height: spacing(2),\n width: spacing(2),\n },\n}));\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport clsx from 'clsx';\nimport {\n Box,\n Button,\n Grid,\n Hidden,\n IconButton,\n Typography,\n} from '@mui/material';\n\nimport FollowButton from 'components/Buttons/FollowButton';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport { ArrowBackIcon } from 'components/icons';\nimport { AvatarCard, FollowerSearch } from '../';\nimport { FollowerProfileLite, Profile, RoomCardLite } from 'client';\nimport { fromIcOpt } from 'utils';\nimport { useStyles } from './styles';\n\ninterface IProps {\n authUser: Profile;\n isNewRoom: boolean;\n room: RoomCardLite;\n enablePortalSearchResults?: boolean;\n onClick?: any;\n onBackClick?: () => void;\n onSearchClick?: (user: FollowerProfileLite) => void;\n}\n\nfunction MessageListToolbar({\n authUser,\n room,\n isNewRoom,\n enablePortalSearchResults,\n onBackClick,\n onSearchClick,\n}: IProps) {\n const classes = useStyles();\n const history = useHistory();\n\n const isBlocked = fromIcOpt(room?.room_header?.blocked_by) === authUser.id;\n\n function handleSearchClick(user: FollowerProfileLite) {\n onSearchClick && onSearchClick(user);\n }\n\n // checking if the room also exists, since a temp room is passed when follower is selected\n if (isNewRoom && !room) {\n return (\n \n \n \n \n \n \n \n \n\n \n \n \n To:\n \n \n \n\n \n New Conversation\n \n\n \n \n \n \n );\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n {!isBlocked ? (\n \n \n \n \n \n history.push(`/u/${room.other_user_profile.user_name}`),\n },\n ]}\n />\n \n \n\n \n \n \n \n \n\n \n \n history.push(`/u/${room.other_user_profile.user_name}`)\n }\n >\n View Profile\n \n \n \n \n \n ) : null}\n \n );\n}\n\nexport default MessageListToolbar;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(({ breakpoints, palette }) => ({\n container: {\n width: '100%',\n padding: '16px 32px 12px 16px',\n cursor: 'pointer',\n userSelect: 'none',\n\n '& > div': {\n width: '100%',\n },\n\n [breakpoints.only('sm')]: {\n padding: '16px 24px 12px 16px',\n },\n\n [breakpoints.only('xs')]: {\n padding: '16px 16px 12px 24px',\n },\n },\n containerSelected: {\n background: palette.colors.ui_02,\n },\n userDataContainer: {\n marginBottom: '8px',\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'nowrap',\n },\n avatarCard: {\n width: 'calc(100% - 20px)',\n },\n dotContainer: {\n width: '20px',\n height: '40px',\n display: 'flex',\n alignItems: 'center',\n },\n dot: {\n marginRight: '12px',\n },\n}));\n","import React, { useMemo } from 'react';\nimport clsx from 'clsx';\nimport { Box, Grid, Typography } from '@mui/material';\n\nimport { AvatarCard } from '../';\nimport { Dot } from 'components';\nimport { RoomId, RoomCardLite, Profile } from 'client';\nimport { bytesArrayToString, fromIcEnum, fromIcOpt } from 'utils';\nimport { formattedDate } from 'utils';\nimport { useSetLastMsgsReadStatusUserId } from 'pages/messages/services/rooms';\nimport { useStyles } from './styles';\n\ninterface IProps {\n selected: boolean;\n authUser: Profile;\n room: RoomCardLite;\n mobileSize?: boolean;\n onClick: (id: RoomId | null) => void;\n}\n\nfunction RoomItem({ selected, authUser, room, mobileSize, onClick }: IProps) {\n const classes = useStyles();\n const setLastMsgsReadStatusMutate = useSetLastMsgsReadStatusUserId();\n const lastMessage = fromIcOpt(room.last_msg);\n\n const date = useMemo(() => formattedDate(lastMessage?.timestamp), [\n lastMessage,\n ]);\n\n const unread =\n lastMessage?.user_id !== authUser.id &&\n fromIcEnum(lastMessage.status) === 'UnRead';\n\n function handleClick() {\n onClick(room.room_header.id);\n\n if (unread) {\n setLastMsgsReadStatusMutate.mutate({\n authUserId: authUser.id,\n roomId: room.room_header.id,\n messageId: lastMessage.id,\n });\n }\n }\n\n const isTempMessage = lastMessage?.id.startsWith('temp_');\n\n return (\n \n \n \n {!mobileSize ? (\n \n \n \n ) : null}\n\n \n \n {\n bytesArrayToString(\n lastMessage?.content || []\n ) /* empty array becames: \"\" */\n }\n \n\n {unread ? (\n \n \n \n ) : null}\n \n )\n }\n />\n \n \n \n );\n}\n\nexport default RoomItem;\n","import React, { Fragment } from 'react';\nimport { useMediaQuery } from '@mui/material';\n\nimport { RoomItem } from '../';\nimport { Profile, RoomCardLite, RoomId } from 'client';\n\ninterface IProps {\n authUser: Profile;\n rooms: Array;\n selectedRoomId: RoomId | null;\n onRoomChange: (id: RoomId | null) => void;\n}\n\nfunction RoomList({ selectedRoomId, onRoomChange, rooms, authUser }: IProps) {\n const mobileSize = useMediaQuery((theme) => theme.breakpoints.only('xs'));\n\n return (\n <>\n {rooms.map((room) => (\n \n \n \n ))}\n \n );\n}\n\nexport default RoomList;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(({ spacing, palette }) => ({\n headerContainer: {\n alignItems: 'center',\n },\n buttonMenu: {\n marginLeft: spacing(0.5),\n padding: '4px',\n color: '#4C46D4',\n },\n flexContainer: {\n borderBottomColor: palette.colors.ui_04,\n '& .MuiButtonBase-root': {\n borderBottomColor: palette.colors.ui_04,\n },\n '& .MuiBox-root': {\n borderBottomColor: palette.colors.ui_04,\n },\n },\n}));\n","import { Button, Grid, Tab, Tabs } from '@mui/material';\nimport React from 'react';\n\nimport MoreButton from 'components/Buttons/MoreButton';\nimport { ErrorAlert } from '../';\nimport { FILTER_OPTIONS } from '../../constants';\nimport { FilterInput } from 'components';\nimport { MarkAsReadIcon, RefreshIcon } from 'components/icons';\nimport { Profile } from 'client';\nimport { ValueOf } from 'types';\nimport { useSetAllLastMsgsReadStatusUserId } from 'pages/messages/services/rooms';\nimport { useStyles } from './styles';\n\ninterface IProps {\n authUser: Profile;\n filter: ValueOf;\n search: string;\n hideNewChatButton?: boolean;\n onSearchChange: (value: string) => void;\n onFilterClick: (value: ValueOf) => void;\n onNewChatClick: () => void;\n onRefreshClick: () => Promise;\n}\n\nfunction RoomListToolbar({\n authUser,\n filter,\n search,\n hideNewChatButton,\n onNewChatClick,\n onSearchChange,\n onFilterClick,\n onRefreshClick,\n}: IProps) {\n const classes = useStyles();\n const [isRefreshing, setIsRefreshing] = React.useState(false);\n const setAllLastMsgsReadStatusUserIdMutate = useSetAllLastMsgsReadStatusUserId();\n\n function handleErrorClose() {\n // don't handle error using errorHandler in this case because mutation will always referch on settle\n\n setAllLastMsgsReadStatusUserIdMutate.reset();\n }\n\n async function handleRefreshClick() {\n setIsRefreshing(true);\n await onRefreshClick();\n setIsRefreshing(false);\n }\n\n return (\n \n {setAllLastMsgsReadStatusUserIdMutate.isError ? (\n \n ) : null}\n\n {!hideNewChatButton ? (\n \n \n \n \n New Conversation\n \n \n \n \n ) : null}\n\n \n \n \n\n \n \n {\n onFilterClick(FILTER_OPTIONS.ALL);\n }}\n />\n {\n onFilterClick(FILTER_OPTIONS.READ);\n }}\n />\n {\n onFilterClick(FILTER_OPTIONS.UNREAD);\n }}\n />\n ,\n disabled: setAllLastMsgsReadStatusUserIdMutate.isLoading,\n handleClick: () => {\n setAllLastMsgsReadStatusUserIdMutate.mutate({\n userId: authUser.id,\n });\n },\n },\n {\n title: 'Refresh',\n icon: ,\n disabled: isRefreshing,\n handleClick: handleRefreshClick,\n },\n ]}\n />\n \n \n \n );\n}\n\nexport default RoomListToolbar;\n","import React from 'react';\nimport { Box, Typography } from '@mui/material';\n\nimport { InfoIcon } from 'components/icons';\n\ninterface IStartConversationWarningProps {\n children?: React.ReactNode;\n}\n\nfunction StartConversationWarning({}: IStartConversationWarningProps) {\n return (\n \n \n \n You can only start conversations with users that follow you.\n \n \n );\n}\n\nexport default StartConversationWarning;\n","import React from 'react';\nimport clsx from 'clsx';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Box, Typography } from '@mui/material';\n\nexport const useStyles = makeStyles(({ typography, palette, spacing }) => ({\n container: {\n width: '100%',\n display: 'flex',\n justifyContent: 'center',\n marginBottom: spacing(3),\n\n '&$containerOutlined': {\n borderRadius: '8px',\n marginBottom: spacing(1),\n padding: spacing(1),\n },\n },\n content: {\n ...typography.body,\n textAlign: 'center',\n color: palette.colors.ui_06,\n padding: '8px 10px',\n backgroundColor: palette.colors.ui_02,\n borderRadius: '16px',\n\n '&$containerOutlined': {\n ...typography.body,\n color: palette.colors.ui_07,\n textAlign: 'left',\n },\n },\n containerOutlined: {},\n}));\n\ninterface IProps {\n content: string;\n variant?: 'text' | 'outlined';\n}\n\nfunction SystemMessage({ content, variant }: IProps) {\n const classes = useStyles();\n\n const isOutlined = variant === 'outlined';\n\n return (\n \n \n {content}\n \n \n );\n}\n\nexport default SystemMessage;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles(({ breakpoints, palette, spacing }) => ({\n container: {\n width: '100%',\n height: '100vh',\n\n [breakpoints.only('xs')]: {\n height: 'calc(100vh - 56px)',\n },\n },\n roomlistContainer: {\n borderRight:\n palette.mode === 'light'\n ? '1px solid rgb(189, 181, 204, 0.43)'\n : '1px solid #2F2B3E',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n roomListToolbar: {\n width: '100%',\n padding: '0 32px',\n\n [breakpoints.only('sm')]: {\n padding: '8px 24px 8px 24px',\n },\n\n [breakpoints.only('xs')]: {\n padding: '0 16px 8px 24px',\n },\n },\n roomList: {\n overflow: 'auto',\n flexGrow: 1,\n },\n emptyMessageContainer: {\n paddingLeft: spacing(2),\n paddingRight: spacing(2),\n textAlign: 'center',\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n },\n messageListContainer: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-end',\n height: '100%',\n },\n messageListToolbar: {\n marginTop: spacing(2),\n marginBottom: spacing(2),\n\n [breakpoints.only('sm')]: {\n marginTop: '4px',\n },\n\n [breakpoints.only('xs')]: {\n marginTop: spacing(1),\n },\n },\n messageList: {\n flexGrow: 1,\n overflow: 'auto',\n justifyContent: 'flex-end',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n },\n input: {\n width: '100%',\n padding: '0 32px 16px 32px',\n\n [breakpoints.only('sm')]: {\n padding: '0 24px 16px 24px',\n },\n\n [breakpoints.only('xs')]: {\n padding: '0 16px 16px 24px',\n },\n },\n warning: {\n fontSize: '12px',\n lineHeight: '18px',\n letterSpacing: '0',\n color: palette.mode === 'light' ? '#4C46D4' : '#FFFFFF',\n },\n}));\n","import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { isEqual } from 'lodash';\nimport { useQueryClient } from 'react-query';\nimport { useTheme } from '@mui/styles';\nimport { Box, Grid, Typography } from '@mui/material';\n\nimport {\n RoomList,\n Input,\n MessageList,\n MessageListToolbar,\n RoomListToolbar,\n EmptyMessage,\n StartConversationWarning,\n} from './components';\nimport ErrorAlert from './components/ErrorAlert/ErrorAlert';\nimport { ValueOf } from 'types';\nimport { Loading } from 'components';\nimport { extractApiDataOrThrow, fromIcOpt, stringToBytesArray } from 'utils';\nimport {\n RoomId,\n RoomCardLite,\n FollowerProfileLite,\n ApiResultRoomCardLite,\n Profile,\n} from 'client';\nimport {\n useCreateRoomBetweenUserIdsAndPushMsg,\n useGetRoomsByUserId,\n} from './services';\nimport { FILTER_OPTIONS } from './constants';\nimport { filterRooms } from './utils/filter';\nimport { searchRooms } from './utils/search';\nimport { usePushMessageToRoomId } from './services/messages';\nimport { errorHandler } from './effects/errors';\nimport { useStyles } from './styles';\nimport { useHistory, useParams } from 'react-router-dom';\nimport { useGetUserByUsername } from 'services/users';\nimport PageHeader from 'components/PageHeader/PageHeader';\n\n// TODO when authUser selects a group, when all related data are fetched, do a background fetch of full authUser profile (currently only lite version is there)\n// TODO set up browser notifications if window is not focused\n// TODO set up route param for current selected room to use for browser navigation\nfunction Chat() {\n const [selectedRoomId, setSelectedRoomId] = useState(null);\n const [creatingNewRoom, setCreatingNewRoom] = useState(false);\n const [\n creatingNewRoomForFollower,\n setCreatingNewRoomForFollower,\n ] = useState(null);\n const [roomSearchValue, setRoomSearchValue] = useState('');\n const [selectedRoomFilter, setSelectedRoomFilter] = useState<\n ValueOf\n >(FILTER_OPTIONS.ALL);\n const { username } = useParams>();\n const history = useHistory();\n\n const { data: userData, isFetched: userIsFetched } = useGetUserByUsername(\n username\n );\n\n const classes = useStyles();\n const theme = useTheme();\n const desktopMode = useMediaQuery(theme.breakpoints.up('md'));\n const tabletMode = useMediaQuery(theme.breakpoints.only('sm'));\n\n const queryClient = useQueryClient();\n\n const authUser = queryClient.getQueryData(['getSelf']);\n const {\n data: rooms,\n error: roomsError,\n isError: roomsIsError,\n remove: roomsRemove,\n isFetching: roomsIsFetching,\n isFetched: roomsIsFetched,\n } = useGetRoomsByUserId(authUser?.id);\n\n const createRoomWithMessageMutate = useCreateRoomBetweenUserIdsAndPushMsg();\n const pushMessageMutate = usePushMessageToRoomId();\n\n // in useEffect dependancies, objects have to be the exact same object in order for useEffect to skip running the effect,\n // so even though the content is the same, because the object itself isn't, we manually check for content equality and use ref as a dependancy in useEffect\n const roomsRef = useRef(rooms);\n\n if (!isEqual(roomsRef.current, rooms)) {\n roomsRef.current = rooms;\n }\n\n const filteredRooms = useMemo(() => {\n if (authUser) {\n return filterRooms(rooms, authUser.id, selectedRoomFilter);\n }\n return [];\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [roomsRef.current, selectedRoomFilter, authUser]);\n\n const searchedRooms = useMemo(() => {\n return searchRooms(roomSearchValue, filteredRooms);\n }, [filteredRooms, roomSearchValue]);\n\n const selectedRoom: RoomCardLite | undefined = useMemo(\n () => rooms.find((r) => r.room_header.id === selectedRoomId),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [roomsRef.current, selectedRoomId]\n );\n\n useEffect(() => {\n if (userData && userIsFetched && roomsIsFetched) {\n handleSelectNewFollower({\n ...userData,\n user_name: userData.username,\n });\n history.replace('/messages');\n }\n }, [\n handleSelectNewFollower,\n history,\n roomsIsFetched,\n userData,\n userIsFetched,\n ]);\n\n const roomsWithMessagesLength = useMemo(\n () => rooms.filter((r) => fromIcOpt(r.last_msg)).length,\n [rooms]\n );\n\n function handleSelectNewFollower(follower: FollowerProfileLite) {\n const existingRoomForFollower = rooms.find((r) => {\n return r.room_header.participants.includes(follower.id);\n });\n\n if (existingRoomForFollower) {\n setSelectedRoomId(existingRoomForFollower.room_header.id);\n setCreatingNewRoom(false);\n } else {\n setCreatingNewRoom(true);\n setCreatingNewRoomForFollower(follower);\n }\n }\n\n function createMessageData(content: string) {\n return {\n content: stringToBytesArray(content),\n mime_type: { String: null },\n user_id: authUser.id,\n token: BigInt(new Date().getTime()),\n };\n }\n\n function pushMessage(message: string, roomId: RoomId) {\n pushMessageMutate.mutate({\n roomId: roomId,\n message: createMessageData(message),\n users: {\n authUserId: authUser.id,\n userId:\n selectedRoom?.room_header.participants.filter(\n (p) => p !== authUser.id\n )[0] || creatingNewRoomForFollower?.id,\n },\n });\n }\n\n // set to async to manually set up loading of the refresh button\n async function handleRefreshClick() {\n await queryClient.invalidateQueries([\n 'getPaginatedRoomCardLitesFromUserId',\n authUser?.id,\n ]);\n\n if (selectedRoom) {\n await queryClient.invalidateQueries([\n 'getPaginatedMsgsInRoomForUserIds',\n selectedRoom.other_user_profile.id,\n authUser?.id,\n ]);\n }\n }\n\n function handlePushMessage(content: string) {\n if (selectedRoomId) {\n pushMessage(content, selectedRoomId);\n } else if (!!creatingNewRoomForFollower) {\n setSelectedRoomId('temp');\n createRoomWithMessageMutate.mutate(\n {\n authId: authUser.id,\n userId: creatingNewRoomForFollower.id,\n message: createMessageData(content),\n followerUser: creatingNewRoomForFollower,\n },\n {\n onSuccess: (res: ApiResultRoomCardLite) => {\n const { room_header } = extractApiDataOrThrow(res);\n\n setSelectedRoomId(room_header.id);\n },\n onSettled: () => {\n setCreatingNewRoomForFollower(null);\n setCreatingNewRoom(false);\n },\n }\n );\n }\n }\n\n const isError =\n pushMessageMutate.isError ||\n createRoomWithMessageMutate.isError ||\n roomsIsError;\n const errorKind =\n pushMessageMutate.error?.message ||\n createRoomWithMessageMutate.error?.message ||\n roomsError?.message;\n\n function handleErrorClose() {\n // handle errors which an alert was set up for\n // was skipped on initial error handle in service's on error\n errorHandler(\n errorKind,\n queryClient,\n { authUserId: authUser.id },\n false,\n () => {\n pushMessageMutate.isError && pushMessageMutate.reset();\n createRoomWithMessageMutate.isError && pushMessageMutate.reset();\n roomsIsError && roomsRemove();\n }\n );\n }\n\n return (\n \n {isError ? (\n \n ) : null}\n\n \n {\n setCreatingNewRoom(true);\n setCreatingNewRoomForFollower(null);\n setSelectedRoomId(null);\n }}\n />\n\n \n ) =>\n setSelectedRoomFilter(value)\n }\n onNewChatClick={() => {\n setCreatingNewRoom(true);\n setCreatingNewRoomForFollower(null);\n setSelectedRoomId(null);\n }}\n onSearchChange={(value) => setRoomSearchValue(value)}\n onRefreshClick={handleRefreshClick}\n />\n \n\n \n {roomsIsFetching && }\n\n {roomsWithMessagesLength !== 0 && (\n <>\n {searchedRooms.length === 0 ? (\n \n Nothing to see here…\n \n ) : (\n {\n setSelectedRoomId(id);\n setCreatingNewRoomForFollower(null);\n setCreatingNewRoom(false);\n }}\n />\n )}\n \n )}\n\n {roomsWithMessagesLength === 0 && !desktopMode && (\n \n {\n setCreatingNewRoom(true);\n setCreatingNewRoomForFollower(null);\n setSelectedRoomId(null);\n }}\n />\n \n )}\n \n \n\n \n {selectedRoomId || creatingNewRoom ? (\n \n {\n setCreatingNewRoom(false);\n setCreatingNewRoomForFollower(null);\n setSelectedRoomId(null);\n }}\n />\n \n ) : null}\n\n \n {selectedRoom?.last_msg.length > 0 ? (\n \n ) : !creatingNewRoom ? (\n {\n setCreatingNewRoom(true);\n setCreatingNewRoomForFollower(null);\n setSelectedRoomId(null);\n }}\n />\n ) : (\n <>\n {tabletMode ? (\n \n ) : null}\n\n {!creatingNewRoomForFollower ? (\n \n ) : null}\n \n )}\n \n\n {selectedRoomId || !!creatingNewRoomForFollower ? (\n \n \n \n ) : null}\n \n \n );\n}\n\nexport default Chat;\n","import { RoomCardLite } from 'client';\nimport { ValueOf } from 'types';\nimport { fromIcEnum, fromIcOpt } from 'utils';\nimport { FILTER_OPTIONS, MSG_STATUS } from '../constants';\n\n/**\n * filter rooms based on read status of room card's last_msg\n */\nexport function filterRooms(\n rooms: Array,\n authUserId: bigint,\n filter: ValueOf\n) {\n const roomsWithExistingCorrespondent = rooms.filter(\n (r) => r.other_user_profile.user_name !== 'Missing Profile'\n );\n switch (filter) {\n case FILTER_OPTIONS.ALL:\n return roomsWithExistingCorrespondent;\n\n case FILTER_OPTIONS.READ:\n return roomsWithExistingCorrespondent.filter((r) => {\n const lastMsg = fromIcOpt(r.last_msg);\n\n if (lastMsg) {\n return (\n lastMsg.user_id === authUserId ||\n fromIcEnum(lastMsg.status) === MSG_STATUS.Read\n );\n }\n\n return false;\n });\n\n case FILTER_OPTIONS.UNREAD:\n return roomsWithExistingCorrespondent.filter((r) => {\n const lastMsg = fromIcOpt(r.last_msg);\n\n if (lastMsg) {\n return (\n lastMsg.user_id !== authUserId &&\n fromIcEnum(lastMsg.status) === MSG_STATUS.UnRead\n );\n }\n\n return false;\n });\n\n default:\n return [];\n }\n}\n","import { RoomCardLite } from 'client';\n\n/**\n * returns true if all username contians search value or\n * display_name contains all splitted by whitespace search values\n */\nexport function searchRooms(searchValue: string, rooms: Array) {\n if (searchValue === '') {\n return rooms;\n }\n\n return rooms.filter(\n (r) =>\n r.other_user_profile.user_name\n .toLowerCase()\n .includes(searchValue.toLowerCase()) ||\n r.other_user_profile.display_name\n .toLowerCase()\n .includes(searchValue.toLowerCase())\n );\n}\n","import React from 'react';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass HomeErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default HomeErrorBoundary;\n","import React from 'react';\nimport { Box } from '@mui/material';\n\nimport Chat from './Chat';\nimport HomeErrorBoundary from 'pages/home/HomeErrorBoundary';\nimport Loading from '../../components/Loading';\nimport { HeartbeatView } from '../../utils/heartbeat';\n\nfunction ChatContainer() {\n return (\n \n \n \n \n }\n >\n \n \n \n \n \n \n \n \n );\n}\n\nexport default ChatContainer;\nexport * from './Chat';\n","import React from 'react';\nimport { Typography } from '@mui/material';\n\nfunction TypographyDemo() {\n return (\n <>\n DISK-938\n Header 1 bold\n Header 1\n Header 2 bold\n Header 2\n Header 3 bold\n Header 3\n Body\n Body bold\n Paragraph\n \n );\n}\n\nexport default TypographyDemo;\n","import React from 'react';\nimport { Box, Typography } from '@mui/material';\n\nimport { Dot as DotComponent } from 'components';\n\nfunction Dot({ sx, children }) {\n return (\n \n {children}: \n \n \n );\n}\n\nfunction ColorVariationsDemo() {\n return (\n <>\n DISK-938\n Primary\n Primary Hover\n \n Primary Pressed\n \n Danger\n Danger Hover\n \n Danger Pressed\n \n \n Danger Disabled\n \n \n Danger Ghost Hover\n \n \n Danger Ghost Pressed\n \n Error\n Warning\n Success\n Info\n UI-Background\n UI-Gradient\n UI_01\n UI_02\n UI_03\n UI_04\n UI_05\n UI_06\n UI_07\n \n );\n}\n\nexport default ColorVariationsDemo;\n","import React, { useState } from 'react';\nimport { AlertColor, Button, Typography } from '@mui/material';\nimport { Alert } from 'components';\n\nfunction ColorVariationsDemo() {\n const [open, setOpen] = useState();\n\n return (\n <>\n Alert Demo\n {\n setOpen('success');\n }}\n >\n success\n \n {\n setOpen('info');\n }}\n >\n info\n \n {\n setOpen('error');\n }}\n >\n error\n \n {\n setOpen('warning');\n }}\n >\n warning\n \n\n {open ? (\n setOpen(null)}\n />\n ) : null}\n \n );\n}\n\nexport default ColorVariationsDemo;\n","import React from 'react';\nimport { RadioGroup, Typography, FormControlLabel, Radio } from '@mui/material';\n\nfunction RadioDemo() {\n return (\n <>\n Radio Button Demo\n \n {['a', 'b', 'c'].map((item, index) => (\n }\n label={item}\n />\n ))}\n \n Disabled Radio Button Demo\n \n {['a', 'b', 'c'].map((item, index) => (\n }\n label={item}\n />\n ))}\n \n \n );\n}\n\nexport default RadioDemo;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport React from 'react';\nimport { Typography } from '@mui/material';\nimport DistriktTextField from 'components/TextInput/TextField';\n\nfunction TextFieldDemo() {\n const [value1, setValue1] = React.useState('');\n const [value2, setValue2] = React.useState('');\n const [value3, setValue3] = React.useState(\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris elementum nisl ut neque rutrum commodo. Ut posuere mattis scelerisque. Etiam imperdiet sit amet nibh vel semper. In volutpat fermentum augue. Curabitur accumsan lorem in libero euismod volutpat. Aenean iaculis arcu et ultrices ornare. Suspendisse condimentum eros tortor, ut malesuada nisi malesuada et.'\n );\n const [value4, setValue4] = React.useState(\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris elementum nisl ut neque rutrum commodo. Ut posuere mattis scelerisque. Etiam imperdiet sit amet nibh vel semper. In volutpat fermentum augue. Curabitur accumsan lorem in libero euismod volutpat. Aenean iaculis arcu et ultrices ornare. Suspendisse condimentum eros tortor, ut malesuada nisi malesuada et.'\n );\n return (\n <>\n Single Line Text Input Demo\n \n \n {}}\n name={'demo 2'}\n fullWidth\n disabled\n bottomLabel=\"bottom label disabled\"\n />\n Multiline Text Input Demo\n \n \n
    \n \n );\n}\n\nexport default TextFieldDemo;\n","import React, { useState } from 'react';\n\nimport { Select } from 'components';\nimport { Typography } from '@mui/material';\n\nfunction SelectDemo() {\n const [value, setValue] = useState('');\n return (\n <>\n Select (Dropdown) Demo\n setValue(v)}\n />\n
    \n setValue(v)}\n />\n
    \n setValue(v)}\n />\n \n );\n}\n\nexport default SelectDemo;\n","import React from 'react';\nimport {\n Box,\n Button,\n IconButton,\n styled,\n Typography as MuiTypography,\n} from '@mui/material';\n\nimport { ArrowDownIcon, RefreshIcon } from 'components/icons';\n\nconst Typography = styled(MuiTypography)({\n marginTop: '8px',\n marginBottom: '8px',\n});\n\nfunction SelectDemo() {\n return (\n <>\n Button Demo\n\n Primary\n \n \n \n \n\n \n }\n />\n \n \n \n\n \n }\n />\n \n \n \n\n \n \n \n \n\n }\n >\n Button\n \n }\n />\n }\n />\n \n\n Secondary (Outlined)\n \n \n \n \n\n }\n >\n Button\n \n }\n />\n }\n />\n \n\n Ghost\n \n \n \n \n\n }\n >\n Button\n \n }\n />\n }\n />\n \n\n Icon Button\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SelectDemo;\n","import React from 'react';\nimport { FormControlLabel, FormGroup, Typography } from '@mui/material';\n\nimport { Checkbox } from 'components';\n\nfunction CheckboxDemo() {\n return (\n <>\n Checkbox Demo\n\n \n } label=\"Label\" />\n } label=\"Disabled\" />\n }\n label=\"Label\"\n />\n \n \n );\n}\n\nexport default CheckboxDemo;\n","import React from 'react';\nimport { Typography } from '@mui/material';\n\nimport { EmptyState } from 'components';\n\nfunction EmptyStateDemo() {\n return (\n <>\n Empty State Demo\n\n console.log('Button clicked'),\n },\n {\n text: 'Button',\n variant: 'contained',\n onClick: () => console.log('Button clicked'),\n },\n ]}\n />\n \n );\n}\n\nexport default EmptyStateDemo;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n nftList: {\n display: 'grid',\n justifyContent: 'start',\n gridTemplateColumns: 'repeat(auto-fit, minmax(200px, max-content))',\n gridGap: 24,\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n marginTop: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n gridTemplateColumns: 'repeat(auto-fit, minmax(162px, max-content))',\n gridGap: 16,\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n [theme.breakpoints.between('sm', 'md')]: {\n gridTemplateColumns: 'repeat(auto-fit, minmax(200px, max-content))',\n gridGap: 16,\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n },\n },\n emptyDropzoneText: {\n color: theme.palette.text.primary,\n textAlign: 'center',\n },\n emptyDropzone: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: '30%',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n [theme.breakpoints.down('md')]: {\n height: '50%',\n },\n },\n listTitle: {\n paddingLeft: theme.spacing(2),\n marginTop: theme.spacing(2),\n fontWeight: 600,\n },\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n maxWidth: 600,\n position: 'inherit',\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n mainContainer: {\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n paddingBottom: theme.spacing(3),\n paddingTop: 0,\n borderTop: 'none',\n backgroundColor: theme.palette.colors.ui_01,\n width: 600,\n },\n smallDialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n width: 600,\n height: 400,\n position: 'inherit',\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n text14: {\n fontSize: theme.typography.pxToRem(14),\n color: theme.palette.text.secondary,\n },\n dialogTitle: {\n fontSize: theme.typography.pxToRem(15),\n fontWeight: 'bold',\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(1),\n },\n inputField: {\n '& .MuiInputBase-root.Mui-disabled': {\n backgroundColor:\n theme.palette.mode === 'light'\n ? 'rgb(224 224 243)'\n : 'rgb(118 100 253 / 40%)',\n },\n },\n\n buttonContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n marginTop: theme.spacing(3),\n },\n infoIcon: {\n fontSize: theme.spacing(2),\n marginRight: theme.spacing(1),\n color: theme.palette.colors.primary,\n },\n warningContainer: {\n display: 'flex',\n flexDirection: 'row',\n marginTop: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n width: '608px',\n },\n },\n transferWordBtn: {\n marginRight: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n transferIconBtn: {\n paddingRight: theme.spacing(1.75),\n paddingLeft: theme.spacing(1.5),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n display: 'none',\n },\n },\n errorText: {\n color: theme.palette.secondary.main,\n },\n verticalCenter: {\n padding: 60,\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n width: '100%',\n },\n nftBackground: {\n background: theme.palette.colors.ui_02,\n border: `1px solid ${theme.palette.colors.ui_04}`,\n margin: 0,\n borderRadius: 16,\n width: 200,\n height: 308,\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n overflow: 'hidden',\n [theme.breakpoints.down('sm')]: {\n width: 162,\n height: 284,\n },\n },\n title: {\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 600,\n display: '-webkit-box',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 1,\n cursor: 'pointer',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n receivedOn: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.disabled,\n },\n collectionTitle: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.disabled,\n padding: theme.spacing(1),\n },\n collectionAndNr: {\n margin: theme.spacing(2),\n display: 'flex',\n justifyContent: 'space-around',\n flexDirection: 'row',\n [theme.breakpoints.down('sm')]: {\n marginBottom: theme.spacing(2),\n flexDirection: 'column',\n },\n },\n transferButton: {\n margin: theme.spacing(1),\n marginTop: 0,\n width: 105,\n },\n ellipsisBtn: {\n margin: theme.spacing(1),\n marginTop: 0,\n },\n btnContainer: {\n display: 'flex',\n justifyContent: 'center',\n [theme.breakpoints.down('sm')]: {\n justifyContent: 'start',\n },\n },\n copyButton: {\n backgroundColor: theme.palette.colors.ui_02,\n color: theme.palette.colors.primary,\n border: `1px solid ${theme.palette.colors.primary}`,\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(1.5),\n borderRadius: 8,\n },\n flex: {\n display: 'flex',\n justifyContent: 'space-around',\n flexDirection: 'row',\n marginBottom: theme.spacing(0.5),\n },\n image: {\n borderRadius: '15px 15px 0 0',\n width: 200,\n height: 200,\n objectFit: 'cover',\n [theme.breakpoints.down('sm')]: {\n width: 160,\n height: 160,\n },\n },\n tooltipStyle: {\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(12),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n paddingLeft: theme.spacing(2.5),\n paddingRight: theme.spacing(2.5),\n },\n tooltipArrow: {\n color: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n },\n tooltipIcon: {\n height: 12,\n width: 12,\n },\n tooltipText: {\n fontSize: theme.typography.pxToRem(12),\n marginLeft: theme.spacing(1.5),\n },\n centeredContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n linkButtonContainer: {\n display: 'flex',\n marginTop: theme.spacing(1.5),\n },\n footer: {\n lineHeight: '22px',\n },\n layersIcon: {\n position: 'absolute',\n top: theme.spacing(1),\n right: theme.spacing(1),\n },\n nftLayersDialog: {\n maxWidth: 560,\n },\n nftLayersImages: {\n marginTop: theme.spacing(3),\n display: 'flex',\n justifyContent: 'space-between',\n },\n nftLayersImageWrapper: {\n opacity: 0.5,\n cursor: 'pointer',\n position: 'relative',\n },\n nftLayersImageSelected: {\n opacity: 1,\n '&:before': {\n display: 'block',\n content: '\" \"',\n position: 'absolute',\n top: 5,\n left: 5,\n right: 5,\n bottom: 5,\n pointerEvents: 'none',\n border: `1px solid ${theme.palette.colors.ui_01}`,\n borderRadius: 4,\n zIndex: 2,\n },\n '&:after': {\n display: 'block',\n content: '\" \"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n pointerEvents: 'none',\n border: `4px solid ${theme.palette.colors.primary}`,\n borderRadius: 8,\n zIndex: 2,\n },\n },\n nftLayersImage: {\n width: 'calc(50vw - 40px)',\n maxWidth: 268,\n display: 'block',\n borderRadius: 8,\n },\n nftLayersDescription: {\n lineHeight: '20px',\n },\n principalViewer: {\n display: 'flex',\n justifyContent: 'space-between',\n border: `1px solid ${theme.palette.colors.ui_04}`,\n borderRadius: 8,\n backgroundColor: theme.palette.colors.ui_02,\n margin: `0 ${theme.spacing(4)} ${theme.spacing(4)} ${theme.spacing(4)}`,\n padding: `0 ${theme.spacing(4)}`,\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n alignItems: 'center',\n margin: `0 ${theme.spacing(2)} ${theme.spacing(4)} ${theme.spacing(2)}`,\n padding: `0 ${theme.spacing(1.5)}`,\n },\n },\n viewPrincipalBtn: {\n color: theme.palette.colors.primary,\n },\n principalViewerText: {\n display: 'flex',\n marginTop: 12,\n },\n principalViewerTitle: {\n paddingRight: theme.spacing(1),\n },\n warningIcon: {\n color: theme.palette.colors.danger,\n fontSize: 16,\n marginRight: theme.spacing(1),\n marginTop: theme.spacing(0.5),\n },\n dialogContent: {\n display: 'flex',\n marginBotom: theme.spacing(2),\n },\n dialogText: {},\n placeholderImage: {\n width: 256,\n height: 'auto',\n paddingBottom: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n paddingBottom: theme.spacing(0),\n },\n },\n}));\n","import React from 'react';\nimport clsx from 'clsx';\nimport { Typography } from '@mui/material';\nimport { Dialog } from 'components';\nimport { useStyles } from './styles';\n\ntype NftLayersDialogProps = {\n open: boolean;\n onClose: () => void;\n imageUrls: {\n POD: string;\n HELMET: string;\n };\n defaultAssetsType: string;\n onAssetsTypeChange: (assetsType: string) => void;\n};\n\nconst NftLayersDialog = ({\n open,\n onClose,\n imageUrls,\n defaultAssetsType,\n onAssetsTypeChange,\n}: NftLayersDialogProps) => {\n const classes = useStyles();\n const [selectedAssetsType, setSelectedAssetsType] = React.useState(\n defaultAssetsType\n );\n return (\n <>\n {open && (\n {\n onAssetsTypeChange(selectedAssetsType);\n onClose();\n }}\n >\n
    \n \n You can now choose which distrikt POD NFT asset to display and\n share with your distrikt community. Remember, you own both assets\n within the same NFT.\n \n
    \n setSelectedAssetsType('POD')}\n onKeyDown={() => setSelectedAssetsType('POD')}\n >\n \n
    \n setSelectedAssetsType('HELMET')}\n onKeyDown={() => setSelectedAssetsType('HELMET')}\n >\n \n
    \n \n \n \n )}\n \n );\n};\n\nexport default NftLayersDialog;\n","import React from 'react';\nimport { Box, Button, SvgIcon, Typography, IconButton } from '@mui/material';\nimport { useQueryClient } from 'react-query';\nimport { Profile } from 'client';\nimport { useLocalStorage } from 'react-use';\nimport { useUpdateNFTProfileImage } from 'pages/profile/services';\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport WarningModal from 'components/Dialogs/Warning';\nimport { Alert } from 'components';\nimport {\n CopyIcon,\n Share2Icon,\n Transfer,\n Layers,\n Avatar,\n} from 'components/icons';\nimport NftLayersDialog from './NftLayersDialog';\nimport { getNftIndexUrl } from './utils/nftUtils';\nimport { useStyles } from './styles';\n\ntype SingleNftProps = {\n collection: string;\n tokenIndex: number;\n imageUrls: {\n POD: string;\n HELMET: string;\n };\n tokenId: string;\n setTransferTokenId: (value: string) => void;\n transferIndex: number;\n setTransferIndex: (value: number) => void;\n};\n\n// TODO add skeleton for loading\nconst SingleNft = ({\n collection,\n tokenIndex,\n imageUrls,\n tokenId,\n setTransferTokenId,\n setTransferIndex,\n}: SingleNftProps) => {\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n const [defaultAssetsTypesLS, setDefaultAssetsTypesLS] = useLocalStorage(\n `app.defaultAssetsTypes_${auth?.username}_${tokenIndex + 1}`,\n 'POD'\n );\n const [postModal, setPostModal] = React.useState(false);\n const [tooltipOpen, toggleTooltip] = React.useState(false);\n const [warningModal, setWarningModal] = React.useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n const [assetsType, setAssetsType] = React.useState(defaultAssetsTypesLS);\n const [layersModal, setLayersModal] = React.useState(null);\n const [profilePictureUpdated, setProfilePictureUpdated] = React.useState(\n false\n );\n const classes = useStyles();\n const updateNFTProfileImageMutate = useUpdateNFTProfileImage();\n\n const handleSetAssetsType = (assetsType) => {\n setAssetsType(assetsType);\n setDefaultAssetsTypesLS(assetsType);\n };\n\n const setAsProfilePicture = async () => {\n await updateNFTProfileImageMutate.mutateAsync({\n nftURL: getNftIndexUrl(tokenIndex + 1, assetsType),\n userName: auth?.username,\n });\n setProfilePictureUpdated(true);\n };\n\n return (\n <>\n {postModal && (\n setPostModal(false)}\n prefilled_content={{\n imageUrl: getNftIndexUrl(tokenIndex + 1, assetsType),\n }}\n />\n )}\n \n \n
    \n setLayersModal(imageUrls)}>\n \n \n
    \n
    \n \n {(collection || '').length < 18\n ? collection || ''\n : (collection || '').slice(0, 15) + '...'}\n \n #{tokenIndex + 1}\n
    \n
    \n {\n setTransferTokenId(tokenId);\n setTransferIndex(tokenIndex);\n }}\n endIcon={}\n />\n {\n setTransferTokenId(tokenId);\n setTransferIndex(tokenIndex);\n }}\n >\n Transfer\n \n {tooltipOpen ? (\n toggleTooltip(false)}\n />\n ) : null}\n ,\n title: 'Copy NFT URL',\n handleClick: () => {\n toggleTooltip(true);\n navigator.clipboard.writeText(\n getNftIndexUrl(tokenIndex + 1, assetsType)\n );\n },\n },\n {\n icon: ,\n title: 'Show off my NFT',\n handleClick: () => setPostModal(true),\n },\n {\n icon: ,\n title: 'Set as Profile Picture',\n handleClick: () => setAsProfilePicture(),\n },\n ]}\n />\n
    \n
    \n {\n setWarningModal(false);\n setErrorMessage('');\n }}\n content={errorMessage}\n />\n {layersModal !== null && (\n setLayersModal(null)}\n defaultAssetsType={assetsType}\n onAssetsTypeChange={handleSetAssetsType}\n />\n )}\n {profilePictureUpdated && (\n setProfilePictureUpdated(false)}\n />\n )}\n \n );\n};\nexport default SingleNft;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport React, { useState } from 'react';\nimport {\n Box,\n Button,\n IconButton,\n styled,\n SvgIcon,\n Typography as MuiTypography,\n} from '@mui/material';\n\nimport { ArrowDown, RefreshArrows } from 'components/icons';\nimport SingleNft from 'pages/profile/NftDropzone/SingleNft';\n\nconst Typography = styled(MuiTypography)({\n marginTop: '8px',\n marginBottom: '8px',\n});\n\nfunction NFTDemo() {\n return (\n <>\n NFT Demo\n {}}\n tokenId={'1'}\n setTransferIndex={() => {}}\n transferIndex={1}\n />\n \n );\n}\n\nexport default NFTDemo;\n","import React, { useState } from 'react';\nimport { Typography } from '@mui/material';\nimport { DatePicker } from 'components';\n\nfunction ColorVariationsDemo() {\n const [value, setValue] = useState(new Date());\n\n return (\n <>\n Date Picker Demo\n
    \n setValue(value)}\n />\n
    \n setValue(value)}\n />\n
    \n setValue(value)}\n />\n \n );\n}\n\nexport default ColorVariationsDemo;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport React, { useState } from 'react';\nimport { Button, Typography } from '@mui/material';\nimport { Dialog } from 'components';\n\nfunction DialogDemo() {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n Dialog Demo\n
    \n \n
    \n {isOpen ? (\n setIsOpen(false)}\n onCancel={() => {}}\n onSubmit={() => {}}\n />\n ) : null}\n \n );\n}\n\nexport default DialogDemo;\n","import React from 'react';\nimport { Tabs, Tab, Typography } from '@mui/material';\n\nfunction TabsDemo() {\n return (\n <>\n Tabs Demo\n {\n console.log('change');\n }}\n aria-label=\"primary tabs example\"\n value={2}\n >\n \n \n \n \n \n \n );\n}\n\nexport default TabsDemo;\n","import React from 'react';\nimport { Typography, Chip } from '@mui/material';\nimport { DiscoverIcon, RemoveIcon } from 'components/icons';\n\nfunction TagDemo() {\n return (\n <>\n Tag Demo\n
    \n\n
    \n } />\n
    \n
    \n
    \n }\n deleteIcon={}\n onDelete={() => {\n console.log('deleting');\n }}\n />\n
    \n \n );\n}\n\nexport default TagDemo;\n","import React from 'react';\nimport ViewListIcon from '@mui/icons-material/ViewList';\nimport { Box, Typography } from '@mui/material';\n\nimport NavigationButton from 'components/NavigationButton';\n\nfunction NavigationButtonsDemo() {\n const [selected, setSelected] = React.useState('list');\n\n return (\n <>\n Navigation Buttons Demo\n
    \n \n }\n value=\"Quilt\"\n aria-label=\"quilt\"\n selected={selected === 'quilt'}\n onClick={() => {\n setSelected('quilt');\n }}\n />\n
    \n }\n aria-label=\"Quilt1\"\n selected={selected === 'quilt1'}\n onClick={() => {\n setSelected('quilt1');\n }}\n />\n
    \n {\n setSelected('quilt2');\n }}\n />\n \n \n );\n}\n\nexport default NavigationButtonsDemo;\n","import React from 'react';\nimport { Typography } from '@mui/material';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport {\n AddIcon,\n AlarmBellIcon,\n SendIcon,\n UserRemoveIcon,\n} from 'components/icons';\n\nfunction OverflowDemo() {\n return (\n <>\n Overflow Menu Demo\n
    \n
    \n console.log('hello'),\n icon: ,\n },\n {\n title: 'b',\n handleClick: () => console.log('hello'),\n icon: (\n \n ),\n },\n {\n title: 'c',\n handleClick: () => console.log('hello'),\n icon: ,\n },\n {\n title: 'd',\n danger: true,\n handleClick: () => console.log('hello'),\n icon: (\n \n ),\n },\n ]}\n />\n
    \n
    \n Square Variant From Nft\n
    \n console.log('hello') },\n { title: 'b', handleClick: () => console.log('hello') },\n { title: 'c', handleClick: () => console.log('hello') },\n {\n title: 'd',\n handleClick: () => console.log('hello'),\n danger: true,\n },\n ]}\n />\n
    \n \n );\n}\n\nexport default OverflowDemo;\n","import * as React from 'react';\nimport { CheckIcon, MoreInfoIcon } from 'components/icons';\nimport {\n Button,\n ListItemIcon,\n ListItemText,\n Menu,\n MenuItem,\n} from '@mui/material';\nimport { useSelectMenuStyles } from './styles';\n\ninterface Props {\n items: {\n disabled?: boolean;\n title: string;\n onChange?: (unknown) => void;\n icon?: JSX.Element;\n danger?: boolean;\n selected?: boolean;\n }[];\n disabled?: boolean;\n onChange?: (unknown) => void;\n}\n\nconst SelectMenu = ({ items, disabled = false, onChange }: Props) => {\n const classes = useSelectMenuStyles();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const open = Boolean(anchorEl);\n\n const handleMenuItemClick = (\n event: React.MouseEvent,\n index: number,\n setSelectedIndex: (idx: unknown) => void\n ) => {\n // this allows the user the freedon to either set it based on index or whatever else in the usage of the component\n if (setSelectedIndex) {\n setSelectedIndex(index);\n } else {\n onChange(index);\n }\n setAnchorEl(null);\n };\n\n const handleClick = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n return (\n
    \n }\n />\n \n {items.map((item, idx) => (\n handleMenuItemClick(e, idx, item.onChange)}\n key={item.title}\n className={\n item.danger && item.selected\n ? classes.selectedDangerMenuItem\n : item.danger\n ? classes.dangerMenuItem\n : item.selected\n ? classes.selectedMenuItem\n : classes.menuItem\n }\n >\n {item.icon && (\n \n {item.icon}\n \n )}\n {item.title}\n {item.selected && }\n \n ))}\n \n
    \n );\n};\n\nexport default SelectMenu;\n","import React from 'react';\nimport { Typography } from '@mui/material';\nimport SelectMenu from 'components/Buttons/SelectMenu';\nimport {\n AddIcon,\n AlarmBellIcon,\n SendIcon,\n UserRemoveIcon,\n} from 'components/icons';\n\nfunction SelectMenuDemo() {\n const [selectedIndex, setSelectedIndex] = React.useState(undefined);\n return (\n <>\n SelectMenu Menu Demo\n
    \n With Icons\n
    \n
    \n setSelectedIndex(idx)}\n items={[\n {\n title: 'a',\n selected: selectedIndex === 0,\n icon: ,\n },\n {\n title: 'b',\n selected: selectedIndex === 1,\n icon: (\n \n ),\n },\n {\n title: 'c',\n selected: selectedIndex === 2,\n icon: ,\n },\n {\n title: 'd',\n danger: true,\n selected: selectedIndex === 3,\n icon: (\n \n ),\n },\n ]}\n />\n
    \n Without Icons\n
    \n
    \n setSelectedIndex('a'),\n },\n {\n title: 'b',\n selected: selectedIndex === 'b',\n onChange: () => setSelectedIndex('b'),\n },\n {\n title: 'c',\n selected: selectedIndex === 'c',\n onChange: () => setSelectedIndex('c'),\n },\n {\n title: 'd',\n danger: true,\n selected: selectedIndex === 'd',\n onChange: () => setSelectedIndex('d'),\n },\n ]}\n />\n
    \n \n );\n}\n\nexport default SelectMenuDemo;\n","import React from 'react';\n\nimport { Typography } from '@mui/material';\nimport { GlobalSearch } from 'pages/app/components';\n\nfunction SearchDemo() {\n return (\n <>\n Search Demo\n
    \n console.log(v)} />\n \n );\n}\n\nexport default SearchDemo;\n","import React from 'react';\nimport { Box, Divider as MuiDivider, styled } from '@mui/material';\n\nimport TypographyDemo from './Typography';\nimport ColorVariationsDemo from './ColorVariations';\nimport AlertDemo from './AlertDemo';\nimport RadioDemo from './RadioDemo';\nimport TextFieldDemo from './TextFieldDemo';\nimport SelectDemo from './SelectDemo';\nimport ButtonDemo from './ButtonDemo';\nimport CheckboxDemo from './CheckboxDemo';\nimport EmptyStateDemo from './EmptyStateDemo';\nimport NFTDemo from './NFTDemo';\nimport DatePickerDemo from './DatePickerDemo';\nimport DialogDemo from './DialogDemo';\nimport TabsDemo from './TabsDemo';\nimport TagDemo from './TagDemo';\nimport NavigationButtonsDemo from './NavigationButtons';\nimport OverflowDemo from './OverflowDemo';\nimport SelectMenuDemo from './SelectMenuDemo';\nimport SearchDemo from './SearchDemo';\n\nexport const Divider = styled(MuiDivider)({\n marginTop: '8px',\n marginBottom: '16px',\n});\n\nfunction DesignSystemDemo() {\n return (\n \n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n \n );\n}\n\nexport default DesignSystemDemo;\n","import DesignSystemDemo from './DesignSystemDemo';\n\nexport default DesignSystemDemo;\n","import React from 'react';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass DiscoverErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default DiscoverErrorBoundary;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { Link as RouterLink, useHistory } from 'react-router-dom';\nimport { useLocalStorage } from 'react-use';\nimport makeStyles from '@mui/styles/makeStyles';\nimport {\n Typography,\n Button,\n IconButton,\n SvgIcon,\n Tooltip,\n Theme,\n useMediaQuery,\n} from '@mui/material';\nimport {\n ThunderFilledIcon,\n ArrowDownIcon,\n ArrowUpIcon,\n Close,\n ArrowLeft,\n ArrowRight,\n} from 'components/icons';\nimport { Loading, UserAvatar } from 'components';\nimport { PostItem } from 'pages/post/components';\nimport { renderUserBadge } from 'utils/moderationShortcuts';\n\nconst useStyles = makeStyles((theme) => ({\n popularThisWeek: {\n padding: theme.spacing(2, 4),\n backgroundColor: theme.palette.colors.ui_02,\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(1, 2),\n },\n [theme.breakpoints.only('xs')]: {\n marginTop: 48,\n },\n },\n header: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n title: {\n display: 'flex',\n alignItems: 'center',\n fontWeight: 600,\n },\n flashIcon: {\n color: theme.palette.colors.primary,\n fontSize: '16px',\n marginRight: theme.spacing(1),\n },\n upDownIcon: {\n fontSize: '14px',\n marginLeft: 8,\n },\n description: {\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: theme.palette.colors.ui_04,\n borderRadius: 8,\n padding: theme.spacing(1, 1, 1, 2),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n marginTop: theme.spacing(1),\n },\n },\n closeIconButton: {\n float: 'right',\n marginTop: theme.spacing(-0.5),\n },\n closeIcon: {\n fontSize: '12px !important',\n },\n users: {\n display: 'flex',\n alignItems: 'center',\n margin: ({ infoClosed }) => theme.spacing(infoClosed ? 3 : 5, 0, 3),\n [theme.breakpoints.down('sm')]: {\n margin: ({ infoClosed }) => theme.spacing(infoClosed ? 2 : 4, 0, 2),\n },\n },\n wrapperProfiles: {\n overflow: 'hidden',\n width: '100%',\n margin: theme.spacing(0, -2),\n padding: theme.spacing(0, 2),\n position: 'relative',\n [theme.breakpoints.down('sm')]: {\n margin: theme.spacing(0, -1),\n padding: theme.spacing(0, 1),\n },\n '&:before': {\n display: 'block',\n content: '\" \"',\n zIndex: 1,\n pointerEvents: 'none',\n background:\n theme.palette.mode === 'light'\n ? 'linear-gradient(-90deg, rgba(247, 246, 253, 0) 0%, rgba(247, 246, 253, 1) 100%)'\n : 'linear-gradient(-90deg, rgba(43, 41, 61, 0) 0%, rgba(43, 41, 61, 1) 100%)',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n width: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n width: theme.spacing(1),\n },\n },\n '&:after': {\n display: 'block',\n content: '\" \"',\n zIndex: 1,\n pointerEvents: 'none',\n background:\n theme.palette.mode === 'light'\n ? 'linear-gradient(90deg, rgba(247, 246, 253, 0) 0%, rgba(247, 246, 253, 1) 100%)'\n : 'linear-gradient(90deg, rgba(43, 41, 61, 0) 0%, rgba(43, 41, 61, 1) 100%)',\n position: 'absolute',\n top: 0,\n bottom: 0,\n right: 0,\n width: theme.spacing(2),\n [theme.breakpoints.down('sm')]: {\n width: theme.spacing(1),\n },\n },\n },\n profiles: {\n display: 'flex',\n alignItems: 'center',\n transitionProperty: 'left',\n position: 'relative',\n left: 0,\n transitionDuration: '600ms',\n transitionTimingFunction: 'ease-in-out',\n },\n avatar: {\n marginRight: theme.spacing(3),\n flexShrink: 0,\n cursor: 'pointer',\n '&:last-child': {\n marginRight: 0,\n },\n [theme.breakpoints.down('sm')]: {\n marginRight: theme.spacing(2),\n },\n },\n tooltipStyle: {\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow:\n theme.palette.mode === 'light'\n ? '0 2px 16px 0 rgba(76,70,212,0.19)'\n : 'none',\n color: theme.palette.text.primary,\n fontSize: 14,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 20,\n paddingRight: 20,\n textAlign: 'center',\n },\n tooltipArrow: {\n color: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n },\n tooltipDisplayName: {\n fontWeight: 600,\n },\n tooltipUsername: {\n color: theme.palette.colors.ui_06,\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n post: {\n backgroundColor: theme.palette.colors.ui_01,\n marginTop: theme.spacing(4),\n marginBottom: theme.spacing(2),\n padding: theme.spacing(2),\n borderColor: theme.palette.colors.ui_04,\n borderStyle: 'solid',\n borderWidth: 1,\n borderRadius: 8,\n [theme.breakpoints.down('md')]: {\n marginTop: theme.spacing(3),\n },\n },\n morePosts: {\n display: 'flex',\n justifyContent: 'center',\n marginBottom: theme.spacing(2),\n },\n arrowLeft: {\n marginRight: theme.spacing(2),\n marginLeft: theme.spacing(-1),\n position: 'relative',\n zIndex: 2,\n [theme.breakpoints.down('sm')]: {\n marginRight: 0,\n },\n },\n arrowRight: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(-1),\n position: 'relative',\n zIndex: 2,\n [theme.breakpoints.down('sm')]: {\n marginLeft: 0,\n },\n },\n}));\n\nconst DiscoveryFeatures = ({ data, isLoading }) => {\n const history = useHistory();\n const [sectionClosedLS, setSectionClosedLS] = useLocalStorage(\n 'app.DiscoveryFeatures.sectionClosed',\n false\n );\n const [infoClosedLS, setInfoClosedLS] = useLocalStorage(\n 'app.DiscoveryFeatures.infoClosed',\n false\n );\n const [sectionClosed, setSectionClosed] = useState(sectionClosedLS);\n const [infoClosed, setInfoClosed] = useState(infoClosedLS);\n const [usersLeft, setUsersLeft] = useState(0);\n const [arrowRightDisabled, setArrowRightDisabled] = useState(false);\n const mobileSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('xs')\n );\n const classes = useStyles({ infoClosed });\n const handleNextClick = () => {\n if (usersLeft < 0) {\n setUsersLeft(0);\n return;\n }\n const el = document.getElementById('discoveryFeaturesUsersWrapper');\n if (!el) return;\n const { width: wrapperWidth } = el.getBoundingClientRect();\n const avatarWidth = mobileSize ? 56 : 84;\n const avatarMargin = mobileSize ? 16 : 24;\n const avatarsWidth =\n data?.length > 0\n ? data[0].profiles.length * avatarWidth - avatarMargin\n : 1;\n const avatarsLeft = Math.ceil(\n (avatarsWidth - wrapperWidth + (mobileSize ? 16 : 32)) / avatarWidth\n );\n setUsersLeft(-avatarsLeft * avatarWidth);\n };\n const resetUsersLeft = useCallback(() => {\n setUsersLeft(0);\n const el = document.getElementById('discoveryFeaturesUsersWrapper');\n if (el && data && data[0] && data[0].profiles) {\n const { width: wrapperWidth } = el.getBoundingClientRect();\n const avatarWidth = mobileSize ? 56 : 84;\n const avatarMargin = mobileSize ? 16 : 24;\n const avatarsWidth = data[0].profiles.length * avatarWidth - avatarMargin;\n const avatarsLeft = Math.ceil(\n (avatarsWidth - wrapperWidth + (mobileSize ? 16 : 32)) / avatarWidth\n );\n setArrowRightDisabled(avatarsLeft <= 0);\n }\n }, [data, mobileSize]);\n useEffect(() => {\n window.addEventListener('resize', resetUsersLeft);\n resetUsersLeft();\n return () => window.removeEventListener('scroll', resetUsersLeft);\n }, [resetUsersLeft]);\n useEffect(() => {\n const el = document.getElementById('discoveryFeaturesUsers');\n if (el) {\n el.style.left = `${usersLeft}px`;\n }\n }, [usersLeft]);\n const handleClickAvatar = (user) => history.push(`/u/${user.username}`);\n if (\n !isLoading &&\n data &&\n data[0] &&\n data[0].posts.length === 0 &&\n data[0].profiles.length === 0\n )\n return null;\n return (\n <>\n
    \n
    \n \n \n Popular this Week\n \n {\n setSectionClosed(!sectionClosed);\n setSectionClosedLS(!sectionClosed);\n }}\n >\n {sectionClosed ? 'Show' : 'Hide'}\n {sectionClosed ? (\n \n ) : (\n \n )}\n \n
    \n {!sectionClosed && (\n <>\n {!infoClosed && (\n \n {\n setInfoClosed(true);\n setInfoClosedLS(true);\n }}\n >\n \n \n
    \n This is an experimental feature that aims to help you discover\n relevant content.\n
    \n
    \n )}\n {isLoading ? (\n
    \n \n
    \n ) : (\n data?.[0].profiles.length > 0 && (\n
    \n setUsersLeft(0)}\n disabled={usersLeft === 0}\n className={classes.arrowLeft}\n >\n \n \n \n \n {data[0].profiles.map((user) => (\n \n
    \n {user.display_name}\n {renderUserBadge(user, {\n className: classes.teamBadge,\n })}\n
    \n
    \n @{user.username}\n
    \n
    \n }\n arrow\n classes={{\n tooltip: classes.tooltipStyle,\n arrow: classes.tooltipArrow,\n }}\n >\n handleClickAvatar(user)}\n onKeyDown={() => handleClickAvatar(user)}\n tabIndex={0}\n role=\"button\"\n >\n \n
    \n \n ))}\n \n \n \n \n \n \n )\n )}\n {data && data[0] && data[0].posts && data[0].posts[0] && (\n <>\n \n \n \n
    \n \n
    \n \n )}\n \n )}\n \n \n );\n};\n\nexport default DiscoveryFeatures;\n","import { useEffect } from 'react';\nimport { useLocalStorage } from 'react-use';\n\nexport const ScrollKeeper = () => {\n const [scrollY, setScrollY] = useLocalStorage('app.scrollY', 0);\n\n useEffect(() => {\n window.scrollTo(0, scrollY);\n return () => {\n setScrollY(window.pageYOffset);\n };\n }, [scrollY, setScrollY]);\n\n return null;\n};\n","import * as React from 'react';\nimport { Divider } from '@mui/material';\n\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { Loading, Alert } from 'components';\nimport { PostItem } from 'pages/post/components';\nimport { UseInfiniteQueryResult } from 'react-query';\nimport { ApiItemFeed } from 'client';\n\nexport const Feed = (props: UseInfiniteQueryResult) => {\n const [successPostDelete, setSuccessPostDelete] = React.useState(false);\n\n const {\n data: postItems,\n error,\n isLoading,\n isFetching,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n } = props;\n\n return (\n <>\n \n\n {isFetching && (\n
    \n \n
    \n )}\n\n {postItems && (\n <>\n {postItems.pages.map((page, pageIndex) =>\n page.map((item, index) => (\n \n {\n setSuccessPostDelete(true);\n }}\n />\n\n {index < page.length - 1 ||\n pageIndex < postItems.pages.length - 1 ? (\n \n ) : null}\n \n ))\n )}\n\n {hasNextPage && (\n fetchNextPage()}\n isFetching={isFetchingNextPage}\n />\n )}\n \n )}\n {successPostDelete && (\n setSuccessPostDelete(false)}\n />\n )}\n \n );\n};\n","import * as React from 'react';\nimport { useQueryClient } from 'react-query';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Typography, Chip, Button } from '@mui/material';\nimport { useLocalStorage } from 'react-use';\nimport DiscoveryFeatures from './components/DiscoveryFeatures';\nimport PageHeader from '../../components/PageHeader/PageHeader';\nimport { HeartbeatView } from '../../utils/heartbeat';\nimport { Profile } from 'client';\nimport { useGetPaginatedOptimizedDiscoveryFeed } from './services';\nimport { useGetLastWeekLeaderBoardResult } from 'pages/app/services';\nimport { ScrollKeeper } from 'components/ScrollKeeper';\nimport { Feed } from 'components/Feed';\nimport { Loading } from 'components';\nimport { CheckIcon, PictureIcon } from 'components/icons';\n\nconst useStyles = makeStyles((theme) => ({\n trendingHashtagsSection: {\n marginTop: theme.spacing(1),\n padding: theme.spacing(2, 4),\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(1, 2),\n },\n },\n title: {\n fontWeight: 600,\n },\n chips: {\n marginTop: theme.spacing(2),\n },\n chip: {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1),\n whiteSpace: 'nowrap',\n height: 32,\n },\n pillChip: {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginBottom: theme.spacing(1),\n whiteSpace: 'nowrap',\n height: 32,\n '&:hover': {\n backgroundColor: theme.palette.colors.primary_hover,\n },\n },\n additionalChips: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n },\n icon: {\n fontSize: 16,\n width: 16,\n height: 16,\n },\n noResults: {\n textAlign: 'center',\n marginTop: theme.spacing(10),\n marginBottom: theme.spacing(10),\n },\n emptyText: {\n color: theme.palette.colors.ui_06,\n },\n pageHeaderFilters: {\n display: 'flex',\n overflowX: 'auto',\n alignItems: 'center',\n marginLeft: theme.spacing(-1),\n marginRight: theme.spacing(-1),\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n height: 48,\n '&::-webkit-scrollbar-thumb': {\n backgroundColor: theme.palette.colors.ui_03,\n },\n scrollbarColor: theme.palette.colors.ui_03,\n },\n filterWrapper: {\n position: 'sticky',\n top: 64,\n },\n}));\n\nconst Discover = () => {\n const classes = useStyles();\n const [hashtagsLS, setHashtagsLS] = useLocalStorage(\n 'app.stream.filter.hashtags',\n []\n );\n const [withCertifiedUsersLS, setWithCertifiedUsersLS] = useLocalStorage(\n 'app.stream.filter.withCertifiedUsers',\n false\n );\n const [withImagesLS, setWithImagesLS] = useLocalStorage(\n 'app.stream.filter.withImages',\n false\n );\n const [hashtags, setHashtags] = React.useState(hashtagsLS);\n const [withCertifiedUsers, setWithCertifiedUsers] = React.useState(\n withCertifiedUsersLS\n );\n const [withImages, setWithImages] = React.useState(withImagesLS);\n const feedProps = useGetPaginatedOptimizedDiscoveryFeed({\n with_hashtags: hashtags,\n with_certified_users: withCertifiedUsers,\n with_image: withImages,\n skip_ids: [],\n });\n const { error } = feedProps;\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n const { data, isLoading } = useGetLastWeekLeaderBoardResult(auth?.id);\n const [showHeaderFilter, setShowHeaderFilter] = React.useState(false);\n const onScroll = () => {\n const discoveryFeaturesWrapper = document.getElementById(\n 'discoveryFeaturesWrapper'\n );\n if (!discoveryFeaturesWrapper) return;\n const { top, height } = discoveryFeaturesWrapper.getBoundingClientRect();\n setShowHeaderFilter(top < 0 && window.pageYOffset > height + 64);\n };\n React.useEffect(() => {\n window.addEventListener('scroll', onScroll);\n onScroll();\n return () => window.removeEventListener('scroll', onScroll);\n }, []);\n React.useEffect(() => {\n setHashtagsLS(hashtags);\n onScroll();\n }, [hashtags, setHashtagsLS]);\n React.useEffect(() => {\n setWithCertifiedUsersLS(withCertifiedUsers);\n onScroll();\n }, [withCertifiedUsers, setWithCertifiedUsersLS]);\n React.useEffect(() => {\n setWithImagesLS(withImages);\n onScroll();\n }, [withImages, setWithImagesLS]);\n React.useEffect(() => {\n if (isLoading) return;\n let oldHashtags = false;\n hashtags.forEach((hashtag) => {\n if (!data[0].hashtags.includes(hashtag)) {\n oldHashtags = true;\n }\n });\n if (oldHashtags) {\n setHashtags([]);\n setHashtagsLS([]);\n }\n }, [hashtags, isLoading, data, setHashtagsLS]);\n\n if (error) {\n return oh no something went wrong;\n }\n\n return (\n <>\n \n \n \n {showHeaderFilter &&\n (hashtags.length > 0 || withCertifiedUsers || withImages) && (\n
    \n {hashtags.map((hashtag) => (\n {\n setHashtags(\n hashtags.includes(hashtag)\n ? hashtags.filter((h) => h !== hashtag)\n : [...hashtags, hashtag]\n );\n window.scrollTo(0, 0);\n }}\n />\n ))}\n {withCertifiedUsers && (\n {\n setWithCertifiedUsers(!withCertifiedUsers);\n window.scrollTo(0, 0);\n }}\n icon={}\n />\n )}\n {withImages && (\n {\n setWithImages(!withImages);\n window.scrollTo(0, 0);\n }}\n icon={}\n />\n )}\n {\n setHashtags([]);\n setWithCertifiedUsers(false);\n setWithImages(false);\n window.scrollTo(0, 0);\n }}\n >\n Clear All\n \n
    \n )}\n \n \n
    \n \n
    \n
    \n \n Trending Hashtags\n \n {isLoading ? (\n \n ) : (\n
    \n
    \n {data?.[0].hashtags.map((hashtag) => (\n \n setHashtags(\n hashtags.includes(hashtag)\n ? hashtags.filter((h) => h !== hashtag)\n : [...hashtags, hashtag]\n )\n }\n />\n ))}\n
    \n
    \n setWithCertifiedUsers(!withCertifiedUsers)}\n icon={}\n />\n setWithImages(!withImages)}\n icon={}\n />\n
    \n
    \n )}\n {!feedProps.isLoading && feedProps.data?.pages[0]?.length === 0 && (\n
    \n \n There's nothing here...\n \n \n Try adjusting or clearing your filters to display better\n results.\n \n
    \n )}\n
    \n \n \n \n );\n};\n\nexport default Discover;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport Loading from '../../components/Loading';\nimport DiscoverErrorBoundary from './DiscoverErrorBoundary';\nimport Discover from './Discover';\n\nconst DiscoverContainer = () => (\n \n \n \n \n }\n >\n \n \n \n);\n\nexport default DiscoverContainer;\n","import React from 'react';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass FeaturedPostsErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default FeaturedPostsErrorBoundary;\n","import * as React from 'react';\nimport { useQueryClient } from 'react-query';\nimport { Divider } from '@mui/material';\nimport { Profile } from 'client';\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport { Loading } from 'components';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { ScrollKeeper } from 'components/ScrollKeeper';\nimport { useGetLastWeekLeaderBoardResult } from 'pages/app/services';\nimport { PostItem } from 'pages/post/components';\n\nconst FeaturedPosts = () => {\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n const { data, isFetching } = useGetLastWeekLeaderBoardResult(auth?.id);\n return (\n
    \n \n \n \n {isFetching && (\n
    \n \n
    \n )}\n {data &&\n data[0] &&\n data[0].posts &&\n data[0].posts.map((item, idx) => (\n \n \n \n \n ))}\n
    \n );\n};\n\nexport default FeaturedPosts;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport FeaturedPostsErrorBoundary from './FeaturedPostsErrorBoundary';\nimport Loading from '../../components/Loading';\nimport FeaturedPosts from './featuredPosts';\n\nconst FeaturedPostsContainer = () => (\n \n \n \n \n }\n >\n \n \n \n);\n\nexport default FeaturedPostsContainer;\n","import React from 'react';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass ExploreErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default ExploreErrorBoundary;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n bullet: {\n color: theme.palette.colors.ui_06,\n },\n infoText: {\n color: theme.palette.colors.ui_06,\n },\n image: {\n width: 72,\n height: 72,\n objectFit: 'cover',\n borderRadius: 20,\n },\n content: {\n margin: theme.spacing(2),\n marginLeft: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: 2 /* number of lines to show */,\n WebkitBoxOrient: 'vertical',\n color: theme.palette.colors.ui_06,\n },\n actions: {\n justifyContent: 'space-between',\n },\n actionsContainer: {\n justifyContent: 'space-between',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('xs')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n },\n divider: {\n width: 'calc(100% - 64px)',\n marginLeft: theme.spacing(4),\n marginRight: theme.spacing(4),\n\n [theme.breakpoints.only('xs')]: {\n width: 'calc(100% - 32px)',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n },\n },\n card: {\n backgroundColor: theme.palette.colors.ui_01,\n marginBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(2),\n\n [theme.breakpoints.only('xs')]: {\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(1),\n },\n },\n contentContainer: {\n paddingBottom: 0,\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n\n [theme.breakpoints.only('xs')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n },\n icon: {\n height: 24,\n width: 24,\n },\n iconButton: {\n padding: theme.spacing(1),\n },\n userInfoContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n userInfo: {\n marginLeft: theme.spacing(2),\n },\n popup: {\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n padding: 0,\n borderRadius: 10,\n display: 'grid',\n },\n menuItem: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.secondary,\n paddingLeft: theme.spacing(6),\n paddingRight: theme.spacing(6),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n teamBadge: {\n height: 12,\n width: 12,\n marginLeft: theme.spacing(0.5),\n color: theme.palette.primary.main,\n },\n centeredContainer: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'fixed',\n top: 150,\n backgroundColor: theme.palette.mode === 'light' ? '#fff' : '#40367E',\n boxShadow: '0 2px 16px 0 rgba(76,70,212,0.19)',\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(12),\n paddingTop: theme.spacing(1.5),\n paddingBottom: theme.spacing(1.5),\n paddingLeft: theme.spacing(5),\n paddingRight: theme.spacing(5),\n borderRadius: 16,\n left: '50%',\n transform: 'translate(-50%, 0)',\n },\n tooltipIcon: {\n height: 12,\n width: 12,\n },\n tooltipText: {\n fontSize: theme.typography.pxToRem(12),\n marginLeft: theme.spacing(1.5),\n },\n}));\n","import {\n Box,\n Card,\n CardActions,\n CardContent,\n Divider,\n Link,\n Typography,\n} from '@mui/material';\nimport { Alert } from 'components';\nimport MoreButton from 'components/Buttons/MoreButton';\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\nimport WarningModal from 'components/Dialogs/Warning';\nimport { ProfileImageLoader } from 'components/ImageLoader';\nimport UserAvatar from 'components/UserAvatar/UserAvatar';\nimport dayjs from 'dayjs';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport React, { useContext } from 'react';\nimport { Link as RouterLink } from 'react-router-dom';\nimport { Share2Icon, CopyIcon } from 'components/icons';\nimport { useGetUserIdById } from 'services';\nimport { formattedDate } from 'utils/formatDate';\nimport getExternalUrl from 'utils/getExternalUrl';\nimport { renderUserBadge } from 'utils/moderationShortcuts';\nimport { useStyles } from './styles';\nimport { toIcVariant } from 'utils';\nimport { OpenDistriktContext } from 'providers';\n\ninterface Props {\n article: any;\n}\n\nconst ArticleCard = ({ article }: Props) => {\n const classes = useStyles();\n const { handleAction: openDistriktAction } = useContext(OpenDistriktContext);\n const date = formattedDate(article.updated_at);\n const [postModal, setPostModal] = React.useState(false);\n const [toggleCopied, setToggleCopied] = React.useState(false);\n const [warningModal, setWarningModal] = React.useState(false);\n const [errorMessage, setErrorMessage] = React.useState('');\n\n const {\n data: author = {\n id: 0,\n username: '',\n avatar: '',\n display_name: '',\n },\n } = useGetUserIdById(article.author);\n\n dayjs.extend(relativeTime);\n\n return (\n
    \n \n \n
    \n \n {article.title}\n \n \n {article.content.replace(/<[^>]*>?/gm, '')}\n \n
    \n
    \n \n {({ src }) => (\n \n )}\n \n
    \n
    \n \n
    \n \n
    \n \n {author.display_name}\n {renderUserBadge(author, { className: classes.teamBadge })}\n \n \n {date}\n \n \n {'\\u00a0\\u00a0'}•{'\\u00a0\\u00a0'}\n \n \n {`${article.time_to_read}min read`}\n \n
    \n
    \n ,\n handleClick: () => openDistriktAction(() => setPostModal(true)),\n },\n {\n title: 'Copy to clipboard',\n icon: ,\n handleClick: () => {\n navigator.clipboard.writeText(\n getExternalUrl(`/article/${article.article_id}`)\n );\n setToggleCopied(true);\n },\n },\n ]}\n iconSize={16}\n />\n
    \n
    \n \n {postModal && (\n setPostModal(false)}\n quotedResource={toIcVariant('Article', article)}\n author={author}\n date={date}\n />\n )}\n {toggleCopied && (\n setToggleCopied(false)}\n />\n )}\n {\n setWarningModal(false);\n setErrorMessage('');\n }}\n content={errorMessage}\n />\n
    \n );\n};\n\nexport default ArticleCard;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n root: {\n maxWidth: 374,\n paddingTop: theme.spacing(4),\n paddingBottom: theme.spacing(8),\n margin: 'auto',\n textAlign: 'center',\n\n [theme.breakpoints.only('xs')]: {\n paddingTop: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n },\n placeholderImage: {\n width: '100%',\n height: 'auto',\n borderRadius: 56,\n },\n button: {\n marginTop: theme.spacing(2),\n paddingLeft: 45,\n paddingRight: 45,\n },\n}));\n","import React from 'react';\nimport { Box, Divider, Typography } from '@mui/material';\n\nimport ArticleCard from './components/ArticleCard';\nimport Loading from 'components/Loading';\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { useGetArticles } from 'services';\nimport { useStyles } from './styles';\nimport { useTheme } from '@mui/material/styles';\n\nconst Explore = () => {\n const classes = useStyles();\n const theme = useTheme();\n const { data: articles, isFetching } = useGetArticles();\n\n return (\n <>\n \n \n {isFetching ? : null}\n\n {articles &&\n articles.map((article) => (\n \n ))}\n\n \n
    \n \n \n Coming soon…\n \n \n You'll soon be able to create and share your very own articles\n on distrikt. Check out our roadmap to learn more about this upcoming\n feature.\n \n
    \n
    \n \n );\n};\n\nexport default Explore;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport ExploreErrorBoundary from './ExploreErrorBoundary';\nimport Loading from '../../components/Loading';\nimport Explore from './explore';\n\nconst ExploreContainer = () => (\n \n \n \n \n }\n >\n \n \n \n);\n\nexport default ExploreContainer;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n centeredContainer: {\n paddingTop: theme.spacing(10),\n paddingBottom: theme.spacing(10),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n emptyTextContainer: {\n paddingTop: theme.spacing(18),\n paddingBottom: theme.spacing(18),\n display: 'grid',\n justifyContent: 'center',\n alignItems: 'center',\n marginLeft: theme.spacing(4),\n marginRight: theme.spacing(4),\n },\n emptyText: {\n textAlign: 'center',\n },\n}));\n","import React, { useMemo } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport { Box, Divider, Typography } from '@mui/material';\n\nimport Error from 'components/Error';\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\nimport Loading from 'components/Loading/Loading';\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { PostItem } from 'pages/post/components';\nimport { Profile } from 'client';\nimport { extractPostItemKey } from 'pages/post/utils/postItem';\nimport { flattenInfiniteData } from 'utils';\nimport { useGetPaginatedOptimizedHashtagFeed } from './services';\nimport { useStyles } from './styles';\n\nexport interface RouteParams {\n hashtag: string;\n}\n\nconst HashtagPage = () => {\n const classes = useStyles();\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData(['getSelf']);\n const { hashtag } = useParams();\n const {\n data: pagedPostItems,\n error,\n isFetching,\n isLoading,\n isFetched,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n } = useGetPaginatedOptimizedHashtagFeed(authUser?.id, hashtag);\n const postItems = useMemo(() => flattenInfiniteData(pagedPostItems), [\n pagedPostItems,\n ]);\n\n if (error) {\n return ;\n }\n\n return (\n <>\n \n \n {isFetching && (\n \n \n \n )}\n\n {isFetched && postItems.length === 0 ? (\n
    \n \n No one's used this hashtag yet... you could be the first!\n \n
    \n ) : null}\n\n {postItems && (\n <>\n {postItems.map((item, index) => (\n \n \n {index < postItems.length - 1 ? : null}\n \n ))}\n\n {hasNextPage && (\n fetchNextPage()}\n isFetching={isFetchingNextPage}\n />\n )}\n \n )}\n \n );\n};\n\nexport default HashtagPage;\n","import React, { useContext } from 'react';\nimport { Divider, Switch, Typography } from '@mui/material';\n\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport { ScrollKeeper } from 'components/ScrollKeeper';\nimport { Feed } from 'components/Feed';\nimport { useGetPaginatedOptimizedUserFeed } from './services';\nimport CreatePostModal from 'components/Dialogs/CreatePostModal';\n\nconst Home = () => {\n const feedProps = useGetPaginatedOptimizedUserFeed();\n const { error } = feedProps;\n\n if (error) {\n return oh no something went wrong;\n }\n\n return (\n
    \n \n \n \n \n \n
    \n );\n};\n\nexport default Home;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport HomeErrorBoundary from './HomeErrorBoundary';\nimport Loading from '../../components/Loading';\nimport Home from './home';\n\nconst HomeContainer = () => (\n \n \n \n \n }\n >\n \n \n \n);\n\nexport default HomeContainer;\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PageHeader from '../../components/PageHeader/PageHeader';\nimport {\n Box,\n Button,\n Card,\n CardContent,\n CardHeader,\n Paper,\n SvgIcon,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n Typography,\n} from '@mui/material';\nimport { ArrowRight } from '../../components/icons';\nimport api from '../../client';\nimport { useQuery } from 'react-query';\nimport Loading from '../../components/Loading';\nimport { RESOURCE_TYPE } from './reports/constants';\n\nconst useStyles = makeStyles((theme) => ({\n section: {\n border: '1px solid #B7B5EE',\n paddingTop: theme.spacing(2),\n paddingRight: theme.spacing(2.5),\n paddingBottom: theme.spacing(4),\n paddingLeft: theme.spacing(4),\n borderRadius: 14,\n },\n titleText: {\n fontSize: theme.typography.pxToRem(14),\n textTransform: 'uppercase',\n },\n headerTitle: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n titleRoot: {\n padding: 0,\n },\n statsTitle: {\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 300,\n },\n bigStatsNumber: {\n fontSize: theme.typography.pxToRem(24),\n fontWeight: 700,\n paddingTop: theme.spacing(1),\n color: theme.palette.text.primary,\n },\n statsNumber: {\n fontSize: theme.typography.pxToRem(18),\n fontWeight: 700,\n paddingTop: '0 !important',\n },\n contentRoot: {\n paddingBottom: `0px !important `,\n paddingTop: theme.spacing(1.5),\n padding: 0,\n },\n tableCell: {\n textAlign: 'left',\n borderBottom: 'none',\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(0.75),\n padding: 0,\n },\n button: {\n marginRight: theme.spacing(2),\n },\n icon: {\n width: 12,\n height: 12,\n },\n}));\n\nconst CellTitle = ({ title, ...props }: { title: string; style?: any }) => {\n const classes = useStyles();\n\n return (\n \n {title}\n \n );\n};\n\nconst CellNumber = ({ number }: { number: bigint }) => {\n const classes = useStyles();\n\n return (\n \n {number.toString()}\n \n );\n};\n\nconst getStats = async () => {\n const verification = await api.getVerificationStats();\n const reports = await api.getReportStatsV2();\n\n return { verification, reports };\n};\n\nconst ModerationBoard = () => {\n const classes = useStyles();\n const { data, isLoading, error } = useQuery('getModerationStats', () =>\n getStats()\n );\n\n if (isLoading) {\n return ;\n }\n if (error) {\n return oh no something went wrong;\n }\n\n const { verification: verificationStats, reports: reportsStats } = data;\n\n return (\n <>\n \n \n \n \n \n \n Reports\n \n \n }\n component={Link}\n to={`/moderation/report`}\n >\n Moderate!\n \n \n }\n classes={{\n title: classes.headerTitle,\n root: classes.titleRoot,\n }}\n />\n \n \n \n Total reports:\n \n \n \n {reportsStats && reportsStats.total.toString()}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n \n \n \n \n User verification\n \n
    \n \n Verification Guidelines\n \n \n }\n component={Link}\n to={`/moderation/verification`}\n >\n Review!\n \n
    \n \n }\n classes={{\n title: classes.headerTitle,\n root: classes.titleRoot,\n }}\n />\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n \n );\n};\n\nexport default ModerationBoard;\n","import React from 'react';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass ModerationErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default ModerationErrorBoundary;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n emptyTextContainer: {\n paddingTop: theme.spacing(18),\n paddingBottom: theme.spacing(18),\n display: 'grid',\n justifyContent: 'center',\n alignItems: 'center',\n marginLeft: theme.spacing(23),\n marginRight: theme.spacing(23),\n },\n emptyText: {\n fontSize: theme.typography.pxToRem(12),\n textAlign: 'center',\n },\n}));\n\nexport const useVerificationRequestStyles = makeStyles((theme) => ({\n sectionTitleContainer: {\n background:\n theme.palette.mode === 'light'\n ? `rgb(189 181 204 / 33%) !important`\n : `#40367E !important`,\n display: 'flex',\n alignItems: 'center',\n },\n sectionTitle: {\n fontSize: theme.typography.pxToRem(14),\n paddingLeft: theme.spacing(3.5),\n paddingRight: theme.spacing(3.5),\n paddingTop: theme.spacing(0.5),\n paddingBottom: theme.spacing(0.5),\n },\n container: {\n paddingLeft: theme.spacing(3.5),\n paddingRight: theme.spacing(5.5),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n },\n handleText: {\n fontSize: theme.typography.pxToRem(14),\n color: '#a3a0a8',\n },\n button: {\n marginRight: theme.spacing(2),\n },\n list: {\n padding: 0,\n },\n listItem: {\n padding: 0,\n paddingBottom: theme.spacing(2),\n alignItems: 'flex-end',\n justifyContent: 'space-between',\n },\n userContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n buttonsContainer: {\n textAlign: 'right',\n },\n}));\n\nexport const useVerificationApplicationStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n maxWidth: 580,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingRight: theme.spacing(3),\n paddingLeft: theme.spacing(3),\n minWidth: 128,\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n padding: theme.spacing(2),\n '& :only-child': {\n margin: 'auto',\n },\n },\n content: {\n fontSize: theme.typography.pxToRem(12),\n },\n inputContainer: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n width: 320,\n },\n icon: {\n height: 16,\n width: 16,\n },\n contentContainer: {\n paddingTop: 0,\n paddingBottom: theme.spacing(4),\n borderTop: 'none',\n },\n label: {\n width: '100%',\n transform: 'translate(0, 1.5px) scale(1)',\n },\n listItem: {\n paddingLeft: theme.spacing(1),\n },\n list: {\n fontSize: theme.typography.pxToRem(12),\n paddingLeft: theme.spacing(3),\n },\n disabledField: {\n '& .MuiInput-underline.Mui-disabled:before': {\n borderBottomStyle: 'solid',\n opacity: 0.38,\n },\n '& .MuiInputBase-root.Mui-disabled': {\n background: 'rgba(154,154,154,0.1)',\n },\n },\n inputIcon: {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n },\n labelContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n}));\n","import { Box, Button, Link, List, ListItem, Typography } from '@mui/material';\nimport {\n Profile,\n VerificationRequest as VerificationRequestType,\n} from 'client';\nimport UserPreviewCard from 'components/Cards/UserPreviewCard';\nimport ConfirmModal from 'components/Dialogs/Confirm';\nimport RemoveModal from 'components/Dialogs/Remove';\nimport SuccessModal from 'components/Dialogs/Success';\nimport Loading from 'components/Loading';\nimport React from 'react';\nimport { useChangeVerificationRequest } from './services';\nimport { useVerificationRequestStyles } from './styles';\n\nconst VerificationRequest = ({\n request,\n user,\n}: {\n request: VerificationRequestType;\n user: Profile;\n}) => {\n const changeVerificationRequest = useChangeVerificationRequest();\n const [approveModal, setApproveModal] = React.useState(false);\n const [rejectModal, setRejectModal] = React.useState(false);\n const [successModal, setSuccessModal] = React.useState(false);\n const [successContent, setSuccessContent] = React.useState('');\n const classes = useVerificationRequestStyles();\n const VERIFICATION_ACTION = {\n approve: 2,\n reject: 3,\n };\n\n const handleUpdateRequest = async (action) => {\n changeVerificationRequest.mutate(\n {\n requestId: request.request_id,\n verificationAction: action,\n },\n {\n onSuccess: () => {\n if (action === VERIFICATION_ACTION.approve) {\n setSuccessContent('1 User has been Validated!');\n } else {\n setSuccessContent('1 Request has been Rejected');\n }\n setSuccessModal(true);\n setTimeout(() => {\n setSuccessModal(false);\n }, 3000);\n },\n }\n );\n };\n\n return (\n <>\n {changeVerificationRequest.isLoading ? (\n \n ) : (\n \n
    \n \n #{request.request_id.toString()}\n \n
    \n
    \n \n \n
    \n \n
    \n
    \n \n Twitter Handle:{' '}\n \n @{request.verification_proof}\n \n \n
    \n
    \n
    \n
    \n setRejectModal(true)}\n >\n Reject Validation Request\n \n setApproveModal(true)}\n >\n Give Verified Badge\n \n
    \n
    \n
    \n )}\n {approveModal && (\n setApproveModal(false)}\n confirm={() => handleUpdateRequest(VERIFICATION_ACTION.approve)}\n confirmButton=\"Yes, Give Badge\"\n content=\"Are you sure this account qualifies for a Verified badge?\n Make sure you have read under understood the guideline for verifying accounts.\n\n Once you hit “Give badge” the user will automatically receive the badge on his account.\"\n open={approveModal}\n title=\"Are you sure?\"\n closeButton=\"Cancel\"\n loading={changeVerificationRequest.isLoading}\n />\n )}\n {rejectModal && (\n setRejectModal(false)}\n confirm={() => handleUpdateRequest(VERIFICATION_ACTION.reject)}\n confirmButton=\"Yes, Reject Verification\"\n content=\"Are you sure this account doesn’t qualify for a Verified badge?\n Make sure you have read unde understood the guideline for verifying accounts.\n\n Once you hit “Reject” the user will automatically be notified of his status and can apply again.\"\n title=\"Are you sure?\"\n loading={changeVerificationRequest.isLoading}\n />\n )}\n {successModal && (\n setSuccessModal(false)}\n content={successContent}\n />\n )}\n \n );\n};\n\nexport default VerificationRequest;\n","import api from 'client';\nimport {\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from 'react-query';\nimport { INITIAL_VERIFICATION_ITEMS_LIMIT } from '../../../constants';\n\nexport function useGetVerificationRequestsWithUserData(pending = true) {\n return useInfiniteQuery(\n ['getVerificationRequestsWithUserData'],\n async ({ pageParam = 0 }) =>\n await api.getVerificationRequestsWithUserData(\n BigInt(pageParam * INITIAL_VERIFICATION_ITEMS_LIMIT),\n BigInt(INITIAL_VERIFICATION_ITEMS_LIMIT),\n pending\n ),\n {\n getNextPageParam: (page, pages) =>\n page && page.length >= INITIAL_VERIFICATION_ITEMS_LIMIT\n ? pages.length\n : undefined,\n }\n );\n}\n\nexport function useChangeVerificationRequest() {\n const queryClient = useQueryClient();\n return useMutation(\n ({\n requestId,\n verificationAction,\n }: {\n requestId: bigint;\n verificationAction: number;\n }) => api.changeVerificationRequest(requestId, verificationAction),\n {\n onSuccess: () => {\n queryClient.invalidateQueries(['getVerificationRequestsWithUserData']);\n },\n }\n );\n}\n\nexport function useVerificationRequest() {\n const queryClient = useQueryClient();\n return useMutation(\n ({ value }: { value: string }) => api.verificationRequest(value),\n {\n onSuccess: () => {\n queryClient.invalidateQueries(['getUserVerificationRequestMaybe']);\n },\n }\n );\n}\n\nexport function useGetUserVerificationRequestMaybe() {\n const { data, isLoading, error } = useQuery(\n ['getUserVerificationRequestMaybe'],\n api.getUserVerificationRequestMaybe\n );\n let response;\n if (data) {\n response = data[Object.keys(data)[0]];\n }\n return { data: response, isLoading, error };\n}\n","import React from 'react';\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport VerificationRequest from './verificationrequest';\nimport { INITIAL_VERIFICATION_ITEMS_LIMIT } from '../../../constants';\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\nimport Loading from 'components/Loading';\nimport Error from 'components/Error';\nimport { Typography } from '@mui/material';\nimport { useStyles } from './styles';\nimport { useGetVerificationRequestsWithUserData } from './services';\n\nconst VerificationBoard = () => {\n const classes = useStyles();\n const {\n data: verificationRequests,\n error: verificationRequestsError,\n isLoading: verificationRequestsIsLoading,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n } = useGetVerificationRequestsWithUserData();\n\n return (\n <>\n \n {verificationRequestsIsLoading && (\n
    \n \n
    \n )}\n {verificationRequestsError && (\n
    \n \n
    \n )}\n {verificationRequests && (\n <>\n {verificationRequests.pages.length === 0 ? (\n
    \n \n There are no verification requests at the moment\n \n
    \n ) : (\n <>\n {verificationRequests.pages.map((page) =>\n page.map((item) => (\n \n ))\n )}\n {verificationRequests.pages[verificationRequests.pages.length - 1]\n .length >= INITIAL_VERIFICATION_ITEMS_LIMIT &&\n hasNextPage && (\n \n )}\n \n )}\n \n )}\n \n );\n};\n\nexport default VerificationBoard;\n","import makeStyles from '@mui/styles/makeStyles';\nexport const reportsStyles = makeStyles((theme) => ({\n emptyTextContainer: {\n paddingTop: theme.spacing(18),\n paddingBottom: theme.spacing(18),\n display: 'grid',\n justifyContent: 'center',\n alignItems: 'center',\n marginLeft: theme.spacing(23),\n marginRight: theme.spacing(23),\n },\n emptyText: {\n fontSize: theme.typography.pxToRem(12),\n textAlign: 'center',\n },\n}));\n\nexport const singleReportStyles = makeStyles((theme) => ({\n centeredContainer: {\n textAlign: 'center',\n },\n sectionTitleContainer: {\n background:\n theme.palette.mode === 'light'\n ? `rgb(189 181 204 / 33%) !important`\n : `#40367E !important`,\n display: 'flex',\n alignItems: 'center',\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(1.5),\n },\n sectionTitle: {\n fontSize: theme.typography.pxToRem(14),\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(2),\n paddingTop: theme.spacing(0.5),\n paddingBottom: theme.spacing(0.5),\n },\n container: {\n padding: theme.spacing(2),\n },\n handleText: {\n fontSize: theme.typography.pxToRem(14),\n opacity: 0.42,\n },\n button: {\n marginRight: theme.spacing(2),\n },\n smallText: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.primary,\n opacity: 0.35,\n },\n bullet: {\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n color: theme.palette.text.secondary,\n fontSize: theme.typography.pxToRem(12),\n opacity: 0.35,\n },\n headerText: {\n display: 'flex',\n alignItems: 'center',\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(2),\n },\n verificationBadge: {\n fontSize: theme.typography.pxToRem(10),\n marginLeft: theme.spacing(0.6),\n },\n nameText: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.text.primary,\n fontWeight: 500,\n },\n avatar: {\n marginRight: 0,\n },\n cardRoot: {\n padding: 0,\n },\n cardAction: {\n alignSelf: 'center',\n },\n chip: {\n background: '#BBB2CA',\n borderRadius: 100,\n color: '#fff',\n fontSize: theme.typography.pxToRem(12),\n paddingLeft: theme.spacing(1),\n },\n topContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n resourceContainer: {\n border: '1px solid #B7B5EE',\n paddingTop: theme.spacing(1.5),\n paddingRight: theme.spacing(1.5),\n paddingBottom: theme.spacing(1.5),\n paddingLeft: theme.spacing(1.5),\n borderRadius: 14,\n },\n buttonsContainer: {\n paddingLeft: theme.spacing(6),\n paddingTop: theme.spacing(1.5),\n display: 'flex',\n justifyContent: 'space-between',\n },\n reportContainer: {\n paddingLeft: theme.spacing(6),\n paddingTop: theme.spacing(2),\n },\n reportText: {\n fontSize: theme.typography.pxToRem(14),\n paddingBottom: theme.spacing(2),\n },\n resourceText: {\n fontSize: theme.typography.pxToRem(14),\n paddingTop: theme.spacing(1.5),\n },\n}));\n","import React from 'react';\nimport { Button } from '@mui/material';\nimport { Link as RouterLink } from 'react-router-dom';\nimport { singleReportStyles } from './styles';\nimport { RESOURCE_TYPE } from './constants';\n\nconst Buttons = ({ resourceType, resource, handleApprove, handleRemove }) => {\n const classes = singleReportStyles();\n\n let linkText = `Go to `;\n let link = '';\n let approveText = ' is ok, do nothing';\n let removeText = '';\n\n if (resourceType === RESOURCE_TYPE.POST) {\n linkText += RESOURCE_TYPE.POST;\n link = `/post/${resource.Post.post.post_id}`;\n approveText = 'Post' + approveText;\n removeText = 'Delete Post';\n } else if (resourceType === RESOURCE_TYPE.COMMENT) {\n linkText += `comment's post`;\n if (resource.Comment.commented_post.Post) {\n link = `/post/${resource.Comment.commented_post.Post.post.post_id}`;\n } else if (resource.Comment.commented_post.ThreadPost) {\n link = `/thread/${resource.Comment.commented_post.ThreadPost.master_id}/post/${resource.Comment.commented_post.ThreadPost.post.post.post_id}`;\n } else {\n link = `/post/${resource.Comment.comment.post.post_id}`;\n }\n approveText = 'Comment' + approveText;\n removeText = 'Delete Comment';\n } else if (resourceType === RESOURCE_TYPE.USER) {\n linkText += `account`;\n link = `/u/${resource.User.username}`;\n approveText = 'User' + approveText;\n removeText = 'Remove User';\n } else if (resourceType === RESOURCE_TYPE.MILESTONE) {\n linkText += 'account';\n link = `/u/${resource.Milestone.user.username}`;\n approveText = 'Milestone' + approveText;\n removeText = 'Delete Milestone';\n } else if (resourceType === RESOURCE_TYPE.PROJECT) {\n linkText += 'account';\n link = `/u/${resource.Experience.user.username}`;\n approveText = 'Project' + approveText;\n removeText = 'Delete Project';\n } else if (resourceType === RESOURCE_TYPE.THREAD_POST) {\n linkText += 'thread';\n link = `/thread/${resource.ThreadPost.master_id}`;\n approveText = 'Thread Post' + approveText;\n removeText = 'Delete Thread Post';\n }\n\n return (\n
    \n \n
    \n \n {approveText}\n \n \n
    \n
    \n );\n};\nexport default Buttons;\n","import { Box, Chip, Typography } from '@mui/material';\nimport { Profile, Report, ReportResource } from 'client';\nimport { Milestone, Project } from 'pages/profile/components';\nimport React from 'react';\nimport { useMutation, useQueryClient } from 'react-query';\nimport ExtendedUserCard from '../../../components/Cards/ExtendedUserCard';\nimport ConfirmModal from '../../../components/Dialogs/Confirm';\nimport RemoveModal from '../../../components/Dialogs/Remove';\nimport { PostImageLoader } from '../../../components/ImageLoader';\nimport { formattedDate } from '../../../utils/formatDate';\nimport Buttons from './SingleReportButtons';\nimport { singleReportStyles } from './styles';\nimport {\n findResourceTypeByProperty,\n getReportCategory,\n removeReportInApi,\n} from './utils';\nimport LinkPreview from 'components/Compose/LinkPreview';\nimport { Poll } from 'components/Poll';\nimport { RichTextFormat } from 'components/RichTextFormat';\nimport { RESOURCE_TYPE } from './constants';\n\ntype SingleReportProps = {\n report: Report;\n reportingUser: Profile;\n resource: ReportResource;\n};\n\nconst SingleReport = ({\n report,\n reportingUser,\n resource,\n}: SingleReportProps) => {\n const [approveModal, setApproveModal] = React.useState(false);\n const [rejectModal, setRejectModal] = React.useState(false);\n const [removed, setRemoved] = React.useState(false);\n\n const category = getReportCategory(report);\n const classes = singleReportStyles();\n const date = formattedDate(report.timestamp);\n const resourceType = findResourceTypeByProperty(resource);\n const queryClient = useQueryClient();\n const resourceLoading = false;\n\n // When this mutation succeeds, invalidate any queries for reports\n const removeReport = useMutation(\n (shouldIKeepResource: boolean) => {\n return removeReportInApi(shouldIKeepResource, report.report_id);\n },\n {\n onSuccess: () => {\n setRemoved(true);\n queryClient.invalidateQueries('getReports');\n },\n onError: (error) => {\n console.log({ error });\n },\n }\n );\n\n const resourceTypeName =\n resourceType === RESOURCE_TYPE.THREAD_POST ? 'thread post' : resourceType;\n\n const SingleReportComponent = () => {\n if (removed) {\n return (\n
    \n \n
    \n \n Removed\n \n
    \n
    \n \n This report has been removed\n \n
    \n
    \n
    \n );\n }\n\n return (\n <>\n \n
    \n \n {resourceTypeName}\n \n
    \n
    \n
    \n \n {category && }\n
    \n {resource ? (\n <>\n
    \n \n {report.text}\n \n\n
    \n {report.resource_id}\n {resource.Post && (\n <>\n \n
    \n \n \n \n {!!resource.Post.post.image?.image_id && (\n \n )}\n
    \n {resource.Post.post.extension.Poll && (\n \n )}\n {resource.Post.post.link_metadata &&\n resource.Post.post.link_metadata[0] &&\n resource.Post.post.link_metadata[0][0] && (\n \n )}\n \n )}\n {resource.Comment && (\n <>\n \n
    \n \n \n \n {!!resource.Comment.comment.post.image?.image_id && (\n \n )}\n
    \n \n )}\n {resource.ThreadPost && (\n <>\n \n
    \n \n \n \n {!!resource.ThreadPost.post.post.image?.image_id && (\n \n )}\n {resource.ThreadPost.post.post.extension.Poll && (\n \n )}\n {resource.ThreadPost.post.post.link_metadata &&\n resource.ThreadPost.post.post.link_metadata[0] &&\n resource.ThreadPost.post.post\n .link_metadata[0][0] && (\n \n )}\n
    \n \n )}\n {resource.User && (\n <>\n \n \n )}\n {resource.Milestone && (\n \n )}\n {resource.Experience && (\n \n )}\n
    \n
    \n setApproveModal(true)}\n handleRemove={() => setRejectModal(true)}\n />\n \n ) : null}\n
    \n
    \n {approveModal && (\n setApproveModal(false)}\n confirm={() => {\n removeReport.mutate(false);\n setApproveModal(false);\n }}\n confirmButton=\"Yes, leave it\"\n content={`Are you sure you want to leave this ${resourceTypeName}?\n\n By leaving this ${resourceTypeName} as is you acknowledge it does not represent any kind of risk to distrikt’s community and that it doesn’t violate any rules.\n\n Only this report associated with the ${resourceTypeName} will be resolved.`}\n open={approveModal}\n title=\"Are you sure?\"\n closeButton=\"Cancel\"\n loading={resourceLoading}\n />\n )}\n {rejectModal && (\n setRejectModal(false)}\n confirm={() => {\n setRejectModal(false);\n removeReport.mutate(true);\n }}\n confirmButton=\"Yes, delete\"\n content={`Are you sure you want to delete this ${resourceTypeName}?\n\n Remember that once you perform this action, you cannot undo it and the ${resourceTypeName} will be deleted forever.`}\n title=\"Are you sure?\"\n loading={resourceLoading}\n />\n )}\n \n );\n };\n\n return (\n <>\n \n \n );\n};\n\nexport default SingleReport;\n","import React from 'react';\nimport { Typography } from '@mui/material';\nimport { useInfiniteQuery } from 'react-query';\nimport { useLocation } from 'react-router-dom';\nimport { mainApi } from 'client';\nimport Loading from '../../../components/Loading';\nimport PageHeader from '../../../components/PageHeader/PageHeader';\nimport SingleReport from './SingleReport';\nimport { reportsStyles } from './styles';\nimport { REPORT_ITEMS_LIMIT } from './constants';\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\n\nconst categoryMap = {\n post: 'Post',\n user: 'User',\n comment: 'Comment',\n milestone: 'Milestone',\n project: 'Experience',\n};\n\nconst ReportsBoard = () => {\n const classes = reportsStyles();\n // this refers to post/comment/{user/etc}\n function useQueryParams() {\n const { search } = useLocation();\n return React.useMemo(() => new URLSearchParams(search), [search]);\n }\n const category = useQueryParams().get('category');\n\n const {\n data,\n isLoading,\n error,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n } = useInfiniteQuery(\n 'getPaginatedOptimizedReportFeed',\n ({ pageParam = 0 }) =>\n mainApi.getPaginatedOptimizedReportFeed(\n BigInt(pageParam * REPORT_ITEMS_LIMIT),\n BigInt(REPORT_ITEMS_LIMIT),\n {\n with_categories: [],\n with_types: !category\n ? [\n { Post: null },\n { ThreadPost: null },\n { User: null },\n { Comment: null },\n { Milestone: null },\n { Experience: null },\n ]\n : category === 'post'\n ? [{ Post: null }, { ThreadPost: null }]\n : [{ [categoryMap[category]]: null }],\n }\n ),\n {\n getNextPageParam: (page, pages) => {\n const items = page.Ok.items;\n const pagesTotal = pages.reduce(\n (aggr, item) => [...aggr, ...item.Ok.items],\n []\n );\n return items && items.length >= REPORT_ITEMS_LIMIT\n ? pagesTotal.length\n : undefined;\n },\n }\n );\n\n if (isLoading) {\n return ;\n }\n if (error) {\n return oh no something went wrong...;\n }\n\n return (\n <>\n \n <>\n {data.pages[0].Ok.items.length === 0 ? (\n
    \n \n There are no reports at the moment\n \n
    \n ) : (\n <>\n {data.pages.map((page) =>\n page.Ok.items\n .filter((item) => !item.resource.hasOwnProperty('None'))\n .map((item, itemIndex) => (\n \n ))\n )}\n \n )}\n {hasNextPage && (\n \n )}\n \n \n );\n};\n\nexport default ReportsBoard;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport Loading from '../../components/Loading';\nimport ModerationBoard from './Moderation';\nimport { Switch, Route, useRouteMatch } from 'react-router-dom';\nimport Error from '../../components/Error';\nimport ModerationErrorBoundary from './ModerationErrorBoundary';\nimport VerificationBoard from './verification/verification';\nimport ReportsBoard from './reports/reports';\nimport { useIsUserTrusted } from 'services';\nimport { useQueryClient } from 'react-query';\nimport { Profile } from 'client';\n\nconst Moderation = () => {\n const { path } = useRouteMatch();\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n const { data: isTrusted } = useIsUserTrusted(user?.id);\n\n if (!user || !isTrusted) {\n return ;\n }\n\n return (\n \n \n \n \n \n );\n};\n\nconst ModerationContainer = () => (\n \n \n \n \n }\n >\n \n \n \n);\n\nexport default ModerationContainer;\n","import React from 'react';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass NotificationsErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default NotificationsErrorBoundary;\n","import { Button, ButtonProps } from '@mui/material';\nimport { Profile } from 'client';\nimport { noop } from 'lodash';\nimport React from 'react';\nimport { useQueryClient } from 'react-query';\nimport {\n useIsFollowedByNoInit as useIsFollowedBy,\n useRemoveFollower,\n} from 'services';\nimport { useRemoveFollowerStyles } from './styles';\nimport { UserRemoveIcon } from 'components/icons';\n\ninterface Props extends ButtonProps {\n userId: bigint;\n iconMode?: boolean;\n onSuccess?: (following: boolean) => void;\n}\n\nconst RemoveFollowerButton = ({\n userId,\n color = 'secondary',\n variant = 'text',\n onSuccess = noop,\n iconMode,\n ...props\n}: Props) => {\n const classes = useRemoveFollowerStyles();\n const { data: followed, isLoading: isFollowedLoading } = useIsFollowedBy(\n userId\n );\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n const [removed, setRemoved] = React.useState(false);\n const removeFollowerMutation = useRemoveFollower();\n const loading = isFollowedLoading || removeFollowerMutation.isLoading;\n\n const handleRemoveFollower = async () => {\n if (followed) {\n removeFollowerMutation.mutate(\n {\n userId,\n },\n {\n onSuccess: () => {\n // this is the prop, not the react-query\n onSuccess(false);\n setRemoved(true);\n queryClient.invalidateQueries(['isFollowedBy', userId]);\n },\n }\n );\n }\n };\n\n if (auth?.id !== userId && (followed || removed)) {\n return (\n <>\n }\n >\n {iconMode ? null : removed ? 'Removed' : 'Remove Follower'}\n \n \n );\n } else {\n return
    ;\n }\n};\n\nexport default RemoveFollowerButton;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n title: {\n marginBottom: theme.spacing(2),\n },\n placeholderImage: {\n margin: '0 auto 37px',\n width: 302,\n height: 'auto',\n borderRadius: 56,\n },\n button: {\n marginTop: theme.spacing(8),\n paddingLeft: 45,\n paddingRight: 45,\n },\n subheader: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: 0,\n },\n userInfoContainer: {\n padding: theme.spacing(2),\n },\n header: {\n display: 'block',\n width: '100%',\n padding: '24px 32px',\n\n [theme.breakpoints.only('xs')]: {\n padding: '24px 8px 24px 16px',\n },\n },\n userInfo: {\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n },\n contentContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(5),\n paddingBottom: theme.spacing(3),\n color: theme.palette.colors.ui_06,\n\n [theme.breakpoints.only('xs')]: {\n paddingBottom: theme.spacing(2),\n paddingRight: theme.spacing(1),\n },\n },\n content: {\n marginLeft: theme.spacing(1),\n wordWrap: 'break-word',\n },\n notificationContent: {\n cursor: 'pointer',\n flex: '1 1 0',\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'break-word',\n },\n iconContainer: {\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n paddingLeft: '56px',\n color: theme.palette.colors.ui_07,\n [theme.breakpoints.only('xs')]: {\n paddingLeft: '40px',\n },\n },\n followContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n },\n}));\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { Box, Button, Typography } from '@mui/material';\n\nimport FollowButton from 'components/Buttons/FollowButton';\nimport RemoveFollowerButton from 'components/Buttons/RemoveFollowerButton';\nimport { formattedDate } from 'utils';\nimport { useSetNotificationsStatus } from 'pages/notifications/services';\nimport { useStyles } from './styles';\nimport { NotificationWithDisplayInfo } from 'pages/notifications/types';\nimport { NOTIFICATION_TYPE } from 'pages/notifications/constants';\nimport ExtendedUserCard from 'components/Cards/ExtendedUserCard';\n\ntype IProps = {\n notification: NotificationWithDisplayInfo;\n mobileSize?: boolean;\n};\n\nconst SingleNotification = ({ notification, mobileSize }: IProps) => {\n const classes = useStyles();\n const date = formattedDate(notification.created_at);\n const history = useHistory();\n const setNotificationsStatusMutate = useSetNotificationsStatus();\n const user = {\n username: notification.action_user.username,\n id: notification.action_user.user_id,\n display_name: notification.action_user.display_name,\n image: notification.action_user.profile_image,\n nft_url: notification.action_user?.nft_url,\n badges: notification.action_user.badges,\n principal: notification.action_user.principal,\n };\n\n function handleClick() {\n if (setNotificationsStatusMutate.isLoading) {\n return;\n }\n\n setNotificationsStatusMutate.mutate({\n ids: [notification.notification_id],\n });\n\n history.push(notification.url);\n }\n\n const isExperienceType =\n notification.notification_type ===\n NOTIFICATION_TYPE.EXPERIENCE_COLLABORATOR ||\n notification.notification_type ===\n NOTIFICATION_TYPE.MILESTONE_COLLABORATOR ||\n notification.notification_type === NOTIFICATION_TYPE.EXPERIENCE_EDITED ||\n notification.notification_type === NOTIFICATION_TYPE.MILESTONE_EDITED;\n\n return (\n \n \n \n }\n />\n \n\n \n \n {notification.icon &&\n React.createElement(notification.icon, {\n sx: { fontSize: '16px' },\n })}\n \n\n \n \n {notification.description}\n\n {notification.showContent && (\n \n {notification.resource}\n \n )}\n \n \n \n \n );\n};\n\ninterface INotificationActionsProps {\n classes: any;\n handleClick: () => void;\n isExperienceType: boolean;\n mobileSize: boolean;\n notification: NotificationWithDisplayInfo;\n setNotificationsStatusMutate: any;\n}\n\nfunction NotificationActions({\n classes,\n handleClick,\n isExperienceType,\n mobileSize,\n notification,\n setNotificationsStatusMutate,\n}: INotificationActionsProps) {\n return (\n <>\n \n {notification.notification_type === NOTIFICATION_TYPE.NEW_FOLLOWER ? (\n \n ) : null}\n\n {isExperienceType ? (\n \n {notification.notification_type ===\n NOTIFICATION_TYPE.EXPERIENCE_COLLABORATOR ||\n notification.notification_type ===\n NOTIFICATION_TYPE.MILESTONE_COLLABORATOR\n ? 'Preview'\n : 'Review'}\n \n ) : null}\n\n \n \n \n );\n}\n\nexport default SingleNotification;\n","import {\n NewspaperIcon,\n ProfileIcon,\n FavoriteIcon,\n MessagesDoubleIcon,\n ViewOnIcon,\n RefreshIcon,\n VerificationBadgeIcon,\n} from 'components/icons';\nimport { NOTIFICATION_TYPE } from './constants';\nimport { Profile as IProfile, Notification } from 'client';\nimport { NotificationDisplayInfo } from './types';\nimport { ProfileMentionIcon } from 'components/iconsOld/ProfileMention';\n\nexport function generateNotificationDisplayInfo(\n notification: Notification,\n auth: IProfile\n): NotificationDisplayInfo {\n switch (notification.notification_type) {\n case NOTIFICATION_TYPE.NEW_FOLLOWER:\n return {\n description: 'Started following you',\n showContent: false,\n icon: ProfileIcon,\n url: `/u/${notification.action_user.username}`,\n };\n\n case NOTIFICATION_TYPE.POST_LIKE:\n return {\n description: 'Liked your post',\n showContent: true,\n icon: FavoriteIcon,\n url: `/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.THREAD_POST_LIKE:\n return {\n description: 'Liked your post',\n showContent: true,\n icon: FavoriteIcon,\n url: `/thread/${notification.parent_resource_id}/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.NEW_COMMENT:\n return {\n description: 'Commented on your post',\n showContent: true,\n icon: MessagesDoubleIcon,\n url: `/post/${notification.parent_resource_id}`,\n };\n\n case NOTIFICATION_TYPE.THREAD_POST_COMMENT:\n return {\n description: 'Commented on your post',\n showContent: true,\n icon: MessagesDoubleIcon,\n url: `/thread/${notification.parent_resource_id}/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.COMMENT_LIKE:\n return {\n description: 'Liked your comment',\n showContent: true,\n icon: MessagesDoubleIcon,\n url: `/post/${notification.parent_resource_id}`,\n };\n\n case NOTIFICATION_TYPE.THREAD_POST_COMMENT_LIKE:\n return {\n description: 'Liked your comment',\n showContent: true,\n icon: MessagesDoubleIcon,\n url: `/thread/${notification.parent_resource_id}/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.THREAD_POST_TAG:\n return {\n description: 'Tagged you in a post/comment',\n showContent: true,\n icon: ProfileMentionIcon,\n url: `/thread/${notification.parent_resource_id}/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.TAG: {\n const id =\n Number(notification.parent_resource_id) === 0\n ? notification.resource_id\n : notification.parent_resource_id;\n\n return {\n description: 'Tagged you in a post/comment',\n showContent: true,\n icon: ProfileMentionIcon,\n url: `/post/${id}`,\n };\n }\n\n case NOTIFICATION_TYPE.THREAD_POST_SHARE:\n return {\n description: 'Shared your post',\n showContent: true,\n icon: RefreshIcon,\n url: `/thread/${notification.parent_resource_id}/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.POST_SHARE:\n return {\n description: 'Shared your post',\n showContent: true,\n icon: RefreshIcon,\n url: `/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.ARTICLE_SHARE:\n return {\n description: 'Shared your article',\n showContent: true,\n icon: NewspaperIcon,\n url: `/article/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.VERIFICATION_APPROVED:\n return {\n description: 'Time to celebrate! Your account is officially verified!',\n showContent: false,\n icon: VerificationBadgeIcon,\n url: `/u/${auth?.username}`,\n };\n\n case NOTIFICATION_TYPE.VERIFICATION_REFUSED:\n return {\n description: 'Sorry, we’ve not been able to verify you.',\n showContent: false,\n icon: VerificationBadgeIcon,\n url: `/u/${auth.username}`,\n };\n\n case NOTIFICATION_TYPE.EXPERIENCE_COLLABORATOR:\n return {\n description: 'Tagged you in a project',\n showContent: true,\n icon: ViewOnIcon,\n url: `/u/${notification.action_user.username}#project-${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.MILESTONE_COLLABORATOR:\n return {\n description: 'Tagged you in a milestone',\n showContent: true,\n icon: ViewOnIcon,\n url: `/u/${notification.action_user.username}#milestone-${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.EXPERIENCE_EDITED:\n return {\n description: 'Edited project',\n showContent: true,\n icon: ViewOnIcon,\n url: `/u/${notification.action_user.username}#project-${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.MILESTONE_EDITED:\n return {\n description: 'Edited milestone',\n showContent: true,\n icon: ViewOnIcon,\n url: `/u/${notification.action_user.username}#milestone-${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.EXPERIENCE_SHARE:\n return {\n description: 'Shared your project',\n showContent: true,\n icon: ViewOnIcon,\n url: `/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.MILESTONE_SHARE:\n return {\n description: 'Shared your milestone',\n showContent: true,\n icon: ViewOnIcon,\n url: `/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.COMMENT_REPLY:\n return {\n description: 'Replied to your comment',\n showContent: true,\n icon: MessagesDoubleIcon,\n url:\n notification.resource_id === notification.parent_resource_id ||\n notification.parent_resource_id === BigInt(0)\n ? `/post/${notification.resource_id}`\n : `/thread/${notification.parent_resource_id}/post/${notification.resource_id}`,\n };\n\n case NOTIFICATION_TYPE.COMMENT_REPLY_TAG:\n return {\n description: 'Tagged you in a reply',\n showContent: true,\n icon: MessagesDoubleIcon,\n url:\n notification.resource_id === notification.parent_resource_id ||\n notification.parent_resource_id === BigInt(0)\n ? `/post/${notification.resource_id}`\n : `/thread/${notification.parent_resource_id}/post/${notification.resource_id}`,\n };\n }\n}\n","import { useQueryClient } from 'react-query';\n\nimport { Profile as ProfileType, Notification } from 'client';\nimport { generateNotificationDisplayInfo } from './utils';\nimport { NotificationWithDisplayInfo } from './types';\n\nconst useOrganizeNotifications = (\n notifications = []\n): NotificationWithDisplayInfo[] => {\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n\n return notifications.map((notification: Notification) => {\n return {\n ...notification,\n ...generateNotificationDisplayInfo(notification, auth),\n };\n });\n};\n\nexport default useOrganizeNotifications;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n section: {\n background:\n theme.palette.mode === 'light'\n ? `#EFEDFE !important`\n : `#40367E !important`,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n divider: {\n background: theme.palette.mode === 'light' && '#F5F4F8',\n },\n centeredContainer: {\n paddingTop: theme.spacing(10),\n paddingBottom: theme.spacing(10),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n emptyTextContainer: {\n paddingTop: theme.spacing(18),\n paddingBottom: theme.spacing(18),\n display: 'grid',\n justifyContent: 'center',\n alignItems: 'center',\n marginLeft: theme.spacing(23),\n marginRight: theme.spacing(23),\n },\n emptyText: {\n fontSize: theme.typography.pxToRem(12),\n textAlign: 'center',\n },\n}));\n","import React, { useEffect, useMemo } from 'react';\nimport { Box, Divider, Typography, useMediaQuery } from '@mui/material';\n\nimport LoadMoreButton from '../../components/Buttons/LoadMoreButton';\nimport Loading from '../../components/Loading/Loading';\nimport PageHeader from '../../components/PageHeader/PageHeader';\nimport SingleNotification from './components/SingleNotification';\nimport useOrganizeNotifications from './hooks';\nimport { NOTIFICATIONS_PAGE_SIZE } from './constants';\nimport { Notification } from 'client';\nimport { flattenInfiniteData } from 'utils';\nimport {\n useGetNotifications,\n useGetUnreadNotificationCount,\n useMarkAllAsRead,\n} from './services';\nimport { useStyles } from './styles';\n\nconst Notifications = () => {\n const classes = useStyles();\n const markAllAsReadMutation = useMarkAllAsRead();\n const mobileSize = useMediaQuery((theme) => theme.breakpoints.only('xs'));\n const { data: notificationCounter } = useGetUnreadNotificationCount(\n markAllAsReadMutation.isLoading\n );\n\n const {\n data: pagesdNotifications,\n isFetching,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n refetch,\n } = useGetNotifications(markAllAsReadMutation.isLoading);\n\n const notifications: Array = useMemo(\n () => flattenInfiniteData(pagesdNotifications),\n [pagesdNotifications]\n );\n const formattedNotifications = useOrganizeNotifications(notifications);\n\n useEffect(() => {\n if (!markAllAsReadMutation.isLoading) {\n refetch();\n }\n }, [markAllAsReadMutation.isLoading, notificationCounter, refetch]);\n\n return (\n <>\n markAllAsReadMutation.mutate()}\n sx={{ paddingRight: mobileSize ? '8px' : '16px' }}\n />\n\n {isFetching && (\n
    \n \n
    \n )}\n\n <>\n \n {formattedNotifications.length > 0\n ? formattedNotifications.map((notification, index) => (\n
    \n \n \n
    \n ))\n : !isFetching && (\n
    \n \n Nothing{' '}\n \n 😞\n \n \n \n If you interact with others, they might return the favor.\n \n
    \n )}\n
    \n\n {formattedNotifications.length >= NOTIFICATIONS_PAGE_SIZE &&\n hasNextPage && (\n \n )}\n \n \n );\n};\n\nexport default Notifications;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport NotificationsErrorBoundary from './NotificationsErrorBoundary';\nimport Loading from '../../components/Loading';\nimport Notifications from './Notifications';\n\nconst NotificationsContainer = () => (\n \n \n \n \n }\n >\n \n \n \n);\n\nexport default NotificationsContainer;\n","import { Select, FormControl } from '@mui/material';\nimport { ArrowDownIcon } from 'components/icons';\nimport React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { ValueOf } from 'types';\nimport { SORT_ORDER } from '../constants';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: '140px !important',\n marginLeft: theme.spacing(-1.75),\n '& .Mui-focused .MuiOutlinedInput-notchedOutline': {\n border: 'none !important',\n },\n '& .MuiInputBase-formControl': {\n minWidth: 163,\n },\n },\n select: {\n fontSize: 14,\n border: 'none !important',\n\n '&:focus': {\n backgroundColor: 'transparent',\n },\n },\n icon: {\n height: 14,\n width: 14,\n top: 'unset',\n marginRight: theme.spacing(0.5),\n color: theme.palette.text.primary,\n },\n list: {\n padding: 0,\n },\n}));\nexport const SortSelect = ({\n defaultValue,\n value,\n onChange,\n ...other\n}: {\n defaultValue: ValueOf;\n value: ValueOf;\n children?: React.ReactNode;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange: (evt: any) => void;\n}) => {\n const classes = useStyles();\n return (\n \n \n \n );\n};\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n card: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n content: {\n padding: 0,\n },\n composeContainer: {\n paddingTop: 0,\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(1),\n [theme.breakpoints.down('sm')]: {\n paddingLeft: theme.spacing(2),\n },\n },\n divider: {\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(0.5),\n },\n centeredContainer: {\n paddingTop: theme.spacing(10),\n paddingBottom: theme.spacing(10),\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n commentBorder: {\n borderLeft: `2px solid ${theme.palette.colors.ui_04}`,\n marginLeft: theme.spacing(4),\n marginTop: theme.spacing(3),\n },\n commentNoBorder: {\n marginLeft: theme.spacing(4),\n marginTop: theme.spacing(3),\n [theme.breakpoints.down('sm')]: {\n marginLeft: theme.spacing(2),\n },\n },\n firstCommentBorder: {\n marginTop: theme.spacing(4),\n },\n}));\n","import React, { useContext } from 'react';\nimport { useEffect } from 'react';\nimport { useLocalStorage } from 'react-use';\nimport { useRouteMatch } from 'react-router-dom';\nimport { MenuItem, Box, Typography } from '@mui/material';\n\nimport CreateComment from 'pages/post/components/Comment/CreateComment';\nimport Error from 'components/Error/Error';\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\nimport Loading from 'components/Loading';\nimport { Alert } from 'components';\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport SingleComment from 'pages/post/components/Comment/SingleComment';\nimport WarningModal from 'components/Dialogs/Warning';\nimport { OptimizedPostV2, OptimizedThreadPost } from 'client';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { PostItem } from './components';\nimport { SORT_ORDER } from './constants';\nimport { SortSelect } from './components/SortSelect';\nimport { fromIcOpt, toIcVariant } from 'utils';\nimport { useStyles } from './styles';\nimport {\n useGetPaginatedOptimizedCommentForResourceId,\n useGetPostOrThreadPost,\n} from './services';\nimport { OpenDistriktContext } from 'providers';\n\nexport interface RouteParams {\n id: string;\n postId: string;\n}\n\nfunction isThreadPostFn(\n item: OptimizedPostV2 | OptimizedThreadPost\n): item is OptimizedThreadPost {\n return typeof (item as OptimizedThreadPost)?.master_id !== 'undefined';\n}\n\nconst Post = () => {\n const classes = useStyles();\n const [showWarningAlert, setShowWarningAlert] = React.useState(false);\n const [successPostDelete, setSuccessPostDelete] = React.useState(false);\n const [successCommentDelete, setSuccessCommentDelete] = React.useState(false);\n const [showCommentReplyPostId, setShowCommentReplyPostId] = React.useState(\n BigInt(0)\n );\n\n // id is a post id if theadId doesn't exist, otherwise it's a thread master id\n const {\n params: { id, postId: threadPostId },\n } = useRouteMatch();\n const [commentsSort, setCommentsSort] = useLocalStorage(\n 'app.sort_order',\n SORT_ORDER.DESCENDING\n );\n const invalidSortOrder = !Object.values(SORT_ORDER).includes(commentsSort);\n\n React.useEffect(() => {\n window.scrollTo(0, 0);\n }, []);\n\n useEffect(() => {\n // used in case values in local storage are changed manually\n if (invalidSortOrder) {\n setCommentsSort(SORT_ORDER.DESCENDING);\n }\n }, [commentsSort, invalidSortOrder, setCommentsSort]);\n\n const {\n data: item,\n isLoading: itemIsLoading,\n error: itemError,\n } = useGetPostOrThreadPost(id, threadPostId);\n\n const isThreadPost = isThreadPostFn(item);\n const itemData = isThreadPost ? item?.post : item;\n const itemKey = isThreadPost ? 'OptimizedThreadPost' : 'OptimizedPost';\n const postIdForComments = itemData?.post.post_id;\n\n const { mode } = useContext(OpenDistriktContext);\n\n const {\n data: comments,\n isLoading: commentIsLoading,\n error: commentError,\n fetchNextPage,\n isFetchingNextPage,\n hasNextPage,\n } = useGetPaginatedOptimizedCommentForResourceId(\n BigInt(postIdForComments || 0),\n commentsSort,\n invalidSortOrder || !postIdForComments\n );\n\n // TODO use initialData to show the post while loading comments\n if (itemIsLoading || commentIsLoading) {\n return (\n \n \n \n );\n }\n\n if (itemError || commentError || successPostDelete) {\n return (\n <>\n \n {successPostDelete && (\n {}}\n />\n )}\n \n );\n }\n\n const author = fromIcOpt(\n isThreadPost ? item?.post.author_profile : item?.author_profile\n );\n\n return (\n <>\n \n {author && (\n \n )}\n\n {item && (\n
    \n setSuccessPostDelete(true)}\n />\n
    \n )}\n
    \n {author && mode === 'User' && (\n \n )}\n {\n setCommentsSort(evt.target.value);\n }}\n >\n \n \n Oldest to Newest\n \n \n \n \n Newest to Oldest\n \n \n \n
    \n {/* saving for use in threads */}\n {/*
    */}\n
    \n {comments &&\n comments.pages.map((page) =>\n page.map((comment) => (\n \n setSuccessCommentDelete(true)}\n threadMasterId={isThreadPost ? item.master_id : undefined}\n postId={postIdForComments}\n onShowCommentReply={setShowCommentReplyPostId}\n showCommentReplyPostId={showCommentReplyPostId}\n />\n
    \n ))\n )}\n
    \n {hasNextPage && (\n fetchNextPage()}\n isFetching={isFetchingNextPage}\n />\n )}\n
    \n {showWarningAlert && (\n {\n setShowWarningAlert(false);\n }}\n content={\n 'Something has gone wrong with loading the comments, please try again later'\n }\n />\n )}\n {successPostDelete && (\n setSuccessPostDelete(false)}\n />\n )}\n {successCommentDelete && (\n setSuccessCommentDelete(false)}\n />\n )}\n
    \n \n );\n};\n\nexport default Post;\n","import React from 'react';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass PostErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default PostErrorBoundary;\n","import React from 'react';\nimport { Switch, Route, useRouteMatch } from 'react-router-dom';\nimport Post from './Post';\nimport { Box } from '@mui/material';\nimport Loading from '../../components/Loading/Loading';\nimport PostErrorBoundary from './PostErrorBoundary';\n\ninterface RouteParams {\n id: string;\n}\n\nconst PostDetails = () => {\n const { path } = useRouteMatch();\n\n return (\n \n \n \n );\n};\n\n// eslint-disable-next-line react/display-name\nexport default () => (\n \n \n \n \n }\n >\n \n \n \n);\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useFollowStyles = makeStyles((theme) => ({\n mainContainer: {\n position: 'relative',\n marginLeft: theme.spacing(4),\n [theme.breakpoints.down('sm')]: {\n marginLeft: theme.spacing(3),\n },\n },\n tabs: {\n marginRight: theme.spacing(3),\n },\n flexContainer: {\n borderBottomColor: theme.palette.colors.ui_04,\n '& .MuiButtonBase-root': {\n borderBottomColor: theme.palette.colors.ui_04,\n },\n },\n}));\n\nexport const useFollowersStyles = makeStyles((theme) => ({\n emptyList: {\n textAlign: 'center',\n marginTop: theme.spacing(30),\n },\n centeredContainer: {\n textAlign: 'center',\n },\n emptyText: {\n fontSize: theme.typography.pxToRem(12),\n },\n listItem: {\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n justifyContent: 'space-between',\n },\n}));\n\nexport const useFollowingStyles = makeStyles((theme) => ({\n emptyList: {\n textAlign: 'center',\n marginTop: theme.spacing(30),\n },\n avatar: {\n width: 48,\n height: 48,\n },\n centeredContainer: {\n textAlign: 'center',\n },\n emptyText: {\n fontSize: theme.typography.pxToRem(12),\n },\n listItem: {\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n justifyContent: 'space-between',\n },\n}));\n","import React, { useContext } from 'react';\nimport { useInfiniteQuery, useQueryClient } from 'react-query';\nimport { useRouteMatch } from 'react-router-dom';\nimport { Box, Typography } from '@mui/material';\nimport LoadMoreButton from '../../../components/Buttons/LoadMoreButton';\nimport Loading from '../../../components/Loading/Loading';\nimport api, { Profile } from 'client';\nimport { PROFILE_FOLLOWS_ITEMS_LIMIT } from '../constants';\nimport { sendHeartbeat } from '../../../utils/heartbeat';\nimport { useFollowersStyles } from './styles';\nimport { useGetUserByUsername } from 'services';\nimport { UserList } from 'components';\nimport { flattenInfiniteData } from 'utils';\nimport { useMediaQuery } from '@mui/material';\nimport { OpenDistriktContext } from 'providers';\n\ninterface RouteParams {\n tabName: string;\n username: string;\n}\n\nconst Followers = () => {\n const {\n params: { username },\n } = useRouteMatch();\n const classes = useFollowersStyles();\n const { data: current } = useGetUserByUsername(username);\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n\n const fetchUserFollowers = ({ pageParam = 0 }) => {\n const followers = api.getFollowersWithMutualData(\n current?.id,\n BigInt(pageParam),\n BigInt(PROFILE_FOLLOWS_ITEMS_LIMIT)\n );\n sendHeartbeat();\n return followers;\n };\n\n const {\n data: pagedUsers,\n error,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n isLoading,\n } = useInfiniteQuery(\n ['getFollowersWithMutualData', current?.id],\n fetchUserFollowers,\n {\n getNextPageParam: (_, pages) =>\n pages.length * PROFILE_FOLLOWS_ITEMS_LIMIT,\n onSuccess: () => {\n queryClient.invalidateQueries(['getFollowCounts', current?.id]);\n },\n }\n );\n const usersObject = React.useMemo(() => flattenInfiniteData(pagedUsers), [\n pagedUsers,\n ]);\n const users = usersObject.map((user) => user.profile);\n const mobileSize = useMediaQuery((theme) => theme.breakpoints.only('xs'));\n\n const { mode } = useContext(OpenDistriktContext);\n\n if (error) {\n return (\n \n Unable to load followers.\n \n );\n }\n\n return (\n <>\n \n {isLoading ? (\n \n \n \n ) : users.length > 0 ? (\n <>\n \n\n {users.length >= PROFILE_FOLLOWS_ITEMS_LIMIT && hasNextPage && (\n \n )}\n \n ) : (\n
    \n {auth?.id === current?.id ? (\n <>\n \n No one is following you yet.\n \n \n The more active you are, the faster you'll get followers.\n \n \n ) : (\n <>\n \n {current.display_name} doesn’t have any followers yet!\n \n \n Be the first to follow.\n \n \n )}\n
    \n )}\n
    \n \n );\n};\n\nexport default Followers;\n","import React from 'react';\nimport { useInfiniteQuery, useQueryClient } from 'react-query';\nimport { useRouteMatch } from 'react-router-dom';\nimport { Box, Typography } from '@mui/material';\nimport { useMediaQuery } from '@mui/material';\nimport LoadMoreButton from 'components/Buttons/LoadMoreButton';\nimport Loading from 'components/Loading/Loading';\nimport api, { Profile } from 'client';\nimport { sendHeartbeat } from 'utils/heartbeat';\nimport { useFollowingStyles } from './styles';\nimport { useGetUserByUsername } from 'services';\nimport { PROFILE_FOLLOWS_ITEMS_LIMIT } from '../constants';\nimport { UserList } from 'components';\nimport { flattenInfiniteData } from 'utils';\n\ninterface RouteParams {\n tabName: string;\n username: string;\n}\n\nconst Following = () => {\n const {\n params: { username },\n } = useRouteMatch();\n const classes = useFollowingStyles();\n const queryClient = useQueryClient();\n const { data: current } = useGetUserByUsername(username);\n const auth = queryClient.getQueryData(['getSelf']);\n\n const fetchUserFollowing = ({ pageParam = 0 }) => {\n const following = api.getFollowingsWithMutualData(\n current.id,\n BigInt(pageParam),\n BigInt(PROFILE_FOLLOWS_ITEMS_LIMIT)\n );\n sendHeartbeat();\n return following;\n };\n\n const {\n data: pagedUsers,\n error,\n fetchNextPage,\n hasNextPage,\n isFetchingNextPage,\n isLoading,\n } = useInfiniteQuery(\n ['getFollowingsWithMutualData', current?.id],\n fetchUserFollowing,\n {\n getNextPageParam: (_, pages) =>\n pages.length * PROFILE_FOLLOWS_ITEMS_LIMIT,\n onSuccess: () => {\n queryClient.invalidateQueries(['getFollowCounts', current?.id]);\n },\n }\n );\n const usersObject = React.useMemo(() => flattenInfiniteData(pagedUsers), [\n pagedUsers,\n ]);\n const users = usersObject.map((user) => user.profile);\n const mobileSize = useMediaQuery((theme) => theme.breakpoints.only('xs'));\n if (error) {\n return (\n \n Unable to load followers.\n \n );\n }\n\n return (\n <>\n \n {isLoading ? (\n \n \n \n ) : users.length > 0 ? (\n <>\n \n\n {users.length >= PROFILE_FOLLOWS_ITEMS_LIMIT && hasNextPage && (\n \n )}\n \n ) : (\n
    \n {auth?.id === current.id ? (\n <>\n \n You're not following anyone yet.\n \n \n Get out there and make some friends!\n \n \n ) : (\n \n {current.display_name} is not following anyone yet!\n \n )}\n
    \n )}\n
    \n \n );\n};\n\nexport default Following;\n","import { IconButton, Tab, Tabs } from '@mui/material';\nimport { TabContext, TabPanel } from '@mui/lab';\nimport { Link, useRouteMatch } from 'react-router-dom';\nimport { useGetCurrentProfileFollowCount } from 'services';\nimport PageHeader from '../../../components/PageHeader/PageHeader';\nimport Followers from './Followers';\nimport Following from './Following';\nimport { useFollowStyles } from './styles';\nimport React, { useCallback, useMemo } from 'react';\nimport { Share2Icon } from 'components/icons';\nimport { Dialog } from 'components';\nimport { Profile, ProfileLiteWithPreferredWallet } from 'client';\nimport { downloadCSVFile } from 'utils';\nimport { useGetAllFollowerLiteData } from '../services/follower';\nimport { useQueryClient } from 'react-query';\n\ninterface RouteParams {\n tabName: string;\n username: string;\n}\n\nconst Follows = () => {\n const classes = useFollowStyles();\n const {\n params: { tabName, username },\n } = useRouteMatch();\n\n const [activeTab, setActiveTab] = React.useState(tabName);\n const [showExportModal, setShowExportModal] = React.useState(false);\n\n const handleChangeTab = (_: never, value: string) => {\n setActiveTab(value);\n };\n\n // handles the case where the back button changes the route but didn't update the active tab\n React.useEffect(() => {\n setActiveTab(tabName);\n }, [tabName]);\n\n const { data: followCounts } = useGetCurrentProfileFollowCount(username);\n\n const isFollowersTab = tabName === 'followers';\n\n const csvHeaders = useMemo(\n () => [\n { label: 'Username', key: 'username' },\n { label: 'Display Name', key: 'displayName' },\n { label: 'Wallet Address', key: 'walletAddress' },\n { label: 'Wallet Type', key: 'walletType' },\n ],\n []\n );\n\n const [isExporting, setIsExporting] = React.useState(false);\n\n const exportFollowers = useCallback(\n (followers: Array) => {\n const csvData = followers.map(\n (profileLite: ProfileLiteWithPreferredWallet) => {\n const wallet =\n profileLite.preferred_wallet_address.length > 0\n ? profileLite.preferred_wallet_address[0]\n : undefined;\n\n const walletType = wallet ? Object.keys(wallet)[0] : undefined;\n const walletAddress = wallet ? Object.values(wallet)[0] : undefined;\n\n return {\n username: profileLite.username,\n displayName: profileLite.display_name,\n walletAddress,\n walletType,\n };\n }\n );\n\n const date = new Date();\n const dateString =\n date.getDate() +\n '-' +\n (date.getMonth() + 1) +\n '-' +\n date.getFullYear() +\n ' ' +\n date.getHours() +\n '-' +\n date.getMinutes();\n\n downloadCSVFile(\n csvData,\n false,\n csvHeaders,\n ';',\n '\"',\n `Followers export ${dateString}`\n );\n },\n [csvHeaders]\n );\n\n const onExportCompleted = useCallback(() => {\n setIsExporting(false);\n setShowExportModal(false);\n }, []);\n\n const { data: followers, isStale } = useGetAllFollowerLiteData({\n enabled: isExporting,\n onSettled: onExportCompleted,\n onSuccess: (data: Array) =>\n exportFollowers(data),\n });\n\n const onExportFollowers = useCallback(() => {\n setIsExporting(true);\n if (!isStale) {\n exportFollowers(followers);\n onExportCompleted();\n }\n }, [exportFollowers, followers, isStale, onExportCompleted]);\n\n const queryClient = useQueryClient();\n const auth = queryClient.getQueryData(['getSelf']);\n\n return (\n <>\n \n
    \n {auth?.username === username && isFollowersTab && (\n setShowExportModal(true)}\n sx={{\n position: 'absolute',\n right: '26px',\n zIndex: 10,\n }}\n >\n \n \n )}\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n {showExportModal && (\n setShowExportModal(false)}\n closeOnSubmit={false}\n onSubmit={onExportFollowers}\n ctaText=\"Export\"\n message=\"This will download a list of your followers with their primary wallet addresses (if entered) in CSV format.\"\n title=\"Export Followers Wallets\"\n disabled={isExporting}\n cancelColor=\"primary\"\n loading={isExporting}\n />\n )}\n
    \n \n );\n};\n\nexport default Follows;\n","import { Typography } from '@mui/material';\nimport { Principal } from '@dfinity/principal';\nimport { Dialog } from 'components';\nimport CopyButton from 'components/Buttons/CopyButton';\nimport Loading from 'components/Loading/Loading';\nimport React, { Dispatch, SetStateAction } from 'react';\nimport { useStyles } from './styles';\nimport DistriktTextField from 'components/TextInput/TextField';\nimport { InfoIcon } from 'components/icons';\nimport { principalToAccountIdentifier } from 'pages/profile/NftDropzone/utils/nftUtils';\nimport { isValidWalletAddress } from 'utils';\nimport { getIdentity } from 'utils/auth';\n\ntype NftTransferDialogProps = {\n onSubmit: () => void;\n setTransferTokenId: Dispatch>;\n transferTokenId: string;\n setTransferIndex: Dispatch>;\n transferIndex: string;\n transferToAddress: string;\n setTransferToAddress: Dispatch>;\n setWalletAddress: Dispatch>;\n loading: boolean;\n transferDone: boolean;\n setTransferDone: Dispatch>;\n transferError: boolean;\n setTransferError: Dispatch>;\n};\n\ntype NftAddressError = 'NoError' | 'InvalidAddress' | 'MyAddress';\ntype NftAddressErrorToMessageMapping = {\n [error in NftAddressError]: string;\n};\n\nconst addressToErrorMapping: NftAddressErrorToMessageMapping = {\n NoError: '',\n InvalidAddress: 'Please enter a valid destination address',\n MyAddress: 'Check the address - it looks like you’re sending to yourself!',\n};\n\nconst NftTransferDialog = ({\n onSubmit,\n transferTokenId,\n setTransferTokenId,\n transferToAddress,\n setTransferToAddress,\n setWalletAddress,\n loading,\n transferDone,\n setTransferDone,\n transferError,\n setTransferError,\n}: NftTransferDialogProps) => {\n const classes = useStyles();\n const [errorMessage] = React.useState('');\n const [page, setPage] = React.useState(1);\n const [open, setOpen] = React.useState(true);\n const [addressError, setAddressError] = React.useState(\n 'NoError'\n );\n\n const closeHandler = () => {\n setTransferToAddress('');\n setTransferDone(false);\n setTransferError(false);\n setPage(1);\n setTransferTokenId('');\n setOpen(false);\n };\n\n if (loading) {\n return (\n <>\n {open && (\n \n
    \n \n
    \n \n )}\n \n );\n }\n if (transferError) {\n return (\n <>\n {' '}\n {open && (\n \n
    \n \n oh no, something went wrong!{' '}\n \n 😵\n \n \n
    \n \n )}\n \n );\n }\n if (transferDone) {\n return (\n <>\n {open && (\n \n
    \n \n Transfer successful!{' '}\n \n 🎉\n \n \n
    \n \n )}\n \n );\n }\n return (\n <>\n {open && (\n <>\n {page === 1 ? (\n {\n setPage(2);\n }}\n >\n {errorMessage && (\n \n {errorMessage}\n \n )}\n
    \n {\n setAddressError('NoError');\n\n const address = e.target.value;\n setTransferToAddress(address);\n\n const myIdentity = await getIdentity();\n const myPrincipal = myIdentity.getPrincipal();\n const myWalletAddress = principalToAccountIdentifier(\n myPrincipal\n );\n\n let walletAddress;\n if (isValidWalletAddress(address)) {\n walletAddress = address;\n\n if (address === myWalletAddress) {\n setAddressError('MyAddress');\n }\n } else {\n try {\n const principal = Principal.fromText(address);\n walletAddress = principalToAccountIdentifier(principal);\n\n if (address === myPrincipal.toText()) {\n setAddressError('MyAddress');\n }\n } catch (e) {\n setAddressError('InvalidAddress');\n }\n }\n setWalletAddress(walletAddress);\n }}\n value={transferToAddress}\n error={addressError !== 'NoError'}\n errorText={addressToErrorMapping[addressError]}\n name={'transfer-to-address'}\n fullWidth={true}\n />\n
    \n
    \n \n \n NFTs transferred out to another wallet/distrikt account will\n no longer be seen here.\n \n
    \n \n ) : (\n \n {errorMessage && (\n \n {errorMessage}\n \n )}\n \n Please confirm you are about to send the NFT with this ID:\n \n \n
    \n \n \n
    \n \n To this Stoic, Plug, or distrikt address (please check the\n wallet address!):\n \n \n \n If you can't see your NFT in your external wallet, follow\n wallet instructions to enter the distrikt NFT canister ID:{' '}\n {process.env.REACT_APP_NFT_CANISTER_ID} and add it. Your NFT\n should appear after refreshing. NFTs sent to a distrikt\n Principal ID should be visible as soon as the transfer has\n completed.\n \n \n )}\n \n )}\n \n );\n};\n\nexport default NftTransferDialog;\n","import { Typography } from '@mui/material';\nimport { Alert, Dialog } from 'components';\nimport CopyButton from 'components/Buttons/CopyButton';\nimport Loading from 'components/Loading/Loading';\nimport React, { Dispatch, SetStateAction } from 'react';\nimport { useStyles } from './styles';\nimport TextField from 'components/TextInput/TextField';\nimport { InfoIcon, WarningIcon } from 'components/icons';\n\ntype ShowPrincipalDialogProps = {\n myPrincipal: string;\n closeHandler: () => void;\n};\n\nconst ShowPrincipalDialog = ({\n myPrincipal,\n closeHandler,\n}: ShowPrincipalDialogProps) => {\n const classes = useStyles();\n const [\n principalWarningDialogOpen,\n setPrincipalWarningDialogOpen,\n ] = React.useState(true);\n const [principalShowDialogOpen, setPrincipalShowDialogOpen] = React.useState(\n false\n );\n const [successAlert, setSuccessAlert] = React.useState(false);\n const [\n confirmShowPrincipalText,\n setConfirmShowPrincipalText,\n ] = React.useState('');\n return (\n <>\n {principalWarningDialogOpen && (\n {\n setPrincipalWarningDialogOpen(false);\n setConfirmShowPrincipalText('');\n closeHandler();\n }}\n onCancel={() => {\n setPrincipalWarningDialogOpen(false);\n setConfirmShowPrincipalText('');\n closeHandler();\n }}\n onSubmit={() => {\n setPrincipalShowDialogOpen(true);\n setPrincipalWarningDialogOpen(false);\n }}\n closeOnSubmit={false}\n ctaText=\"View Principal ID\"\n title=\"View Principal ID\"\n disabled={confirmShowPrincipalText !== 'I understand'}\n cancelColor=\"primary\"\n >\n
    \n \n
    \n \n Right now, you can use this Principal ID ONLY to receive\n NFTs from distrikt's PODs Collection, either back into\n distrikt from a Stoic or Plug Wallet OR from another distrikt\n account.\n \n \n Any other action will result in LOSING the item\n transfered… forever, yes, FOREVER.\n \n
    \n
    \n
    \n setConfirmShowPrincipalText(e.target.value)}\n value={confirmShowPrincipalText}\n name={'reveal-principal'}\n fullWidth\n lengthLimit={100}\n placeholder='Type \"I understand\" here'\n />\n \n )}\n {principalShowDialogOpen && (\n {\n navigator.clipboard.writeText(myPrincipal);\n setSuccessAlert(true);\n setPrincipalShowDialogOpen(false);\n }}\n title=\"View Principal ID\"\n onClose={() => {\n setPrincipalShowDialogOpen(false);\n closeHandler();\n }}\n fullWidth\n >\n \n Principal ID\n \n \n \n )}\n {successAlert ? (\n {\n setSuccessAlert(null);\n closeHandler();\n }}\n />\n ) : null}\n \n );\n};\n\nexport default ShowPrincipalDialog;\n","import React from 'react';\nimport { Typography, Button } from '@mui/material';\nimport { useMutation, useQuery, useQueryClient } from 'react-query';\nimport { useTheme } from '@mui/material/styles';\nimport SingleNft from './SingleNft';\nimport PageHeader from '../../../components/PageHeader/PageHeader';\nimport Loading from '../../../components/Loading';\nimport NftTransferDialog from './NftTransferDialog';\nimport { getMyPrincipal, loadNfts, transferNft } from './utils/nftUtils';\nimport { useStyles } from './styles';\nimport ShowPrincipalDialog from './ShowPrincipalDialog';\n\nconst NftDropzone = () => {\n const theme = useTheme();\n const queryClient = useQueryClient();\n const { data, isLoading, error } = useQuery(\n 'nftDropzone',\n async () => await loadNfts()\n );\n\n const transferMyNft = async ({ transferIndex, transferToAddress }) => {\n return transferNft(transferToAddress, transferIndex);\n };\n const mutation = useMutation(transferMyNft, {\n onSuccess: () => {\n queryClient.invalidateQueries('nftDropzone');\n setTransferDone(true);\n },\n onError: () => {\n setTransferError(true);\n },\n });\n\n const {\n data: myPrincipal,\n isLoading: principalLoading,\n error: principalError,\n } = useQuery('currentPrincipal', async () => await getMyPrincipal());\n\n const [transferTokenId, setTransferTokenId] = React.useState('');\n const [transferIndex, setTransferIndex] = React.useState(null);\n const [transferToAddress, setTransferToAddress] = React.useState('');\n const [walletAddress, setWalletAddress] = React.useState('');\n const [transferDone, setTransferDone] = React.useState(false);\n const [transferError, setTransferError] = React.useState(false);\n const [showPrincipalDialog, setShowPrincipalDialog] = React.useState(false);\n const classes = useStyles();\n\n return (\n <>\n \n
    \n
    \n \n Principal ID:\n \n {myPrincipal && (\n {`${myPrincipal.slice(\n 0,\n 12\n )}...${myPrincipal.slice(-9)}`}\n )}\n
    \n setShowPrincipalDialog(true)}\n >\n View Principal ID\n \n
    \n {transferTokenId && (\n \n mutation.mutate({ transferIndex, transferToAddress: walletAddress })\n }\n setTransferTokenId={setTransferTokenId}\n transferTokenId={transferTokenId}\n setTransferIndex={setTransferIndex}\n transferIndex={transferIndex}\n setTransferToAddress={setTransferToAddress}\n setWalletAddress={setWalletAddress}\n transferToAddress={transferToAddress}\n loading={mutation.isLoading}\n transferDone={transferDone}\n setTransferDone={setTransferDone}\n transferError={transferError}\n setTransferError={setTransferError}\n />\n )}\n\n {isLoading && (\n
    \n {' '}\n
    \n )}\n {error && (\n
    \n oh no something went wrong\n
    \n )}\n
    \n {data &&\n data.length > 0 &&\n data.map((nft) => (\n \n ))}\n
    \n {!isLoading && data && data.length === 0 && (\n
    \n \n \n You have no NFTs airdropped to you yet!\n \n
    \n )}\n {showPrincipalDialog && (\n setShowPrincipalDialog(false)}\n myPrincipal={myPrincipal}\n />\n )}\n \n );\n};\nexport default NftDropzone;\n","import NftDropzone from './NftDropzone';\nexport default NftDropzone;\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n coverImage: {\n width: '100%',\n height: 209,\n objectFit: 'cover',\n cursor: 'pointer',\n },\n emptyCoverImage: {\n width: '100%',\n height: 209,\n objectFit: 'cover',\n background: theme.palette.action.disabledBackground,\n },\n text14: {\n fontSize: theme.typography.pxToRem(14),\n },\n username: {\n fontSize: theme.typography.pxToRem(12),\n opacity: 0.3,\n },\n headerContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n avatar: {\n width: 104,\n height: 104,\n marginBottom: 0,\n borderWidth: theme.spacing(0.5),\n borderStyle: 'solid',\n borderColor: theme.palette.colors.ui_01,\n },\n cardHeaderAction: {\n margin: 'auto',\n },\n section: {\n padding: 0,\n },\n cardContent: {\n display: 'flex',\n alignItems: 'center',\n paddingBottom: theme.spacing(1),\n paddingTop: theme.spacing(1),\n },\n sectionTitle: {\n textTransform: 'uppercase',\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 500,\n },\n tabsContainer: {\n marginTop: theme.spacing(4),\n marginLeft: theme.spacing(4),\n marginRight: theme.spacing(4),\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n },\n },\n tab: {\n paddingTop: theme.spacing(0.5),\n paddingBottom: theme.spacing(0.5),\n fontSize: theme.typography.pxToRem(12),\n fontWeight: 400,\n textTransform: 'none',\n minHeight: 32,\n height: 32,\n borderRadius: 6,\n color: `${theme.palette.text.primary} !important`,\n },\n centeredContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n container: {\n margin: `32px 36px 0 35px`,\n width: 'calc(100% - 592px)',\n },\n header: {\n paddingTop: theme.spacing(1),\n paddingBottom: 0,\n },\n avatarRow: {\n alignItems: 'center',\n display: 'flex',\n position: 'relative',\n marginTop: -52,\n marginLeft: 28,\n zIndex: 5,\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n },\n },\n profileInfoContainer: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n tabPanelAbout: {\n padding: 0,\n },\n tabPanelActivity: {\n paddingTop: theme.spacing(1.5),\n paddingBottom: theme.spacing(1.5),\n paddingLeft: 0,\n paddingRight: 0,\n },\n skillsLabel: {\n marginRight: theme.spacing(1),\n fontSize: theme.typography.pxToRem(14),\n },\n sectionContent: {\n paddingTop: 0,\n },\n sectionActions: {\n padding: theme.spacing(2),\n paddingTop: theme.spacing(1),\n justifyContent: 'center',\n },\n allButton: {\n fontSize: theme.typography.pxToRem(12),\n fontWeight: 500,\n },\n dots: {\n fontSize: theme.typography.pxToRem(8),\n opacity: 1,\n margin: 0,\n\n '& .slick-dots': {\n position: 'relative',\n bottom: 'unset',\n },\n\n '& .slick-dots li button:before': {\n fontSize: theme.typography.pxToRem(8),\n color: theme.palette.colors.ui_03,\n opacity: 1,\n margin: 0,\n },\n '& li.slick-active button::before': {\n color: theme.palette.colors.ui_04,\n opacity: 1,\n margin: 0,\n },\n '& li': {\n margin: 0,\n\n '& button': {\n padding: '4px',\n },\n\n '& button::before\"': {\n color: theme.palette.colors.ui_03,\n opacity: 1,\n margin: 0,\n },\n },\n },\n nameContainer: {\n paddingTop: theme.spacing(1.5),\n marginBottom: theme.spacing(2),\n },\n userInfo: {\n marginLeft: theme.spacing(4),\n marginRight: theme.spacing(4),\n\n [theme.breakpoints.only('xs')]: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n },\n },\n icon: {\n height: 14,\n width: 14,\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : `#fff`,\n },\n calendarIcon: {\n height: 20,\n width: 20,\n color: theme.palette.text.primary,\n opacity: 0.45,\n },\n coverContainer: {\n position: 'relative',\n },\n coverIconButton: {\n position: 'absolute',\n top: theme.spacing(2),\n right: theme.spacing(2),\n background: theme.palette.colors.ui_07,\n opacity: '50%',\n height: theme.spacing(5),\n width: theme.spacing(5),\n },\n anchorOriginBottomRightCircle: {\n right: 20,\n bottom: 20,\n },\n verificationIcon: {\n width: 10,\n height: 10,\n },\n teamBadge: {\n height: 14,\n width: 14,\n marginLeft: theme.spacing(0.75),\n color: theme.palette.primary.main,\n },\n titleContainer: {\n display: 'flex',\n alignItems: 'baseline',\n marginTop: 28,\n wordBreak: 'break-word',\n },\n slider: {\n '& div.slick-track': {\n width: 'max-content !important',\n },\n },\n navigationContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n marginTop: 0,\n marginBottom: 0,\n },\n navigationButton: {\n alignSelf: 'center',\n padding: theme.spacing(1),\n },\n navigationIcon: {\n height: 14,\n width: 14,\n },\n navigationText: {\n fontSize: theme.typography.pxToRem(12),\n color: theme.palette.primary.main,\n opacity: 0.46,\n },\n pinnedTitle: {\n paddingLeft: theme.spacing(0.75),\n paddingRight: theme.spacing(0.75),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(2),\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 600,\n textTransform: 'uppercase',\n },\n memberSince: {\n display: 'flex',\n paddingTop: theme.spacing(2),\n color: theme.palette.colors.ui_06,\n },\n calendar: {\n height: theme.spacing(2),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(-0.5),\n },\n profileHeaderText: {\n marginTop: theme.spacing(0.5),\n color: theme.palette.colors.ui_06,\n },\n followContainer: {\n marginTop: theme.spacing(2),\n display: 'flex',\n },\n follow: {\n display: 'flex',\n marginRight: 30,\n },\n followNumber: {\n marginRight: 8,\n },\n nftButton: {\n textDecoration: 'none',\n },\n nftBanner: {\n padding: 16,\n marginTop: theme.spacing(4),\n borderRadius: 8,\n flexDirection: 'row',\n justifyContent: 'space-between',\n display: 'flex',\n border: `1px solid ${theme.palette.colors.ui_04}`,\n backgroundColor: theme.palette.colors.ui_02,\n [theme.breakpoints.down('sm')]: {\n flexDirection: 'column',\n },\n },\n nftBannerText: {\n marginTop: 'auto',\n marginBottom: 'auto',\n marginLeft: theme.spacing(1),\n [theme.breakpoints.down('md')]: {\n paddingBottom: theme.spacing(1.5),\n },\n },\n}));\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n root: {},\n icon: {\n height: 14,\n width: 14,\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : `#fff`,\n },\n input: {\n display: 'none',\n },\n button: {\n background: theme.palette.colors.ui_01,\n height: theme.spacing(5),\n width: theme.spacing(5),\n },\n}));\n","import React, { useState } from 'react';\nimport { IconButton, SvgIcon } from '@mui/material';\n\nimport WarningModal from 'components/Dialogs/Warning';\nimport { Camera, EditIcon } from 'components/icons';\nimport { useStyles } from './styles';\nimport ProfileImage from '../ProfileImage';\n\ninterface IUploadPhotoButtonProps {\n children?: React.ReactNode;\n}\n\nfunction UploadPhotoButton({}: IUploadPhotoButtonProps) {\n const classes = useStyles();\n const [profileImageDialog, setProfileImageDialog] = useState(false);\n const [errorMessage, setErrorMessage] = useState('');\n\n return (\n <>\n
    \n \n
    \n\n {profileImageDialog && (\n setProfileImageDialog(false)}\n cancelButton=\"Cancel\"\n confirmButton=\"Save\"\n title=\"Edit your profile image\"\n />\n )}\n setErrorMessage('')}\n content={errorMessage}\n />\n \n );\n}\n\nexport default UploadPhotoButton;\n","import React, { useRef, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { format } from 'date-fns';\nimport Box from '@mui/material/Box';\nimport Slider from 'react-slick';\nimport { Link as RouterLink } from 'react-router-dom';\nimport {\n CardHeader,\n Typography,\n CardMedia,\n IconButton,\n Badge,\n Button,\n Link,\n} from '@mui/material';\n\nimport Error from '../../components/Error';\nimport Milestone from './components/Milestone';\nimport PageHeader from '../../components/PageHeader/PageHeader';\nimport UserAvatar from '../../components/UserAvatar/UserAvatar';\nimport { CalendarIcon, EditIcon, CakeIcon } from '../../components/icons';\nimport { useGetUserByUsername, useGetSelf, useIsFollowedBy } from 'services';\nimport { HeartbeatView } from '../../utils/heartbeat';\nimport { Loading, Alert } from 'components';\nimport { useGetFollowCount } from 'services';\nimport {\n ProfileActions,\n ProfileInfo,\n ProfileTabs,\n UpdateCoverModal,\n WalletsList,\n} from './components';\nimport { ProfileImageLoader } from '../../components/ImageLoader';\nimport { renderUserBadge } from '../../utils/moderationShortcuts';\nimport { useGetPinnedMilestones } from './services/milestones';\nimport { useStyles } from './styles';\nimport { useUpdateCoverImage } from './services/profile';\nimport UploadPhotoButton from './components/UploadPhotoButton';\nimport { useQueryClient } from 'react-query';\nimport { Profile as APIProfile } from 'client';\nimport FullImageModal from 'components/Dialogs/FullImage';\n\nconst months = {\n 1: 'January',\n 2: 'February',\n 3: 'March',\n 4: 'April',\n 5: 'May',\n 6: 'June',\n 7: 'July',\n 8: 'August',\n 9: 'September',\n 10: 'October',\n 11: 'November',\n 12: 'December',\n};\n\nconst sliderSettings = {\n dots: true,\n arrows: false,\n infinite: false,\n accessibility: true,\n speed: 500,\n slidesToShow: 2,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: 672,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n },\n },\n ],\n};\n\nconst Profile = () => {\n const classes = useStyles();\n const sliderRef = useRef();\n const [coverModal, setCoverModal] = useState(false);\n const [successMilestoneDelete, setSuccessMilestoneDelete] = useState(false);\n const [coverModalOpened, setCoverModalOpened] = useState(false);\n const { username } = useParams>();\n\n const queryClient = useQueryClient();\n const authUser = queryClient.getQueryData([\n 'getSelf',\n ]);\n\n const { data: user, isLoading: isUserLoading } = useGetUserByUsername(\n username\n );\n const { data: pinned } = useGetPinnedMilestones(user?.id);\n const { data: isFollowed } = useIsFollowedBy(user?.id);\n const updateCoverImageMutate = useUpdateCoverImage();\n const { data: followCounts, isFetched } = useGetFollowCount(user?.id);\n\n const isOwnProfile = user && authUser && authUser.id === user?.id;\n\n function handleSaveCover(newCover: string, oldCover?: string) {\n updateCoverImageMutate.mutate(\n {\n newCover,\n oldCover,\n userName: user?.username,\n },\n {\n onSuccess: () => setCoverModal(false),\n }\n );\n }\n\n const calculateMemberSince = (userId: bigint): string => {\n // converting the bigInt to a number first creates a miscalculation, so do that last\n const timestamp = new Date(\n Number((userId >> BigInt(22)) + BigInt(1618358400000))\n );\n const month = format(timestamp, 'LLLL');\n return `${month} ${timestamp.getFullYear()}`;\n };\n\n if (isUserLoading) {\n return ;\n }\n\n if (!user && !isUserLoading) {\n return ;\n }\n\n return (\n <>\n \n \n
    \n
    \n \n {({ src }) => (\n <>\n setCoverModalOpened(true)}\n />\n {coverModalOpened && (\n setCoverModalOpened(false)}\n nftImageUrl={src}\n />\n )}\n \n )}\n \n\n {isOwnProfile && (\n setCoverModal(true)}\n >\n \n \n )}\n
    \n\n \n \n :
    }\n classes={{\n anchorOriginBottomRightCircular:\n classes.anchorOriginBottomRightCircle,\n }}\n >\n \n \n \n \n \n\n
    \n \n {`${user.display_name}`}\n {renderUserBadge(user, { className: classes.teamBadge })}\n
    \n }\n subheader={\n
    \n \n @\n {`${user.username}${\n isFollowed && !isOwnProfile ? ' is following you' : ''\n }`}\n \n\n
    \n \n \n {isFetched ? followCounts.followed.toString() : '~'}\n \n \n Following\n \n \n \n \n {isFetched ? followCounts.followers.toString() : '~'}\n \n \n Followers\n \n \n
    \n
    \n \n \n {`Member since ${calculateMemberSince(user.id)}`}\n \n
    \n {user.birthday?.day > 0 && user.birthday?.month > 0 && (\n
    \n \n \n {`Birthday on ${user.birthday.day} ${\n months[user.birthday.month]\n }`}\n \n
    \n )}\n
    \n }\n />\n\n \n\n \n\n {isOwnProfile && (\n
    \n \n Check out your collection of NFTs on Distrikt!{' '}\n \n\n \n \n \n
    \n )}\n\n {pinned.length > 0 && (\n \n \n Pinned Milestones\n \n\n \n {pinned.map((pinnedMilestone) => (\n \n setSuccessMilestoneDelete(true)}\n />\n \n ))}\n \n \n )}\n
    \n\n
    \n \n
    \n
    \n\n {coverModal && isOwnProfile && (\n setCoverModal(false)}\n />\n )}\n {successMilestoneDelete && (\n setSuccessMilestoneDelete(false)}\n />\n )}\n \n );\n};\n\nexport default Profile;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\nimport Error from '../../components/Error';\nimport logger from '../../utils/logger';\n\ninterface Props {\n children: React.ReactNode;\n match: {\n params: {\n username: string;\n };\n };\n}\n\ninterface State {\n hasError: boolean;\n}\n\nclass ProfileErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, errorInfo) {\n // You can also log the error to an error reporting service\n logger.error(error);\n }\n\n componentDidUpdate(prevProps: Readonly) {\n const {\n match: { params },\n } = this.props;\n if (params.username !== prevProps.match.params.username) {\n this.setState({ hasError: false });\n }\n }\n\n render() {\n if (this.state.hasError) {\n // You can render any custom fallback UI\n return ;\n }\n\n return this.props.children;\n }\n}\n\nexport default withRouter(ProfileErrorBoundary);\n","import React, { useContext } from 'react';\nimport { Switch, Route, useRouteMatch, Redirect } from 'react-router-dom';\nimport { useQueryClient } from 'react-query';\nimport { Box } from '@mui/material';\n\nimport Follows from './Follows';\nimport Loading from '../../components/Loading/Loading';\nimport NftDropzone from './NftDropzone';\nimport Profile from './Profile';\nimport ProfileErrorBoundary from './ProfileErrorBoundary';\nimport { Profile as ProfileType } from 'client';\nimport { OpenDistriktContext } from 'providers';\nimport { ConditionalRoute } from 'components';\n\nexport interface RouteParams {\n username: string;\n}\n\nconst ProfileDetails = ({ username }: { username: string }) => {\n const { path } = useRouteMatch();\n const queryClient = useQueryClient();\n const user = queryClient.getQueryData(['getSelf']);\n\n const { mode } = useContext(OpenDistriktContext);\n\n return (\n \n \n \n \n \n );\n};\n\nexport default function ProfileDetailsContainer() {\n const {\n params: { username },\n } = useRouteMatch();\n\n return (\n \n \n \n \n }\n >\n \n \n \n );\n}\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { Box } from '@mui/material';\n\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport { GlobalSearch } from 'pages/app/components';\nimport { HeartbeatView } from 'utils/heartbeat';\n\nfunction Search() {\n const history = useHistory();\n\n return (\n <>\n \n \n \n history.push(`/u/${user}`)}\n />\n \n \n \n );\n}\n\nexport default Search;\n","import React from 'react';\nimport { Box } from '@mui/material';\n\nimport Loading from '../../components/Loading';\nimport Search from './Search';\nimport HomeErrorBoundary from 'pages/home/HomeErrorBoundary';\n\nconst SearchContainer = () => (\n \n \n \n \n }\n >\n \n \n \n);\n\nexport default SearchContainer;\n\nexport * from './Search';\n","import makeStyles from '@mui/styles/makeStyles';\n\nexport const useStyles = makeStyles((theme) => ({\n sectionTitleContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n sectionTitle: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n paddingTop: theme.spacing(4),\n },\n sectionFirstTitle: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n paddingBottom: theme.spacing(2),\n paddingTop: theme.spacing(4),\n [theme.breakpoints.down('sm')]: {\n paddingTop: theme.spacing(2),\n },\n },\n radioButtonContainer: {\n marginLeft: theme.spacing(3),\n },\n label: {\n minWidth: 280,\n },\n section: {\n display: 'flex',\n flexDirection: 'row',\n },\n verticalSection: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n },\n button: {\n marginLeft: theme.spacing(3),\n marginTop: theme.spacing(2),\n },\n link: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n paddingTop: theme.spacing(2),\n textDecoration: 'none',\n color: theme.palette.colors.primary,\n alignSelf: 'flex-start',\n },\n resourcesContainer: {\n display: 'flex',\n flexDirection: 'column',\n },\n themeContainer: {\n display: 'flex',\n flexDirection: 'row',\n },\n themeOption: {\n marginLeft: theme.spacing(3),\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n cursor: 'pointer',\n },\n selectedTheme: {\n borderRadius: theme.spacing(1),\n marginBottom: theme.spacing(1),\n display: 'inline-block',\n position: 'relative',\n '&::after': {\n position: 'absolute',\n display: 'block',\n content: '\"\"',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n border: `5px solid ${theme.palette.colors.primary}`,\n borderRadius: theme.spacing(1),\n },\n },\n notSelectedTheme: {\n borderRadius: theme.spacing(1),\n marginBottom: theme.spacing(1),\n display: 'inline-block',\n },\n icon: {\n width: theme.spacing(12),\n height: 'auto',\n display: 'block',\n borderRadius: theme.spacing(1),\n },\n root: {\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(2),\n },\n [theme.breakpoints.up('md')]: {\n position: 'fixed',\n },\n },\n}));\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport React, { useContext, useMemo, useState } from 'react';\nimport { Link as RouterLink } from 'react-router-dom';\nimport { useLocalStorage } from 'react-use';\nimport { Button, Link, Typography } from '@mui/material';\nimport PageHeader from 'components/PageHeader/PageHeader';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { useStyles } from './styles';\nimport { ColorModeContext } from 'providers/ColorModeContext';\nimport { AutoIcon, DarkIcon, LightIcon } from 'components/icons';\nimport { Dialog, LoginSignupBox } from 'components';\nimport TextField from 'components/TextInput/TextField';\nimport { useDeleteMyAccount } from './services';\nimport { logout as acLogout } from 'utils/auth';\nimport { OpenDistriktContext } from 'providers';\n\nconst SettingsPage = () => {\n const classes = useStyles();\n const colorMode = useContext(ColorModeContext);\n const deleteMyAccountMutation = useDeleteMyAccount();\n const [themeLS, setThemeLS] = useLocalStorage('app.theme', 'system');\n const [theme, setTheme] = useState(themeLS);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const [confirmDeleteDialogOpen, setConfirmDeleteDialogOpen] = useState(false);\n const [confirmDeleteText, setConfirmDeleteText] = useState('');\n\n const { mode } = useContext(OpenDistriktContext);\n\n const guestView = useMemo(() => mode !== 'User', [mode]);\n\n const logout = async () => {\n await acLogout();\n window.location.href = '/';\n };\n\n const handleThemeChange = (theme) => {\n setTheme(theme);\n colorMode.setColorMode(theme);\n setThemeLS(theme);\n };\n\n return (\n <>\n \n \n
    \n
    \n \n Choose your theme:\n \n
    \n
    \n handleThemeChange('light')}\n >\n \n \n
    \n \n Light\n \n
    \n handleThemeChange('dark')}\n >\n \n \n
    \n \n Dark\n \n
    \n handleThemeChange('system')}\n >\n \n \n \n \n Auto\n \n \n \n\n {!guestView && (\n \n
    \n \n Account:\n \n
    \n
    \n \n Log out\n \n setDeleteDialogOpen(true)}\n className={classes.button}\n >\n Delete Account\n \n
    \n
    \n )}\n\n
    \n \n Additional resources:\n \n
    \n
    \n \n Cookie policy\n \n \n Terms of Use\n \n \n FAQ\n \n
    \n\n {guestView && (\n \n Not logged in or don’t have an account yet?\n \n }\n sx={{\n paddingLeft: 3,\n paddingRight: 3,\n paddingTop: 4,\n }}\n />\n )}\n \n\n {deleteDialogOpen && (\n {\n setDeleteDialogOpen(false);\n setConfirmDeleteText('');\n }}\n onSubmit={() => setConfirmDeleteDialogOpen(true)}\n ctaText=\"Delete Account\"\n title=\"Delete Account\"\n disabled={confirmDeleteText !== 'I understand'}\n warning\n cancelColor=\"primary\"\n >\n \n Are you sure you want to delete your account? By confirming this\n action you will delete all your data and your account.\n \n \n You won't be able to access your account anymore.\n \n \n Nobody will be able to see anything you posted in the past.\n \n \n There is no way to recover your account if this action is completed.\n \n\n setConfirmDeleteText(e.target.value)}\n value={confirmDeleteText}\n name={'confirm-delete'}\n fullWidth\n lengthLimit={100}\n placeholder='Type \"I understand\" here'\n />\n \n )}\n {confirmDeleteDialogOpen && (\n {\n deleteMyAccountMutation.mutate();\n logout();\n }}\n title=\"Account Deleted!\"\n message=\"Your account and your data has been deleted. You will now be logged out. Thank you for being part of distrikt!\"\n onClose={() => {\n deleteMyAccountMutation.mutate();\n logout();\n }}\n />\n )}\n \n );\n};\n\nexport default SettingsPage;\n","import { mainApi } from 'client';\nimport { useMutation } from 'react-query';\n\nexport function useDeleteMyAccount() {\n return useMutation(() => mainApi.deleteMyAccount());\n}\n","import { createActor } from '../client';\nimport { getIdentity } from 'utils/auth';\nimport { useCallback, useContext } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { OpenDistriktContext } from 'providers';\n\nconst useSignupCallback = () => {\n const history = useHistory();\n const { recomputeMode } = useContext(OpenDistriktContext);\n\n return useCallback(\n async (values) => {\n try {\n const identity = getIdentity();\n const api = createActor(identity);\n\n await api.signupV3({\n title: 'None',\n username: values.username,\n link: 'None',\n education: 'None',\n description: {\n user_tags: [],\n hashtags: [],\n text: '',\n },\n company: 'None',\n display_name: values.display_name.trim(),\n location: 'None',\n wallets_are_public: [false],\n birthday: {\n day: 0,\n month: 0,\n },\n preferred_wallet: {\n None: null,\n },\n wallet_addresses: [],\n });\n\n await recomputeMode(true);\n history.push(`/u/${values.username}`);\n } catch (err) {\n console.log(err);\n }\n },\n [history, recomputeMode]\n );\n};\n\nexport default useSignupCallback;\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Loading from 'components/Loading/Loading';\nimport { parseImagesFromArticleText } from '../../../utils/parseRichText';\n\nconst useStyles = makeStyles((theme) => ({\n resourcesContainer: {\n padding: theme.spacing(1),\n paddingBottom: 0,\n display: 'flex',\n flexDirection: 'column',\n lineHeight: 1.5,\n\n '& span': {\n color: theme.palette.primary.main,\n marginBottom: theme.spacing(2),\n fontSize: theme.typography.pxToRem(14),\n },\n '& p': {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n '& h4': {\n marginTop: theme.spacing(1.5),\n marginBottom: theme.spacing(1),\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 600,\n textTransform: 'uppercase',\n },\n '& h5': {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 600,\n },\n },\n}));\n\nconst getContent = async () => {\n const content = await fetch('/static/termsofuse.txt').then((response) =>\n response.text()\n );\n return content;\n};\n\nconst TermsOfUseContent = () => {\n const classes = useStyles();\n const [content, setContent] = React.useState('');\n const [loading, setLoading] = React.useState(false);\n\n React.useEffect(() => {\n const loadContentAsync = async () => {\n setLoading(true);\n const newContent = await getContent();\n setLoading(false);\n if (newContent) {\n setContent(newContent);\n }\n };\n loadContentAsync();\n }, []);\n\n if (loading) return ;\n\n return (\n <>\n
    \n {parseImagesFromArticleText(content)}\n
    \n \n );\n};\n\nexport default TermsOfUseContent;\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { Button, Dialog, DialogContent, DialogActions } from '@mui/material';\nimport TermsOfUseContent from '../../pages/static/TermsOfUse/content';\nimport DialogHeader from './DialogHeader';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n minWidth: 400,\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n button: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n actions: {\n justifyContent: 'space-between',\n display: 'flex',\n alignItems: 'center',\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(5),\n paddingRight: theme.spacing(5),\n },\n content: {\n fontSize: theme.typography.pxToRem(12),\n },\n contentContainer: {\n padding: theme.spacing(4),\n paddingTop: 0,\n borderTop: 'none',\n },\n}));\n\ninterface Props {\n open?: boolean;\n confirm: any;\n confirmButton: string;\n close: any;\n closeButton?: string;\n}\n\nconst Buttons = ({ confirm, confirmButton, close, closeButton }: Props) => {\n const classes = useStyles();\n\n return (\n \n close()}\n className={classes.button}\n >\n {closeButton}\n \n confirm()}\n className={classes.button}\n >\n {confirmButton}\n \n \n );\n};\n\nconst TermsOfUseModal = ({\n open,\n close,\n confirm,\n confirmButton,\n closeButton = 'Cancel',\n}: Props) => {\n const classes = useStyles();\n\n return (\n close()}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n className={classes.dialog}\n maxWidth=\"sm\"\n >\n close()} />\n\n \n \n \n\n \n \n );\n};\n\nexport default TermsOfUseModal;\n","import {\n Button,\n Dialog,\n DialogContent,\n TextField,\n Typography,\n} from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport React, { useRef, useEffect, Dispatch, SetStateAction } from 'react';\nimport DialogHeader from '../../components/Dialogs/DialogHeader';\n\nconst useStyles = makeStyles((theme) => ({\n dialog: {\n '& .MuiDialog-paper': {\n borderRadius: 20,\n maxWidth: 400,\n position: 'inherit',\n },\n '& .MuiDialogTitle-root': {\n color: theme.palette.text.secondary,\n display: 'flex',\n justifyContent: 'space-between',\n },\n },\n mainContainer: {\n paddingRight: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n paddingTop: 0,\n borderTop: 'none',\n },\n canvas: {\n border: `1px solid ${theme.palette.grey[400]}`,\n borderRadius: theme.spacing(2),\n paddingLeft: theme.spacing(2),\n width: '100%',\n },\n text14: {\n fontSize: theme.typography.pxToRem(14),\n },\n title: {\n fontSize: theme.typography.pxToRem(15),\n fontWeight: 'bold',\n marginBottom: theme.spacing(2),\n marginTop: theme.spacing(1),\n },\n inputField: {\n marginBottom: theme.spacing(2),\n },\n button: {\n width: theme.spacing(15),\n },\n buttonContainer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n marginTop: theme.spacing(6),\n },\n errorText: {\n color: theme.palette.secondary.main,\n },\n}));\n\ntype CaptchaProps = {\n onSubmit: () => void;\n setOpen: Dispatch>;\n};\n\nconst randomDigit = (limit) => Math.ceil(Math.random() * limit);\n// initial values\nlet firstDigit = randomDigit(10);\n// this ensures the answer isn't negative- negative numbers don't convert well to string\nlet secondDigit = randomDigit(firstDigit);\nlet negativeFactor = Math.random() < 0.5 ? -1 : 1;\nlet solution = firstDigit + secondDigit * negativeFactor;\n\n// change values for subsequent tests\nfunction spinDigits() {\n firstDigit = randomDigit(10);\n secondDigit = randomDigit(firstDigit);\n negativeFactor = Math.random() < 0.5 ? -1 : 1;\n solution = firstDigit + secondDigit * negativeFactor;\n}\n\n// pass useless prop to properly rerender new problem\nconst Canvas = ({ tries }) => {\n const classes = useStyles();\n const canvasRef = useRef(null);\n const code = `${firstDigit} ${\n negativeFactor > 0 ? '+' : '-'\n } ${secondDigit} = `;\n\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas) return;\n const context = canvas.getContext('2d');\n context.clearRect(0, 0, canvas.width, canvas.height);\n context.font = '48px seriph';\n context.fillText(code, 90, 50);\n }, [code]);\n\n return (\n <>\n \n \n );\n};\n\nconst CaptchaDialog = ({ onSubmit, setOpen }: CaptchaProps) => {\n const classes = useStyles();\n const [inputValue, setInputValue] = React.useState('');\n const [errorMessage, setErrorMessage] = React.useState('');\n const [tries, setTries] = React.useState(1);\n\n return (\n <>\n setOpen(false)}\n aria-labelledby=\"simple-modal-title\"\n aria-describedby=\"simple-modal-description\"\n className={classes.dialog}\n >\n setOpen(false)} />\n \n \n PLEASE ANSWER\n \n {errorMessage && (\n \n {errorMessage}\n \n )}\n \n \n Enter your answer here:\n \n setInputValue(e.target.value)}\n />\n
    \n setOpen(false)}\n className={classes.button}\n variant=\"outlined\"\n >\n Cancel\n \n {\n if (inputValue === solution.toString()) {\n setOpen(false);\n onSubmit();\n } else {\n // generate new problem and keep track of tries, both to rerender canvas, and to maybe lock a bot out if we want\n spinDigits();\n setTries(tries + 1);\n setErrorMessage('Incorrect answer, try again');\n }\n }}\n className={classes.button}\n variant=\"contained\"\n disabled={!inputValue.length}\n >\n Submit\n \n
    \n \n \n \n );\n};\n\nexport default CaptchaDialog;\n","import React from 'react';\nimport { Formik, Form, Field } from 'formik';\nimport makeStyles from '@mui/styles/makeStyles';\nimport {\n Container,\n Grid,\n Button,\n Typography,\n Box,\n Checkbox,\n Link,\n SvgIcon,\n} from '@mui/material';\nimport { useTheme } from '@mui/material/styles';\nimport { TextField } from 'formik-material-ui';\nimport api from '../../client';\nimport useSignupCallback from '../../hooks/useSignupCallback';\nimport { AlertTriangle } from '../../components/icons';\nimport Warning from '../../components/icons/Warning';\nimport TermsOfUseModal from '../../components/Dialogs/TermsOfUse';\nimport CaptchaDialog from './CaptchaDialog';\n\nconst useStyles = makeStyles((theme) => ({\n wrapper: {\n background: '#fff url(/assets/signup_bg.jpg) center center no-repeat',\n backgroundSize: 'cover',\n minHeight: '100vh',\n width: '100%',\n },\n backdrop: {\n zIndex: theme.zIndex.drawer + 1,\n },\n root: {\n height: '100vh',\n display: 'flex',\n alignItems: 'center',\n [theme.breakpoints.down('md')]: {\n justifyContent: 'center',\n },\n },\n button: {\n minWidth: 225,\n },\n usernameWarningRow: {\n color: theme.palette.primary.light,\n fontSize: theme.typography.pxToRem(12),\n },\n centralLineContainer: {\n [theme.breakpoints.down('md')]: {\n display: 'none',\n },\n },\n centralLine: {\n width: 3,\n background: '#2E165D',\n height: '100%',\n margin: 'auto',\n opacity: 0.22,\n },\n grid: {\n [theme.breakpoints.down('md')]: {\n maxWidth: 400,\n textAlign: 'center',\n },\n },\n gridElement: {\n [theme.breakpoints.down('md')]: {\n paddingTop: theme.spacing(5),\n paddingBottom: theme.spacing(5),\n },\n },\n topText: {\n marginBottom: theme.spacing(5),\n [theme.breakpoints.down('md')]: {\n marginBottom: theme.spacing(2),\n },\n },\n topContainer: {\n maxWidth: 400,\n },\n logo: {\n width: '100%',\n maxWidth: 192,\n height: 'auto',\n },\n title: {\n fontSize: theme.typography.pxToRem(18),\n color: '#0C0220',\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n alert: {\n width: 16,\n height: 16,\n marginRight: theme.spacing(2),\n },\n alertText: {\n fontSize: theme.typography.pxToRem(12),\n },\n checkbox: {\n padding: 0,\n marginRight: theme.spacing(1.5),\n backgroundColor: 'transparent',\n '&.Mui-checked, &:hover': {\n backgroundColor: 'transparent !important',\n },\n '&.Mui-checked path, &.Mui-checked:hover path': {\n fill: theme.palette.colors.primary,\n },\n },\n errorIcon: {\n height: 16,\n width: 16,\n margin: 2,\n },\n label: {\n fontSize: theme.typography.pxToRem(14),\n display: 'initial',\n alignItems: 'center',\n },\n termsLink: {\n cursor: 'pointer',\n },\n errorContainer: {\n display: 'flex',\n alignItems: 'center',\n color: theme.palette.secondary.main,\n },\n error: {\n fontSize: theme.typography.pxToRem(12),\n display: 'initial',\n alignItems: 'center',\n },\n termsContainer: {\n display: 'flex',\n alignItems: 'center',\n },\n labelContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n}));\n\ninterface SignupForm {\n username: string;\n display_name: string;\n}\n\nconst USERNAME_REGEX = /^[a-zA-Z0-9._-]+$/;\n\nconst Signup = () => {\n const theme = useTheme();\n const classes = useStyles();\n const signup = useSignupCallback();\n const usernamesCache = React.useRef({});\n const [checkedTerms, setCheckedTerms] = React.useState(false);\n const [checkedError, setCheckedError] = React.useState(false);\n const [termsModal, setTermsModal] = React.useState(false);\n const [captchaModal, setCaptchaModal] = React.useState(false);\n\n const checkUsername = React.useCallback(async (username) => {\n if (usernamesCache.current[username]) {\n return usernamesCache.current[username];\n }\n\n try {\n usernamesCache.current[username] = await api.getUserByUsername(username);\n\n return usernamesCache.current[username];\n } catch (err) {\n usernamesCache.current[username] = null;\n\n return usernamesCache.current[username];\n }\n }, []);\n\n const beforeSubmit = () => {\n if (!checkedTerms) {\n setCheckedError(true);\n } else {\n setCaptchaModal(true);\n }\n };\n\n return (\n
    \n \n \n \n \n \n \n \n \n \n Welcome to distrikt. It's great to have you here.\n \n \n Complete your registration and you'll soon be making new\n connections, sharing your thoughts, and building your\n community.\n \n \n \n \n \n
    \n \n \n \n Let's give you a name!\n \n {\n const errors: Partial = {};\n\n if (!values.username) {\n errors.username = 'This field is mandatory';\n } else if (values.username.length > 20) {\n errors.username =\n 'The username cannot be longer than 20 characters';\n } else if (values.username.length < 2) {\n errors.username =\n 'The username cannot be shorter than 2 characters';\n } else if (!/[a-zA-Z]/.test(values.username)) {\n errors.username =\n 'The username must contain at least one letter';\n } else if (!USERNAME_REGEX.test(values.username)) {\n errors.username = 'The username contains illegal characters';\n } else if (values.username.toLowerCase().includes('distrikt')) {\n errors.username = `The username cannot contain 'distrikt'`;\n } else if (await checkUsername(values.username)) {\n errors.username = 'That username is taken. Try another';\n }\n\n if (!values.display_name.trim()) {\n errors.display_name = 'This field is mandatory';\n } else if (values.display_name.length > 50) {\n errors.display_name =\n 'The display name cannot be longer than 50 characters';\n }\n\n return errors;\n }}\n initialValues={\n {\n username: '',\n display_name: '',\n } as SignupForm\n }\n onSubmit={async (values) => {\n await signup(values);\n }}\n >\n {({ isSubmitting, submitForm, values, errors, handleChange }) => (\n
    \n \n {captchaModal && (\n \n )}\n \n \n Choose a username\n \n \n {values.username.length}/{20}\n \n
    \n }\n placeholder=\"Type here\"\n maxLength={20}\n fullWidth\n InputLabelProps={{\n shrink: true,\n style: {\n width: '100%',\n transform: 'translate(0, 1.5px) scale(1)',\n },\n }}\n disabled={isSubmitting}\n onChange={(e) => {\n if (e.target.value.length <= 20) handleChange(e);\n }}\n />\n \n \n \n \n Choose your name carefully, it can't be changed.\n \n \n \n \n \n Choose a display name\n \n \n {values.display_name.length}/{50}\n \n
    \n }\n placeholder=\"Type here\"\n maxLength={50}\n fullWidth\n InputLabelProps={{\n shrink: true,\n style: {\n width: '100%',\n transform: 'translate(0, 1.5px) scale(1)',\n },\n }}\n disabled={isSubmitting}\n onChange={(e) => {\n if (e.target.value.length <= 50) handleChange(e);\n }}\n />\n \n \n \n Don't worry, you can change this one anytime.\n \n \n \n
    \n {\n if (checkedError && !checkedTerms) {\n setCheckedError(false);\n }\n setCheckedTerms(!checkedTerms);\n }}\n name=\"terms\"\n color=\"primary\"\n size=\"small\"\n classes={{\n root: classes.checkbox,\n }}\n />\n \n {`I've read and understood the `}\n setTermsModal(true)}\n className={classes.termsLink}\n >\n terms of use\n \n \n
    \n {checkedError && (\n \n
    \n \n \n \n
    \n \n Please take a few moments to read through distrikt\n terms of use before continuing. Thank you!\n \n
    \n
    \n
    \n )}\n
    \n {\n beforeSubmit();\n }}\n disabled={\n !values.username ||\n !!errors.username ||\n !values.display_name ||\n !!errors.display_name ||\n isSubmitting\n }\n >\n Let's Start\n \n \n )}\n \n \n \n \n {termsModal && (\n setTermsModal(false)}\n confirm={() => {\n setCheckedTerms(true);\n setCheckedError(false);\n setTermsModal(false);\n }}\n confirmButton=\"I understand\"\n open={termsModal}\n />\n )}\n \n );\n};\n\nexport default Signup;\n","import React from 'react';\nimport { useParams } from 'react-router-dom';\nimport { useQuery } from 'react-query';\nimport { Box } from '@mui/material';\n\nimport Error from 'components/Error/Error';\nimport api from 'client';\nimport { HeartbeatView } from 'utils/heartbeat';\nimport { Loading, PageHeader } from 'components';\nimport { Thread } from './components';\nimport { extractApiDataOrThrow } from 'utils';\n\nfunction ThreadPage() {\n const { id } = useParams>();\n const { data: postItem, isLoading, error } = useQuery(\n ['getThread', id],\n async () => {\n const res = await api.getThread(BigInt(id));\n\n return extractApiDataOrThrow(res);\n }\n );\n\n if (isLoading) {\n return (\n \n \n \n );\n }\n\n if (error) {\n return ;\n }\n return (\n <>\n \n \n \n \n );\n}\n\nexport default ThreadPage;\n","import React from 'react';\nimport { Box } from '@mui/material';\n\nimport HomeErrorBoundary from 'pages/home/HomeErrorBoundary';\nimport Loading from 'components/Loading';\nimport ThreadPage from './ThreadPage';\n\nfunction ThreadContainer() {\n return (\n \n \n \n \n }\n >\n \n \n \n );\n}\n\nexport default ThreadContainer;\nexport * from './ThreadPage';\n","import React from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport { parseImagesFromArticleText } from '../../../utils/parseRichText';\n\nconst useStyles = makeStyles((theme) => ({\n resourcesContainer: {\n padding: theme.spacing(1),\n paddingBottom: 0,\n display: 'flex',\n flexDirection: 'column',\n lineHeight: 1.5,\n\n '& span': {\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(14),\n fontWeight: 600,\n },\n '& p': {\n marginTop: 0,\n marginBottom: theme.spacing(3),\n },\n '& a': {\n color: theme.palette.primary.main,\n },\n },\n}));\n\nconst getContent = async () => {\n const content = await fetch('/static/faq.txt').then((response) =>\n response.text()\n );\n return content;\n};\n\nconst FaqContent = () => {\n const classes = useStyles();\n const [content, setContent] = React.useState('');\n\n React.useEffect(() => {\n const loadContentAsync = async () => {\n const newContent = await getContent();\n if (newContent) {\n const parsed = parseImagesFromArticleText(newContent);\n setContent(parsed);\n }\n };\n loadContentAsync();\n }, []);\n\n return (\n <>\n
    {content}
    \n \n );\n};\n\nexport default FaqContent;\n","import { Box, CardHeader, Container, Paper, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PageHeader from '../../../components/PageHeader/PageHeader';\nimport FaqContent from './content';\nimport React from 'react';\n\nconst useStyles = makeStyles((theme) => ({\n rootContainer: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n center: {\n height: '100%',\n padding: theme.spacing(1),\n },\n title: {\n color: theme.palette.primary.main,\n fontSize: theme.typography.pxToRem(18),\n fontWeight: 800,\n },\n titleContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n header: {\n paddingTop: theme.spacing(5),\n paddingBottom: theme.spacing(2),\n paddingLeft: theme.spacing(0.5),\n paddingRight: theme.spacing(0.5),\n },\n box: {\n padding: theme.spacing(3),\n [theme.breakpoints.down('lg')]: {\n padding: 0,\n },\n },\n}));\n\nexport const FaqMobile = () => {\n const classes = useStyles();\n\n return (\n \n \n \n \n Frequently Asked Questions\n \n \n }\n className={classes.header}\n />\n \n \n \n \n \n );\n};\n\nexport const FaqWeb = () => (\n <>\n \n \n \n \n \n);\n","import React from 'react';\nimport { Box, Container, Paper } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport PageHeader from '../../../components/PageHeader/PageHeader';\nimport TermsOfUseContent from './content';\n\nconst useStyles = makeStyles((theme) => ({\n rootContainer: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n center: {\n height: '100%',\n padding: theme.spacing(1),\n },\n box: {\n padding: theme.spacing(3),\n [theme.breakpoints.down('lg')]: {\n padding: 0,\n },\n },\n}));\n\nexport const TermsOfUseMobile = () => {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport const TermsOfUseWeb = () => (\n <>\n \n \n \n \n \n);\n","import React, { useContext, useMemo } from 'react';\nimport { Route, Switch, useLocation, useHistory } from 'react-router-dom';\nimport { Theme, useMediaQuery } from '@mui/material';\n\nimport AppLink from './pages/static/AppLink';\nimport CookiePolicy from './pages/static/cookiepolicy';\nimport Error from './components/Error/Error';\nimport Loading from './components/Loading/Loading';\nimport MobileAuth from './pages/static/mobileauth';\nimport NavigationBar from 'pages/app/NavigationBar';\nimport SidebarCards from 'pages/app/SidebarCards';\nimport { Sidebar } from 'pages/app';\nimport { useGetAllFollows } from 'pages/app/services';\nimport { useGetSelf, useIsUserTrusted } from 'services';\nimport {\n CenterContainer,\n Container,\n Layout,\n LeftContainer,\n RightContainer,\n} from './components/Layout';\n\nimport Articles from './pages/article';\nimport Chat from './pages/messages';\nimport DesignSystemDemo from './pages/designsystem';\nimport Discover from './pages/discover';\nimport FeaturedPosts from './pages/featuredPosts';\nimport Explore from './pages/explore';\nimport Hashtag from './pages/hashtag';\nimport Home from './pages/home';\nimport Moderation from './pages/moderation';\nimport Notifications from './pages/notifications';\nimport Post from './pages/post';\nimport Profile from './pages/profile';\nimport Search from './pages/search';\nimport Settings from './pages/settings/settings';\nimport Signup from './pages/signup';\nimport Thread from './pages/thread';\nimport { useGetNftRegistry } from 'pages/profile/services/nft';\nimport { OpenDistriktContext, StatelessThemeProvider } from 'providers';\nimport { ConditionalRoute, SwitchWrapper } from 'components';\nimport { LoginSignupBanner } from 'pages/app/components/LoginSignupBanner';\nimport {\n FaqMobile,\n FaqWeb,\n TermsOfUseMobile,\n TermsOfUseWeb,\n} from 'pages/static';\n\nexport const AUTH_MOBILE_ROUTE = '/auth-mobile' as const;\n\nconst Routes = () => {\n const { data: user, isLoading } = useGetSelf();\n useIsUserTrusted(user?.id);\n\n const location = useLocation();\n const history = useHistory();\n const mobileSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('xs')\n );\n\n // Get full list of followers & following user ids for auth user\n useGetAllFollows(user?.id);\n useGetNftRegistry();\n\n // workaround until new design which remove follow sidebar are done\n const isChatPage = location.pathname === '/messages';\n\n React.useEffect(() => {\n const { pathname } = location;\n\n const scrollToTop =\n ['following', 'followers', 'nft'].reduce(\n (scrollToTop, path) => scrollToTop || pathname.endsWith(`/${path}`),\n false\n ) ||\n pathname.startsWith('/thread/') ||\n pathname.startsWith('/u/');\n if (scrollToTop) {\n window.scrollTo(0, 0);\n }\n }, [location]);\n\n const tabletSize = useMediaQuery((theme: Theme) =>\n theme.breakpoints.only('sm')\n );\n\n const { mode } = useContext(OpenDistriktContext);\n\n const guestView = useMemo(() => mode !== 'User', [mode]);\n\n const loginSignupBannerVisible = useMemo(() => tabletSize && guestView, [\n guestView,\n tabletSize,\n ]);\n\n const redirectAfterLogin = localStorage.getItem('REDIRECT_AFTER_LOGIN');\n\n React.useEffect(() => {\n if (user?.id && !guestView && !!redirectAfterLogin) {\n localStorage.removeItem('REDIRECT_AFTER_LOGIN');\n history.replace(redirectAfterLogin);\n }\n }, [user?.id, guestView, history, redirectAfterLogin]);\n\n const displayLayout = useMemo(\n () =>\n !['/signup', '/terms-of-use', '/auth-mobile', '/faq'].includes(\n location.pathname\n ),\n [location.pathname]\n );\n\n return isLoading ? (\n \n ) : (\n (\n \n {loginSignupBannerVisible && (\n \n )}\n \n \n \n \n\n \n {mobileSize ? : null}\n\n {children}\n \n\n \n \n \n \n \n \n ),\n // eslint-disable-next-line react/display-name\n false: (children) => (\n \n {children}\n \n ),\n }}\n >\n \n {process.env.REACT_APP_ENVIRONMENT === 'stage' ? (\n \n ) : null}\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default Routes;\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport React, { useContext } from 'react';\nimport {\n BrowserRouter as Router,\n useHistory,\n Route,\n Switch,\n} from 'react-router-dom';\nimport Loading from './components/Loading/Loading';\nimport MobileAuth from './pages/static/mobileauth';\nimport Routes, { AUTH_MOBILE_ROUTE } from './routes';\nimport { Container } from '@mui/material';\nimport { Theme, StyledEngineProvider } from '@mui/material/styles';\nimport { QueryClientProvider, setLogger } from 'react-query';\nimport { ReactQueryDevtools } from 'react-query/devtools';\nimport '@fontsource/inter/400.css';\nimport '@fontsource/inter/600.css';\nimport { queryClient } from 'utils';\nimport {\n OpenDistriktContext,\n OpenDistriktProvider,\n StatelessThemeProvider,\n ThemeProvider,\n} from 'providers';\n\ndeclare module '@mui/styles/defaultTheme' {\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface DefaultTheme extends Theme {}\n}\n\n// By default react-query will log all error responses to the console.\n// This is useful for debugging, but in production should be disabled\nif (process.env.NODE_ENV === 'production') {\n setLogger({\n log: () => {},\n warn: () => {},\n error: () => {},\n });\n\n // To unmute:\n // setLogger(window.console);\n}\n\nconst AuthProvider = ({ children }: { children: React.ReactNode }) => {\n const [loading, setLoading] = React.useState(false);\n const { recomputeMode } = useContext(OpenDistriktContext);\n const history = useHistory();\n\n React.useEffect(() => {\n setLoading(true);\n let mounted = true;\n (async () => {\n await recomputeMode(true);\n\n if (\n history.location.pathname === AUTH_MOBILE_ROUTE &&\n window.innerWidth >= 765\n ) {\n history.replace('/', {\n from: history.location,\n });\n }\n\n if (mounted) {\n setLoading(false);\n }\n })();\n\n return () => {\n mounted = false;\n };\n }, []);\n\n if (loading) {\n return ;\n }\n\n return <>{children};\n};\n\nconst App = () => {\n // TODO combine\n if (window.innerWidth < 765 && location.pathname === AUTH_MOBILE_ROUTE) {\n return (\n \n \n }>\n \n \n \n \n \n \n \n \n );\n } else {\n return (\n }>\n \n \n \n \n \n \n }>\n \n \n \n \n \n \n \n \n \n \n );\n }\n};\n\nexport default App;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport { encryptMessage } from './utils/crypt';\n\nBigInt.prototype.toJSON = function () {\n return this.toString();\n};\n\nconst render = () => {\n ReactDOM.render(\n \n \n ,\n document.getElementById('app')\n );\n};\n\nif (process.env.REACT_APP_PASSWORD_PROTECTION) {\n const askPassword = async (ignoreLocalStorage = false) => {\n let password;\n if (!ignoreLocalStorage && localStorage.getItem('appPasswordProtection')) {\n password = localStorage.getItem('appPasswordProtection');\n } else {\n password = prompt('Enter password:');\n\n if (password === null) {\n return;\n }\n }\n\n try {\n const cryptPassword = await encryptMessage(password);\n if (cryptPassword === process.env.REACT_APP_PASSWORD_PROTECTION) {\n localStorage.setItem('appPasswordProtection', password);\n render();\n } else {\n askPassword(true);\n }\n } catch (err) {\n console.log(err);\n }\n };\n\n askPassword();\n} else {\n render();\n}\n","/**\n * https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest\n *\n * @param message\n */\nexport async function encryptMessage(message) {\n const msgUint8 = new TextEncoder().encode(message);\n const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');\n}\n","// Set how many items should be displayed on home page feed\nexport const INITIAL_ITEMS_LIMIT = 20;\n\nexport const SORT_ORDER = {\n ASCENDING: 'Ascending',\n DESCENDING: 'Descending',\n} as const;\n","import { v4 as uuidv4 } from 'uuid';\nimport { Principal } from '@dfinity/principal';\nimport { Image as TImage } from '../types';\n\nimport { assetsApi } from 'client';\nimport { MIME_TYPES, MAX_FILE_SIZE } from '../constants';\n\nexport function resizeImage(\n base64Str: string,\n mimeType: keyof typeof MIME_TYPES,\n maxWidth = 1200,\n maxHeight = 900\n): Promise {\n const img = new Image();\n img.src = base64Str;\n\n return new Promise((resolve) => {\n img.onload = () => {\n const canvas = document.createElement('canvas');\n let width = img.width;\n let height = img.height;\n\n if (width > height) {\n if (width > maxWidth) {\n height *= maxWidth / width;\n width = maxWidth;\n }\n } else {\n if (height > maxHeight) {\n width *= maxHeight / height;\n height = maxHeight;\n }\n }\n\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext('2d');\n ctx.drawImage(img, 0, 0, width, height);\n resolve(canvas.toDataURL(mimeType, 0.8));\n };\n });\n}\n\nexport function isMimeTypeSupported(\n mimeType: string,\n allowedMimeTypes?: Partial\n): mimeType is keyof typeof MIME_TYPES {\n if (allowedMimeTypes) {\n return Boolean(allowedMimeTypes[mimeType]);\n }\n\n return Boolean(MIME_TYPES[mimeType]);\n}\n\nfunction getMimeTypeExtensionMessage(mimeTypes: Partial) {\n return Object.values(mimeTypes)\n .join(', ')\n .replace(/,([^,]*)$/, ' and$1');\n}\n\nexport async function formatReaderDataToImage(\n image: string | null,\n height = 1024,\n width = 1024,\n allowedMimeTypes: Partial = MIME_TYPES\n): Promise {\n if (image !== null) {\n const mimeTypesExtMessage = getMimeTypeExtensionMessage(allowedMimeTypes);\n\n if (!image.includes(',')) {\n throw new Error(\n `Something went wrong. Please try again and check image format (${mimeTypesExtMessage}) and size (max. 1MB)`\n );\n }\n\n // base64 encoded data doesn't contain commas\n const base64ContentArray = image.split(',');\n\n // base64 content cannot contain whitespaces but nevertheless skip if there are!\n const mimeType:\n | string\n | keyof typeof MIME_TYPES = base64ContentArray[0].match(\n /[^:\\s*]\\w+\\/[\\w-+\\d.]+(?=[;| ])/\n )?.[0];\n\n if (!isMimeTypeSupported(mimeType, allowedMimeTypes)) {\n throw new Error(\n `Oops, it looks like this image format isn't supported! Please upload ${mimeTypesExtMessage} images only.`\n );\n }\n\n const format = MIME_TYPES[mimeType];\n\n if (format !== MIME_TYPES['image/gif']) {\n try {\n image = await resizeImage(image, mimeType, width, height);\n } catch (err) {\n throw new Error();\n }\n }\n\n const base64str = image.split(',')[1];\n const decoded = atob(base64str);\n\n if (decoded.length > MAX_FILE_SIZE) {\n throw new Error(\n `Something went wrong. Please try again and check image format (${mimeTypesExtMessage}) and size (max. 1MB)`\n );\n }\n\n return image;\n }\n}\n\nexport async function formatImage(\n image: string | null,\n allowedMimeTypes: Partial = MIME_TYPES\n): Promise<[TImage]> {\n const formattedImages: [TImage] | [] = [];\n\n if (image !== null) {\n const mimeTypesExtMessage = getMimeTypeExtensionMessage(allowedMimeTypes);\n\n // base64 encoded data doesn't contain commas\n const base64ContentArray = image.split(',');\n\n // base64 content cannot contain whitespaces but nevertheless skip if there are!\n const mimeType:\n | string\n | keyof typeof MIME_TYPES = base64ContentArray[0].match(\n /[^:\\s*]\\w+\\/[\\w-+\\d.]+(?=[;| ])/\n )?.[0];\n\n const imageFormatted: TImage = {\n canister_id: Principal.fromText('bbuha-mqaaa-aaaae-aaavq-cai'), // TODO move to .env\n image_id: `${uuidv4()}`,\n timestamp: BigInt(0),\n format: MIME_TYPES[mimeType],\n };\n\n if (!image.includes(',')) {\n throw new Error(\n `Something went wrong. Please try again and check image format (${mimeTypesExtMessage}) and size (max. 1MB)`\n );\n }\n\n const photo = image.split(',')[1];\n\n const _base64ToArrayBuffer = (base64: string) => {\n const binary_string = atob(base64);\n const len = binary_string.length;\n const bytes = [];\n for (let i = 0; i < len; i++) {\n bytes[i] = binary_string.charCodeAt(i);\n }\n return bytes;\n };\n\n const decodedArr = _base64ToArrayBuffer(photo);\n if (decodedArr.length > MAX_FILE_SIZE) {\n throw new Error(\n `That image is still over 1MB - even after resizing it! Please try again with a smaller image file. Thanks!`\n );\n }\n\n try {\n await assetsApi.append(imageFormatted.image_id, decodedArr);\n\n formattedImages.push(imageFormatted);\n } catch (e) {\n console.log(e);\n\n throw new Error(\n `Something went wrong. Please try again and check image format (${mimeTypesExtMessage}) and size (max. 1MB)`\n );\n }\n }\n\n return formattedImages;\n}\n\nexport const testImage = (url: string, timeout = 5000) => {\n const rejectedFileExtensions = ['.ico'];\n\n const rejectExtension = rejectedFileExtensions.every((extension) =>\n url.toLowerCase().includes(extension)\n );\n\n return new Promise(function (resolve, reject) {\n let timer: any = undefined;\n const img = new Image();\n\n if (rejectExtension) reject('error');\n\n img.onerror = img.onabort = function () {\n clearTimeout(timer);\n reject('error');\n };\n img.onload = function () {\n clearTimeout(timer);\n resolve('success');\n };\n timer = setTimeout(function () {\n // reset .src to invalid URL so it stops previous\n // loading, but doens't trigger new load\n img.src = '//!!!!/noexist.jpg';\n reject('timeout');\n }, timeout);\n img.src = url;\n });\n};\n\nexport const fetchAsBlob = (url) =>\n fetch(url).then((response) => response.blob());\n\nexport const convertBlobToBase64 = (blob) =>\n new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = reject;\n reader.onload = () => {\n resolve(reader.result);\n };\n reader.readAsDataURL(blob);\n });\n","import {\n InfiniteData,\n QueryKey,\n useInfiniteQuery,\n useQueryClient,\n} from 'react-query';\n\nimport api, { ApiItemFeed } from 'client';\nimport { extractApiDataOrThrow, flattenInfiniteData } from 'utils';\nimport { INITIAL_ITEMS_LIMIT } from 'constants/feed';\nimport { extractPostItemKey } from 'pages/post/utils/postItem';\n\nexport const getPaginatedOptimizedHashtagFeedQueryKey: QueryKey =\n 'getPaginatedOptimizedHashtagFeed';\n\nexport function useGetPaginatedOptimizedHashtagFeed(\n userId?: bigint,\n hashtag?: string\n) {\n const queryClient = useQueryClient();\n\n return useInfiniteQuery(\n [getPaginatedOptimizedHashtagFeedQueryKey, userId, hashtag],\n async ({ pageParam = 0 }) => {\n const data = queryClient.getQueryData>>(\n [getPaginatedOptimizedHashtagFeedQueryKey, userId, hashtag],\n { exact: true }\n );\n // used to get fetched ids to pass to getPaginatedOptimizedUserFeed on load next\n // getting ids from cached data & only for previoues pages\n const previousIds = flattenInfiniteData(\n data,\n pageParam as number\n ).map((p) => extractPostItemKey(p));\n\n const res = await api.getPaginatedOptimizedHashtagFeed(\n userId || 0n,\n hashtag,\n BigInt(pageParam * INITIAL_ITEMS_LIMIT),\n BigInt(INITIAL_ITEMS_LIMIT),\n previousIds\n );\n return extractApiDataOrThrow(res)?.items;\n },\n {\n enabled: !!hashtag,\n getNextPageParam: (page, pages) =>\n page && page.length >= INITIAL_ITEMS_LIMIT ? pages.length : undefined,\n }\n );\n}\n"],"sourceRoot":""}