@amityco/ui-kit-open-source 4.0.0-beta.17 → 4.0.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1737,7 +1737,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[N0]+=1);var m6=({theme:e})=>Y
|
|
|
1737
1737
|
justify-content: center;
|
|
1738
1738
|
text-align: center;
|
|
1739
1739
|
}
|
|
1740
|
-
`;var fW=({className:e,content:t,icon:o})=>X.createElement(Uw,{className:e},o," ",t),jw=()=>{let e=Cx();return X.createElement(Ml,null,X.createElement(zw,null,e.map(t=>X.createElement(fW,E(m({},t),{key:t.id})))))};var Gw={"general.action.cancel":"Cancel","general.action.accept":"Accept","general.action.decline":"Decline","general.action.discard":"Discard","general.action.ok":"Ok","general.error.tryAgainLater":"Something went wrong. Please try again later.","general.connection.waiting":"Waiting for connection...",hello:"Hello World","plural.like":"{amount, plural, one {like} other {likes}}",comment:"Comment","plural.comment":"{amount, plural, one {comment} other {comments}}","plural.member":"{amount, plural, one {member} other {members}}",selectACategory:"Select a category",todaysTrendingTitle:"Today's Trending",loadMore:"Load More",categoryList:"Categories",recommendedList:"Recommended for you","exploreHeader.searchCommunityTitle":"Explore communities","exploreHeader.searchCommunityPlaceholder":"Search communities...","exploreHeader.createCommunityTitle":"or create your own!","exploreHeader.createCommunityButton":"Create community",backTitle:"Back",createCommunity:"Create Community",moderator:"Moderator","moderatorMenu.promoteToModerator":"Promote to moderator","moderatorMenu.dismissModerator":"Dismiss moderator","moderatorMenu.removeFromCommunity":"Remove from community","post.readMore":"...Read more","post.editPost":"Edit post","post.deletePost":"Delete post","post.confirmDelete":"This post will be permanently deleted. You\u2019ll no longer to see and find this post. Continue?","post.confirmPendingDelete":"This post will be permanently deleted from the pending list","post.edited":"Edited","post.like":"Like","post.liked":"Liked","post.unknownPost.description":"We couldn\u2019t recognize this post.","post.unknownPost.title":"Something went wrong","post.renderingError.description":"We couldn\u2019t render this post.","post.renderingError.title":"Something went wrong","post.community":"Community","post.myTimeline":"My Timeline","post.wasLive":"was live","post.success.approved":"Post approved","post.success.declined":"Post declined","post.success.submittedToReview":"Your post has been submitted to review by moderator","post.error.cannotReview.title":"Post is not available","post.error.cannotReview.description":"The post has been reviewed by another moderator","post.discard.title":"Discard post?","post.discard.content":"Do you want to discard your post?","collapsible.viewAll":"View all","collapsible.viewAllFiles":"View all files","collapsible.viewMoreComments":"View more comments","collapsible.viewMoreReplies":"View more replies","collapsible.viewMoreReply":"View {count, plural, one {# reply} other {# replies}}","community.createSuccess":"Your community was successfully created","community.updateSuccess":"Your community was successfully updated","community.editProfile":"Edit profile","community.join":"Join","community.communitySettings":"Community Settings","community.returnTo":"Return to {communityName}","community.leaveCommunityTitle":"Leave community?","community.leaveCommunityBody":"You won\u2019t no longer be able to post and interact in this community after leaving.","community.leaveCommunityBodyLastMember":"As you\u2019re the last moderator and member, choose close community to leave.","community.leaveCommunityBodyOnlyModerator":"You\u2019re the only moderator in this group. Nominate other members before leaving community.","community.leaveCommunityButtonText":"Leave","community.leaveCommunityButtonOK":"OK","community.cannotInteract":"Join community to interact with all posts","community.removeUserFromCommunityTitle":"Remove user from community","community.removeUserFromCommunityBody":"This user won't no longer be able to search, post. Continue?","community.name":"Community name","community.about":"About","community.category":"Category","community.onlyadmincanpost":">Only admin can post","community.onlyadmins":"Choose to allow Only Admins to create posts in this community.","community.categorypermission":"Community permission","community.addmembers":"Add members","community.posts":"posts","community.members":"members","community.settings":"Settings","community.leaveCommunity":"Leave Community","CommunityMembers.members":"Members","CommunityMembers.moderators":"Moderators","EmptyFeed.TargetType.globalFeed":"This feed is empty","EmptyFeed.TargetType.communityFeed":"This community's feed is empty","EmptyFeed.TargetType.userFeed":"This user's feed is empty","EmptyFeed.TargetType.myFeed":"Your feed is empty. Start your first post","EmptyFeed.exploreCommunity":"Explore Community","UserFeed.tabs.timeline":"Timeline","community.exploreCommunities":"Explore Community","community.permissions.postReview":"Post review","community.permissions.storyComments":"Story comments","community.permissions.approvePosts":"Approve member posts","community.permissions.allowStoryComments":"Allow comments on community stories","community.permissions.approvePosts.prompt":"Posts by members have to be reviewed and approved by community moderator.","community.permissions.storyComments.prompt":"Turn on to receive comments on stories in this community.","community.permissions.error.needApprovalOnPostCreation.turnOn":"Unable to turn on post review","community.permissions.error.needApprovalOnPostCreation.turnOff":"Unable to turn off post review","community.permissions.error.storyComments.turnOn":"Unable to turn on post review","community.permissions.error.storyComments.turnOff":"Unable to turn off post review","community.review.declinePendingPosts":"Decline pending post will permanently delete the selected post from community.","community.pendingPostsBanner.title":"Pending posts","community.pendingPostsBanner.pendingForReview":"Your posts are pending for review","community.pendingPostsBanner.needApproval":"{formattedAmount} {amount, plural, one {post needs} other {posts need}} approval","communityCreatedModal.title":"Customize your community","communityCreatedModal.message":"You\u2019ve successfully created a community! Now let's manage permissions that work best for you","communityCreatedModal.goToSettings":"Community settings","communityCreatedModal.skip":"Skip for now",post:"Post","upload.attachmentLimit":"You reached the maximum attachment of {maxFiles}","upload.fileSizeLimit":"One of the selected file is larger than 1GB. Please select a new file.","user.editProfile":"Edit profile","user.message":"Message","follow.placeholder.noFollowings":"No followings found","follow.placeholder.noFollowers":"No followers found","ProfileSettings.editProfile":"Edit profile","ProfileSettings.returnTo":"Return to ","SideSectionMyCommunity.myCommunity":"My Community","file.reUpload":"Click to re-upload the file","UserProfileForm.displayname":"Display name","UserProfileForm.about":"About","UserProfileForm.title":"General","UserProfileForm.namePlaceholder":"Enter user display name","UserProfileForm.requiredDisplayName":"Display name is required","UserProfileForm.requiredDescription":"Enter something about yourself","UserSelector.placeholder":"Select user...","report.reportUser":"Report user","report.unreportUser":"Unreport user","report.reportComment":"Report comment","report.unreportComment":"Unreport comment","report.reportSent":"Report sent","report.unreportSent":"Unreport sent","comment.deleted":"This comment has been deleted","comment.delete":"Delete comment","comment.edit":"Edit comment","comment.deleteConfirmContent":"This comment will be permanently deleted. Continue?","comment.deleteConfirmCancelText":"Cancel","comment.deleteConfirmOkText":"Delete","dropdown.first":"First","dropdown.second":"Second","layout.logout":"Log Out","layout.username":"Jackies","chat.details.chatDetailes":"Chat Detail","chat.details.communityName":"Community Name","message.flag":"flag","message.unflag":"Unflag","message.edit":"Edit","message.delete":"Delete","message.deleted":"deleted","message.unsupportedFormat":"Unsupported message format","message.saveOptionsError":"There was an error processing your request","MessageComposeBar.placeholder":"Type your message...","RecentChat.chats":"Chats","AddMemberModal.addMembers":"Add members","AddMemberModal.membersValidationError":"Please select at least one member",add:"Add",save:"Save",close:"Close",reply:"Reply",delete:"Delete",create:"Create",cancel:"Cancel",loading:"Loading...","loading.chat":"Loading chat...",anonymous:"Anonymous","comment.edited":"Edited","comment.readmore":"...Read more","communities.nocommunityfound":"No community found","profile.setting":"Profile Settings","sidesectioncommunity.newfeed":"NewsFeed","sidesectioncommunity.explore":"Explore","sidesectioncommunity.community":"Community","communityFeed.join":"Join community to interact with all posts","communityFeed.members":"Members","communityFeed.moderators":"Moderators","files.all":"View all files","sidebar.community":"Community","sidebar.explore":"Explore","CategoryCommunitiesList.emptyTitle":"It's empty here...","CategoryCommunitiesList.emptyDescription":"No community found in this category","CommentComposeBar.addComment":"Add comment","CommentComposeBar.replayTo":"Reply to ","CommentComposeBar.replayToUser":"Replying to {displayName}","CommentComposeBar.saySomething":"Say something nice","CommentComposeBar.unableToPost":"Unable to post","CommentComposeBar.overCharacter":"You have reached maximum 50,000 characters in a post.","CommentComposeBar.done":"Done","CommentComposeBar.unableToMention":"Unable to mention","CommentComposeBar.overMentionees":"You have reached maximum 30 mentioned users in a post.","CommentComposeBar.okText":"OK","CommunityCreationModal.title":"Leave without finishing?","CommunityCreationModal.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","CommunityCreationModal.cancelText":"Continue editing","CommunityCreationModal.okText":"Leave","PostAsCommunity.title":"Post as community","PostAsCommunity.caption":"Enable this will publish the post on behalf of community account","AddMemberAction.title":"Add members","AddMemberAction.description":"Add your friends to this community to participate in group conversations","CloseCommunityAction.closeConfirm.title":"Close community?","CloseCommunityAction.closeConfirm.description":"All members will be removed from the community. All posts, messages, reactions and media shared in community will be deleted. This cannot be undone.","CloseCommunityAction.title":"Close community","CloseCommunityAction.description":"Closing this community will remove the community page and all its content and comments. This cannot be undone.","report.doReport":"Report","report.undoReport":"Undo Report","comment.deleteBody":"This comment will be permanently removed.","reply.delete":"Delete reply","reply.deleteBody":"This reply will be permanently deleted. Continue?","reply.edit":"Edit reply","reply.deleted":"This reply has been deleted","tabs.editProfile":"Edit profile","tabs.timeline":"Timeline","tabs.followers":"Followers","tabs.followings":"Followings","tabs.pending":"Pending","tabs.members":"Members","tabs.moderators":"Moderators","tabs.pendingPosts":"Pending {amount, select, 0 {} other { ({formattedAmount})}}","tabs.permissions":"Permissions","tabs.gallery":"Gallery","tabs.images":"Photos","tabs.videos":"Videos","tabs.liveStreams":"Livestreams","feed.emptyFeed":"This feed is empty","feed.emptyCommunityPublicFeed":"This community's feed is empty","feed.emptyCommunityReviewingFeed":"No pending posts","feed.emptyJoinedCommunityPublicFeed":"Your feed is empty. Start you first post","feed.emptyUserFeed":"No posts yet","feed.emptyMyFeed":"Your feed is empty. Start your first post","chat.groupSetting":"Group settings","chat.message.deleted":"Message was deleted","chat.message.unsupported":"Unsupported message type","chat.chats":"Chats","chat.details.header":"Chat Details","chat.details.chatName":"Chat Name","chat.leaveChat":"Leave chat","chat.leaveChat.confirm.title":"Leave chat","chat.leaveChat.confirm.content":"Are you sure you want to leave the chat?","chat.leaveChat.confirm.okButton":"Leave","chat.leaveChat.success":"You successfully left chat","chat.leaveChat.error":"Attempt to leave a chat has failed","chat.members.return":"Return to controls","chat.members.count":"{count} members","chat.create.modalTitle":"Create new chat","chat.loading.error":"Couldn't load chat","userSelector.placeholder":"Enter name or email addresses","userSelector.emptyState.title":"It's empty here...","userSelector.emptyState.description":"No contact found here","groupChat.createPopup.fieldName":"Group name","groupChat.createPopup.placeholder":"Please input group name","general.cancel.capital":"Cancel","general.create.capital":"Create","general.done.capital":"Done","chat.member.addMore":"Add or Remove user","video.notReady":"The video is being processed. Please try again later.","liveStream.idle":"This stream is currently unavailable","liveStream.ended.caption":"This liveStream has ended.","liveStream.ended.message":"Playback will be available for you to watch shortly.","user.follow":"Follow","user.unfollow":"Unfollow","user.unfollow.confirm.title":"Unfollow {displayName}","user.unfollow.confirm.body":"You\u2019ll have to send a request again to follow {displayName}. Continue?","user.cancel_follow":"Cancel request","placeholder.noResults":"No results found","request.accept":"Accept","request.decline":"Decline","follower.title.removeUser":"Remove {displayName} from followers?","follower.body.removeUser":"We will not notify {displayName} that they've been removed from your followers","follower.menuItem.removeUser":"Remove user","follower.menuItem.unfollow":"Unfollow","buttonText.cancel":"Cancel","buttonText.remove":"Remove","follow.pendingNotification.title":"Pending requests","follow.pendingNotification.body":"Your requests are waiting for review","notification.done":"Done","counter.followings":"following","counter.followers":"followers","buttonText.unfollow":"Unfollow","privateFeed.title":"This account is private","privateFeed.body":"Follow this user to see all posts","navigationBlocker.title":"Unsaved changes","navigationBlocker.content":"Your changes won`t be saved. Are you sure you want to leave this page now?","user.unfollow.confirm.title.thisUser":"Unfollow this user","mediaGallery.images.empty":"No photos yet","mediaGallery.liveStreams.empty":"No liveStreams yet","mediaGallery.videos.empty":"No videos yet","user.unfollow.confirm.body.thisUser":"You\u2019ll have to send a request again to follow this user. Continue?","navigationBlocker.okText":"Leave","options_composer.button.add":"Add Option","options_composer.title":"Create at least 2 options","poll_modal.answer_type.title":"Selection type","poll_modal.answer_type.body":"Choose to vote with one or multiple options","poll_modal.closed_in.title":"Schedule poll (Optional)","poll_modal.closed_in.body":"Poll will be automatically closed at the end of chosen time frame (UTC)","select.answerType.item":"{answerType} selection","poll_composer.question.label":"Poll options","poll_composer.question.placeholder":"What\u2019s your poll question?","poll_composer.poll_options.label":"Options","poll_modal.title":"Create poll","poll.votes":"{voteCount} votes","poll.vote.closedIn":"Poll ends in {closedIn} days","poll.vote.finalResults":"Final results","poll.vote.submit":"Submit vote","poll.error.deletedOrClosed":"This poll has been closed or deleted.","poll.close":"Close poll","postCreator.unableToPost":"Unable to post","postCreator.overCharacter":"You have reached maximum 50,000 characters in a post.","postCreator.done":"Done","postCreator.unableToMention":"Unable to mention","postCreator.overMentionees":"You have reached maximum 30 mentioned users in a post.","postCreator.okText":"OK","pollComposer.unableToMention":"Unable to mention","pollComposer.overMentionees":"You have reached maximum 30 mentioned users in a post.","pollComposer.okText":"OK","storyCreation.hyperlink.bottomSheet.cancel":"Cancel","storyCreation.hyperlink.bottomSheet.title":"Add link","storyCreation.hyperlink.bottomSheet.submit":"Done","storyCreation.hyperlink.form.urlLabel":"URL","storyCreation.hyperlink.form.urlPlaceholder":"https://example.com","storyCreation.hyperlink.form.linkTextLabel":"Customize link text","storyCreation.hyperlink.form.linkTextPlaceholder":"Name your link","storyCreation.hyperlink.form.linkTextDescription":"This text will show on the link instead of URL.","storyCreation.hyperlink.form.removeButton":"Remove link","storyCreation.hyperlink.removeConfirm.title":"Remove link","storyCreation.hyperlink.removeConfirm.content":"This link will be removed from story.","storyCreation.hyperlink.removeConfirm.cancel":"Cancel","storyCreation.hyperlink.removeConfirm.confirm":"Remove","storyCreation.hyperlink.validation.error.invalidUrl":"Please enter a valid URL.","storyCreation.hyperlink.validation.error.whitelisted":"Please enter a whitelisted URL.","storyCreation.hyperlink.validation.error.blocked":"Your text contains a blocklisted word.","storyCreation.hyperlink.unsavedChanges.title":"Unsaved changes","storyCreation.hyperlink.unsavedChanges.content":"Are you sure you want to cancel? Your changes won't be saved.","storyCreation.hyperlink.unsavedChanges.cancel":"No","storyCreation.hyperlink.unsavedChanges.confirm":"Yes","storyViewer.actions.deleteStory":"Delete story","storyViewer.action.confirmModal.title":"Delete this story?","storyViewer.action.confirmModal.content":"This story will be permanently deleted. You\u2019ll no longer to see and find this story.","storyViewer.notification.deleted":"Story deleted","storyViewer.notification.success":"Successfully shared story","storyViewer.notification.error":"Failed to share story","storyViewer.footer.failed":"Failed to upload","storyViewer.footer.uploading":"Uploading...","storyViewer.commentSheet.title":"Comments","storyViewer.commentSheet.empty":"No comments yet","storyViewer.commentSheet.disabled":"Comments are disabled for this story","storyViewer.commentSheet.replyingTo":"Replying to","storyViewer.toast.like.disabled":"Join community to interact with all stories","storyViewer.toast.comment.reported":"Comment reported","storyViewer.toast.comment.unreported":"Comment unreported","storyViewer.toast.disable.react":"Join community to interact with all stories","storyViewer.commentComposeBar.submit":"Post","storyDraft.button.shareStory":"Share story","storyDraft.notification.hyperlink.error":"Can\u2019t add more than one link to your story.","storyTab.title":"Story","select.chatType.item":"{answerType} type","chatComposer.label.channelId":"Channel ID","chatComposer.label.displayName":"Display Name","chatComposer.label.type":"Channel Type","chatComposer.addUsers":"Add users","chat_modal.title":"Create chat","chat_composer.placeholder.displayName":"Enter display name here","chat_composer.placeholder.channelId":"Enter channel ID here","editChatMembersModal.title":"Add/Edit chat members","editChatMembersModal.confirm.title":"Leave without finishing?","editChatMembersModal.confirm.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","editChatMembersModal.confirm.cancelText":"Continue editing","editChatMembersModal.confirm.okText":"Leave","notification.error.blockedWord":"Amity SDK (400308): Text contain blocked word","livechat.deleted.message":"This message was deleted","livechat.messageBubble.reply.button":"Reply","livechat.messageBubble.copy.button":"Copy","livechat.messageBubble.delete.button":"Delete","livechat.messageBubble.mention.button":"Mention","livechat.messageBubble.report.button":"Report","livechat.messageBubble.unReport.button":"Unreport","livechat.channel.muted":"This channel has been set to read-only by the channel moderator","livechat.modal.delete.message.title":"Delete this message?","livechat.modal.delete.message.content":"This message will also be removed from your friend\u2019s devices.","livechat.mention.all":"All","livechat.mention.all.description":"Notify everyone","livechat.notification.copy.message":"Message copied","livechat.composebar.placeholder":"Write a message","livechat.delete.message.error":"Unable to delete message. Please try again.","livechat.member.muted":"You\u2019ve been muted by the channel moderator","livechat.member.muted.error":"User is muted","livechat.member.banned.title":"You are banned from chat","livechat.member.banned.description":"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned.","livechat.report.message.success":"Message reported","livechat.report.message.error":"This message failed to be reported. Please try again.","livechat.unReport.message.success":"Message unreported","livechat.unReport.message.error":"This message failed to be unreported. Please try again.","livechat.error.tooLongMessage.title":"Unable to send message","livechat.error.tooLongMessage.description":"Your message is too long. Please shorten your message and try again.","livechat.error.sendingMessage.error":"Your message wasn't sent. Please try again.","livechat.error.sendingMessage.blockedWord":"Your message wasn't sent as it contains a blocked word.","livechat.error.sendingMessage.notAllowLink":"Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.","livechat.reaction.errorOnload":"Unable to load reactions","livechat.reaction.emptyState":"No reactions yet","livechat.reaction.emptyState.description":"Be the first to react to this message!","livechat.reaction.label.removeReaction":"Click to remove reaction"};var Fp={en:Gw};var $w="en",CW=({locale:e,children:t})=>{let o=Fp[e]?Fp[e]:Fp[$w];return X.createElement(IntlProvider,{defaultLocale:$w,locale:e,messages:o},t)},Zw=CW;var vW={palette:{alert:"#FA4D30",base:"#292B32",primary:"#1054DE",secondary:"#FFD400",tertiary:"#FF305A",neutral:"#17181C",highlight:"#1054DE",system:{borders:"#ebecef",background:"#fff"}},typography:{global:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif",fontStyle:"normal"},headline:{fontWeight:600,fontSize:"20px"},title:{fontWeight:600,fontSize:"16px"},subTitle:{fontWight:400,fontSize:"13px"},body:{fontWeight:"normal",fontSize:"14px"},bodyBold:{fontWeight:600,fontSize:"14px"},caption:{fontWeight:"normal",fontSize:"12px"},captionBold:{fontWeight:600,fontSize:"12px"}}},qw=vW;var Qw=e=>e.toFixed(1),Yw=e=>{let t=Math.min(e*100,100);return Qw(t)};function xW(e){return e.alpha!==void 0}var Kw=e=>{let{hue:t,saturation:o,lightness:r}=e,n=[`${Qw(t)}`,`${Yw(o)}%`,`${Yw(r)}%`];return xW(e)?`hsla(${[...n,e.alpha].filter(et).join(",")})`:`hsl(${n.filter(et).join(",")})`},bW=e=>{let t=parseToHsl(e);return Kw(t)},IW=(e,t)=>{let o=parseToHsl(t),{lightness:r}=o,n=E(m({},o),{lightness:Math.min(1,r+e)});return Kw(n)},wW=[.25,.4,.5,.75],Jw=e=>{let i=e,{system:t}=i,o=_(i,["system"]),r=Object.keys(o).reduce((a,s)=>(a[s]={main:bW(o[s])},a),m({},o)),n=Object.keys(r).reduce((a,s)=>{let l=o[s],d=wW.reduce((u,f,g)=>{let h=`shade${g+1}`;return u[h]=IW(f,l),u},{}),p=r[s];return p&&typeof p=="object"?a[s]=m(m({},d),p):a[s]=E(m({},d),{main:p}),a},m({},r));return E(m({},n),{system:t})};var _W=["fontFamily","fontStyle","fontWeight","fontSize"],MW=e=>Object.keys(e).reduce((o,r)=>{let n=e[r];return r&&n&&_W.includes(r)&&(o[r]=n),o},{}),Xw=e=>Object.keys(e).reduce((o,r)=>(o[r]=MW(m(m({},e.global),e[r])),o),{});var Rw={colors:{primary:{default:"#1054DE",shade1:"#4A82F2",shade2:"#A0BDF8",shade3:"#D9E5FC",shade4:"#FFFFFF"},secondary:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},base:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},baseInverse:{default:"#FFFFFF"},alert:{default:"#FA4D30"},highlight:"#1054DE",messageBubble:{default:"#1054DE",inverse:"#FFFFFF"},storyIndicator:{default:"#EBECEF",active:["#339AF9","#78FA58"]},hyperlink:{default:"#FFFFFFCC"},actionButton:{default:"#00000080"}},typography:{heading:{fontWeight:600,fontSize:"1.25rem",lineHeight:"1.5rem"},title:{fontWeight:600,fontSize:"1rem",lineHeight:"1.25rem"},subTitle:{fontWeight:400,fontSize:"0.8125rem",lineHeight:"1rem"},body:{fontWeight:"normal",fontSize:"0.875rem",lineHeight:"1.25rem"},bodyBold:{fontWeight:600,fontSize:"0.875rem",lineHeight:"1.25rem"},caption:{fontWeight:"normal",fontSize:"0.75rem",lineHeight:"1rem"},captionBold:{fontWeight:600,fontSize:"0.75rem",lineHeight:"1rem"}}};var SW=(e={})=>{let t=PW(qw,e),o=Jw(t.palette),r=Xw(t.typography);return E(m({},t),{palette:o,typography:r,v4:Rw})},e_=SW;var r_=X.createContext(void 0),n_=({children:e,pageBehavior:t={}})=>{let{page:o,onBack:r,goToPostDetailPage:n,goToCommunityProfilePage:i,goToUserProfilePage:a,goToViewStoryPage:s,onChangePage:l,goToSelectPostTargetPage:d,goToStoryTargetSelectionPage:p,goToStoryCreationPage:u,goToPostComposerPage:f,goToSocialHomePage:g}=ye(),h={AmityStoryViewPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&y.onCloseAction)return t.AmityStoryViewPageBehavior.onCloseAction();l("SocialHomePage");},hyperLinkAction:y=>{var C;if((C=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&C.hyperLinkAction)return t.AmityStoryViewPageBehavior.hyperLinkAction(y)}},AmityDraftStoryPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityDraftStoryPageBehavior)!=null&&y.onCloseAction)return t.AmityDraftStoryPageBehavior.onCloseAction();o.type==="DraftPage"&&o.context.storyType==="communityFeed"?i(o.context.targetId):g();}},onClickHyperLink:()=>{},AmitySocialHomePageBehavior:{},AmityGlobalFeedComponentBehavior:{goToPostDetailPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToPostDetailPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToPostDetailPage(y);n(y.postId);},goToViewStoryPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToViewStoryPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToViewStoryPage(y);s({targetId:y.targetId,targetType:y.targetType,storyType:y.storyType});}},AmityPostDetailPageBehavior:{},AmityPostContentComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityPostContentComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);},goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityPostContentComponentBehavior.goToUserProfilePage(y);a(y.userId);},goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToPostComposerPage)return t.AmityPostContentComponentBehavior.goToPostComposerPage(y);f(y);}},AmitySocialGlobalSearchPageBehavior:{},AmityCommunitySearchResultComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityCommunitySearchResultComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityCommunitySearchResultComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);}},AmityUserSearchResultComponentBehavior:{goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityUserSearchResultComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityUserSearchResultComponentBehavior.goToUserProfilePage(y);a(y.userId);}},AmityCreatePostMenuComponentBehavior:{goToSelectPostTargetPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToSelectPostTargetPage)return t.AmityCreatePostMenuComponentBehavior.goToSelectPostTargetPage();d();},goToStoryTargetSelectionPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToStoryTargetSelectionPage)return t.AmityCreatePostMenuComponentBehavior.goToStoryTargetSelectionPage();p();}},AmityPostTargetSelectionPage:{goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostTargetSelectionPage)!=null&&C.goToPostComposerPage)return t.AmityPostTargetSelectionPage.goToPostComposerPage(y);f(y);}},AmityStoryTargetSelectionPage:{goToStoryCreationPage:y=>{var C;if((C=t==null?void 0:t.AmityStoryTargetSelectionPage)!=null&&C.goToStoryCreationPage)return t.AmityStoryTargetSelectionPage.goToStoryCreationPage(y);u(y);}},AmityPostComposerPageBehavior:{goToSocialHomePage(){var y;if((y=t==null?void 0:t.AmityPostComposerPageBehavior)!=null&&y.goToSocialHomePage)return t.AmityPostComposerPageBehavior.goToSocialHomePage();g();}},AmityCommunityProfilePageBehavior:{goToPostComposerPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostComposerPage)return t.AmityCommunityProfilePageBehavior.goToPostComposerPage(y);f(y);},goToPostDetailPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostDetailPage)return t.AmityCommunityProfilePageBehavior.goToPostDetailPage(y);n(y.postId,y.hideTarget,y.category);}}};return X.createElement(r_.Provider,{value:h},e)},It=()=>{let e=useContext(r_);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var Bo=class Bo{constructor(){this.client=null;this.isConnected=!1;this.stateChangeHandler=null;this.disconnectedHandler=null;}static setup(t){if(!Bo.instance){Bo.instance=new Bo;let o=Client.createClient(t.apiKey,t.apiRegion,t!=null&&t.apiEndpoint?{apiEndpoint:t.apiEndpoint}:{});Bo.setClient(o);}}static registerDevice(t,o,r,n,i,a,s){return P(this,null,function*(){if(!Bo.instance)throw new Error("AmityUIKitManager must be set up first using the setup method.");Bo.instance.onConnectionStatusChange=i,Bo.instance.onConnected=a,Bo.instance.onDisconnected=s,yield Bo.instance.connectAndLogin(t,o,r,n);})}static setClient(t){if(Bo.instance)Bo.instance.client=t,Bo.instance.isConnected=!0;else throw new Error("AmityUIKitManager must be set up first using the setup method.")}connectAndLogin(t,o,r,n){return P(this,null,function*(){yield Client.login({userId:t,displayName:o,authToken:n},{sessionWillRenewAccessToken:r.sessionWillRenewAccessToken.bind(r)}),this.stateChangeHandler=Client.onSessionStateChange(i=>{var a;(a=this.onConnectionStatusChange)==null||a.call(this,i);}),this.disconnectedHandler=Client.onClientDisconnected(()=>{this.onDisconnected&&this.onDisconnected();}),this.onConnected&&this.onConnected();})}disconnect(){var t,o;(t=this.stateChangeHandler)==null||t.call(this),(o=this.disconnectedHandler)==null||o.call(this),this.client=null,this.isConnected=!1;}static getClient(){var t;return ((t=Bo.instance)==null?void 0:t.client)||null}isClientConnected(){return this.isConnected}};Bo.instance=null;var Xs=Bo;var i_=createContext([]),oi=()=>({config:useContext(i_)}),a_=({children:e})=>{let{config:t}=bd(),[o,r]=X.useState([]);return X.useEffect(()=>{if(!t)return;let n=t==null?void 0:t.message_reactions;n&&r(n);},[t]),X.createElement(i_.Provider,{value:o},e)};var Tl,Nl,Vp,s_,wd,J8,Rs=class Rs{constructor(){To(this,Vp);To(this,wd);To(this,Tl,void 0);xa(this,Tl,new Map);}static get instance(){return qo(Rs,Nl)||xa(Rs,Nl,new Rs),qo(Rs,Nl)}hasReachedLimit(t){let o=Nr(this,wd,J8).call(this,t);return qo(this,Tl).get(t)===o}markSeen(t){qo(this,Tl).set(t,Nr(this,wd,J8).call(this,t));}};Tl=new WeakMap,Nl=new WeakMap,Vp=new WeakSet,s_=function(t){let o=Lo.instance.getAdFrequencyByPlacement(t);return o==null||o.type!=="time-window"?0:o.value},wd=new WeakSet,J8=function(t){let o=mn(),r=o.startOf("day").diff(o,"minute"),n=Math.ceil(r/Nr(this,Vp,s_).call(this,t));return `${o.format("DD-MM-YYYY")}-${n}`},To(Rs,Nl,void 0);var kl=Rs;var El,_d,Md,X8,e1=class e1{constructor(){To(this,Md);To(this,_d,"amity.seenRecencyCache");}static get instance(){return qo(e1,El)||xa(e1,El,new e1),qo(e1,El)}getSeenRecencyByAdId(t){return Nr(this,Md,X8).call(this)[t]}setSeenRecencyCache(t,o){let r=Nr(this,Md,X8).call(this);r[t]=o,window.localStorage.setItem(qo(this,_d),JSON.stringify(r));}};El=new WeakMap,_d=new WeakMap,Md=new WeakSet,X8=function(){return JSON.parse(window.localStorage.getItem(qo(this,_d))||"{}")},To(e1,El,void 0);var Op=e1,Al,Pd,R8,t1=class t1{constructor(){To(this,Pd);this.isLoading=!0;this.ads=[];this.settings=null;this.subscribers=[];Client.onSessionStateChange(t=>P(this,null,function*(){if(t==="established"){let o=yield AdRepository.getNetworkAds();this.ads=o.ads,this.settings=o.settings,this.subscribers.forEach(r=>r(o)),this.isLoading=!1;}else t==="terminated"&&(this.ads=[],this.settings=null,this.subscribers.forEach(o=>o(null)));}));}static get instance(){return qo(t1,Al)||xa(t1,Al,new t1),qo(t1,Al)}onNetworkAdsData(t){!this.isLoading&&this.ads.length>0&&this.settings&&t({ads:this.ads,settings:this.settings}),this.subscribers.push(t);}getLastSeen(t){return Op.instance.getSeenRecencyByAdId(t)}markSeen(t,o){var r;Op.instance.setSeenRecencyCache(t.adId,Date.now()),((r=Nr(this,Pd,R8).call(this,o))==null?void 0:r.type)==="time-window"&&kl.instance.markSeen(o),t.analytics.markAsSeen(o);}markClicked(t,o){t.analytics.markLinkAsClicked(o);}getAdFrequencyByPlacement(t){return Nr(this,Pd,R8).call(this,t)}};Al=new WeakMap,Pd=new WeakSet,R8=function(t){if(!this.settings)return null;switch(t){case"feed":return this.settings.frequency.feed;case"comment":return this.settings.frequency.comment;case"story":return this.settings.frequency.story;default:return null}},To(t1,Al,void 0);var Lo=t1;var Bl,zp,l_,Up,m_,jp,d_,o1=class o1{constructor(){To(this,zp);To(this,Up);To(this,jp);}static get instance(){return qo(o1,Bl)||xa(o1,Bl,new o1),qo(o1,Bl)}recommendedAds({ads:t,placement:o,count:r,communityId:n}){let i=Nr(this,zp,l_).call(this,t),a=new Map;return t.forEach(s=>{var u;let l=(((u=s.targets)==null?void 0:u.communityIds)||[]).includes(n||"")?1:0,d=i.get(s.adId);if(d==null)return;let p=l+Math.pow(Math.E,2*d);a.set(s.adId,p);}),Nr(this,jp,d_).call(this,{ads:t,scores:a,count:r})}};Bl=new WeakMap,zp=new WeakSet,l_=function(t){let o=t.sort((a,s)=>Lo.instance.getLastSeen(s.adId)-Lo.instance.getLastSeen(a.adId)),r=new Map,n=Lo.instance.getLastSeen(o[o.length-1].adId);return Lo.instance.getLastSeen(o[0].adId)===n?o.forEach(a=>{r.set(a.adId,1);}):o.forEach((a,s)=>{let l=s/o.length;r.set(a.adId,l);}),r},Up=new WeakSet,m_=function(t){let o=0,r=Math.random();for(let n=0;n<t.length;n++)if(o+=t[n],r<o)return n;return t.length-1},jp=new WeakSet,d_=function({ads:t,scores:o,count:r}){let n=[...t],i=[];for(;i.length<r&&n.length>0;){let a=n.reduce((p,u)=>p+(o.get(u.adId)||0),0),s=n.map(p=>(o.get(p.adId)||0)/a),l=s.map(p=>p/s.reduce((u,f)=>u+f,0)),d=Nr(this,Up,m_).call(this,l);i.push(n[d]),n.splice(d,1);}return i},To(o1,Bl,void 0);var Hp=o1;var e7=createContext({isLoading:!0,ads:[],settings:null,saveItemsPagination:()=>{},getItemsPaginationCache:()=>{}}),u_=({children:e})=>{let[t,o]=useState(null),[r,n]=useState(!0),[i,a]=useState(new Map),s=({targetId:p,placement:u,frequencyType:f})=>p?`${f}-${u}-${f}`:`global-${u}-${f}`,l=({targetId:p,placement:u,adId:f,referenceId:g,frequencyType:h})=>{a(y=>{let C=s({targetId:p,placement:u,frequencyType:h}),v=y.get(C);return v?y.set(C,[...v,{adId:f,referenceId:g}]):y.set(C,[{adId:f,referenceId:g}]),new Map(y)});},d=({targetId:p,placement:u,frequencyType:f})=>{let g=s({targetId:p,placement:u,frequencyType:f});return i.get(g)};return useEffect(()=>{function p(){return P(this,null,function*(){Lo.instance.onNetworkAdsData(u=>{o(u),n(!1);});})}p();},[]),X.createElement(e7.Provider,{value:{isLoading:r,ads:(t==null?void 0:t.ads)||[],settings:(t==null?void 0:t.settings)||null,saveItemsPagination:l,getItemsPaginationCache:d}},e)};var t7=()=>useContext(e7).settings,f_=({count:e,placement:t,communityId:o})=>{let n=useContext(e7).ads,[i,a]=useState([]),s=t7(),l=Lo.instance.getAdFrequencyByPlacement(t);return useEffect(()=>{s!=null&&s.enabled&&((l==null?void 0:l.type)==="time-window"&&kl.instance.hasReachedLimit(t)||a(Hp.instance.recommendedAds({ads:n,placement:t,count:e,communityId:o})));},[n,e,t,o]),i};function VW({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=z4(),[a,s]=useState(!1),[l,d]=useState(n||!0),[p,u]=useState([]),[f,g]=useState(null),[h,y]=useState(!1),C=useRef(null),v=useRef(null),x=useCallback(()=>{var I;C.current&&(s(!0),(I=C.current)==null||I.call(C));},[C,a,l,d]),b=useCallback(I=>{n&&(I.data&&u(I.data),d(I.loading),y(I.hasNextPage),g(I.error),C.current=I.onNextPage,o(I));},[n,C]);useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return v.current=I,()=>{I();}},[t,n]);let S=useCallback(()=>{v.current&&v.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return v.current=I,()=>I()},[]);return {items:p,hasMore:h,isLoading:l,loadMore:x,error:f,loadMoreHasBeenCalled:a,refresh:S}}var lt=VW;function Ar(e){return e!=null}function y_(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function h_(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var OW=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function C_(e){return e==="https://"||OW.test(e)}var x_=({placement:e,pageSize:t,communityId:o,getItemId:r})=>{let n=t7(),[i,a]=useState(0),[s,l]=useState([]),[d,p]=useState(0),u=Lo.instance.getAdFrequencyByPlacement(e),f=(u==null?void 0:u.type)==="fixed"?t/u.value:1,g=f_({count:f,placement:e,communityId:o});return {combineItemsWithAds:C=>{if(!(n!=null&&n.enabled))return C;if((u==null?void 0:u.type)==="fixed"){let v=new Set(C.map(G=>r(G))),x=s.map(G=>{let U=r(G[0]);if(!v.has(U))return null;let k=C.find(ee=>r(ee)===U);return k?G.length===1?[k]:[k,G[1]]:G}).filter(Ar),b=x[0],S=(()=>{if(b){let G=C.findIndex(U=>r(U)===r(b[0]));return G===-1?0:G}return 0})(),w=[...(C||[]).slice(0,S).map(G=>[G]),...x],M=C.slice(S).filter(G=>{let U=r(G);return !w.some(k=>r(k[0])===U)}),N=i,B=d,D=M.map(G=>{if(B=B+1,!(B%u.value===0))return [G];let k=g[N];return N=N+1>g.length-1?0:N+1,[G,k]});a(N),p(B);let j=[...w,...D];return l([...w,...D]),j.length===0&&(a(0),p(0)),[...w,...D].flatMap(G=>G)}else if((u==null?void 0:u.type)==="time-window")return C.length===0?C:[...C.slice(0,1),g[0],...C.slice(1)].filter(Ar);return C},reset:()=>{a(0),l([]),p(0);}}},Td=({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0,placement:i,communityId:a,pageSize:s,getItemId:l})=>{let{combineItemsWithAds:d}=x_({placement:i,pageSize:s,communityId:a,getItemId:l}),g=lt({fetcher:e,params:t,config:r,shouldCall:n}),{items:p}=g,u=_(g,["items"]),f=useMemo(()=>d(p).flatMap(h=>h),[p]);return E(m({},u),{items:f})},b_=e=>{let a=e,{items:t}=a,o=_(a,["items"]),{combineItemsWithAds:r,reset:n}=x_(o);return {itemWithAds:useMemo(()=>r(t),[t]),reset:n}};var ZW=()=>{let[e,t]=useState([]),[o,r]=useState(!1),[n,i]=useState(null),[a,s]=useState(!1),[l,d]=useState(!1),[p,u]=useState(0),f=10,{itemWithAds:g,reset:h}=b_({items:e,pageSize:f,placement:"feed",getItemId:N=>N.postId}),y=N=>{let B=N.target;u(B.scrollTop);};function C(){return P(this,null,function*(){try{r(!0);let N=yield FeedRepository.getCustomRankingGlobalFeed({limit:10,queryToken:n||void 0}),B=(yield Promise.all(N.data.map(D=>P(this,null,function*(){var j;if(((j=D==null?void 0:D.children)==null?void 0:j.length)>0){let G=()=>{},U=yield new Promise(k=>{G=PostRepository.getPost(D.children[0],ee=>k(ee.data));});return G(),U&&["liveStream","poll","file"].includes(U.dataType)?null:D}return D})))).filter(Ar);i(N.paging.next||null),t(D=>[...D,...B]);}finally{setTimeout(()=>{r(!1);},300);}})}let v=N=>{t(B=>new Set([...B.map(j=>j.postId)]).has(N.postId)?B:[N,...B]);},x=N=>{let B=e.filter(D=>D.postId!==N);t(B);},b=N=>{let B=e.map(D=>D.postId===N.postId?m(m({},D),N):D);t(B);},S=useMemo(()=>n!==null,[n]),I=()=>{s(!0),!o&&S&&C();},w=()=>{l||(M(),d(!0));},M=()=>{t([]),i(null),C(),h();};return {itemWithAds:g,isLoading:o,prependItem:v,removeItem:x,updateItem:b,loadMore:I,hasMore:S,loadMoreHasBeenCalled:a,fetch:w,refetch:M,scrollPosition:p,onScroll:y}},I_=createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),Oa=()=>{let e=useContext(I_);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e},w_=({children:e})=>{let t=ZW();return X.createElement(I_.Provider,{value:t},e)};var JW=({apiKey:e,apiRegion:t,apiEndpoint:o,userId:r,displayName:n,postRendererConfig:i,theme:a={},children:s,socialCommunityCreationButtonVisible:l,pageBehavior:d,onConnectionStatusChange:p,onDisconnected:u,getAuthToken:f,configs:g})=>{let h=new QueryClient,[y,C]=useState(null),v=le(r),{error:x}=Ut(),b=useMemo(()=>({client:y,currentUserId:r||void 0,userRoles:(v==null?void 0:v.roles)||[]}),[y,r,v==null?void 0:v.roles]);return useEffect(()=>{P(void 0,null,function*(){let I;f&&(I=yield f());try{Xs.setup({apiKey:e,apiRegion:t,apiEndpoint:o}),Lo.instance,yield Xs.registerDevice(r,n||r,{sessionWillRenewAccessToken:M=>{f?f().then(N=>{M.renewWithAuthToken(N);}):M.renew();}},I,p,u);let w=Xs.getClient();C(w);}catch(w){console.error("Error setting up AmityUIKitManager:",w),w instanceof Error&&x({content:w.message});}});},[r,n,p,u]),y?X.createElement("div",{className:"asc-uikit"},X.createElement(QueryClientProvider,{client:h},X.createElement(gw,{initialConfig:g||vo},X.createElement(a_,null,X.createElement(u_,null,X.createElement(I0.Provider,{value:b},X.createElement(_0.Provider,{value:b},X.createElement(V4,null,X.createElement(Y4,null,X.createElement($8,{config:{socialCommunityCreationButtonVisible:l||!0}},X.createElement(j8,{config:i},X.createElement(G8,null,X.createElement(n_,{pageBehavior:d},X.createElement(Ow,null,X.createElement(w_,null,s),X.createElement(Q8,null))))))))))))))):null},XW=e=>X.createElement(Zw,{locale:"en"},X.createElement(pw,null,X.createElement(Lh,{theme:e_(e.theme)},X.createElement(Bw,null,X.createElement(hx,null,X.createElement(xw,null,X.createElement(Pv,null,X.createElement(JW,m({},e)),X.createElement(Dw,null),X.createElement(jw,null),X.createElement(bw,null),X.createElement(Sw,null)))))))),RW=XW;var oQ=()=>{let[e,t]=useState(null),o=Ut();return useEffect(()=>{e&&(o.error({content:e}),t(null));},[e]),[t]},__=oQ;var nQ=1073741824,iQ=1,n7=c.label`
|
|
1740
|
+
`;var fW=({className:e,content:t,icon:o})=>X.createElement(Uw,{className:e},o," ",t),jw=()=>{let e=Cx();return X.createElement(Ml,null,X.createElement(zw,null,e.map(t=>X.createElement(fW,E(m({},t),{key:t.id})))))};var Gw={"general.action.cancel":"Cancel","general.action.accept":"Accept","general.action.decline":"Decline","general.action.discard":"Discard","general.action.ok":"Ok","general.error.tryAgainLater":"Something went wrong. Please try again later.","general.connection.waiting":"Waiting for connection...",hello:"Hello World","plural.like":"{amount, plural, one {like} other {likes}}",comment:"Comment","plural.comment":"{amount, plural, one {comment} other {comments}}","plural.member":"{amount, plural, one {member} other {members}}",selectACategory:"Select a category",todaysTrendingTitle:"Today's Trending",loadMore:"Load More",categoryList:"Categories",recommendedList:"Recommended for you","exploreHeader.searchCommunityTitle":"Explore communities","exploreHeader.searchCommunityPlaceholder":"Search communities...","exploreHeader.createCommunityTitle":"or create your own!","exploreHeader.createCommunityButton":"Create community",backTitle:"Back",createCommunity:"Create Community",moderator:"Moderator","moderatorMenu.promoteToModerator":"Promote to moderator","moderatorMenu.dismissModerator":"Dismiss moderator","moderatorMenu.removeFromCommunity":"Remove from community","post.readMore":"...Read more","post.editPost":"Edit post","post.deletePost":"Delete post","post.confirmDelete":"This post will be permanently deleted. You\u2019ll no longer to see and find this post. Continue?","post.confirmPendingDelete":"This post will be permanently deleted from the pending list","post.edited":"Edited","post.like":"Like","post.liked":"Liked","post.unknownPost.description":"We couldn\u2019t recognize this post.","post.unknownPost.title":"Something went wrong","post.renderingError.description":"We couldn\u2019t render this post.","post.renderingError.title":"Something went wrong","post.community":"Community","post.myTimeline":"My Timeline","post.wasLive":"was live","post.success.approved":"Post approved","post.success.declined":"Post declined","post.success.submittedToReview":"Your post has been submitted to review by moderator","post.error.cannotReview.title":"Post is not available","post.error.cannotReview.description":"The post has been reviewed by another moderator","post.discard.title":"Discard post?","post.discard.content":"Do you want to discard your post?","collapsible.viewAll":"View all","collapsible.viewAllFiles":"View all files","collapsible.viewMoreComments":"View more comments","collapsible.viewMoreReplies":"View more replies","collapsible.viewMoreReply":"View {count, plural, one {# reply} other {# replies}}","community.createSuccess":"Your community was successfully created","community.updateSuccess":"Your community was successfully updated","community.editProfile":"Edit profile","community.join":"Join","community.communitySettings":"Community Settings","community.returnTo":"Return to {communityName}","community.leaveCommunityTitle":"Leave community?","community.leaveCommunityBody":"You won\u2019t no longer be able to post and interact in this community after leaving.","community.leaveCommunityBodyLastMember":"As you\u2019re the last moderator and member, choose close community to leave.","community.leaveCommunityBodyOnlyModerator":"You\u2019re the only moderator in this group. Nominate other members before leaving community.","community.leaveCommunityButtonText":"Leave","community.leaveCommunityButtonOK":"OK","community.cannotInteract":"Join community to interact with all posts","community.removeUserFromCommunityTitle":"Remove user from community","community.removeUserFromCommunityBody":"This user won't no longer be able to search, post. Continue?","community.name":"Community name","community.about":"About","community.category":"Category","community.onlyadmincanpost":">Only admin can post","community.onlyadmins":"Choose to allow Only Admins to create posts in this community.","community.categorypermission":"Community permission","community.addmembers":"Add members","community.posts":"posts","community.members":"members","community.settings":"Settings","community.leaveCommunity":"Leave Community","CommunityMembers.members":"Members","CommunityMembers.moderators":"Moderators","EmptyFeed.TargetType.globalFeed":"This feed is empty","EmptyFeed.TargetType.communityFeed":"This community's feed is empty","EmptyFeed.TargetType.userFeed":"This user's feed is empty","EmptyFeed.TargetType.myFeed":"Your feed is empty. Start your first post","EmptyFeed.exploreCommunity":"Explore Community","UserFeed.tabs.timeline":"Timeline","community.exploreCommunities":"Explore Community","community.permissions.postReview":"Post review","community.permissions.storyComments":"Story comments","community.permissions.approvePosts":"Approve member posts","community.permissions.allowStoryComments":"Allow comments on community stories","community.permissions.approvePosts.prompt":"Posts by members have to be reviewed and approved by community moderator.","community.permissions.storyComments.prompt":"Turn on to receive comments on stories in this community.","community.permissions.error.needApprovalOnPostCreation.turnOn":"Unable to turn on post review","community.permissions.error.needApprovalOnPostCreation.turnOff":"Unable to turn off post review","community.permissions.error.storyComments.turnOn":"Unable to turn on post review","community.permissions.error.storyComments.turnOff":"Unable to turn off post review","community.review.declinePendingPosts":"Decline pending post will permanently delete the selected post from community.","community.pendingPostsBanner.title":"Pending posts","community.pendingPostsBanner.pendingForReview":"Your posts are pending for review","community.pendingPostsBanner.needApproval":"{formattedAmount} {amount, plural, one {post needs} other {posts need}} approval","communityCreatedModal.title":"Customize your community","communityCreatedModal.message":"You\u2019ve successfully created a community! Now let's manage permissions that work best for you","communityCreatedModal.goToSettings":"Community settings","communityCreatedModal.skip":"Skip for now",post:"Post","upload.attachmentLimit":"You reached the maximum attachment of {maxFiles}","upload.fileSizeLimit":"One of the selected file is larger than 1GB. Please select a new file.","user.editProfile":"Edit profile","user.message":"Message","follow.placeholder.noFollowings":"No followings found","follow.placeholder.noFollowers":"No followers found","ProfileSettings.editProfile":"Edit profile","ProfileSettings.returnTo":"Return to ","SideSectionMyCommunity.myCommunity":"My Community","file.reUpload":"Click to re-upload the file","UserProfileForm.displayname":"Display name","UserProfileForm.about":"About","UserProfileForm.title":"General","UserProfileForm.namePlaceholder":"Enter user display name","UserProfileForm.requiredDisplayName":"Display name is required","UserProfileForm.requiredDescription":"Enter something about yourself","UserSelector.placeholder":"Select user...","report.reportUser":"Report user","report.unreportUser":"Unreport user","report.reportComment":"Report comment","report.unreportComment":"Unreport comment","report.reportSent":"Report sent","report.unreportSent":"Unreport sent","comment.deleted":"This comment has been deleted","comment.delete":"Delete comment","comment.edit":"Edit comment","comment.deleteConfirmContent":"This comment will be permanently deleted. Continue?","comment.deleteConfirmCancelText":"Cancel","comment.deleteConfirmOkText":"Delete","dropdown.first":"First","dropdown.second":"Second","layout.logout":"Log Out","layout.username":"Jackies","chat.details.chatDetailes":"Chat Detail","chat.details.communityName":"Community Name","message.flag":"flag","message.unflag":"Unflag","message.edit":"Edit","message.delete":"Delete","message.deleted":"deleted","message.unsupportedFormat":"Unsupported message format","message.saveOptionsError":"There was an error processing your request","MessageComposeBar.placeholder":"Type your message...","RecentChat.chats":"Chats","AddMemberModal.addMembers":"Add members","AddMemberModal.membersValidationError":"Please select at least one member",add:"Add",save:"Save",close:"Close",reply:"Reply",delete:"Delete",create:"Create",cancel:"Cancel",loading:"Loading...","loading.chat":"Loading chat...",anonymous:"Anonymous","comment.edited":"Edited","comment.readmore":"...Read more","communities.nocommunityfound":"No community found","profile.setting":"Profile Settings","sidesectioncommunity.newfeed":"NewsFeed","sidesectioncommunity.explore":"Explore","sidesectioncommunity.community":"Community","communityFeed.join":"Join community to interact with all posts","communityFeed.members":"Members","communityFeed.moderators":"Moderators","files.all":"View all files","sidebar.community":"Community","sidebar.explore":"Explore","CategoryCommunitiesList.emptyTitle":"It's empty here...","CategoryCommunitiesList.emptyDescription":"No community found in this category","CommentComposeBar.addComment":"Add comment","CommentComposeBar.replayTo":"Reply to ","CommentComposeBar.replayToUser":"Replying to {displayName}","CommentComposeBar.saySomething":"Say something nice","CommentComposeBar.unableToPost":"Unable to post","CommentComposeBar.overCharacter":"You have reached maximum 50,000 characters in a post.","CommentComposeBar.done":"Done","CommentComposeBar.unableToMention":"Unable to mention","CommentComposeBar.overMentionees":"You have reached maximum 30 mentioned users in a post.","CommentComposeBar.okText":"OK","CommunityCreationModal.title":"Leave without finishing?","CommunityCreationModal.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","CommunityCreationModal.cancelText":"Continue editing","CommunityCreationModal.okText":"Leave","PostAsCommunity.title":"Post as community","PostAsCommunity.caption":"Enable this will publish the post on behalf of community account","AddMemberAction.title":"Add members","AddMemberAction.description":"Add your friends to this community to participate in group conversations","CloseCommunityAction.closeConfirm.title":"Close community?","CloseCommunityAction.closeConfirm.description":"All members will be removed from the community. All posts, messages, reactions and media shared in community will be deleted. This cannot be undone.","CloseCommunityAction.title":"Close community","CloseCommunityAction.description":"Closing this community will remove the community page and all its content and comments. This cannot be undone.","report.doReport":"Report","report.undoReport":"Undo Report","comment.deleteBody":"This comment will be permanently removed.","reply.delete":"Delete reply","reply.deleteBody":"This reply will be permanently deleted. Continue?","reply.edit":"Edit reply","reply.deleted":"This reply has been deleted","tabs.editProfile":"Edit profile","tabs.timeline":"Timeline","tabs.followers":"Followers","tabs.followings":"Followings","tabs.pending":"Pending","tabs.members":"Members","tabs.moderators":"Moderators","tabs.pendingPosts":"Pending {amount, select, 0 {} other { ({formattedAmount})}}","tabs.permissions":"Permissions","tabs.gallery":"Gallery","tabs.images":"Photos","tabs.videos":"Videos","tabs.liveStreams":"Livestreams","feed.emptyFeed":"This feed is empty","feed.emptyCommunityPublicFeed":"This community's feed is empty","feed.emptyCommunityReviewingFeed":"No pending posts","feed.emptyJoinedCommunityPublicFeed":"Your feed is empty. Start you first post","feed.emptyUserFeed":"No posts yet","feed.emptyMyFeed":"Your feed is empty. Start your first post","chat.groupSetting":"Group settings","chat.message.deleted":"Message was deleted","chat.message.unsupported":"Unsupported message type","chat.chats":"Chats","chat.details.header":"Chat Details","chat.details.chatName":"Chat Name","chat.leaveChat":"Leave chat","chat.leaveChat.confirm.title":"Leave chat","chat.leaveChat.confirm.content":"Are you sure you want to leave the chat?","chat.leaveChat.confirm.okButton":"Leave","chat.leaveChat.success":"You successfully left chat","chat.leaveChat.error":"Attempt to leave a chat has failed","chat.members.return":"Return to controls","chat.members.count":"{count} members","chat.create.modalTitle":"Create new chat","chat.loading.error":"Couldn't load chat","userSelector.placeholder":"Enter name or email addresses","userSelector.emptyState.title":"It's empty here...","userSelector.emptyState.description":"No contact found here","groupChat.createPopup.fieldName":"Group name","groupChat.createPopup.placeholder":"Please input group name","general.cancel.capital":"Cancel","general.create.capital":"Create","general.done.capital":"Done","chat.member.addMore":"Add or Remove user","video.notReady":"The video is being processed. Please try again later.","liveStream.idle":"This stream is currently unavailable","liveStream.ended.caption":"This liveStream has ended.","liveStream.ended.message":"Playback will be available for you to watch shortly.","user.follow":"Follow","user.unfollow":"Unfollow","user.unfollow.confirm.title":"Unfollow {displayName}","user.unfollow.confirm.body":"You\u2019ll have to send a request again to follow {displayName}. Continue?","user.cancel_follow":"Cancel request","placeholder.noResults":"No results found","request.accept":"Accept","request.decline":"Decline","follower.title.removeUser":"Remove {displayName} from followers?","follower.body.removeUser":"We will not notify {displayName} that they've been removed from your followers","follower.menuItem.removeUser":"Remove user","follower.menuItem.unfollow":"Unfollow","buttonText.cancel":"Cancel","buttonText.remove":"Remove","follow.pendingNotification.title":"Pending requests","follow.pendingNotification.body":"Your requests are waiting for review","notification.done":"Done","counter.followings":"following","counter.followers":"followers","buttonText.unfollow":"Unfollow","privateFeed.title":"This account is private","privateFeed.body":"Follow this user to see all posts","navigationBlocker.title":"Unsaved changes","navigationBlocker.content":"Your changes won`t be saved. Are you sure you want to leave this page now?","user.unfollow.confirm.title.thisUser":"Unfollow this user","mediaGallery.images.empty":"No photos yet","mediaGallery.liveStreams.empty":"No liveStreams yet","mediaGallery.videos.empty":"No videos yet","user.unfollow.confirm.body.thisUser":"You\u2019ll have to send a request again to follow this user. Continue?","navigationBlocker.okText":"Leave","options_composer.button.add":"Add Option","options_composer.title":"Create at least 2 options","poll_modal.answer_type.title":"Selection type","poll_modal.answer_type.body":"Choose to vote with one or multiple options","poll_modal.closed_in.title":"Schedule poll (Optional)","poll_modal.closed_in.body":"Poll will be automatically closed at the end of chosen time frame (UTC)","select.answerType.item":"{answerType} selection","poll_composer.question.label":"Poll options","poll_composer.question.placeholder":"What\u2019s your poll question?","poll_composer.poll_options.label":"Options","poll_modal.title":"Create poll","poll.votes":"{voteCount} votes","poll.vote.closedIn":"Poll ends in {closedIn} days","poll.vote.finalResults":"Final results","poll.vote.submit":"Submit vote","poll.error.deletedOrClosed":"This poll has been closed or deleted.","poll.close":"Close poll","postCreator.unableToPost":"Unable to post","postCreator.overCharacter":"You have reached maximum 50,000 characters in a post.","postCreator.done":"Done","postCreator.unableToMention":"Unable to mention","postCreator.overMentionees":"You have reached maximum 30 mentioned users in a post.","postCreator.okText":"OK","pollComposer.unableToMention":"Unable to mention","pollComposer.overMentionees":"You have reached maximum 30 mentioned users in a post.","pollComposer.okText":"OK","storyCreation.hyperlink.bottomSheet.cancel":"Cancel","storyCreation.hyperlink.bottomSheet.title":"Add link","storyCreation.hyperlink.bottomSheet.submit":"Done","storyCreation.hyperlink.form.urlLabel":"URL","storyCreation.hyperlink.form.urlPlaceholder":"https://example.com","storyCreation.hyperlink.form.linkTextLabel":"Customize link text","storyCreation.hyperlink.form.linkTextPlaceholder":"Name your link","storyCreation.hyperlink.form.linkTextDescription":"This text will show on the link instead of URL.","storyCreation.hyperlink.form.removeButton":"Remove link","storyCreation.hyperlink.removeConfirm.title":"Remove link","storyCreation.hyperlink.removeConfirm.content":"This link will be removed from story.","storyCreation.hyperlink.removeConfirm.cancel":"Cancel","storyCreation.hyperlink.removeConfirm.confirm":"Remove","storyCreation.hyperlink.validation.error.invalidUrl":"Please enter a valid URL.","storyCreation.hyperlink.validation.error.whitelisted":"Please enter a whitelisted URL.","storyCreation.hyperlink.validation.error.blocked":"Your text contains a blocklisted word.","storyCreation.hyperlink.unsavedChanges.title":"Unsaved changes","storyCreation.hyperlink.unsavedChanges.content":"Are you sure you want to cancel? Your changes won't be saved.","storyCreation.hyperlink.unsavedChanges.cancel":"No","storyCreation.hyperlink.unsavedChanges.confirm":"Yes","storyViewer.actions.deleteStory":"Delete story","storyViewer.action.confirmModal.title":"Delete this story?","storyViewer.action.confirmModal.content":"This story will be permanently deleted. You\u2019ll no longer to see and find this story.","storyViewer.notification.deleted":"Story deleted","storyViewer.notification.success":"Successfully shared story","storyViewer.notification.error":"Failed to share story","storyViewer.footer.failed":"Failed to upload","storyViewer.footer.uploading":"Uploading...","storyViewer.commentSheet.title":"Comments","storyViewer.commentSheet.empty":"No comments yet","storyViewer.commentSheet.disabled":"Comments are disabled for this story","storyViewer.commentSheet.replyingTo":"Replying to","storyViewer.toast.like.disabled":"Join community to interact with all stories","storyViewer.toast.comment.reported":"Comment reported","storyViewer.toast.comment.unreported":"Comment unreported","storyViewer.toast.disable.react":"Join community to interact with all stories","storyViewer.commentComposeBar.submit":"Post","storyDraft.button.shareStory":"Share story","storyDraft.notification.hyperlink.error":"Can\u2019t add more than one link to your story.","storyTab.title":"Story","select.chatType.item":"{answerType} type","chatComposer.label.channelId":"Channel ID","chatComposer.label.displayName":"Display Name","chatComposer.label.type":"Channel Type","chatComposer.addUsers":"Add users","chat_modal.title":"Create chat","chat_composer.placeholder.displayName":"Enter display name here","chat_composer.placeholder.channelId":"Enter channel ID here","editChatMembersModal.title":"Add/Edit chat members","editChatMembersModal.confirm.title":"Leave without finishing?","editChatMembersModal.confirm.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","editChatMembersModal.confirm.cancelText":"Continue editing","editChatMembersModal.confirm.okText":"Leave","notification.error.blockedWord":"Amity SDK (400308): Text contain blocked word","livechat.deleted.message":"This message was deleted","livechat.messageBubble.reply.button":"Reply","livechat.messageBubble.copy.button":"Copy","livechat.messageBubble.delete.button":"Delete","livechat.messageBubble.mention.button":"Mention","livechat.messageBubble.report.button":"Report","livechat.messageBubble.unReport.button":"Unreport","livechat.channel.muted":"This channel has been set to read-only by the channel moderator","livechat.modal.delete.message.title":"Delete this message?","livechat.modal.delete.message.content":"This message will also be removed from your friend\u2019s devices.","livechat.mention.all":"All","livechat.mention.all.description":"Notify everyone","livechat.notification.copy.message":"Message copied","livechat.composebar.placeholder":"Write a message","livechat.delete.message.error":"Unable to delete message. Please try again.","livechat.member.muted":"You\u2019ve been muted by the channel moderator","livechat.member.muted.error":"User is muted","livechat.member.banned.title":"You are banned from chat","livechat.member.banned.description":"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned.","livechat.report.message.success":"Message reported","livechat.report.message.error":"This message failed to be reported. Please try again.","livechat.unReport.message.success":"Message unreported","livechat.unReport.message.error":"This message failed to be unreported. Please try again.","livechat.error.tooLongMessage.title":"Unable to send message","livechat.error.tooLongMessage.description":"Your message is too long. Please shorten your message and try again.","livechat.error.sendingMessage.error":"Your message wasn't sent. Please try again.","livechat.error.sendingMessage.blockedWord":"Your message wasn't sent as it contains a blocked word.","livechat.error.sendingMessage.notAllowLink":"Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.","livechat.reaction.errorOnload":"Unable to load reactions","livechat.reaction.emptyState":"No reactions yet","livechat.reaction.emptyState.description":"Be the first to react to this message!","livechat.reaction.label.removeReaction":"Click to remove reaction"};var Fp={en:Gw};var $w="en",CW=({locale:e,children:t})=>{let o=Fp[e]?Fp[e]:Fp[$w];return X.createElement(IntlProvider,{defaultLocale:$w,locale:e,messages:o},t)},Zw=CW;var vW={palette:{alert:"#FA4D30",base:"#292B32",primary:"#1054DE",secondary:"#FFD400",tertiary:"#FF305A",neutral:"#17181C",highlight:"#1054DE",system:{borders:"#ebecef",background:"#fff"}},typography:{global:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif",fontStyle:"normal"},headline:{fontWeight:600,fontSize:"20px"},title:{fontWeight:600,fontSize:"16px"},subTitle:{fontWight:400,fontSize:"13px"},body:{fontWeight:"normal",fontSize:"14px"},bodyBold:{fontWeight:600,fontSize:"14px"},caption:{fontWeight:"normal",fontSize:"12px"},captionBold:{fontWeight:600,fontSize:"12px"}}},qw=vW;var Qw=e=>e.toFixed(1),Yw=e=>{let t=Math.min(e*100,100);return Qw(t)};function xW(e){return e.alpha!==void 0}var Kw=e=>{let{hue:t,saturation:o,lightness:r}=e,n=[`${Qw(t)}`,`${Yw(o)}%`,`${Yw(r)}%`];return xW(e)?`hsla(${[...n,e.alpha].filter(et).join(",")})`:`hsl(${n.filter(et).join(",")})`},bW=e=>{let t=parseToHsl(e);return Kw(t)},IW=(e,t)=>{let o=parseToHsl(t),{lightness:r}=o,n=E(m({},o),{lightness:Math.min(1,r+e)});return Kw(n)},wW=[.25,.4,.5,.75],Jw=e=>{let i=e,{system:t}=i,o=_(i,["system"]),r=Object.keys(o).reduce((a,s)=>(a[s]={main:bW(o[s])},a),m({},o)),n=Object.keys(r).reduce((a,s)=>{let l=o[s],d=wW.reduce((u,f,g)=>{let h=`shade${g+1}`;return u[h]=IW(f,l),u},{}),p=r[s];return p&&typeof p=="object"?a[s]=m(m({},d),p):a[s]=E(m({},d),{main:p}),a},m({},r));return E(m({},n),{system:t})};var _W=["fontFamily","fontStyle","fontWeight","fontSize"],MW=e=>Object.keys(e).reduce((o,r)=>{let n=e[r];return r&&n&&_W.includes(r)&&(o[r]=n),o},{}),Xw=e=>Object.keys(e).reduce((o,r)=>(o[r]=MW(m(m({},e.global),e[r])),o),{});var Rw={colors:{primary:{default:"#1054DE",shade1:"#4A82F2",shade2:"#A0BDF8",shade3:"#D9E5FC",shade4:"#FFFFFF"},secondary:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},base:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},baseInverse:{default:"#FFFFFF"},alert:{default:"#FA4D30"},highlight:"#1054DE",messageBubble:{default:"#1054DE",inverse:"#FFFFFF"},storyIndicator:{default:"#EBECEF",active:["#339AF9","#78FA58"]},hyperlink:{default:"#FFFFFFCC"},actionButton:{default:"#00000080"}},typography:{heading:{fontWeight:600,fontSize:"1.25rem",lineHeight:"1.5rem"},title:{fontWeight:600,fontSize:"1rem",lineHeight:"1.25rem"},subTitle:{fontWeight:400,fontSize:"0.8125rem",lineHeight:"1rem"},body:{fontWeight:"normal",fontSize:"0.875rem",lineHeight:"1.25rem"},bodyBold:{fontWeight:600,fontSize:"0.875rem",lineHeight:"1.25rem"},caption:{fontWeight:"normal",fontSize:"0.75rem",lineHeight:"1rem"},captionBold:{fontWeight:600,fontSize:"0.75rem",lineHeight:"1rem"}}};var SW=(e={})=>{let t=PW(qw,e),o=Jw(t.palette),r=Xw(t.typography);return E(m({},t),{palette:o,typography:r,v4:Rw})},e_=SW;var r_=X.createContext(void 0),n_=({children:e,pageBehavior:t={}})=>{let{page:o,onBack:r,goToPostDetailPage:n,goToCommunityProfilePage:i,goToUserProfilePage:a,goToViewStoryPage:s,onChangePage:l,goToSelectPostTargetPage:d,goToStoryTargetSelectionPage:p,goToStoryCreationPage:u,goToPostComposerPage:f,goToSocialHomePage:g}=ye(),h={AmityStoryViewPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&y.onCloseAction)return t.AmityStoryViewPageBehavior.onCloseAction();l("SocialHomePage");},hyperLinkAction:y=>{var C;if((C=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&C.hyperLinkAction)return t.AmityStoryViewPageBehavior.hyperLinkAction(y)}},AmityDraftStoryPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityDraftStoryPageBehavior)!=null&&y.onCloseAction)return t.AmityDraftStoryPageBehavior.onCloseAction();o.type==="DraftPage"&&o.context.storyType==="communityFeed"?i(o.context.targetId):g();}},onClickHyperLink:()=>{},AmitySocialHomePageBehavior:{},AmityGlobalFeedComponentBehavior:{goToPostDetailPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToPostDetailPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToPostDetailPage(y);n(y.postId);},goToViewStoryPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToViewStoryPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToViewStoryPage(y);s({targetId:y.targetId,targetType:y.targetType,storyType:y.storyType});}},AmityPostDetailPageBehavior:{},AmityPostContentComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityPostContentComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);},goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityPostContentComponentBehavior.goToUserProfilePage(y);a(y.userId);},goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToPostComposerPage)return t.AmityPostContentComponentBehavior.goToPostComposerPage(y);f(y);}},AmitySocialGlobalSearchPageBehavior:{},AmityCommunitySearchResultComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityCommunitySearchResultComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityCommunitySearchResultComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);}},AmityUserSearchResultComponentBehavior:{goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityUserSearchResultComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityUserSearchResultComponentBehavior.goToUserProfilePage(y);a(y.userId);}},AmityCreatePostMenuComponentBehavior:{goToSelectPostTargetPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToSelectPostTargetPage)return t.AmityCreatePostMenuComponentBehavior.goToSelectPostTargetPage();d();},goToStoryTargetSelectionPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToStoryTargetSelectionPage)return t.AmityCreatePostMenuComponentBehavior.goToStoryTargetSelectionPage();p();}},AmityPostTargetSelectionPage:{goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostTargetSelectionPage)!=null&&C.goToPostComposerPage)return t.AmityPostTargetSelectionPage.goToPostComposerPage(y);f(y);}},AmityStoryTargetSelectionPage:{goToStoryCreationPage:y=>{var C;if((C=t==null?void 0:t.AmityStoryTargetSelectionPage)!=null&&C.goToStoryCreationPage)return t.AmityStoryTargetSelectionPage.goToStoryCreationPage(y);u(y);}},AmityPostComposerPageBehavior:{goToSocialHomePage(){var y;if((y=t==null?void 0:t.AmityPostComposerPageBehavior)!=null&&y.goToSocialHomePage)return t.AmityPostComposerPageBehavior.goToSocialHomePage();g();}},AmityCommunityProfilePageBehavior:{goToPostComposerPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostComposerPage)return t.AmityCommunityProfilePageBehavior.goToPostComposerPage(y);f(y);},goToPostDetailPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostDetailPage)return t.AmityCommunityProfilePageBehavior.goToPostDetailPage(y);n(y.postId,y.hideTarget,y.category);}}};return X.createElement(r_.Provider,{value:h},e)},It=()=>{let e=useContext(r_);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var Bo=class Bo{constructor(){this.client=null;this.isConnected=!1;this.stateChangeHandler=null;this.disconnectedHandler=null;}static setup(t){if(!Bo.instance){Bo.instance=new Bo;let o=Client.createClient(t.apiKey,t.apiRegion,t!=null&&t.apiEndpoint?{apiEndpoint:t.apiEndpoint}:{});Bo.setClient(o);}}static registerDevice(t,o,r,n,i,a,s){return P(this,null,function*(){if(!Bo.instance)throw new Error("AmityUIKitManager must be set up first using the setup method.");Bo.instance.onConnectionStatusChange=i,Bo.instance.onConnected=a,Bo.instance.onDisconnected=s,yield Bo.instance.connectAndLogin(t,o,r,n);})}static setClient(t){if(Bo.instance)Bo.instance.client=t,Bo.instance.isConnected=!0;else throw new Error("AmityUIKitManager must be set up first using the setup method.")}connectAndLogin(t,o,r,n){return P(this,null,function*(){yield Client.login({userId:t,displayName:o,authToken:n},{sessionWillRenewAccessToken:r.sessionWillRenewAccessToken.bind(r)}),this.stateChangeHandler=Client.onSessionStateChange(i=>{var a;(a=this.onConnectionStatusChange)==null||a.call(this,i);}),this.disconnectedHandler=Client.onClientDisconnected(()=>{this.onDisconnected&&this.onDisconnected();}),this.onConnected&&this.onConnected();})}disconnect(){var t,o;(t=this.stateChangeHandler)==null||t.call(this),(o=this.disconnectedHandler)==null||o.call(this),this.client=null,this.isConnected=!1;}static getClient(){var t;return ((t=Bo.instance)==null?void 0:t.client)||null}isClientConnected(){return this.isConnected}};Bo.instance=null;var Xs=Bo;var i_=createContext([]),oi=()=>({config:useContext(i_)}),a_=({children:e})=>{let{config:t}=bd(),[o,r]=X.useState([]);return X.useEffect(()=>{if(!t)return;let n=t==null?void 0:t.message_reactions;n&&r(n);},[t]),X.createElement(i_.Provider,{value:o},e)};var Tl,Nl,Vp,s_,wd,J8,Rs=class Rs{constructor(){To(this,Vp);To(this,wd);To(this,Tl,void 0);xa(this,Tl,new Map);}static get instance(){return qo(Rs,Nl)||xa(Rs,Nl,new Rs),qo(Rs,Nl)}hasReachedLimit(t){let o=Nr(this,wd,J8).call(this,t);return qo(this,Tl).get(t)===o}markSeen(t){qo(this,Tl).set(t,Nr(this,wd,J8).call(this,t));}};Tl=new WeakMap,Nl=new WeakMap,Vp=new WeakSet,s_=function(t){let o=Lo.instance.getAdFrequencyByPlacement(t);return o==null||o.type!=="time-window"?0:o.value},wd=new WeakSet,J8=function(t){let o=mn(),r=o.startOf("day").diff(o,"minute"),n=Math.ceil(r/Nr(this,Vp,s_).call(this,t));return `${o.format("DD-MM-YYYY")}-${n}`},To(Rs,Nl,void 0);var kl=Rs;var El,_d,Md,X8,e1=class e1{constructor(){To(this,Md);To(this,_d,"amity.seenRecencyCache");}static get instance(){return qo(e1,El)||xa(e1,El,new e1),qo(e1,El)}getSeenRecencyByAdId(t){if(t)return Nr(this,Md,X8).call(this)[t]}setSeenRecencyCache(t,o){let r=Nr(this,Md,X8).call(this);r[t]=o,window.localStorage.setItem(qo(this,_d),JSON.stringify(r));}};El=new WeakMap,_d=new WeakMap,Md=new WeakSet,X8=function(){return JSON.parse(window.localStorage.getItem(qo(this,_d))||"{}")},To(e1,El,void 0);var Op=e1,Al,Pd,R8,t1=class t1{constructor(){To(this,Pd);this.isLoading=!0;this.ads=[];this.settings=null;this.subscribers=[];Client.onSessionStateChange(t=>P(this,null,function*(){if(t==="established"){let o=yield AdRepository.getNetworkAds();this.ads=o.ads,this.settings=o.settings,this.subscribers.forEach(r=>r(o)),this.isLoading=!1;}else t==="terminated"&&(this.ads=[],this.settings=null,this.subscribers.forEach(o=>o(null)));}));}static get instance(){return qo(t1,Al)||xa(t1,Al,new t1),qo(t1,Al)}onNetworkAdsData(t){!this.isLoading&&this.ads.length>0&&this.settings&&t({ads:this.ads,settings:this.settings}),this.subscribers.push(t);}getLastSeen(t){return Op.instance.getSeenRecencyByAdId(t)}markSeen(t,o){var r;Op.instance.setSeenRecencyCache(t.adId,Date.now()),((r=Nr(this,Pd,R8).call(this,o))==null?void 0:r.type)==="time-window"&&kl.instance.markSeen(o),t.analytics.markAsSeen(o);}markClicked(t,o){t.analytics.markLinkAsClicked(o);}getAdFrequencyByPlacement(t){return Nr(this,Pd,R8).call(this,t)}};Al=new WeakMap,Pd=new WeakSet,R8=function(t){if(!this.settings)return null;switch(t){case"feed":return this.settings.frequency.feed;case"comment":return this.settings.frequency.comment;case"story":return this.settings.frequency.story;default:return null}},To(t1,Al,void 0);var Lo=t1;var Bl,zp,l_,Up,m_,jp,d_,o1=class o1{constructor(){To(this,zp);To(this,Up);To(this,jp);}static get instance(){return qo(o1,Bl)||xa(o1,Bl,new o1),qo(o1,Bl)}recommendedAds({ads:t,placement:o,count:r,communityId:n}){let i=Nr(this,zp,l_).call(this,t),a=new Map;return t.forEach(s=>{var u;let l=(((u=s.targets)==null?void 0:u.communityIds)||[]).includes(n||"")?1:0,d=i.get(s.adId);if(d==null)return;let p=l+Math.pow(Math.E,2*d);a.set(s.adId,p);}),Nr(this,jp,d_).call(this,{ads:t,scores:a,count:r})}};Bl=new WeakMap,zp=new WeakSet,l_=function(t){var a;let o=t.sort((s,l)=>{var u,f;let d=(u=Lo.instance.getLastSeen(s.adId))!=null?u:0;return ((f=Lo.instance.getLastSeen(l.adId))!=null?f:0)-d}),r=new Map,n=Lo.instance.getLastSeen((a=o==null?void 0:o[o.length-1])==null?void 0:a.adId);return Lo.instance.getLastSeen(o[0].adId)===n?o.forEach(s=>{r.set(s.adId,1);}):o.forEach((s,l)=>{let d=l/o.length;r.set(s.adId,d);}),r},Up=new WeakSet,m_=function(t){let o=0,r=Math.random();for(let n=0;n<t.length;n++)if(o+=t[n],r<o)return n;return t.length-1},jp=new WeakSet,d_=function({ads:t,scores:o,count:r}){let n=[...t],i=[];for(;i.length<r&&n.length>0;){let a=n.reduce((p,u)=>p+(o.get(u.adId)||0),0),s=n.map(p=>(o.get(p.adId)||0)/a),l=s.map(p=>p/s.reduce((u,f)=>u+f,0)),d=Nr(this,Up,m_).call(this,l);i.push(n[d]),n.splice(d,1);}return i},To(o1,Bl,void 0);var Hp=o1;var e7=createContext({isLoading:!0,ads:[],settings:null,saveItemsPagination:()=>{},getItemsPaginationCache:()=>{}}),u_=({children:e})=>{let[t,o]=useState(null),[r,n]=useState(!0),[i,a]=useState(new Map),s=({targetId:p,placement:u,frequencyType:f})=>p?`${f}-${u}-${f}`:`global-${u}-${f}`,l=({targetId:p,placement:u,adId:f,referenceId:g,frequencyType:h})=>{a(y=>{let C=s({targetId:p,placement:u,frequencyType:h}),v=y.get(C);return v?y.set(C,[...v,{adId:f,referenceId:g}]):y.set(C,[{adId:f,referenceId:g}]),new Map(y)});},d=({targetId:p,placement:u,frequencyType:f})=>{let g=s({targetId:p,placement:u,frequencyType:f});return i.get(g)};return useEffect(()=>{function p(){return P(this,null,function*(){Lo.instance.onNetworkAdsData(u=>{o(u),n(!1);});})}p();},[]),X.createElement(e7.Provider,{value:{isLoading:r,ads:(t==null?void 0:t.ads)||[],settings:(t==null?void 0:t.settings)||null,saveItemsPagination:l,getItemsPaginationCache:d}},e)};var t7=()=>useContext(e7).settings,f_=({count:e,placement:t,communityId:o})=>{let n=useContext(e7).ads,[i,a]=useState([]),s=t7(),l=Lo.instance.getAdFrequencyByPlacement(t);return useEffect(()=>{s!=null&&s.enabled&&((l==null?void 0:l.type)==="time-window"&&kl.instance.hasReachedLimit(t)||a(Hp.instance.recommendedAds({ads:n,placement:t,count:e,communityId:o})));},[n,e,t,o]),i};function VW({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=z4(),[a,s]=useState(!1),[l,d]=useState(n||!0),[p,u]=useState([]),[f,g]=useState(null),[h,y]=useState(!1),C=useRef(null),v=useRef(null),x=useCallback(()=>{var I;C.current&&(s(!0),(I=C.current)==null||I.call(C));},[C,a,l,d]),b=useCallback(I=>{n&&(I.data&&u(I.data),d(I.loading),y(I.hasNextPage),g(I.error),C.current=I.onNextPage,o(I));},[n,C]);useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return v.current=I,()=>{I();}},[t,n]);let S=useCallback(()=>{v.current&&v.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return v.current=I,()=>I()},[]);return {items:p,hasMore:h,isLoading:l,loadMore:x,error:f,loadMoreHasBeenCalled:a,refresh:S}}var lt=VW;function Ar(e){return e!=null}function y_(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function h_(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var OW=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function C_(e){return e==="https://"||OW.test(e)}var x_=({placement:e,pageSize:t,communityId:o,getItemId:r})=>{let n=t7(),[i,a]=useState(0),[s,l]=useState([]),[d,p]=useState(0),u=Lo.instance.getAdFrequencyByPlacement(e),f=(u==null?void 0:u.type)==="fixed"?t/u.value:1,g=f_({count:f,placement:e,communityId:o});return {combineItemsWithAds:C=>{if(!(n!=null&&n.enabled))return C;if((u==null?void 0:u.type)==="fixed"){let v=new Set(C.map(G=>r(G))),x=s.map(G=>{let U=r(G[0]);if(!v.has(U))return null;let k=C.find(ee=>r(ee)===U);return k?G.length===1?[k]:[k,G[1]]:G}).filter(Ar),b=x[0],S=(()=>{if(b){let G=C.findIndex(U=>r(U)===r(b[0]));return G===-1?0:G}return 0})(),w=[...(C||[]).slice(0,S).map(G=>[G]),...x],M=C.slice(S).filter(G=>{let U=r(G);return !w.some(k=>r(k[0])===U)}),N=i,B=d,D=M.map(G=>{if(B=B+1,!(B%u.value===0))return [G];let k=g[N];return N=N+1>g.length-1?0:N+1,[G,k]});a(N),p(B);let j=[...w,...D];return l([...w,...D]),j.length===0&&(a(0),p(0)),[...w,...D].flatMap(G=>G)}else if((u==null?void 0:u.type)==="time-window")return C.length===0?C:[...C.slice(0,1),g[0],...C.slice(1)].filter(Ar);return C},reset:()=>{a(0),l([]),p(0);}}},Td=({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0,placement:i,communityId:a,pageSize:s,getItemId:l})=>{let{combineItemsWithAds:d}=x_({placement:i,pageSize:s,communityId:a,getItemId:l}),g=lt({fetcher:e,params:t,config:r,shouldCall:n}),{items:p}=g,u=_(g,["items"]),f=useMemo(()=>d(p).flatMap(h=>h),[p]);return E(m({},u),{items:f})},b_=e=>{let a=e,{items:t}=a,o=_(a,["items"]),{combineItemsWithAds:r,reset:n}=x_(o);return {itemWithAds:useMemo(()=>r(t),[t]),reset:n}};var ZW=()=>{let[e,t]=useState([]),[o,r]=useState(!1),[n,i]=useState(null),[a,s]=useState(!1),[l,d]=useState(!1),[p,u]=useState(0),f=10,{itemWithAds:g,reset:h}=b_({items:e,pageSize:f,placement:"feed",getItemId:N=>N.postId}),y=N=>{let B=N.target;u(B.scrollTop);};function C(){return P(this,null,function*(){try{r(!0);let N=yield FeedRepository.getCustomRankingGlobalFeed({limit:10,queryToken:n||void 0}),B=(yield Promise.all(N.data.map(D=>P(this,null,function*(){var j;if(((j=D==null?void 0:D.children)==null?void 0:j.length)>0){let G=()=>{},U=yield new Promise(k=>{G=PostRepository.getPost(D.children[0],ee=>k(ee.data));});return G(),U&&["liveStream","poll","file"].includes(U.dataType)?null:D}return D})))).filter(Ar);i(N.paging.next||null),t(D=>[...D,...B]);}finally{setTimeout(()=>{r(!1);},300);}})}let v=N=>{t(B=>new Set([...B.map(j=>j.postId)]).has(N.postId)?B:[N,...B]);},x=N=>{let B=e.filter(D=>D.postId!==N);t(B);},b=N=>{let B=e.map(D=>D.postId===N.postId?m(m({},D),N):D);t(B);},S=useMemo(()=>n!==null,[n]),I=()=>{s(!0),!o&&S&&C();},w=()=>{l||(M(),d(!0));},M=()=>{t([]),i(null),C(),h();};return {itemWithAds:g,isLoading:o,prependItem:v,removeItem:x,updateItem:b,loadMore:I,hasMore:S,loadMoreHasBeenCalled:a,fetch:w,refetch:M,scrollPosition:p,onScroll:y}},I_=createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),Oa=()=>{let e=useContext(I_);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e},w_=({children:e})=>{let t=ZW();return X.createElement(I_.Provider,{value:t},e)};var JW=({apiKey:e,apiRegion:t,apiEndpoint:o,userId:r,displayName:n,postRendererConfig:i,theme:a={},children:s,socialCommunityCreationButtonVisible:l,pageBehavior:d,onConnectionStatusChange:p,onDisconnected:u,getAuthToken:f,configs:g})=>{let h=new QueryClient,[y,C]=useState(null),v=le(r),{error:x}=Ut(),b=useMemo(()=>({client:y,currentUserId:r||void 0,userRoles:(v==null?void 0:v.roles)||[]}),[y,r,v==null?void 0:v.roles]);return useEffect(()=>{P(void 0,null,function*(){let I;f&&(I=yield f());try{Xs.setup({apiKey:e,apiRegion:t,apiEndpoint:o}),Lo.instance,yield Xs.registerDevice(r,n||r,{sessionWillRenewAccessToken:M=>{f?f().then(N=>{M.renewWithAuthToken(N);}):M.renew();}},I,p,u);let w=Xs.getClient();C(w);}catch(w){console.error("Error setting up AmityUIKitManager:",w),w instanceof Error&&x({content:w.message});}});},[r,n,p,u]),y?X.createElement("div",{className:"asc-uikit"},X.createElement(QueryClientProvider,{client:h},X.createElement(gw,{initialConfig:g||vo},X.createElement(a_,null,X.createElement(u_,null,X.createElement(I0.Provider,{value:b},X.createElement(_0.Provider,{value:b},X.createElement(V4,null,X.createElement(Y4,null,X.createElement($8,{config:{socialCommunityCreationButtonVisible:l||!0}},X.createElement(j8,{config:i},X.createElement(G8,null,X.createElement(n_,{pageBehavior:d},X.createElement(Ow,null,X.createElement(w_,null,s),X.createElement(Q8,null))))))))))))))):null},XW=e=>X.createElement(Zw,{locale:"en"},X.createElement(pw,null,X.createElement(Lh,{theme:e_(e.theme)},X.createElement(Bw,null,X.createElement(hx,null,X.createElement(xw,null,X.createElement(Pv,null,X.createElement(JW,m({},e)),X.createElement(Dw,null),X.createElement(jw,null),X.createElement(bw,null),X.createElement(Sw,null)))))))),RW=XW;var oQ=()=>{let[e,t]=useState(null),o=Ut();return useEffect(()=>{e&&(o.error({content:e}),t(null));},[e]),[t]},__=oQ;var nQ=1073741824,iQ=1,n7=c.label`
|
|
1741
1741
|
cursor: pointer;
|
|
1742
1742
|
background: rgb(235 236 239 / 60%);
|
|
1743
1743
|
transition: background 0.1s;
|
package/dist/index.js
CHANGED
|
@@ -1786,7 +1786,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[N0]+=1);var m6=({theme:e})=>Y
|
|
|
1786
1786
|
justify-content: center;
|
|
1787
1787
|
text-align: center;
|
|
1788
1788
|
}
|
|
1789
|
-
`;var fW=({className:e,content:t,icon:o})=>X__default.default.createElement(Uw,{className:e},o," ",t),jw=()=>{let e=Cx();return X__default.default.createElement(Ml,null,X__default.default.createElement(zw,null,e.map(t=>X__default.default.createElement(fW,E(m({},t),{key:t.id})))))};var Gw={"general.action.cancel":"Cancel","general.action.accept":"Accept","general.action.decline":"Decline","general.action.discard":"Discard","general.action.ok":"Ok","general.error.tryAgainLater":"Something went wrong. Please try again later.","general.connection.waiting":"Waiting for connection...",hello:"Hello World","plural.like":"{amount, plural, one {like} other {likes}}",comment:"Comment","plural.comment":"{amount, plural, one {comment} other {comments}}","plural.member":"{amount, plural, one {member} other {members}}",selectACategory:"Select a category",todaysTrendingTitle:"Today's Trending",loadMore:"Load More",categoryList:"Categories",recommendedList:"Recommended for you","exploreHeader.searchCommunityTitle":"Explore communities","exploreHeader.searchCommunityPlaceholder":"Search communities...","exploreHeader.createCommunityTitle":"or create your own!","exploreHeader.createCommunityButton":"Create community",backTitle:"Back",createCommunity:"Create Community",moderator:"Moderator","moderatorMenu.promoteToModerator":"Promote to moderator","moderatorMenu.dismissModerator":"Dismiss moderator","moderatorMenu.removeFromCommunity":"Remove from community","post.readMore":"...Read more","post.editPost":"Edit post","post.deletePost":"Delete post","post.confirmDelete":"This post will be permanently deleted. You\u2019ll no longer to see and find this post. Continue?","post.confirmPendingDelete":"This post will be permanently deleted from the pending list","post.edited":"Edited","post.like":"Like","post.liked":"Liked","post.unknownPost.description":"We couldn\u2019t recognize this post.","post.unknownPost.title":"Something went wrong","post.renderingError.description":"We couldn\u2019t render this post.","post.renderingError.title":"Something went wrong","post.community":"Community","post.myTimeline":"My Timeline","post.wasLive":"was live","post.success.approved":"Post approved","post.success.declined":"Post declined","post.success.submittedToReview":"Your post has been submitted to review by moderator","post.error.cannotReview.title":"Post is not available","post.error.cannotReview.description":"The post has been reviewed by another moderator","post.discard.title":"Discard post?","post.discard.content":"Do you want to discard your post?","collapsible.viewAll":"View all","collapsible.viewAllFiles":"View all files","collapsible.viewMoreComments":"View more comments","collapsible.viewMoreReplies":"View more replies","collapsible.viewMoreReply":"View {count, plural, one {# reply} other {# replies}}","community.createSuccess":"Your community was successfully created","community.updateSuccess":"Your community was successfully updated","community.editProfile":"Edit profile","community.join":"Join","community.communitySettings":"Community Settings","community.returnTo":"Return to {communityName}","community.leaveCommunityTitle":"Leave community?","community.leaveCommunityBody":"You won\u2019t no longer be able to post and interact in this community after leaving.","community.leaveCommunityBodyLastMember":"As you\u2019re the last moderator and member, choose close community to leave.","community.leaveCommunityBodyOnlyModerator":"You\u2019re the only moderator in this group. Nominate other members before leaving community.","community.leaveCommunityButtonText":"Leave","community.leaveCommunityButtonOK":"OK","community.cannotInteract":"Join community to interact with all posts","community.removeUserFromCommunityTitle":"Remove user from community","community.removeUserFromCommunityBody":"This user won't no longer be able to search, post. Continue?","community.name":"Community name","community.about":"About","community.category":"Category","community.onlyadmincanpost":">Only admin can post","community.onlyadmins":"Choose to allow Only Admins to create posts in this community.","community.categorypermission":"Community permission","community.addmembers":"Add members","community.posts":"posts","community.members":"members","community.settings":"Settings","community.leaveCommunity":"Leave Community","CommunityMembers.members":"Members","CommunityMembers.moderators":"Moderators","EmptyFeed.TargetType.globalFeed":"This feed is empty","EmptyFeed.TargetType.communityFeed":"This community's feed is empty","EmptyFeed.TargetType.userFeed":"This user's feed is empty","EmptyFeed.TargetType.myFeed":"Your feed is empty. Start your first post","EmptyFeed.exploreCommunity":"Explore Community","UserFeed.tabs.timeline":"Timeline","community.exploreCommunities":"Explore Community","community.permissions.postReview":"Post review","community.permissions.storyComments":"Story comments","community.permissions.approvePosts":"Approve member posts","community.permissions.allowStoryComments":"Allow comments on community stories","community.permissions.approvePosts.prompt":"Posts by members have to be reviewed and approved by community moderator.","community.permissions.storyComments.prompt":"Turn on to receive comments on stories in this community.","community.permissions.error.needApprovalOnPostCreation.turnOn":"Unable to turn on post review","community.permissions.error.needApprovalOnPostCreation.turnOff":"Unable to turn off post review","community.permissions.error.storyComments.turnOn":"Unable to turn on post review","community.permissions.error.storyComments.turnOff":"Unable to turn off post review","community.review.declinePendingPosts":"Decline pending post will permanently delete the selected post from community.","community.pendingPostsBanner.title":"Pending posts","community.pendingPostsBanner.pendingForReview":"Your posts are pending for review","community.pendingPostsBanner.needApproval":"{formattedAmount} {amount, plural, one {post needs} other {posts need}} approval","communityCreatedModal.title":"Customize your community","communityCreatedModal.message":"You\u2019ve successfully created a community! Now let's manage permissions that work best for you","communityCreatedModal.goToSettings":"Community settings","communityCreatedModal.skip":"Skip for now",post:"Post","upload.attachmentLimit":"You reached the maximum attachment of {maxFiles}","upload.fileSizeLimit":"One of the selected file is larger than 1GB. Please select a new file.","user.editProfile":"Edit profile","user.message":"Message","follow.placeholder.noFollowings":"No followings found","follow.placeholder.noFollowers":"No followers found","ProfileSettings.editProfile":"Edit profile","ProfileSettings.returnTo":"Return to ","SideSectionMyCommunity.myCommunity":"My Community","file.reUpload":"Click to re-upload the file","UserProfileForm.displayname":"Display name","UserProfileForm.about":"About","UserProfileForm.title":"General","UserProfileForm.namePlaceholder":"Enter user display name","UserProfileForm.requiredDisplayName":"Display name is required","UserProfileForm.requiredDescription":"Enter something about yourself","UserSelector.placeholder":"Select user...","report.reportUser":"Report user","report.unreportUser":"Unreport user","report.reportComment":"Report comment","report.unreportComment":"Unreport comment","report.reportSent":"Report sent","report.unreportSent":"Unreport sent","comment.deleted":"This comment has been deleted","comment.delete":"Delete comment","comment.edit":"Edit comment","comment.deleteConfirmContent":"This comment will be permanently deleted. Continue?","comment.deleteConfirmCancelText":"Cancel","comment.deleteConfirmOkText":"Delete","dropdown.first":"First","dropdown.second":"Second","layout.logout":"Log Out","layout.username":"Jackies","chat.details.chatDetailes":"Chat Detail","chat.details.communityName":"Community Name","message.flag":"flag","message.unflag":"Unflag","message.edit":"Edit","message.delete":"Delete","message.deleted":"deleted","message.unsupportedFormat":"Unsupported message format","message.saveOptionsError":"There was an error processing your request","MessageComposeBar.placeholder":"Type your message...","RecentChat.chats":"Chats","AddMemberModal.addMembers":"Add members","AddMemberModal.membersValidationError":"Please select at least one member",add:"Add",save:"Save",close:"Close",reply:"Reply",delete:"Delete",create:"Create",cancel:"Cancel",loading:"Loading...","loading.chat":"Loading chat...",anonymous:"Anonymous","comment.edited":"Edited","comment.readmore":"...Read more","communities.nocommunityfound":"No community found","profile.setting":"Profile Settings","sidesectioncommunity.newfeed":"NewsFeed","sidesectioncommunity.explore":"Explore","sidesectioncommunity.community":"Community","communityFeed.join":"Join community to interact with all posts","communityFeed.members":"Members","communityFeed.moderators":"Moderators","files.all":"View all files","sidebar.community":"Community","sidebar.explore":"Explore","CategoryCommunitiesList.emptyTitle":"It's empty here...","CategoryCommunitiesList.emptyDescription":"No community found in this category","CommentComposeBar.addComment":"Add comment","CommentComposeBar.replayTo":"Reply to ","CommentComposeBar.replayToUser":"Replying to {displayName}","CommentComposeBar.saySomething":"Say something nice","CommentComposeBar.unableToPost":"Unable to post","CommentComposeBar.overCharacter":"You have reached maximum 50,000 characters in a post.","CommentComposeBar.done":"Done","CommentComposeBar.unableToMention":"Unable to mention","CommentComposeBar.overMentionees":"You have reached maximum 30 mentioned users in a post.","CommentComposeBar.okText":"OK","CommunityCreationModal.title":"Leave without finishing?","CommunityCreationModal.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","CommunityCreationModal.cancelText":"Continue editing","CommunityCreationModal.okText":"Leave","PostAsCommunity.title":"Post as community","PostAsCommunity.caption":"Enable this will publish the post on behalf of community account","AddMemberAction.title":"Add members","AddMemberAction.description":"Add your friends to this community to participate in group conversations","CloseCommunityAction.closeConfirm.title":"Close community?","CloseCommunityAction.closeConfirm.description":"All members will be removed from the community. All posts, messages, reactions and media shared in community will be deleted. This cannot be undone.","CloseCommunityAction.title":"Close community","CloseCommunityAction.description":"Closing this community will remove the community page and all its content and comments. This cannot be undone.","report.doReport":"Report","report.undoReport":"Undo Report","comment.deleteBody":"This comment will be permanently removed.","reply.delete":"Delete reply","reply.deleteBody":"This reply will be permanently deleted. Continue?","reply.edit":"Edit reply","reply.deleted":"This reply has been deleted","tabs.editProfile":"Edit profile","tabs.timeline":"Timeline","tabs.followers":"Followers","tabs.followings":"Followings","tabs.pending":"Pending","tabs.members":"Members","tabs.moderators":"Moderators","tabs.pendingPosts":"Pending {amount, select, 0 {} other { ({formattedAmount})}}","tabs.permissions":"Permissions","tabs.gallery":"Gallery","tabs.images":"Photos","tabs.videos":"Videos","tabs.liveStreams":"Livestreams","feed.emptyFeed":"This feed is empty","feed.emptyCommunityPublicFeed":"This community's feed is empty","feed.emptyCommunityReviewingFeed":"No pending posts","feed.emptyJoinedCommunityPublicFeed":"Your feed is empty. Start you first post","feed.emptyUserFeed":"No posts yet","feed.emptyMyFeed":"Your feed is empty. Start your first post","chat.groupSetting":"Group settings","chat.message.deleted":"Message was deleted","chat.message.unsupported":"Unsupported message type","chat.chats":"Chats","chat.details.header":"Chat Details","chat.details.chatName":"Chat Name","chat.leaveChat":"Leave chat","chat.leaveChat.confirm.title":"Leave chat","chat.leaveChat.confirm.content":"Are you sure you want to leave the chat?","chat.leaveChat.confirm.okButton":"Leave","chat.leaveChat.success":"You successfully left chat","chat.leaveChat.error":"Attempt to leave a chat has failed","chat.members.return":"Return to controls","chat.members.count":"{count} members","chat.create.modalTitle":"Create new chat","chat.loading.error":"Couldn't load chat","userSelector.placeholder":"Enter name or email addresses","userSelector.emptyState.title":"It's empty here...","userSelector.emptyState.description":"No contact found here","groupChat.createPopup.fieldName":"Group name","groupChat.createPopup.placeholder":"Please input group name","general.cancel.capital":"Cancel","general.create.capital":"Create","general.done.capital":"Done","chat.member.addMore":"Add or Remove user","video.notReady":"The video is being processed. Please try again later.","liveStream.idle":"This stream is currently unavailable","liveStream.ended.caption":"This liveStream has ended.","liveStream.ended.message":"Playback will be available for you to watch shortly.","user.follow":"Follow","user.unfollow":"Unfollow","user.unfollow.confirm.title":"Unfollow {displayName}","user.unfollow.confirm.body":"You\u2019ll have to send a request again to follow {displayName}. Continue?","user.cancel_follow":"Cancel request","placeholder.noResults":"No results found","request.accept":"Accept","request.decline":"Decline","follower.title.removeUser":"Remove {displayName} from followers?","follower.body.removeUser":"We will not notify {displayName} that they've been removed from your followers","follower.menuItem.removeUser":"Remove user","follower.menuItem.unfollow":"Unfollow","buttonText.cancel":"Cancel","buttonText.remove":"Remove","follow.pendingNotification.title":"Pending requests","follow.pendingNotification.body":"Your requests are waiting for review","notification.done":"Done","counter.followings":"following","counter.followers":"followers","buttonText.unfollow":"Unfollow","privateFeed.title":"This account is private","privateFeed.body":"Follow this user to see all posts","navigationBlocker.title":"Unsaved changes","navigationBlocker.content":"Your changes won`t be saved. Are you sure you want to leave this page now?","user.unfollow.confirm.title.thisUser":"Unfollow this user","mediaGallery.images.empty":"No photos yet","mediaGallery.liveStreams.empty":"No liveStreams yet","mediaGallery.videos.empty":"No videos yet","user.unfollow.confirm.body.thisUser":"You\u2019ll have to send a request again to follow this user. Continue?","navigationBlocker.okText":"Leave","options_composer.button.add":"Add Option","options_composer.title":"Create at least 2 options","poll_modal.answer_type.title":"Selection type","poll_modal.answer_type.body":"Choose to vote with one or multiple options","poll_modal.closed_in.title":"Schedule poll (Optional)","poll_modal.closed_in.body":"Poll will be automatically closed at the end of chosen time frame (UTC)","select.answerType.item":"{answerType} selection","poll_composer.question.label":"Poll options","poll_composer.question.placeholder":"What\u2019s your poll question?","poll_composer.poll_options.label":"Options","poll_modal.title":"Create poll","poll.votes":"{voteCount} votes","poll.vote.closedIn":"Poll ends in {closedIn} days","poll.vote.finalResults":"Final results","poll.vote.submit":"Submit vote","poll.error.deletedOrClosed":"This poll has been closed or deleted.","poll.close":"Close poll","postCreator.unableToPost":"Unable to post","postCreator.overCharacter":"You have reached maximum 50,000 characters in a post.","postCreator.done":"Done","postCreator.unableToMention":"Unable to mention","postCreator.overMentionees":"You have reached maximum 30 mentioned users in a post.","postCreator.okText":"OK","pollComposer.unableToMention":"Unable to mention","pollComposer.overMentionees":"You have reached maximum 30 mentioned users in a post.","pollComposer.okText":"OK","storyCreation.hyperlink.bottomSheet.cancel":"Cancel","storyCreation.hyperlink.bottomSheet.title":"Add link","storyCreation.hyperlink.bottomSheet.submit":"Done","storyCreation.hyperlink.form.urlLabel":"URL","storyCreation.hyperlink.form.urlPlaceholder":"https://example.com","storyCreation.hyperlink.form.linkTextLabel":"Customize link text","storyCreation.hyperlink.form.linkTextPlaceholder":"Name your link","storyCreation.hyperlink.form.linkTextDescription":"This text will show on the link instead of URL.","storyCreation.hyperlink.form.removeButton":"Remove link","storyCreation.hyperlink.removeConfirm.title":"Remove link","storyCreation.hyperlink.removeConfirm.content":"This link will be removed from story.","storyCreation.hyperlink.removeConfirm.cancel":"Cancel","storyCreation.hyperlink.removeConfirm.confirm":"Remove","storyCreation.hyperlink.validation.error.invalidUrl":"Please enter a valid URL.","storyCreation.hyperlink.validation.error.whitelisted":"Please enter a whitelisted URL.","storyCreation.hyperlink.validation.error.blocked":"Your text contains a blocklisted word.","storyCreation.hyperlink.unsavedChanges.title":"Unsaved changes","storyCreation.hyperlink.unsavedChanges.content":"Are you sure you want to cancel? Your changes won't be saved.","storyCreation.hyperlink.unsavedChanges.cancel":"No","storyCreation.hyperlink.unsavedChanges.confirm":"Yes","storyViewer.actions.deleteStory":"Delete story","storyViewer.action.confirmModal.title":"Delete this story?","storyViewer.action.confirmModal.content":"This story will be permanently deleted. You\u2019ll no longer to see and find this story.","storyViewer.notification.deleted":"Story deleted","storyViewer.notification.success":"Successfully shared story","storyViewer.notification.error":"Failed to share story","storyViewer.footer.failed":"Failed to upload","storyViewer.footer.uploading":"Uploading...","storyViewer.commentSheet.title":"Comments","storyViewer.commentSheet.empty":"No comments yet","storyViewer.commentSheet.disabled":"Comments are disabled for this story","storyViewer.commentSheet.replyingTo":"Replying to","storyViewer.toast.like.disabled":"Join community to interact with all stories","storyViewer.toast.comment.reported":"Comment reported","storyViewer.toast.comment.unreported":"Comment unreported","storyViewer.toast.disable.react":"Join community to interact with all stories","storyViewer.commentComposeBar.submit":"Post","storyDraft.button.shareStory":"Share story","storyDraft.notification.hyperlink.error":"Can\u2019t add more than one link to your story.","storyTab.title":"Story","select.chatType.item":"{answerType} type","chatComposer.label.channelId":"Channel ID","chatComposer.label.displayName":"Display Name","chatComposer.label.type":"Channel Type","chatComposer.addUsers":"Add users","chat_modal.title":"Create chat","chat_composer.placeholder.displayName":"Enter display name here","chat_composer.placeholder.channelId":"Enter channel ID here","editChatMembersModal.title":"Add/Edit chat members","editChatMembersModal.confirm.title":"Leave without finishing?","editChatMembersModal.confirm.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","editChatMembersModal.confirm.cancelText":"Continue editing","editChatMembersModal.confirm.okText":"Leave","notification.error.blockedWord":"Amity SDK (400308): Text contain blocked word","livechat.deleted.message":"This message was deleted","livechat.messageBubble.reply.button":"Reply","livechat.messageBubble.copy.button":"Copy","livechat.messageBubble.delete.button":"Delete","livechat.messageBubble.mention.button":"Mention","livechat.messageBubble.report.button":"Report","livechat.messageBubble.unReport.button":"Unreport","livechat.channel.muted":"This channel has been set to read-only by the channel moderator","livechat.modal.delete.message.title":"Delete this message?","livechat.modal.delete.message.content":"This message will also be removed from your friend\u2019s devices.","livechat.mention.all":"All","livechat.mention.all.description":"Notify everyone","livechat.notification.copy.message":"Message copied","livechat.composebar.placeholder":"Write a message","livechat.delete.message.error":"Unable to delete message. Please try again.","livechat.member.muted":"You\u2019ve been muted by the channel moderator","livechat.member.muted.error":"User is muted","livechat.member.banned.title":"You are banned from chat","livechat.member.banned.description":"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned.","livechat.report.message.success":"Message reported","livechat.report.message.error":"This message failed to be reported. Please try again.","livechat.unReport.message.success":"Message unreported","livechat.unReport.message.error":"This message failed to be unreported. Please try again.","livechat.error.tooLongMessage.title":"Unable to send message","livechat.error.tooLongMessage.description":"Your message is too long. Please shorten your message and try again.","livechat.error.sendingMessage.error":"Your message wasn't sent. Please try again.","livechat.error.sendingMessage.blockedWord":"Your message wasn't sent as it contains a blocked word.","livechat.error.sendingMessage.notAllowLink":"Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.","livechat.reaction.errorOnload":"Unable to load reactions","livechat.reaction.emptyState":"No reactions yet","livechat.reaction.emptyState.description":"Be the first to react to this message!","livechat.reaction.label.removeReaction":"Click to remove reaction"};var Fp={en:Gw};var $w="en",CW=({locale:e,children:t})=>{let o=Fp[e]?Fp[e]:Fp[$w];return X__default.default.createElement(reactIntl.IntlProvider,{defaultLocale:$w,locale:e,messages:o},t)},Zw=CW;var vW={palette:{alert:"#FA4D30",base:"#292B32",primary:"#1054DE",secondary:"#FFD400",tertiary:"#FF305A",neutral:"#17181C",highlight:"#1054DE",system:{borders:"#ebecef",background:"#fff"}},typography:{global:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif",fontStyle:"normal"},headline:{fontWeight:600,fontSize:"20px"},title:{fontWeight:600,fontSize:"16px"},subTitle:{fontWight:400,fontSize:"13px"},body:{fontWeight:"normal",fontSize:"14px"},bodyBold:{fontWeight:600,fontSize:"14px"},caption:{fontWeight:"normal",fontSize:"12px"},captionBold:{fontWeight:600,fontSize:"12px"}}},qw=vW;var Qw=e=>e.toFixed(1),Yw=e=>{let t=Math.min(e*100,100);return Qw(t)};function xW(e){return e.alpha!==void 0}var Kw=e=>{let{hue:t,saturation:o,lightness:r}=e,n=[`${Qw(t)}`,`${Yw(o)}%`,`${Yw(r)}%`];return xW(e)?`hsla(${[...n,e.alpha].filter(et).join(",")})`:`hsl(${n.filter(et).join(",")})`},bW=e=>{let t=polished.parseToHsl(e);return Kw(t)},IW=(e,t)=>{let o=polished.parseToHsl(t),{lightness:r}=o,n=E(m({},o),{lightness:Math.min(1,r+e)});return Kw(n)},wW=[.25,.4,.5,.75],Jw=e=>{let i=e,{system:t}=i,o=_(i,["system"]),r=Object.keys(o).reduce((a,s)=>(a[s]={main:bW(o[s])},a),m({},o)),n=Object.keys(r).reduce((a,s)=>{let l=o[s],d=wW.reduce((u,f,g)=>{let h=`shade${g+1}`;return u[h]=IW(f,l),u},{}),p=r[s];return p&&typeof p=="object"?a[s]=m(m({},d),p):a[s]=E(m({},d),{main:p}),a},m({},r));return E(m({},n),{system:t})};var _W=["fontFamily","fontStyle","fontWeight","fontSize"],MW=e=>Object.keys(e).reduce((o,r)=>{let n=e[r];return r&&n&&_W.includes(r)&&(o[r]=n),o},{}),Xw=e=>Object.keys(e).reduce((o,r)=>(o[r]=MW(m(m({},e.global),e[r])),o),{});var Rw={colors:{primary:{default:"#1054DE",shade1:"#4A82F2",shade2:"#A0BDF8",shade3:"#D9E5FC",shade4:"#FFFFFF"},secondary:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},base:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},baseInverse:{default:"#FFFFFF"},alert:{default:"#FA4D30"},highlight:"#1054DE",messageBubble:{default:"#1054DE",inverse:"#FFFFFF"},storyIndicator:{default:"#EBECEF",active:["#339AF9","#78FA58"]},hyperlink:{default:"#FFFFFFCC"},actionButton:{default:"#00000080"}},typography:{heading:{fontWeight:600,fontSize:"1.25rem",lineHeight:"1.5rem"},title:{fontWeight:600,fontSize:"1rem",lineHeight:"1.25rem"},subTitle:{fontWeight:400,fontSize:"0.8125rem",lineHeight:"1rem"},body:{fontWeight:"normal",fontSize:"0.875rem",lineHeight:"1.25rem"},bodyBold:{fontWeight:600,fontSize:"0.875rem",lineHeight:"1.25rem"},caption:{fontWeight:"normal",fontSize:"0.75rem",lineHeight:"1rem"},captionBold:{fontWeight:600,fontSize:"0.75rem",lineHeight:"1rem"}}};var SW=(e={})=>{let t=PW__default.default(qw,e),o=Jw(t.palette),r=Xw(t.typography);return E(m({},t),{palette:o,typography:r,v4:Rw})},e_=SW;var r_=X__default.default.createContext(void 0),n_=({children:e,pageBehavior:t={}})=>{let{page:o,onBack:r,goToPostDetailPage:n,goToCommunityProfilePage:i,goToUserProfilePage:a,goToViewStoryPage:s,onChangePage:l,goToSelectPostTargetPage:d,goToStoryTargetSelectionPage:p,goToStoryCreationPage:u,goToPostComposerPage:f,goToSocialHomePage:g}=ye(),h={AmityStoryViewPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&y.onCloseAction)return t.AmityStoryViewPageBehavior.onCloseAction();l("SocialHomePage");},hyperLinkAction:y=>{var C;if((C=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&C.hyperLinkAction)return t.AmityStoryViewPageBehavior.hyperLinkAction(y)}},AmityDraftStoryPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityDraftStoryPageBehavior)!=null&&y.onCloseAction)return t.AmityDraftStoryPageBehavior.onCloseAction();o.type==="DraftPage"&&o.context.storyType==="communityFeed"?i(o.context.targetId):g();}},onClickHyperLink:()=>{},AmitySocialHomePageBehavior:{},AmityGlobalFeedComponentBehavior:{goToPostDetailPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToPostDetailPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToPostDetailPage(y);n(y.postId);},goToViewStoryPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToViewStoryPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToViewStoryPage(y);s({targetId:y.targetId,targetType:y.targetType,storyType:y.storyType});}},AmityPostDetailPageBehavior:{},AmityPostContentComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityPostContentComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);},goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityPostContentComponentBehavior.goToUserProfilePage(y);a(y.userId);},goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToPostComposerPage)return t.AmityPostContentComponentBehavior.goToPostComposerPage(y);f(y);}},AmitySocialGlobalSearchPageBehavior:{},AmityCommunitySearchResultComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityCommunitySearchResultComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityCommunitySearchResultComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);}},AmityUserSearchResultComponentBehavior:{goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityUserSearchResultComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityUserSearchResultComponentBehavior.goToUserProfilePage(y);a(y.userId);}},AmityCreatePostMenuComponentBehavior:{goToSelectPostTargetPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToSelectPostTargetPage)return t.AmityCreatePostMenuComponentBehavior.goToSelectPostTargetPage();d();},goToStoryTargetSelectionPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToStoryTargetSelectionPage)return t.AmityCreatePostMenuComponentBehavior.goToStoryTargetSelectionPage();p();}},AmityPostTargetSelectionPage:{goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostTargetSelectionPage)!=null&&C.goToPostComposerPage)return t.AmityPostTargetSelectionPage.goToPostComposerPage(y);f(y);}},AmityStoryTargetSelectionPage:{goToStoryCreationPage:y=>{var C;if((C=t==null?void 0:t.AmityStoryTargetSelectionPage)!=null&&C.goToStoryCreationPage)return t.AmityStoryTargetSelectionPage.goToStoryCreationPage(y);u(y);}},AmityPostComposerPageBehavior:{goToSocialHomePage(){var y;if((y=t==null?void 0:t.AmityPostComposerPageBehavior)!=null&&y.goToSocialHomePage)return t.AmityPostComposerPageBehavior.goToSocialHomePage();g();}},AmityCommunityProfilePageBehavior:{goToPostComposerPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostComposerPage)return t.AmityCommunityProfilePageBehavior.goToPostComposerPage(y);f(y);},goToPostDetailPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostDetailPage)return t.AmityCommunityProfilePageBehavior.goToPostDetailPage(y);n(y.postId,y.hideTarget,y.category);}}};return X__default.default.createElement(r_.Provider,{value:h},e)},It=()=>{let e=X.useContext(r_);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var Bo=class Bo{constructor(){this.client=null;this.isConnected=!1;this.stateChangeHandler=null;this.disconnectedHandler=null;}static setup(t){if(!Bo.instance){Bo.instance=new Bo;let o=tsSdk.Client.createClient(t.apiKey,t.apiRegion,t!=null&&t.apiEndpoint?{apiEndpoint:t.apiEndpoint}:{});Bo.setClient(o);}}static registerDevice(t,o,r,n,i,a,s){return P(this,null,function*(){if(!Bo.instance)throw new Error("AmityUIKitManager must be set up first using the setup method.");Bo.instance.onConnectionStatusChange=i,Bo.instance.onConnected=a,Bo.instance.onDisconnected=s,yield Bo.instance.connectAndLogin(t,o,r,n);})}static setClient(t){if(Bo.instance)Bo.instance.client=t,Bo.instance.isConnected=!0;else throw new Error("AmityUIKitManager must be set up first using the setup method.")}connectAndLogin(t,o,r,n){return P(this,null,function*(){yield tsSdk.Client.login({userId:t,displayName:o,authToken:n},{sessionWillRenewAccessToken:r.sessionWillRenewAccessToken.bind(r)}),this.stateChangeHandler=tsSdk.Client.onSessionStateChange(i=>{var a;(a=this.onConnectionStatusChange)==null||a.call(this,i);}),this.disconnectedHandler=tsSdk.Client.onClientDisconnected(()=>{this.onDisconnected&&this.onDisconnected();}),this.onConnected&&this.onConnected();})}disconnect(){var t,o;(t=this.stateChangeHandler)==null||t.call(this),(o=this.disconnectedHandler)==null||o.call(this),this.client=null,this.isConnected=!1;}static getClient(){var t;return ((t=Bo.instance)==null?void 0:t.client)||null}isClientConnected(){return this.isConnected}};Bo.instance=null;var Xs=Bo;var i_=X.createContext([]),oi=()=>({config:X.useContext(i_)}),a_=({children:e})=>{let{config:t}=bd(),[o,r]=X__default.default.useState([]);return X__default.default.useEffect(()=>{if(!t)return;let n=t==null?void 0:t.message_reactions;n&&r(n);},[t]),X__default.default.createElement(i_.Provider,{value:o},e)};var Tl,Nl,Vp,s_,wd,J8,Rs=class Rs{constructor(){To(this,Vp);To(this,wd);To(this,Tl,void 0);xa(this,Tl,new Map);}static get instance(){return qo(Rs,Nl)||xa(Rs,Nl,new Rs),qo(Rs,Nl)}hasReachedLimit(t){let o=Nr(this,wd,J8).call(this,t);return qo(this,Tl).get(t)===o}markSeen(t){qo(this,Tl).set(t,Nr(this,wd,J8).call(this,t));}};Tl=new WeakMap,Nl=new WeakMap,Vp=new WeakSet,s_=function(t){let o=Lo.instance.getAdFrequencyByPlacement(t);return o==null||o.type!=="time-window"?0:o.value},wd=new WeakSet,J8=function(t){let o=mn__default.default(),r=o.startOf("day").diff(o,"minute"),n=Math.ceil(r/Nr(this,Vp,s_).call(this,t));return `${o.format("DD-MM-YYYY")}-${n}`},To(Rs,Nl,void 0);var kl=Rs;var El,_d,Md,X8,e1=class e1{constructor(){To(this,Md);To(this,_d,"amity.seenRecencyCache");}static get instance(){return qo(e1,El)||xa(e1,El,new e1),qo(e1,El)}getSeenRecencyByAdId(t){return Nr(this,Md,X8).call(this)[t]}setSeenRecencyCache(t,o){let r=Nr(this,Md,X8).call(this);r[t]=o,window.localStorage.setItem(qo(this,_d),JSON.stringify(r));}};El=new WeakMap,_d=new WeakMap,Md=new WeakSet,X8=function(){return JSON.parse(window.localStorage.getItem(qo(this,_d))||"{}")},To(e1,El,void 0);var Op=e1,Al,Pd,R8,t1=class t1{constructor(){To(this,Pd);this.isLoading=!0;this.ads=[];this.settings=null;this.subscribers=[];tsSdk.Client.onSessionStateChange(t=>P(this,null,function*(){if(t==="established"){let o=yield tsSdk.AdRepository.getNetworkAds();this.ads=o.ads,this.settings=o.settings,this.subscribers.forEach(r=>r(o)),this.isLoading=!1;}else t==="terminated"&&(this.ads=[],this.settings=null,this.subscribers.forEach(o=>o(null)));}));}static get instance(){return qo(t1,Al)||xa(t1,Al,new t1),qo(t1,Al)}onNetworkAdsData(t){!this.isLoading&&this.ads.length>0&&this.settings&&t({ads:this.ads,settings:this.settings}),this.subscribers.push(t);}getLastSeen(t){return Op.instance.getSeenRecencyByAdId(t)}markSeen(t,o){var r;Op.instance.setSeenRecencyCache(t.adId,Date.now()),((r=Nr(this,Pd,R8).call(this,o))==null?void 0:r.type)==="time-window"&&kl.instance.markSeen(o),t.analytics.markAsSeen(o);}markClicked(t,o){t.analytics.markLinkAsClicked(o);}getAdFrequencyByPlacement(t){return Nr(this,Pd,R8).call(this,t)}};Al=new WeakMap,Pd=new WeakSet,R8=function(t){if(!this.settings)return null;switch(t){case"feed":return this.settings.frequency.feed;case"comment":return this.settings.frequency.comment;case"story":return this.settings.frequency.story;default:return null}},To(t1,Al,void 0);var Lo=t1;var Bl,zp,l_,Up,m_,jp,d_,o1=class o1{constructor(){To(this,zp);To(this,Up);To(this,jp);}static get instance(){return qo(o1,Bl)||xa(o1,Bl,new o1),qo(o1,Bl)}recommendedAds({ads:t,placement:o,count:r,communityId:n}){let i=Nr(this,zp,l_).call(this,t),a=new Map;return t.forEach(s=>{var u;let l=(((u=s.targets)==null?void 0:u.communityIds)||[]).includes(n||"")?1:0,d=i.get(s.adId);if(d==null)return;let p=l+Math.pow(Math.E,2*d);a.set(s.adId,p);}),Nr(this,jp,d_).call(this,{ads:t,scores:a,count:r})}};Bl=new WeakMap,zp=new WeakSet,l_=function(t){let o=t.sort((a,s)=>Lo.instance.getLastSeen(s.adId)-Lo.instance.getLastSeen(a.adId)),r=new Map,n=Lo.instance.getLastSeen(o[o.length-1].adId);return Lo.instance.getLastSeen(o[0].adId)===n?o.forEach(a=>{r.set(a.adId,1);}):o.forEach((a,s)=>{let l=s/o.length;r.set(a.adId,l);}),r},Up=new WeakSet,m_=function(t){let o=0,r=Math.random();for(let n=0;n<t.length;n++)if(o+=t[n],r<o)return n;return t.length-1},jp=new WeakSet,d_=function({ads:t,scores:o,count:r}){let n=[...t],i=[];for(;i.length<r&&n.length>0;){let a=n.reduce((p,u)=>p+(o.get(u.adId)||0),0),s=n.map(p=>(o.get(p.adId)||0)/a),l=s.map(p=>p/s.reduce((u,f)=>u+f,0)),d=Nr(this,Up,m_).call(this,l);i.push(n[d]),n.splice(d,1);}return i},To(o1,Bl,void 0);var Hp=o1;var e7=X.createContext({isLoading:!0,ads:[],settings:null,saveItemsPagination:()=>{},getItemsPaginationCache:()=>{}}),u_=({children:e})=>{let[t,o]=X.useState(null),[r,n]=X.useState(!0),[i,a]=X.useState(new Map),s=({targetId:p,placement:u,frequencyType:f})=>p?`${f}-${u}-${f}`:`global-${u}-${f}`,l=({targetId:p,placement:u,adId:f,referenceId:g,frequencyType:h})=>{a(y=>{let C=s({targetId:p,placement:u,frequencyType:h}),v=y.get(C);return v?y.set(C,[...v,{adId:f,referenceId:g}]):y.set(C,[{adId:f,referenceId:g}]),new Map(y)});},d=({targetId:p,placement:u,frequencyType:f})=>{let g=s({targetId:p,placement:u,frequencyType:f});return i.get(g)};return X.useEffect(()=>{function p(){return P(this,null,function*(){Lo.instance.onNetworkAdsData(u=>{o(u),n(!1);});})}p();},[]),X__default.default.createElement(e7.Provider,{value:{isLoading:r,ads:(t==null?void 0:t.ads)||[],settings:(t==null?void 0:t.settings)||null,saveItemsPagination:l,getItemsPaginationCache:d}},e)};var t7=()=>X.useContext(e7).settings,f_=({count:e,placement:t,communityId:o})=>{let n=X.useContext(e7).ads,[i,a]=X.useState([]),s=t7(),l=Lo.instance.getAdFrequencyByPlacement(t);return X.useEffect(()=>{s!=null&&s.enabled&&((l==null?void 0:l.type)==="time-window"&&kl.instance.hasReachedLimit(t)||a(Hp.instance.recommendedAds({ads:n,placement:t,count:e,communityId:o})));},[n,e,t,o]),i};function VW({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=z4(),[a,s]=X.useState(!1),[l,d]=X.useState(n||!0),[p,u]=X.useState([]),[f,g]=X.useState(null),[h,y]=X.useState(!1),C=X.useRef(null),v=X.useRef(null),x=X.useCallback(()=>{var I;C.current&&(s(!0),(I=C.current)==null||I.call(C));},[C,a,l,d]),b=X.useCallback(I=>{n&&(I.data&&u(I.data),d(I.loading),y(I.hasNextPage),g(I.error),C.current=I.onNextPage,o(I));},[n,C]);X.useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return v.current=I,()=>{I();}},[t,n]);let S=X.useCallback(()=>{v.current&&v.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return v.current=I,()=>I()},[]);return {items:p,hasMore:h,isLoading:l,loadMore:x,error:f,loadMoreHasBeenCalled:a,refresh:S}}var lt=VW;function Ar(e){return e!=null}function y_(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function h_(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var OW=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function C_(e){return e==="https://"||OW.test(e)}var x_=({placement:e,pageSize:t,communityId:o,getItemId:r})=>{let n=t7(),[i,a]=X.useState(0),[s,l]=X.useState([]),[d,p]=X.useState(0),u=Lo.instance.getAdFrequencyByPlacement(e),f=(u==null?void 0:u.type)==="fixed"?t/u.value:1,g=f_({count:f,placement:e,communityId:o});return {combineItemsWithAds:C=>{if(!(n!=null&&n.enabled))return C;if((u==null?void 0:u.type)==="fixed"){let v=new Set(C.map(G=>r(G))),x=s.map(G=>{let U=r(G[0]);if(!v.has(U))return null;let k=C.find(ee=>r(ee)===U);return k?G.length===1?[k]:[k,G[1]]:G}).filter(Ar),b=x[0],S=(()=>{if(b){let G=C.findIndex(U=>r(U)===r(b[0]));return G===-1?0:G}return 0})(),w=[...(C||[]).slice(0,S).map(G=>[G]),...x],M=C.slice(S).filter(G=>{let U=r(G);return !w.some(k=>r(k[0])===U)}),N=i,B=d,D=M.map(G=>{if(B=B+1,!(B%u.value===0))return [G];let k=g[N];return N=N+1>g.length-1?0:N+1,[G,k]});a(N),p(B);let j=[...w,...D];return l([...w,...D]),j.length===0&&(a(0),p(0)),[...w,...D].flatMap(G=>G)}else if((u==null?void 0:u.type)==="time-window")return C.length===0?C:[...C.slice(0,1),g[0],...C.slice(1)].filter(Ar);return C},reset:()=>{a(0),l([]),p(0);}}},Td=({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0,placement:i,communityId:a,pageSize:s,getItemId:l})=>{let{combineItemsWithAds:d}=x_({placement:i,pageSize:s,communityId:a,getItemId:l}),g=lt({fetcher:e,params:t,config:r,shouldCall:n}),{items:p}=g,u=_(g,["items"]),f=X.useMemo(()=>d(p).flatMap(h=>h),[p]);return E(m({},u),{items:f})},b_=e=>{let a=e,{items:t}=a,o=_(a,["items"]),{combineItemsWithAds:r,reset:n}=x_(o);return {itemWithAds:X.useMemo(()=>r(t),[t]),reset:n}};var ZW=()=>{let[e,t]=X.useState([]),[o,r]=X.useState(!1),[n,i]=X.useState(null),[a,s]=X.useState(!1),[l,d]=X.useState(!1),[p,u]=X.useState(0),f=10,{itemWithAds:g,reset:h}=b_({items:e,pageSize:f,placement:"feed",getItemId:N=>N.postId}),y=N=>{let B=N.target;u(B.scrollTop);};function C(){return P(this,null,function*(){try{r(!0);let N=yield tsSdk.FeedRepository.getCustomRankingGlobalFeed({limit:10,queryToken:n||void 0}),B=(yield Promise.all(N.data.map(D=>P(this,null,function*(){var j;if(((j=D==null?void 0:D.children)==null?void 0:j.length)>0){let G=()=>{},U=yield new Promise(k=>{G=tsSdk.PostRepository.getPost(D.children[0],ee=>k(ee.data));});return G(),U&&["liveStream","poll","file"].includes(U.dataType)?null:D}return D})))).filter(Ar);i(N.paging.next||null),t(D=>[...D,...B]);}finally{setTimeout(()=>{r(!1);},300);}})}let v=N=>{t(B=>new Set([...B.map(j=>j.postId)]).has(N.postId)?B:[N,...B]);},x=N=>{let B=e.filter(D=>D.postId!==N);t(B);},b=N=>{let B=e.map(D=>D.postId===N.postId?m(m({},D),N):D);t(B);},S=X.useMemo(()=>n!==null,[n]),I=()=>{s(!0),!o&&S&&C();},w=()=>{l||(M(),d(!0));},M=()=>{t([]),i(null),C(),h();};return {itemWithAds:g,isLoading:o,prependItem:v,removeItem:x,updateItem:b,loadMore:I,hasMore:S,loadMoreHasBeenCalled:a,fetch:w,refetch:M,scrollPosition:p,onScroll:y}},I_=X.createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),Oa=()=>{let e=X.useContext(I_);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e},w_=({children:e})=>{let t=ZW();return X__default.default.createElement(I_.Provider,{value:t},e)};var JW=({apiKey:e,apiRegion:t,apiEndpoint:o,userId:r,displayName:n,postRendererConfig:i,theme:a={},children:s,socialCommunityCreationButtonVisible:l,pageBehavior:d,onConnectionStatusChange:p,onDisconnected:u,getAuthToken:f,configs:g})=>{let h=new reactQuery.QueryClient,[y,C]=X.useState(null),v=le(r),{error:x}=Ut(),b=X.useMemo(()=>({client:y,currentUserId:r||void 0,userRoles:(v==null?void 0:v.roles)||[]}),[y,r,v==null?void 0:v.roles]);return X.useEffect(()=>{P(void 0,null,function*(){let I;f&&(I=yield f());try{Xs.setup({apiKey:e,apiRegion:t,apiEndpoint:o}),Lo.instance,yield Xs.registerDevice(r,n||r,{sessionWillRenewAccessToken:M=>{f?f().then(N=>{M.renewWithAuthToken(N);}):M.renew();}},I,p,u);let w=Xs.getClient();C(w);}catch(w){console.error("Error setting up AmityUIKitManager:",w),w instanceof Error&&x({content:w.message});}});},[r,n,p,u]),y?X__default.default.createElement("div",{className:"asc-uikit"},X__default.default.createElement(reactQuery.QueryClientProvider,{client:h},X__default.default.createElement(gw,{initialConfig:g||vo},X__default.default.createElement(a_,null,X__default.default.createElement(u_,null,X__default.default.createElement(I0.Provider,{value:b},X__default.default.createElement(_0.Provider,{value:b},X__default.default.createElement(V4,null,X__default.default.createElement(Y4,null,X__default.default.createElement($8,{config:{socialCommunityCreationButtonVisible:l||!0}},X__default.default.createElement(j8,{config:i},X__default.default.createElement(G8,null,X__default.default.createElement(n_,{pageBehavior:d},X__default.default.createElement(Ow,null,X__default.default.createElement(w_,null,s),X__default.default.createElement(Q8,null))))))))))))))):null},XW=e=>X__default.default.createElement(Zw,{locale:"en"},X__default.default.createElement(pw,null,X__default.default.createElement(Lh,{theme:e_(e.theme)},X__default.default.createElement(Bw,null,X__default.default.createElement(hx,null,X__default.default.createElement(xw,null,X__default.default.createElement(Pv,null,X__default.default.createElement(JW,m({},e)),X__default.default.createElement(Dw,null),X__default.default.createElement(jw,null),X__default.default.createElement(bw,null),X__default.default.createElement(Sw,null)))))))),RW=XW;var oQ=()=>{let[e,t]=X.useState(null),o=Ut();return X.useEffect(()=>{e&&(o.error({content:e}),t(null));},[e]),[t]},__=oQ;var nQ=1073741824,iQ=1,n7=c.label`
|
|
1789
|
+
`;var fW=({className:e,content:t,icon:o})=>X__default.default.createElement(Uw,{className:e},o," ",t),jw=()=>{let e=Cx();return X__default.default.createElement(Ml,null,X__default.default.createElement(zw,null,e.map(t=>X__default.default.createElement(fW,E(m({},t),{key:t.id})))))};var Gw={"general.action.cancel":"Cancel","general.action.accept":"Accept","general.action.decline":"Decline","general.action.discard":"Discard","general.action.ok":"Ok","general.error.tryAgainLater":"Something went wrong. Please try again later.","general.connection.waiting":"Waiting for connection...",hello:"Hello World","plural.like":"{amount, plural, one {like} other {likes}}",comment:"Comment","plural.comment":"{amount, plural, one {comment} other {comments}}","plural.member":"{amount, plural, one {member} other {members}}",selectACategory:"Select a category",todaysTrendingTitle:"Today's Trending",loadMore:"Load More",categoryList:"Categories",recommendedList:"Recommended for you","exploreHeader.searchCommunityTitle":"Explore communities","exploreHeader.searchCommunityPlaceholder":"Search communities...","exploreHeader.createCommunityTitle":"or create your own!","exploreHeader.createCommunityButton":"Create community",backTitle:"Back",createCommunity:"Create Community",moderator:"Moderator","moderatorMenu.promoteToModerator":"Promote to moderator","moderatorMenu.dismissModerator":"Dismiss moderator","moderatorMenu.removeFromCommunity":"Remove from community","post.readMore":"...Read more","post.editPost":"Edit post","post.deletePost":"Delete post","post.confirmDelete":"This post will be permanently deleted. You\u2019ll no longer to see and find this post. Continue?","post.confirmPendingDelete":"This post will be permanently deleted from the pending list","post.edited":"Edited","post.like":"Like","post.liked":"Liked","post.unknownPost.description":"We couldn\u2019t recognize this post.","post.unknownPost.title":"Something went wrong","post.renderingError.description":"We couldn\u2019t render this post.","post.renderingError.title":"Something went wrong","post.community":"Community","post.myTimeline":"My Timeline","post.wasLive":"was live","post.success.approved":"Post approved","post.success.declined":"Post declined","post.success.submittedToReview":"Your post has been submitted to review by moderator","post.error.cannotReview.title":"Post is not available","post.error.cannotReview.description":"The post has been reviewed by another moderator","post.discard.title":"Discard post?","post.discard.content":"Do you want to discard your post?","collapsible.viewAll":"View all","collapsible.viewAllFiles":"View all files","collapsible.viewMoreComments":"View more comments","collapsible.viewMoreReplies":"View more replies","collapsible.viewMoreReply":"View {count, plural, one {# reply} other {# replies}}","community.createSuccess":"Your community was successfully created","community.updateSuccess":"Your community was successfully updated","community.editProfile":"Edit profile","community.join":"Join","community.communitySettings":"Community Settings","community.returnTo":"Return to {communityName}","community.leaveCommunityTitle":"Leave community?","community.leaveCommunityBody":"You won\u2019t no longer be able to post and interact in this community after leaving.","community.leaveCommunityBodyLastMember":"As you\u2019re the last moderator and member, choose close community to leave.","community.leaveCommunityBodyOnlyModerator":"You\u2019re the only moderator in this group. Nominate other members before leaving community.","community.leaveCommunityButtonText":"Leave","community.leaveCommunityButtonOK":"OK","community.cannotInteract":"Join community to interact with all posts","community.removeUserFromCommunityTitle":"Remove user from community","community.removeUserFromCommunityBody":"This user won't no longer be able to search, post. Continue?","community.name":"Community name","community.about":"About","community.category":"Category","community.onlyadmincanpost":">Only admin can post","community.onlyadmins":"Choose to allow Only Admins to create posts in this community.","community.categorypermission":"Community permission","community.addmembers":"Add members","community.posts":"posts","community.members":"members","community.settings":"Settings","community.leaveCommunity":"Leave Community","CommunityMembers.members":"Members","CommunityMembers.moderators":"Moderators","EmptyFeed.TargetType.globalFeed":"This feed is empty","EmptyFeed.TargetType.communityFeed":"This community's feed is empty","EmptyFeed.TargetType.userFeed":"This user's feed is empty","EmptyFeed.TargetType.myFeed":"Your feed is empty. Start your first post","EmptyFeed.exploreCommunity":"Explore Community","UserFeed.tabs.timeline":"Timeline","community.exploreCommunities":"Explore Community","community.permissions.postReview":"Post review","community.permissions.storyComments":"Story comments","community.permissions.approvePosts":"Approve member posts","community.permissions.allowStoryComments":"Allow comments on community stories","community.permissions.approvePosts.prompt":"Posts by members have to be reviewed and approved by community moderator.","community.permissions.storyComments.prompt":"Turn on to receive comments on stories in this community.","community.permissions.error.needApprovalOnPostCreation.turnOn":"Unable to turn on post review","community.permissions.error.needApprovalOnPostCreation.turnOff":"Unable to turn off post review","community.permissions.error.storyComments.turnOn":"Unable to turn on post review","community.permissions.error.storyComments.turnOff":"Unable to turn off post review","community.review.declinePendingPosts":"Decline pending post will permanently delete the selected post from community.","community.pendingPostsBanner.title":"Pending posts","community.pendingPostsBanner.pendingForReview":"Your posts are pending for review","community.pendingPostsBanner.needApproval":"{formattedAmount} {amount, plural, one {post needs} other {posts need}} approval","communityCreatedModal.title":"Customize your community","communityCreatedModal.message":"You\u2019ve successfully created a community! Now let's manage permissions that work best for you","communityCreatedModal.goToSettings":"Community settings","communityCreatedModal.skip":"Skip for now",post:"Post","upload.attachmentLimit":"You reached the maximum attachment of {maxFiles}","upload.fileSizeLimit":"One of the selected file is larger than 1GB. Please select a new file.","user.editProfile":"Edit profile","user.message":"Message","follow.placeholder.noFollowings":"No followings found","follow.placeholder.noFollowers":"No followers found","ProfileSettings.editProfile":"Edit profile","ProfileSettings.returnTo":"Return to ","SideSectionMyCommunity.myCommunity":"My Community","file.reUpload":"Click to re-upload the file","UserProfileForm.displayname":"Display name","UserProfileForm.about":"About","UserProfileForm.title":"General","UserProfileForm.namePlaceholder":"Enter user display name","UserProfileForm.requiredDisplayName":"Display name is required","UserProfileForm.requiredDescription":"Enter something about yourself","UserSelector.placeholder":"Select user...","report.reportUser":"Report user","report.unreportUser":"Unreport user","report.reportComment":"Report comment","report.unreportComment":"Unreport comment","report.reportSent":"Report sent","report.unreportSent":"Unreport sent","comment.deleted":"This comment has been deleted","comment.delete":"Delete comment","comment.edit":"Edit comment","comment.deleteConfirmContent":"This comment will be permanently deleted. Continue?","comment.deleteConfirmCancelText":"Cancel","comment.deleteConfirmOkText":"Delete","dropdown.first":"First","dropdown.second":"Second","layout.logout":"Log Out","layout.username":"Jackies","chat.details.chatDetailes":"Chat Detail","chat.details.communityName":"Community Name","message.flag":"flag","message.unflag":"Unflag","message.edit":"Edit","message.delete":"Delete","message.deleted":"deleted","message.unsupportedFormat":"Unsupported message format","message.saveOptionsError":"There was an error processing your request","MessageComposeBar.placeholder":"Type your message...","RecentChat.chats":"Chats","AddMemberModal.addMembers":"Add members","AddMemberModal.membersValidationError":"Please select at least one member",add:"Add",save:"Save",close:"Close",reply:"Reply",delete:"Delete",create:"Create",cancel:"Cancel",loading:"Loading...","loading.chat":"Loading chat...",anonymous:"Anonymous","comment.edited":"Edited","comment.readmore":"...Read more","communities.nocommunityfound":"No community found","profile.setting":"Profile Settings","sidesectioncommunity.newfeed":"NewsFeed","sidesectioncommunity.explore":"Explore","sidesectioncommunity.community":"Community","communityFeed.join":"Join community to interact with all posts","communityFeed.members":"Members","communityFeed.moderators":"Moderators","files.all":"View all files","sidebar.community":"Community","sidebar.explore":"Explore","CategoryCommunitiesList.emptyTitle":"It's empty here...","CategoryCommunitiesList.emptyDescription":"No community found in this category","CommentComposeBar.addComment":"Add comment","CommentComposeBar.replayTo":"Reply to ","CommentComposeBar.replayToUser":"Replying to {displayName}","CommentComposeBar.saySomething":"Say something nice","CommentComposeBar.unableToPost":"Unable to post","CommentComposeBar.overCharacter":"You have reached maximum 50,000 characters in a post.","CommentComposeBar.done":"Done","CommentComposeBar.unableToMention":"Unable to mention","CommentComposeBar.overMentionees":"You have reached maximum 30 mentioned users in a post.","CommentComposeBar.okText":"OK","CommunityCreationModal.title":"Leave without finishing?","CommunityCreationModal.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","CommunityCreationModal.cancelText":"Continue editing","CommunityCreationModal.okText":"Leave","PostAsCommunity.title":"Post as community","PostAsCommunity.caption":"Enable this will publish the post on behalf of community account","AddMemberAction.title":"Add members","AddMemberAction.description":"Add your friends to this community to participate in group conversations","CloseCommunityAction.closeConfirm.title":"Close community?","CloseCommunityAction.closeConfirm.description":"All members will be removed from the community. All posts, messages, reactions and media shared in community will be deleted. This cannot be undone.","CloseCommunityAction.title":"Close community","CloseCommunityAction.description":"Closing this community will remove the community page and all its content and comments. This cannot be undone.","report.doReport":"Report","report.undoReport":"Undo Report","comment.deleteBody":"This comment will be permanently removed.","reply.delete":"Delete reply","reply.deleteBody":"This reply will be permanently deleted. Continue?","reply.edit":"Edit reply","reply.deleted":"This reply has been deleted","tabs.editProfile":"Edit profile","tabs.timeline":"Timeline","tabs.followers":"Followers","tabs.followings":"Followings","tabs.pending":"Pending","tabs.members":"Members","tabs.moderators":"Moderators","tabs.pendingPosts":"Pending {amount, select, 0 {} other { ({formattedAmount})}}","tabs.permissions":"Permissions","tabs.gallery":"Gallery","tabs.images":"Photos","tabs.videos":"Videos","tabs.liveStreams":"Livestreams","feed.emptyFeed":"This feed is empty","feed.emptyCommunityPublicFeed":"This community's feed is empty","feed.emptyCommunityReviewingFeed":"No pending posts","feed.emptyJoinedCommunityPublicFeed":"Your feed is empty. Start you first post","feed.emptyUserFeed":"No posts yet","feed.emptyMyFeed":"Your feed is empty. Start your first post","chat.groupSetting":"Group settings","chat.message.deleted":"Message was deleted","chat.message.unsupported":"Unsupported message type","chat.chats":"Chats","chat.details.header":"Chat Details","chat.details.chatName":"Chat Name","chat.leaveChat":"Leave chat","chat.leaveChat.confirm.title":"Leave chat","chat.leaveChat.confirm.content":"Are you sure you want to leave the chat?","chat.leaveChat.confirm.okButton":"Leave","chat.leaveChat.success":"You successfully left chat","chat.leaveChat.error":"Attempt to leave a chat has failed","chat.members.return":"Return to controls","chat.members.count":"{count} members","chat.create.modalTitle":"Create new chat","chat.loading.error":"Couldn't load chat","userSelector.placeholder":"Enter name or email addresses","userSelector.emptyState.title":"It's empty here...","userSelector.emptyState.description":"No contact found here","groupChat.createPopup.fieldName":"Group name","groupChat.createPopup.placeholder":"Please input group name","general.cancel.capital":"Cancel","general.create.capital":"Create","general.done.capital":"Done","chat.member.addMore":"Add or Remove user","video.notReady":"The video is being processed. Please try again later.","liveStream.idle":"This stream is currently unavailable","liveStream.ended.caption":"This liveStream has ended.","liveStream.ended.message":"Playback will be available for you to watch shortly.","user.follow":"Follow","user.unfollow":"Unfollow","user.unfollow.confirm.title":"Unfollow {displayName}","user.unfollow.confirm.body":"You\u2019ll have to send a request again to follow {displayName}. Continue?","user.cancel_follow":"Cancel request","placeholder.noResults":"No results found","request.accept":"Accept","request.decline":"Decline","follower.title.removeUser":"Remove {displayName} from followers?","follower.body.removeUser":"We will not notify {displayName} that they've been removed from your followers","follower.menuItem.removeUser":"Remove user","follower.menuItem.unfollow":"Unfollow","buttonText.cancel":"Cancel","buttonText.remove":"Remove","follow.pendingNotification.title":"Pending requests","follow.pendingNotification.body":"Your requests are waiting for review","notification.done":"Done","counter.followings":"following","counter.followers":"followers","buttonText.unfollow":"Unfollow","privateFeed.title":"This account is private","privateFeed.body":"Follow this user to see all posts","navigationBlocker.title":"Unsaved changes","navigationBlocker.content":"Your changes won`t be saved. Are you sure you want to leave this page now?","user.unfollow.confirm.title.thisUser":"Unfollow this user","mediaGallery.images.empty":"No photos yet","mediaGallery.liveStreams.empty":"No liveStreams yet","mediaGallery.videos.empty":"No videos yet","user.unfollow.confirm.body.thisUser":"You\u2019ll have to send a request again to follow this user. Continue?","navigationBlocker.okText":"Leave","options_composer.button.add":"Add Option","options_composer.title":"Create at least 2 options","poll_modal.answer_type.title":"Selection type","poll_modal.answer_type.body":"Choose to vote with one or multiple options","poll_modal.closed_in.title":"Schedule poll (Optional)","poll_modal.closed_in.body":"Poll will be automatically closed at the end of chosen time frame (UTC)","select.answerType.item":"{answerType} selection","poll_composer.question.label":"Poll options","poll_composer.question.placeholder":"What\u2019s your poll question?","poll_composer.poll_options.label":"Options","poll_modal.title":"Create poll","poll.votes":"{voteCount} votes","poll.vote.closedIn":"Poll ends in {closedIn} days","poll.vote.finalResults":"Final results","poll.vote.submit":"Submit vote","poll.error.deletedOrClosed":"This poll has been closed or deleted.","poll.close":"Close poll","postCreator.unableToPost":"Unable to post","postCreator.overCharacter":"You have reached maximum 50,000 characters in a post.","postCreator.done":"Done","postCreator.unableToMention":"Unable to mention","postCreator.overMentionees":"You have reached maximum 30 mentioned users in a post.","postCreator.okText":"OK","pollComposer.unableToMention":"Unable to mention","pollComposer.overMentionees":"You have reached maximum 30 mentioned users in a post.","pollComposer.okText":"OK","storyCreation.hyperlink.bottomSheet.cancel":"Cancel","storyCreation.hyperlink.bottomSheet.title":"Add link","storyCreation.hyperlink.bottomSheet.submit":"Done","storyCreation.hyperlink.form.urlLabel":"URL","storyCreation.hyperlink.form.urlPlaceholder":"https://example.com","storyCreation.hyperlink.form.linkTextLabel":"Customize link text","storyCreation.hyperlink.form.linkTextPlaceholder":"Name your link","storyCreation.hyperlink.form.linkTextDescription":"This text will show on the link instead of URL.","storyCreation.hyperlink.form.removeButton":"Remove link","storyCreation.hyperlink.removeConfirm.title":"Remove link","storyCreation.hyperlink.removeConfirm.content":"This link will be removed from story.","storyCreation.hyperlink.removeConfirm.cancel":"Cancel","storyCreation.hyperlink.removeConfirm.confirm":"Remove","storyCreation.hyperlink.validation.error.invalidUrl":"Please enter a valid URL.","storyCreation.hyperlink.validation.error.whitelisted":"Please enter a whitelisted URL.","storyCreation.hyperlink.validation.error.blocked":"Your text contains a blocklisted word.","storyCreation.hyperlink.unsavedChanges.title":"Unsaved changes","storyCreation.hyperlink.unsavedChanges.content":"Are you sure you want to cancel? Your changes won't be saved.","storyCreation.hyperlink.unsavedChanges.cancel":"No","storyCreation.hyperlink.unsavedChanges.confirm":"Yes","storyViewer.actions.deleteStory":"Delete story","storyViewer.action.confirmModal.title":"Delete this story?","storyViewer.action.confirmModal.content":"This story will be permanently deleted. You\u2019ll no longer to see and find this story.","storyViewer.notification.deleted":"Story deleted","storyViewer.notification.success":"Successfully shared story","storyViewer.notification.error":"Failed to share story","storyViewer.footer.failed":"Failed to upload","storyViewer.footer.uploading":"Uploading...","storyViewer.commentSheet.title":"Comments","storyViewer.commentSheet.empty":"No comments yet","storyViewer.commentSheet.disabled":"Comments are disabled for this story","storyViewer.commentSheet.replyingTo":"Replying to","storyViewer.toast.like.disabled":"Join community to interact with all stories","storyViewer.toast.comment.reported":"Comment reported","storyViewer.toast.comment.unreported":"Comment unreported","storyViewer.toast.disable.react":"Join community to interact with all stories","storyViewer.commentComposeBar.submit":"Post","storyDraft.button.shareStory":"Share story","storyDraft.notification.hyperlink.error":"Can\u2019t add more than one link to your story.","storyTab.title":"Story","select.chatType.item":"{answerType} type","chatComposer.label.channelId":"Channel ID","chatComposer.label.displayName":"Display Name","chatComposer.label.type":"Channel Type","chatComposer.addUsers":"Add users","chat_modal.title":"Create chat","chat_composer.placeholder.displayName":"Enter display name here","chat_composer.placeholder.channelId":"Enter channel ID here","editChatMembersModal.title":"Add/Edit chat members","editChatMembersModal.confirm.title":"Leave without finishing?","editChatMembersModal.confirm.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","editChatMembersModal.confirm.cancelText":"Continue editing","editChatMembersModal.confirm.okText":"Leave","notification.error.blockedWord":"Amity SDK (400308): Text contain blocked word","livechat.deleted.message":"This message was deleted","livechat.messageBubble.reply.button":"Reply","livechat.messageBubble.copy.button":"Copy","livechat.messageBubble.delete.button":"Delete","livechat.messageBubble.mention.button":"Mention","livechat.messageBubble.report.button":"Report","livechat.messageBubble.unReport.button":"Unreport","livechat.channel.muted":"This channel has been set to read-only by the channel moderator","livechat.modal.delete.message.title":"Delete this message?","livechat.modal.delete.message.content":"This message will also be removed from your friend\u2019s devices.","livechat.mention.all":"All","livechat.mention.all.description":"Notify everyone","livechat.notification.copy.message":"Message copied","livechat.composebar.placeholder":"Write a message","livechat.delete.message.error":"Unable to delete message. Please try again.","livechat.member.muted":"You\u2019ve been muted by the channel moderator","livechat.member.muted.error":"User is muted","livechat.member.banned.title":"You are banned from chat","livechat.member.banned.description":"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned.","livechat.report.message.success":"Message reported","livechat.report.message.error":"This message failed to be reported. Please try again.","livechat.unReport.message.success":"Message unreported","livechat.unReport.message.error":"This message failed to be unreported. Please try again.","livechat.error.tooLongMessage.title":"Unable to send message","livechat.error.tooLongMessage.description":"Your message is too long. Please shorten your message and try again.","livechat.error.sendingMessage.error":"Your message wasn't sent. Please try again.","livechat.error.sendingMessage.blockedWord":"Your message wasn't sent as it contains a blocked word.","livechat.error.sendingMessage.notAllowLink":"Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.","livechat.reaction.errorOnload":"Unable to load reactions","livechat.reaction.emptyState":"No reactions yet","livechat.reaction.emptyState.description":"Be the first to react to this message!","livechat.reaction.label.removeReaction":"Click to remove reaction"};var Fp={en:Gw};var $w="en",CW=({locale:e,children:t})=>{let o=Fp[e]?Fp[e]:Fp[$w];return X__default.default.createElement(reactIntl.IntlProvider,{defaultLocale:$w,locale:e,messages:o},t)},Zw=CW;var vW={palette:{alert:"#FA4D30",base:"#292B32",primary:"#1054DE",secondary:"#FFD400",tertiary:"#FF305A",neutral:"#17181C",highlight:"#1054DE",system:{borders:"#ebecef",background:"#fff"}},typography:{global:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif",fontStyle:"normal"},headline:{fontWeight:600,fontSize:"20px"},title:{fontWeight:600,fontSize:"16px"},subTitle:{fontWight:400,fontSize:"13px"},body:{fontWeight:"normal",fontSize:"14px"},bodyBold:{fontWeight:600,fontSize:"14px"},caption:{fontWeight:"normal",fontSize:"12px"},captionBold:{fontWeight:600,fontSize:"12px"}}},qw=vW;var Qw=e=>e.toFixed(1),Yw=e=>{let t=Math.min(e*100,100);return Qw(t)};function xW(e){return e.alpha!==void 0}var Kw=e=>{let{hue:t,saturation:o,lightness:r}=e,n=[`${Qw(t)}`,`${Yw(o)}%`,`${Yw(r)}%`];return xW(e)?`hsla(${[...n,e.alpha].filter(et).join(",")})`:`hsl(${n.filter(et).join(",")})`},bW=e=>{let t=polished.parseToHsl(e);return Kw(t)},IW=(e,t)=>{let o=polished.parseToHsl(t),{lightness:r}=o,n=E(m({},o),{lightness:Math.min(1,r+e)});return Kw(n)},wW=[.25,.4,.5,.75],Jw=e=>{let i=e,{system:t}=i,o=_(i,["system"]),r=Object.keys(o).reduce((a,s)=>(a[s]={main:bW(o[s])},a),m({},o)),n=Object.keys(r).reduce((a,s)=>{let l=o[s],d=wW.reduce((u,f,g)=>{let h=`shade${g+1}`;return u[h]=IW(f,l),u},{}),p=r[s];return p&&typeof p=="object"?a[s]=m(m({},d),p):a[s]=E(m({},d),{main:p}),a},m({},r));return E(m({},n),{system:t})};var _W=["fontFamily","fontStyle","fontWeight","fontSize"],MW=e=>Object.keys(e).reduce((o,r)=>{let n=e[r];return r&&n&&_W.includes(r)&&(o[r]=n),o},{}),Xw=e=>Object.keys(e).reduce((o,r)=>(o[r]=MW(m(m({},e.global),e[r])),o),{});var Rw={colors:{primary:{default:"#1054DE",shade1:"#4A82F2",shade2:"#A0BDF8",shade3:"#D9E5FC",shade4:"#FFFFFF"},secondary:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},base:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},baseInverse:{default:"#FFFFFF"},alert:{default:"#FA4D30"},highlight:"#1054DE",messageBubble:{default:"#1054DE",inverse:"#FFFFFF"},storyIndicator:{default:"#EBECEF",active:["#339AF9","#78FA58"]},hyperlink:{default:"#FFFFFFCC"},actionButton:{default:"#00000080"}},typography:{heading:{fontWeight:600,fontSize:"1.25rem",lineHeight:"1.5rem"},title:{fontWeight:600,fontSize:"1rem",lineHeight:"1.25rem"},subTitle:{fontWeight:400,fontSize:"0.8125rem",lineHeight:"1rem"},body:{fontWeight:"normal",fontSize:"0.875rem",lineHeight:"1.25rem"},bodyBold:{fontWeight:600,fontSize:"0.875rem",lineHeight:"1.25rem"},caption:{fontWeight:"normal",fontSize:"0.75rem",lineHeight:"1rem"},captionBold:{fontWeight:600,fontSize:"0.75rem",lineHeight:"1rem"}}};var SW=(e={})=>{let t=PW__default.default(qw,e),o=Jw(t.palette),r=Xw(t.typography);return E(m({},t),{palette:o,typography:r,v4:Rw})},e_=SW;var r_=X__default.default.createContext(void 0),n_=({children:e,pageBehavior:t={}})=>{let{page:o,onBack:r,goToPostDetailPage:n,goToCommunityProfilePage:i,goToUserProfilePage:a,goToViewStoryPage:s,onChangePage:l,goToSelectPostTargetPage:d,goToStoryTargetSelectionPage:p,goToStoryCreationPage:u,goToPostComposerPage:f,goToSocialHomePage:g}=ye(),h={AmityStoryViewPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&y.onCloseAction)return t.AmityStoryViewPageBehavior.onCloseAction();l("SocialHomePage");},hyperLinkAction:y=>{var C;if((C=t==null?void 0:t.AmityStoryViewPageBehavior)!=null&&C.hyperLinkAction)return t.AmityStoryViewPageBehavior.hyperLinkAction(y)}},AmityDraftStoryPageBehavior:{onCloseAction:()=>{var y;if((y=t==null?void 0:t.AmityDraftStoryPageBehavior)!=null&&y.onCloseAction)return t.AmityDraftStoryPageBehavior.onCloseAction();o.type==="DraftPage"&&o.context.storyType==="communityFeed"?i(o.context.targetId):g();}},onClickHyperLink:()=>{},AmitySocialHomePageBehavior:{},AmityGlobalFeedComponentBehavior:{goToPostDetailPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToPostDetailPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToPostDetailPage(y);n(y.postId);},goToViewStoryPage:y=>{var C;if((C=t==null?void 0:t.AmityGlobalFeedComponentBehavior)!=null&&C.goToViewStoryPage)return t==null?void 0:t.AmityGlobalFeedComponentBehavior.goToViewStoryPage(y);s({targetId:y.targetId,targetType:y.targetType,storyType:y.storyType});}},AmityPostDetailPageBehavior:{},AmityPostContentComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityPostContentComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);},goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityPostContentComponentBehavior.goToUserProfilePage(y);a(y.userId);},goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostContentComponentBehavior)!=null&&C.goToPostComposerPage)return t.AmityPostContentComponentBehavior.goToPostComposerPage(y);f(y);}},AmitySocialGlobalSearchPageBehavior:{},AmityCommunitySearchResultComponentBehavior:{goToCommunityProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityCommunitySearchResultComponentBehavior)!=null&&C.goToCommunityProfilePage)return t.AmityCommunitySearchResultComponentBehavior.goToCommunityProfilePage(y);i(y.communityId);}},AmityUserSearchResultComponentBehavior:{goToUserProfilePage:y=>{var C;if((C=t==null?void 0:t.AmityUserSearchResultComponentBehavior)!=null&&C.goToUserProfilePage)return t.AmityUserSearchResultComponentBehavior.goToUserProfilePage(y);a(y.userId);}},AmityCreatePostMenuComponentBehavior:{goToSelectPostTargetPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToSelectPostTargetPage)return t.AmityCreatePostMenuComponentBehavior.goToSelectPostTargetPage();d();},goToStoryTargetSelectionPage(){var y;if((y=t==null?void 0:t.AmityCreatePostMenuComponentBehavior)!=null&&y.goToStoryTargetSelectionPage)return t.AmityCreatePostMenuComponentBehavior.goToStoryTargetSelectionPage();p();}},AmityPostTargetSelectionPage:{goToPostComposerPage:y=>{var C;if((C=t==null?void 0:t.AmityPostTargetSelectionPage)!=null&&C.goToPostComposerPage)return t.AmityPostTargetSelectionPage.goToPostComposerPage(y);f(y);}},AmityStoryTargetSelectionPage:{goToStoryCreationPage:y=>{var C;if((C=t==null?void 0:t.AmityStoryTargetSelectionPage)!=null&&C.goToStoryCreationPage)return t.AmityStoryTargetSelectionPage.goToStoryCreationPage(y);u(y);}},AmityPostComposerPageBehavior:{goToSocialHomePage(){var y;if((y=t==null?void 0:t.AmityPostComposerPageBehavior)!=null&&y.goToSocialHomePage)return t.AmityPostComposerPageBehavior.goToSocialHomePage();g();}},AmityCommunityProfilePageBehavior:{goToPostComposerPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostComposerPage)return t.AmityCommunityProfilePageBehavior.goToPostComposerPage(y);f(y);},goToPostDetailPage(y){var C;if((C=t==null?void 0:t.AmityCommunityProfilePageBehavior)!=null&&C.goToPostDetailPage)return t.AmityCommunityProfilePageBehavior.goToPostDetailPage(y);n(y.postId,y.hideTarget,y.category);}}};return X__default.default.createElement(r_.Provider,{value:h},e)},It=()=>{let e=X.useContext(r_);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var Bo=class Bo{constructor(){this.client=null;this.isConnected=!1;this.stateChangeHandler=null;this.disconnectedHandler=null;}static setup(t){if(!Bo.instance){Bo.instance=new Bo;let o=tsSdk.Client.createClient(t.apiKey,t.apiRegion,t!=null&&t.apiEndpoint?{apiEndpoint:t.apiEndpoint}:{});Bo.setClient(o);}}static registerDevice(t,o,r,n,i,a,s){return P(this,null,function*(){if(!Bo.instance)throw new Error("AmityUIKitManager must be set up first using the setup method.");Bo.instance.onConnectionStatusChange=i,Bo.instance.onConnected=a,Bo.instance.onDisconnected=s,yield Bo.instance.connectAndLogin(t,o,r,n);})}static setClient(t){if(Bo.instance)Bo.instance.client=t,Bo.instance.isConnected=!0;else throw new Error("AmityUIKitManager must be set up first using the setup method.")}connectAndLogin(t,o,r,n){return P(this,null,function*(){yield tsSdk.Client.login({userId:t,displayName:o,authToken:n},{sessionWillRenewAccessToken:r.sessionWillRenewAccessToken.bind(r)}),this.stateChangeHandler=tsSdk.Client.onSessionStateChange(i=>{var a;(a=this.onConnectionStatusChange)==null||a.call(this,i);}),this.disconnectedHandler=tsSdk.Client.onClientDisconnected(()=>{this.onDisconnected&&this.onDisconnected();}),this.onConnected&&this.onConnected();})}disconnect(){var t,o;(t=this.stateChangeHandler)==null||t.call(this),(o=this.disconnectedHandler)==null||o.call(this),this.client=null,this.isConnected=!1;}static getClient(){var t;return ((t=Bo.instance)==null?void 0:t.client)||null}isClientConnected(){return this.isConnected}};Bo.instance=null;var Xs=Bo;var i_=X.createContext([]),oi=()=>({config:X.useContext(i_)}),a_=({children:e})=>{let{config:t}=bd(),[o,r]=X__default.default.useState([]);return X__default.default.useEffect(()=>{if(!t)return;let n=t==null?void 0:t.message_reactions;n&&r(n);},[t]),X__default.default.createElement(i_.Provider,{value:o},e)};var Tl,Nl,Vp,s_,wd,J8,Rs=class Rs{constructor(){To(this,Vp);To(this,wd);To(this,Tl,void 0);xa(this,Tl,new Map);}static get instance(){return qo(Rs,Nl)||xa(Rs,Nl,new Rs),qo(Rs,Nl)}hasReachedLimit(t){let o=Nr(this,wd,J8).call(this,t);return qo(this,Tl).get(t)===o}markSeen(t){qo(this,Tl).set(t,Nr(this,wd,J8).call(this,t));}};Tl=new WeakMap,Nl=new WeakMap,Vp=new WeakSet,s_=function(t){let o=Lo.instance.getAdFrequencyByPlacement(t);return o==null||o.type!=="time-window"?0:o.value},wd=new WeakSet,J8=function(t){let o=mn__default.default(),r=o.startOf("day").diff(o,"minute"),n=Math.ceil(r/Nr(this,Vp,s_).call(this,t));return `${o.format("DD-MM-YYYY")}-${n}`},To(Rs,Nl,void 0);var kl=Rs;var El,_d,Md,X8,e1=class e1{constructor(){To(this,Md);To(this,_d,"amity.seenRecencyCache");}static get instance(){return qo(e1,El)||xa(e1,El,new e1),qo(e1,El)}getSeenRecencyByAdId(t){if(t)return Nr(this,Md,X8).call(this)[t]}setSeenRecencyCache(t,o){let r=Nr(this,Md,X8).call(this);r[t]=o,window.localStorage.setItem(qo(this,_d),JSON.stringify(r));}};El=new WeakMap,_d=new WeakMap,Md=new WeakSet,X8=function(){return JSON.parse(window.localStorage.getItem(qo(this,_d))||"{}")},To(e1,El,void 0);var Op=e1,Al,Pd,R8,t1=class t1{constructor(){To(this,Pd);this.isLoading=!0;this.ads=[];this.settings=null;this.subscribers=[];tsSdk.Client.onSessionStateChange(t=>P(this,null,function*(){if(t==="established"){let o=yield tsSdk.AdRepository.getNetworkAds();this.ads=o.ads,this.settings=o.settings,this.subscribers.forEach(r=>r(o)),this.isLoading=!1;}else t==="terminated"&&(this.ads=[],this.settings=null,this.subscribers.forEach(o=>o(null)));}));}static get instance(){return qo(t1,Al)||xa(t1,Al,new t1),qo(t1,Al)}onNetworkAdsData(t){!this.isLoading&&this.ads.length>0&&this.settings&&t({ads:this.ads,settings:this.settings}),this.subscribers.push(t);}getLastSeen(t){return Op.instance.getSeenRecencyByAdId(t)}markSeen(t,o){var r;Op.instance.setSeenRecencyCache(t.adId,Date.now()),((r=Nr(this,Pd,R8).call(this,o))==null?void 0:r.type)==="time-window"&&kl.instance.markSeen(o),t.analytics.markAsSeen(o);}markClicked(t,o){t.analytics.markLinkAsClicked(o);}getAdFrequencyByPlacement(t){return Nr(this,Pd,R8).call(this,t)}};Al=new WeakMap,Pd=new WeakSet,R8=function(t){if(!this.settings)return null;switch(t){case"feed":return this.settings.frequency.feed;case"comment":return this.settings.frequency.comment;case"story":return this.settings.frequency.story;default:return null}},To(t1,Al,void 0);var Lo=t1;var Bl,zp,l_,Up,m_,jp,d_,o1=class o1{constructor(){To(this,zp);To(this,Up);To(this,jp);}static get instance(){return qo(o1,Bl)||xa(o1,Bl,new o1),qo(o1,Bl)}recommendedAds({ads:t,placement:o,count:r,communityId:n}){let i=Nr(this,zp,l_).call(this,t),a=new Map;return t.forEach(s=>{var u;let l=(((u=s.targets)==null?void 0:u.communityIds)||[]).includes(n||"")?1:0,d=i.get(s.adId);if(d==null)return;let p=l+Math.pow(Math.E,2*d);a.set(s.adId,p);}),Nr(this,jp,d_).call(this,{ads:t,scores:a,count:r})}};Bl=new WeakMap,zp=new WeakSet,l_=function(t){var a;let o=t.sort((s,l)=>{var u,f;let d=(u=Lo.instance.getLastSeen(s.adId))!=null?u:0;return ((f=Lo.instance.getLastSeen(l.adId))!=null?f:0)-d}),r=new Map,n=Lo.instance.getLastSeen((a=o==null?void 0:o[o.length-1])==null?void 0:a.adId);return Lo.instance.getLastSeen(o[0].adId)===n?o.forEach(s=>{r.set(s.adId,1);}):o.forEach((s,l)=>{let d=l/o.length;r.set(s.adId,d);}),r},Up=new WeakSet,m_=function(t){let o=0,r=Math.random();for(let n=0;n<t.length;n++)if(o+=t[n],r<o)return n;return t.length-1},jp=new WeakSet,d_=function({ads:t,scores:o,count:r}){let n=[...t],i=[];for(;i.length<r&&n.length>0;){let a=n.reduce((p,u)=>p+(o.get(u.adId)||0),0),s=n.map(p=>(o.get(p.adId)||0)/a),l=s.map(p=>p/s.reduce((u,f)=>u+f,0)),d=Nr(this,Up,m_).call(this,l);i.push(n[d]),n.splice(d,1);}return i},To(o1,Bl,void 0);var Hp=o1;var e7=X.createContext({isLoading:!0,ads:[],settings:null,saveItemsPagination:()=>{},getItemsPaginationCache:()=>{}}),u_=({children:e})=>{let[t,o]=X.useState(null),[r,n]=X.useState(!0),[i,a]=X.useState(new Map),s=({targetId:p,placement:u,frequencyType:f})=>p?`${f}-${u}-${f}`:`global-${u}-${f}`,l=({targetId:p,placement:u,adId:f,referenceId:g,frequencyType:h})=>{a(y=>{let C=s({targetId:p,placement:u,frequencyType:h}),v=y.get(C);return v?y.set(C,[...v,{adId:f,referenceId:g}]):y.set(C,[{adId:f,referenceId:g}]),new Map(y)});},d=({targetId:p,placement:u,frequencyType:f})=>{let g=s({targetId:p,placement:u,frequencyType:f});return i.get(g)};return X.useEffect(()=>{function p(){return P(this,null,function*(){Lo.instance.onNetworkAdsData(u=>{o(u),n(!1);});})}p();},[]),X__default.default.createElement(e7.Provider,{value:{isLoading:r,ads:(t==null?void 0:t.ads)||[],settings:(t==null?void 0:t.settings)||null,saveItemsPagination:l,getItemsPaginationCache:d}},e)};var t7=()=>X.useContext(e7).settings,f_=({count:e,placement:t,communityId:o})=>{let n=X.useContext(e7).ads,[i,a]=X.useState([]),s=t7(),l=Lo.instance.getAdFrequencyByPlacement(t);return X.useEffect(()=>{s!=null&&s.enabled&&((l==null?void 0:l.type)==="time-window"&&kl.instance.hasReachedLimit(t)||a(Hp.instance.recommendedAds({ads:n,placement:t,count:e,communityId:o})));},[n,e,t,o]),i};function VW({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=z4(),[a,s]=X.useState(!1),[l,d]=X.useState(n||!0),[p,u]=X.useState([]),[f,g]=X.useState(null),[h,y]=X.useState(!1),C=X.useRef(null),v=X.useRef(null),x=X.useCallback(()=>{var I;C.current&&(s(!0),(I=C.current)==null||I.call(C));},[C,a,l,d]),b=X.useCallback(I=>{n&&(I.data&&u(I.data),d(I.loading),y(I.hasNextPage),g(I.error),C.current=I.onNextPage,o(I));},[n,C]);X.useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return v.current=I,()=>{I();}},[t,n]);let S=X.useCallback(()=>{v.current&&v.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return v.current=I,()=>I()},[]);return {items:p,hasMore:h,isLoading:l,loadMore:x,error:f,loadMoreHasBeenCalled:a,refresh:S}}var lt=VW;function Ar(e){return e!=null}function y_(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function h_(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var OW=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function C_(e){return e==="https://"||OW.test(e)}var x_=({placement:e,pageSize:t,communityId:o,getItemId:r})=>{let n=t7(),[i,a]=X.useState(0),[s,l]=X.useState([]),[d,p]=X.useState(0),u=Lo.instance.getAdFrequencyByPlacement(e),f=(u==null?void 0:u.type)==="fixed"?t/u.value:1,g=f_({count:f,placement:e,communityId:o});return {combineItemsWithAds:C=>{if(!(n!=null&&n.enabled))return C;if((u==null?void 0:u.type)==="fixed"){let v=new Set(C.map(G=>r(G))),x=s.map(G=>{let U=r(G[0]);if(!v.has(U))return null;let k=C.find(ee=>r(ee)===U);return k?G.length===1?[k]:[k,G[1]]:G}).filter(Ar),b=x[0],S=(()=>{if(b){let G=C.findIndex(U=>r(U)===r(b[0]));return G===-1?0:G}return 0})(),w=[...(C||[]).slice(0,S).map(G=>[G]),...x],M=C.slice(S).filter(G=>{let U=r(G);return !w.some(k=>r(k[0])===U)}),N=i,B=d,D=M.map(G=>{if(B=B+1,!(B%u.value===0))return [G];let k=g[N];return N=N+1>g.length-1?0:N+1,[G,k]});a(N),p(B);let j=[...w,...D];return l([...w,...D]),j.length===0&&(a(0),p(0)),[...w,...D].flatMap(G=>G)}else if((u==null?void 0:u.type)==="time-window")return C.length===0?C:[...C.slice(0,1),g[0],...C.slice(1)].filter(Ar);return C},reset:()=>{a(0),l([]),p(0);}}},Td=({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0,placement:i,communityId:a,pageSize:s,getItemId:l})=>{let{combineItemsWithAds:d}=x_({placement:i,pageSize:s,communityId:a,getItemId:l}),g=lt({fetcher:e,params:t,config:r,shouldCall:n}),{items:p}=g,u=_(g,["items"]),f=X.useMemo(()=>d(p).flatMap(h=>h),[p]);return E(m({},u),{items:f})},b_=e=>{let a=e,{items:t}=a,o=_(a,["items"]),{combineItemsWithAds:r,reset:n}=x_(o);return {itemWithAds:X.useMemo(()=>r(t),[t]),reset:n}};var ZW=()=>{let[e,t]=X.useState([]),[o,r]=X.useState(!1),[n,i]=X.useState(null),[a,s]=X.useState(!1),[l,d]=X.useState(!1),[p,u]=X.useState(0),f=10,{itemWithAds:g,reset:h}=b_({items:e,pageSize:f,placement:"feed",getItemId:N=>N.postId}),y=N=>{let B=N.target;u(B.scrollTop);};function C(){return P(this,null,function*(){try{r(!0);let N=yield tsSdk.FeedRepository.getCustomRankingGlobalFeed({limit:10,queryToken:n||void 0}),B=(yield Promise.all(N.data.map(D=>P(this,null,function*(){var j;if(((j=D==null?void 0:D.children)==null?void 0:j.length)>0){let G=()=>{},U=yield new Promise(k=>{G=tsSdk.PostRepository.getPost(D.children[0],ee=>k(ee.data));});return G(),U&&["liveStream","poll","file"].includes(U.dataType)?null:D}return D})))).filter(Ar);i(N.paging.next||null),t(D=>[...D,...B]);}finally{setTimeout(()=>{r(!1);},300);}})}let v=N=>{t(B=>new Set([...B.map(j=>j.postId)]).has(N.postId)?B:[N,...B]);},x=N=>{let B=e.filter(D=>D.postId!==N);t(B);},b=N=>{let B=e.map(D=>D.postId===N.postId?m(m({},D),N):D);t(B);},S=X.useMemo(()=>n!==null,[n]),I=()=>{s(!0),!o&&S&&C();},w=()=>{l||(M(),d(!0));},M=()=>{t([]),i(null),C(),h();};return {itemWithAds:g,isLoading:o,prependItem:v,removeItem:x,updateItem:b,loadMore:I,hasMore:S,loadMoreHasBeenCalled:a,fetch:w,refetch:M,scrollPosition:p,onScroll:y}},I_=X.createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),Oa=()=>{let e=X.useContext(I_);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e},w_=({children:e})=>{let t=ZW();return X__default.default.createElement(I_.Provider,{value:t},e)};var JW=({apiKey:e,apiRegion:t,apiEndpoint:o,userId:r,displayName:n,postRendererConfig:i,theme:a={},children:s,socialCommunityCreationButtonVisible:l,pageBehavior:d,onConnectionStatusChange:p,onDisconnected:u,getAuthToken:f,configs:g})=>{let h=new reactQuery.QueryClient,[y,C]=X.useState(null),v=le(r),{error:x}=Ut(),b=X.useMemo(()=>({client:y,currentUserId:r||void 0,userRoles:(v==null?void 0:v.roles)||[]}),[y,r,v==null?void 0:v.roles]);return X.useEffect(()=>{P(void 0,null,function*(){let I;f&&(I=yield f());try{Xs.setup({apiKey:e,apiRegion:t,apiEndpoint:o}),Lo.instance,yield Xs.registerDevice(r,n||r,{sessionWillRenewAccessToken:M=>{f?f().then(N=>{M.renewWithAuthToken(N);}):M.renew();}},I,p,u);let w=Xs.getClient();C(w);}catch(w){console.error("Error setting up AmityUIKitManager:",w),w instanceof Error&&x({content:w.message});}});},[r,n,p,u]),y?X__default.default.createElement("div",{className:"asc-uikit"},X__default.default.createElement(reactQuery.QueryClientProvider,{client:h},X__default.default.createElement(gw,{initialConfig:g||vo},X__default.default.createElement(a_,null,X__default.default.createElement(u_,null,X__default.default.createElement(I0.Provider,{value:b},X__default.default.createElement(_0.Provider,{value:b},X__default.default.createElement(V4,null,X__default.default.createElement(Y4,null,X__default.default.createElement($8,{config:{socialCommunityCreationButtonVisible:l||!0}},X__default.default.createElement(j8,{config:i},X__default.default.createElement(G8,null,X__default.default.createElement(n_,{pageBehavior:d},X__default.default.createElement(Ow,null,X__default.default.createElement(w_,null,s),X__default.default.createElement(Q8,null))))))))))))))):null},XW=e=>X__default.default.createElement(Zw,{locale:"en"},X__default.default.createElement(pw,null,X__default.default.createElement(Lh,{theme:e_(e.theme)},X__default.default.createElement(Bw,null,X__default.default.createElement(hx,null,X__default.default.createElement(xw,null,X__default.default.createElement(Pv,null,X__default.default.createElement(JW,m({},e)),X__default.default.createElement(Dw,null),X__default.default.createElement(jw,null),X__default.default.createElement(bw,null),X__default.default.createElement(Sw,null)))))))),RW=XW;var oQ=()=>{let[e,t]=X.useState(null),o=Ut();return X.useEffect(()=>{e&&(o.error({content:e}),t(null));},[e]),[t]},__=oQ;var nQ=1073741824,iQ=1,n7=c.label`
|
|
1790
1790
|
cursor: pointer;
|
|
1791
1791
|
background: rgb(235 236 239 / 60%);
|
|
1792
1792
|
transition: background 0.1s;
|