/* 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] */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */ import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */ import UserUtils from '../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */ import SafetyToastsActionCreatorsNative from '../../safety_common/SafetyToastsActionCreators.native.tsx'; /* Metro dependency 6264 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */ import ShowUserProfileActionSheet from './showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */ import RelationshipActionCreators from '../../../actions/RelationshipActionCreators.tsx'; /* Metro dependency 8783 */ import OpenUserContextMenuCommands from './openUserContextMenuCommands.tsx'; /* Metro dependency 8810 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */ import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */ import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */ import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */ import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */ import * as MoreHorizontalIconModule from '../../../design/components/Icon/native/redesign/generated/MoreHorizontalIcon.tsx'; /* Metro dependency 8638 */ import * as SafetyExperienceIarUserReportingExperimentModule from '../../in_app_reports/SafetyExperienceIarUserReportingExperiment.tsx'; /* Metro dependency 8782 */ import * as GetApplicationInstallURLModule from '../../applications/getApplicationInstallURL.tsx'; /* Metro dependency 8809 */ 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}); let value = ConstantsModule; 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; (FileImportTrackerModule).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 object; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var object2; var object3; var object4; var moduleValue5; var object5; var object6; var moduleValue6; var object7; var object8; var object9; var env0_12; var env0_13; const {relationshipType, isIgnored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore], function() { var object = {}; var relationshipStoreBinding = RelationshipStore; var userBinding = user; object.relationshipType = relationshipStoreBinding.getRelationshipType(userBinding.id); object.isIgnored = relationshipStoreBinding.isIgnored(userBinding.id); return object; }); const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore, ChannelStore], function() { return ChannelStore.getChannel(SelectedChannelStore.getChannelId()); }); const channel22 = channel2; const isIarUserReportingEnabled2 = (SafetyExperienceIarUserReportingExperimentModule).isIarUserReportingEnabled('User Profile Options - Mobile'); const value4 = (UserProfileAnalyticsContextModule).useUserProfileAnalyticsContext(); const context = value4.context; const env0_5 = value4.trackUserProfileAction; let defaultImport = UseAnalyticsLocations; const USER_PROFILE_OVERFLOW_MENU = (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 = channel22.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; object2 = {}; object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs); object2.action = action_68649; Reflect.apply(push, items2, [object2]); } } else { push = items2.push; object = {}; object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8wXU9B']); object.action = action; Reflect.apply(push, items2, [object]); } } else if (!value8) { push = items2.push; object2 = {}; object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ytCpKs); object2.action = action_68649; Reflect.apply(push, items2, [object2]); } if (value8) { push = items2.push; object3 = {}; object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyHpKH); object3.action = action_68651; Reflect.apply(push, items2, [object3]); } if (!value8) { push = items2.push; object4 = {}; object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l4Emac); object4.variant = 'destructive'; object4.action = action_68652; Reflect.apply(push, items2, [object4]); if (isIarUserReportingEnabled2) { push = items2.push; object6 = {}; object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jhJzez); object6.variant = 'destructive'; object6.action = action_68654; Reflect.apply(push, items2, [object6]); } else { moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */; if (moduleValue5.isAndroid()) { push = items2.push; object5 = {}; object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TbHyMG); object5.variant = 'destructive'; object5.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, [object5]); } } } push = items3.push; const object10 = {}; object10.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy); object10.action = action_68656; Reflect.apply(push, items3, [object10]); 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; object7 = {}; object7.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss); object7.action = action_68657; Reflect.apply(push, items3, [object7]); } const DeveloperMode = (UserSettingsModule).DeveloperMode; const getSetting = DeveloperMode.getSetting; if (Reflect.apply(getSetting, DeveloperMode, [])) { push = items3.push; object8 = {}; object8.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/AXYnE']); object8.action = action_68658; Reflect.apply(push, items3, [object8]); } if (channel != null && channel2 != null && ChannelTypesSets.TEXTUAL.has(channel2.type)) { push = items3.push; object9 = {}; object9.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE); object9.action = action_68659; Reflect.apply(push, items3, [object9]); } 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 = ShowUserProfileActionSheet; const object = {}; copyDataProperties(object, context, undefined); object['showGuildProfile'] = a0; object['userId'] = user.id; object['channelId'] = channel == null ? value : channel.id; object['sourceAnalyticsLocations'] = analyticsLocations; object['ignoreBlockedSpeedBump'] = true; defaultImport(object); 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 = 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 trackUserProfileAction({action: 'IGNORE', analyticsLocations: analyticsLocations}); const defaultImport = importDefault(dependencyMap[16]); const openLazy = defaultImport.openLazy; const value3 = require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths); object = {}; object.userId = id; object.onSuccess = onSuccess_68650; const ImpressionNames = require(dependencyMap[19]).ImpressionNames; const IGNORE_USER_CONFIRMATION = ImpressionNames.IGNORE_USER_CONFIRMATION; object.impressionName = IGNORE_USER_CONFIRMATION; Reflect.apply(openLazy, defaultImport, [value3, IGNORE_CONFIRMATION_ACTION_SHEET_KEY, object, 'stack']); function actionOnSuccess() { // fn#68650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:1626, owner: BotUserProfileOverflowMenu.action.onSuccess, offset: 0x01c57f45, size: 15 bytes, params: 1, frame: 9 env1_9(); } } 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 = RelationshipActionCreators; defaultImport.unblockUser(id, {location: newestAnalyticsLocation}); const defaultImport2 = 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 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); object = {}; object.userId = id; object.channelId = channel == null ? value2 : channel.id; object.onSuccess = onSuccess_68653; const ImpressionNames = require(dependencyMap[19]).ImpressionNames; const BLOCK_USER_CONFIRMATION = ImpressionNames.BLOCK_USER_CONFIRMATION; object.impressionName = BLOCK_USER_CONFIRMATION; Reflect.apply(openLazy, defaultImport, [value4, BLOCK_CONFIRMATION_ACTION_SHEET_KEY, object, 'stack']); return value2; function actionOnSuccess_68653() { // fn#68653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8965:2153, owner: BotUserProfileOverflowMenu.action.onSuccess, offset: 0x01c57f45, size: 15 bytes, params: 1, frame: 9 env1_9(); } } 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 copy = ClipboardUtilsNativeModule.copy; const defaultImport = UserUtils; const getUserTag = defaultImport.getUserTag; Reflect.apply(copy, ClipboardUtilsNativeModule, [Reflect.apply(getUserTag, defaultImport, [user, {'decoration': 'never', 'identifiable': 'always'}])]); (ToastUtilsModule).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 object = {action: 'COPY_APP_LINK'}; object.analyticsLocations = analyticsLocations; const value2 = undefined; trackUserProfileActionBinding(object); const binding = env0_12; if (binding) { getActivityLaunchURL = GetApplicationInstallURLModule.getActivityLaunchURL; object = {}; id = application.id; object.applicationId = id; id = env0_8 == null ? value2 : env0_8.id; object.referrerId = id; r5 = Reflect.apply(getActivityLaunchURL, GetApplicationInstallURLModule, [object]); } else { getApplicationInstallURL = GetApplicationInstallURLModule.getApplicationInstallURL; object = {}; object.id = application.id; copyDataProperties(object, env0_13, undefined); r5 = Reflect.apply(getApplicationInstallURL, GetApplicationInstallURLModule, [object]); } (ClipboardUtilsNativeModule).copy(r5); (ToastUtilsModule).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}); ClipboardUtilsNativeModule.copy(id); (ToastUtilsModule).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 (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 = (IconButtonNativeModule).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 = (MoreHorizontalIconModule).MoreHorizontalIcon; const WHITE = (Native).colors.WHITE; iconButtonProps['icon'] = ; return ; } } } global.__d(_fun68643, 8780, [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]) /* metro module 8780, 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] */;