// Metro module 8486 (f8487). import ContentInventoryStore from "../content_inventory/ContentInventoryStore"; import { AnalyticEvents, GuildFeatures } from "../../Constants"; import { ContentInventoryFeedKey } from "../content_inventory/ContentInventoryConstants"; import { v4 } from "../../_bundle/Module514"; import AnalyticsUtils from "../../utils/AnalyticsUtils"; const r22 = { CopyLink: 0, 0: "CopyLink" }; const r24 = { FollowGame: 0, 0: "FollowGame", UnfollowGame: 1, 1: "UnfollowGame", ClickMessageUser: 2, 2: "ClickMessageUser", SendMessageUser: 3, 3: "SendMessageUser", JoinVC: 4, 4: "JoinVC", WatchStream: 5, 5: "WatchStream", ClickSimilarGame: 6, 6: "ClickSimilarGame", WebsiteLink: 7, 7: "WebsiteLink", XLink: 8, 8: "XLink", YouTubeLink: 9, 9: "YouTubeLink", ShowMore: 10, 10: "ShowMore", ShowLess: 11, 11: "ShowLess", JoinServer: 12, 12: "JoinServer", ClickImage: 13, 13: "ClickImage", GameShop: 14, 14: "GameShop", LinkAccount: 15, 15: "LinkAccount", ClaimGame: 16, 16: "ClaimGame", FacebookLink: 17, 17: "FacebookLink", InstagramLink: 18, 18: "InstagramLink", BlueskyLink: 19, 19: "BlueskyLink", RedditLink: 20, 20: "RedditLink", TwitchLink: 21, 21: "TwitchLink", SteamStoreLink: 22, 22: "SteamStoreLink", EpicStoreLink: 23, 23: "EpicStoreLink", RobloxStoreLink: 24, 24: "RobloxStoreLink", BattlenetStoreLink: 25, 25: "BattlenetStoreLink", RiotStoreLink: 26, 26: "RiotStoreLink", MinecraftStoreLink: 27, 27: "MinecraftStoreLink", DiscordCollectiblesShop: 28, 28: "DiscordCollectiblesShop", DiscordCollectiblesShopItem: 29, 29: "DiscordCollectiblesShopItem", GameShopItem: 30, 30: "GameShopItem", SteamReviews: 31, 31: "SteamReviews", OpenCriticReviews: 32, 32: "OpenCriticReviews", Announcements: 33, 33: "Announcements", AnnouncementsItem: 34, 34: "AnnouncementsItem", CloudPlay: 35, 35: "CloudPlay", ClickTrailer: 36, 36: "ClickTrailer", Feedback: 37, 37: "Feedback", XboxGamePassStoreLink: 38, 38: "XboxGamePassStoreLink", CopyLink: 39, 39: "CopyLink" }; const r103 = { ActivityCard: "activity_card", ActivityCardContextMenu: "activity_card_context_menu", UserProfile: "user_profile", UserProfileApplicationWidget: "user_profile_application_widget", UserProfileCardContextMenu: "user_profile_card_context_menu", SimilarGames: "similar_games", DevTools: "dev_tools", Embed: "embed", GameProfileEmbed: "game_profile_embed", RtcPanel: "rtc_panel", FriendsActivityFeed: "friends_activity_feed", MiniGameProfile: "mini_game_profile", GameMention: "game_mention", GameSheet: "game_sheet", QuestBar: "quest_bar", QuestHome: "quest_home_desktop", QuestInGameModal: "quest_in_game_modal", QuestActivityPanel: "quest_activity_panel", QuestEmbed: "quest_embed", QuestLiveStream: "quest_live_stream", ClipEmbed: "clip_embed", ClipsReminder: "clips_reminder", AnnouncementChannelReturn: "announcement_channel_return", CallTile: "call_tile", InAppBrowserReturn: "in_app_browser_return", Deeplink: "deeplink", DmHeaderActivity: "dm_header_activity", QuickSwitcher: "quick_switcher", GuildProfileGames: "guild_profile_games", GameInvitesChannel: "game_invites_channel" }; const r134 = { FullProfile: "full_profile", MiniProfile: "mini_profile" }; export { r22 as GameProfileEmbedAction }; export { r24 as GameProfileTrackActionActions }; export { r103 as GameProfileSources }; export { r134 as GameProfileTypes }; export function getGuildIdAndVerifiedFromInvite(a0) { let guildId = a0 == null ? void 0 : a0.guild?.id; if (guildId == null) { guildId = null; } const r10 = a0 == null; let isVerified = void 0; if (!r10) { const guild = a0.guild; isVerified = guild == null ? void 0 : guild.features.includes(GuildFeatures.VERIFIED); } if (isVerified == null) { isVerified = false; } return { guildId, isVerified }; } export function generateViewId() { return v4(); } export function trackGameProfileOpen({ viewId, source, gameName, gameId, authorId, profileType }) { AnalyticsUtils.track(AnalyticEvents.GAME_PROFILE_OPEN, { view_id: viewId, source, game_name: gameName, application_id: gameId, author_id: authorId, request_id: ContentInventoryStore.getFeedRequestId(ContentInventoryFeedKey.GLOBAL_FEED), profile_type: profileType }); return viewId; } export function trackGameProfileClose({ viewId, gameName, gameId, playedFriendIds, playedFriendsData, similarGames, guildId, isVerified }) { AnalyticsUtils.track(AnalyticEvents.GAME_PROFILE_CLOSE, { view_id: viewId, game_name: gameName, application_id: gameId, played_friend_ids: playedFriendIds, played_friends_data: playedFriendsData, similar_games: similarGames, request_id: ContentInventoryStore.getFeedRequestId(ContentInventoryFeedKey.GLOBAL_FEED), official_guild_id: isVerified ? guildId : void 0, guild_id: guildId }); } export function trackGameProfileAction(a0) { const { gameName, gameId, action, recipientUserId, similarGameId, viewId, guildId } = a0; AnalyticsUtils.track(AnalyticEvents.GAME_PROFILE_ACTION, { game_name: gameName, application_id: gameId, action, recipient_user_id: recipientUserId, similar_game_id: similarGameId, view_id: viewId, official_guild_id: a0.isVerified ? guildId : void 0, guild_id: guildId, source: a0.source }); } export function trackGameProfileEmbedAction(a0) { AnalyticsUtils.track(AnalyticEvents.GAME_PROFILE_EMBED_ACTION, { game_name: a0.gameName, application_id: a0.gameId, action: a0.action }); } export function trackGameProfileFeedback(a0) { const { viewId, applicationId } = a0; return AnalyticsUtils.track(AnalyticEvents.GAME_PROFILE_FEEDBACK, { view_id: viewId, application_id: applicationId, suggested_game_name: a0.suggestedGameName, suggested_game_application_id: a0.suggestedGameApplicationId, feedback: a0.feedback, submitted: a0.submitted }); }