498 lines
27 KiB
TypeScript
498 lines
27 KiB
TypeScript
/* Metro module 8515; source: modules/user_profile/UserProfileAnalyticsUtils.tsx; dependencies: [7670, 5221, 4492, 5109, 1945, 4396, 3793, 1878, 5189, 8516, 661, 482, 1423, 8490, 683, 4863, 8517, 2] */
|
|
function _fun67485(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:6, offset: 0x01c25102, size: 535 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const badgeDirectoryStore = importDefault(7670) /* metro dependency 7670: BadgeDirectoryStore */;
|
|
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
|
|
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
|
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
|
|
const env0_7 = (require(5109) /* metro dependency 5109: AuthorizedAppsStore */).FetchState;
|
|
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
|
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
|
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
|
const env0_13 = (require(8516) /* metro dependency 8516: Constants */).TrackUserProfileProperties;
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_14 = constantsModule.ActivityTypes;
|
|
const env0_15 = constantsModule.AnalyticEvents;
|
|
const env0_16 = (require(482) /* metro dependency 482: Constants */).StatusTypes;
|
|
const closure = getActivityType;
|
|
const closure2 = getTrackUserRelationshipProperties;
|
|
const closure3 = trackUserProfileAction;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/UserProfileAnalyticsUtils.tsx');
|
|
exports.getActivityType = closure;
|
|
exports.getTrackUserRelationshipProperties = closure2;
|
|
exports.trackUserProfileAction = closure3;
|
|
exports.maybeTrackUserProfileUiViewed = maybeTrackUserProfileUiViewed;
|
|
exports.trackUserProfileActivityJoined = trackUserProfileActivityJoined;
|
|
exports.trackUserProfileActivityAction = trackUserProfileActivityAction;
|
|
exports.trackUserProfileBadgeAction = trackUserProfileBadgeAction;
|
|
exports.trackDmProfileToggled = trackDmProfileToggled;
|
|
exports.trackUserProfileEditAction = trackUserProfileEditAction;
|
|
exports.trackUserProfileEditSaved = trackUserProfileEditSaved;
|
|
exports.trackUserProfileWishlistAction = trackUserProfileWishlistAction;
|
|
}
|
|
|
|
function getProfileProperties({user, userProfile, guildMember, guildMemberProfile}) { // fn#67486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:336, offset: 0x01c25319, size: 581 bytes, params: 2, frame: 19
|
|
var moduleValue;
|
|
var moduleValue2;
|
|
const r3 = userProfile ?? guildMemberProfile;
|
|
const items2 = [];
|
|
let Boolean = global.Boolean;
|
|
if (Boolean(guildMember?.nick)) {
|
|
items2.push(TrackUserProfileProperties.NICKNAME);
|
|
}
|
|
Boolean = global.Boolean;
|
|
if (Boolean(r3?.pronouns)) {
|
|
items2.push(TrackUserProfileProperties.PRONOUNS);
|
|
}
|
|
Boolean = global.Boolean;
|
|
if (Boolean(user?.avatar)) {
|
|
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
items2.push(moduleValue.isAnimatedIconHash(user?.avatar) ? TrackUserProfileProperties.ANIMATED_AVATAR : TrackUserProfileProperties.AVATAR);
|
|
}
|
|
Boolean = global.Boolean;
|
|
if (Boolean(r3?.banner)) {
|
|
moduleValue2 = require(1423) /* metro dependency 1423: AvatarUtils */;
|
|
items2.push(moduleValue2.isAnimatedIconHash(r3?.banner) ? TrackUserProfileProperties.ANIMATED_BANNER : TrackUserProfileProperties.BANNER);
|
|
}
|
|
Boolean = global.Boolean;
|
|
if (Boolean(r3?.bio)) {
|
|
items2.push(TrackUserProfileProperties.BIO);
|
|
}
|
|
if (r3?.themeColors != null && r3.themeColors.find(function(a0) {
|
|
return a0 !== null;
|
|
}) !== undefined) {
|
|
items2.push(TrackUserProfileProperties.THEME);
|
|
}
|
|
if (user?.avatarDecoration != null) {
|
|
items2.push(TrackUserProfileProperties.AVATAR_DECORATION);
|
|
}
|
|
if (r3?.profileEffect != null) {
|
|
items2.push(TrackUserProfileProperties.PROFILE_EFFECT);
|
|
}
|
|
return items2;
|
|
}
|
|
|
|
function getUserStatus(a0) { // fn#67488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:1096, offset: 0x01c2555e, size: 128 bytes, params: 2, frame: 14
|
|
const status = PresenceStore.getStatus(a0);
|
|
const isMobileOnline2 = PresenceStore.isMobileOnline(a0);
|
|
const ONLINE = StatusTypes.ONLINE;
|
|
return status !== ONLINE ? status !== StatusTypes.ONLINE ? status : '' + status + '-desktop' : isMobileOnline2 ? '' + status + '-mobile' : status !== StatusTypes.ONLINE ? status : '' + status + '-desktop';
|
|
}
|
|
|
|
function getActivityType(a0) { // fn#67489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:1227, offset: 0x01c255de, size: 81 bytes, params: 2, frame: 15
|
|
var r1;
|
|
var r0;
|
|
var value2;
|
|
var Object;
|
|
var value4;
|
|
var value5;
|
|
const value = a0;
|
|
if (value == null) {
|
|
r0 = value;
|
|
} else {
|
|
value2 = 'VOICE';
|
|
if (value2 === value) {
|
|
r1 = value2;
|
|
} else {
|
|
Object = global.Object;
|
|
value4 = Object.keys(ActivityTypes);
|
|
Object = global.Object;
|
|
value5 = Object.values(ActivityTypes);
|
|
r1 = value4[value5.indexOf(value)];
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getTrackUserProfileProperties({layout, userId, guildId, sessionId, sourceSessionId, showGuildProfile}) { // fn#67490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:1334, offset: 0x01c2562f, size: 572 bytes, params: 2, frame: 24
|
|
var r6;
|
|
var badges;
|
|
const value = undefined;
|
|
showGuildProfile = showGuildProfile === value || showGuildProfile;
|
|
const user = UserStore.getUser(userId);
|
|
if (user == null) {
|
|
return {};
|
|
}
|
|
const displayProfile = (require(8490) /* metro dependency 8490: useDisplayProfile */).getDisplayProfile(user == null ? value : user.id,
|
|
showGuildProfile ? guildId : value);
|
|
const r9 = showGuildProfile && guildId != null ? GuildMemberStore.getMember(guildId,
|
|
user == null ? value : user.id) : null;
|
|
const object2 = {profile_layout: layout, profile_session_id: sessionId, source_profile_session_id: sourceSessionId};
|
|
object2.profile_properties = getProfileProperties({user: user,
|
|
userProfile: displayProfile == null ? value : displayProfile._userProfile});
|
|
object2.guild_profile_properties = getProfileProperties({guildMember: r9,
|
|
guildMemberProfile: displayProfile == null ? value : displayProfile._guildMemberProfile});
|
|
const getActivities = PresenceStore.getActivities;
|
|
object2.profile_activity_types = Reflect.apply(getActivities, PresenceStore, [user.id]).map(function(a0) {
|
|
return a0.type;
|
|
}).filter(function(a0) {
|
|
return a0 !== undefined;
|
|
});
|
|
if (displayProfile == null) {
|
|
r6 = value;
|
|
} else {
|
|
badges = displayProfile.getBadges();
|
|
r6 = badges == null ? value : badges.map(function(a0) {
|
|
return a0.id;
|
|
}).filter(_fun67494);
|
|
}
|
|
r6 = r6 ?? [];
|
|
object2.profile_badges = r6;
|
|
const avatarDecoration = user.avatarDecoration;
|
|
object2.avatar_decoration_sku_id = avatarDecoration == null ? value : avatarDecoration.skuId;
|
|
object2.profile_effect_sku_id = displayProfile == null || displayProfile.profileEffect == null ? value : displayProfile.profileEffect.skuId;
|
|
object2.user_status = getUserStatus(user.id);
|
|
object2.is_guild_profile = (displayProfile == null ? value : displayProfile.guildId) != null;
|
|
object2.is_bot_profile = user.bot;
|
|
const r2 = displayProfile == null ? value : displayProfile.private;
|
|
object2.is_private_to_viewer = r2 != null && r2;
|
|
return object2;
|
|
}
|
|
|
|
function getTrackUserRelationshipProperties({userId}) { // fn#67495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:2424, offset: 0x01c2586b, size: 182 bytes, params: 2, frame: 15
|
|
if (userId == null) {
|
|
return {};
|
|
}
|
|
const userAffinity = UserAffinitiesV2Store.getUserAffinity(userId);
|
|
const object2 = {related_user_id: userId};
|
|
object2.relationship_type = RelationshipStore.getRelationshipType(userId);
|
|
object2.related_since = RelationshipStore.getSince(userId);
|
|
object2.num_mutual_friends = UserProfileStore.getMutualFriendsCount(userId);
|
|
object2.num_mutual_guilds = UserProfileStore.getMutualGuilds(userId)?.length;
|
|
object2.communication_probability = userAffinity?.communicationProbability;
|
|
object2.communication_rank = userAffinity?.communicationRank;
|
|
return object2;
|
|
}
|
|
|
|
function getTrackUserProfileApplicationProperties(a0) { // fn#67496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:2864, offset: 0x01c25921, size: 83 bytes, params: 2, frame: 15
|
|
const value = null;
|
|
return {application_id: a0,
|
|
application_linked: value != a0 ? AuthorizedAppsStore.getFetchStateForApplication(a0) !== FetchState.FETCHED ? value : value != AuthorizedAppsStore.getNewestTokenForApplication(a0) : value};
|
|
}
|
|
|
|
function trackUserProfileAction(a0) { // fn#67497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:3029, offset: 0x01c25974, size: 273 bytes, params: 2, frame: 30
|
|
const guildId = a0.guildId;
|
|
const channelId = a0.channelId;
|
|
const messageId = a0.messageId;
|
|
const roleId = a0.roleId;
|
|
const widgetType = a0.widgetType;
|
|
const analyticsLocations = a0.analyticsLocations;
|
|
const action = a0.action;
|
|
const section = a0.section;
|
|
const applicationId = a0.applicationId;
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const USER_PROFILE_ACTION = AnalyticEvents.USER_PROFILE_ACTION;
|
|
const object2 = {};
|
|
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
const moduleValue2 = appAnalyticsUtilsModule;
|
|
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
copyDataProperties(object2, getTrackUserRelationshipProperties(a0), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileApplicationProperties(applicationId), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['profile_action'] = action;
|
|
object2['profile_section'] = section;
|
|
object2['source_message_id'] = messageId;
|
|
object2['source_role_id'] = roleId;
|
|
object2['widget_type'] = widgetType;
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_ACTION, object2]);
|
|
}
|
|
|
|
function maybeTrackUserProfileUiViewed(a0) { // fn#67498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:3804, offset: 0x01c25a85, size: 380 bytes, params: 2, frame: 30
|
|
var r1;
|
|
var guildId;
|
|
var channelId;
|
|
var analyticsLocations;
|
|
var profileUi;
|
|
var viewStartedAt;
|
|
var fetchStartedAt;
|
|
var timeToInteractiveMs;
|
|
var timeToLoadMs;
|
|
var timeToFetchMs;
|
|
var value2;
|
|
var defaultImport;
|
|
var track;
|
|
var USER_PROFILE_UI_VIEWED;
|
|
var object2;
|
|
var moduleValue2;
|
|
var moduleValue3;
|
|
const userProfilePerformanceAnalyticsExperimentModule = require(8517) /* metro dependency 8517: UserProfilePerformanceAnalyticsExperiment */;
|
|
if (userProfilePerformanceAnalyticsExperimentModule.isUserProfilePerformanceAnalyticsEnabled('UserProfileAnalyticsUtils')) {
|
|
guildId = a0.guildId;
|
|
channelId = a0.channelId;
|
|
analyticsLocations = a0.analyticsLocations;
|
|
profileUi = a0.profileUi;
|
|
viewStartedAt = a0.viewStartedAt;
|
|
fetchStartedAt = a0.fetchStartedAt;
|
|
timeToInteractiveMs = a0.timeToInteractiveMs;
|
|
timeToLoadMs = a0.timeToLoadMs;
|
|
timeToFetchMs = a0.timeToFetchMs;
|
|
value2 = 0;
|
|
r1 = timeToInteractiveMs ?? value2;
|
|
r1 = r1 <= value2 || (timeToLoadMs ?? value2) <= value2;
|
|
r1 = !r1 ? (timeToFetchMs ?? value2) <= value2 : r1;
|
|
if (!r1) {
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
USER_PROFILE_UI_VIEWED = AnalyticEvents.USER_PROFILE_UI_VIEWED;
|
|
object2 = {};
|
|
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, moduleValue2.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
moduleValue3 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, moduleValue3.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
copyDataProperties(object2, getTrackUserRelationshipProperties(a0), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['profile_ui'] = profileUi;
|
|
object2['view_started_at'] = viewStartedAt;
|
|
object2['fetch_started_at'] = fetchStartedAt;
|
|
object2['time_to_interactive_ms'] = timeToInteractiveMs;
|
|
object2['time_to_load_ms'] = timeToLoadMs;
|
|
object2['time_to_fetch_ms'] = timeToFetchMs;
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_UI_VIEWED, object2]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function trackUserProfileActivityJoined(a0) { // fn#67499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:4490, offset: 0x01c25c01, size: 288 bytes, params: 2, frame: 30
|
|
const guildId = a0.guildId;
|
|
const channelId = a0.channelId;
|
|
const analyticsLocations = a0.analyticsLocations;
|
|
const activityType = a0.activityType;
|
|
const activityName = a0.activityName;
|
|
const activityPlatform = a0.activityPlatform;
|
|
const activitySessionId = a0.activitySessionId;
|
|
const applicationId = a0.applicationId;
|
|
const voiceChannelId = a0.voiceChannelId;
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const USER_PROFILE_ACTIVITY_JOINED = AnalyticEvents.USER_PROFILE_ACTIVITY_JOINED;
|
|
const object2 = {};
|
|
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
const moduleValue2 = appAnalyticsUtilsModule;
|
|
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
copyDataProperties(object2, getTrackUserRelationshipProperties(a0), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['activity_type'] = voiceChannelId != null ? 'VOICE' : getActivityType(activityType);
|
|
object2['activity_name'] = activityName;
|
|
object2['activity_platform'] = activityPlatform;
|
|
object2['activity_session_id'] = activitySessionId;
|
|
object2['application_id'] = applicationId;
|
|
object2['voice_channel_id'] = voiceChannelId;
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_ACTIVITY_JOINED, object2]);
|
|
}
|
|
|
|
function trackUserProfileActivityAction(a0) { // fn#67500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:5079, offset: 0x01c25d21, size: 531 bytes, params: 2, frame: 32
|
|
const guildId = a0.guildId;
|
|
const channelId = a0.channelId;
|
|
const analyticsLocations = a0.analyticsLocations;
|
|
const action = a0.action;
|
|
const display = a0.display;
|
|
const activity = a0.activity;
|
|
const stream = a0.stream;
|
|
const entry = a0.entry;
|
|
const outbox = a0.outbox;
|
|
const voiceChannelId = a0.voiceChannelId;
|
|
const value2 = undefined;
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const USER_PROFILE_ACTIVITY_ACTION = AnalyticEvents.USER_PROFILE_ACTIVITY_ACTION;
|
|
const object2 = {};
|
|
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
const moduleValue2 = appAnalyticsUtilsModule;
|
|
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
copyDataProperties(object2, getTrackUserRelationshipProperties(a0), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['activity_action'] = action;
|
|
object2['activity_display'] = display;
|
|
object2['activity_type'] = getActivityType(stream != null ? ActivityTypes.STREAMING : activity == null ? value2 : activity.type);
|
|
object2['activity_name'] = activity == null ? value2 : activity.name;
|
|
object2['activity_platform'] = activity == null ? value2 : activity.platform;
|
|
object2['activity_session_id'] = activity == null ? value2 : activity.session_id;
|
|
object2['activity_application_id'] = activity == null ? value2 : activity.application_id;
|
|
object2['item_id'] = entry == null ? value2 : entry.id;
|
|
object2['author_id_v2'] = entry == null ? value2 : entry.author_id;
|
|
object2['item_ids'] = outbox == null ? value2 : outbox.entries.map(function(a0) {
|
|
return a0.id;
|
|
});
|
|
object2['author_ids_v2'] = outbox == null ? value2 : outbox.entries.map(function(a0) {
|
|
return a0.author_id;
|
|
});
|
|
object2['voice_channel_id'] = voiceChannelId;
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_ACTIVITY_ACTION, object2]);
|
|
return value2;
|
|
}
|
|
|
|
function trackUserProfileBadgeAction(a0) { // fn#67503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:5994, offset: 0x01c25f3f, size: 292 bytes, params: 2, frame: 28
|
|
var r7;
|
|
var badgeById;
|
|
const guildId = a0.guildId;
|
|
const channelId = a0.channelId;
|
|
const analyticsLocations = a0.analyticsLocations;
|
|
const badgeId = a0.badgeId;
|
|
const badgeAction = a0.badgeAction;
|
|
const position = a0.position;
|
|
const userId = a0.userId;
|
|
const value = undefined;
|
|
if (badgeId != null) {
|
|
if (userId != null) {
|
|
badgeById = BadgeDirectoryStore.getBadgeById(badgeId, userId);
|
|
r7 = badgeById == null ? value : badgeById.current_tier;
|
|
} else {
|
|
r7 = value;
|
|
}
|
|
} else {
|
|
r7 = value;
|
|
}
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const USER_PROFILE_BADGE_ACTION = AnalyticEvents.USER_PROFILE_BADGE_ACTION;
|
|
const object2 = {};
|
|
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
const moduleValue2 = appAnalyticsUtilsModule;
|
|
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
copyDataProperties(object2, getTrackUserRelationshipProperties(a0), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['badge_action'] = badgeAction;
|
|
object2['badge_id'] = badgeId;
|
|
object2['badge_tier'] = r7;
|
|
object2['position'] = position;
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_BADGE_ACTION, object2]);
|
|
return value;
|
|
}
|
|
|
|
function trackDmProfileToggled({displayProfile, isProfileOpen}) { // fn#67504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:6496, offset: 0x01c26063, size: 317 bytes, params: 2, frame: 23
|
|
const userId = displayProfile?.userId;
|
|
const r12 = userId != null ? PresenceStore.findActivity(userId, _fun67505) : null;
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const DM_PROFILE_TOGGLED = AnalyticEvents.DM_PROFILE_TOGGLED;
|
|
const object2 = {is_profile_open: isProfileOpen};
|
|
const Boolean = global.Boolean;
|
|
object2.has_images = Boolean((r12 == null || r12.assets == null ? undefined : r12.assets.large_image) ?? (r12 == null || r12.assets == null ? undefined : r12.assets.small_image));
|
|
object2.is_friend = RelationshipStore.isFriend(userId);
|
|
object2.viewed_profile_user_id = userId;
|
|
object2.profile_has_nitro_customization = displayProfile?.hasPremiumCustomization();
|
|
object2.profile_has_theme_color_customized = displayProfile?.hasThemeColors();
|
|
object2.profile_has_theme_animation = displayProfile?.popoutAnimationParticleType != null;
|
|
Reflect.apply(track, defaultImport, [DM_PROFILE_TOGGLED, object2]);
|
|
}
|
|
|
|
function trackUserProfileEditAction(a0) { // fn#67506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:7174, offset: 0x01c261e9, size: 299 bytes, params: 2, frame: 30
|
|
const guildId = a0.guildId;
|
|
const channelId = a0.channelId;
|
|
const analyticsLocations = a0.analyticsLocations;
|
|
const action = a0.action;
|
|
const widgetEdited = a0.widgetEdited;
|
|
const gameId = a0.gameId;
|
|
const numResults = a0.numResults;
|
|
const numCharacters = a0.numCharacters;
|
|
const applicationId = a0.applicationId;
|
|
const trackUserProfileActionBinding = trackUserProfileAction;
|
|
let object2 = {};
|
|
copyDataProperties(object2, a0, guildId);
|
|
object2['action'] = action;
|
|
trackUserProfileActionBinding(object2);
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const USER_PROFILE_EDIT_ACTION = AnalyticEvents.USER_PROFILE_EDIT_ACTION;
|
|
object2 = {};
|
|
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
const moduleValue2 = appAnalyticsUtilsModule;
|
|
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileApplicationProperties(applicationId), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['edit_action'] = action;
|
|
object2['widget_edited'] = widgetEdited;
|
|
object2['game_id'] = gameId;
|
|
object2['num_results'] = numResults;
|
|
object2['num_characters'] = numCharacters;
|
|
object2['application_id'] = applicationId;
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_EDIT_ACTION, object2]);
|
|
}
|
|
|
|
function trackUserProfileEditSaved(a0) { // fn#67507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:7721, offset: 0x01c26314, size: 276 bytes, params: 2, frame: 29
|
|
const guildId = a0.guildId;
|
|
const channelId = a0.channelId;
|
|
const analyticsLocations = a0.analyticsLocations;
|
|
const widgetEdited = a0.widgetEdited;
|
|
const gameIds = a0.gameIds;
|
|
const tags = a0.tags;
|
|
const numCharactersCommentary = a0.numCharactersCommentary;
|
|
const isWidgetRemoved = a0.isWidgetRemoved;
|
|
const trackUserProfileActionBinding = trackUserProfileAction;
|
|
let object2 = {};
|
|
copyDataProperties(object2, a0, guildId);
|
|
object2['action'] = 'EDIT_SAVED';
|
|
trackUserProfileActionBinding(object2);
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const USER_PROFILE_EDIT_SAVED = AnalyticEvents.USER_PROFILE_EDIT_SAVED;
|
|
object2 = {};
|
|
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
const moduleValue2 = appAnalyticsUtilsModule;
|
|
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['widget_edited'] = widgetEdited;
|
|
object2['game_ids'] = gameIds;
|
|
object2['tags'] = tags;
|
|
object2['num_characters_commentary'] = numCharactersCommentary;
|
|
object2['is_widget_removed'] = isWidgetRemoved;
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_EDIT_SAVED, object2]);
|
|
}
|
|
|
|
function trackUserProfileWishlistAction(a0) { // fn#67508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:8226, offset: 0x01c26428, size: 275 bytes, params: 2, frame: 28
|
|
const guildId = a0.guildId;
|
|
const channelId = a0.channelId;
|
|
const analyticsLocations = a0.analyticsLocations;
|
|
const action = a0.action;
|
|
const wishlistId = a0.wishlistId;
|
|
const skuId = a0.skuId;
|
|
const productLines = a0.productLines;
|
|
const trackUserProfileActionBinding = trackUserProfileAction;
|
|
let object2 = {};
|
|
copyDataProperties(object2, a0, guildId);
|
|
object2['action'] = action;
|
|
trackUserProfileActionBinding(object2);
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const USER_PROFILE_WISHLIST_ACTION = AnalyticEvents.USER_PROFILE_WISHLIST_ACTION;
|
|
object2 = {};
|
|
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, appAnalyticsUtilsModule.collectGuildAnalyticsMetadata(guildId), guildId);
|
|
const moduleValue2 = appAnalyticsUtilsModule;
|
|
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadataFromId(channelId), guildId);
|
|
copyDataProperties(object2, getTrackUserProfileProperties(a0), guildId);
|
|
object2['location_stack'] = analyticsLocations;
|
|
object2['action_type'] = action;
|
|
object2['wishlist_id'] = wishlistId;
|
|
object2['sku_id'] = skuId;
|
|
object2['product_lines'] = productLines != null ? global.Array.from(productLines) : [];
|
|
Reflect.apply(track, defaultImport, [USER_PROFILE_WISHLIST_ACTION, object2]);
|
|
}
|
|
|
|
function _fun67505({type}) { // fn#67505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8700:6599, offset: 0x01c261a0, size: 73 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
const getAnyStreamForUser = ApplicationStreamingStore.getAnyStreamForUser;
|
|
return Reflect.apply(getAnyStreamForUser, ApplicationStreamingStore,
|
|
[userId]) != null ? type === ActivityTypes.PLAYING : type !== ActivityTypes.CUSTOM_STATUS;
|
|
}
|
|
|