Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,47 @@
/* Metro module 15178; source: modules/threads/native/components/ThreadAutoArchiveBottomSheet.tsx; dependencies: [31, 1386, 33, 7878, 7988, 1244, 7987, 2] */
function _fun115954(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:6, offset: 0x02475b52, size: 163 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun115955);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadAutoArchiveBottomSheet.tsx');
exports.AutoArchiveDurationOptions = value;
}
function _fun115955({title, description, channel, selected, onSelectDuration}) { // fn#115955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:153, offset: 0x02475bf5, size: 256 bytes, params: 2, frame: 21
const autoArchiveOptions = (require(7878) /* metro dependency 7878: ThreadAutoArchive */).getAutoArchiveOptions();
const env0_0 = channel != null && channel.isForumPost() && channel.hasFlag(ChannelFlags.PINNED);
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const H4mGfI = (require(1244) /* metro dependency 1244: indexNative */).t.H4mGfI;
return (
<TableRadioGroup
value={selected}
title={title}
description={description}
accessibilityLabel={Reflect.apply(string, intl, [H4mGfI])}
onChange={onSelectDuration}
hasIcons={false}
>
{autoArchiveOptions.map(_fun115956)}
</TableRadioGroup>
);
}
function _fun115956(a0) { // fn#115956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:473, offset: 0x02475cf5, size: 83 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={a0.value}
disabled={env0_0}
label={a0.label}
key={a0.value}
/>
);
}
@@ -0,0 +1,248 @@
/* Metro module 15097; source: modules/threads/native/components/ThreadBrowserRowSubtext.tsx; dependencies: [31, 27, 4502, 1945, 1878, 6898, 661, 482, 33, 4501, 697, 566, 7169, 6630, 6593, 4573, 1244, 3995, 6902, 4634, 21, 1305, 8349, 8206, 4020, 2] */
function _fun114222(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:6, offset: 0x02418455, size: 543 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
const MessageTypes = (require(661) /* metro dependency 661: Constants */).MessageTypes;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.jsxs;
const env0_11 = value2.Fragment;
const CHANNEL_NAME_CHANGE = MessageTypes.CHANNEL_NAME_CHANGE;
object = [CHANNEL_NAME_CHANGE];
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
object[1] = THREAD_STARTER_MESSAGE;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object = {};
object.row = {flexDirection: 'row'};
object.subtextContent = {'lineHeight': 18, 'flexShrink': 1};
object.timestamp = {lineHeight: 18};
const object2 = {'fontSize': 14, 'lineHeight': 18};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object2.fontFamily = PRIMARY_SEMIBOLD;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.color = TEXT_SUBTLE;
object.username = object2;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object.dividerDot = {'width': 4, 'height': 4, 'marginHorizontal': 4, 'borderRadius': 2, 'backgroundColor': null,
'alignSelf': 'center', backgroundColor: BACKGROUND_MOD_STRONG};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object]);
const env0_14 = value.memo(_fun114231);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadBrowserRowSubtext.tsx');
exports.ThreadSubtext = ThreadSubtext;
}
function MessageContent({thread, message}) { // fn#114223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1751, offset: 0x02418674, size: 511 bytes, params: 2, frame: 23
const styles = useStyles();
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers({[thread.guild_id]: [message.author.id]},
'ThreadBrowserRowSubtext');
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(message.author.id) ?? message.author;
});
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const value3 = (importDefault(4634) /* metro dependency 4634: useMessageAuthor */)(message);
const env0_2 = value3.nick;
const env0_3 = value3.colorString;
const env0_4 = value3.colorStrings;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value4 = defaultImport.extractTimestamp(message.id);
const timestampString = (require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value4);
const timestampAccessibilityLabel = (require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value4);
const env0_5 = (importDefault(6630) /* metro dependency 6630: useHasEnhancedRoleColors */)(thread.guild_id,
value2.id);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const M79KAH = (require(1244) /* metro dependency 1244: indexNative */).t.M79KAH;
return (
<SubstringRow
user={value2}
timestamp={timestampString}
accessibilityLabel={timestampAccessibilityLabel}
>
<Text
lineClamp={1}
ellipsizeMode="tail"
lineBreakMode="tail"
style={styles.subtextContent}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(format, intl, [M79KAH, {usernameHook: usernameHook_114226,
messageTextHook: messageTextHook}])}
</Text>
</SubstringRow>
);
}
function SubstringRow({user, children, timestamp, accessibilityLabel}) { // fn#114228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2798, offset: 0x02418994, size: 334 bytes, params: 2, frame: 23
const styles = useStyles();
return user == null ? <View style={styles.row}>{((Text) => <Text style={styles.timestamp} accessibilityLabel={accessibilityLabel} variant="text-sm/medium" color="text-muted">{' ' + timestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : <View style={styles.row}>{children}<View style={styles.dividerDot} />{((Text) => <Text style={styles.timestamp} accessibilityLabel={accessibilityLabel} variant="text-sm/medium" color="text-muted">{'' + timestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
}
function Username_114229({nickname, usernameColor, roleColor, roleColors, shouldShowRoleDot}) { // fn#114229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:3220, offset: 0x02418ae2, size: 330 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = env0_3.useMemo(function() {
return usernameColor != null ? [styles.username, {color: usernameColor}] : styles.username;
}, [usernameColor, styles]);
const value4 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(roleColors);
const r12 = !shouldShowRoleDot && value4.length > 1;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const r6 = shouldShowRoleDot && ((RoleDot) => <RoleDot color={roleColor} colors={roleColors} size="small" />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const fabricUtilsModule = require(4020) /* metro dependency 4020: FabricUtils */;
return (
<>
{r6}
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
experimental_useNativeText={!fabricUtilsModule.isFabric()}
gradientColors={r12 ? value4 : undefined}
style={value3}
>
{nickname}
</Text>
</>
);
}
function _fun114231({thread, timestamp, accessibilityLabel}) { // fn#114231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:665, offset: 0x02418c6a, size: 549 bytes, params: 2, frame: 24
const styles = useStyles();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(thread.ownerId);
});
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
var threadBinding = thread;
return GuildMemberStore.getMember(threadBinding.guild_id, threadBinding.ownerId);
});
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const env0_4 = member?.colorString ?? null;
const env0_5 = member?.colorStrings ?? null;
const env0_6 = (importDefault(6630) /* metro dependency 6630: useHasEnhancedRoleColors */)(thread.guild_id,
user?.id);
const env0_7 = env0_3.useRef(thread);
env0_3.useEffect(_fun114235);
env0_3.useEffect(_fun114236, [member, user]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<SubstringRow
user={user}
timestamp={timestamp}
accessibilityLabel={accessibilityLabel}
>
<Text
lineClamp={1}
ellipsizeMode="tail"
lineBreakMode="tail"
style={styles.subtextContent}
accessibilityLabel={accessibilityLabel}
variant="text-sm/medium"
color="text-default"
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.imPXd5,
{usernameHook: usernameHook})}
</Text>
</SubstringRow>
);
}
function ThreadSubtext({thread}) { // fn#114238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:3816, offset: 0x02418ff0, size: 255 bytes, params: 2, frame: 21
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThreadMessageStore], function() {
return ThreadMessageStore.getMostRecentMessage(id);
}, [thread.id]);
const value3 = (require(7169) /* metro dependency 7169: ThreadUtils */).useLastMessageTimestamp(thread);
if (value2 == null) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
const binding = env0_12;
if (binding.includes(value2.type)) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
if (thread.isArchivedThread()) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
return <MessageContent thread={thread} message={value2} />;
}
function MessageContentUsernameHook(a0, a1) { // fn#114226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2524, owner: MessageContent.usernameHook, offset: 0x024188a9, size: 134 bytes, params: 3, frame: 18
const value = environment.__proto__;
const nickBinding = nick;
const value2 = null;
return (
<Username_114229
nickname={value2 != nickBinding ? nick : ''}
usernameColor={roleStyle !== 'username' ? value2 : colorString}
roleColor={colorString}
roleColors={env0_5 ? colorStrings : value2}
shouldShowRoleDot={roleStyle === 'dot' && value2 != colorString}
key={a1}
/>
);
}
function messageTextHook(a0, a1) { // fn#114227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2690, owner: MessageContent.messageTextHook, offset: 0x0241892f, size: 101 bytes, params: 3, frame: 17
const value = environment.__proto__;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText key={a1}>
{(importDefault(8349) /* metro dependency 8349: renderMessageMarkup */)(message, {'formatInline': true,
'allowGameMentions': true}).content}
</LegacyText>
);
}
function _fun114236() { // fn#114236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1130, offset: 0x02418ed7, size: 90 bytes, params: 1, frame: 14
var current;
var value;
if (user == null) {
current = env0_7.current;
value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(current.guild_id, [current.ownerId]);
} else if (member == null) {
current = env0_7.current;
value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(current.guild_id, [current.ownerId]);
}
}
function usernameHook(a0, a1) { // fn#114237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1509, offset: 0x02418f31, size: 191 bytes, params: 3, frame: 20
var r7;
let value = environment.__proto__;
const memberBinding = member;
const value3 = null;
const nick = value3 == memberBinding ? undefined : member.nick;
if (value3 != nick) {
r7 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r7 = value;
}
return (
<Username_114229
nickname={value3 != r7 ? r7 : ''}
usernameColor={roleStyle !== 'username' ? value3 : env0_4}
roleColor={env0_4}
roleColors={env0_6 ? env0_5 : value3}
shouldShowRoleDot={roleStyle === 'dot' && value3 != env0_4}
key={a1}
/>
);
}
@@ -0,0 +1,381 @@
/* Metro module 14535; source: modules/threads/native/components/ThreadLongPressActionSheet.tsx; dependencies: [31, 1379, 1867, 4297, 3786, 661, 33, 1244, 8999, 5097, 11234, 4054, 7153, 10859, 8850, 4076, 4066, 11237, 6705, 9646, 8148, 4056, 12148, 10629, 4080, 10936, 1962, 9216, 11241, 11243, 566, 6860, 22, 9626, 4805, 3829, 11247, 6819, 1305, 6805, 11251, 6807, 8772, 6797, 3856, 2] */
function _fun109962(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:6, offset: 0x023635d2, size: 278 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticsObjectTypes;
const env0_9 = value.AnalyticsObjects;
const env0_10 = value.AnalyticsSections;
const env0_11 = value.ChannelSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadLongPressActionSheet.tsx');
exports.default = ThreadLongPressActionSheet;
}
function ThreadLongPressActionSheetConnected({channel, onClose}) { // fn#109963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:279, offset: 0x023636e8, size: 1012 bytes, params: 2, frame: 37
var object2;
var r5;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
var Group;
var intl;
const env0_2 = channel.getGuildId();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun109964);
const {isMuted,
hasJoined} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([JoinedThreadsStore],
function() {
var object = {};
var channelBinding = channel;
object.isMuted = JoinedThreadsStore.isMuted(channelBinding.id);
object.hasJoined = JoinedThreadsStore.hasJoined(channelBinding.id);
return object;
});
const value3 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanManageThread(channel);
const value4 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsThreadModerator(channel);
const value5 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanUnarchiveThread(channel);
const value6 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanJoinThreadVoice(channel);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
});
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return !importDefault(dependencyMap[32]).isEmpty(VoiceStateStore.getVoiceStatesForChannel(channel.id));
});
const value9 = (importDefault(9626) /* metro dependency 9626: useHandleJoinThreadVoice */)(channel);
const value10 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value11 = DeveloperMode.useSetting();
const env0_3 = value11;
const value12 = (importDefault(11247) /* metro dependency 11247: useMobileChannelFavoriteActions */)(channel,
'ThreadLongPressActionSheet');
const r10 = guild != null ? ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE} channel={channel} />)((require(1305) /* metro dependency 1305: native */).Avatar);
object2 = {channel: channel, guild: guild, canManageThread: value3, canModerateThread: value4,
canUnarchiveThread: value5, isMuted: isMuted, hasJoined: hasJoined};
object2.isForumPost = channel.isForumPost();
object2.handleJoinThreadVoice = value6 ? value7 ? null : value9 : null;
object2.hasActiveThreadVoice = value8;
object2.favorites = value12;
const value16 = ThreadLongPressActionSheetConnectedGetActionSheetButtons(object2);
env0_3.useEffect(_fun109981, [value16.length, value11, onClose]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object2 = {};
const ActionSheetIconHeader = (require(11251) /* metro dependency 11251: ActionSheetIconHeaderNative */).ActionSheetIconHeader;
object2.header = <ActionSheetIconHeader title={value10} icon={r10} />;
const value17 = value16.map(_fun109982);
if (value11) {
Group = ActionSheetRow.Group;
var actionSheetRowProps = {icon: ((Icon) => <Icon IconComponent={(require(8772) /* metro dependency 8772: IdIcon */).IdIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
actionSheetRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DQ797g);
actionSheetRowProps.onPress = onPress_109985;
r5 = <Group hasIcons key="developer-actions"><ActionSheetRow {...actionSheetRowProps} /></Group>;
} else {
r5 = value11;
}
return (
<ActionSheet {...object2}>
{value17}
{r5}
</ActionSheet>
);
}
function ThreadLongPressActionSheet({channelId, onClose}) { // fn#109986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5222, offset: 0x02364738, size: 153 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
env0_3.useEffect(function() {
if (channel == null) {
onClose();
}
}, [channel, onClose]);
return channel != null ? <ThreadLongPressActionSheetConnected channel={channel} onClose={onClose} /> : null;
}
function ThreadLongPressActionSheetConnectedGetActionSheetButtons({channel, canManageThread, canModerateThread, canUnarchiveThread, isMuted, hasJoined, isForumPost, handleJoinThreadVoice, hasActiveThreadVoice, favorites}) { // fn#109968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1096, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons, offset: 0x02363b80, size: 1846 bytes, params: 2, frame: 31
var object;
var object3;
var object8;
const XLargeIcon = (require(4066) /* metro dependency 4066: XLargeIcon */).XLargeIcon;
var object16;
var isLockedThread2;
var object17;
var object18;
const items2 = [];
let push = items2.push;
const object19 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object19.label = Reflect.apply(string, intl, [t.e6RscS]);
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
object19.IconComponent = EyeIcon;
object19.onPress = function() {
require(dependencyMap[9]).ack(channel.id, {section: AnalyticsSections.THREAD_ACTION_SHEET,
object: AnalyticsObjects.MARK_THREAD_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL}, true,
true);
};
Reflect.apply(push, items2, [{sectionKey: 'mark-as-read', buttons: [object19]}]);
const value2 = (importDefault(11234) /* metro dependency 11234: buildFavoritesSectionButtonsNative */)(favorites);
if (value2 != null) {
items2.push({sectionKey: 'favorites', buttons: [value2]});
}
const object20 = {sectionKey: 'channel-actions', buttons: []};
let buttons = object20.buttons;
push = buttons.push;
if (hasJoined) {
object3 = {};
string = intl.string;
object3.label = isForumPost ? Reflect.apply(string, intl, [t['2LsZdT']]) : Reflect.apply(string, intl,
[t['fa/84m']]);
object3.IconComponent = (require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon;
object3.isDestructive = true;
object3.onPress = onPress_109970;
Reflect.apply(push, buttons, [object3]);
} else {
object = {};
string = intl.string;
object.label = isForumPost ? Reflect.apply(string, intl, [t.ihLPiO]) : Reflect.apply(string, intl,
[t['10kukS']]);
object.IconComponent = (require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon;
object.onPress = onPress_109971;
Reflect.apply(push, buttons, [object]);
}
if (handleJoinThreadVoice != null) {
buttons = object20.buttons;
push = buttons.push;
object8 = {};
string = intl.string;
object8.label = hasActiveThreadVoice ? Reflect.apply(string, intl, [t['0D/6Rz']]) : Reflect.apply(string, intl,
[t.My50nf]);
object8.IconComponent = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
object8.onPress = handleJoinThreadVoice;
Reflect.apply(push, buttons, [object8]);
}
const threadMetadata = channel.threadMetadata;
if (threadMetadata == null) {
if (canManageThread) {
buttons = object20.buttons;
push = buttons.push;
string = intl.string;
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
[t.BTs4Kb]) : Reflect.apply(string,
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
}
} else if (threadMetadata.archived) {
if (canUnarchiveThread) {
buttons = object20.buttons;
push = buttons.push;
object16 = {};
string = intl.string;
object16.label = isForumPost ? Reflect.apply(string, intl, [t.cnRubV]) : Reflect.apply(string, intl,
[t.S9E4G7]);
object16.IconComponent = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
object16.onPress = onPress_109972;
Reflect.apply(push, buttons, [object16]);
}
} else if (canManageThread) {
buttons = object20.buttons;
push = buttons.push;
string = intl.string;
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
[t.BTs4Kb]) : Reflect.apply(string,
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
}
if (canModerateThread) {
isLockedThread2 = channel.isLockedThread();
buttons = object20.buttons;
push = buttons.push;
object17 = {};
string = intl.string;
if (isLockedThread2) {
object17.label = isForumPost ? Reflect.apply(string, intl, [t['/OKSxp']]) : Reflect.apply(string, intl,
[t['jeyb/W']]);
object17.IconComponent = (require(11237) /* metro dependency 11237: LockUnlockedIcon */).LockUnlockedIcon;
object17.onPress = onPress_109974;
Reflect.apply(push, buttons, [object17]);
} else {
object17.label = isForumPost ? Reflect.apply(string, intl, [t['Ur/0Na']]) : Reflect.apply(string, intl,
[t.HoCqm8]);
object17.IconComponent = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
object17.onPress = onPress_109975;
Reflect.apply(push, buttons, [object17]);
}
}
if (canModerateThread) {
buttons = object20.buttons;
push = buttons.push;
object18 = {};
string = intl.string;
object18.label = isForumPost ? Reflect.apply(string, intl, [t.NP1yHG]) : Reflect.apply(string, intl,
[t['2Mk1TP']]);
object18.IconComponent = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
object18.onPress = onPress_109976;
Reflect.apply(push, buttons, [object18]);
}
buttons = object20.buttons;
push = buttons.push;
const object21 = {};
string = intl.string;
const WqhZss = t.WqhZss;
object21.label = Reflect.apply(string, intl, [WqhZss]);
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object21.IconComponent = LinkIcon;
object21.isDestructive = false;
object21.onPress = onPress_109977;
Reflect.apply(push, buttons, [object21]);
items2.push(object20);
const object22 = {sectionKey: 'notifications', buttons: []};
buttons = object22.buttons;
push = buttons.push;
const object23 = {};
string = intl.string;
if (isMuted) {
object23.label = isForumPost ? Reflect.apply(string, intl, [t['0JQfsP']]) : Reflect.apply(string, intl,
[t['Cq/TzF']]);
object23.IconComponent = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
object23.onPress = onPress_109978;
Reflect.apply(push, buttons, [object23]);
} else {
object23.label = isForumPost ? Reflect.apply(string, intl, [t['nP+Ykd']]) : Reflect.apply(string, intl,
[t.bUUd8q]);
object23.IconComponent = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
object23.onPress = onPress_109979;
Reflect.apply(push, buttons, [object23]);
}
buttons = object22.buttons;
push = buttons.push;
const object24 = {};
object24.label = intl.string(t.h850Ss);
const ChannelNotificationIcon = (require(11241) /* metro dependency 11241: ChannelNotificationIcon */).ChannelNotificationIcon;
object24.IconComponent = ChannelNotificationIcon;
object24.onPress = onPress_109980;
object24.disableColor = true;
Reflect.apply(push, buttons, [object24]);
items2.push(object22);
return items2;
}
function _fun109982(a0) { // fn#109982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4479, offset: 0x023645ba, size: 97 bytes, params: 2, frame: 18
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<Group hasIcons key={a0.sectionKey}>
{a0.buttons.map(_fun109983)}
</Group>
);
}
function ThreadLongPressActionSheetConnectedOnPress() { // fn#109985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5029, owner: ThreadLongPressActionSheetConnected.onPress, offset: 0x023646e8, size: 80 bytes, params: 1, frame: 14
onClose();
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
clipboardUtilsNativeModule.copy(channel.id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
}
function getActionSheetButtonsOnPress_109970() { // fn#109970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1836, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364320, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.leaveThread(channel, 'Context Menu');
}
function getActionSheetButtonsOnPress_109971() { // fn#109971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2028, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364354, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.joinThread(channel, 'Context Menu');
}
function getActionSheetButtonsOnPress_109972() { // fn#109972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2415, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364388, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.unarchiveThread(channel, false);
}
function getActionSheetButtonsOnPress_109973() { // fn#109973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2596, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643b8, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.archiveThread(channel, false);
}
function getActionSheetButtonsOnPress_109974() { // fn#109974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2807, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643e8, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.unlockThread(channel);
}
function getActionSheetButtonsOnPress_109975() { // fn#109975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2980, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364415, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.lockThread(channel);
}
function getActionSheetButtonsOnPress_109976() { // fn#109976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3157, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364442, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
const setSection = defaultImport.setSection;
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
Reflect.apply(setSection, defaultImport, [OVERVIEW]);
value = defaultImport;
value.open(channel.id);
}
function getActionSheetButtonsOnPress_109977() { // fn#109977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3331, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364492, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(12148) /* metro dependency 12148: ChannelActionSheetUtils */;
const copyGuildChannelOrThreadLink = value.copyGuildChannelOrThreadLink;
const channelBinding = channel;
Reflect.apply(copyGuildChannelOrThreadLink, value, [channelBinding.guild_id, channelBinding.id]);
}
function getActionSheetButtonsOnPress_109978() { // fn#109978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3602, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023644ca, size: 60 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.setNotificationSettings(channel, {muted: !isMuted});
}
function getActionSheetButtonsOnPress_109979() { // fn#109979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3802, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364506, size: 135 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[24]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[26]);
value = value(dependencyMap[25], dependencyMap.paths);
const channelBinding = channel;
const value3 = 'muteSettings' + channelBinding.id;
const object2 = {};
object2.guildId = channelBinding.getGuildId();
object2.channelId = channelBinding.id;
Reflect.apply(openLazy, defaultImport, [value, value3, object2]);
}
function getActionSheetButtonsOnPress_109980() { // fn#109980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4027, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x0236458d, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(11243) /* metro dependency 11243: threadActionSheets */;
value.showThreadNotificationsBottomSheet(channel);
}
function _fun109983({label, IconComponent, trailing, isDestructive, disableColor, onPress}, a1) { // fn#109983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4551, offset: 0x0236461b, size: 179 bytes, params: 3, frame: 22
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const r7 = isDestructive ? 'danger' : 'default';
const ActionSheetRow2 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Icon = ActionSheetRow2.Icon;
return (
<ActionSheetRow
label={label}
variant={r7}
icon={<Icon IconComponent={IconComponent} disableColor={disableColor} />}
trailing={trailing}
onPress={function() {
onClose();
onPress();
}}
key={a1}
/>
);
}
@@ -0,0 +1,50 @@
/* Metro module 11244; source: modules/threads/native/components/ThreadNotificationSettingsBottomSheet.tsx; dependencies: [1243, 33, 10914, 6805, 6758, 1244, 7988, 7153, 7987, 2] */
function _fun85961(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:6, offset: 0x01f82b9a, size: 145 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1243) /* metro dependency 1243: ThreadConstants */).getThreadNotificationOptions;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadNotificationSettingsBottomSheet.tsx');
exports.default = ThreadNotificationsBottomSheet;
}
function ThreadNotificationsBottomSheet({channel}) { // fn#85962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:268, offset: 0x01f82c2b, size: 293 bytes, params: 2, frame: 24
const value2 = (require(10914) /* metro dependency 10914: ThreadNotificationSettings */).useThreadNotificationSetting(channel);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)} />;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<ActionSheet {...object2}>
<TableRadioGroup
hasIcons={false}
value={value2}
onChange={onChange_85963}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)}
>
{getThreadNotificationOptions().map(_fun85964)}
</TableRadioGroup>
</ActionSheet>
);
}
function ThreadNotificationsBottomSheetOnChange(a0) { // fn#85963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:549, owner: ThreadNotificationsBottomSheet.onChange, offset: 0x01f82d50, size: 55 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
return value.setNotificationSettings(channel, {flags: a0});
}
function _fun85964({setting, label}) { // fn#85964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:672, offset: 0x01f82d87, size: 90 bytes, params: 2, frame: 17
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={setting}
label={label}
key={'' + setting}
/>
);
}
@@ -0,0 +1,58 @@
/* Metro module 15014; source: modules/threads/native/components/ThreadParentMessage.tsx; dependencies: [31, 4833, 4814, 33, 8177, 566, 5278, 1230, 9773, 2] */
function _fun113494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:6, offset: 0x023fc6b5, size: 265 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
const env0_4 = (require(4833) /* metro dependency 4833: ReferencedMessageStore */).ReferencedMessageState;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
let value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
value = new value();
value.setOptions({'renderCodedLinks': false, 'renderGiftCode': false, 'renderActivityInstanceEmbed': false,
'renderActivityInviteEmbed': false, 'renderEmbeds': true, 'ignoreMentioned': true,
'inlineAttachmentMedia': true, 'inlineEmbedMedia': true, 'renderReactions': false, 'renderReplies': true,
'renderThreadEmbeds': false});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadParentMessage.tsx');
exports.ThreadChannelStarterMessage = ThreadChannelStarterMessage;
exports.ThreadCreationStarterMessage = ThreadCreationStarterMessage;
}
function ThreadChannelStarterMessage({guildId, messageId, channelId}) { // fn#113495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:559, offset: 0x023fc7be, size: 224 bytes, params: 2, frame: 19
var r0;
var PressableOpacity;
var ChatItem;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [ReferencedMessageStore];
let message = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return ReferencedMessageStore.getMessage(channelId, messageId);
}]);
const state = message?.state;
const LOADED = ReferencedMessageState.LOADED;
if (state !== LOADED) {
r0 = null;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {accessibilityRole: 'button', onPress: onPress_113497};
ChatItem = importDefault(9773) /* metro dependency 9773: ChatItem */;
message = message.message;
r0 = <PressableOpacity {...object}><ChatItem rowGenerator={env0_7} message={message} /></PressableOpacity>;
}
return r0;
}
function ThreadCreationStarterMessage({messageId, channelId}) { // fn#113498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:933, offset: 0x023fc8f5, size: 134 bytes, params: 2, frame: 17
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], function() {
return MessageStore.getMessage(channelId, messageId);
});
return message == null ? null : ((Component) => <Component rowGenerator={env0_7} message={message} />)(importDefault(9773) /* metro dependency 9773: ChatItem */);
}
function ThreadChannelStarterMessageOnPress() { // fn#113497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:805, owner: ThreadChannelStarterMessage.onPress, offset: 0x023fc8be, size: 55 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionToGuild(guildId, channelId, messageId);
}
@@ -0,0 +1,323 @@
/* Metro module 15095; source: modules/threads/native/components/redesign/ThreadList.tsx; dependencies: [31, 27, 33, 4501, 4573, 15096, 4017, 4508, 4577, 4581, 12057, 1388, 1390, 1244, 6238, 7975, 11757, 15098, 15099, 8416, 2] */
function _fun114198(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:6, offset: 0x024173df, size: 439 bytes, params: 8, frame: 20
const env0_0 = require;
const keyExtractor_114201 = function(a0) {
var type = a0.type;
if (type === 'section') {
return a0.title;
}
if (type === 'thread') {
return a0.threadId;
}
};
const getThreadListStateKey = function(a0) {
return a0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'flexGrow': 1}, center: {'justifyContent': 'center', 'alignItems': 'center'}, header: {'marginTop': 24,
'marginBottom': 10}, footer: {'marginVertical': 16, 'justifyContent': 'center', 'alignItems': 'center'},
section: {'marginTop': 16, 'marginBottom': 8}});
const Set = global.Set;
const set = new Set();
object = {code: "function ThreadListTsx1(){const{withSpring,opacity,springStandard,state,TransitionStates,runOnJS,cleanUp}=this.__closure;return{opacity:withSpring(opacity.get(),springStandard,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}})};}"};
object = {code: 'function ThreadListTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
object = {LIST: 'list', EMPTY: 'empty', LOADING: 'loading'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadList.tsx');
exports.default = ThreadList;
}
function ThreadListSection({title}) { // fn#114199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:421, offset: 0x02417596, size: 98 bytes, params: 2, frame: 16
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.section}
accessibilityRole="header"
variant="text-xs/bold"
color="text-default"
>
{title.toUpperCase()}
</Text>
);
}
function renderItem_114200({item}) { // fn#114200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:606, offset: 0x024175f8, size: 142 bytes, params: 2, frame: 15
const type = item.type;
if (type === 'section') {
return <ThreadListSection title={item.title} />;
}
if (type === 'thread') {
return ((Component) => <Component threadId={item.threadId} onPress={item.onPress} start={item.start} end={item.end} />)(importDefault(15096) /* metro dependency 15096: ThreadListTableRow */);
}
}
function EnterExitCrossFadeContainer({contentContainerStyle, cleanUp, state, children}) { // fn#114202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1389, offset: 0x024176b1, size: 396 bytes, params: 2, frame: 26
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [state !== MOUNTED ? 0 : 1]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
const closure = EnterExitCrossFadeContainerP;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.opacity = value4;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object2.state = state;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 5037750127944;
closure.__initData = env0_9;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
env0_3.useEffect(_fun114205, [value4, state]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[StyleSheet.absoluteFill, value5]}>
<View style={contentContainerStyle}>
{children}
</View>
</View2>
);
}
function ThreadList({channel, onThreadPress, onCreateThreadPress, contentContainerStyle}) { // fn#114207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2528, offset: 0x024179b0, size: 525 bytes, params: 2, frame: 30
const styles = useStyles();
const env0_3 = styles;
const {joinedThreadIds,
unjoinedThreadIds} = (require(12057) /* metro dependency 12057: ThreadBrowserHooks */).useActiveThreads(channel);
const threadBrowserHooksModule = require(12057) /* metro dependency 12057: ThreadBrowserHooks */;
const useArchivedThreads = threadBrowserHooksModule.useArchivedThreads;
const ThreadSortOrder = (require(1388) /* metro dependency 1388: ThreadSortOrder */).ThreadSortOrder;
const LATEST_ACTIVITY = ThreadSortOrder.LATEST_ACTIVITY;
const binding = env0_8;
const ThreadSearchTagSetting = (require(1390) /* metro dependency 1390: ThreadSearchTagSetting */).ThreadSearchTagSetting;
const MATCH_SOME = ThreadSearchTagSetting.MATCH_SOME;
const {threadIds, canLoadMore, loadMore, loading} = Reflect.apply(useArchivedThreads, threadBrowserHooksModule,
[channel, LATEST_ACTIVITY, binding, MATCH_SOME]);
const value4 = env0_3.useCallback(function() {
if (!loading && canLoadMore) {
loadMore();
}
}, [loading, canLoadMore, loadMore]);
const value5 = env0_3.useMemo(_fun114209, [threadIds, joinedThreadIds, onThreadPress, unjoinedThreadIds]);
const value6 = env0_3.useMemo(_fun114213, [value5.length, loading]);
const value8 = env0_3.useCallback(_fun114215, [contentContainerStyle, value5, loading, onCreateThreadPress, value4,
styles.center, styles.container, styles.header, styles.footer, env0_3.useMemo(_fun114214,
[onCreateThreadPress])]);
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={value6}
renderItem={value8}
getItemKey={getThreadListStateKey}
/>
);
}
function EnterExitCrossFadeContainerP() { // fn#114203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1586, owner: EnterExitCrossFadeContainer.p, offset: 0x0241783d, size: 195 bytes, params: 1, frame: 24
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = env0_2.get();
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = pT_114204;
const object = {};
object.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.cleanUp = cleanUp;
closure.__closure = object;
closure.__workletHash = 2519144051135;
closure.__initData = env1_10;
return {opacity: Reflect.apply(withSpring, springModule, [value3, springStandard, 'respect-motion-settings',
closure])};
}
function _fun114205() { // fn#114205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2158, offset: 0x0241796b, size: 69 bytes, params: 1, frame: 14
const binding = env0_2;
const set = binding.set;
const stateBinding = state;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED ? 1 : 0]);
}
function _fun114209() { // fn#114209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2937, offset: 0x02417bdf, size: 401 bytes, params: 1, frame: 21
var environment;
var push;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var fcXlhe;
var value3;
var GHY7yQ;
var value4;
const items2 = [];
if (joinedThreadIds.length > 0) {
push = items2.push;
value2 = environment.__proto__;
formatToPlainString = intl.formatToPlainString;
fcXlhe = t.fcXlhe;
joinedThreadIdsBinding = joinedThreadIds;
Reflect.apply(push, items2, [{type: 'section', title: Reflect.apply(formatToPlainString, intl, [fcXlhe,
{count: joinedThreadIdsBinding.length}])}]);
joinedThreadIdsBinding.forEach(_fun114210);
}
if (unjoinedThreadIds.length > 0) {
push = items2.push;
value3 = environment.__proto__;
formatToPlainString = intl.formatToPlainString;
GHY7yQ = t.GHY7yQ;
unjoinedThreadIdsBinding = unjoinedThreadIds;
Reflect.apply(push, items2, [{type: 'section', title: Reflect.apply(formatToPlainString, intl, [GHY7yQ,
{count: unjoinedThreadIdsBinding.length}])}]);
unjoinedThreadIdsBinding.forEach(_fun114211);
}
if (threadIds.length > 0) {
push = items2.push;
value4 = environment.__proto__;
Reflect.apply(push, items2, [{type: 'section', title: intl.string(t.XsgrjS)}]);
threadIds.forEach(_fun114212);
}
return items2;
}
function _fun114213() { // fn#114213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3589, offset: 0x02417e6f, size: 115 bytes, params: 1, frame: 3
return loading && env0_11.length === 0 ? [env1_11.LOADING] : env0_11.length === 0 ? [env1_11.EMPTY] : [env1_11.LIST];
}
function _fun114214() { // fn#114214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3681, offset: 0x02417ee2, size: 202 bytes, params: 1, frame: 21
var r0;
var value3;
var TableRow;
var object;
var intl;
const onCreateThreadPressBinding = onCreateThreadPress;
const value2 = null;
if (value2 != onCreateThreadPressBinding) {
value3 = environment.__proto__;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {'icon': null, 'onPress': null, 'label': null, 'start': true, 'end': true, 'arrow': true,
icon: ((Icon) => <Icon IconComponent={(require(11757) /* metro dependency 11757: ThreadPlusIcon */).ThreadPlusIcon} />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon),
onPress: onCreateThreadPress};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rBIGBL);
r0 = <TableRow {...tableRowProps} />;
} else {
r0 = value2;
}
return r0;
}
function _fun114215(a0, a1, a2, a3) { // fn#114215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3897, offset: 0x02417fac, size: 544 bytes, params: 5, frame: 27
var object2;
var stylesBinding;
var value3;
var AnimatedFlashList;
var intl;
const value = environment.__proto__;
const EMPTY = env1_11.EMPTY;
if (EMPTY === a1) {
return (
<EnterExitCrossFadeContainer
contentContainerStyle={styles.container}
state={a2}
cleanUp={a3}
key={a0}
>
{((Component) => <Component onCreateThreadPress={onCreateThreadPress} />)(importDefault(15098) /* metro dependency 15098: ThreadListEmpty */)}
</EnterExitCrossFadeContainer>
);
}
const LOADING = env1_11.LOADING;
if (LOADING === a1) {
stylesBinding = styles;
return (
<EnterExitCrossFadeContainer
contentContainerStyle={[stylesBinding.container, stylesBinding.center]}
state={a2}
cleanUp={a3}
key={a0}
>
{((Component) => <Component />)(importDefault(15099) /* metro dependency 15099: ThreadListLoadingIndicator */)}
</EnterExitCrossFadeContainer>
);
}
const LIST = env1_11.LIST;
if (LIST === a1) {
object2 = {};
stylesBinding = styles;
object2.contentContainerStyle = stylesBinding.container;
object2.state = a2;
object2.cleanUp = a3;
value3 = undefined;
AnimatedFlashList = (require(8416) /* metro dependency 8416: flashList */).AnimatedFlashList;
var animatedFlashListProps = {data: env0_11, ListHeaderComponent: env0_12,
ListHeaderComponentStyle: stylesBinding.header, renderItem: renderItem_114200,
keyExtractor: keyExtractor_114201, onEndReached: env0_10, onEndReachedThreshold: 0.4};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
animatedFlashListProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B2panI);
animatedFlashListProps.estimatedItemSize = 64;
animatedFlashListProps.ListFooterComponent = loading ? importDefault(15099) /* metro dependency 15099: ThreadListLoadingIndicator */ : value3;
animatedFlashListProps.ListFooterComponentStyle = loading ? styles.footer : value3;
animatedFlashListProps.contentContainerStyle = contentContainerStyle;
return (
<EnterExitCrossFadeContainer {...object2} key={a0}>
<AnimatedFlashList {...animatedFlashListProps} />
</EnterExitCrossFadeContainer>
);
}
}
function pT_114204(a0) { // fn#114204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1685, owner: EnterExitCrossFadeContainer.p.t, offset: 0x02417900, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun114210(a0, a1) { // fn#114210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3083, offset: 0x02417d70, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === joinedThreadIds.length - 1,
onPress: onThreadPress});
}
function _fun114211(a0, a1) { // fn#114211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3294, offset: 0x02417dc5, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === unjoinedThreadIds.length - 1,
onPress: onThreadPress});
}
function _fun114212(a0, a1) { // fn#114212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3475, offset: 0x02417e1a, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === threadIds.length - 1,
onPress: onThreadPress});
}
@@ -0,0 +1,60 @@
/* Metro module 15098; source: modules/threads/native/components/redesign/ThreadListEmpty.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11758, 4573, 1244, 4578, 2] */
function _fun114240(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15295:6, offset: 0x0241910a, size: 325 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object.backgroundColor = BACKGROUND_MOD_SUBTLE;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.padding = 12;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {'flex': 1, 'justifyContent': 'center',
'alignItems': 'center'}, iconWrapper: object, title: {'textAlign': 'center', 'marginTop': 16,
'marginHorizontal': 16}, subtext: {'textAlign': 'center', 'marginTop': 4, 'marginHorizontal': 16,
'marginBottom': 16}}]);
value = value.memo(_fun114241);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListEmpty.tsx');
exports.default = value;
}
function _fun114241({onCreateThreadPress}) { // fn#114241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15295:495, offset: 0x0241924f, size: 477 bytes, params: 2, frame: 27
var r5;
var Button;
var object6;
const styles = useStyles();
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11758) /* metro dependency 11758 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
iconProps.size = MEDIUM;
const items2 = [<View style={styles.iconWrapper}><Icon {...iconProps} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HgTQ8p = (require(1244) /* metro dependency 1244: indexNative */).t.HgTQ8p;
items2[1] = <Text style={styles.title} accessibilityRole="header" maxFontSizeMultiplier={2} variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [HgTQ8p])}</Text>;
items2[2] = <Text style={styles.subtext} maxFontSizeMultiplier={2} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jmq9GC)}</Text>;
const value3 = onCreateThreadPress != null;
if (value3) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = <Button onPress={onCreateThreadPress} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rBIGBL)} />;
} else {
r5 = value3;
}
items2[3] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
}
@@ -0,0 +1,18 @@
/* Metro module 15099; source: modules/threads/native/components/redesign/ThreadListLoadingIndicator.tsx; dependencies: [31, 33, 4501, 10686, 2] */
function _fun114242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15296:6, offset: 0x0241942c, size: 191 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({spinner: {'width': 32,
'height': 32}});
value = value.memo(_fun114243);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListLoadingIndicator.tsx');
exports.default = value;
}
function _fun114243() { // fn#114243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15296:185, offset: 0x024194eb, size: 64 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.spinner} animate />)(importDefault(10686) /* metro dependency 10686: MessageLoadingSpinner */);
}
@@ -0,0 +1,53 @@
/* Metro module 15096; source: modules/threads/native/components/redesign/ThreadListTableRow.tsx; dependencies: [31, 27, 1379, 33, 4501, 6238, 15097, 566, 2] */
function _fun114216(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:6, offset: 0x024181cc, size: 243 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({subLabel: {'maxWidth': '100%',
'marginTop': 2}});
value = value.memo(_fun114220);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListTableRow.tsx');
exports.default = value;
}
function ThreadListTableRow({thread, onPress, start, end}) { // fn#114217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:210, offset: 0x024182bf, size: 224 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = env0_2.useMemo(function() {
if (onPress != null) {
return _fun114219;
}
}, [onPress, thread.id]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const name = thread.name;
const ThreadSubtext = (require(15097) /* metro dependency 15097: ThreadBrowserRowSubtext */).ThreadSubtext;
return (
<TableRow
label={name}
subLabel={<View style={styles.subLabel}><ThreadSubtext thread={thread} /></View>}
onPress={value2}
start={start}
end={end}
arrow
/>
);
}
function _fun114220({threadId, onPress, start, end}) { // fn#114220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:510, offset: 0x024183d4, size: 129 bytes, params: 2, frame: 19
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadId);
});
return channel == null ? null : <ThreadListTableRow thread={channel} start={start} end={end} onPress={onPress} />;
}
function _fun114218() { // fn#114218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:297, offset: 0x0241839f, size: 28 bytes, params: 1, frame: 2
if (onPress != null) {
return function() {
return onPress(thread.id);
};
}
}
@@ -0,0 +1,23 @@
/* Metro module 14534; source: modules/threads/native/components/showThreadLongPressActionSheet.tsx; dependencies: [4080, 14535, 1962, 2] */
function _fun109959(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:6, offset: 0x023634da, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/showThreadLongPressActionSheet.tsx');
exports.default = showThreadLongPressActionSheet;
}
function showThreadLongPressActionSheet(a0) { // fn#109960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:204, offset: 0x02363541, size: 102 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ThreadLongPressActionSheet', {channelId: a0,
onClose: onClose_109961}]);
}
function showThreadLongPressActionSheetOnClose() { // fn#109961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:328, owner: showThreadLongPressActionSheet.onClose, offset: 0x023635a7, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('ThreadLongPressActionSheet');
}
@@ -0,0 +1,606 @@
/* Metro module 15011; source: modules/threads/native/components/thread_creation/CreateThreadView.tsx; dependencies: [5, 57, 31, 27, 4645, 7080, 661, 33, 4501, 697, 7876, 7165, 6771, 6789, 1585, 5463, 7704, 6684, 15012, 6808, 1244, 15014, 11789, 11525, 11959, 11285, 1485, 683, 4863, 1230, 11010, 15013, 4015, 2] */
function _fun113467(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:6, offset: 0x023fb089, size: 820 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_6 = value2.View;
const env0_7 = value2.ScrollView;
const env0_8 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const env0_9 = (require(7080) /* metro dependency 7080: SlowmodeStore */).SlowmodeType;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_10 = constantsModule.AbortCodes;
const env0_11 = constantsModule.AnalyticEvents;
const env0_12 = constantsModule.NOOP;
const value4 = require(33) /* metro dependency 33 */;
const env0_13 = value4.jsx;
const env0_14 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object2.containerContent = {flexGrow: 0};
object2.expander = {flex: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.border = {'height': 1, 'backgroundColor': null, 'alignSelf': 'stretch', 'marginBottom': 16,
backgroundColor: BORDER_SUBTLE};
object2.options = {marginHorizontal: 12};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.optionsInner = {paddingBottom: PX_16};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.optionPrivateThread = {paddingTop: PX_8};
const object3 = {};
let PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object3.width = PX_64;
PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object3.height = PX_64;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.marginBottom = PX_16;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object3.justifyContent = 'center';
object3.alignItems = 'center';
object2.threadIconContainer = object3;
const object4 = {};
object4.borderBottomWidth = StyleSheet.hairlineWidth;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.paddingVertical = PX_4;
object4.justifyContent = 'flex-end';
object4.flexDirection = 'row';
const CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
object4.borderColor = CHAT_BORDER;
object2.typingWrapper = object4;
object2.parentMessageContainer = {marginBottom: 16};
const env0_15 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(_fun113478);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/thread_creation/CreateThreadView.tsx');
exports.CreateThreadView = value;
}
function CreateThreadViewInner({threadSettingsDraft, parentChannel, screenIndex}) { // fn#113468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:1187, offset: 0x023fb3bd, size: 1409 bytes, params: 2, frame: 55
var r29;
var TableSwitchRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const value2 = (require(7876) /* metro dependency 7876: ThreadCreationHooks */).usePrivateThreadMode(parentChannel);
env0_5.useEffect(function() {
return _fun113470;
}, [parentChannel.id]);
const value5 = env0_4(env0_5.useState(null), 2);
const property = value5[0];
const value6 = useSubmitForm({parentChannel: parentChannel, threadSettingsDraft: threadSettingsDraft,
privateThreadMode: value2, setNameError: value5[1]});
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const CREATE_THREAD = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CREATE_THREAD;
const analyticsLocations = defaultImport(CREATE_THREAD).analyticsLocations;
const value7 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({'isKeyboardAwareOnAndroid': false,
'includeKeyboardHeight': true}).insets;
const isForumLikeChannel2 = parentChannel.isForumLikeChannel();
const value8 = env0_5.useRef(null);
const value9 = env0_5.useRef(null);
const value10 = threadSettingsDraft.parentMessageId != null;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const value11 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const items2 = [styles.container];
items2[1] = {marginBottom: insets.bottom - value7.bottom};
const items3 = [<View style={styles.expander} />];
const ThreadIcon = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
const items4 = [<View style={styles.threadIconContainer}><ThreadIcon size="lg" /></View>];
items4[1] = ((Component) => <Component ref={value9} chatInputRef={value8} threadSettingsDraft={threadSettingsDraft} threadNameError={property} optional={value10} />)(importDefault(15012) /* metro dependency 15012: ThreadCreationTitleInput */);
if (isForumLikeChannel2) {
r29 = null;
} else if (threadSettingsDraft.parentMessageId != null) {
r29 = null;
} else if (value2 === (require(7876) /* metro dependency 7876: ThreadCreationHooks */).PrivateThreadMode.Disabled) {
r29 = null;
} else {
var viewBinding6Props = {style: styles.optionPrivateThread};
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
r29 = <View {...viewBinding6Props}><TableSwitchRow start end disabled={value2 !== (require(7876) /* metro dependency 7876: ThreadCreationHooks */).PrivateThreadMode.Enabled} label={intl.string(t.F1zyvU)} subLabel={intl.string(t.Wy5RIQ)} value={(require(7876) /* metro dependency 7876: ThreadCreationHooks */).getIsPrivate(threadSettingsDraft,
value2)} onValueChange={onValueChange_113477} /></View>;
}
items4[2] = r29;
items3[1] = <ScrollView style={styles.containerContent}><View style={styles.options}><View style={styles.optionsInner}>{items4}</View>{threadSettingsDraft.parentMessageId != null ? <View style={styles.parentMessageContainer}><View style={styles.border} />{((ThreadCreationStarterMessage) => <ThreadCreationStarterMessage channelId={parentChannel.id} messageId={threadSettingsDraft.parentMessageId} />)((require(15014) /* metro dependency 15014: ThreadParentMessage */).ThreadCreationStarterMessage)}</View> : null}</View></ScrollView>;
items3[2] = parentChannel.rateLimitPerUser > 0 ? <View style={styles.typingWrapper}>{((Component) => <Component channel={parentChannel} hasTypingText={false} slowmodeType={SlowmodeType.CreateThread} />)(importDefault(11789) /* metro dependency 11789: SlowModeIndicator */)}</View> : null;
items3[3] = ((Component) => <Component ref={value8} channel={parentChannel} onJumpToPresent={NOOP} screenIndex={screenIndex} secondaryTextFieldRef={value9} threadCreationCallback={value6} />)(importDefault(11525) /* metro dependency 11525: ChatInput */);
items3[4] = ((Component) => <Component channelId={parentChannel.id} />)(importDefault(11959) /* metro dependency 11959: ChannelSafeAreaBottomAndroid */);
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{value11}
<View style={items2}>
{items3}
</View>
</AnalyticsLocationProvider>
);
}
function _fun113478({channelId, screenIndex}) { // fn#113478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:4815, offset: 0x023fbf22, size: 98 bytes, params: 2, frame: 17
const value2 = (importDefault(11285) /* metro dependency 11285: useCreateThreadViewProps */)(channelId);
return value2 == null ? null : <CreateThreadViewInner parentChannel={value2.parentChannel} screenIndex={screenIndex} threadSettingsDraft={value2.threadSettingsDraft} />;
}
function _fun113469() { // fn#113469, offset: 0x023fb93e, size: 11 bytes, params: 1, frame: 1
return function() {
var defaultImport = importDefault(dependencyMap[11]);
var parentChannelBinding = parentChannel;
defaultImport.clearDraft(parentChannelBinding.id, DraftType.ThreadSettings);
importDefault(dependencyMap[11]).clearDraft(parentChannelBinding.id, DraftType.FirstThreadMessage);
};
}
function useSubmitForm({parentChannel, threadSettingsDraft, privateThreadMode, setNameError}) { // fn#113471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:1488, owner: CreateThreadViewInner.useSubmitForm, offset: 0x023fb9aa, size: 330 bytes, params: 2, frame: 23
var environment;
const value = environment.__proto__;
const value2 = (require(1485) /* metro dependency 1485 */).useNavigation();
let binding = env1_5;
const env0_4 = binding.useRef(false);
const value3 = threadSettingsDraft.parentMessageId == null;
binding = env1_5;
const useCallback = binding.useCallback;
return env1_5.useCallback(_fun113473(), [setNameError, threadSettingsDraft.parentMessageId,
threadSettingsDraft.name,
(importDefault(11010) /* metro dependency 11010: useCreateThread */)({parentChannel: parentChannel,
parentMessageId: threadSettingsDraft.parentMessageId, threadSettings: threadSettingsDraft,
privateThreadMode: privateThreadMode, location: threadSettingsDraft.location ?? '(unknown)',
onThreadCreated: Reflect.apply(useCallback, binding, [_fun113472, [value3, value2, threadSettingsDraft.location,
threadSettingsDraft.parentMessageId, parentChannel]]), useDefaultThreadName: true}), parentChannel]);
}
function CreateThreadViewInnerOnValueChange(a0) { // fn#113477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:4239, owner: CreateThreadViewInner.onValueChange, offset: 0x023fbedc, size: 70 bytes, params: 2, frame: 14
var value;
const parentChannelId = threadSettingsDraft.parentChannelId;
if (parentChannelId != null) {
value = environment.__proto__;
value = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
value.changeThreadSettings(parentChannelId, {isPrivate: a0});
}
}
function _fun113472(a0) { // fn#113472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:1678, offset: 0x023fbaf4, size: 367 bytes, params: 2, frame: 22
var guild_id;
var r12;
var value2;
var value3;
var defaultImport;
var track;
var MESSAGE_SHORTCUT_ACTION_SENT;
var object2;
var parentChannelBinding;
var moduleValue;
var collectGuildAnalyticsMetadata;
var value4;
var moduleValue2;
var value;
if (threadSettingsDraft.location === 'Message Shortcut') {
value2 = environment.__proto__.__proto__;
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
MESSAGE_SHORTCUT_ACTION_SENT = AnalyticEvents.MESSAGE_SHORTCUT_ACTION_SENT;
object2 = {};
parentChannelBinding = parentChannel;
object2.channel_id = parentChannelBinding.id;
guild_id = parentChannelBinding == null ? value3 : parentChannel.guild_id;
object2.guild_id = guild_id;
object2.original_message_id = threadSettingsDraft.parentMessageId;
object2.action = 'thread';
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
collectGuildAnalyticsMetadata = moduleValue.collectGuildAnalyticsMetadata;
value4 = parentChannel == null;
if (value4) {
guild_id = value3;
r12 = value4;
} else {
parentChannelBinding = parentChannel;
guild_id = parentChannelBinding.guild_id;
r12 = parentChannelBinding;
}
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, moduleValue, [guild_id]), r12);
moduleValue2 = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadata(parentChannel), r12);
Reflect.apply(track, defaultImport, [MESSAGE_SHORTCUT_ACTION_SENT, object2]);
}
if (env0_3 != null) {
env0_3.navigate({'name': 'channel', 'key': 'new-thread', 'params': null, 'merge': true,
params: {guildId: a0.guild_id, channelId: a0.id, showCreateThread: false}});
} else if (result) {
value = environment.__proto__.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionToGuild(a0.guild_id, a0.id);
}
}
function _fun113473() { // fn#113473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:2406, offset: 0x023fbc63, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun113475);
return _fun113476;
}
function* _fun113475(a0, a1) { // fn#113475, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15208:2426, offset: 0x023fbc92, size: 586 bytes, params: 3, frame: 24
var code;
var name;
var r4;
var parentChannelBinding;
var parentMessageId;
var value4;
var value5;
var trim;
var value6;
var value7;
var binding;
var value8;
var value9;
var value10;
var value11;
var binding2;
var property;
var value12;
var saveDraft;
var threadSettingsDraftBinding;
var id;
var FirstThreadMessage;
var value13;
var binding3;
var binding4;
var value14;
var makeEmptyTitleError;
var emptyTitleError;
var value15;
var dismissKeyboard;
var error;
var body;
var value16;
var AUTOMOD_TITLE_BLOCKED;
var INVALID_FORM_BODY;
var value17;
var errors;
var value18;
var binding5;
var binding6;
var value19;
var makeApiNameRequiredError;
var value20;
var binding7;
var binding8;
var value21;
var makeAutomodViolationError;
var value22;
let value = undefined;
if (true) {
value = undefined;
if (!env2_4.current) {
env2_4.current = true;
env2_2(null);
reducibleJoin4: while (true) {
reduciblePort66: while (true) {
exceptionLanding53: while (true) {
try {
parentChannelBinding = parentChannel;
} catch (error) {
break exceptionLanding53;
}
break reducibleJoin4;
}
body = error.body;
reducibleJoin55: while (true) {
if (body == null) {
code = value;
break reducibleJoin55;
}
code = body.code;
break reducibleJoin55;
}
value16 = environment.__proto__.__proto__.__proto__.__proto__;
AUTOMOD_TITLE_BLOCKED = env4_10.AUTOMOD_TITLE_BLOCKED;
if (code === AUTOMOD_TITLE_BLOCKED) {
binding = env2_2;
binding7 = env4_0;
binding8 = env4_2;
value21 = binding7(binding8[31]);
makeAutomodViolationError = value21.makeAutomodViolationError;
body = error.body;
binding(Reflect.apply(makeAutomodViolationError, value21, [body, threadSettingsDraft]));
value22 = binding7(binding8[32]);
dismissKeyboard = value22.dismissKeyboard;
Reflect.apply(dismissKeyboard, value22, []);
} else {
body = error.body;
reducibleJoin58: while (true) {
if (body == null) {
code = value;
break reducibleJoin58;
}
code = body.code;
break reducibleJoin58;
}
INVALID_FORM_BODY = env4_10.INVALID_FORM_BODY;
value17 = code === INVALID_FORM_BODY;
reducibleJoin63: while (true) {
if (value17) {
body = error.body;
reducibleJoin62: while (true) {
if (body == null) {
name = value;
break reducibleJoin62;
}
errors = body.errors;
if (errors == null) {
name = value;
break reducibleJoin62;
}
name = errors.name;
break reducibleJoin62;
}
value18 = name != null;
r4 = value18;
break reducibleJoin63;
}
r4 = value17;
break reducibleJoin63;
}
reducibleJoin66: while (true) {
if (r4) {
binding = env2_2;
binding5 = env4_0;
binding6 = env4_2;
value19 = binding5(binding6[31]);
makeApiNameRequiredError = value19.makeApiNameRequiredError;
binding(Reflect.apply(makeApiNameRequiredError, value19, []));
value20 = binding5(binding6[32]);
dismissKeyboard = value20.dismissKeyboard;
Reflect.apply(dismissKeyboard, value20, []);
break reducibleJoin66;
}
break reducibleJoin66;
}
}
break reduciblePort66;
}
env2_4.current = false;
return value;
}
try {
parentMessageId = parentChannelBinding.parentMessageId;
} catch (error) {
break exceptionLanding53;
}
try {
value4 = parentMessageId != null;
} catch (error) {
break exceptionLanding53;
}
reducibleJoin67: while (true) {
reducibleJoin19: while (true) {
if (!value4) {
try {
parentChannelBinding = parentChannel;
} catch (error) {
break exceptionLanding53;
}
try {
name = parentChannelBinding.name;
} catch (error) {
break exceptionLanding53;
}
try {
value5 = name == null;
} catch (error) {
break exceptionLanding53;
}
if (!value5) {
try {
parentChannelBinding = parentChannel;
} catch (error) {
break exceptionLanding53;
}
try {
name = parentChannelBinding.name;
} catch (error) {
break exceptionLanding53;
}
try {
trim = name.trim;
} catch (error) {
break exceptionLanding53;
}
try {
value6 = Reflect.apply(trim, name, []);
} catch (error) {
break exceptionLanding53;
}
try {
value7 = value6 === '';
} catch (error) {
break exceptionLanding53;
}
reducibleJoin34: while (true) {
if (value7) {
break reducibleJoin34;
}
try {
binding = env2_6;
} catch (error) {
break exceptionLanding53;
}
try {
value8 = binding(a0, a1);
} catch (error) {
break exceptionLanding53;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding53;
}
break reducibleJoin19;
}
}
try {
binding = env2_2;
} catch (error) {
break exceptionLanding53;
}
value13 = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding3 = env4_0;
} catch (error) {
break exceptionLanding53;
}
try {
binding4 = env4_2;
} catch (error) {
break exceptionLanding53;
}
try {
property = binding4[31];
} catch (error) {
break exceptionLanding53;
}
try {
value14 = binding3(property);
} catch (error) {
break exceptionLanding53;
}
try {
makeEmptyTitleError = value14.makeEmptyTitleError;
} catch (error) {
break exceptionLanding53;
}
try {
emptyTitleError = Reflect.apply(makeEmptyTitleError, value14, []);
} catch (error) {
break exceptionLanding53;
}
try {
binding(emptyTitleError);
} catch (error) {
break exceptionLanding53;
}
try {
property = binding4[32];
} catch (error) {
break exceptionLanding53;
}
try {
value15 = binding3(property);
} catch (error) {
break exceptionLanding53;
}
try {
dismissKeyboard = value15.dismissKeyboard;
} catch (error) {
break exceptionLanding53;
}
try {
Reflect.apply(dismissKeyboard, value15, []);
} catch (error) {
break exceptionLanding53;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding53;
}
try {
binding.current = false;
} catch (error) {
break exceptionLanding53;
}
return value;
}
try {
binding = env2_6;
} catch (error) {
break exceptionLanding53;
}
try {
value8 = binding(a0, a1);
} catch (error) {
break exceptionLanding53;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding53;
}
break reducibleJoin19;
}
if (value10) {
return value9;
}
value11 = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_1;
} catch (error) {
break exceptionLanding53;
}
try {
binding2 = env4_2;
} catch (error) {
break exceptionLanding53;
}
try {
property = binding2[11];
} catch (error) {
break exceptionLanding53;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding53;
}
try {
saveDraft = value12.saveDraft;
} catch (error) {
break exceptionLanding53;
}
try {
threadSettingsDraftBinding = threadSettingsDraft;
} catch (error) {
break exceptionLanding53;
}
try {
id = threadSettingsDraftBinding.id;
} catch (error) {
break exceptionLanding53;
}
try {
binding = env4_8;
} catch (error) {
break exceptionLanding53;
}
try {
FirstThreadMessage = binding.FirstThreadMessage;
} catch (error) {
break exceptionLanding53;
}
try {
Reflect.apply(saveDraft, value12, [id, '', FirstThreadMessage]);
} catch (error) {
break exceptionLanding53;
}
env2_4.current = false;
break reducibleJoin67;
}
}
}
return value;
}
@@ -0,0 +1,120 @@
/* Metro module 15012; source: modules/threads/native/components/thread_creation/ThreadCreationTitleInput.tsx; dependencies: [31, 1379, 661, 33, 15013, 7165, 7877, 566, 7876, 1244, 7981, 6619, 2] */
function _fun113479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:6, offset: 0x023fbf84, size: 201 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).MAX_CHANNEL_NAME_LENGTH;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(value.forwardRef(_fun113480));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/thread_creation/ThreadCreationTitleInput.tsx');
exports.default = value;
}
function _fun113480({chatInputRef, threadSettingsDraft, threadNameError, optional}, a1) { // fn#113480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:180, offset: 0x023fc04d, size: 675 bytes, params: 3, frame: 28
var r5;
var moduleValue3;
const env0_2 = a1;
const value3 = (require(15013) /* metro dependency 15013: FormError */).renderError(threadNameError,
{content: threadSettingsDraft.name});
const binding = env0_3;
const value4 = binding.useRef(threadSettingsDraft.name);
const value5 = binding.useCallback(_fun113481, [threadSettingsDraft.parentChannelId]);
const value6 = binding.useCallback(_fun113482, [threadSettingsDraft]);
const value7 = binding.useCallback(function() {
var current = chatInputRef.current;
if (current != null) {
current.focus();
}
}, [chatInputRef]);
binding.useEffect(_fun113484, [threadSettingsDraft.name, a1]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadSettingsDraft.parentChannelId);
});
const value8 = '';
if (channel != null) {
moduleValue3 = require(7876) /* metro dependency 7876: ThreadCreationHooks */;
r5 = moduleValue3.getDefaultThreadName(channel, threadSettingsDraft.parentMessageId);
} else {
r5 = value8;
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r13 = optional ? Reflect.apply(string, intl, [t.JPvIiL]) : Reflect.apply(string, intl, [t.j3XWjD]);
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInputProps = {defaultValue: (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4),
errorMessage: value3, label: r13, accessibilityLabel: r13,
accessibilityHint: optional ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/+VEZN']),
required: !optional, isClearable: true, autoFocus: true, maxLength: MAX_CHANNEL_NAME_LENGTH,
onSubmitEditing: value7, onBlur: value6, onChange: value5};
r5 = value8 === r5 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Nb2/RE']) : r5;
textInputProps.placeholder = r5;
textInputProps.ref = a1;
textInputProps.returnKeyType = 'next';
textInputProps.textContentType = 'none';
return <TextInput {...textInputProps} />;
}
function _fun113481(a0) { // fn#113481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:346, offset: 0x023fc2f0, size: 109 bytes, params: 2, frame: 19
var value2;
var defaultImport;
var changeThreadSettings;
var object2;
let parentChannelId = threadSettingsDraft.parentChannelId;
if (parentChannelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
changeThreadSettings = defaultImport.changeThreadSettings;
parentChannelId = threadSettingsDraft.parentChannelId;
object2 = {};
object2.name = (importDefault(7877) /* metro dependency 7877: sanitizeThreadName */)(a0, false);
Reflect.apply(changeThreadSettings, defaultImport, [parentChannelId, object2]);
env0_3.current = a0;
}
}
function _fun113482() { // fn#113482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:498, offset: 0x023fc35d, size: 135 bytes, params: 1, frame: 16
var value2;
var defaultImport;
var value3;
var defaultImport2;
let name = threadSettingsDraft.name;
if (name != null) {
if (threadSettingsDraft.parentChannelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7877) /* metro dependency 7877: sanitizeThreadName */;
threadSettingsDraftBinding = threadSettingsDraft;
name = threadSettingsDraftBinding.name;
value3 = defaultImport(name, true);
name = threadSettingsDraftBinding.name;
if (value3 !== name) {
defaultImport2 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
defaultImport2.changeThreadSettings(threadSettingsDraft.parentChannelId, {name: value3});
}
}
}
}
function _fun113484() { // fn#113484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:726, offset: 0x023fc404, size: 104 bytes, params: 1, frame: 13
var r2;
var value4;
let current = env0_3.current;
let r1 = current !== threadSettingsDraft.name && threadSettingsDraft.name != null;
if (r1) {
value4 = require == null;
if (value4) {
r1 = value4;
r2 = undefined;
} else {
current = require.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.setText(threadSettingsDraft.name);
}
}
}