/* Metro module 10338; source: modules/user_profile/native/UserProfileContent.tsx; dependencies: [57, 31, 27, 10035, 1867, 3793, 1878, 7624, 5189, 8516, 6816, 661, 6276, 1376, 33, 8496, 566, 4080, 8692, 1962, 8524, 8513, 8514, 6771, 8783, 3995, 8341, 10339, 1244, 8796, 10340, 4052, 8501, 4617, 6797, 3856, 8695, 7622, 8867, 4578, 9646, 697, 8088, 8752, 8760, 1585, 10341, 10342, 10343, 6902, 8693, 8403, 8494, 8497, 1357, 10034, 8354, 10344, 10345, 10346, 10347, 10348, 10352, 10210, 7331, 10360, 8762, 6792, 10288, 10361, 10327, 10373, 8853, 8761, 10474, 10475, 4017, 8510, 10484, 10485, 10489, 10490, 6517, 8859, 8861, 10494, 2] */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */ import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */ import UserUtils from '../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */ import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */ import UserProfileStore from '../UserProfileStore.tsx'; /* Metro dependency 5189 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import UseOpenProfileSettings from '../../profile_customization/useOpenProfileSettings.tsx'; /* Metro dependency 7622 */ import UserProfileSettingsStore from '../UserProfileSettingsStore.tsx'; /* Metro dependency 7624 */ import CloseVoicePanels from '../../voice_panel/native/utils/closeVoicePanels.tsx'; /* Metro dependency 8088 */ import UserProfileSharedStyles from './UserProfileSharedStyles.tsx'; /* Metro dependency 8496 */ import UseBadges from '../hooks/useBadges.tsx'; /* Metro dependency 8501 */ import UseCustomStatusActivityForUser from '../../custom_status/utils/useCustomStatusActivityForUser.tsx'; /* Metro dependency 8693 */ import UserProfilePrimaryInfo from './UserProfilePrimaryInfo.tsx'; /* Metro dependency 8695 */ import UseUserProfileBannerHeight from '../hooks/native/useUserProfileBannerHeight.tsx'; /* Metro dependency 8752 */ import UseUserProfileOverscrollStyles from './useUserProfileOverscrollStyles.tsx'; /* Metro dependency 8760 */ import UserProfileOverscrollBanner from './UserProfileOverscrollBanner.tsx'; /* Metro dependency 8761 */ import UserProfileTextButtonGroup from './UserProfileTextButtonGroup.tsx'; /* Metro dependency 8867 */ import WishlistStore from '../../wishlists/WishlistStore.tsx'; /* Metro dependency 10035 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ 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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */ import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */ import * as UserPlatformIconModule from '../../../design/components/Icon/native/redesign/generated/UserPlatformIcon.tsx'; /* Metro dependency 4052 */ import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */ import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */ import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */ import * as ConstantsModule2 from './Constants.tsx'; /* Metro dependency 6816 */ import * as SubscribeGuildMembersModule from '../../../lib/guild/subscribeGuildMembers.tsx'; /* Metro dependency 6902 */ import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */ import * as SocialLayerStorefrontMobilePurchasingExperimentModule from '../../slayer_storefront/experiments/SocialLayerStorefrontMobilePurchasingExperiment.tsx'; /* Metro dependency 8354 */ import * as RecentAvatarUtilsModule from '../../recent_avatars/RecentAvatarUtils.tsx'; /* Metro dependency 8403 */ import * as UseUserProfileColorsModule from '../hooks/native/useUserProfileColors.tsx'; /* Metro dependency 8497 */ import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */ import * as ConstantsModule3 from '../Constants.tsx'; /* Metro dependency 8516 */ import * as UserProfileAlertUtilsModule from './UserProfileAlertUtils.tsx'; /* Metro dependency 8796 */ import * as SegmentedControlStateNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */ import * as PencilIconModule from '../../../design/components/Icon/native/redesign/generated/PencilIcon.tsx'; /* Metro dependency 9646 */ import * as UseWishlistHooksModule from '../../wishlists/hooks/useWishlistHooks.tsx'; /* Metro dependency 10034 */ import * as UserCheckIconModule from '../../../design/components/Icon/native/redesign/generated/UserCheckIcon.tsx'; /* Metro dependency 10339 */ import * as GameRelationshipStoreHooksModule from '../../game_relationships/GameRelationshipStoreHooks.tsx'; /* Metro dependency 10341 */ import * as UseIsGameFriendsModule from '../../game_relationships/hooks/useIsGameFriends.tsx'; /* Metro dependency 10342 */ import * as UseUserProfileGameFriendApplicationIdsModule from '../../game_relationships/hooks/useUserProfileGameFriendApplicationIds.tsx'; /* Metro dependency 10343 */ import * as WishlistUtilsModule from '../../wishlists/WishlistUtils.tsx'; /* Metro dependency 10344 */ import * as UseSegmentedPagesHeightModule from './useSegmentedPagesHeight.tsx'; /* Metro dependency 10345 */ import * as UseWishlistViewerCoachmarkModule from '../hooks/native/useWishlistViewerCoachmark.tsx'; /* Metro dependency 10346 */ import * as UserProfileConnectionsModule from './UserProfileConnections.tsx'; /* Metro dependency 10361 */ function _fun80120(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6, offset: 0x01e6d2d6, size: 495 bytes, params: 8, frame: 20 const env0_0 = require; const PrimaryInfo2 = PrimaryInfo; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const constantsModule = ConstantsModule2; const env0_14 = constantsModule.PROFILE_CONTENT_BOTTOM_PADDING; const env0_15 = constantsModule.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING; value = value.memo(UserProfileContent); (FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileContent.tsx'); exports.default = value; exports.PrimaryInfo = PrimaryInfo2; function CustomStatusBubble({customStatusActivity, user, guildId, channelId, hasCustomProfileTheme, isPreviewingChanges, bubbleRef}) { // fn#80121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:473, offset: 0x01e6d4c5, size: 391 bytes, params: 2, frame: 26 const value3 = (UserProfileSharedStyles)(); const value4 = (FluxModule).useStateFromStores([UserStore], _fun80122, [user]); const value5 = env0_4.useCallback(_fun80123, [channelId, guildId, user]); const value8 = env0_4.useRef(customStatusActivity == null && value4 ? isPreviewingChanges ? null : (importDefault(8524) /* metro dependency 8524: getRandomCustomStatusPrompt */)() : null); return ((Component) => )(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */); function _fun80122() { // fn#80122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:666, offset: 0x01e6d64c, size: 50 bytes, params: 1, frame: 10 const value = environment.__proto__; return UserStore.getCurrentUser()?.id === user.id; } function _fun80123() { // fn#80123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:757, offset: 0x01e6d67e, size: 116 bytes, params: 1, frame: 18 let value = environment.__proto__; const defaultImport = importDefault(dependencyMap[17]); const openLazy = defaultImport.openLazy; value = require(dependencyMap[19]); value = value(dependencyMap[18], dependencyMap.paths); Reflect.apply(openLazy, defaultImport, [value, 'UserProfileCustomStatusActionSheet', {user: user, guildId: guildId, channelId: channelId}, 'stack']); } } function RemoveFriendIconButton({user}) { // fn#80124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1239, offset: 0x01e6d6f2, size: 279 bytes, params: 2, frame: 19 const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext; const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule, []).trackUserProfileAction; const env0_2 = (UseAnalyticsLocations)().newestAnalyticsLocation; const RemoveFriendIconButtonHandleConfirm = function() { trackUserProfileAction({action: 'REMOVE_FRIEND'}); importDefault(dependencyMap[24]).removeFriend(user.id, {location: newestAnalyticsLocation}); }; const env0_4 = (UserUtils).useName(user); const IconButton = (IconButtonNativeModule).IconButton; const object = {'size': 'sm', 'variant': 'secondary-overlay'}; const UserCheckIcon = (UserCheckIconModule).UserCheckIcon; object.icon = ; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J); object.onPress = onPress_80126; return ; function RemoveFriendIconButtonOnPress() { // fn#80126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1692, owner: RemoveFriendIconButton.onPress, offset: 0x01e6d85b, size: 61 bytes, params: 1, frame: 14 const value = environment.__proto__; (UserProfileAlertUtilsModule).confirmRemoveFriend({userDisplayName: env0_4, onConfirm: RemoveFriendIconButtonHandleConfirm}); } } function RemoveGameFriendIconButton({user, guildId, channelId}) { // fn#80127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1774, offset: 0x01e6d898, size: 228 bytes, params: 2, frame: 19 const value2 = env0_4.useCallback(_fun80128, [channelId, guildId, user]); const IconButton = (IconButtonNativeModule).IconButton; object = {'size': 'sm', 'variant': 'secondary-overlay'}; const UserPlatformIcon = (UserPlatformIconModule).UserPlatformIcon; object.icon = ; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J); object.onPress = value2; return ; function _fun80128() { // fn#80128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1863, offset: 0x01e6d97c, size: 116 bytes, params: 1, frame: 18 let value = environment.__proto__; const defaultImport = importDefault(dependencyMap[17]); const openLazy = defaultImport.openLazy; value = require(dependencyMap[19]); value = value(dependencyMap[30], dependencyMap.paths); Reflect.apply(openLazy, defaultImport, [value, 'UserProfileGameFriendActionSheet', {user: user, guildId: guildId, channelId: channelId}, 'stack']); } } function PrimaryInfo({user, channelId, displayProfile, displayNameOverride, pronounsOverride, badgesOverride, pendingDisplayNameStyles, style, badgeContainerBackground, isPreviewingChanges}) { // fn#80129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:2195, offset: 0x01e6d9f0, size: 492 bytes, params: 2, frame: 30 const value3 = (UserUtils).useUserTag(user); const value4 = (UseBadges)(displayProfile); const value5 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(displayProfile?.guildId, channelId, user); const r15 = displayNameOverride == null ? value5 : displayNameOverride.trim().length > 0 ? displayNameOverride : value5; const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext; const value6 = env0_4.useCallback(_fun80130, [Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule, []).trackUserProfileAction, value3]); const defaultImport3Props = {user: user, guildId: displayProfile?.guildId, displayName: r15, pronouns: pronounsOverride ?? displayProfile?.pronouns, badges: badgesOverride ?? value4, style: style, badgeContainerBackground: badgeContainerBackground, onPressDisplayName: isPreviewingChanges ? undefined : value6}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; defaultImport3Props.displayNameAccessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy); defaultImport3Props.onPressUserTag = isPreviewingChanges ? undefined : value6; defaultImport3Props.onPressPronouns = isPreviewingChanges ? undefined : _fun80131; defaultImport3Props.showBadgeToastOnPress = !isPreviewingChanges; defaultImport3Props.pendingDisplayNameStyles = pendingDisplayNameStyles; return ; function _fun80130() { // fn#80130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:2606, offset: 0x01e6dbdc, size: 88 bytes, params: 1, frame: 14 trackUserProfileAction({action: 'COPY_USERNAME'}); (ClipboardUtilsNativeModule).copy(env0_0); (ToastUtilsModule).presentUsernameCopied(); } function _fun80131() { // fn#80131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3020, offset: 0x01e6dc34, size: 61 bytes, params: 1, frame: 12 trackUserProfileAction({action: 'PRESS_PRONOUNS'}); const value = environment.__proto__; (ToastUtilsModule).presentUserPronouns(); } } function EditSection({guildId}) { // fn#80132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3140, offset: 0x01e6dc71, size: 650 bytes, params: 2, frame: 31 const PencilIcon = (PencilIconModule).PencilIcon; var r4; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const value3 = (UserProfileSharedStyles)(); const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext; const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule, []).trackUserProfileAction; const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() { return GuildStore.getGuild(guildId); }); const env0_2 = (UseOpenProfileSettings)(); const env0_3 = (UseOpenProfileSettings)({guild: guild}); object = {style: value3.primaryButtons, maxWidth: ACTION_SHEET_MAX_WIDTH}; const Button = (ButtonNativeModule).Button; const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE; object.primaryButton = (