/* Metro module 8762; source: modules/user_profile/native/UserProfileAboutMeCard.tsx; dependencies: [31, 27, 1949, 1945, 1867, 6816, 661, 1483, 33, 4501, 3860, 697, 4573, 1244, 8763, 566, 5043, 21, 8765, 6819, 6771, 8514, 8767, 8743, 4080, 4008, 1230, 5459, 4015, 1583, 8768, 4578, 6815, 2] */ import SnowflakeUtils from '../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */ import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import UserProfileCard from './UserProfileCard.tsx'; /* Metro dependency 6815 */ import UseBotProfileCommands from '../useBotProfileCommands.tsx'; /* Metro dependency 8767 */ import UserProfileAboutMeCardCommand from './UserProfileAboutMeCardCommand.tsx'; /* Metro dependency 8768 */ 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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as AppLauncherNativeConstantsModule from '../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */ import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */ import * as ChatInputUtilsModule from '../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */ import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as ConnectionsUtilsModule from '../../connections/ConnectionsUtils.tsx'; /* Metro dependency 5043 */ import * as ConstantsModule2 from './Constants.tsx'; /* Metro dependency 6816 */ import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */ import * as ClydeIconModule from '../../../design/components/Icon/native/redesign/generated/ClydeIcon.tsx'; /* Metro dependency 8765 */ function _fun68561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:6, offset: 0x01c53d52, size: 517 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule2; const env0_8 = value.DIVIDER_DOT; const UserProfileThemeTypes = value.UserProfileThemeTypes; value = require(33) /* metro dependency 33 */; const env0_11 = value.jsx; const env0_12 = value.jsxs; const env0_13 = value.Fragment; const env0_14 = {'headingVariant': 'text-sm/semibold', 'textVariant': 'text-md/normal', 'headingSpacing': 8, 'rowGap': 24, 'columnGap': 6}; object = {}; const PREVIEW = UserProfileThemeTypes.PREVIEW; object[PREVIEW] = {'headingVariant': 'text-xs/semibold', 'textVariant': 'text-sm/normal', 'headingSpacing': 4, 'rowGap': 12, 'columnGap': 3}; const env0_17 = (CreateStylesModule).createStyles({card: {flexDirection: 'column'}, textWithIcon: {'flexDirection': 'row', 'alignItems': 'center'}, memberJoinDates: {'flexDirection': 'row', 'flexWrap': 'wrap'}, slashCommands: {'flex': 1, 'flexDirection': 'row', 'flexWrap': 'wrap', 'marginBottom': 12}}); (FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileAboutMeCard.tsx'); exports.default = UserProfileAboutMeCard; function Heading(a0) { // fn#68562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:826, offset: 0x01c53f57, size: 177 bytes, params: 2, frame: 20 const children = a0.children; const {headingVariant, headingSpacing} = getStyleConfig_68574(a0.themeType); const useToken = UseTokenModule.useToken; const USER_PROFILE_ABOUT_ME_HEADING_TEXT_STYLE = (Native).modules.mobile.USER_PROFILE_ABOUT_ME_HEADING_TEXT_STYLE; const value3 = Reflect.apply(useToken, UseTokenModule, [USER_PROFILE_ABOUT_ME_HEADING_TEXT_STYLE]); const Text = (TextModule).Text; return ( {children} ); } function TextWithIcon({icon, children, themeType, accessibilityLabel}) { // fn#68563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1168, offset: 0x01c54008, size: 186 bytes, params: 2, frame: 21 const styles = useStyles(); const {textVariant, columnGap} = getStyleConfig_68574(themeType); const items2 = [styles.textWithIcon]; items2[1] = {columnGap: columnGap}; const Text = (TextModule).Text; return ( {icon} {children} ); } function Bio({userId, displayProfile, pendingBio, themeType, lineClamp}) { // fn#68564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1464, offset: 0x01c540c2, size: 262 bytes, params: 2, frame: 27 var r0; var object2; var intl; var items2; var value; const textVariant = getStyleConfig_68574(themeType).textVariant; const previewBio = displayProfile?.getPreviewBio(pendingBio); if (previewBio == null) { r0 = null; } else if (previewBio === '') { r0 = null; } else { object2 = {themeType: themeType}; intl = (require(1244) /* metro dependency 1244: indexNative */).intl; items2 = [ {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZzAR2Y)} , ]; value = importDefault(8763) /* metro dependency 8763: BioText */; items2[1] = ((Component) => )(value); value = ( {items2} ); r0 = value; } return r0; } function MemberJoinDates({userId, guildId, themeType}) { // fn#68565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1791, offset: 0x01c541c8, size: 848 bytes, params: 2, frame: 36 var jsxRuntimeEnv0_13Binding; var items4; var object3; var value; const styles = useStyles(); const {textVariant, columnGap} = getStyleConfig_68574(themeType); const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() { return LocaleStore.locale; }); const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun68567); const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun68568); const getCreatedAtDate = ConnectionsUtilsModule.getCreatedAtDate; const defaultImport = SnowflakeUtils; const value6 = Reflect.apply(getCreatedAtDate, ConnectionsUtilsModule, [defaultImport.extractTimestamp(userId), locale]); const createdAtDate = ConnectionsUtilsModule.getCreatedAtDate(value5?.joinedAt, locale); const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const heading = ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a6XYD9)} ); const items2 = [styles.memberJoinDates]; items2[1] = {columnGap: columnGap}; const object4 = {themeType: themeType}; const ClydeIcon = (ClydeIconModule).ClydeIcon; object4.icon = ; object4.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9t7w53'], {date: value6}); const textWithIcon = ( {value6} ); let r9 = value4 != null && createdAtDate != null; if (r9) { jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13; const Text = (require(4573) /* metro dependency 4573: Text */).Text; items4 = [ {DIVIDER_DOT} , ]; object3 = {themeType: themeType}; value = importDefault(6819) /* metro dependency 6819: GuildIcon */; object3.icon = ((Component) => )(value); object3.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.FdLNDK, {guildName: value4.name, date: createdAtDate}); items4[1] = ( {createdAtDate} ); value = ( <> {items4} ); r9 = value; } return ( {heading} {textWithIcon} {r9} ); function _fun68567() { // fn#68567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:1995, offset: 0x01c54527, size: 40 bytes, params: 1, frame: 12 const guildIdBinding = guildId; const value2 = null; return value2 != guildIdBinding ? GuildStore.getGuild(guildId) : value2; } function _fun68568() { // fn#68568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:2063, offset: 0x01c5454f, size: 45 bytes, params: 1, frame: 14 const guildIdBinding = guildId; const value2 = null; return value2 != guildIdBinding ? GuildMemberStore.getMember(guildId, userId) : value2; } } function BotSlashCommands({applicationId, channel, commandIds, themeType}) { // fn#68569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8947:2918, offset: 0x01c5457c, size: 521 bytes, params: 2, frame: 30 var r6; var r0; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var items2; const styles = useStyles(); const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations; const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext; const context = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule, []).context; const {commands, application} = (UseBotProfileCommands)(channel, applicationId, commandIds); const binding = application; const useCallback = binding.useCallback; const items3 = [application]; items3[1] = channel.id; items3[2] = channel.guild_id; items3[3] = context; items3[4] = analyticsLocations; if (commands == null) { r0 = null; } else if (commands.length === 0) { r0 = null; } else { items2 = [ {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0hKkS+'])} , ]; items2[1] = ( {commands.map(_fun68573)} ); r6 = application != null && application.bot != null; r6 = r6 && ((Button) =>