600 lines
32 KiB
TypeScript
600 lines
32 KiB
TypeScript
/* Metro module 11375; source: modules/user_profile/native/LegacyUserProfileConnections.tsx; dependencies: [31, 27, 1949, 1885, 3996, 5189, 661, 1309, 5044, 33, 4501, 697, 5043, 10362, 4915, 1423, 4002, 1305, 11376, 11377, 3860, 10365, 10366, 4081, 6797, 3856, 1244, 8872, 4863, 3853, 5278, 4573, 3868, 566, 5039, 11378, 2] */
|
|
import UserRecord from '../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
|
|
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
|
|
import Linking from '../../../lib/native/Linking.tsx'; /* Metro dependency 3853 */
|
|
import StreamerModeStore from '../../../stores/StreamerModeStore.tsx'; /* Metro dependency 3996 */
|
|
import UserProfileStore from '../UserProfileStore.tsx'; /* Metro dependency 5189 */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as FormConstantsModule from '../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
|
|
import * as AvatarUtilsModule from '../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
|
|
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
|
|
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
|
|
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
|
|
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 AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
|
|
import * as ConnectionsHooksModule from '../../connections/ConnectionsHooks.tsx'; /* Metro dependency 5039 */
|
|
import * as ConstantsModule2 from '../../connections/Constants.tsx'; /* Metro dependency 5044 */
|
|
import * as ConnectionMetadataVanityItemsModule from '../../connections/native/ConnectionMetadataVanityItems.tsx'; /* Metro dependency 10362 */
|
|
|
|
function _fun87203(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6, offset: 0x01fb2e4e, size: 964 bytes, params: 8, frame: 29
|
|
let env0_0 = require;
|
|
const ConnectedUserAccount2 = ConnectedUserAccount;
|
|
const ConnectedApplicationUserRoleAccount2 = ConnectedApplicationUserRoleAccount;
|
|
const closure3 = function(a0, a1) {
|
|
var env0_0 = a1;
|
|
var env0_1 = require(dependencyMap[32]).useThemeContext().theme;
|
|
var env0_2 = require(dependencyMap[33]).useStateFromStores([LocaleStore], _fun87212);
|
|
return a0.map(_fun87213);
|
|
};
|
|
const useConnectedAccountItems2 = useConnectedAccountItems;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const FORM_ROW_VERTICAL_PADDING = (FormConstantsModule).FORM_ROW_VERTICAL_PADDING;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
object.connectedAccountContainer = {paddingHorizontal: 10, paddingVertical: FORM_ROW_VERTICAL_PADDING / 2};
|
|
object.connectedAccount = {'flexDirection': 'row', 'alignItems': 'center'};
|
|
object.connectedAccountNameContainer = {'flex': 1, 'marginLeft': 8};
|
|
object.connectedAccountName = {'flexDirection': 'row', 'alignItems': 'center'};
|
|
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
object.connectedAccountNameText = {color: INTERACTIVE_TEXT_ACTIVE};
|
|
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
|
object.connectedAccountNameCreatedAtText = {color: TEXT_SUBTLE};
|
|
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
object.connectedAccountOpenLink = {'height': 24, 'width': 24, transform: [{rotate: '135deg'}],
|
|
tintColor: INTERACTIVE_TEXT_ACTIVE};
|
|
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object.connectedAccountOpenHide = {'alignSelf': 'flex-start', 'margin': 4, 'height': 16, 'width': 16,
|
|
tintColor: INTERACTIVE_TEXT_DEFAULT};
|
|
object.verifiedCheckContainer = {'marginLeft': 4, 'height': 16, 'width': 16};
|
|
object.verifiedCheck = {'position': 'absolute', 'left': 0, 'top': 0};
|
|
object.connectedAccountChildren = {'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center',
|
|
'overflow': 'hidden'};
|
|
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
object.metadataItem = {color: INTERACTIVE_TEXT_ACTIVE};
|
|
object.appConnectionNameContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
|
|
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null,
|
|
'borderWidth': 1, 'borderColor': null, 'paddingHorizontal': 8, 'paddingVertical': 4, 'marginTop': 12};
|
|
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object4.borderColor = BORDER_SUBTLE;
|
|
object.connectedAccountPoweredByContainer = object4;
|
|
object.connectedAccountPoweredByAvatar = {marginRight: 4};
|
|
object.connectedAccountPoweredByText = {'marginTop': -4, 'alignItems': 'center', 'flexDirection': 'row'};
|
|
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
const env0_18 = ReactModule.memo(ConnectedUserAccount2);
|
|
const env0_19 = ReactModule.memo(ConnectedApplicationUserRoleAccount2);
|
|
const env0_20 = [];
|
|
const env0_21 = [];
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/LegacyUserProfileConnections.tsx');
|
|
exports.default = LegacyUserProfileConnections;
|
|
exports.ConnectedUserAccount = ConnectedUserAccount2;
|
|
exports.ConnectedApplicationUserRoleAccount = ConnectedApplicationUserRoleAccount2;
|
|
exports.useAppplicationRoleConnectionItems = closure3;
|
|
exports.useConnectedAccountItems = useConnectedAccountItems2;
|
|
function ConnectedUserAccount({account, theme, locale, userId, style, showMetadata, showInvisibleIcon}) { // fn#87204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:1782, offset: 0x01fb3212, size: 2055 bytes, params: 2, frame: 39
|
|
var r28;
|
|
var color;
|
|
var r20;
|
|
var r13;
|
|
var r15;
|
|
var r24;
|
|
var r16;
|
|
var moduleValue;
|
|
var type;
|
|
var moduleValue2;
|
|
var value6;
|
|
var moduleValue3;
|
|
var value7;
|
|
var moduleValue4;
|
|
var value8;
|
|
var moduleValue5;
|
|
var value9;
|
|
var defaultImport;
|
|
var moduleValue6;
|
|
var value10;
|
|
var moduleValue7;
|
|
var value11;
|
|
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
var WHITE;
|
|
var object2;
|
|
var verifiedCheck;
|
|
var Sizes;
|
|
var REFRESH_SMALL_16;
|
|
var items3;
|
|
var object3;
|
|
var intl;
|
|
showMetadata = showMetadata ?? true;
|
|
const styles = useStyles();
|
|
const r10 = account.metadata ?? ({});
|
|
if (showMetadata) {
|
|
moduleValue = require(5043) /* metro dependency 5043: ConnectionsUtils */;
|
|
r28 = moduleValue.getCreatedAtDate(r10[MetadataFields.CREATED_AT], locale);
|
|
} else {
|
|
r28 = null;
|
|
}
|
|
if (showMetadata) {
|
|
type = account.type;
|
|
if (PlatformTypes.REDDIT === type) {
|
|
moduleValue7 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value11 = moduleValue7.generateRedditMetadataItems(r10, styles.metadataItem);
|
|
color = undefined;
|
|
r20 = value11;
|
|
} else if (PlatformTypes.STEAM === type) {
|
|
moduleValue6 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value10 = moduleValue6.generateSteamMetadataItems(r10, styles.metadataItem);
|
|
color = undefined;
|
|
r20 = value10;
|
|
} else if (PlatformTypes.BLUESKY === type) {
|
|
moduleValue5 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value9 = moduleValue5.generateTwitterMetadataItems(r10, styles.metadataItem);
|
|
if (r10[MetadataFields.TWITTER_VERIFIED] !== '1') {
|
|
color = undefined;
|
|
r20 = value9;
|
|
} else {
|
|
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
|
color = defaultImport.get(PlatformTypes.TWITTER).color;
|
|
r20 = value9;
|
|
}
|
|
} else if (PlatformTypes.MASTODON === type) {
|
|
moduleValue5 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value9 = moduleValue5.generateTwitterMetadataItems(r10, styles.metadataItem);
|
|
if (r10[MetadataFields.TWITTER_VERIFIED] !== '1') {
|
|
color = undefined;
|
|
r20 = value9;
|
|
} else {
|
|
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
|
color = defaultImport.get(PlatformTypes.TWITTER).color;
|
|
r20 = value9;
|
|
}
|
|
} else if (PlatformTypes.TWITTER === type) {
|
|
moduleValue5 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value9 = moduleValue5.generateTwitterMetadataItems(r10, styles.metadataItem);
|
|
if (r10[MetadataFields.TWITTER_VERIFIED] !== '1') {
|
|
color = undefined;
|
|
r20 = value9;
|
|
} else {
|
|
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
|
|
color = defaultImport.get(PlatformTypes.TWITTER).color;
|
|
r20 = value9;
|
|
}
|
|
} else if (PlatformTypes.PAYPAL === type) {
|
|
moduleValue4 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value8 = moduleValue4.generatePaypalMetadataItems(r10, styles.metadataItem);
|
|
color = undefined;
|
|
r20 = value8;
|
|
} else if (PlatformTypes.EBAY === type) {
|
|
moduleValue3 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value7 = moduleValue3.generateEbayMetadataItems(r10, styles.metadataItem);
|
|
color = undefined;
|
|
r20 = value7;
|
|
} else if (PlatformTypes.TIKTOK !== type) {
|
|
color = undefined;
|
|
r20 = undefined;
|
|
} else {
|
|
moduleValue2 = require(10362) /* metro dependency 10362: ConnectionMetadataVanityItems */;
|
|
value6 = moduleValue2.generateTikTokMetadataItems(r10, styles.metadataItem);
|
|
color = undefined;
|
|
r20 = value6;
|
|
}
|
|
} else {
|
|
color = undefined;
|
|
r20 = undefined;
|
|
}
|
|
const value12 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(account.type);
|
|
const makeSource = AvatarUtilsModule.makeSource;
|
|
const isThemeDark2 = (SharedModule).isThemeDark(theme);
|
|
const value13 = value12 == null;
|
|
const source = Reflect.apply(makeSource, AvatarUtilsModule,
|
|
[isThemeDark2 ? value13 ? undefined : value12.icon.darkPNG : value13 ? undefined : value12.icon.lightPNG]);
|
|
let r5 = value12 == null || value12.getPlatformUserUrl == null ? undefined : value12.getPlatformUserUrl(account);
|
|
const env0_3 = r5;
|
|
const r11 = (
|
|
showInvisibleIcon == null
|
|
? (
|
|
r5 != null
|
|
? (
|
|
<Icon
|
|
style={styles.connectedAccountOpenLink}
|
|
source={importDefault(11377) /* metro dependency 11377 */}
|
|
/>
|
|
)
|
|
: null
|
|
)
|
|
: (
|
|
showInvisibleIcon
|
|
? (
|
|
<Icon
|
|
style={styles.connectedAccountOpenHide}
|
|
source={importDefault(11376) /* metro dependency 11376 */}
|
|
/>
|
|
)
|
|
: (
|
|
r5 != null
|
|
? (
|
|
<Icon
|
|
style={styles.connectedAccountOpenLink}
|
|
source={importDefault(11377) /* metro dependency 11377 */}
|
|
/>
|
|
)
|
|
: null
|
|
)
|
|
)
|
|
);
|
|
let useToken = UseTokenModule.useToken;
|
|
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
const value17 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_MOD_MUTED, theme]);
|
|
useToken = UseTokenModule.useToken;
|
|
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
if (color == null) {
|
|
r13 = value17;
|
|
r15 = Reflect.apply(useToken, UseTokenModule, [INTERACTIVE_TEXT_ACTIVE,
|
|
color == null ? theme : ThemeTypes.DARK]);
|
|
} else {
|
|
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
|
r13 = color;
|
|
r15 = WHITE;
|
|
}
|
|
if (account.verified) {
|
|
var viewBindingProps = {style: styles.verifiedCheckContainer};
|
|
object2 = {};
|
|
verifiedCheck = styles.verifiedCheck;
|
|
object2.style = verifiedCheck;
|
|
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
|
|
REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
|
object2.size = REFRESH_SMALL_16;
|
|
object2.source = importDefault(10365) /* metro dependency 10365 */;
|
|
object2.color = r13;
|
|
items3 = [
|
|
<Icon {...object2} />,
|
|
];
|
|
object3 = {};
|
|
verifiedCheck = styles.verifiedCheck;
|
|
object3.style = verifiedCheck;
|
|
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
|
|
REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
|
object3.size = REFRESH_SMALL_16;
|
|
object3.source = importDefault(10366) /* metro dependency 10366 */;
|
|
object3.color = r15;
|
|
items3[1] = <Icon {...object3} />;
|
|
r24 = (
|
|
<View {...viewBindingProps}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
} else {
|
|
r24 = null;
|
|
}
|
|
const value21 = env0_3.useCallback(_fun87205, [account.name]);
|
|
const value22 = env0_3.useMemo(_fun87206, [value12?.name, r5]);
|
|
const value23 = env0_3.useCallback(_fun87207, [account.type, r5, userId]);
|
|
const PressableComponent = r5 != null ? (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity : Pressable;
|
|
r5 = r5 != null ? value23 : undefined;
|
|
const items2 = [styles.connectedAccountContainer, style];
|
|
const Icon4 = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
Sizes = Icon4.Sizes;
|
|
const MEDIUM = Sizes.MEDIUM;
|
|
const icon = (
|
|
<Icon
|
|
size={MEDIUM}
|
|
source={source}
|
|
disableColor
|
|
/>
|
|
);
|
|
const Text = (TextModule).Text;
|
|
const items5 = [
|
|
<View style={styles.connectedAccountName}>
|
|
<Text variant="text-md/semibold" style={styles.connectedAccountNameText}>
|
|
{account.name}
|
|
</Text>
|
|
{r24}
|
|
</View>,
|
|
];
|
|
if (r28 != null) {
|
|
var textProps = {variant: 'heading-deprecated-12/medium', style: styles.connectedAccountNameCreatedAtText};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r16 = (
|
|
<Text {...textProps}>
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['9rfonh'], {date: r28})}
|
|
</Text>
|
|
);
|
|
} else {
|
|
r16 = null;
|
|
}
|
|
items5[1] = r16;
|
|
items5[2] = (
|
|
r20 != null && r20.length > 0
|
|
? (
|
|
<View style={styles.connectedAccountChildren}>
|
|
{r20}
|
|
</View>
|
|
)
|
|
: null
|
|
);
|
|
return (
|
|
<PressableComponent
|
|
accessibilityLabel={value22}
|
|
accessibilityRole="button"
|
|
onPress={r5}
|
|
onLongPress={value21}
|
|
>
|
|
<View style={items2}>
|
|
<View style={styles.connectedAccount}>
|
|
{icon}
|
|
<View style={styles.connectedAccountNameContainer}>
|
|
{items5}
|
|
</View>
|
|
{r11}
|
|
</View>
|
|
</View>
|
|
</PressableComponent>
|
|
);
|
|
function _fun87205() { // fn#87205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3453, offset: 0x01fb3a19, size: 116 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__;
|
|
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
|
const triggerHapticFeedback = value.triggerHapticFeedback;
|
|
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
|
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
|
|
Reflect.apply(triggerHapticFeedback, value, [IMPACT_LIGHT]);
|
|
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
|
value.copy(account.name);
|
|
(ToastUtilsModule).presentCopiedToClipboard();
|
|
}
|
|
|
|
function _fun87206() { // fn#87206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3615, offset: 0x01fb3a8d, size: 178 bytes, params: 1, frame: 17
|
|
var name;
|
|
var r0;
|
|
var value2;
|
|
var value3;
|
|
const intl = (IndexNativeModule).intl;
|
|
var formatToPlainString;
|
|
const t = (IndexNativeModule).t;
|
|
var OKzaN3;
|
|
var value;
|
|
if (env0_3 != null) {
|
|
value = environment.__proto__;
|
|
value = intl.string(t.wuRE8M);
|
|
r0 = value;
|
|
} else {
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
OKzaN3 = t.OKzaN3;
|
|
name = env0_2 == null ? value3 : env0_2.name;
|
|
value = '';
|
|
value = Reflect.apply(formatToPlainString, intl, [OKzaN3, {name: name ?? value}]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun87207() { // fn#87207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3824, offset: 0x01fb3b3f, size: 106 bytes, params: 1, frame: 14
|
|
var environment;
|
|
var value2;
|
|
if (env0_3 != null) {
|
|
value2 = environment.__proto__;
|
|
(require(8872) /* metro dependency 8872: MaskedLinkUtils */).handleClick({href: env0_3,
|
|
trusted: account.type !== PlatformTypes.DOMAIN, onConfirm: onConfirm_87208});
|
|
}
|
|
function onConfirm_87208() { // fn#87208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:3903, offset: 0x01fb3ba9, size: 108 bytes, params: 1, frame: 18
|
|
const value = environment.__proto__.__proto__;
|
|
const trackWithMetadata = AppAnalyticsUtilsModule.trackWithMetadata;
|
|
const CONNECTED_ACCOUNT_VIEWED = AnalyticEvents.CONNECTED_ACCOUNT_VIEWED;
|
|
Reflect.apply(trackWithMetadata, AppAnalyticsUtilsModule, [CONNECTED_ACCOUNT_VIEWED, {platform_type: account.type,
|
|
other_user_id: userId}]);
|
|
(Linking).openURL(env1_3);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function ConnectedApplicationUserRoleAccount({applicationRoleConnection, style}) { // fn#87209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:4815, offset: 0x01fb3c15, size: 588 bytes, params: 2, frame: 30
|
|
const Text = (TextModule).Text;
|
|
const styles = useStyles();
|
|
const value2 = (ConnectionMetadataVanityItemsModule).generateRoleConnectionMetadataItems(applicationRoleConnection);
|
|
const items3 = [styles.connectedAccountContainer, style];
|
|
const items2 = [
|
|
applicationRoleConnection.platform_name != null
|
|
? (
|
|
<Text variant="eyebrow" color="interactive-text-default">
|
|
{applicationRoleConnection.platform_name}
|
|
</Text>
|
|
)
|
|
: null,
|
|
];
|
|
items2[1] = (
|
|
<View style={styles.appConnectionNameContainer}>
|
|
{
|
|
applicationRoleConnection.platform_username != null
|
|
? (
|
|
<Text variant="text-md/semibold" color="interactive-text-active">
|
|
{applicationRoleConnection.platform_username}
|
|
</Text>
|
|
)
|
|
: null
|
|
}
|
|
</View>
|
|
);
|
|
items2[2] = (
|
|
value2 != null && value2.length > 0
|
|
? (
|
|
<View style={styles.connectedAccountChildren}>
|
|
{value2}
|
|
</View>
|
|
)
|
|
: null
|
|
);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
items2[3] = (
|
|
<View style={{flexDirection: 'row'}}>
|
|
<View style={styles.connectedAccountPoweredByContainer}>
|
|
<Text variant="text-xs/normal" color="text-muted">
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.zIT9YA,
|
|
{applicationHook: applicationHook_87210})}
|
|
</Text>
|
|
</View>
|
|
<View style={{flexGrow: 1}} />
|
|
</View>
|
|
);
|
|
return (
|
|
<View style={items3}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
function ConnectedApplicationUserRoleAccountApplicationHook() { // fn#87210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:5632, owner: ConnectedApplicationUserRoleAccount.applicationHook, offset: 0x01fb3e61, size: 276 bytes, params: 1, frame: 25
|
|
var r5;
|
|
var Avatar;
|
|
var userRecordBinding;
|
|
var value4;
|
|
var userRecord2;
|
|
let bot = applicationRoleConnection.application.bot;
|
|
const value3 = null;
|
|
if (value3 != bot) {
|
|
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
|
var avatarProps = {style: styles.connectedAccountPoweredByAvatar};
|
|
userRecordBinding = UserRecord;
|
|
bot = applicationRoleConnection.application.bot;
|
|
value4 = Object.create(userRecordBinding.prototype, {constructor: {value: userRecordBinding}});
|
|
userRecord2 = new userRecordBinding(bot);
|
|
avatarProps.user = userRecord2 instanceof Object ? userRecord2 : value4;
|
|
avatarProps.size = (require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16;
|
|
avatarProps.guildId = undefined;
|
|
r5 = <Avatar {...avatarProps} />;
|
|
} else {
|
|
r5 = value3;
|
|
}
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<View style={styles.connectedAccountPoweredByText}>
|
|
{r5}
|
|
<Text variant="text-xs/normal" color="text-default">
|
|
{applicationRoleConnection.application.name}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function useAppplicationRoleConnectionItems(a0, a1) { // fn#87211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6073, offset: 0x01fb3f75, size: 122 bytes, params: 3, frame: 17
|
|
const env0_0 = a1;
|
|
const useThemeContext = NativeModule.useThemeContext;
|
|
const env0_1 = Reflect.apply(useThemeContext, NativeModule, []).theme;
|
|
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
return a0.map(_fun87213);
|
|
function _fun87212() { // fn#87212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6196, offset: 0x01bf8fbb, size: 15 bytes, params: 1, frame: 1
|
|
return LocaleStore.locale;
|
|
}
|
|
|
|
function _fun87213(a0, a1) { // fn#87213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6225, offset: 0x01fb3fef, size: 90 bytes, params: 3, frame: 18
|
|
const Fragment = env1_3.Fragment;
|
|
return (
|
|
<Fragment key={a1}>
|
|
{((Component) => <Component applicationRoleConnection={a0} theme={theme} locale={locale} style={require} />)(env1_19)}
|
|
</Fragment>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function useConnectedAccountItems(a0, a1, a2) { // fn#87214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6321, offset: 0x01fb4049, size: 182 bytes, params: 4, frame: 18
|
|
const env0_0 = a1;
|
|
const env0_1 = a2;
|
|
const useThemeContext = NativeModule.useThemeContext;
|
|
const env0_2 = Reflect.apply(useThemeContext, NativeModule, []).theme;
|
|
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
const env0_4 = (ConnectionsHooksModule).usePlatformAllowed({forUserProfile: true});
|
|
return a0.filter(_fun87216).map(_fun87217);
|
|
function _fun87216({type}) { // fn#87216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6519, offset: 0x01fb40ff, size: 66 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
value = importDefault(4915) /* metro dependency 4915: Platforms */;
|
|
value = value.get(type);
|
|
const value2 = value != null;
|
|
if (value2) {
|
|
value = env0_4(value);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun87217(a0, a1) { // fn#87217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6580, offset: 0x01fb4141, size: 98 bytes, params: 3, frame: 18
|
|
const Fragment = env1_3.Fragment;
|
|
return (
|
|
<Fragment key={a1}>
|
|
{((Component) => <Component account={a0} theme={theme} locale={locale} userId={require} style={importDefault} />)(env1_18)}
|
|
</Fragment>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function LegacyUserProfileConnections({user}) { // fn#87218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6786, offset: 0x01fb41a3, size: 501 bytes, params: 2, frame: 26
|
|
var r6;
|
|
var r0;
|
|
var jsxRuntimeEnv0_16Binding;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var items2;
|
|
const userProfile = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
|
function() {
|
|
return UserProfileStore.getUserProfile(user.id);
|
|
});
|
|
const hidePersonalInformation = (require(566) /* metro dependency 566: flux */).useStateFromStores([StreamerModeStore],
|
|
function() {
|
|
return StreamerModeStore.hidePersonalInformation;
|
|
});
|
|
const value4 = env0_3.useMemo(_fun87221, [userProfile?.applicationRoleConnections]);
|
|
const value5 = env0_3.useMemo(_fun87222, [userProfile?.connectedAccounts]);
|
|
const value6 = useAppplicationRoleConnectionItems(value4);
|
|
if (hidePersonalInformation) {
|
|
r0 = null;
|
|
} else if (value5.length === 0) {
|
|
r0 = null;
|
|
} else {
|
|
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
|
r6 = value6 != null && value6.length > 0;
|
|
r6 = r6 && ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PHjkRE)} showContainer>{value6}</Component>)(importDefault(11378) /* metro dependency 11378: UserProfileSection */);
|
|
items2 = [r6];
|
|
items2[1] = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3fe7U5'])} showContainer>{useConnectedAccountItems(value5,
|
|
|
|
user.id)}</Component>)(importDefault(11378) /* metro dependency 11378: UserProfileSection */);
|
|
r0 = (
|
|
<>
|
|
{items2}
|
|
</>
|
|
);
|
|
}
|
|
return r0;
|
|
function _fun87221() { // fn#87221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:6982, offset: 0x01fb43c7, size: 41 bytes, params: 1, frame: 4
|
|
return userProfile?.applicationRoleConnections ?? env1_21;
|
|
}
|
|
|
|
function _fun87222() { // fn#87222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11561:7120, offset: 0x01fb43f0, size: 41 bytes, params: 1, frame: 4
|
|
return userProfile?.connectedAccounts ?? env1_20;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun87203, 11375, [31, 27, 1949, 1885, 3996, 5189, 661, 1309, 5044, 33, 4501, 697, 5043, 10362, 4915,
|
|
1423, 4002, 1305, 11376, 11377, 3860, 10365, 10366, 4081, 6797, 3856, 1244, 8872, 4863, 3853, 5278, 4573, 3868,
|
|
566, 5039, 11378,
|
|
2]) /* metro module 11375, dependencies: [31, 27, 1949, 1885, 3996, 5189, 661, 1309, 5044, 33, 4501, 697, 5043, 10362, 4915, 1423, 4002, 1305, 11376, 11377, 3860, 10365, 10366, 4081, 6797, 3856, 1244, 8872, 4863, 3853, 5278, 4573, 3868, 566, 5039, 11378, 2] */;
|