This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,16 +1,29 @@
/* Metro module 13461; source: modules/user_settings/devices/native/UserSettingsSessions.tsx; dependencies: [57, 31, 27, 1878, 661, 33, 4501, 6597, 697, 13258, 566, 13462, 4572, 6231, 1244, 6238, 6618, 4573, 1360, 5278, 1305, 8160, 1484, 11785, 7508, 13463, 10160, 10890, 8990, 13464, 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 UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import UserSettingsModalActionCreators from '../../../../actions/UserSettingsModalActionCreators.tsx'; /* Metro dependency 7508 */
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 GlobalUtilsModule from '../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as AuthSessionsUtilsModule from '../../../auth_sessions/AuthSessionsUtils.tsx'; /* Metro dependency 13258 */
import * as AuthSessionsActionCreatorsModule from '../../../auth_sessions/AuthSessionsActionCreators.tsx'; /* Metro dependency 13462 */
function _fun102356(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:6, offset: 0x022386e2, size: 551 bytes, params: 8, frame: 27
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.View;
const env0_7 = value.ScrollView;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const Fonts = value.Fonts;
const env0_9 = value.UserSettingsSections;
@@ -20,242 +33,332 @@ function _fun102356(global, require, importDefault, importAll, module, exports,
const env0_12 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {description: {'paddingHorizontal': 16, 'paddingTop': 8, 'marginBottom': 8}};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
copyDataProperties(object4, textStyles(PRIMARY_MEDIUM, TEXT_DEFAULT, 14), undefined);
object4['fontWeight'] = '500';
object3.detailsText = object4;
object3.container = {'display': 'flex', 'flex': 1};
object3.loading = {marginTop: 16};
object3.sessionInfo = {display: 'flex'};
object3.sessionInfoRow = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'};
object3.sessionInfoRowSpacing = {marginHorizontal: 4};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.logoutButton = {marginRight: 10, tintColor: INTERACTIVE_TEXT_DEFAULT};
object3.list = {paddingHorizontal: 16};
const env0_13 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/devices/native/UserSettingsSessions.tsx');
exports.default = UserSettingsSessionsContainer;
}
function UserSettingsSessions() { // fn#102357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:752, offset: 0x02238909, size: 981 bytes, params: 1, frame: 32
var r10;
var r8;
var Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var length;
var object4;
var TableRow;
var object5;
const styles = useStyles();
const {currentSession,
otherSessions} = (require(13258) /* metro dependency 13258: AuthSessionsUtils */).useAuthSessions();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const [property, env0_1] = env0_3(env0_4.useState(false), 2);
env0_4.useEffect(_fun102359, []);
const value5 = null;
if (value5 == currentSession) {
r8 = property ? <View style={styles.loading}><ActivityIndicator /></View> : value5;
} else {
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var stackProps = {spacing: 24, style: styles.list};
items2 = [<TableRowGroup title={intl.string(t.LLS19o)} hasIcons>{value5 != currentSession ? <SessionInfo session={currentSession} current /> : value5}</TableRowGroup>];
length = otherSessions.length;
if (length > 0) {
r10 = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>{otherSessions.map(_fun102362)}<UnknownLegacySessionsInfo /></TableRowGroup>;
} else if (value5 == currentUser) {
r10 = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>{otherSessions.map(_fun102362)}<UnknownLegacySessionsInfo /></TableRowGroup>;
} else if (currentUser.mfaEnabled) {
r10 = value5;
} else {
r10 = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>{otherSessions.map(_fun102362)}<UnknownLegacySessionsInfo /></TableRowGroup>;
}
items2[1] = r10;
length = otherSessions.length;
if (length > 0) {
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
r8 = <TableRow start end variant="danger" label={intl.string(t.cLmmeY)} subLabel={intl.string(t.OTXyaf)} onPress={onPress_102363} />;
} else {
r8 = value5;
}
items2[2] = r8;
r8 = <Stack {...stackProps}>{items2}</Stack>;
}
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<ScrollView style={styles.container}>
<SafeAreaPaddingView bottom>
<Text variant="text-sm/medium" style={styles.description}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zZp618)}
</Text>
{r8}
</SafeAreaPaddingView>
</ScrollView>
);
}
function SessionInfo({session, current}) { // fn#102365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:2018, offset: 0x02238dd5, size: 1421 bytes, params: 2, frame: 40
var r16;
var r14;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var moduleValue;
var jsxRuntimeEnv0_12Binding;
var items2;
const styles = useStyles();
const r20 = session.client_info?.location ?? session.client_info?.ip;
const platform = session.client_info?.platform;
const os = session.client_info?.os;
let r6 = os == null ? undefined : os.toLowerCase().trim();
if (r6 === null) {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
} else if (r6 === undefined) {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
} else if (r6 === '') {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
} else if (r6 === 'ios') {
object = {text: os};
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
object.IconComponent = (require(8990) /* metro dependency 8990: MobilePhoneIcon */).MobilePhoneIcon;
r6 = object;
} else if (r6 === 'android') {
object = {text: os};
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
object.IconComponent = (require(8990) /* metro dependency 8990: MobilePhoneIcon */).MobilePhoneIcon;
r6 = object;
} else if (r6 === 'horizon os') {
object = {text: os};
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
object.IconComponent = (require(13464) /* metro dependency 13464: VrHeadsetIcon */).VrHeadsetIcon;
r6 = object;
} else {
object = {text: os};
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
}
const text = r6.text;
const iconSource = r6.iconSource;
const IconComponent = r6.IconComponent;
if (current) {
r16 = null;
} else {
moduleValue = require(13258) /* metro dependency 13258: AuthSessionsUtils */;
r16 = moduleValue.formatDate(session.approx_last_used_time);
}
object = [text, platform];
const value7 = object.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
const PressableComponent = current ? null : ((PressableOpacity) => <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.E4MJNt)} onPress={onPress_102366} hitSlop={{'top': 5,
'left': 5, 'bottom': 5,
'right': 5}}>{((Icon) => <Icon style={styles.logoutButton} source={importDefault(8160) /* metro dependency 8160 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text2 = <Text variant="text-md/semibold">{value7[0]}</Text>;
const value10 = value7.length > 1;
if (value10) {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
items2 = [<Text variant="text-md/semibold" accessibilityLabel="," style={styles.sessionInfoRowSpacing}>{'·'}</Text>];
items2[1] = <Text variant="text-md/semibold">{value7[1]}</Text>;
r14 = <>{items2}</>;
} else {
r14 = value10;
}
const view = <View style={styles.sessionInfo} accessible><View style={styles.sessionInfoRow}>{text2}{r14}</View></View>;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
return (
<TableRow
icon={<Icon source={iconSource} IconComponent={IconComponent} variant="translucent" />}
label={view}
subLabel={<View accessible>{r20 != null && <View style={styles.sessionInfoRow}><Text variant="text-xs/medium" color="text-subtle" style={styles.detailsText}>{r20}</Text></View>}{r16 != null && <View style={styles.sessionInfoRow}><Text variant="text-xs/medium" color="text-subtle" style={styles.detailsText}>{r16}</Text></View>}</View>}
trailing={PressableComponent}
/>
);
}
function UnknownLegacySessionsInfo() { // fn#102367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:3953, offset: 0x02239395, size: 256 bytes, params: 1, frame: 21
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object = {description: {'paddingHorizontal': 16, 'paddingTop': 8, 'marginBottom': 8}};
const object2 = {};
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
object2.icon = <Icon variant="translucent" source={importDefault(11785) /* metro dependency 11785 */} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iUa0sn);
object2.subLabel = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['044+8i'],
{onClick: onClick_102368});
return <TableRow {...object2} />;
}
function UserSettingsSessionsContainer() { // fn#102369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:4391, offset: 0x022394e0, size: 23 bytes, params: 1, frame: 13
return <UserSettingsSessions />;
}
function _fun102359() { // fn#102359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:981, offset: 0x02238cde, size: 77 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
(require(13462) /* metro dependency 13462: AuthSessionsActionCreators */).fetchAuthSessions();
const env0_0 = global.setTimeout(_fun102360, 500);
return _fun102361;
}
function _fun102362(a0) { // fn#102362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1503, offset: 0x02238d64, size: 38 bytes, params: 2, frame: 15
return <SessionInfo session={a0} key={a0.id_hash} />;
}
function UserSettingsSessionsOnPress() { // fn#102363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1753, owner: UserSettingsSessions.onPress, offset: 0x02238d8a, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(13462) /* metro dependency 13462: AuthSessionsActionCreators */;
const logOutSessions = value.logOutSessions;
const otherSessionsBinding = otherSessions;
return Reflect.apply(logOutSessions, value, [otherSessionsBinding.map(function(a0) {
return a0.id_hash;
})]);
}
function SessionInfoOnPress() { // fn#102366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:2995, owner: SessionInfo.onPress, offset: 0x02239362, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(13462) /* metro dependency 13462: AuthSessionsActionCreators */;
return value.logOutSessions(session.id_hash);
}
function UnknownLegacySessionsInfoOnClick() { // fn#102368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:4226, owner: UnknownLegacySessionsInfo.onClick, offset: 0x02239495, size: 75 bytes, params: 1, frame: 13
const defaultImport = importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */;
const setSection = defaultImport.setSection;
let ACCOUNT = UserSettingsSections.ACCOUNT;
Reflect.apply(setSection, defaultImport, [ACCOUNT]);
const binding = env0_0;
const push = binding.push;
ACCOUNT = UserSettingsSections.ACCOUNT;
Reflect.apply(push, binding, [ACCOUNT]);
}
function _fun102361() { // fn#102361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1055, offset: 0x02238d2b, size: 57 bytes, params: 1, frame: 12
const clearTimeout = global.clearTimeout;
clearTimeout(env0_0);
const value = environment.__proto__.__proto__;
(require(13462) /* metro dependency 13462: AuthSessionsActionCreators */).clearAuthSessions();
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
copyDataProperties(object2, TextStyles(PRIMARY_MEDIUM, TEXT_DEFAULT, 14), undefined);
object2['fontWeight'] = '500';
object.detailsText = object2;
object.container = {'display': 'flex', 'flex': 1};
object.loading = {marginTop: 16};
object.sessionInfo = {display: 'flex'};
object.sessionInfoRow = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'};
object.sessionInfoRowSpacing = {marginHorizontal: 4};
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object.logoutButton = {marginRight: 10, tintColor: INTERACTIVE_TEXT_DEFAULT};
object.list = {paddingHorizontal: 16};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/devices/native/UserSettingsSessions.tsx');
exports.default = UserSettingsSessionsContainer;
function UserSettingsSessions() { // fn#102357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:752, offset: 0x02238909, size: 981 bytes, params: 1, frame: 32
var r10;
var r8;
var Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
var length;
var object;
var TableRow;
var object2;
const styles = useStyles();
const {currentSession,
otherSessions} = (AuthSessionsUtilsModule).useAuthSessions();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const [property, env0_1] = Module00057(ReactModule.useState(false), 2);
ReactModule.useEffect(_fun102359, []);
const value5 = null;
if (value5 == currentSession) {
r8 = (
property
? (
<View style={styles.loading}>
<ActivityIndicator />
</View>
)
: value5
);
} else {
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var stackProps = {spacing: 24, style: styles.list};
items2 = [
<TableRowGroup title={intl.string(t.LLS19o)} hasIcons>
{
value5 != currentSession
? (
<SessionInfo session={currentSession} current />
)
: value5
}
</TableRowGroup>,
];
length = otherSessions.length;
if (length > 0) {
r10 = (
<TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>
{otherSessions.map(_fun102362)}
<UnknownLegacySessionsInfo />
</TableRowGroup>
);
} else if (value5 == currentUser) {
r10 = (
<TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>
{otherSessions.map(_fun102362)}
<UnknownLegacySessionsInfo />
</TableRowGroup>
);
} else if (currentUser.mfaEnabled) {
r10 = value5;
} else {
r10 = (
<TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xx1MWc)} hasIcons>
{otherSessions.map(_fun102362)}
<UnknownLegacySessionsInfo />
</TableRowGroup>
);
}
items2[1] = r10;
length = otherSessions.length;
if (length > 0) {
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
r8 = (
<TableRow
start
end
variant="danger"
label={intl.string(t.cLmmeY)}
subLabel={intl.string(t.OTXyaf)}
onPress={onPress_102363}
/>
);
} else {
r8 = value5;
}
items2[2] = r8;
r8 = (
<Stack {...stackProps}>
{items2}
</Stack>
);
}
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
return (
<ScrollView style={styles.container}>
<SafeAreaPaddingView bottom>
<Text variant="text-sm/medium" style={styles.description}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zZp618)}
</Text>
{r8}
</SafeAreaPaddingView>
</ScrollView>
);
function _fun102359() { // fn#102359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:981, offset: 0x02238cde, size: 77 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
(AuthSessionsActionCreatorsModule).fetchAuthSessions();
const env0_0 = global.setTimeout(_fun102360, 500);
return _fun102361;
function _fun102360() { // fn#102360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1033, offset: 0x00e6aae9, size: 18 bytes, params: 1, frame: 11
return env1_1(true);
}
function _fun102361() { // fn#102361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1055, offset: 0x02238d2b, size: 57 bytes, params: 1, frame: 12
const clearTimeout = global.clearTimeout;
clearTimeout(env0_0);
const value = environment.__proto__.__proto__;
(AuthSessionsActionCreatorsModule).clearAuthSessions();
}
}
function _fun102362(a0) { // fn#102362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1503, offset: 0x02238d64, size: 38 bytes, params: 2, frame: 15
return <SessionInfo session={a0} key={a0.id_hash} />;
}
function UserSettingsSessionsOnPress() { // fn#102363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:1753, owner: UserSettingsSessions.onPress, offset: 0x02238d8a, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(13462) /* metro dependency 13462: AuthSessionsActionCreators */;
const logOutSessions = value.logOutSessions;
const otherSessionsBinding = otherSessions;
return Reflect.apply(logOutSessions, value, [otherSessionsBinding.map(function(a0) {
return a0.id_hash;
})]);
}
}
function SessionInfo({session, current}) { // fn#102365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:2018, offset: 0x02238dd5, size: 1421 bytes, params: 2, frame: 40
var r16;
var r14;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var moduleValue;
var jsxRuntimeEnv0_12Binding;
var items2;
const styles = useStyles();
const r20 = session.client_info?.location ?? session.client_info?.ip;
const platform = session.client_info?.platform;
const os = session.client_info?.os;
let r6 = os == null ? undefined : os.toLowerCase().trim();
if (r6 === null) {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
} else if (r6 === undefined) {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
} else if (r6 === '') {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cDHCNY);
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
} else if (r6 === 'ios') {
object = {text: os};
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
object.IconComponent = (require(8990) /* metro dependency 8990: MobilePhoneIcon */).MobilePhoneIcon;
r6 = object;
} else if (r6 === 'android') {
object = {text: os};
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
object.IconComponent = (require(8990) /* metro dependency 8990: MobilePhoneIcon */).MobilePhoneIcon;
r6 = object;
} else if (r6 === 'horizon os') {
object = {text: os};
object.iconSource = importDefault(10890) /* metro dependency 10890 */;
object.IconComponent = (require(13464) /* metro dependency 13464: VrHeadsetIcon */).VrHeadsetIcon;
r6 = object;
} else {
object = {text: os};
object.iconSource = importDefault(13463) /* metro dependency 13463 */;
object.IconComponent = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
r6 = object;
}
const text = r6.text;
const iconSource = r6.iconSource;
const IconComponent = r6.IconComponent;
if (current) {
r16 = null;
} else {
moduleValue = require(13258) /* metro dependency 13258: AuthSessionsUtils */;
r16 = moduleValue.formatDate(session.approx_last_used_time);
}
object = [text, platform];
const value7 = object.filter((GlobalUtilsModule).isNotNullish);
const PressableComponent = (
current
? null
: ((PressableOpacity) => <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.E4MJNt)} onPress={onPress_102366} hitSlop={{'top': 5,
'left': 5, 'bottom': 5,
'right': 5}}>{((Icon) => <Icon style={styles.logoutButton} source={importDefault(8160) /* metro dependency 8160 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)
);
const Text = (TextModule).Text;
const text2 = (
<Text variant="text-md/semibold">
{value7[0]}
</Text>
);
const value10 = value7.length > 1;
if (value10) {
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
items2 = [
<Text
variant="text-md/semibold"
accessibilityLabel=","
style={styles.sessionInfoRowSpacing}
>
{'·'}
</Text>,
];
items2[1] = (
<Text variant="text-md/semibold">
{value7[1]}
</Text>
);
r14 = (
<>
{items2}
</>
);
} else {
r14 = value10;
}
const view = (
<View style={styles.sessionInfo} accessible>
<View style={styles.sessionInfoRow}>
{text2}
{r14}
</View>
</View>
);
const TableRow = (TableRowNativeModule).TableRow;
const TableRow2 = (TableRowNativeModule).TableRow;
const Icon = TableRow2.Icon;
return (
<TableRow
icon={<Icon
source={iconSource}
IconComponent={IconComponent}
variant="translucent"
/>}
label={view}
subLabel={<View accessible>
{r20 != null && <View style={styles.sessionInfoRow}><Text variant="text-xs/medium" color="text-subtle" style={styles.detailsText}>{r20}</Text></View>}
{r16 != null && <View style={styles.sessionInfoRow}><Text variant="text-xs/medium" color="text-subtle" style={styles.detailsText}>{r16}</Text></View>}
</View>}
trailing={PressableComponent}
/>
);
function SessionInfoOnPress() { // fn#102366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:2995, owner: SessionInfo.onPress, offset: 0x02239362, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(13462) /* metro dependency 13462: AuthSessionsActionCreators */;
return value.logOutSessions(session.id_hash);
}
}
function UnknownLegacySessionsInfo() { // fn#102367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:3953, offset: 0x02239395, size: 256 bytes, params: 1, frame: 21
const env0_0 = (UseNavigationNativeModule).useNavigation();
const TableRow = (TableRowNativeModule).TableRow;
const object = {};
const TableRow2 = (TableRowNativeModule).TableRow;
const Icon = TableRow2.Icon;
object.icon = <Icon variant="translucent" source={importDefault(11785) /* metro dependency 11785 */} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iUa0sn);
object.subLabel = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['044+8i'],
{onClick: onClick_102368});
return <TableRow {...object} />;
function UnknownLegacySessionsInfoOnClick() { // fn#102368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:4226, owner: UnknownLegacySessionsInfo.onClick, offset: 0x02239495, size: 75 bytes, params: 1, frame: 13
const defaultImport = UserSettingsModalActionCreators;
const setSection = defaultImport.setSection;
let ACCOUNT = UserSettingsSections.ACCOUNT;
Reflect.apply(setSection, defaultImport, [ACCOUNT]);
const binding = env0_0;
const push = binding.push;
ACCOUNT = UserSettingsSections.ACCOUNT;
Reflect.apply(push, binding, [ACCOUNT]);
}
}
function UserSettingsSessionsContainer() { // fn#102369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13651:4391, offset: 0x022394e0, size: 23 bytes, params: 1, frame: 13
return <UserSettingsSessions />;
}
}
global.__d(_fun102356, 13461, [57, 31, 27, 1878, 661, 33, 4501, 6597, 697, 13258, 566, 13462, 4572, 6231, 1244,
6238, 6618, 4573, 1360, 5278, 1305, 8160, 1484, 11785, 7508, 13463, 10160, 10890, 8990, 13464,
2]) /* metro module 13461, dependencies: [57, 31, 27, 1878, 661, 33, 4501, 6597, 697, 13258, 566, 13462, 4572, 6231, 1244, 6238, 6618, 4573, 1360, 5278, 1305, 8160, 1484, 11785, 7508, 13463, 10160, 10890, 8990, 13464, 2] */;