/* Metro module 8780; source: modules/user_profile/native/BotUserProfileOverflowMenu.tsx; dependencies: [31, 1379, 3793, 1934, 1878, 661, 8781, 33, 566, 8782, 8514, 6771, 6789, 8743, 1244, 8783, 4080, 8793, 1962, 480, 6264, 8794, 8795, 8795, 477, 8796, 683, 6797, 3995, 3856, 7504, 8046, 8809, 3829, 8810, 8811, 8341, 8638, 697, 2] */ function _fun68643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:6, offset: 0x01c575e4, size: 290 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; let value = require(661) /* metro dependency 661: Constants */; const env0_8 = value.AnalyticEvents; const env0_9 = value.ApplicationFlags; const env0_10 = value.ChannelTypesSets; const env0_11 = value.RelationshipTypes; value = require(8781) /* metro dependency 8781: RestrictionConfirmationConstants */; const env0_12 = value.BLOCK_CONFIRMATION_ACTION_SHEET_KEY; const env0_13 = value.IGNORE_CONFIRMATION_ACTION_SHEET_KEY; const env0_14 = (require(33) /* metro dependency 33 */).jsx; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/BotUserProfileOverflowMenu.tsx'); exports.default = BotUserProfileOverflowMenu; } function BotUserProfileOverflowMenu({application, user, channel}) { // fn#68644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:447, offset: 0x01c57706, size: 1598 bytes, params: 2, frame: 29 var push; var object11; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var object12; var object13; var object14; var moduleValue5; var object15; var object16; var moduleValue6; var object17; var object18; var object19; var env0_12; var env0_13; const {relationshipType, isIgnored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore], function() { var object = {}; var userBinding = user; object.relationshipType = RelationshipStore.getRelationshipType(userBinding.id); object.isIgnored = RelationshipStore.isIgnored(userBinding.id); return object; }); const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore, ChannelStore], function() { return ChannelStore.getChannel(SelectedChannelStore.getChannelId()); }); const env0_3 = channel2; const isIarUserReportingEnabled2 = (require(8782) /* metro dependency 8782: SafetyExperienceIarUserReportingExperiment */).isIarUserReportingEnabled('User Profile Options - Mobile'); const value4 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useUserProfileAnalyticsContext(); const context = value4.context; const env0_5 = value4.trackUserProfileAction; let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */; const USER_PROFILE_OVERFLOW_MENU = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_OVERFLOW_MENU; const value5 = defaultImport(USER_PROFILE_OVERFLOW_MENU); const analyticsLocations = value5.analyticsLocations; const env0_7 = value5.newestAnalyticsLocation; const env0_8 = UserStore.getCurrentUser(); const env0_9 = env0_3.useCallback(_fun68647, [user.id, channel?.id, context, analyticsLocations]); items3 = []; const items2 = []; const env0_10 = user.id; const env0_11 = channel?.getGuildId(); const BLOCKED = RelationshipTypes.BLOCKED; const value8 = relationshipType === BLOCKED; if (isIgnored) { if (value8) { if (!value8) { push = items2.push; object12 = {}; object12.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs); object12.action = action_68649; Reflect.apply(push, items2, [object12]); } } else { push = items2.push; object11 = {}; object11.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8wXU9B']); object11.action = action_68648; Reflect.apply(push, items2, [object11]); } } else if (!value8) { push = items2.push; object12 = {}; object12.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs); object12.action = action_68649; Reflect.apply(push, items2, [object12]); } if (value8) { push = items2.push; object13 = {}; object13.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyHpKH); object13.action = action_68651; Reflect.apply(push, items2, [object13]); } if (!value8) { push = items2.push; object14 = {}; object14.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l4Emac); object14.variant = 'destructive'; object14.action = action_68652; Reflect.apply(push, items2, [object14]); if (isIarUserReportingEnabled2) { push = items2.push; object16 = {}; object16.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jhJzez); object16.variant = 'destructive'; object16.action = action_68654; Reflect.apply(push, items2, [object16]); } else { moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */; if (moduleValue5.isAndroid()) { push = items2.push; object15 = {}; object15.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TbHyMG); object15.variant = 'destructive'; object15.action = function() { trackUserProfileAction({action: 'REPORT', analyticsLocations: analyticsLocations}); require(dependencyMap[25]).alertUserReported(); var defaultImport = importDefault(dependencyMap[26]); var TNS_USER_REPORT_SUBMITTED = AnalyticEvents.TNS_USER_REPORT_SUBMITTED; defaultImport.track(TNS_USER_REPORT_SUBMITTED, {reported_user_id: id}); }; Reflect.apply(push, items2, [object15]); } } } push = items3.push; const object20 = {}; object20.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy); object20.action = action_68656; Reflect.apply(push, items3, [object20]); if (application != null) { moduleValue6 = require(7504) /* metro dependency 7504: ApplicationFlagUtils */; env0_12 = moduleValue6.hasApplicationFlag(application, ApplicationFlags.EMBEDDED); env0_13 = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getInstallAppPropsFromProfileApplication(application); push = items3.push; object17 = {}; object17.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss); object17.action = action_68657; Reflect.apply(push, items3, [object17]); } const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode; const getSetting = DeveloperMode.getSetting; if (Reflect.apply(getSetting, DeveloperMode, [])) { push = items3.push; object18 = {}; object18.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/AXYnE']); object18.action = action_68658; Reflect.apply(push, items3, [object18]); } if (channel != null && channel2 != null && ChannelTypesSets.TEXTUAL.has(channel2.type)) { push = items3.push; object19 = {}; object19.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE); object19.action = action_68659; Reflect.apply(push, items3, [object19]); } if (items3.length !== 0) { const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider; return ( {((ContextMenu) => {children_68660})((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)} ); } else if (items2.length === 0) { return null; } else { const AnalyticsLocationProvider2 = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider; return ( {((ContextMenu) => {children_68660})((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu)} ); } } function _fun68647(a0) { // fn#68647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1041, offset: 0x01c57da1, size: 135 bytes, params: 2, frame: 15 let value = environment.__proto__; value = undefined; const defaultImport = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */; const object2 = {}; copyDataProperties(object2, context, undefined); object2['showGuildProfile'] = a0; object2['userId'] = user.id; object2['channelId'] = channel == null ? value : channel.id; object2['sourceAnalyticsLocations'] = analyticsLocations; object2['ignoreBlockedSpeedBump'] = true; defaultImport(object2); return value; } function BotUserProfileOverflowMenuAction() { // fn#68648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1348, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57e28, size: 113 bytes, params: 1, frame: 18 const trackUserProfileActionBinding = trackUserProfileAction; const value2 = undefined; trackUserProfileActionBinding({action: 'UNIGNORE', analyticsLocations: analyticsLocations}); const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */; defaultImport.unignoreUser(id, newestAnalyticsLocation, channel == null ? value2 : channel.id); env0_9(); return value2; } function BotUserProfileOverflowMenuAction_68649() { // fn#68649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1515, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57e99, size: 172 bytes, params: 1, frame: 21 var object2; trackUserProfileAction({action: 'IGNORE', analyticsLocations: analyticsLocations}); const defaultImport = importDefault(dependencyMap[16]); const openLazy = defaultImport.openLazy; const value3 = require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths); object2 = {}; object2.userId = id; object2.onSuccess = onSuccess_68650; const ImpressionNames = require(dependencyMap[19]).ImpressionNames; const IGNORE_USER_CONFIRMATION = ImpressionNames.IGNORE_USER_CONFIRMATION; object2.impressionName = IGNORE_USER_CONFIRMATION; Reflect.apply(openLazy, defaultImport, [value3, IGNORE_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']); } function BotUserProfileOverflowMenuAction_68651() { // fn#68651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1778, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57f54, size: 144 bytes, params: 1, frame: 18 const trackUserProfileActionBinding = trackUserProfileAction; const value2 = undefined; trackUserProfileActionBinding({action: 'UNBLOCK', analyticsLocations: analyticsLocations}); const defaultImport = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */; defaultImport.unblockUser(id, {location: newestAnalyticsLocation}); const defaultImport2 = importDefault(6264) /* metro dependency 6264: SafetyToastsActionCreatorsNative */; defaultImport2.showUnblockSuccessToast(id, channel == null ? value2 : channel.id); env0_9(); return value2; } function BotUserProfileOverflowMenuAction_68652() { // fn#68652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:2013, owner: BotUserProfileOverflowMenu.action, offset: 0x01c57fe4, size: 211 bytes, params: 1, frame: 21 var object2; const trackUserProfileActionBinding = trackUserProfileAction; const value2 = undefined; trackUserProfileActionBinding({action: 'BLOCK', analyticsLocations: analyticsLocations}); const defaultImport = importDefault(dependencyMap[16]); const openLazy = defaultImport.openLazy; const value4 = require(dependencyMap[18])(dependencyMap[21], dependencyMap.paths); object2 = {}; object2.userId = id; object2.channelId = channel == null ? value2 : channel.id; object2.onSuccess = onSuccess_68653; const ImpressionNames = require(dependencyMap[19]).ImpressionNames; const BLOCK_USER_CONFIRMATION = ImpressionNames.BLOCK_USER_CONFIRMATION; object2.impressionName = BLOCK_USER_CONFIRMATION; Reflect.apply(openLazy, defaultImport, [value4, BLOCK_CONFIRMATION_ACTION_SHEET_KEY, object2, 'stack']); return value2; } function BotUserProfileOverflowMenuAction_68654() { // fn#68654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:2325, owner: BotUserProfileOverflowMenu.action, offset: 0x01c580b7, size: 223 bytes, params: 1, frame: 21 const trackUserProfileActionBinding = trackUserProfileAction; const value2 = undefined; trackUserProfileActionBinding({action: 'REPORT', analyticsLocations: analyticsLocations}); const r1 = env0_11 === '@me' || env0_11 === null ? value2 : env0_11; const defaultImport = importDefault(dependencyMap[16]); const openLazy = defaultImport.openLazy; const value4 = require(dependencyMap[18])(dependencyMap[22], dependencyMap.paths); const BOT_REPORT_CHOOSER_KEY = require(dependencyMap[23]).BOT_REPORT_CHOOSER_KEY; Reflect.apply(openLazy, defaultImport, [value4, BOT_REPORT_CHOOSER_KEY, {user: user, entrypoint: 'UserProfileOverflowMenu', contextualGuildId: r1, contextualChannelId: channel == null ? value2 : channel.id}, 'replaceAll']); return value2; } function BotUserProfileOverflowMenuAction_68656() { // fn#68656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:2915, owner: BotUserProfileOverflowMenu.action, offset: 0x01c5820a, size: 147 bytes, params: 1, frame: 19 trackUserProfileAction({action: 'COPY_USERNAME', analyticsLocations: analyticsLocations}); const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */; const copy = clipboardUtilsNativeModule.copy; const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */; const getUserTag = defaultImport.getUserTag; Reflect.apply(copy, clipboardUtilsNativeModule, [Reflect.apply(getUserTag, defaultImport, [user, {'decoration': 'never', 'identifiable': 'always'}])]); (require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied(); env0_9(); } function BotUserProfileOverflowMenuAction_68657() { // fn#68657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:3263, owner: BotUserProfileOverflowMenu.action, offset: 0x01c5829d, size: 214 bytes, params: 1, frame: 18 var id; var r5; var getApplicationInstallURL; var getActivityLaunchURL; const trackUserProfileActionBinding = trackUserProfileAction; let object2 = {action: 'COPY_APP_LINK'}; object2.analyticsLocations = analyticsLocations; const value2 = undefined; trackUserProfileActionBinding(object2); const binding = env0_12; const getApplicationInstallURLModule = require(8809) /* metro dependency 8809: getApplicationInstallURL */; if (binding) { getActivityLaunchURL = getApplicationInstallURLModule.getActivityLaunchURL; object2 = {}; id = application.id; object2.applicationId = id; id = env0_8 == null ? value2 : env0_8.id; object2.referrerId = id; r5 = Reflect.apply(getActivityLaunchURL, getApplicationInstallURLModule, [object2]); } else { getApplicationInstallURL = getApplicationInstallURLModule.getApplicationInstallURL; object2 = {}; object2.id = application.id; copyDataProperties(object2, env0_13, undefined); r5 = Reflect.apply(getApplicationInstallURL, getApplicationInstallURLModule, [object2]); } (require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(r5); (require(3856) /* metro dependency 3856: ToastUtils */).presentLinkCopied(); return value2; } function BotUserProfileOverflowMenuAction_68658() { // fn#68658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:3615, owner: BotUserProfileOverflowMenu.action, offset: 0x01c58373, size: 105 bytes, params: 1, frame: 15 trackUserProfileAction({action: 'COPY_USER_ID', analyticsLocations: analyticsLocations}); const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */; clipboardUtilsNativeModule.copy(id); (require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied(); env0_9(); } function BotUserProfileOverflowMenuAction_68659() { // fn#68659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:3821, owner: BotUserProfileOverflowMenu.action, offset: 0x01c583dc, size: 72 bytes, params: 1, frame: 13 const value = environment.__proto__; return (importDefault(8810) /* metro dependency 8810: openUserContextMenuCommands */)({userId: id, selectedChannel: channel, showUserProfile: env0_9, analyticsLocations: analyticsLocations}); } function BotUserProfileOverflowMenuChildren(a0) { // fn#68660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:4037, owner: BotUserProfileOverflowMenu.children, offset: 0x01c58424, size: 241 bytes, params: 2, frame: 21 const ref = a0.ref; const value = Object.create(null); value.ref = 0; const value2 = copyDataProperties({}, a0, value, undefined); const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton; const iconButtonProps = {ref: ref, ...value2}; iconButtonProps['size'] = 'sm'; iconButtonProps['variant'] = 'secondary-overlay'; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zofAD']); const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon; const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE; iconButtonProps['icon'] = ; return ; }