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,60 @@
/* Metro module 11345; source: modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx; dependencies: [6, 7, 661, 4878, 2] */
function _fun86743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:6, offset: 0x01f9e4a5, size: 188 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value = _fun86744();
const Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
value.seenChannelIds = set instanceof Object ? set : value2;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx');
exports.default = value;
}
function _fun86744() { // fn#86744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:143, offset: 0x01f9e561, size: 109 bytes, params: 1, frame: 15
return env0_3(ChannelLatestMessageLoadingStatsManager, [{key: 'start', value: function(a0) {
var object = {channelId: a0.channelId};
var Date = global.Date;
object.startMs = Date.now();
this.latestChannelMessagesLoad = object;
}}, {key: 'cancel', value: function() {
this.latestChannelMessagesLoad = undefined;
}}, {key: 'finish', value: value_86748}]);
}
function ChannelLatestMessageLoadingStatsManager(a0) { // fn#86745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:154, offset: 0x01f9e5ce, size: 36 bytes, params: 2, frame: 13
env1_2(this, ChannelLatestMessageLoadingStatsManager);
this.label = a0;
}
function value_86748(a0) { // fn#86748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:515, offset: 0x01f9e630, size: 204 bytes, params: 2, frame: 18
var value;
var seenChannelIds;
var value3;
var value4;
var moduleValue;
const latestChannelMessagesLoad = this.latestChannelMessagesLoad;
if (latestChannelMessagesLoad != null) {
if (latestChannelMessagesLoad.channelId === a0.channelId) {
value = global.Date.now();
value -= latestChannelMessagesLoad.startMs;
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
value3 = seenChannelIds.has(a0.channelId);
if (!value3) {
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
seenChannelIds.add(a0.channelId);
}
value4 = environment.__proto__;
moduleValue = require(4878) /* metro dependency 4878: Clickstream */;
moduleValue.trackClickstream(AnalyticEvents.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM,
{load_duration_ms: value,
were_messages_cached: a0.areMessagesCached, is_first_load: !value3});
this.latestChannelMessagesLoad = undefined;
}
}
}
@@ -0,0 +1,299 @@
/* Metro module 11317; source: modules/messages/native/ChatBanner.tsx; dependencies: [31, 27, 4257, 4605, 11318, 661, 33, 4501, 697, 11319, 11320, 566, 21, 1357, 683, 4863, 6609, 4573, 1244, 4578, 6860, 7153, 5278, 5097, 8222, 2] */
function _fun86326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:6, offset: 0x01f90ec2, size: 713 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const closure = OptInChannelBanner;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_7 = (require(11318) /* metro dependency 11318: ChatOverlayConstants */).ChatOverlays;
value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticsObjectTypes;
const env0_9 = value.AnalyticsObjects;
const env0_10 = value.AnalyticEvents;
const env0_11 = value.AnalyticsSections;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.threadBannerContainer = {'alignSelf': 'stretch', 'minHeight': 60, 'flexDirection': 'row',
'paddingHorizontal': 16, 'paddingVertical': 12, 'alignItems': 'center', 'flexGrow': 0, 'zIndex': 100,
backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.threadBannerTitle = {'flex': 1, 'lineHeight': 18};
object2.threadBannerButton = {'flexGrow': 0, 'paddingVertical': 7, 'paddingHorizontal': 16, 'marginLeft': 16};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.newMessageBar = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'center',
'alignItems': 'center', 'overflow': 'hidden', 'zIndex': 100, 'minHeight': 45, backgroundColor: BACKGROUND_BRAND};
object2.newMessageBarTextContainer = {'flex': 1, 'paddingLeft': 16, 'paddingVertical': 10};
object2.newMessageBarCloseButton = {paddingHorizontal: 12};
const object3 = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
'overflow': 'hidden', 'padding': 8, 'paddingLeft': 16, 'paddingRight': 16, 'zIndex': 100};
const CHAT_BANNER_BG = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BANNER_BG;
object3.backgroundColor = CHAT_BANNER_BG;
object3.borderBottomWidth = StyleSheet.hairlineWidth;
let CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
object3.borderBottomColor = CHAT_BORDER;
object2.optInChannelBannerContainer = object3;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.optInChannelBannerLegacyBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
const object4 = {};
object4.borderTopWidth = StyleSheet.hairlineWidth;
CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
object4.borderTopColor = CHAT_BORDER;
object2.topBorder = object4;
object2.optInChannelBannerText = {flex: 1};
object2.optInChannelBannerButtonContainer = {'flexShrink': 0, 'marginLeft': 8};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/ChatBanner.tsx');
exports.default = ChatBanner;
exports.OptInChannelBanner = closure;
}
function OptInChannelBanner({channel, topBorder}) { // fn#86327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1536, offset: 0x01f9118b, size: 439 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('OptInChannelBanner');
env0_3.useEffect(_fun86328, [channel]);
const value3 = env0_3.useCallback(_fun86329, [channel]);
const items2 = [styles.optInChannelBannerContainer];
items2[1] = value2 ? null : styles.optInChannelBannerLegacyBorder;
topBorder = topBorder ? styles.topBorder : null;
items2[2] = topBorder;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text lineClamp={2} style={styles.optInChannelBannerText} variant="text-sm/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iOWmmB)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={items2}>
{text}
<View style={styles.optInChannelBannerButtonContainer}>
<Button
onPress={value3}
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['TD/+zP'])}
/>
</View>
</View>
);
}
function ArchivedLockedThreadChatBanner({channel}) { // fn#86330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2542, offset: 0x01f914a8, size: 420 bytes, params: 2, frame: 27
const styles = useStyles();
env0_3.useEffect(_fun86331, [channel]);
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanUnarchiveThread(channel);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const isForumPost2 = channel.isForumPost();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.threadBannerContainer}>
<Text
lineClamp={4}
style={styles.threadBannerTitle}
variant="text-sm/medium"
color="text-default"
>
{isForumPost2 ? Reflect.apply(string, intl, [t['833FDn']]) : Reflect.apply(string, intl, [t.rEeodK])}
</Text>
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0dvvEi'])} onPress={onPress_86332} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
</View>
);
}
function LockedThreadChatBanner({channel}) { // fn#86333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3488, offset: 0x01f9178f, size: 420 bytes, params: 2, frame: 27
const styles = useStyles();
env0_3.useEffect(_fun86334, [channel]);
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsThreadModerator(channel);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const isForumPost2 = channel.isForumPost();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.threadBannerContainer}>
<Text
lineClamp={4}
style={styles.threadBannerTitle}
variant="text-sm/medium"
color="text-default"
>
{isForumPost2 ? Reflect.apply(string, intl, [t.E7oO8u]) : Reflect.apply(string, intl, [t['V/JF2N']])}
</Text>
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zA9d1J)} onPress={onPress_86335} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
</View>
);
}
function NewMessagesChatBar({channel, unreadCount, oldestUnreadTimestamp, handleScrollToNewMessages}) { // fn#86336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4413, offset: 0x01f919e4, size: 555 bytes, params: 2, frame: 36
var r23;
var r1;
var r0;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, fluxModule, [[GatewayConnectionStore], function() {
return GatewayConnectionStore.isConnected();
}, []])) {
if (unreadCount <= 0) {
r1 = null;
} else {
r23 = ReadStateStore.isEstimated(channel.id) ? t.wvtbbG : t['BctFH/'];
var viewBindingProps = {style: styles.newMessageBar};
items2 = [<PressableOpacity accessibilityRole="button" style={styles.newMessageBarTextContainer} onPress={handleScrollToNewMessages}>{((Text) => <Text variant="text-sm/semibold" color="always-white">{intl.format(r23,
{count: unreadCount,
timestamp: oldestUnreadTimestamp})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>];
items2[1] = <PressableOpacity style={styles.newMessageBarCloseButton} accessibilityRole="button" accessibilityLabel={intl.string(t.e6RscS)} onPress={function() {
return require(dependencyMap[23]).ack(channel.id, {section: AnalyticsSections.NEW_MESSAGES_BANNER,
object: AnalyticsObjects.MARK_CHANNEL_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL});
}}>{((XSmallBoldIcon) => <XSmallBoldIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(8222) /* metro dependency 8222: XSmallBoldIcon */).XSmallBoldIcon)}</PressableOpacity>;
r1 = <View {...viewBindingProps}>{items2}</View>;
}
r0 = r1;
} else {
r0 = null;
}
return r0;
}
function ChatBanner({channel, handleScrollToNewMessages}) { // fn#86339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5381, offset: 0x01f91c71, size: 330 bytes, params: 2, frame: 22
const value2 = (importDefault(11319) /* metro dependency 11319: useShowChannelOptInNotice */)(channel);
const value3 = (importDefault(11320) /* metro dependency 11320: useAllowedChatOverlays */)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ReadStateStore], _fun86340,
[channel.id]);
const unreadCount = value4.unreadCount;
return channel.isArchivedLockedThread() ? <ArchivedLockedThreadChatBanner channel={channel} /> : channel.isLockedThread() ? <LockedThreadChatBanner channel={channel} /> : unreadCount > 0 && value3.includes(ChatOverlays.NEW_MESSAGES) ? <NewMessagesChatBar unreadCount={unreadCount} oldestUnreadTimestamp={value4.oldestUnreadTimestamp} channel={channel} handleScrollToNewMessages={handleScrollToNewMessages} /> : value2 && value3.includes(ChatOverlays.OPT_IN_CHANNEL) ? <OptInChannelBanner channel={channel} /> : null;
}
function _fun86328() { // fn#86328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1645, offset: 0x01f91342, size: 143 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'channel_opt_in';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
}
function _fun86329() { // fn#86329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1854, offset: 0x01f913d1, size: 215 bytes, params: 1, frame: 24
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object2 = {};
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = appAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, appAnalyticsUtilsModule,
[Reflect.apply(getGuildId, channelBinding, [])]), undefined);
const moduleValue2 = appAnalyticsUtilsModule;
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadata(channelBinding), undefined);
object2['banner_type'] = 'channel_opt_in';
object2['cta_type'] = 'add channel';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
const optInChannelsActionCreatorsModule = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
const setOptInChannel = optInChannelsActionCreatorsModule.setOptInChannel;
const guild_id = channelBinding.guild_id;
const id = channelBinding.id;
const CHANNEL = AnalyticsSections.CHANNEL;
Reflect.apply(setOptInChannel, optInChannelsActionCreatorsModule, [guild_id, id, true, {section: CHANNEL}]);
}
function _fun86331() { // fn#86331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2618, offset: 0x01f9164c, size: 141 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'thread';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
}
function ArchivedLockedThreadChatBannerOnPress() { // fn#86332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3250, owner: ArchivedLockedThreadChatBanner.onPress, offset: 0x01f916d9, size: 182 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'thread';
object2['cta_type'] = 'unarchive';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unarchiveThread(channelBinding, false);
}
function LockedThreadChatBannerOnPress() { // fn#86335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4184, owner: LockedThreadChatBanner.onPress, offset: 0x01f91933, size: 177 bytes, params: 1, frame: 22
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object2 = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object2['banner_type'] = 'thread';
object2['cta_type'] = 'unlock';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unlockThread(channelBinding);
}
function _fun86340() { // fn#86340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5513, offset: 0x01f91dbb, size: 114 bytes, params: 1, frame: 15
var r1;
let value = environment.__proto__;
const getOldestUnreadTimestamp = ReadStateStore.getOldestUnreadTimestamp;
const channelBinding = channel;
const value3 = Reflect.apply(getOldestUnreadTimestamp, ReadStateStore, [channelBinding.id]);
const object2 = {};
object2.unreadCount = ReadStateStore.getUnreadCount(channelBinding.id);
if (value3 !== 0) {
r1 = value3;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(channel.id);
r1 = value;
}
object2.oldestUnreadTimestamp = r1;
return object2;
}
@@ -0,0 +1,667 @@
/* Metro module 11784; source: modules/messages/native/DMMessageStickerGreeting.tsx; dependencies: [5, 57, 31, 27, 6583, 4814, 1878, 33, 4501, 697, 3963, 3860, 4000, 3857, 11785, 11786, 7067, 1244, 566, 671, 3995, 11787, 11050, 4017, 4504, 1305, 11049, 4589, 5278, 10970, 4573, 4578, 2] */
function _fun90262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:6, offset: 0x020320b3, size: 339 bytes, params: 8, frame: 19
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 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = value.Fragment;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90263);
const GradientPercentage = (require(3963) /* metro dependency 3963: ClientThemesUtils */).GradientPercentage;
const env0_14 = GradientPercentage.END;
object = {code: "function DMMessageStickerGreetingTsx1(){const{styles,isRendered,hasInputText,hasMessages,HEIGHT_COMPACT,HEIGHT_FULL,withDelay,withTiming,STANDARD_EASING}=this.__closure;const gradientOverlayOffset=styles.gradient.height;const hasHeight=isRendered&&!hasInputText;const heightExpanded=(hasMessages?HEIGHT_COMPACT:HEIGHT_FULL)-1;const targetHeight=hasHeight?heightExpanded+gradientOverlayOffset:0;const targetMargin=hasHeight?-gradientOverlayOffset:0;const generateAnimationConfig=function(value){return withDelay(300,withTiming(value,{easing:STANDARD_EASING,duration:250}));};return{justifyContent:'flex-end',overflow:'hidden',marginTop:generateAnimationConfig(targetMargin),height:generateAnimationConfig(targetHeight)};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/DMMessageStickerGreeting.tsx');
exports.default = DMMessageStickerGreeting;
}
function _fun90263(a0) { // fn#90263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:235, offset: 0x02032206, size: 207 bytes, params: 2, frame: 15
const value = a0;
const object2 = {};
object2.container = {'backgroundColor': null, 'alignItems': 'center', 'paddingHorizontal': 16, 'paddingBottom': 16,
'paddingTop': 8,
backgroundColor: value ?? (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER};
object2.stickerContainer = {paddingBottom: 16};
const object3 = {'flexDirection': 'row', 'backgroundColor': null, 'justifyContent': 'center',
'alignItems': 'center', 'gap': 8, 'height': 48, 'paddingHorizontal': 16};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object2.toastContainer = object3;
object2.toastContent = {lineHeight: 20};
object2.gradient = {'position': 'absolute', 'right': 0, 'left': 0, 'top': 0, 'height': 30};
return object2;
}
function DMMessageStickerGreeting({channel, hasInputText}) { // fn#90264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:1610, offset: 0x020322d5, size: 1339 bytes, params: 2, frame: 38
var r0;
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var View2;
var object3;
var PressableOpacity;
var items3;
const clientThemesUtilsModule = require(3963) /* metro dependency 3963: ClientThemesUtils */;
const useGradientValue = clientThemesUtilsModule.useGradientValue;
const styles = useStyles(Reflect.apply(useGradientValue, clientThemesUtilsModule, [END]));
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], _fun90265);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value7 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.m0zYbV,
{username: (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y1Wu2f)});
const value8 = (require(11787) /* metro dependency 11787: useShowConvoStarterInDM */).useShowConvoStarterInDM(channel);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StickersStore], _fun90268,
[value8]);
undefined.useEffect(_fun90269, [value8]);
const value10 = useHandleWavePress(channel);
const {isRendered, setIsRendered} = useIsRendered();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = DMMessageStickerGreetingX;
object = {styles: styles, isRendered: isRendered, hasInputText: hasInputText, hasMessages: value3,
HEIGHT_COMPACT: 72, HEIGHT_FULL: 180};
object.withDelay = reanimatedRexportModule.withDelay;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object;
closure.__workletHash = 14002474476449;
closure.__initData = env0_15;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value14 = (require(3860) /* metro dependency 3860: useToken */).useToken(clientThemesUtilsModule.useGradientValue(END) ?? (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER);
object = [(require(4000) /* metro dependency 4000: ColorUtils */).hexWithOpacity(value14, 0), value14];
const value16 = (require(11049) /* metro dependency 11049: StickersHooks */).useShouldAnimateSticker(false);
if (value8) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object3 = {style: value12, onLayout: setIsRendered};
object = [((Component) => <Component style={styles.gradient} colors={object} />)(importDefault(4589) /* metro dependency 4589 */)];
var viewBindingProps = {style: styles.container};
if (value3) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps2 = {style: styles.toastContainer, accessibilityRole: 'button',
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJObYI),
onPress: value10};
items3 = [value9 != null ? ((Component) => <Component sticker={value9} size={24} animated={value16} />)(importDefault(10970) /* metro dependency 10970: Sticker */) : null];
items3[1] = ((Text) => <Text style={styles.toastContent} variant="text-md/bold">{value7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r9 = <PressableOpacity {...pressableOpacityProps2}>{items3}</PressableOpacity>;
} else {
r9 = <>{value9 != null ? <View style={styles.stickerContainer}>{((Component) => <Component sticker={value9} size={100} animated={value16} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}</View> : null}{((Button) => <Button text={value7} onPress={value10} shrink />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</>;
}
object[1] = <View {...viewBindingProps}>{r9}</View>;
r0 = <View2 {...object3}>{object}</View2>;
} else {
r0 = null;
}
return r0;
}
function _fun90265() { // fn#90265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:1751, offset: 0x02032810, size: 62 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = MessageStore.getMessages(channel.id);
return value.filter(function({type}) {
return type !== require(dependencyMap[19]).MessageTypes.FRIEND_REQUEST_ACCEPTED;
}).length > 0;
}
function _fun90268() { // fn#90268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2140, offset: 0x020328a6, size: 38 bytes, params: 1, frame: 12
var r0;
let value = null;
if (env0_4) {
value = environment.__proto__;
value = StickersStore.getStickerById('749054660769218631');
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun90269() { // fn#90269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2190, offset: 0x020328cc, size: 59 bytes, params: 1, frame: 13
var value;
if (env0_4) {
value = environment.__proto__;
value = require(11050) /* metro dependency 11050: StickersActionCreators */;
value.fetchStickerPack('847199849233514549', true);
}
}
function useHandleWavePress(a0) { // fn#90270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2264, owner: DMMessageStickerGreeting.useHandleWavePress, offset: 0x02032907, size: 179 bytes, params: 2, frame: 21
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const binding = env1_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [null]);
const binding2 = env1_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value4[0];
const env0_4 = value4[1];
binding.useEffect(_fun90271, [a0.id]);
return binding.useCallback(env1_3(_fun90273), [property2, property, a0.id]);
}
function useIsRendered() { // fn#90275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2848, owner: DMMessageStickerGreeting.useIsRendered, offset: 0x02032b60, size: 93 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__;
const binding = env1_5;
value = env1_4(binding.useState(false), 2);
const property = value[0];
const property2 = value[1];
const useCallback = binding.useCallback;
return {isRendered: property, setIsRendered: Reflect.apply(useCallback, binding, [_fun90276, [property2]])};
}
function DMMessageStickerGreetingX() { // fn#90277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:3053, owner: DMMessageStickerGreeting.x, offset: 0x02032bbd, size: 114 bytes, params: 1, frame: 14
var r3;
var value;
const height = styles.gradient.height;
const r5 = isRendered && !hasInputText;
const value3 = 0;
if (r5) {
value = 180;
value = (env0_3 ? 72 : value) - 1 + height;
r3 = value;
} else {
r3 = value3;
}
const closure = generateAnimationConfig;
const object2 = {'justifyContent': 'flex-end', 'overflow': 'hidden'};
object2.marginTop = closure(r5 ? -height : value3);
object2.height = closure(r3);
return object2;
}
function* _fun90273() { // fn#90273, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2441, offset: 0x020329c5, size: 316 bytes, params: 1, frame: 21
var environment;
var r4;
var binding;
var binding2;
var property;
var value4;
var trackWaveCtaClicked;
var object2;
var channelBinding;
var id;
var value5;
var sendGreetMessage;
var value6;
var value7;
var value8;
var error;
var ok;
var status;
var value9;
var binding3;
var intl;
var string;
var t;
var Whhv4w;
if (true) {
value = environment.__proto__;
if (!env1_3) {
env1_4(true);
var closure = showErrorToast;
if (hasInputText !== null) {
env1_4(false);
return closure(hasInputText);
}
try {
binding = env3_0;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
property = binding2[15];
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
trackWaveCtaClicked = value4.trackWaveCtaClicked;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
object2 = {};
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
channelBinding = channel;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
id = channelBinding.id;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
object2.channelId = id;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
object2.source = 'In-channel greet';
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
Reflect.apply(trackWaveCtaClicked, value4, [object2]);
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
binding = env3_1;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
property = binding2[16];
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
value5 = binding(property);
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
sendGreetMessage = value5.sendGreetMessage;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
id = channelBinding.id;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
try {
value6 = Reflect.apply(sendGreetMessage, value5, [id, '749054660769218631']);
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
ok = error.ok;
if (ok) {
r4 = ok;
} else {
status = error.status;
value9 = status !== 429;
r4 = value9;
}
if (!r4) {
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[17]).intl;
string = intl.string;
t = binding(binding3[17]).t;
Whhv4w = t.Whhv4w;
closure(Reflect.apply(string, intl, [Whhv4w]));
}
env1_4(false);
return undefined;
}
if (value8) {
return value7;
}
env1_4(false);
}
}
}
function generateAnimationConfig(a0) { // fn#90278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:3141, owner: DMMessageStickerGreeting.x.generateAnimationConfig, offset: 0x02032c2f, size: 103 bytes, params: 2, frame: 18
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = value.withDelay;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
return Reflect.apply(withDelay, value, [300, Reflect.apply(withTiming, timingModule, [a0, {easing: STANDARD_EASING,
duration: 250}])]);
}
function showErrorToast(a0) { // fn#90274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2485, offset: 0x02032b01, size: 95 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__;
if (hasInputText !== a0) {
styles(a0);
}
value = environment.__proto__.__proto__.__proto__.__proto__;
const binding = env4_1;
const binding2 = env4_2;
value = binding(binding2[13]);
value.open({key: 'HANDLE_WAVE_PRESS_TOAST', content: a0, icon: binding(binding2[14])});
}
@@ -0,0 +1,122 @@
/* Metro module 8216; source: modules/messages/native/MessageAccessibilityActions.tsx; dependencies: [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228, 2] */
function _fun65778(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:6, offset: 0x01bde2c0, size: 258 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageAccessibilityActions.tsx');
exports.MessageAccessibilityAction = {VIEW_PROFILE: 'view_profile', ADD_REACTION: 'add_reaction',
ADD_QUICK_REACTION: 'add_quick_reaction', REPLY: 'reply', MESSAGE_ACTIONS_MENU: 'message_actions_menu',
EDIT_GDM: 'edit_gdm'};
exports.getMessageAccessibilityActionFromLabel = getMessageAccessibilityActionFromLabel;
exports.createMessageAccessibilityActions = createMessageAccessibilityActions;
}
function getQuickReactionLabel() { // fn#65779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:352, offset: 0x01bde3c2, size: 307 bytes, params: 1, frame: 19
var r2;
const DoubleTapExpandExperiment = (require(8220) /* metro dependency 8220: DoubleTapExpandExperiment */).DoubleTapExpandExperiment;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = undefined;
const DoubleTapReactionEmoji = (require(3829) /* metro dependency 3829: UserSettings */).DoubleTapReactionEmoji;
const setting = DoubleTapReactionEmoji.getSetting();
const value4 = null;
if ((value4 == setting ? value2 : setting.disableDoubleTap) === true) {
return value4;
}
if (value4 == setting) {
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
{emojiName: 'heart'}) : value4;
} else {
var value5 = (require(8217) /* metro dependency 8217: DoubleTapToReactUtils */).disambiguatedEmojiFromSettingsValue(setting);
if (value4 != value5) {
return intl.formatToPlainString(t.eQIttH, {emojiName: value5.name});
}
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
{emojiName: 'heart'}) : value4;
}
return r2;
}
function getMessageAccessibilityActionFromLabel(a0) { // fn#65780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:988, offset: 0x01bde4f5, size: 334 bytes, params: 2, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = Reflect.apply(string, intl, [t.iXAna6]);
const binding = env0_5;
const VIEW_PROFILE = binding.VIEW_PROFILE;
object2[value2] = VIEW_PROFILE;
const value3 = intl.string(t.lfIHs4);
const ADD_REACTION = binding.ADD_REACTION;
object2[value3] = ADD_REACTION;
const value4 = intl.string(t['5IEsGx']);
const REPLY = binding.REPLY;
object2[value4] = REPLY;
string = intl.string;
const ChPNkN = t.ChPNkN;
const value5 = Reflect.apply(string, intl, [ChPNkN]);
const MESSAGE_ACTIONS_MENU = binding.MESSAGE_ACTIONS_MENU;
object2[value5] = MESSAGE_ACTIONS_MENU;
const value6 = intl.string(t['5Q9+/L']);
const EDIT_GDM = binding.EDIT_GDM;
object2[value6] = EDIT_GDM;
const quickReactionLabel = getQuickReactionLabel();
if (quickReactionLabel != null) {
object2[quickReactionLabel] = env0_5.ADD_QUICK_REACTION;
}
return object2[a0];
}
function createMessageAccessibilityActions(a0, a1) { // fn#65781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:1437, offset: 0x01bde643, size: 520 bytes, params: 3, frame: 21
var r2;
var push;
var quickReactionLabel;
if (a1 == null) {
return [];
}
let value = a1.getGuildId();
const value2 = value != null;
if (value2) {
value = GuildVerificationStore.canChatInGuild(value);
r2 = value;
} else {
r2 = value2;
}
r2 = r2 && PermissionStore.can(Permissions.ADD_REACTIONS, a1);
r2 = !r2 ? a1.isPrivate() : r2;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.label = Reflect.apply(string, intl, [t.iXAna6]);
const VIEW_PROFILE = env0_5.VIEW_PROFILE;
object2.name = VIEW_PROFILE;
const items2 = [object2];
if (r2) {
items2.push({label: intl.string(t.lfIHs4), name: env0_5.ADD_REACTION});
quickReactionLabel = getQuickReactionLabel();
if (quickReactionLabel != null) {
items2.push({label: quickReactionLabel, name: env0_5.ADD_QUICK_REACTION});
}
}
const canReplyToMessageModule = require(8228) /* metro dependency 8228: canReplyToMessage */;
if (canReplyToMessageModule.canReplyToMessage(a1, a0)) {
push = items2.push;
object2 = {};
object2.label = intl.string(t['5IEsGx']);
object2.name = env0_5.REPLY;
Reflect.apply(push, items2, [object2]);
}
push = items2.push;
string = intl.string;
const ChPNkN = t.ChPNkN;
const MESSAGE_ACTIONS_MENU = env0_5.MESSAGE_ACTIONS_MENU;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ChPNkN]), name: MESSAGE_ACTIONS_MENU}]);
return items2;
}
@@ -0,0 +1,80 @@
/* Metro module 11434; source: modules/messages/native/MessageGameIconActionSheet.tsx; dependencies: [31, 27, 4234, 661, 33, 4501, 477, 697, 566, 6275, 1305, 4573, 6766, 1244, 1948, 2] */
function _fun87512(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11620:6, offset: 0x01fc114c, size: 377 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object2.contentWrapper = {'paddingHorizontal': 24, 'paddingTop': 8,
paddingBottom: platformUtilsModule.isAndroid() ? 16 : value};
object2.gameDescriptionWrapper = {'flexDirection': 'column', 'justifyContent': 'flex-start', 'flex': 1};
const object4 = {'width': 56, 'height': 56, 'marginRight': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.gameIcon = object4;
object2.gameDescriptionWrapperOuter = {flexDirection: 'row'};
object2.timestamp = {marginBottom: 4};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageGameIconActionSheet.tsx');
exports.default = _default_87513;
}
function _default_87513({applicationId, messageTimestamp}) { // fn#87513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11620:542, offset: 0x01fc12c5, size: 627 bytes, params: 2, frame: 34
var r0;
var BottomSheet;
var Icon;
var object;
var items4;
var items2;
var TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var BPDKoA;
var defaultImport;
const styles = useStyles();
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
function() {
return ApplicationStore.getApplication(applicationId);
});
if (application == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
var viewBindingProps = {style: styles.contentWrapper};
var viewBindingProps2 = {style: styles.gameDescriptionWrapperOuter};
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {style: styles.gameIcon, resizeMode: 'contain'};
object = {};
object.uri = application?.getIconURL(56) ?? '';
iconProps.source = object;
iconProps.disableColor = true;
items4 = [<Icon {...iconProps} />];
var viewBinding2Props = {style: styles.gameDescriptionWrapper};
items2 = [((Text) => <Text style={styles.timestamp} variant="text-xs/medium" color="text-muted">{messageTimestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
format = intl.format;
items3 = [Reflect.apply(format, intl, [t.J3s8JP, {applicationName: application.name}]), ' '];
format = intl.format;
BPDKoA = t.BPDKoA;
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
items3[2] = Reflect.apply(format, intl, [BPDKoA,
{helpdeskArticle: defaultImport.getArticleURL(HelpdeskArticles.SOCIAL_LAYER_CONNECTIONS)}]);
items2[1] = <TextWithIOSLinkWorkaround variant="text-sm/medium">{items3}</TextWithIOSLinkWorkaround>;
items4[1] = <View {...viewBinding2Props}>{items2}</View>;
r0 = <BottomSheet startExpanded><View {...viewBindingProps}><View {...viewBindingProps2}>{items4}</View></View></BottomSheet>;
}
return r0;
}
@@ -0,0 +1,535 @@
/* Metro module 9854; source: modules/messages/native/MessageImpressionAnalyticsHelpers.tsx; dependencies: [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098, 2] */
function _fun77223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:6, offset: 0x01df5df5, size: 373 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_77226 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.ChannelTypes;
const env0_7 = constantsModule.GuildFeatures;
const env0_8 = constantsModule.InviteStates;
const env0_9 = constantsModule.MessageFlags;
const env0_10 = (require(7082) /* metro dependency 7082: MessageEmbedConstants */).LinkType;
const env0_11 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageImpressionAnalyticsHelpers.tsx');
exports.useShouldTrackAnnouncementMessageViews = useShouldTrackAnnouncementMessageViews;
exports.useShouldTrackRichPresenceInviteEmbedViews = useShouldTrackRichPresenceInviteEmbedViews;
exports.handleAnnouncementMessageViewTracking = handleAnnouncementMessageViewTracking;
exports.handleRichPresenceInviteEmbedViewTracking = handleRichPresenceInviteEmbedViewTracking;
exports.useShouldTrackOfficialMessageViews = useShouldTrackOfficialMessageViews;
exports.handleOfficialMessageViewTracking = handleOfficialMessageViewTracking;
exports.useShouldTrackVoiceInviteEmbedViews = useShouldTrackVoiceInviteEmbedViews;
exports.handleVoiceInviteEmbedViewTracking = handleVoiceInviteEmbedViewTracking;
}
function _createForOfIteratorHelperLoose_77224(a0, a1) { // fn#77224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:254, offset: 0x01df5f6a, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun77225;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_77226(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_77226(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_77226(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun77225;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function getVoiceInviteEmbedRenderInfo(a0) { // fn#77227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1164, offset: 0x01df60de, size: 340 bytes, params: 2, frame: 17
var r2;
var r0;
var moduleValue3;
var enabled;
let state = a0.state;
var value;
const RESOLVING = InviteStates.RESOLVING;
if (state === RESOLVING) {
return null;
}
state = a0.state;
const EXPIRED = InviteStates.EXPIRED;
if (state === EXPIRED) {
return null;
}
state = a0.state;
const BANNED = InviteStates.BANNED;
if (state === BANNED) {
return null;
}
state = a0.state;
const ERROR = InviteStates.ERROR;
if (state === ERROR) {
return null;
}
const value2 = undefined;
const inviteType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getInviteType(a0);
const GUILD = InviteTypes.GUILD;
if (inviteType !== GUILD) {
return null;
}
const guildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getGuildInviteExtendedType(a0);
const GuildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).GuildInviteExtendedType;
const VOICE_CHANNEL = GuildInviteExtendedType.VOICE_CHANNEL;
if (guildInviteExtendedType !== VOICE_CHANNEL) {
return null;
}
const guild = a0.guild;
const value5 = null;
const id = value5 == guild ? value2 : guild.id;
if (value5 == id) {
r0 = value5;
} else {
moduleValue3 = require(9856) /* metro dependency 9856: VoiceChannelListInviteExperiment */;
enabled = moduleValue3.getVoiceChannelListInviteExperiment({guildId: id,
location: 'mobile_invite_embed_impression'}).enabled;
if (enabled) {
value = require(9857) /* metro dependency 9857: VoiceChannelListInviteEmbed */;
value = value.canShowVoiceChannelListInviteEmbed(a0);
r2 = value;
} else {
r2 = enabled;
}
r0 = {treatmentRendered: r2};
}
return r0;
}
function useShouldTrackAnnouncementMessageViews({guild, channel, messages, isMessagesReady}) { // fn#77228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1836, offset: 0x01df6232, size: 169 bytes, params: 2, frame: 18
const r1 = guild == null || guild.features == null ? undefined : guild.features.has(GuildFeatures.COMMUNITY);
const r6 = r1 != null && r1;
return r6.useMemo(_fun77229, [channel.type, channel.guild_id, r6, isMessagesReady, messages]);
}
function useShouldTrackRichPresenceInviteEmbedViews({messages, isMessagesReady}) { // fn#77231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2270, offset: 0x01df6372, size: 64 bytes, params: 2, frame: 15
return env0_3.useMemo(_fun77232, [messages, isMessagesReady]);
}
function handleAnnouncementMessageViewTracking(a0, a1, a2, a3) { // fn#77234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2507, offset: 0x01df6406, size: 122 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
if (a2 != null) {
a0.forEach(_fun77235);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.ANNOUNCEMENT);
}
}
}
function handleRichPresenceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3287, offset: 0x01df65d2, size: 116 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
a0.forEach(_fun77237);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED);
}
}
function useShouldTrackOfficialMessageViews({guild, messages, isMessagesReady}) { // fn#77238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3771, offset: 0x01df6713, size: 145 bytes, params: 2, frame: 19
let value = undefined;
value = (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).useIsGuildOfficialMessagesEnabled((guild == null ? value : guild.id) ?? null,
'useShouldTrackOfficialMessageViews');
return env0_3.useMemo(_fun77239, [value, isMessagesReady, messages]);
}
function handleOfficialMessageViewTracking(a0, a1, a2, a3) { // fn#77241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4101, offset: 0x01df67ec, size: 122 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
if (a2 != null) {
a0.forEach(_fun77242);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE);
}
}
}
function useShouldTrackVoiceInviteEmbedViews({messages, isMessagesReady}) { // fn#77243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4505, offset: 0x01df68ff, size: 64 bytes, params: 2, frame: 15
return env0_3.useMemo(_fun77244, [messages, isMessagesReady]);
}
function handleVoiceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4730, offset: 0x01df69b5, size: 116 bytes, params: 5, frame: 16
var defaultImport;
const env0_0 = a2;
const env0_1 = a3;
if (a1) {
a0.forEach(_fun77248);
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
defaultImport.handleMessageListVisibilityChange([],
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.VOICE_INVITE_EMBED);
}
}
function _fun77229() { // fn#77229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2031, offset: 0x01df62db, size: 75 bytes, params: 1, frame: 13
const type = channel.type;
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
let r0 = type === GUILD_ANNOUNCEMENT && env0_3;
r0 = !r0 ? isMessagesReady && messages.some(_fun77230) : r0;
return r0;
}
function _fun77232() { // fn#77232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2372, offset: 0x01df63b2, size: 36 bytes, params: 1, frame: 12
return isMessagesReady && messages.some(function(a0) {
return a0.activity != null && a0.activity.party_id != null && a0.application != null;
});
}
function _fun77235({message}) { // fn#77235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2598, offset: 0x01df6480, size: 338 bytes, params: 2, frame: 19
const MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
const r2 = message.messageReference?.guild_id != null && message.webhookId != null && message.hasFlag(MessageFlags.IS_CROSSPOST);
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
if (importAll.type === ChannelTypes.GUILD_ANNOUNCEMENT) {
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
channelId: importAll.id, guildId: importDefault,
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
} else if (r2) {
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
channelId: importAll.id, guildId: importDefault,
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
}
}
}
function _fun77237({message}) { // fn#77237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3373, offset: 0x01df6646, size: 205 bytes, params: 2, frame: 17
var binding;
var push;
var object2;
var id;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
let r0 = Reflect.apply(hasFlag, message, [EPHEMERAL]) || message.activity == null;
r0 = !r0 ? message.activity.party_id == null : r0;
r0 = !r0 ? message.application == null : r0;
if (!r0) {
binding = env0_2;
push = binding.push;
object2 = {};
object2.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED;
id = message.id;
object2.messageId = id;
id = importAll.id;
object2.channelId = id;
object2.guildId = importDefault;
id = message.application.id;
object2.applicationId = id;
object2.linkType = LinkType.RICH_PRESENCE_INVITE;
Reflect.apply(push, binding, [object2]);
}
}
function _fun77239() { // fn#77239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3999, offset: 0x01df67a4, size: 43 bytes, params: 1, frame: 12
return env0_2 && isMessagesReady && messages.some(function(a0) {
return a0.hasFlag(MessageFlags.IS_GUILD_OFFICIAL);
});
}
function _fun77242({message}) { // fn#77242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4188, offset: 0x01df6866, size: 153 bytes, params: 2, frame: 16
var binding;
var push;
var object2;
var id;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL]) && message.hasFlag(MessageFlags.IS_GUILD_OFFICIAL)) {
binding = env0_2;
push = binding.push;
object2 = {};
object2.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE;
id = message.id;
object2.messageId = id;
id = importAll.id;
object2.channelId = id;
object2.guildId = importDefault;
Reflect.apply(push, binding, [object2]);
}
}
function _fun77244() { // fn#77244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4600, offset: 0x01df693f, size: 36 bytes, params: 1, frame: 12
return isMessagesReady && messages.some(function({codedLinks}) {
return codedLinks.some(_fun77246);
});
}
function _fun77248({message}) { // fn#77248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4809, offset: 0x01df6a29, size: 637 bytes, params: 2, frame: 55
var r11;
var id;
var r32;
var r31;
var r0;
var r43;
var _createForOfIteratorHelperLoose_77224Binding;
var codedLinks;
var value2;
var value3;
var value4;
var done;
var value6;
var value7;
var type;
var CodedLinkType;
var INVITE;
var getInvite;
var code;
var value8;
var voiceInviteEmbedRenderInfo;
var channel;
var guild;
var value10;
var value11;
var voiceStatesForChannelAlt;
var value13;
var binding;
var push;
var object2;
var MessageViewTrackingType;
var VOICE_INVITE_EMBED;
var moduleValue;
var getInviteInstanceId;
var value14;
var treatmentRendered;
var value15;
const hasFlag = message.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
_createForOfIteratorHelperLoose_77224Binding = _createForOfIteratorHelperLoose_77224;
codedLinks = message.codedLinks;
value2 = undefined;
value3 = _createForOfIteratorHelperLoose_77224Binding(codedLinks);
value4 = value3();
done = value4.done;
value6 = null;
if (!done) {
r11 = value4;
while (true) {
value7 = r11.value;
type = value7.type;
CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
INVITE = CodedLinkType.INVITE;
if (type === INVITE) {
getInvite = InviteStore.getInvite;
code = value7.code;
value8 = Reflect.apply(getInvite, InviteStore, [code]);
if (value6 == value8) {
break;
}
voiceInviteEmbedRenderInfo = getVoiceInviteEmbedRenderInfo(value8);
if (value6 == voiceInviteEmbedRenderInfo) {
break;
}
channel = value8.channel;
if (value6 == channel) {
id = value2;
continue;
}
id = channel.id;
if (value6 != id) {
r32 = id;
continue;
}
r32 = value6;
continue;
guild = value8.guild;
if (value6 == guild) {
id = value2;
continue;
}
id = guild.id;
if (value6 != id) {
r31 = id;
continue;
}
r31 = value6;
continue;
value10 = value6 != r32;
if (!value10) {
r0 = value10;
continue;
}
value11 = value6 != r31;
r0 = value11;
if (!r0) {
continue;
}
voiceStatesForChannelAlt = SortedVoiceStateStore.getVoiceStatesForChannelAlt(r32, r31);
value13 = voiceStatesForChannelAlt.some(function(a0) {
return a0.voiceState.selfStream;
});
r0 = value13;
binding = env0_2;
push = binding.push;
object2 = {};
MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
VOICE_INVITE_EMBED = MessageViewTrackingType.VOICE_INVITE_EMBED;
object2.type = VOICE_INVITE_EMBED;
id = message.id;
object2.messageId = id;
id = importAll.id;
object2.channelId = id;
object2.guildId = importDefault;
code = value7.code;
object2.inviteCode = code;
object2.inviteGuildId = r31;
object2.inviteChannelId = r32;
moduleValue = require(4098) /* metro dependency 4098: InviteCodeUtils */;
getInviteInstanceId = moduleValue.getInviteInstanceId;
code = value7.code;
id = message.id;
value14 = Reflect.apply(getInviteInstanceId, moduleValue, [code, id]);
if (value6 != value14) {
r43 = value14;
continue;
}
r43 = value6;
continue;
object2.inviteInstanceId = r43;
treatmentRendered = voiceInviteEmbedRenderInfo.treatmentRendered;
object2.treatmentRendered = treatmentRendered;
object2.hasActiveStream = r0;
Reflect.apply(push, binding, [object2]);
break;
}
value15 = value3();
done = value15.done;
if (done) {
break;
}
r11 = value15;
continue;
}
}
}
}
function _fun77230(a0) { // fn#77230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2088, offset: 0x01df6326, size: 76 bytes, params: 2, frame: 13
var hasFlag;
let value = a0.messageReference != null;
let r0 = value && a0.webhookId != null;
if (r0) {
hasFlag = a0.hasFlag;
value = environment.__proto__.__proto__;
value = Reflect.apply(hasFlag, a0, [MessageFlags.IS_CROSSPOST]);
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = channel.guild_id != null;
r0 = value;
}
return r0;
}
function _fun77245({codedLinks}) { // fn#77245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4615, offset: 0x01df6963, size: 31 bytes, params: 2, frame: 11
return codedLinks.some(function({type}) {
return type === require(dependencyMap[8]).CodedLinkType.INVITE;
});
}
@@ -0,0 +1,152 @@
/* Metro module 16154; source: modules/messages/native/MessageSendFailureNotificationManager.tsx; dependencies: [7, 6, 15, 17, 18, 1934, 3969, 1878, 7030, 661, 12560, 10920, 10921, 10741, 1244, 4860, 2] */
function _fun124876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:6, offset: 0x025c6084, size: 370 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.InAppNotificationTypes;
const env0_13 = value.MessageStates;
const env0_14 = (require(12560) /* metro dependency 12560: Constants */).LocalNotificationTypes;
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun124884(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageSendFailureNotificationManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_124877() { // fn#124877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:277, offset: 0x025c61f6, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_124877_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleMessageSendFailure(a0) { // fn#124880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:470, offset: 0x025c6258, size: 407 bytes, params: 2, frame: 21
var defaultImport;
var enqueueNotification;
var object2;
var defaultImport2;
var presentLocalNotification;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const channelId = a0.channelId;
const messageId = a0.messageId;
if (a0.shouldNotify) {
if (AppStateStore.getState() !== 'active') {
defaultImport2 = importDefault(10741) /* metro dependency 10741: PushNotification */;
presentLocalNotification = defaultImport2.presentLocalNotification;
object2 = {category: 'local'};
object2.alertTitle = intl.string(t.LdlH2M);
object2.alertBody = intl.string(t.xxRPOT);
object2.userInfo = {channelId: channelId, messageId: messageId,
type: LocalNotificationTypes.MESSAGE_SEND_FAILED};
Reflect.apply(presentLocalNotification, defaultImport2, [object2]);
return undefined;
}
if (channelId === SelectedChannelStore.getChannelId(SelectedGuildStore.getGuildId())) {
return undefined;
}
defaultImport = importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */;
enqueueNotification = defaultImport.enqueueNotification;
object2 = {};
object2.type = InAppNotificationTypes.MESSAGE_FAILED_TO_SEND;
object2.channelId = channelId;
object2.messageId = messageId;
object2.key = channelId + '-' + messageId;
object2.duration = 5000;
object2.onDismiss = onDismiss_124881;
object2.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId();
Reflect.apply(enqueueNotification, defaultImport, [object2]);
}
}
function handleMessageCreate_124882({message, sendMessageOptions}) { // fn#124882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1069, offset: 0x025c6414, size: 153 bytes, params: 2, frame: 17
var id;
var value2;
var author;
let value = sendMessageOptions != null;
let r1 = value && sendMessageOptions.isHydratingExpiredPendingMessage && message.state === MessageStates.SEND_FAILED;
if (r1) {
value = UserStore.getCurrentUser();
value2 = undefined;
id = value == null ? value2 : value.id;
author = message.author;
value = id === (author == null ? value2 : author.id);
r1 = value;
}
if (r1) {
global.setTimeout(function() {
var handleMessageSendFailureBinding = handleMessageSendFailure;
var messageBinding = message;
handleMessageSendFailureBinding({channelId: messageBinding.channel_id, messageId: messageBinding.id,
shouldNotify: true});
}, 3000);
}
}
function _fun124884(a0) { // fn#124884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1405, offset: 0x025c64df, size: 42 bytes, params: 2, frame: 14
const closure = MessageSendFailureNotificationManager;
env0_7(closure, a0);
return env0_3(closure);
}
function handleMessageSendFailureOnDismiss() { // fn#124881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:972, owner: handleMessageSendFailure.onDismiss, offset: 0x025c63ef, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */).clearNotification();
}
function MessageSendFailureNotificationManager(a0) { // fn#124885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1417, offset: 0x025c6509, size: 152 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, MessageSendFailureNotificationManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(MessageSendFailureNotificationManager);
binding = env1_5;
if (_isNativeReflectConstruct_124877()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {MESSAGE_CREATE: handleMessageCreate_124882, MESSAGE_SEND_FAILED: handleMessageSendFailure};
return value;
}
@@ -0,0 +1,893 @@
/* Metro module 11321; source: modules/messages/native/Messages.tsx; dependencies: [57, 31, 4502, 1378, 6874, 4234, 10557, 4885, 4606, 9858, 6540, 4107, 4822, 6773, 8200, 8183, 4117, 7069, 8358, 8057, 10604, 8185, 8432, 7065, 11322, 7074, 4833, 9865, 3786, 6898, 1949, 1310, 1226, 5109, 1379, 7075, 8450, 1945, 1867, 4798, 4097, 4814, 3784, 4396, 4294, 4605, 4296, 7223, 1878, 4297, 4279, 10581, 4300, 661, 1880, 33, 566, 22, 628, 6772, 1360, 3829, 11323, 11326, 11330, 10563, 9483, 7063, 3802, 8214, 6274, 11291, 11292, 8229, 7035, 11333, 4022, 9867, 9764, 9854, 11334, 4813, 9855, 8357, 11335, 11338, 8372, 9835, 4116, 10572, 11340, 7704, 11341, 2] */
function _fun86349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:6, offset: 0x01f922d7, size: 1138 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_86352 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const applicationAssetsStore = importDefault(6874) /* metro dependency 6874: ApplicationAssetsStore */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
const cacheStore = importDefault(4885) /* metro dependency 4885: CacheStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const voiceChannelStartTimeStore = importDefault(9858) /* metro dependency 9858: VoiceChannelStartTimeStore */;
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const explicitMediaStore = importDefault(4822) /* metro dependency 4822: ExplicitMediaStore */;
const applicationDirectoryApplicationsStore = importDefault(6773) /* metro dependency 6773: ApplicationDirectoryApplicationsStore */;
const basicGuildStore = importDefault(8200) /* metro dependency 8200: BasicGuildStore */;
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const guildTemplateStore = importDefault(7069) /* metro dependency 7069: GuildTemplateStore */;
const localInteractionComponentStateStore = importDefault(8358) /* metro dependency 8358: LocalInteractionComponentStateStore */;
const interactionStore = importDefault(8057) /* metro dependency 8057: InteractionStore */;
const mediaPostEmbedStore = importDefault(10604) /* metro dependency 10604: MediaPostEmbedStore */;
const mediaPostSharePromptStore = importDefault(8185) /* metro dependency 8185: MediaPostSharePromptStore */;
const pollsInteractionStoreModule = require(8432) /* metro dependency 8432: PollsInteractionStore */;
const env0_25 = pollsInteractionStoreModule.useChannelPollInteractions;
const env0_26 = pollsInteractionStoreModule.useMessagePollInteractions;
const referralTrialStore = importDefault(7065) /* metro dependency 7065: ReferralTrialStore */;
const pushFeedbackStore = importDefault(11322) /* metro dependency 11322: PushFeedbackStore */;
const pendingReplyStore = importDefault(7074) /* metro dependency 7074: PendingReplyStore */;
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
const summaryStore = importDefault(9865) /* metro dependency 9865: SummaryStore */;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const editMessageStore = importDefault(7075) /* metro dependency 7075: EditMessageStore */;
const giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
const uploadStore = importDefault(7223) /* metro dependency 7223: UploadStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const activityLauncherStore = importDefault(10581) /* metro dependency 10581: ActivityLauncherStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_57 = constantsModule.ActivityActionTypes;
const env0_58 = constantsModule.ChannelTypesSets;
const env0_59 = constantsModule.ME;
const env0_60 = constantsModule.MessageTypes;
const env0_61 = constantsModule.Permissions;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_62 = premiumConstantsModule.PREMIUM_TIER_2_REFERRAL_TRIAL_ID;
const env0_63 = premiumConstantsModule.PremiumTypes;
let value5 = require(33) /* metro dependency 33 */;
const env0_64 = value5.jsx;
const env0_65 = value5.jsxs;
value = value.forwardRef(_fun86353);
value.displayName = 'MessagesConnected';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/Messages.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_86350(a0, a1) { // fn#86350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:955, offset: 0x01f92749, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun86351;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_86352(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_86352(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_86352(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun86351;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun86353(a0, a1) { // fn#86353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:1886, offset: 0x01f928bd, size: 4658 bytes, params: 3, frame: 132
const channel = a0.channel;
let value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
let value3 = Reflect.apply(useStateFromStores, fluxModule, [[MessageStore], function() {
return MessageStore.getMessages(channel.id);
}, [channel.id]]);
const id2 = channel.id;
const guildId = channel.getGuildId();
const env0_3 = guildId;
const guild = fluxModule.useStateFromStores([GuildStore], _fun86355);
const env0_4 = guild;
const systemChannelFlags = guild == null ? value2 : guild.systemChannelFlags;
const value5 = fluxModule.useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
}, []);
const InlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia;
const value6 = InlineAttachmentMedia.useSetting();
const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia;
const value7 = InlineEmbedMedia.useSetting();
const RenderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds;
const value8 = RenderEmbeds.useSetting();
const RenderReactions = (require(3829) /* metro dependency 3829: UserSettings */).RenderReactions;
const value9 = RenderReactions.useSetting();
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value10 = DeveloperMode.useSetting();
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
const value11 = AnimateEmoji.useSetting();
const AnimateStickers = (require(3829) /* metro dependency 3829: UserSettings */).AnimateStickers;
const value12 = AnimateStickers.useSetting();
const GifAutoPlay = (require(3829) /* metro dependency 3829: UserSettings */).GifAutoPlay;
const value13 = GifAutoPlay.useSetting();
const TimestampHourCycle = (require(3829) /* metro dependency 3829: UserSettings */).TimestampHourCycle;
const value14 = TimestampHourCycle.useSetting();
const value15 = fluxModule.useStateFromStores([ThemeStore], function() {
return ThemeStore.theme;
}, []);
const value16 = (require(11323) /* metro dependency 11323: SwipeToReplyExperiment */).useIsMessageSwipeActionsEnabled();
const value17 = useMessageAuthorActivities_86358(value3);
useFetchMessageApplications_86363(value3);
const value18 = (importDefault(11326) /* metro dependency 11326: useSubscribeMissingActivities */)(value3, channel);
let binding = env0_3;
const value19 = binding(value18, 2);
const property = value19[0];
value19[1];
const value20 = fluxModule.useStateFromStores([InviteStore], function() {
return InviteStore.getInvites();
}, []);
(require(11330) /* metro dependency 11330: MessagesHooks */).useFetchVoiceChannelInviteStartTimes(value20);
const {appDirectoryEmbedApplications, invalidAppDirectoryEmbedApplicationIds,
appDirectoryEmbedApplicationFetchStates} = fluxModule.useStateFromStoresObject([ApplicationDirectoryApplicationsStore],
function() {
var object = {};
object.appDirectoryEmbedApplications = ApplicationDirectoryApplicationsStore.getApplications();
object.invalidAppDirectoryEmbedApplicationIds = ApplicationDirectoryApplicationsStore.getInvalidApplicationIds();
object.appDirectoryEmbedApplicationFetchStates = ApplicationDirectoryApplicationsStore.getApplicationFetchStates();
return object;
}, []);
const value22 = fluxModule.useStateFromStoresArray([ApplicationStore], function() {
return ApplicationStore.getFetchingOrFailedFetchingIds();
});
const value23 = fluxModule.useStateFromStoresArray([ApplicationAssetsStore], function() {
return ApplicationAssetsStore.getFetchingIds();
});
const value24 = fluxModule.useStateFromStoresArray([SKUStore], function() {
return SKUStore.getFetchingSkuIds();
});
const value25 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore], function() {
return EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(id).map(_fun86373).filter(require(dependencyMap[60]).isNotNullish);
}, [id2]);
const value26 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore, PresenceStore], _fun86374);
const value27 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore], function() {
var value2 = new global.Set();
var env0_0 = value2;
EmbeddedActivitiesStore.getEmbeddedActivitiesByChannel().forEach(_fun86378);
return global.Array.from(value2);
});
const value28 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore], _fun86381);
const mediaPostEmbeds = fluxModule.useStateFromStores([MediaPostEmbedStore], function() {
return MediaPostEmbedStore.getMediaPostEmbeds();
});
const value29 = fluxModule.useStateFromStores([GuildTemplateStore], function() {
return GuildTemplateStore.getGuildTemplates();
}, []);
const value30 = fluxModule.useStateFromStores([BuildOverrideStore], function() {
return BuildOverrideStore.getBuildOverrides();
}, []);
const value31 = (require(10563) /* metro dependency 10563: useCodedLinksExperimentEmbeds */).useCodedLinksExperimentEmbeds();
const {quests,
isFetchingCurrentQuests} = (require(9483) /* metro dependency 9483: QuestHooks */).useQuests({'fetchPolicy': 'cache-or-network',
'callerSource': 'messages_native'});
const value34 = value3.filter(function({type}) {
return type === MessageTypes.PREMIUM_REFERRAL;
}).map(function(a0) {
return a0.referralTrialOfferId;
});
const env0_6 = value34.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
const value35 = fluxModule.useStateFromStoresArray([ReferralTrialStore], _fun86387);
const value36 = (require(7063) /* metro dependency 7063: useTrialOffer */).useTrialOffer(PREMIUM_TIER_2_REFERRAL_TRIAL_ID);
const value37 = fluxModule.useStateFromStores([UserStore], function() {
return importDefault(dependencyMap[68]).isPremiumExactly(UserStore.getCurrentUser(), PremiumTypes.TIER_2);
});
const value38 = fluxModule.useStateFromStores([EditMessageStore], function() {
return EditMessageStore.getEditingMessageId(id);
}, [id2]);
const value39 = fluxModule.useStateFromStores([PendingReplyStore], _fun86391, [id2]);
const value40 = fluxModule.useStateFromStores([ReadStateStore], function() {
return ReadStateStore.getOldestUnreadMessageId(id);
}, [id2]);
const value41 = fluxModule.useStateFromStores([GuildVerificationStore], _fun86393, [guildId]);
const value42 = fluxModule.useStateFromStores([PermissionStore], function() {
var SEND_MESSAGES = Permissions.SEND_MESSAGES;
return PermissionStore.can(SEND_MESSAGES, channel);
}, [channel]);
const value43 = (importDefault(8214) /* metro dependency 8214: useIsCallActive */)(id2);
const value44 = fluxModule.useStateFromStores([VoiceStateStore], _fun86395, [value5]);
const value45 = fluxModule.useStateFromStores([RTCConnectionStore], function() {
return RTCConnectionStore.getChannelId();
}, []);
const value46 = fluxModule.useStateFromStores([ReferencedMessageStore], function() {
var value3 = ChannelTypesSets.THREADS.has(channel.type);
var value4 = null;
return value3 && value4 != channel.parent_id ? ReferencedMessageStore.getMessageByReference({channel_id: channel.parent_id,
message_id: channel.id, guild_id: channel.guild_id}).message : value4;
}, [channel]);
const {resolvingGiftCodes, resolvedGiftCodes,
acceptingGiftCodes} = fluxModule.useStateFromStoresObject([GiftCodeStore], function() {
var object = {};
object.resolvingGiftCodes = GiftCodeStore.getResolvingCodes();
object.resolvedGiftCodes = GiftCodeStore.getResolvedCodes();
object.acceptingGiftCodes = GiftCodeStore.getAcceptingCodes();
return object;
}, []);
const value48 = fluxModule.useStateFromStores([ChannelRTCStore], function() {
return ChannelRTCStore.getParticipants(id).length;
}, [id2]);
const value49 = fluxModule.useStateFromStores([UploadStore], function() {
return UploadStore.getFiles(id);
}, [id2]);
const value50 = fluxModule.useStateFromStores([ReferencedMessageStore], function() {
return ReferencedMessageStore.getReplyIdsForChannel(id);
}, [id2]);
const {useReducedMotion, roleStyle, officialMessageStyle, saturation,
displayNameStylesEnabled} = fluxModule.useStateFromStoresObject([AccessibilityStore], function() {
return {useReducedMotion: AccessibilityStore.useReducedMotion, roleStyle: AccessibilityStore.roleStyle,
officialMessageStyle: AccessibilityStore.officialMessageStyle, saturation: AccessibilityStore.saturation,
displayNameStylesEnabled: AccessibilityStore.displayNameStylesEnabled};
}, []);
const value52 = fluxModule.useStateFromStores([ThreadMessageStore], function() {
return ThreadMessageStore.getChannelThreadsVersion(id);
}, [id2]);
const value53 = fluxModule.useStateFromStoresObject([InteractionStore], function() {
return InteractionStore.getMessageInteractionStates();
});
const moduleValue39 = fluxModule;
useStateFromStores = moduleValue39.useStateFromStores;
const value54 = binding(Reflect.apply(useStateFromStores, moduleValue39, [[LocalInteractionComponentStateStore],
_fun86405, [], (require(6274) /* metro dependency 6274: SecondaryIndexMapUtils */).isVersionEqual]), 2);
const property2 = value54[0];
const property3 = value54[1];
const hasLoadedExperiments = fluxModule.useStateFromStores([ExperimentStore], function() {
return ExperimentStore.hasLoadedExperiments;
});
const value55 = (require(11291) /* metro dependency 11291: useIsSpamMessageRequest */).useIsSpamMessageRequest(channel.id);
const value56 = (require(11292) /* metro dependency 11292: useIsMessageRequest */).useIsMessageRequest(channel.id);
const r49 = value3 != null && (value3.ready || value3.cached);
const r98 = value3 != null && value3.cached;
const r97 = value3 != null && value3.ready && !value3.loadingMore;
const rsvpVersion = fluxModule.useStateFromStores([GuildScheduledEventStore], function() {
return GuildScheduledEventStore.getRsvpVersion();
});
const messagesVersion = fluxModule.useStateFromStores([GuildAutomodMessageStore], function() {
return GuildAutomodMessageStore.getMessagesVersion();
});
const communicationDisabledVersion = fluxModule.useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getCommunicationDisabledVersion();
});
const value61 = fluxModule.useStateFromStoresObject([GuildMemberStore], _fun86410, [guildId, value3]);
const value62 = fluxModule.useStateFromStores([PermissionStore], function() {
var MODERATE_MEMBERS = Permissions.MODERATE_MEMBERS;
return PermissionStore.can(MODERATE_MEMBERS, guild);
});
const useUserCommunicationDisabledModule = require(8229) /* metro dependency 8229: useUserCommunicationDisabled */;
const useCurrentUserCommunicationDisabled = useUserCommunicationDisabledModule.useCurrentUserCommunicationDisabled;
const property4 = env0_3(Reflect.apply(useCurrentUserCommunicationDisabled, useUserCommunicationDisabledModule,
[guild == null ? value2 : guild.id]), 2)[1];
const locale = fluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value64 = (require(7035) /* metro dependency 7035: BlockedPaymentsCountryExperiment */).useIsPaymentsBlocked();
const value65 = fluxModule.useStateFromStores([JoinedThreadsStore], _fun86414);
const value66 = fluxModule.useStateFromStores([MediaPostSharePromptStore], function() {
return MediaPostSharePromptStore.shouldDisplayPrompt(id);
});
const value67 = fluxModule.useStateFromStores([PushFeedbackStore], function() {
return PushFeedbackStore.isEligible();
});
const lazyCacheStatus = fluxModule.useStateFromStores([CacheStore], function() {
return CacheStore.getLazyCacheStatus();
});
const value68 = (require(11333) /* metro dependency 11333: getMessageJumpData */).useMessageJumpAndroidKeyboardHeight();
const value69 = (importDefault(4022) /* metro dependency 4022: useKeyboardType */)();
const value71 = fluxModule.useStateFromStores([SummaryStore], _fun86418,
[(require(9867) /* metro dependency 9867: ChannelSummariesExperiment */).useChannelSummariesExperiment(channel),
channel.id]);
binding = env0_4;
binding.useEffect(_fun86419, [channel.id, value3.hasMoreAfter, value3.hasMoreBefore, value3.length, value3.ready]);
const value72 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackAnnouncementMessageViews({guild: guild,
channel: channel, messages: value3, isMessagesReady: r49});
const value73 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackRichPresenceInviteEmbedViews({messages: value3,
isMessagesReady: r49});
const value74 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackOfficialMessageViews({guild: guild,
messages: value3, isMessagesReady: r49});
const value75 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackVoiceInviteEmbedViews({messages: value3,
isMessagesReady: r49});
const value76 = (require(11334) /* metro dependency 11334: computeGlobalSpoilerDisplay */).useShouldDisplaySpoilerObscurity(channel);
const value77 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useIsAgeVerified();
binding.useEffect(_fun86420, [id2, guildId]);
const value78 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useShouldDisableInteractiveComponents(channel.id);
const value79 = useChannelPollInteractions(channel.id);
value3.forEach(_fun86422);
const value80 = useMessagePollInteractions([]);
const value81 = fluxModule.useStateFromStores([ExplicitMediaStore], function() {
return ExplicitMediaStore.getChannelFpInfo(id);
}, [id2]);
const value82 = (importDefault(11335) /* metro dependency 11335: useChatWidth */)();
const {unloadedContentEntryMessageIds,
unloadableContentEntryMessageIds} = (importDefault(11338) /* metro dependency 11338: useLoadMessageContentEntries */)(value3);
const value84 = fluxModule.useStateFromStores([UserStore], _fun86424);
const version = fluxModule.useStateFromStores([BasicGuildStore], function() {
return BasicGuildStore.getVersion();
});
const value85 = (require(8372) /* metro dependency 8372: useAvatarColor */).useColorStore(function(a0) {
var Object = global.Object;
return Object.keys(a0.palette).length;
});
const guildEmoji = fluxModule.useStateFromStores([EmojiStore], _fun86427);
const value86 = fluxModule.useStateFromStores([VoiceStateStore], _fun86428, [guildId]);
const value87 = fluxModule.useStateFromStoresObject([SortedVoiceStateStore, VoiceChannelStartTimeStore, InviteStore,
ChannelStore], _fun86429);
const value88 = fluxModule.useStateFromStoresArray([SessionsStore], function() {
var value2 = SessionsStore.getRemoteActivities();
var items = [];
arraySpread(items, SessionsStore.getHiddenActivities(), arraySpread(items, value2, 0, SessionsStore),
SessionsStore);
return items.filter(require(dependencyMap[60]).isNotNullish);
});
const value89 = fluxModule.useStateFromStoresObject([ActivityLauncherStore], _fun86432);
const value90 = fluxModule.useStateFromStoresArray([AuthorizedAppsStore], _fun86434, []);
const value91 = fluxModule.useStateFromStores([UserStore], _fun86435);
(require(10572) /* metro dependency 10572: createSocialLayerStorefrontProductDetailsEmbed */).useFetchSocialLayerStorefrontProductDetailsEmbedData(value3);
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
const Messages = Profiles.Messages;
return (
<StartupProfiler profile={Messages}>
{channel.isThread() && ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
{((Component) => <Component ref={a1} theme={value15} saturation={saturation} isStaff={value84} animateEmoji={value11} animateStickers={value12} containerWidth={value82} gifAutoPlay={value13} timestampHourCycle={value14} inlineAttachmentMedia={value6} inlineEmbedMedia={value7} renderEmbeds={value8} renderReactions={value9} developerMode={value10} roleStyle={roleStyle} officialMessageStyle={officialMessageStyle} guildId={guildId} currentUserId={value5} channelId={id2} isMessagesReady={r49} isMessagesCached={r98} isMessagesAckable={r97} isMessageRequest={value56} isSpamMessageRequest={value55} messageAuthorActivities={value17} invites={value20} appDirectoryEmbedApplications={appDirectoryEmbedApplications} invalidAppDirectoryEmbedApplicationIds={invalidAppDirectoryEmbedApplicationIds} invalidApplicationIds={value22} applicationAssetFetchingIds={value23} messages={value3} messagesWithActivitiesLaunching={value28} activityInstanceIds={value25} activityParticipants={value27} activityInstancePresenceDetails={value26} appDirectoryEmbedApplicationFetchStates={appDirectoryEmbedApplicationFetchStates} mediaPostPreviewEmbeds={mediaPostEmbeds} guildTemplates={value29} buildOverrides={value30} fetchingSkuIds={value24} experimentEmbeds={value31} quests={quests} isFetchingCurrentQuests={isFetchingCurrentQuests} editingMessageId={value38} replyingMessageId={value39} oldestUnreadMessageId={value40} canChat={value41} canSendMessages={value42} isCallActive={value43} voiceStatePrivateChannelId={value44} currentClientVoiceChannelId={value45} voiceStateChannelIdSummaryForGuild={value86} resolvingGiftCodes={resolvingGiftCodes} resolvedGiftCodes={resolvedGiftCodes} acceptingGiftCodes={acceptingGiftCodes} participantsLength={value48} uploads={value49} repliedIds={value50} useReducedMotion={useReducedMotion} displayNameStylesEnabled={displayNameStylesEnabled} channelThreadsVersion={value52} rsvpVersion={rsvpVersion} failedMessagesVersion={messagesVersion} communicationDisabledVersion={communicationDisabledVersion} messageAuthorMembers={value61} forwardGuildsVersion={version} interactionStates={value53} interactionComponentStates={property2} interactionComponentStatesVersion={property3} hasLoadedExperiments={hasLoadedExperiments && r49} guildSystemChannelFlags={systemChannelFlags} currentUserCommunicationDisabled={property4} renderCommunicationDisabled={value62} userSettingsLocale={locale} paymentsBlocked={value64} isFollowingForumPost={value65} showMediaPostSharePrompt={value66} showPushFeedback={value67} cacheStoreLoaded={lazyCacheStatus !== 'initializing'} androidKeyboardHeight={value68} selectedSummary={value71} keyboardType={value69} shouldTrackAnnouncementMessageViews={value72} shouldTrackRichPresenceInviteEmbedViews={value73} shouldTrackOfficialMessageViews={value74} shouldTrackVoiceInviteEmbedViews={value75} shouldObscureSpoiler={value76} shouldDisableInteractiveComponents={value78} channelPolls={value79} messageReferencePolls={value80} explicitMediaFalsePositiveInfo={value81} threadStartingReferenceMessage={value46} unloadedContentEntryMessageIds={unloadedContentEntryMessageIds} unloadableContentEntryMessageIds={unloadableContentEntryMessageIds} resolvedReferralTrialOfferIds={value35} referralTrialOfferId={value36 == null ? value2 : value36.id} isPremiumTier2User={value37} activityInviteMessageIds={property} guildInviteColorsFetched={value85} isAgeVerified={value77} guildEmojis={guildEmoji} enableSwipeActions={value16} selfActivities={value88} activityLaunchJoinStates={value89} authorizedAppsTokens={value90} currentUserDisplayNameStyles={value91} voiceInviteDataByChannelId={value87} officialMessageColor={(guild == null ? value2 : guild.officialMessageColor) ?? value2} {...a0} />)(importDefault(11341) /* metro dependency 11341: MessagesRenderer */)}
</StartupProfiler>
);
}
function _fun86355() { // fn#86355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2052, offset: 0x01f93b0f, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_3);
}
function useMessageAuthorActivities_86358(a0) { // fn#86358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2650, offset: 0x01f93b4c, size: 110 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun86361,
[env1_4.useMemo(function() {
var object = {};
object.forEach(_fun86360);
return object;
}, [a0])]);
}
function useFetchMessageApplications_86363(a0) { // fn#86363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2928, offset: 0x01f93c63, size: 94 bytes, params: 2, frame: 14
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const binding = env1_4;
value = binding.useMemo(function() {
var value2 = new global.Set();
value2.forEach(_fun86365);
return global.Array.from(value2);
}, [a0]);
const env0_2 = binding.useRef([]);
binding.useEffect(_fun86366, [value]);
}
function _fun86372() { // fn#86372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4113, offset: 0x01f93e82, size: 84 bytes, params: 1, frame: 13
const getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
const value4 = Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore, [id]).map(function(a0) {
return a0.launchId;
});
return value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun86374() { // fn#86374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4258, offset: 0x01f93ee1, size: 92 bytes, params: 1, frame: 15
var environment;
var r2;
var value3;
var value4;
const closure = _loop_86375;
let value = environment.__proto__;
const _createForOfIteratorHelperLoose_86350Binding = _createForOfIteratorHelperLoose_86350;
value = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(id);
value = _createForOfIteratorHelperLoose_86350Binding(value);
const value2 = value();
let done = value2.done;
if (!done) {
for (r2 = value2; true; r2 = value4) {
value3 = r2.value;
closure(value3);
value4 = value();
done = value4.done;
if (done) {
break;
}
}
}
return [];
}
function _fun86377() { // fn#86377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4620, offset: 0x01f93fea, size: 88 bytes, params: 1, frame: 13
const Set = global.Set;
const set = new Set();
EmbeddedActivitiesStore.getEmbeddedActivitiesByChannel().forEach(function(a0, a1) {
var env0_0 = a1;
a0.forEach(_fun86379);
});
const Array = global.Array;
return Array.from(set);
}
function _fun86381() { // fn#86381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4823, offset: 0x01f940be, size: 152 bytes, params: 1, frame: 21
var r2;
var r10;
var value5;
var value6;
var property;
var isLaunching;
var componentId;
var value7;
var length;
var value8;
var push;
var value9;
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_86350(EmbeddedActivitiesStore.getLaunchStates());
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
value6 = env1_3(value5, 2);
value6[0];
property = value6[1];
isLaunching = property.isLaunching;
if (isLaunching) {
value7 = property.componentId != null;
r10 = value7;
} else {
r10 = isLaunching;
}
if (!r10) {
continue;
}
componentId = property.componentId;
length = componentId.length;
value8 = length > 0;
r10 = value8;
if (!r10) {
continue;
}
push = items2.push;
componentId = property.componentId;
Reflect.apply(push, items2, [componentId]);
value9 = value3();
done = value9.done;
if (done) {
break;
}
r2 = value9;
continue;
}
}
return items2;
}
function _fun86387() { // fn#86387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:5577, offset: 0x01f941bb, size: 69 bytes, params: 1, frame: 13
const value = env0_6.map(_fun86388);
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun86391() { // fn#86391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:5938, offset: 0x01f94282, size: 48 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = PendingReplyStore.getPendingReply(id);
return value == null ? undefined : value.message.id;
}
function _fun86393() { // fn#86393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:6132, offset: 0x01f942cf, size: 40 bytes, params: 1, frame: 12
return env0_3 != null && GuildVerificationStore.canChatInGuild(env0_3);
}
function _fun86395() { // fn#86395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:6303, offset: 0x01f9431d, size: 32 bytes, params: 1, frame: 13
return VoiceStateStore.getUserVoiceChannelId(ME, env0_5);
}
function _fun86405() { // fn#86405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:7615, offset: 0x01f944d0, size: 45 bytes, params: 1, frame: 10
const value = environment.__proto__;
const items2 = [LocalInteractionComponentStateStore.getInteractionComponentStates()];
const getInteractionComponentStateVersion = LocalInteractionComponentStateStore.getInteractionComponentStateVersion;
items2[1] = Reflect.apply(getInteractionComponentStateVersion, LocalInteractionComponentStateStore, []);
return items2;
}
function _fun86410() { // fn#86410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:8251, offset: 0x01f9454b, size: 56 bytes, params: 1, frame: 12
if (env0_3 != null) {
if (env0_1 == null) {
return {};
}
env0_1.forEach(_fun86411);
}
return {};
}
function _fun86414() { // fn#86414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:8731, offset: 0x01f94618, size: 50 bytes, params: 1, frame: 12
const isForumPost2 = channel.isForumPost();
return isForumPost2 ? JoinedThreadsStore.hasJoined(id) : !!isForumPost2;
}
function _fun86418() { // fn#86418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9115, offset: 0x01f9468b, size: 41 bytes, params: 1, frame: 12
return env0_7 ? SummaryStore.selectedSummary(channel.id) : null;
}
function _fun86419() { // fn#86419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9178, offset: 0x01f946b4, size: 142 bytes, params: 1, frame: 18
var value4;
var defaultImport;
const ready = env0_1.ready;
let r1 = ready ? env0_1.length !== 0 : !ready;
r1 = !r1 ? env0_1.hasMoreBefore : r1;
r1 = !r1 ? env0_1.hasMoreAfter : r1;
if (!r1) {
value4 = environment.__proto__;
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, global.Date.now(), 1, 1, 0);
}
}
function _fun86420() { // fn#86420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9833, offset: 0x01f94742, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
(importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */).handleChannelSelect();
return _fun86421;
}
function _fun86422({messageReference}) { // fn#86422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10009, offset: 0x01f94795, size: 51 bytes, params: 2, frame: 13
const message_id = messageReference?.message_id;
if (message_id != null) {
env0_8.push(message_id);
}
}
function _fun86424() { // fn#86424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10321, offset: 0x01f947e5, size: 49 bytes, params: 1, frame: 11
var r1;
let value = environment.__proto__;
value = UserStore.getCurrentUser();
if (value == null) {
r1 = undefined;
} else {
value = value.isStaff();
r1 = value;
}
return r1 != null && r1;
}
function _fun86427() { // fn#86427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10564, offset: 0x01f9484b, size: 27 bytes, params: 1, frame: 11
return EmojiStore.getGuildEmoji(env0_3);
}
function _fun86428() { // fn#86428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10628, offset: 0x01f94866, size: 72 bytes, params: 1, frame: 13
if (env0_3 == null) {
return null;
}
return (require(9835) /* metro dependency 9835: MessagesUtils */).getVoiceStateChannelSummaryFromVoiceStates(VoiceStateStore.getVoiceStates(env0_3));
}
function _fun86429() { // fn#86429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10806, offset: 0x01f948ae, size: 341 bytes, params: 1, frame: 35
var environment;
var r5;
var id;
var r22;
var value8;
var channel;
var moduleValue;
var isVoiceChannelInvite;
var id2;
var guild;
var voiceStatesForChannelAlt;
var value10;
var value11;
var getStartTime;
var getChannel;
var value12;
var value13;
const object2 = {};
let value = environment.__proto__;
const _createForOfIteratorHelperLoose_86350Binding = _createForOfIteratorHelperLoose_86350;
const value3 = InviteStore.getInvites().values();
const value4 = undefined;
const value5 = _createForOfIteratorHelperLoose_86350Binding(value3);
const value6 = value5();
let done = value6.done;
const value7 = '';
if (!done) {
r5 = value6;
while (true) {
value8 = r5.value;
channel = value8.channel;
id = channel == null ? value4 : channel.id;
if (id == null) {
continue;
}
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
if (!Reflect.apply(isVoiceChannelInvite, moduleValue, [value8])) {
continue;
}
channel = value8.channel;
id2 = channel.id;
guild = value8.guild;
if (guild == null) {
id = value4;
continue;
}
id = guild.id;
voiceStatesForChannelAlt = SortedVoiceStateStore.getVoiceStatesForChannelAlt(id2, id);
value10 = voiceStatesForChannelAlt.map(function(a0) {
var value = '';
return value + (a0.voiceState.selfStream ? '*' : value) + a0.user.id;
});
value11 = value10.join(',');
getStartTime = VoiceChannelStartTimeStore.getStartTime;
getChannel = ChannelStore.getChannel;
value12 = Reflect.apply(getStartTime, VoiceChannelStartTimeStore, [Reflect.apply(getChannel, ChannelStore,
[id2])]);
if (value12 != null) {
r22 = value12;
continue;
}
r22 = value7;
continue;
object2[id2] = value7 + value11 + ':' + r22;
value13 = value5();
done = value13.done;
if (done) {
break;
}
r5 = value13;
continue;
}
}
return object2;
}
function _fun86432() { // fn#86432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11409, offset: 0x01f94a96, size: 32 bytes, params: 1, frame: 13
return env0_9.reduce(_fun86433, {});
}
function _fun86434() { // fn#86434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11603, offset: 0x01f94afd, size: 43 bytes, params: 1, frame: 10
const value = environment.__proto__;
const items2 = [AuthorizedAppsStore.getNewestTokens()];
const getApplicationFetchStateVersion = AuthorizedAppsStore.getApplicationFetchStateVersion;
items2[1] = Reflect.apply(getApplicationFetchStateVersion, AuthorizedAppsStore, []);
return items2;
}
function _fun86435() { // fn#86435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11708, offset: 0x01f94b28, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.displayNameStyles;
}
function _fun86359() { // fn#86359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2706, offset: 0x01f93bba, size: 34 bytes, params: 1, frame: 12
const object2 = {};
object2.forEach(_fun86360);
return object2;
}
function _fun86361() { // fn#86361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2857, offset: 0x01f93c15, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.mapValues(env0_1, function(a0, a1) {
return PresenceStore.getPrimaryActivity(a1);
});
}
function _fun86364() { // fn#86364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2985, offset: 0x01f93cc1, size: 76 bytes, params: 1, frame: 13
const Set = global.Set;
const set = new Set();
set.forEach(_fun86365);
const Array = global.Array;
return Array.from(set);
}
function _fun86366() { // fn#86366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:3145, offset: 0x01f93d44, size: 174 bytes, params: 1, frame: 19
var defaultImport;
var fetchApplications;
var defaultImport2;
var value3;
let value = environment.__proto__.__proto__;
const shallowEqualModule = require(628) /* metro dependency 628: shallowEqual */;
const areArraysShallowEqual = shallowEqualModule.areArraysShallowEqual;
let binding = env0_1;
if (!Reflect.apply(areArraysShallowEqual, shallowEqualModule, [binding, env0_2.current])) {
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
fetchApplications = defaultImport.fetchApplications;
defaultImport2 = importDefault(22) /* metro dependency 22 */;
binding = env0_1;
value3 = defaultImport2(binding);
value = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
value = value.uniq();
value = value.value();
Reflect.apply(fetchApplications, defaultImport, [value, false]);
env0_2.current = binding;
}
}
function _loop_86375(a0) { // fn#86375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4284, offset: 0x01f93f3d, size: 146 bytes, params: 2, frame: 18
var environment;
var binding;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
const findActivity = PresenceStore.findActivity;
const userIds = a0.userIds;
value = Reflect.apply(userIds.values().next, value, []).value;
value = Reflect.apply(findActivity, PresenceStore, [value, _fun86376]);
const value2 = undefined;
if ((value == null ? value2 : value.details) != null) {
binding = env0_0;
binding.push('' + a0.launchId + ':' + value.details);
}
return value2;
}
function _fun86378(a0, a1) { // fn#86378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4690, offset: 0x01f94042, size: 33 bytes, params: 3, frame: 11
const env0_0 = a1;
a0.forEach(function({userIds}) {
userIds.forEach(_fun86380);
});
}
function _fun86388(a0) { // fn#86388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:5589, offset: 0x01f94200, size: 39 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return ReferralTrialStore.getRelevantUserTrialOffer(a0)?.id;
}
function _fun86411(a0) { // fn#86411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:8315, offset: 0x01f94583, size: 96 bytes, params: 2, frame: 16
var value2;
var getMember;
var value3;
var value4;
const author = a0.author;
const value = undefined;
if ((author == null ? value : author.id) != null) {
value2 = environment.__proto__.__proto__;
getMember = GuildMemberStore.getMember;
value3 = environment.__proto__;
value4 = Reflect.apply(getMember, GuildMemberStore, [env1_3, a0.author.id]);
if (value4 != null) {
env0_0[a0.author.id] = value4;
}
}
return value;
}
function _fun86421() { // fn#86421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9869, offset: 0x01f94770, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */).handleChannelSelect();
}
function _fun86433(a0, a1) { // fn#86433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11424, offset: 0x01f94ab6, size: 71 bytes, params: 3, frame: 16
let application_id = a1.application_id;
if (application_id != null) {
var value = environment.__proto__.__proto__;
var getState = ActivityLauncherStore.getState;
application_id = a1.application_id;
var JOIN = ActivityActionTypes.JOIN;
value = Reflect.apply(getState, ActivityLauncherStore, [application_id, JOIN]);
if (value != null) {
a0[a1.application_id] = value;
}
}
return a0;
}
function _fun86376({application_id}) { // fn#86376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4350, offset: 0x01f93fcf, size: 27 bytes, params: 2, frame: 2
return application_id === env0_0.applicationId;
}
function _fun86379({userIds}) { // fn#86379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4709, offset: 0x01f94063, size: 32 bytes, params: 2, frame: 11
userIds.forEach(_fun86380);
}
function _fun86380(a0) { // fn#86380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4732, offset: 0x01f94083, size: 59 bytes, params: 2, frame: 17
env2_0.add('' + require + ':' + a0);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,402 @@
/* Metro module 11330; source: modules/messages/native/MessagesHooks.tsx; dependencies: [57, 31, 27, 9858, 7729, 4646, 1867, 4396, 566, 22, 628, 6772, 1360, 4116, 11331, 9835, 11332, 2] */
function _fun86505(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:6, offset: 0x01f966dc, size: 355 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_86508 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).findNodeHandle;
const voiceChannelStartTimeStore = importDefault(9858) /* metro dependency 9858: VoiceChannelStartTimeStore */;
const env0_7 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).updateShouldShowJumpToPresentButton;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessagesHooks.tsx');
exports.useMessageAuthorActivities = useMessageAuthorActivities;
exports.useFetchMessageApplications = useFetchMessageApplications;
exports.useFetchVoiceChannelInviteStartTimes = useFetchVoiceChannelInviteStartTimes;
exports.useMessagesLifecycle = useMessagesLifecycle;
exports.useScrollState = useScrollState_86525;
exports.useChatUpdatesQueue = useChatUpdatesQueue;
exports.useMessagesState = useMessagesState;
}
function _createForOfIteratorHelperLoose_86506(a0, a1) { // fn#86506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:234, offset: 0x01f9683f, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun86507;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_86508(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_86508(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_86508(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun86507;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useMessageAuthorActivities(a0) { // fn#86509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1251, offset: 0x01f969b3, size: 110 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun86512,
[env0_4.useMemo(function() {
var object = {};
object.forEach(_fun86511);
return object;
}, [a0])]);
}
function useFetchMessageApplications(a0) { // fn#86514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1553, offset: 0x01f96a91, size: 94 bytes, params: 2, frame: 14
const env0_0 = a0;
const binding = env0_4;
const value = binding.useMemo(function() {
var value2 = new global.Set();
value2.forEach(_fun86516);
return global.Array.from(value2);
}, [a0]);
const env0_2 = binding.useRef([]);
binding.useEffect(_fun86517, [value]);
}
function useFetchVoiceChannelInviteStartTimes(a0) { // fn#86518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1971, offset: 0x01f96be9, size: 122 bytes, params: 2, frame: 19
const env0_0 = a0;
env0_4.useEffect(_fun86520, [a0,
(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore, GuildAvailabilityStore],
_fun86519, [a0])]);
}
function useMessagesLifecycle({messages, isMessagesReady, oldestUnreadMessageId, channelId, screenIndex, updateRows, scrollToMessageId}) { // fn#86521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2576, offset: 0x01f96def, size: 137 bytes, params: 2, frame: 16
const binding = screenIndex;
binding.useEffect(_fun86522, []);
binding.useEffect(function() {
return _fun86524;
}, [channelId, screenIndex]);
}
function useScrollState_86525() { // fn#86525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2978, offset: 0x01f96f20, size: 101 bytes, params: 1, frame: 15
const binding = env0_4;
const value = env0_3(binding.useState({'animated': false, 'hasHandledScroll': false, 'isAtBottom': false,
'isNearBottom': false, 'isNearTop': false, 'decelerating': false, 'dragging': false,
'hasMoreMessagesAfterForLastUpdate': false, '_loaded': false}), 2);
const property = value[0];
const env0_0 = value[1];
const useCallback = binding.useCallback;
return [property, Reflect.apply(useCallback, binding, [function(a0) {
a0(_fun86527);
}, []])];
}
function useChatUpdatesQueue(a0, a1) { // fn#86528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3279, offset: 0x01f96fa5, size: 85 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_4;
const value = binding.useMemo(_fun86529, [a0, a1]);
binding.useEffect(function() {
return _fun86533;
}, [value]);
return value;
}
function useMessagesState() { // fn#86534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3481, offset: 0x01f97097, size: 97 bytes, params: 1, frame: 19
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
let value = binding2(value2, 2);
const property = value[0];
const property2 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [false]), 2);
return {shouldForceRender: property, hasJumpedToOriginalPost: value[0], setHasJumpedToOriginalPost: value[1],
setShouldForceRender: property2};
}
function _fun86510() { // fn#86510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1307, offset: 0x01f96a21, size: 34 bytes, params: 1, frame: 12
const object2 = {};
object2.forEach(_fun86511);
return object2;
}
function _fun86512() { // fn#86512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1457, offset: 0x01f96a43, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.mapValues(env0_1, function(a0, a1) {
return PresenceStore.getPrimaryActivity(a1);
});
}
function _fun86515() { // fn#86515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1610, offset: 0x01f96aef, size: 76 bytes, params: 1, frame: 13
const Set = global.Set;
const set = new Set();
set.forEach(_fun86516);
const Array = global.Array;
return Array.from(set);
}
function _fun86517() { // fn#86517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1770, offset: 0x01f96b3b, size: 174 bytes, params: 1, frame: 19
var defaultImport;
var fetchApplications;
var defaultImport2;
var value3;
let value = environment.__proto__;
const shallowEqualModule = require(628) /* metro dependency 628: shallowEqual */;
const areArraysShallowEqual = shallowEqualModule.areArraysShallowEqual;
let binding = env0_1;
if (!Reflect.apply(areArraysShallowEqual, shallowEqualModule, [binding, env0_2.current])) {
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
fetchApplications = defaultImport.fetchApplications;
defaultImport2 = importDefault(22) /* metro dependency 22 */;
binding = env0_1;
value3 = defaultImport2(binding);
value = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
value = value.uniq();
value = value.value();
Reflect.apply(fetchApplications, defaultImport, [value, false]);
env0_2.current = binding;
}
}
function _fun86519() { // fn#86519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2067, offset: 0x01f96c63, size: 185 bytes, params: 1, frame: 21
var r3;
var r10;
var value6;
var guild;
var moduleValue;
var isVoiceChannelInvite;
var id;
var getGuild;
var value7;
var isUnavailable;
var value8;
var value9;
const object2 = {};
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
guild = value6.guild;
if (guild != null) {
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
guild = value6.guild;
id = guild.id;
getGuild = GuildStore.getGuild;
value7 = Reflect.apply(getGuild, GuildStore, [id]) != null;
if (!value7) {
r10 = value7;
continue;
}
isUnavailable = GuildAvailabilityStore.isUnavailable;
value8 = !Reflect.apply(isUnavailable, GuildAvailabilityStore, [id]);
r10 = value8;
object2[id] = r10;
break;
}
break;
}
value9 = value4();
done = value9.done;
if (done) {
break;
}
r3 = value9;
continue;
}
}
return object2;
}
function _fun86520() { // fn#86520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2309, offset: 0x01f96d1c, size: 211 bytes, params: 1, frame: 23
var r3;
var r12;
var value6;
var guild;
var moduleValue;
var isVoiceChannelInvite;
var id;
var value7;
var hasRequestedStartTimes2;
var moduleValue2;
var value8;
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
const value5 = value4();
let done = value5.done;
if (!done) {
r3 = value5;
while (true) {
value6 = r3.value;
guild = value6.guild;
if (guild != null) {
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
guild = value6.guild;
id = guild.id;
value7 = env0_1[id] !== true;
if (value7) {
r12 = value7;
continue;
}
hasRequestedStartTimes2 = VoiceChannelStartTimeStore.hasRequestedStartTimes(id);
r12 = hasRequestedStartTimes2;
if (r12) {
break;
}
moduleValue2 = require(11331) /* metro dependency 11331: ChannelInfoActionCreators */;
moduleValue2.fetchChannelInfo(id);
break;
}
break;
}
value8 = value4();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
}
}
}
function _fun86522() { // fn#86522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2734, offset: 0x01f96e78, size: 126 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
const syncMessageDisplay = value.syncMessageDisplay;
const messagesBinding = messages;
const channelIdBinding = channelId;
Reflect.apply(syncMessageDisplay, value, [{messages: messagesBinding, isMessagesReady: isMessagesReady,
oldestUnreadMessageId: oldestUnreadMessageId, channelId: channelIdBinding, screenIndex: screenIndex,
updateRows: updateRows, scrollToMessageId: scrollToMessageId}]);
(require(9835) /* metro dependency 9835: MessagesUtils */).recordTimings(channelIdBinding, messagesBinding);
}
function _fun86523() { // fn#86523, offset: 0x01f96ef6, size: 11 bytes, params: 1, frame: 1
return function() {
updateShouldShowJumpToPresentButton(channelId, screenIndex, false);
};
}
function _fun86526(a0) { // fn#86526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3222, offset: 0x01f96f85, size: 32 bytes, params: 2, frame: 11
a0(_fun86527);
}
function _fun86529() { // fn#86529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3330, offset: 0x01f96ffa, size: 63 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11332) /* metro dependency 11332: ChatUpdatesQueue */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(_fun86530, function(a0) {
require(a0);
});
return value instanceof Object ? value : value2;
}
function _fun86532() { // fn#86532, offset: 0x01f97077, size: 11 bytes, params: 1, frame: 1
return _fun86533;
}
function _fun86530() { // fn#86530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3349, offset: 0x01f97039, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
const current = env1_0.current;
const value2 = null;
return value2 === current ? value2 : findNodeHandle(env1_0.current);
}
function _fun86533() { // fn#86533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3434, offset: 0x01f97082, size: 21 bytes, params: 1, frame: 9
env1_2.cleanup();
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,94 @@
/* Metro module 11381; source: modules/messages/native/RoleMembersActionSheet.tsx; dependencies: [31, 27, 4502, 6875, 1938, 33, 4501, 697, 21, 6738, 566, 6736, 1305, 4573, 6275, 11382, 2] */
function _fun87242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:6, offset: 0x01fb4f6e, size: 426 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_6 = (require(6875) /* metro dependency 6875: ChannelMemberStore */).EVERYONE_CHANNEL_ID;
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.gap = PX_4;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingTop = PX_12;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.paddingBottom = PX_4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object3.header = object4;
object3.headerText = {flex: 1};
object3.roleDot = {paddingTop: 0};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object3.memberCount = {color: TEXT_MUTED};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/RoleMembersActionSheet.tsx');
exports.default = _default_87243;
}
function _default_87243({guildId, roleId, channelId}) { // fn#87243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:496, offset: 0x01fb5118, size: 486 bytes, params: 2, frame: 25
const styles = useStyles();
let binding = env0_3;
binding.useEffect(function() {
if (roleId !== importDefault(dependencyMap[8]).castGuildIdAsEveryoneGuildRoleId(guildId)) {
require(dependencyMap[9]).requestMembersForRole(guildId, roleId);
}
}, [guildId, roleId]);
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[GuildRoleStore], function() {
return GuildRoleStore.getRole(guildId, roleId);
}, [guildId, roleId]]);
var env0_3 = value3;
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
const r13 = Reflect.apply(useStateFromStores, moduleValue2, [[AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
}]) === 'dot' && value3?.colorString != null;
const r12 = roleId === (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castGuildIdAsEveryoneGuildRoleId(guildId) ? null : (importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId)?.[roleId] ?? null;
binding = env0_3;
const useMemo = binding.useMemo;
if (value3 == null) {
return null;
} else {
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet scrollable header={Reflect.apply(useMemo, binding, [_fun87247, [r13, value3, r12, styles]])}>
{((Component) => <Component guildId={guildId} channelId={channelId ?? EVERYONE_CHANNEL_ID} roleId={roleId} headerShown={false} inActionSheet disableStickySections disableThemedGradient />)(importDefault(11382) /* metro dependency 11382: GuildChannelUserList */)}
</BottomSheet>
);
}
}
function _fun87247() { // fn#87247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:944, offset: 0x01fb537b, size: 323 bytes, params: 1, frame: 23
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var r0;
var RoleDot;
var binding;
const value = environment.__proto__;
const value3 = null;
if (env0_4) {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
binding = env0_3;
r0 = <RoleDot color={binding.colorString} colors={binding.colorStrings} size="small" containerStyles={styles.roleDot} />;
} else {
r0 = value3;
}
const items2 = [r0];
items2[1] = <Text variant="text-sm/semibold" style={styles.headerText}>{value3 == env0_3 ? undefined : env0_3.name}</Text>;
items2[2] = value3 != env0_5 ? <Text variant="text-sm/medium" style={styles.memberCount}>{env0_5}</Text> : value3;
return (
<View style={styles.header}>
{items2}
</View>
);
}
@@ -0,0 +1,169 @@
/* Metro module 11274; source: modules/messages/native/VisibleMessagesWindowHandler.tsx; dependencies: [7, 6, 8178, 2] */
function _fun86106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:6, offset: 0x01f87f4a, size: 160 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(7) /* metro dependency 7 */;
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).RowType;
value = value(function() {
this(this, VisibleMessagesWindowHandler);
this.data = null;
this.callback = null;
this.setCallback = _fun86109;
this.clearCallback = _fun86110;
this.handleScrollPosition = _fun86111;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/VisibleMessagesWindowHandler.tsx');
exports.default = value;
}
function getRowMessageId(a0) { // fn#86107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:134, offset: 0x01f87fea, size: 102 bytes, params: 2, frame: 4
if (a0 == null) {
return undefined;
}
if ('rowType' in a0) {
if (a0.rowType === RowType.MESSAGE) {
return a0.message.id;
}
return undefined;
}
const type = a0.type;
const MESSAGE = RowType.MESSAGE;
if (type !== MESSAGE) {
return undefined;
}
return a0.message?.id;
}
function VisibleMessagesWindowHandler() { // fn#86108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:317, offset: 0x01f88050, size: 87 bytes, params: 1, frame: 14
this(this, VisibleMessagesWindowHandler);
this.data = null;
this.callback = null;
this.setCallback = setCallback;
this.clearCallback = clearCallback;
this.handleScrollPosition = handleScrollPosition;
}
function setCallback(a0) { // fn#86109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:445, owner: VisibleMessagesWindowHandler.setCallback, offset: 0x01f880a7, size: 51 bytes, params: 2, frame: 11
let binding = env0_0;
binding.callback = a0;
if (binding.data != null) {
binding = env0_0;
binding.callback(binding.data);
}
}
function clearCallback() { // fn#86110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:527, owner: VisibleMessagesWindowHandler.clearCallback, offset: 0x01f880da, size: 25 bytes, params: 1, frame: 3
const binding = env0_0;
binding.callback = null;
binding.data = null;
}
function VisibleMessagesWindowHandlerHandleScrollPosition({rows, firstVisibleMessageRowIndex, lastVisibleMessageRowIndex}) { // fn#86111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:593, owner: VisibleMessagesWindowHandler.handleScrollPosition, offset: 0x01f880f3, size: 316 bytes, params: 2, frame: 20
var r1;
var r4;
var r6;
var r7;
var r3;
var value3;
var rowMessageId;
var value5;
var length;
var value6;
var rowMessageId2;
var value8;
var Math;
var value9;
var value10;
var rowMessageId3;
var value12;
var binding;
if (env0_0.callback != null) {
if (firstVisibleMessageRowIndex != null) {
value3 = environment.__proto__;
if (firstVisibleMessageRowIndex >= 0) {
r1 = firstVisibleMessageRowIndex;
while (true) {
rowMessageId = getRowMessageId(rows[r1]);
if (rowMessageId != null) {
r4 = rowMessageId;
break;
}
value5 = typeof r1 === 'bigint' ? r1 - 1n : +r1 - 1;
if (value5 >= 0) {
r1 = value5;
continue;
}
r4 = null;
break;
}
} else {
r4 = null;
}
} else {
r4 = null;
}
if (lastVisibleMessageRowIndex != null) {
length = rows.length;
value6 = environment.__proto__;
if (lastVisibleMessageRowIndex < length) {
r6 = lastVisibleMessageRowIndex;
while (true) {
rowMessageId2 = getRowMessageId(rows[r6]);
if (rowMessageId2 != null) {
r1 = rowMessageId2;
break;
}
value8 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = rows.length;
if (value8 < length) {
r6 = value8;
continue;
}
r1 = null;
break;
}
} else {
r1 = null;
}
} else {
r1 = null;
}
if (firstVisibleMessageRowIndex != null) {
if (lastVisibleMessageRowIndex != null) {
Math = global.Math;
value9 = firstVisibleMessageRowIndex + Math.floor((lastVisibleMessageRowIndex - firstVisibleMessageRowIndex) / 2);
length = rows.length;
value10 = environment.__proto__;
if (value9 < length) {
r7 = value9;
while (true) {
rowMessageId3 = getRowMessageId(rows[r7]);
if (rowMessageId3 != null) {
r3 = rowMessageId3;
break;
}
value12 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = rows.length;
if (value12 < length) {
r7 = value12;
continue;
}
r3 = null;
break;
}
} else {
r3 = null;
}
} else {
r3 = null;
}
} else {
r3 = null;
}
binding = env0_0;
binding.data = {topVisibleMessage: r4, middleVisibleMessage: r3, bottomVisibleMessage: r1};
binding.callback(binding.data);
}
}
@@ -0,0 +1,43 @@
/* Metro module 7214; source: modules/messages/native/burst_reactions/BurstReactionAnimation.tsx; dependencies: [31, 4502, 33, 4501, 7172, 566, 7215, 6760, 2] */
function _fun57703(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7392:6, offset: 0x016b3cb3, size: 196 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({content: {width: '100%'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimation.tsx');
exports.default = BurstReactionAnimation;
}
function BurstReactionAnimation(a0) { // fn#57704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7392:287, offset: 0x016b3d77, size: 337 bytes, params: 2, frame: 26
const channelId = a0.channelId;
const messageId = a0.messageId;
const emoji = a0.emoji;
const isFullscreen = a0.isFullscreen;
const onComplete = a0.onComplete;
let withFadeOut = a0.withFadeOut;
withFadeOut = withFadeOut === undefined || withFadeOut;
const object2 = {'channelId': 0, 'messageId': 0, 'emoji': 0, 'isFullscreen': 0, 'onComplete': 0, 'withFadeOut': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, emoji);
const styles = useStyles();
const value3 = require(dependencyMap[4]).useBurstReactionAnimationSource({emoji: emoji, messageId: messageId,
channelId: channelId, isFullscreen: isFullscreen});
const useReducedMotion = require(dependencyMap[5]).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
});
if (value3 == null) {
return null;
}
const defaultImport = importDefault(withFadeOut ? dependencyMap[6] : dependencyMap[7]);
const object4 = {};
if (withFadeOut) {
object4.onComplete = onComplete;
} else {
object4.onAnimationFinish = onComplete;
}
return ((Component) => <Component style={styles.content} loop={false} speed={useReducedMotion ? 0.5 : 1.2} {...value} {...object4} {...{['source']: value3}} />)(defaultImport);
}
@@ -0,0 +1,239 @@
/* Metro module 15265; source: modules/messages/native/burst_reactions/BurstReactionAnimationContainer.tsx; dependencies: [57, 31, 27, 1376, 33, 4501, 697, 7172, 4081, 4082, 694, 4017, 4504, 10357, 1365, 1305, 7214, 4573, 1244, 3868, 2] */
function _fun116710(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:6, offset: 0x024945dc, size: 526 bytes, params: 8, frame: 25
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.TouchableOpacity;
const env0_6 = value.View;
const StyleSheet = value.StyleSheet;
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object6['backgroundColor'] = BLACK;
const BACKDROP_OPACITY = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object6['opacity'] = BACKDROP_OPACITY;
object5.background = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['flex'] = 1;
object7['alignItems'] = 'center';
object7['justifyContent'] = 'center';
object5.fill = object7;
object5.dismissTextContainer = {'position': 'absolute', 'bottom': 48, 'zIndex': 1};
const object8 = {'backgroundColor': null, 'borderRadius': null, 'position': 'absolute', 'bottom': -600,
'height': 700, 'width': 700};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object8.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.dismissTextBackground = object8;
const env0_11 = Reflect.apply(createStyles, value, [object5]);
object5 = {code: "function BurstReactionAnimationContainerTsx1(){const{animationData,showAnimation,withTiming,runOnJS,handleComponentFinish}=this.__closure;if(animationData==null){return{opacity:0};}if(!showAnimation){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(handleComponentFinish)();})};}return{opacity:withTiming(1,{duration:300})};}"};
object5 = {code: 'function BurstReactionAnimationContainerTsx2(finished){const{runOnJS,handleComponentFinish}=this.__closure;if(finished)runOnJS(handleComponentFinish)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationContainer.tsx');
exports.default = BurstReactionAnimationContainer;
}
function BurstReactionAnimationContainerInner() { // fn#116711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1252, offset: 0x024947ea, size: 404 bytes, params: 1, frame: 24
const closure = handleComponentFinish;
const env0_0 = useStyles();
const binding = env0_4Binding;
const value2 = null;
const [property, env0_2] = env0_3(binding.useState(value2), 2);
var [property2, env0_4] = env0_3(env0_4Binding.useState(false), 2);
const env0_5 = env0_4Binding.useRef(false);
env0_4Binding.useEffect(_fun116714, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure3 = BurstReactionAnimationContainerInnerY;
const object2 = {animationData: property, showAnimation: property2};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.handleComponentFinish = closure;
closure3.__closure = object2;
closure3.__workletHash = 12044515783370;
closure3.__initData = env0_12;
const env0_6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure3]);
return value2 == property ? value2 : ((Component) => <Component contentTypes={[(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS]}>{children_116719}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
}
function BurstReactionAnimationContainer() { // fn#116723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:3458, offset: 0x02494e5f, size: 98 bytes, params: 1, frame: 17
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARKER = (importDefault(697) /* metro dependency 697: native */).themes.DARKER;
return (
<ThemeContextProvider theme={DARKER}>
<BurstReactionAnimationContainerInner />
</ThemeContextProvider>
);
}
function handleComponentFinish() { // fn#116712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1407, owner: BurstReactionAnimationContainerInner.handleComponentFinish, offset: 0x0249497e, size: 35 bytes, params: 1, frame: 11
if (env0_5.current === false) {
env0_2(null);
}
}
function handleAnimationFinish(a0) { // fn#116713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1464, owner: BurstReactionAnimationContainerInner.handleAnimationFinish, offset: 0x024949a1, size: 41 bytes, params: 2, frame: 13
env0_4(false);
env0_5.current = false;
if (a0 != null) {
a0();
}
}
function _fun116714() { // fn#116714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1543, offset: 0x024949ca, size: 65 bytes, params: 1, frame: 14
var environment;
const closure = handleEffectReceived;
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('BURST_REACTION_EFFECT_SEND', closure);
return _fun116716;
}
function BurstReactionAnimationContainerInnerY() { // fn#116717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1920, owner: BurstReactionAnimationContainerInner.y, offset: 0x02494abe, size: 201 bytes, params: 1, frame: 23
var environment;
var r0;
var binding;
var object4;
var value2;
var moduleValue;
var withTiming;
var object5;
var closure;
var object6;
if (env0_1 == null) {
r0 = {opacity: 0};
} else {
binding = env0_3;
object4 = {};
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object5 = {duration: 300};
if (binding) {
object4.opacity = Reflect.apply(withTiming, moduleValue, [1, object5]);
r0 = object4;
} else {
closure = yN;
object6 = {};
object6.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object6.handleComponentFinish = handleComponentFinish;
closure.__closure = object6;
closure.__workletHash = 9326347209552;
closure.__initData = env1_13;
object4.opacity = Reflect.apply(withTiming, moduleValue, [0, object5, 'respect-motion-settings', closure]);
r0 = object4;
}
}
return r0;
}
function BurstReactionAnimationContainerInnerChildren({visibleContent, markAsDismissed}) { // fn#116719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2608, owner: BurstReactionAnimationContainerInner.children, offset: 0x02494bbf, size: 603 bytes, params: 2, frame: 34
var environment;
var r15;
var r11;
var BurstReactionAnimation;
var binding;
var jsxRuntimeEnv1_9Binding;
var Text;
var object2;
var intl;
const value = environment.__proto__;
const OverlayView = (require(1305) /* metro dependency 1305: native */).OverlayView;
const object4 = {};
let stylesBinding = styles;
let fill = stylesBinding.fill;
object4.style = fill;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [stylesBinding.fill, env0_6];
const object5 = {};
const BACKDROP_OPACITY = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object5.activeOpacity = BACKDROP_OPACITY;
object5.onPress = function() {
handleAnimationFinish(_fun116721);
};
object5.style = stylesBinding.fill;
const items2 = [<View style={stylesBinding.background} />];
fill = stylesBinding.fill;
if (env0_3) {
BurstReactionAnimation = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
binding = env0_1;
r15 = <BurstReactionAnimation isFullscreen channelId={binding.channelId} messageId={binding.messageId} emoji={binding.emoji} loop={false} withFadeOut={false} onComplete={function() {
handleAnimationFinish();
}} />;
} else {
r15 = null;
}
items2[1] = <View style={fill}>{r15}</View>;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS = DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
const value6 = visibleContent === SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
if (value6) {
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.dismissTextContainer;
object2.variant = 'text-sm/medium';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r11 = <><Text {...object2}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QpPMih)}</Text><View style={stylesBinding.dismissTextBackground} /></>;
} else {
r11 = value6;
}
items2[2] = r11;
return (
<OverlayView {...object4}>
<View2 style={items3}>
<TouchableOpacity {...object5}>
{items2}
</TouchableOpacity>
</View2>
</OverlayView>
);
}
function handleEffectReceived({channelId, emoji, messageId}) { // fn#116715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1548, offset: 0x02494a0b, size: 127 bytes, params: 2, frame: 14
env1_2({channelId: channelId, emoji: emoji, messageId: messageId});
env1_4(true);
env1_5.current = true;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_HEAVY = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_HEAVY;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_HEAVY]);
}
function _fun116716() { // fn#116716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1798, offset: 0x02494a8a, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('BURST_REACTION_EFFECT_SEND', handleEffectReceived);
}
function yN(a0) { // fn#116718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2083, owner: BurstReactionAnimationContainerInner.y.n, offset: 0x02494b87, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [handleComponentFinish])();
}
}
function childrenOnPress_116720() { // fn#116720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2789, owner: BurstReactionAnimationContainerInner.children.onPress, offset: 0x02494e1a, size: 25 bytes, params: 1, frame: 11
handleAnimationFinish(function() {
return markAsDismissed(ContentDismissActionType.UNKNOWN);
});
}
@@ -0,0 +1,26 @@
/* Metro module 7213; source: modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx; dependencies: [31, 33, 7152, 7214, 2] */
function _fun57701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7391:6, offset: 0x016b3bb1, size: 136 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx');
exports.default = BurstReactionAnimationPreview;
}
function BurstReactionAnimationPreview({channelId, emoji, messageId, reactionType}) { // fn#57702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7391:235, offset: 0x016b3c39, size: 122 bytes, params: 2, frame: 18
var r0;
var value;
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
const BURST = ReactionTypes.BURST;
if (reactionType !== BURST) {
r0 = null;
} else {
value = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
value = ((Component) => <Component isFullscreen channelId={channelId} messageId={messageId} emoji={emoji} />)(value);
r0 = value;
}
return r0;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,128 @@
/* Metro module 7215; source: modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx; dependencies: [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760, 2] */
function _fun57706(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:6, offset: 0x016b3ed7, size: 248 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({content: {width: '100%'}});
object = {code: "function FadeOutLottieAnimationTsx1(){const{isAnimationComplete,isFadeOut,withTiming,runOnJS,setIsFadeOut}=this.__closure;if(!isAnimationComplete){return{opacity:1};}if(isFadeOut){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(setIsFadeOut)(false);})};}return{opacity:0};}"};
object = {code: 'function FadeOutLottieAnimationTsx2(finished){const{runOnJS,setIsFadeOut}=this.__closure;if(finished)runOnJS(setIsFadeOut)(false);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx');
exports.default = FadeOutLottieAnimation;
}
function FadeOutLottieAnimation(a0) { // fn#57707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:787, offset: 0x016b3fcf, size: 441 bytes, params: 2, frame: 29
var object2;
var r0;
var View;
const env0_0 = a0.onComplete;
let value = null;
const value2 = Object.create(value);
value2.onComplete = 0;
const value3 = copyDataProperties({}, a0, value2, undefined);
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value6 = binding2(value5, 2);
const property = value6[0];
const value7 = 1;
const env0_2 = value6[value7];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property2 = value8[0];
const property3 = value8[value7];
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let closure = _fun57709;
binding.useEffect(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = FadeOutLottieAnimationT;
object2 = {isAnimationComplete: property, isFadeOut: property2};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.setIsFadeOut = property3;
closure.__closure = object2;
closure.__workletHash = 1137618554665;
closure.__initData = env0_8;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
if (property) {
if (property2) {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {style: value9};
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
value = <View {...object2}>{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish} {...value3} />)(value)}</View>;
r0 = value;
} else {
r0 = value;
}
} else {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {style: value9};
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
value = <View {...object2}>{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish} {...value3} />)(value)}</View>;
r0 = value;
}
return r0;
}
function FadeOutLottieAnimationT() { // fn#57710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1056, owner: FadeOutLottieAnimation.T, offset: 0x016b419a, size: 194 bytes, params: 1, frame: 25
var environment;
var value2;
var moduleValue;
var withTiming;
var closure;
var object2;
const binding = env0_1;
const object4 = {};
if (binding) {
if (env0_3) {
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
closure = TT_57711;
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.setIsFadeOut = env0_4;
closure.__closure = object2;
closure.__workletHash = 14133863353798;
closure.__initData = env1_9;
object4.opacity = Reflect.apply(withTiming, moduleValue, [0, {duration: 300}, 'respect-motion-settings',
closure]);
} else {
object4.opacity = 0;
}
} else {
object4.opacity = 1;
}
return object4;
}
function onAnimationFinish(a0) { // fn#57712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1599, owner: FadeOutLottieAnimation.onAnimationFinish, offset: 0x016b4297, size: 42 bytes, params: 2, frame: 12
if (onComplete != null) {
onComplete(a0);
}
env0_2(true);
}
function TT_57711(a0) { // fn#57711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1152, owner: FadeOutLottieAnimation.T.t, offset: 0x016b425c, size: 59 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
value = Reflect.apply(runOnJS, value, [env1_4]);
value(false);
}
}
@@ -0,0 +1,32 @@
/* Metro module 8573; source: modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx; dependencies: [31, 33, 7172, 7215, 2] */
function _fun67838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8758:6, offset: 0x01c33ca0, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx');
exports.default = SuperReactionLocalImageAnimation;
}
function SuperReactionLocalImageAnimation(a0) { // fn#67839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8758:238, offset: 0x01c33d2a, size: 154 bytes, params: 2, frame: 19
var r0;
const localImageSource = a0.localImageSource;
const animationSource = a0.animationSource;
let value = null;
const value2 = Object.create(value);
value2.localImageSource = 0;
value2.animationSource = 0;
const value3 = copyDataProperties({}, a0, value2, animationSource);
const value5 = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).useSuperReactionAnimationSourceFromLocalImage({animationSource: animationSource,
localImageSource: localImageSource});
if (value == value5) {
r0 = value;
} else {
value = importDefault(7215) /* metro dependency 7215: FadeOutLottieAnimation */;
value = ((Component) => <Component loop source={value5} {...value3} />)(value);
r0 = value;
}
return r0;
}
@@ -0,0 +1,108 @@
/* Metro module 8565; source: modules/messages/native/burst_reactions/SuperReactionUpsellActionSheet.tsx; dependencies: [31, 27, 1878, 661, 33, 1365, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 4501, 697, 6771, 566, 3802, 5080, 7028, 1962, 7940, 22, 8573, 7183, 8574, 1244, 7172, 1305, 4080, 2] */
function _fun67825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:6, offset: 0x01c3354a, size: 523 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const StyleSheet = value.StyleSheet;
const env0_4 = value.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticsPages;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const env0_8 = DismissibleContent.SUPER_REACTIONS_COACHMARK_MOBILE;
object = [require(8566) /* metro dependency 8566 */, require(8567) /* metro dependency 8567 */,
require(8568) /* metro dependency 8568 */, require(8569) /* metro dependency 8569 */,
require(8567) /* metro dependency 8567 */, require(8570) /* metro dependency 8570 */,
require(8571) /* metro dependency 8571 */, require(8572) /* metro dependency 8572 */];
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['flex'] = 1;
object3['alignItems'] = 'center';
object3['justifyContent'] = 'center';
object3['top'] = -150;
object.fill = object3;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object.nitroIcon = {'tintColor': null, 'width': 32, 'height': 32, 'marginVertical': -8, 'marginRight': -4,
tintColor: WHITE};
object.description = {paddingHorizontal: 16};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionUpsellActionSheet.tsx');
exports.default = SuperReactionCoachmarkActionSheet;
}
function SuperReactionCoachmarkActionSheet({onDismiss}) { // fn#67826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:690, offset: 0x01c33755, size: 512 bytes, params: 2, frame: 25
var r0;
var PremiumUpsellTooltipActionSheet;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object3;
const styles = useStyles();
const env0_1 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const object4 = {};
const PREMIUM_UPSELL_BURST_REACTIONS = AnalyticsPages.PREMIUM_UPSELL_BURST_REACTIONS;
object4.page = PREMIUM_UPSELL_BURST_REACTIONS;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (require(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
const binding = env0_3;
const useMemo = binding.useMemo;
if (isPremium2) {
r0 = null;
} else {
PremiumUpsellTooltipActionSheet = importDefault(8574) /* metro dependency 8574: PremiumUpsellTooltipActionSheet */;
var premiumUpsellTooltipActionSheetProps = {title: intl.string(t.Wfl5zp)};
object3 = {};
object3.backdropOpacity = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object3.backdropChildren = Reflect.apply(useMemo, binding, [_fun67828, [styles]]);
premiumUpsellTooltipActionSheetProps.backdropProps = object3;
premiumUpsellTooltipActionSheetProps.description = intl.string(t.eikz43);
premiumUpsellTooltipActionSheetProps.descriptionStyle = styles.description;
premiumUpsellTooltipActionSheetProps.dismissibleContent = SUPER_REACTIONS_COACHMARK_MOBILE;
premiumUpsellTooltipActionSheetProps.primaryButtonText = intl.string(t.sEAnVH);
premiumUpsellTooltipActionSheetProps.primaryButtonIcon = primaryButtonIcon;
premiumUpsellTooltipActionSheetProps.onPrimaryButtonPress = onPrimaryButtonPress;
premiumUpsellTooltipActionSheetProps.secondaryButtonText = intl.string(t.TulDPl);
premiumUpsellTooltipActionSheetProps.onDismiss = onDismiss;
r0 = <PremiumUpsellTooltipActionSheet {...premiumUpsellTooltipActionSheetProps} />;
}
return r0;
}
function _fun67828() { // fn#67828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:929, offset: 0x01c33955, size: 144 bytes, params: 1, frame: 18
const binding = env1_9;
const defaultImport = importDefault(22) /* metro dependency 22 */;
return (
<View style={styles.fill}>
{((Component) => <Component localImageSource={binding[defaultImport.random(0,
binding.length - 1)]} animationSource={require(7183) /* metro dependency 7183 */} />)(importDefault(8573) /* metro dependency 8573: SuperReactionLocalImageAnimation */)}
</View>
);
}
function primaryButtonIcon() { // fn#67829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1403, owner: SuperReactionCoachmarkActionSheet.primaryButtonIcon, offset: 0x01c339e5, size: 62 bytes, params: 1, frame: 14
const NitroWheel = (require(1305) /* metro dependency 1305: native */).NitroWheel;
return <NitroWheel style={styles.nitroIcon} />;
}
function onPrimaryButtonPress() { // fn#67830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1471, owner: SuperReactionCoachmarkActionSheet.onPrimaryButtonPress, offset: 0x01c33a23, size: 147 bytes, params: 1, frame: 18
let value = environment.__proto__;
importDefault(dependencyMap[29]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[18]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[20]);
value = value(dependencyMap[19], dependencyMap.paths);
const object2 = {};
object2.analyticsLocation = env0_2;
object2.analyticsLocations = analyticsLocations;
const PremiumFeatureCardOrder = require(dependencyMap[21]).PremiumFeatureCardOrder;
const TIER_2_LEADING = PremiumFeatureCardOrder.TIER_2_LEADING;
object2.premiumFeatureCardOrder = TIER_2_LEADING;
Reflect.apply(pushLazy, defaultImport2, [value, object2]);
}
@@ -0,0 +1,756 @@
/* Metro module 11518; source: modules/messages/native/createChannelStream.tsx; dependencies: [11322, 7075, 7223, 8178, 661, 21, 11519, 11520, 1244, 3826, 8228, 5260, 6860, 2] */
function _fun88186(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:6, offset: 0x01fd836d, size: 246 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_88189 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const pushFeedbackStore = importDefault(11322) /* metro dependency 11322: PushFeedbackStore */;
const editMessageStore = importDefault(7075) /* metro dependency 7075: EditMessageStore */;
const uploadStore = importDefault(7223) /* metro dependency 7223: UploadStore */;
const rowGeneratorConstantsModule = require(8178) /* metro dependency 8178: RowGeneratorConstants */;
const env0_6 = rowGeneratorConstantsModule.Changeset;
const env0_7 = rowGeneratorConstantsModule.LoadingType;
const env0_8 = rowGeneratorConstantsModule.RowType;
const env0_9 = rowGeneratorConstantsModule.SeparatorType;
const env0_10 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/createChannelStream.tsx');
exports.default = createChannelStream;
}
function _createForOfIteratorHelperLoose_88187(a0, a1) { // fn#88187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:229, offset: 0x01fd8463, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun88188;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_88189(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_88189(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_88189(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun88188;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function createChannelStream({channel, messages, uploads, oldestUnreadMessageId, replyingMessageId, currentUserId, canAddNewReactions, selectedSummary, chatManager, roleStyle, forceRender, updateMessageIds, isResourceChannel, unloadableContentEntryMessageIds}) { // fn#88190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1233, offset: 0x01fd85d7, size: 558 bytes, params: 2, frame: 23
var r8;
var nonce;
var value6;
var getMessageForFile;
var id;
var value7;
var value8;
var push;
var object3;
var intl;
const items3 = [];
const object4 = {};
const _createForOfIteratorHelperLoose_88187Binding = _createForOfIteratorHelperLoose_88187;
const value3 = uploads.slice();
const value4 = _createForOfIteratorHelperLoose_88187Binding(value3.reverse());
const value5 = value4();
let done = value5.done;
if (!done) {
r8 = value5;
while (true) {
value6 = r8.value;
getMessageForFile = UploadStore.getMessageForFile;
id = value6.id;
value7 = Reflect.apply(getMessageForFile, UploadStore, [id]);
nonce = value7?.nonce;
if (nonce == null) {
continue;
}
nonce = value7.nonce;
object4[nonce] = value6;
value8 = value4();
done = value8.done;
if (done) {
break;
}
r8 = value8;
continue;
}
}
const items2 = [];
messages.forEach(_fun88193);
items2.forEach(_fun88195);
if (items2.length === 0 && !messages.loadingMore && (messages.hasMoreAfter || messages.hasMoreBefore)) {
push = items3.push;
object3 = {};
object3.rowType = messages.hasMoreBefore ? LoadingType.LOAD_BEFORE : LoadingType.LOAD_AFTER;
object3.changeType = forceRender ? Changeset.UPDATE : Changeset.NOOP;
object3.roleStyle = roleStyle;
object3.isLoading = messages.loadingMore;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XBlaiC);
Reflect.apply(push, items3, [object3]);
}
return items3;
}
function unreadFilter(a0) { // fn#88191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1706, owner: createChannelStream.unreadFilter, offset: 0x01fd8805, size: 106 bytes, params: 2, frame: 15
var r1;
var r0;
var value3;
var defaultImport;
const isForumPost2 = channel.isForumPost();
let id = a0.id;
const value2 = id === oldestUnreadMessageId;
if (isForumPost2) {
if (value2) {
id = a0.id;
value3 = environment.__proto__;
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r1 = id !== defaultImport.castChannelIdAsMessageId(channel.id);
} else {
r1 = value2;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function insertMessage(a0) { // fn#88192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1810, owner: createChannelStream.insertMessage, offset: 0x01fd886f, size: 154 bytes, params: 2, frame: 18
var property2;
var value2;
const property = env0_16[0];
if (property == null) {
env0_16.unshift([a0]);
} else if (unreadFilter(a0)) {
env0_16.unshift([a0]);
} else {
property2 = property[property.length - 1];
value2 = environment.__proto__;
if ((importDefault(11519) /* metro dependency 11519: isNewMessageGroup */)(channel, property2, a0)) {
env0_16.unshift([a0]);
} else {
property.unshift(a0);
}
}
}
function _fun88193(a0) { // fn#88193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1950, offset: 0x01fd8909, size: 161 bytes, params: 2, frame: 17
var oldestUnreadMessageIdBinding;
var id;
let value = environment.__proto__;
value = Reflect.apply((require(11520) /* metro dependency 11520: tryInjectMessage */).tryCreateInjectedMessage,
value, [a0, channel]);
if (value != null && value.position === 'before') {
insertMessage(value.message);
oldestUnreadMessageIdBinding = oldestUnreadMessageId;
id = a0.id;
if (oldestUnreadMessageIdBinding === id) {
id = value.message.id;
}
}
insertMessage(a0);
if (value != null && value.position === 'after') {
insertMessage(value.message);
}
}
function createChannelStreamDetermineChangeType(a0) { // fn#88194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:2185, owner: createChannelStream.determineChangeType, offset: 0x01fd89aa, size: 59 bytes, params: 2, frame: 15
const value = a1;
return chatManager.determineChangeType({message: a0, updateMessageIds: updateMessageIds, forceRender: forceRender},
value !== undefined ? value : false);
}
function _fun88195(a0, a1) { // fn#88195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:2283, offset: 0x01fd89e5, size: 2491 bytes, params: 3, frame: 42
var environment;
var r6;
var r7;
var r3;
var r13;
var r25;
var r26;
var r23;
var r12;
var r30;
var r29;
var pushType;
var r15;
var r10;
var binding;
var push;
var value4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value8;
var moduleValue;
var value16;
var value17;
var done;
var value18;
var value19;
var isEditing;
var id;
var id2;
var isEditing2;
var value20;
var getPushFeedback;
var channel_id;
var value21;
var moduleValue2;
var canReplyToMessage2;
var defaultImport;
var value22;
var moduleValue3;
var isNonModInLockedThread;
var value23;
var hasOwnProperty;
var channelStreamDetermineChangeType;
var property3;
var value24;
var value25;
var endId;
var value26;
var count;
var value27;
var SUMMARY;
var isSystemDM2;
var isSystemDM3;
var value28;
var isResourceChannelBinding;
var value29;
var isForumPost2;
var defaultImport2;
var castChannelIdAsMessageId;
var id3;
var value30;
var value31;
var value32;
var MESSAGE;
var unloadableContentEntryMessageIdsBinding;
var has;
var value33;
var value34;
var startId;
var value35;
var value36;
var value37;
var channelStreamDetermineChangeType2;
var object6;
var channelStreamDetermineChangeType3;
var object7;
var channelStreamDetermineChangeType4;
var object8;
var channelStreamDetermineChangeType5;
var moduleValue4;
const env0_0 = a0;
const property = a0[a0.length - 1];
const value2 = a1 === env0_16.length - 1;
if (a1 === 0 && messages.hasMoreAfter) {
binding = env0_13;
push = binding.push;
value4 = environment.__proto__;
Reflect.apply(push, binding, [{rowType: LoadingType.LOAD_AFTER,
changeType: forceRender ? Changeset.UPDATE : Changeset.NOOP, roleStyle: roleStyle,
isLoading: messages.loadingMore, text: intl.string(t.XBlaiC)}]);
}
let r1 = messages.hasMoreBefore && value2;
const unreadFilterBinding = unreadFilter;
const value5 = undefined;
const value6 = unreadFilterBinding(property);
const value7 = null;
if (value2) {
r6 = channel.isDM() && !messages.hasMoreBefore;
r6 = r6 && value2;
if (!r6) {
r7 = channel.isThread() && !channel.isForumPost();
r7 = r7 && !messages.hasMoreBefore;
r7 = r7 && value2;
r6 = r7;
}
r3 = r6 && true;
} else {
value8 = environment.__proto__;
moduleValue = require(3826) /* metro dependency 3826: DateUtils */;
if (moduleValue.isSameDay(property.timestamp, value2 ? value7 : env0_16[a1 + 1][0].timestamp)) {
r6 = channel.isDM() && !messages.hasMoreBefore;
r6 = r6 && value2;
if (!r6) {
r7 = channel.isThread() && !channel.isForumPost();
r7 = r7 && !messages.hasMoreBefore;
r7 = r7 && value2;
r6 = r7;
}
r3 = r6 && true;
} else {
r3 = true;
}
}
const closure = processHiddenMessageRow;
let object5 = {'roleStyle': null, 'message': null, 'isFirst': true, 'content': null, 'text': '', 'revealed': false};
object5.roleStyle = roleStyle;
object5.message = property;
object5.content = [];
binding = env0_13;
const property2 = binding[binding.length - 1];
const hasFlag = property.hasFlag;
const HIDDEN_SUSPENDED_USER = MessageFlags.HIDDEN_SUSPENDED_USER;
if (Reflect.apply(hasFlag, property, [HIDDEN_SUSPENDED_USER])) {
if (value7 == property2) {
channelStreamDetermineChangeType4 = createChannelStreamDetermineChangeType(property);
object8 = {};
copyDataProperties(object8, object5, undefined);
object8['rowType'] = RowType.SUSPENDED_USER_GROUP;
object8['changeType'] = channelStreamDetermineChangeType4;
object8['canUncollapse'] = false;
env0_13.push(object8);
r7 = object8;
} else if (property2.rowType === RowType.SUSPENDED_USER_GROUP) {
r7 = property2;
} else {
channelStreamDetermineChangeType4 = createChannelStreamDetermineChangeType(property);
object8 = {};
copyDataProperties(object8, object5, undefined);
object8['rowType'] = RowType.SUSPENDED_USER_GROUP;
object8['changeType'] = channelStreamDetermineChangeType4;
object8['canUncollapse'] = false;
env0_13.push(object8);
r7 = object8;
}
closure(r7);
r7.text = intl.formatToPlainString(t.rHRovo, {count: r7.content.length});
} else if (property.blocked) {
if (value7 == property2) {
channelStreamDetermineChangeType3 = createChannelStreamDetermineChangeType(property);
r15 = channelStreamDetermineChangeType3 === Changeset.NOOP && chatManager.getBlocked(property) ? Changeset.INSERT : channelStreamDetermineChangeType3;
object7 = {};
copyDataProperties(object7, object5, undefined);
object7['rowType'] = RowType.BLOCKED_GROUP;
object7['changeType'] = r15;
env0_13.push(object7);
r13 = object7;
} else if (property2.rowType === RowType.BLOCKED_GROUP) {
r13 = property2;
} else {
channelStreamDetermineChangeType3 = createChannelStreamDetermineChangeType(property);
r15 = channelStreamDetermineChangeType3 === Changeset.NOOP && chatManager.getBlocked(property) ? Changeset.INSERT : channelStreamDetermineChangeType3;
object7 = {};
copyDataProperties(object7, object5, undefined);
object7['rowType'] = RowType.BLOCKED_GROUP;
object7['changeType'] = r15;
env0_13.push(object7);
r13 = object7;
}
closure(r13);
r13.text = intl.formatToPlainString(t['+FcYM/'], {count: r13.content.length});
} else if (property.ignored) {
if (value7 == property2) {
channelStreamDetermineChangeType2 = createChannelStreamDetermineChangeType(property);
r15 = channelStreamDetermineChangeType2 === Changeset.NOOP && chatManager.getIgnored(property) ? Changeset.INSERT : channelStreamDetermineChangeType2;
object6 = {};
copyDataProperties(object6, object5, undefined);
object6['rowType'] = RowType.IGNORED_GROUP;
object6['changeType'] = r15;
env0_13.push(object6);
r13 = object6;
} else if (property2.rowType === RowType.IGNORED_GROUP) {
r13 = property2;
} else {
channelStreamDetermineChangeType2 = createChannelStreamDetermineChangeType(property);
r15 = channelStreamDetermineChangeType2 === Changeset.NOOP && chatManager.getIgnored(property) ? Changeset.INSERT : channelStreamDetermineChangeType2;
object6 = {};
copyDataProperties(object6, object5, undefined);
object6['rowType'] = RowType.IGNORED_GROUP;
object6['changeType'] = r15;
env0_13.push(object6);
r13 = object6;
}
closure(r13);
r13.text = intl.formatToPlainString(t['VFWjc+'], {count: r13.content.length});
} else {
value16 = _createForOfIteratorHelperLoose_88187(a0);
value17 = value16();
done = value17.done;
if (!done) {
r13 = value17;
while (true) {
value18 = r13.value;
value19 = value18 !== property;
isEditing = EditMessageStore.isEditing;
id = channel.id;
id2 = value18.id;
isEditing2 = Reflect.apply(isEditing, EditMessageStore, [id, id2]);
if (isEditing2) {
r25 = isEditing2;
} else {
value20 = replyingMessageId === value18.id;
r25 = value20;
}
getPushFeedback = PushFeedbackStore.getPushFeedback;
channel_id = value18.channel_id;
id = value18.id;
value21 = Reflect.apply(getPushFeedback, PushFeedbackStore, [channel_id, id]);
moduleValue2 = require(8228) /* metro dependency 8228: canReplyToMessage */;
canReplyToMessage2 = moduleValue2.canReplyToMessage(channel, value18);
defaultImport = importDefault(5260) /* metro dependency 5260: canEditMessage */;
value22 = defaultImport(value18, currentUserId);
if (!value22) {
r26 = value22;
continue;
}
moduleValue3 = require(6860) /* metro dependency 6860: ThreadHooks */;
isNonModInLockedThread = moduleValue3.isNonModInLockedThread;
value23 = !Reflect.apply(isNonModInLockedThread, moduleValue3, [channel]);
r26 = value23;
binding = env0_14;
hasOwnProperty = binding.hasOwnProperty;
id = value18.id;
if (Reflect.apply(hasOwnProperty, binding, [id])) {
property3 = env0_14[value18.id];
value24 = chatManager.determineChangeTypeForUploadProgress(property3);
r23 = value24;
} else {
channelStreamDetermineChangeType = createChannelStreamDetermineChangeType(value18, true);
r23 = channelStreamDetermineChangeType;
}
value25 = value7 != selectedSummary;
if (!value25) {
r12 = value25;
continue;
}
endId = selectedSummary.endId;
id = value18.id;
value26 = endId === id;
r12 = value26;
if (!r12) {
continue;
}
count = selectedSummary.count;
value27 = count > 1;
r12 = value27;
if (!r12) {
continue;
}
binding = env0_13;
push = binding.push;
object5 = {};
SUMMARY = SeparatorType.SUMMARY;
object5.rowType = SUMMARY;
object5.changeType = createChannelStreamDetermineChangeType(value18);
object5.roleStyle = roleStyle;
object5.summary = selectedSummary;
object5.isBeforeContent = false;
Reflect.apply(push, binding, [object5]);
binding = env0_13;
push = binding.push;
object5 = {};
object5.roleStyle = roleStyle;
object5.message = value18;
isSystemDM2 = channel.isSystemDM();
if (!isSystemDM2) {
r30 = isSystemDM2;
continue;
}
isSystemDM3 = value18.isSystemDM();
r30 = isSystemDM3;
object5.isSystemDM = r30;
object5.isFirst = value18 === property;
object5.isEditing = r25;
value28 = !value19;
if (value19) {
r25 = value28;
continue;
}
value29 = !isResourceChannel;
r25 = value29;
if (!r25) {
continue;
}
if (r3) {
r29 = r3;
continue;
}
r29 = value6;
continue;
if (r29) {
continue;
}
r29 = r1;
continue;
r25 = r29;
object5.separatorBefore = r25;
object5.canAddNewReactions = canAddNewReactions;
isForumPost2 = channel.isForumPost();
if (!isForumPost2) {
r25 = isForumPost2;
continue;
}
id = value18.id;
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
castChannelIdAsMessageId = defaultImport2.castChannelIdAsMessageId;
id3 = channel.id;
value30 = id === Reflect.apply(castChannelIdAsMessageId, defaultImport2, [id3]);
r25 = value30;
object5.alwaysShowAddReaction = r25;
object5.renderContentOnly = isResourceChannel;
if (value7 == value21) {
pushType = value5;
continue;
}
pushType = value21.pushType;
object5.pushFeedbackType = pushType;
isResourceChannelBinding = isResourceChannel;
value31 = !isResourceChannelBinding;
if (isResourceChannelBinding) {
r25 = value31;
continue;
}
r25 = canReplyToMessage2;
continue;
object5.canReply = r25;
isResourceChannelBinding = isResourceChannel;
value32 = !isResourceChannelBinding;
if (isResourceChannelBinding) {
r25 = value32;
continue;
}
r25 = r26;
continue;
object5.canEdit = r25;
MESSAGE = RowType.MESSAGE;
object5.rowType = MESSAGE;
object5.changeType = r23;
if (value7 == unloadableContentEntryMessageIds) {
r23 = value5;
continue;
}
unloadableContentEntryMessageIdsBinding = unloadableContentEntryMessageIds;
has = unloadableContentEntryMessageIdsBinding.has;
id = value18.id;
value33 = Reflect.apply(has, unloadableContentEntryMessageIdsBinding, [id]);
r23 = value33;
object5.showContentInventoryEntryFallbackEmbed = r23;
Reflect.apply(push, binding, [object5]);
value34 = value7 != selectedSummary;
if (!value34) {
r12 = value34;
continue;
}
startId = selectedSummary.startId;
id = value18.id;
value35 = startId === id;
r12 = value35;
if (!r12) {
continue;
}
count = selectedSummary.count;
value36 = count > 1;
r12 = value36;
if (!r12) {
continue;
}
binding = env0_13;
push = binding.push;
object5 = {};
SUMMARY = SeparatorType.SUMMARY;
object5.rowType = SUMMARY;
object5.changeType = createChannelStreamDetermineChangeType(value18);
object5.roleStyle = roleStyle;
object5.summary = selectedSummary;
object5.isBeforeContent = true;
Reflect.apply(push, binding, [object5]);
value37 = value16();
done = value37.done;
if (done) {
break;
}
r13 = value37;
continue;
}
}
}
if (r3) {
if (!isResourceChannel) {
channelStreamDetermineChangeType5 = createChannelStreamDetermineChangeType(property);
r10 = channelStreamDetermineChangeType5 !== Changeset.UPDATE ? channelStreamDetermineChangeType5 : Changeset.NOOP;
moduleValue4 = require(3826) /* metro dependency 3826: DateUtils */;
env0_13.push({rowType: SeparatorType.DAY, changeType: r10, roleStyle: roleStyle,
text: moduleValue4.dateFormat(property.timestamp, 'LL')});
}
}
if (value6 && !isResourceChannel) {
binding = env0_13;
push = binding.push;
object5 = {};
object5.rowType = SeparatorType.UNREAD;
object5.changeType = createChannelStreamDetermineChangeType(property);
object5.roleStyle = roleStyle;
object5.text = intl.string(t.q7hm3m).toUpperCase();
Reflect.apply(push, binding, [object5]);
}
r1 = r1 && !isResourceChannel;
if (r1) {
env0_13.push({rowType: LoadingType.LOAD_BEFORE, changeType: forceRender ? Changeset.UPDATE : Changeset.NOOP,
roleStyle: roleStyle, isLoading: messages.loadingMore, text: intl.string(t.XBlaiC)});
}
return value5;
}
function processHiddenMessageRow(a0) { // fn#88196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:2732, offset: 0x01fd93a0, size: 287 bytes, params: 2, frame: 21
var r4;
var r3;
var r10;
var value6;
var channelStreamDetermineChangeType;
var NOOP;
var value7;
var changeType;
var value8;
var UPDATE;
var content;
var unshift;
var object2;
var MESSAGE;
var isSystemDM2;
var isSystemDM3;
var value9;
const value3 = _createForOfIteratorHelperLoose_88187(env0_0);
const value4 = value3();
let done = value4.done;
if (!done) {
r4 = value4;
while (true) {
value6 = r4.value;
channelStreamDetermineChangeType = createChannelStreamDetermineChangeType(value6);
NOOP = Changeset.NOOP;
value7 = channelStreamDetermineChangeType !== NOOP;
if (value7) {
changeType = a0.changeType;
value8 = changeType === Changeset.NOOP;
r3 = value8;
} else {
r3 = value7;
}
if (!r3) {
continue;
}
UPDATE = Changeset.UPDATE;
a0.changeType = UPDATE;
content = a0.content;
unshift = content.unshift;
object2 = {};
MESSAGE = RowType.MESSAGE;
object2.rowType = MESSAGE;
NOOP = Changeset.NOOP;
object2.changeType = NOOP;
object2.roleStyle = roleStyle;
object2.message = value6;
isSystemDM2 = channel.isSystemDM();
if (!isSystemDM2) {
r10 = isSystemDM2;
continue;
}
isSystemDM3 = value6.isSystemDM();
r10 = isSystemDM3;
object2.isSystemDM = r10;
object2.isFirst = value6 === env0_1;
object2.canAddNewReactions = canAddNewReactions;
Reflect.apply(unshift, content, [object2]);
value9 = value3();
done = value9.done;
if (done) {
break;
}
r4 = value9;
continue;
}
}
const binding = env0_1;
a0.revealed = binding.id === messages.revealedMessageId;
a0.context = binding.id;
return a0;
}
@@ -0,0 +1,419 @@
/* Metro module 8631; source: modules/messages/native/emoji/CustomEmojiContent.tsx; dependencies: [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625, 566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638, 1305, 4578, 5475, 8640, 7972, 8641, 8645, 2] */
function _fun68107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6, offset: 0x01c3ec6f, size: 687 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.Pressable;
const env0_6 = value.View;
const subscriptionRoleStore = importDefault(6541) /* metro dependency 6541: SubscriptionRoleStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.UserSettingsSections;
const env0_11 = value.AnalyticEvents;
const env0_12 = value.AnalyticsPages;
const env0_13 = value.AnalyticsSections;
value = require(33) /* metro dependency 33 */;
const env0_14 = value.jsx;
const env0_15 = value.jsxs;
const env0_16 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {nitroWheel: {'height': 32, 'width': 32}};
const CONTROL_BRAND_FOREGROUND_NEW = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND_NEW;
object2.nitroWheelPurple = {tintColor: CONTROL_BRAND_FOREGROUND_NEW};
object2.emojiDescriptionWrapperOuter = {'flexDirection': 'row', 'flex': 1, 'alignItems': 'center', 'gap': 8};
object2.starIcon = {'height': 32, 'width': 32, 'margin': 0, 'padding': 0, 'flex': 0};
const ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
object2.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
object2.moreMenuIcon = {'height': 32, 'width': 32, 'justifyContent': 'center', 'alignItems': 'center',
color: INTERACTIVE_ICON_DEFAULT};
object2.bottomCtaButton = {marginTop: 24};
object2.ctaDescriptionWrapper = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'flex-start', 'marginTop': 8};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.betaTag = {backgroundColor: WHITE};
const BRAND_530 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_530;
object2.betaTagTextAddPack = {color: BRAND_530};
const PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
object2.betaTagTextRemovePack = {color: PRIMARY_500};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.favoriteButtonContainer = {paddingTop: PX_4};
const env0_17 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/CustomEmojiContent.tsx');
exports.default = _default_68108;
}
function _default_68108({emojiNode, sourceType, expressionSourceApplication, expressionSourceGuild, customEmojiFromJoinedGuild, hasJoinedEmojiSourceGuild, nonce}) { // fn#68108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1227, offset: 0x01c3ef1e, size: 2595 bytes, params: 2, frame: 49
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var r19;
var r32;
var r27;
var r5;
var r16;
var moduleValue4;
var object2;
var StarOutlineIcon;
var object3;
var StarIcon;
var object5;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var jsxRuntimeEnv0_16Binding2;
var items9;
var jsxRuntimeEnv0_16Binding3;
var items11;
const _default_68108CloseActionSheet = function() {
importDefault(dependencyMap[14]).hideActionSheet();
var defaultImport2 = importDefault(dependencyMap[10]);
var CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
defaultImport2.track(CLOSE_POPOUT, {nonce: nonce});
};
let object6 = {};
const styles = useStyles();
copyDataProperties(object6, styles, undefined);
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object6, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
const guildId2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
const r15 = guildId2 != null && guildId2 === expressionSourceGuild?.id;
const env0_8 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const {isRoleSubscriptionEmoji, isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber} = env0_4.useMemo(_fun68112,
[customEmojiFromJoinedGuild, guildId2]);
const value7 = !isUnusableRoleSubscriptionEmoji;
let r1 = isUnusableRoleSubscriptionEmoji ? customEmojiFromJoinedGuild?.type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD : value7;
if (r1) {
r19 = !r1;
} else {
moduleValue4 = require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */;
r19 = moduleValue4.shouldHideGuildPurchaseEntryPoints(customEmojiFromJoinedGuild?.guildId);
}
const value10 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useIsFavoriteEmoji(guildId2,
customEmojiFromJoinedGuild);
let defaultImport2 = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
const useExperiment = defaultImport2.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'CustomEmojiContent'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value11 = DeveloperMode.useSetting();
r1 = expressionSourceGuild?.isDiscoverable();
const r9 = r1 != null && r1;
const object8 = {};
object8.page = guildId2 != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL;
const EMOJI_UPSELL_POPOUT = AnalyticsSections.EMOJI_UPSELL_POPOUT;
object8.section = EMOJI_UPSELL_POPOUT;
const emojiPopoutData = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).getEmojiPopoutData({sourceType: sourceType,
expressionSourceApplication: expressionSourceApplication, isPremium: isPremium2,
hasJoinedEmojiSourceGuild: hasJoinedEmojiSourceGuild, isRoleSubscriptionEmoji: isRoleSubscriptionEmoji,
isUnusableRoleSubscriptionEmoji: isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber: userIsRoleSubscriber,
shouldHideRoleSubscriptionCTA: r19, emojiComesFromCurrentGuild: r15, isDiscoverable: r9,
onOpenPremiumSettings: onOpenPremiumSettings});
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({emojiId: emojiNode.id,
currentGuildId: guildId2, popoutData: emojiPopoutData, emojiSourceGuildId: expressionSourceGuild?.id,
nonce: nonce});
const emojiDescription = emojiPopoutData.emojiDescription;
const type = emojiPopoutData.type;
const closure = onPress_68115;
const r8 = isUnusableRoleSubscriptionEmoji ? value7 : hasJoinedEmojiSourceGuild;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r25 = hasJoinedEmojiSourceGuild ? Reflect.apply(string, intl, [t.ohTzZH]) : Reflect.apply(string, intl,
[t['eLfh+a']]);
const EmojiPopoutType = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).EmojiPopoutType;
let JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
const value16 = type === JOIN_GUILD;
const object9 = {};
let GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
const items4 = [GET_PREMIUM];
JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
items4[1] = JOIN_GUILD;
copyDataProperties(object9, items4.includes(type) ? object6.ctaButton : object6.bottomCtaButton, undefined);
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
const object11 = {};
copyDataProperties(object11, object6.emojiContainer, undefined);
object11['marginTop'] = 8;
const value17 = ((Component) => <Component style={object6.emojiIcon} source={{uri: emojiNode.src}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
const emojiDescriptionWrapperOuter = object6.emojiDescriptionWrapperOuter;
const items7 = [<View style={object6.emojiDescriptionWrapper}><Text variant="text-md/bold" color="mobile-text-heading-primary">{':' + emojiNode.alt + ':'}</Text>{emojiDescription != null && <Text variant="text-sm/medium">{emojiDescription}</Text>}</View>];
if (r8) {
if (tidaWebformEnabled) {
r27 = null;
} else {
object2 = {};
string = intl.string;
r32 = value10 ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
object2.accessibilityLabel = r32;
object2.style = object6.moreMenuIcon;
object2.onPress = closure;
if (value10) {
StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
object5 = {};
copyDataProperties(object5, object6.starIcon, undefined);
copyDataProperties(object5, object6.starIconSelected, undefined);
r32 = <StarIcon style={object5} />;
} else {
StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
object3 = {};
copyDataProperties(object3, object6.starIconUnselected, copyDataProperties(object3, object6.starIcon,
undefined));
r32 = <StarOutlineIcon style={object3} />;
}
r27 = <Pressable {...object2}>{r32}</Pressable>;
}
} else {
r27 = null;
}
items7[1] = r27;
items7[2] = tidaWebformEnabled && value11 ? <Pressable accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)} style={object6.moreMenuIcon} onPress={onPress_68119}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</Pressable> : null;
const items8 = [<View style={object11}>{value17}<View style={emojiDescriptionWrapperOuter}>{items7}</View></View>];
GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
items8[1] = type === GET_PREMIUM ? renderPremiumUpsellButton() : value16 ? <View style={object9}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)} size="md" grow onPress={onPress_68123} /></View> : null;
if (hasJoinedEmojiSourceGuild) {
if (expressionSourceGuild == null) {
r5 = null;
} else {
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
items9 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
r5 = <>{items9}</>;
}
} else if (r9) {
if (expressionSourceGuild == null) {
r5 = null;
} else {
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
items9 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
r5 = <>{items9}</>;
}
} else {
r5 = null;
}
items8[2] = r5;
if (r8) {
if (tidaWebformEnabled) {
jsxRuntimeEnv0_16Binding3 = jsxRuntimeEnv0_16;
items11 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
var viewBindingProps = {style: object6.favoriteButtonContainer};
object6 = {};
string = intl.string;
r16 = value10 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67]);
object6.text = r16;
r16 = value10 ? 'tertiary' : 'primary';
object6.variant = r16;
object6.size = 'md';
object6.onPress = closure;
items11[1] = <View {...viewBindingProps}><Button {...object6} /></View>;
r5 = <>{items11}</>;
} else {
r5 = null;
}
} else {
r5 = null;
}
items8[3] = r5;
return (
<>
{items8}
</>
);
}
function _fun68112() { // fn#68112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1748, offset: 0x01c3f9a8, size: 212 bytes, params: 1, frame: 20
var r0;
var type;
var value2;
var object2;
var moduleValue;
var isPurchasableRoleSubscriptionEmoji;
var moduleValue2;
let customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
if (customEmojiFromJoinedGuildBinding == null) {
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
'userIsRoleSubscriber': false};
} else {
type = customEmojiFromJoinedGuild.type;
value2 = environment.__proto__;
if (type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD) {
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
'userIsRoleSubscriber': false};
} else {
object2 = {};
moduleValue = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
isPurchasableRoleSubscriptionEmoji = moduleValue.isPurchasableRoleSubscriptionEmoji;
customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
object2.isRoleSubscriptionEmoji = Reflect.apply(isPurchasableRoleSubscriptionEmoji, moduleValue,
[customEmojiFromJoinedGuildBinding]);
moduleValue2 = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
object2.isUnusableRoleSubscriptionEmoji = moduleValue2.isUnusableRoleSubscriptionEmoji(customEmojiFromJoinedGuildBinding,
guildId ?? undefined);
object2.userIsRoleSubscriber = SubscriptionRoleStore.getUserSubscriptionRoles(customEmojiFromJoinedGuild.guildId).size > 0;
r0 = object2;
}
}
return r0;
}
function onOpenPremiumSettings() { // fn#68113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:2940, owner: _default_68108.onOpenPremiumSettings, offset: 0x01c3fa7c, size: 151 bytes, params: 1, frame: 18
_default_68108CloseActionSheet();
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
Reflect.apply(track, defaultImport, [PREMIUM_PROMOTION_OPENED, {location_page: env0_10.page,
location_section: env0_10.section}]);
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = openUserSettingsModule.openUserSettings;
const PREMIUM = UserSettingsSections.PREMIUM;
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: PREMIUM, params: {analyticsLocation: env0_10}}]);
}
function renderStarIcon({isSelected}) { // fn#68114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3305, owner: _default_68108.renderStarIcon, offset: 0x01c3fb13, size: 158 bytes, params: 2, frame: 16
const object2 = {};
const binding = env0_5;
copyDataProperties(object2, binding.starIcon, undefined);
if (isSelected) {
copyDataProperties(object2, binding.starIconSelected, undefined);
value = environment.__proto__;
const StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
return <StarIcon style={object2} />;
}
copyDataProperties(object2, binding.starIconUnselected, undefined);
const StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
return <StarOutlineIcon style={object2} />;
}
function _default_68108OnPress() { // fn#68115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3528, owner: _default_68108.onPress, offset: 0x01c3fbb1, size: 194 bytes, params: 1, frame: 19
var value;
_default_68108CloseActionSheet();
const closure = content_68116;
const binding = env0_9;
const emojiActionCreatorsModule = require(8629) /* metro dependency 8629: EmojiActionCreators */;
if (binding) {
emojiActionCreatorsModule.unfavoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_UNFAVORITED', icon: function() {
return renderStarIcon({isSelected: false});
}, content: closure});
} else {
emojiActionCreatorsModule.favoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_FAVORITED', icon: icon_68118, content: closure});
}
}
function _default_68108OnPress_68119() { // fn#68119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4016, owner: _default_68108.onPress, offset: 0x01c3fd3f, size: 107 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[14]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[33], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'EmojiOptionsActionSheet', {emojiSrc: emojiNode.src}, 'stack']);
}
function renderNitroWheel() { // fn#68120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4270, owner: _default_68108.renderNitroWheel, offset: 0x01c3fdaa, size: 129 bytes, params: 1, frame: 15
var r4;
var object2;
let value = a0;
let shouldTintPurple = (value !== undefined ? value : {shouldTintPurple: false}).shouldTintPurple;
shouldTintPurple = !(shouldTintPurple === undefined) && shouldTintPurple;
const binding = env0_5;
const nitroWheel = binding.nitroWheel;
if (shouldTintPurple) {
object2 = {};
copyDataProperties(object2, nitroWheel, undefined);
copyDataProperties(object2, binding.nitroWheelPurple, undefined);
r4 = object2;
} else {
r4 = nitroWheel;
}
value = environment.__proto__;
const NitroWheel = (require(1305) /* metro dependency 1305: native */).NitroWheel;
return <NitroWheel style={r4} />;
}
function renderPremiumUpsellButton() { // fn#68121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4602, owner: _default_68108.renderPremiumUpsellButton, offset: 0x01c3fe2b, size: 167 bytes, params: 1, frame: 18
const typeBinding = type;
const EmojiPopoutType = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).EmojiPopoutType;
const GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
return typeBinding !== GET_PREMIUM ? null : <View style={env0_15}>{((Button) => <Button icon={renderNitroWheel()} text={env0_11.text} variant="active" size="md" grow onPress={onPress_68122} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
}
function _default_68108OnPress_68123() { // fn#68123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6179, owner: _default_68108.onPress, offset: 0x01c3ffac, size: 65 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = undefined;
const guildUtilsModule = require(8640) /* metro dependency 8640: GuildUtils */;
guildUtilsModule.handleJoinGuild(expressionSourceGuild == null ? value : expressionSourceGuild.id);
return value;
}
function onPressContent() { // fn#68116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3564, owner: _default_68108.onPress.content, offset: 0x01c3fc73, size: 154 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const binding = env1_9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<Text style={{'marginLeft': 8, 'marginTop': 2}} variant="text-md/bold">
{binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])}
</Text>
);
}
function onPressIcon_68118() { // fn#68118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3933, owner: _default_68108.onPress.icon, offset: 0x01c3fd26, size: 25 bytes, params: 1, frame: 11
return renderStarIcon({isSelected: true});
}
function renderPremiumUpsellButtonOnPress() { // fn#68122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4772, owner: _default_68108.renderPremiumUpsellButton.onPress, offset: 0x01c3fed2, size: 218 bytes, params: 1, frame: 20
var r1;
var defaultImport;
var defaultImport2;
var pushLazy;
let value = environment.__proto__;
const currentUserBinding = currentUser;
const binding = env1_10;
const analyticsLocationsBinding = analyticsLocations;
const _default_68108CloseActionSheetBinding = _default_68108CloseActionSheet;
value = currentUserBinding == null;
if (value) {
r1 = value;
} else {
value = environment.__proto__.__proto__;
value = importDefault(dependencyMap[9]);
value = value.canUseEmojisEverywhere(currentUserBinding);
r1 = value;
}
if (!r1) {
_default_68108CloseActionSheetBinding();
value = environment.__proto__.__proto__;
defaultImport = importDefault(dependencyMap[10]);
defaultImport.track(AnalyticEvents.PREMIUM_PROMOTION_OPENED, {location_page: binding.page,
location_section: binding.section});
defaultImport2 = importDefault(dependencyMap[11]);
pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocation: binding,
analyticsLocations: analyticsLocationsBinding}]);
}
}
@@ -0,0 +1,88 @@
/* Metro module 8645; source: modules/messages/native/emoji/EmojiGrid.tsx; dependencies: [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649, 2] */
function _fun68150(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:6, offset: 0x01c41574, size: 301 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'height': 40, 'width': 40};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{gridEmojiFastImage: object,
gridEmojiText: {'fontSize': 18, 'lineHeight': 44}, emojiGridRowContainer: {'marginTop': 16,
'flexDirection': 'row'}, emojiGridContainer: {'marginTop': 8, 'alignItems': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/EmojiGrid.tsx');
exports.EmojiGrid = EmojiGrid;
}
function Emoji_68151({guildEmoji}) { // fn#68151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:389, offset: 0x01c416a1, size: 207 bytes, params: 2, frame: 21
var r6;
var value;
const styles = useStyles();
const Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
if (guildEmoji.id == null) {
value = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
value = value.getURL(guildEmoji.name);
r6 = value;
} else {
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
value = value.getEmojiURL({id: guildEmoji.id, animated: guildEmoji.animated, size: 48});
r6 = value;
}
return (
<Emoji
src={r6}
fastImageStyle={styles.gridEmojiFastImage}
textEmojiStyle={styles.gridEmojiText}
name={guildEmoji.name}
key={guildEmoji.id}
/>
);
}
function EmojiGrid({expressionSourceGuild, doNotDisplayEmojiIds = [], numberToShow, maxPerRow}) { // fn#68152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:721, offset: 0x01c41770, size: 310 bytes, params: 2, frame: 20
numberToShow = numberToShow === undefined ? 10 : numberToShow;
maxPerRow = maxPerRow === undefined ? 5 : maxPerRow;
const object2 = {};
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const styles = useStyles();
copyDataProperties(object2, styles, undefined);
const value8 = (importDefault(8646) /* metro dependency 8646 */)((expressionSourceGuild?.emojis ?? []).slice(0,
numberToShow + 1).filter(_fun68153).slice(0, numberToShow), maxPerRow);
const emojiGridContainer = object2.emojiGridContainer;
const GappedList = (require(8649) /* metro dependency 8649: LayoutUtils */).GappedList;
return (
<View style={emojiGridContainer}>
<GappedList gap={8}>
{value8.map(_fun68154)}
</GappedList>
</View>
);
}
function _fun68153({id}) { // fn#68153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:931, offset: 0x01c418a6, size: 30 bytes, params: 2, frame: 11
const binding = env0_0;
return !binding.includes(id);
}
function _fun68154(a0, a1) { // fn#68154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1074, offset: 0x01c418c4, size: 115 bytes, params: 3, frame: 19
const emojiGridRowContainer = env0_1.emojiGridRowContainer;
const GappedList = (require(8649) /* metro dependency 8649: LayoutUtils */).GappedList;
return (
<View style={emojiGridRowContainer} key={a1}>
<GappedList gap={32}>
{a0.map(_fun68155)}
</GappedList>
</View>
);
}
function _fun68155(a0) { // fn#68155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1171, offset: 0x01c41937, size: 37 bytes, params: 2, frame: 15
return <Emoji_68151 guildEmoji={a0} key={a0.id} />;
}
@@ -0,0 +1,31 @@
/* Metro module 8637; source: modules/messages/native/emoji/EmojiOptionsActionSheet.tsx; dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */
function _fun68132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:6, offset: 0x01c4074e, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/EmojiOptionsActionSheet.tsx');
exports.default = EmojiOptionsActionSheet;
}
function EmojiOptionsActionSheet({emojiSrc}) { // fn#68133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:222, offset: 0x01c407dc, size: 242 bytes, params: 2, frame: 23
const value2 = env0_3.useCallback(_fun68134, [emojiSrc]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object.icon = <LinkIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cIoudn);
object.onPress = value2;
return (
<ActionSheet>
<TableRowGroup hasIcons>
<TableRow {...object} />
</TableRowGroup>
</ActionSheet>
);
}
@@ -0,0 +1,108 @@
/* Metro module 8641; source: modules/messages/native/emoji/ExpressionGuildDetails.tsx; dependencies: [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305, 2] */
function _fun68141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:6, offset: 0x01c40ad1, size: 518 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(6820) /* metro dependency 6820: ExpressionSourceRecord */).ExpressionSourceGuildRecord;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.guildDetailsContainer = {flexDirection: 'column'};
object2.guildDetailsContent = {'flexDirection': 'row', 'marginTop': 8, 'alignItems': 'center'};
const object4 = {'width': 40, 'height': 40, 'borderRadius': null, 'marginRight': 12};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.guildIcon = object4;
object2.guildNameAndOnlineMembers = {flexDirection: 'column'};
object2.guildNameWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'marginRight': 32};
object2.guildPartnerIcon = {marginRight: 8};
object2.guildDescriptionSection = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
const object5 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object5.backgroundColor = BACKGROUND_MOD_MUTED;
object2.dotSeparator = object5;
const object8 = {'borderRadius': null, 'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 4,
'paddingBottom': 2};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object8.borderColor = BORDER_STRONG;
object2.joinGuildButton = object8;
const env0_8 = Reflect.apply(createStyles, value, [object2]);
const closure = ExpressionGuildDetails;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/ExpressionGuildDetails.tsx');
exports.default = closure;
exports.ExpressionGuildDetails = closure;
}
function ExpressionGuildDetails({guild, title, hasJoinedGuild, showingJoinGuildCta}) { // fn#68142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:959, offset: 0x01c40cd7, size: 1149 bytes, params: 2, frame: 39
var r7;
var r11;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var jsxRuntimeEnv0_6Binding;
var items5;
const styles = useStyles();
const fromGuildType = ExpressionSourceGuildRecord.createFromGuildType(guild);
const isDiscoverable2 = fromGuildType.isDiscoverable();
if (isDiscoverable2) {
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
} else if (hasJoinedGuild) {
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
} else {
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r7 = ((Component) => <Component style={styles.guildIcon} source={defaultImport.getGuildIconSource({id: guild.id,
icon: guild.icon, canAnimate: true,
size: 32})} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="eyebrow" color="text-default">{title}</Text>;
const GuildBadge = importDefault(8642) /* metro dependency 8642: GuildBadge */;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
const view = <View style={styles.guildNameWrapper}><GuildBadge guild={guild} style={styles.guildPartnerIcon} size={REFRESH_SMALL_16} disableColor /><Text variant="text-md/bold" color="mobile-text-heading-primary">{guild.name}</Text></View>;
if (isDiscoverable2) {
if (fromGuildType.presenceCount != null) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items5 = [<Text variant="text-xs/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['LC+S+m'],
{membersOnline: fromGuildType.presenceCount})}</Text>];
items5[1] = <View style={styles.dotSeparator} />;
items5[2] = hasJoinedGuild || showingJoinGuildCta ? <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.inyJqO)}</Text> : ((PressableOpacity) => <PressableOpacity style={styles.joinGuildButton} onPress={onPress_68143}><Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
r11 = <>{items5}</>;
} else {
r11 = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}</Text>;
}
} else {
r11 = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}</Text>;
}
return (
<View style={styles.guildDetailsContainer}>
{text}
<View style={styles.guildDetailsContent}>
{r7}
<View style={styles.guildNameAndOnlineMembers}>
{view}
<View style={styles.guildDescriptionSection}>
{r11}
</View>
</View>
</View>
</View>
);
}
function ExpressionGuildDetailsOnPress() { // fn#68143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:2196, owner: ExpressionGuildDetails.onPress, offset: 0x01c41154, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(8640) /* metro dependency 8640: GuildUtils */;
return value.handleJoinGuild(guild.id);
}
@@ -0,0 +1,68 @@
/* Metro module 8623; source: modules/messages/native/emoji/MessageEmojiActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631, 2] */
function _fun68055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:6, offset: 0x01c3cfde, size: 278 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
importAll(dependencyMap[value]);
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const value3 = 16;
object.paddingHorizontal = value3;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object.paddingBottom = platformUtilsModule.isAndroid() ? value3 : value;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{contentWrapper: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/MessageEmojiActionSheet.tsx');
exports.default = _default_68060;
}
function MessageStandardEmojiActionSheet({emojiNode}) { // fn#68056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:293, offset: 0x01c3d0f4, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = (require(491) /* metro dependency 491 */).v4();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet startExpanded onDismiss={onDismiss_68057}>
<View style={styles.contentWrapper}>
{((Component) => <Component emojiNode={emojiNode} nonce={value2} />)(importDefault(8624) /* metro dependency 8624: StandardEmojiContent */)}
</View>
</BottomSheet>
);
}
function MessageCustomEmojiActionSheet({emojiNode}) { // fn#68058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:553, offset: 0x01c3d1df, size: 291 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(8630) /* metro dependency 8630: useEmojiAndSource */).useEmojiAndSource({emojiId: emojiNode.id});
const sourceType = value2.sourceType;
const expressionSourceGuild = value2.expressionSourceGuild;
const expressionSourceApplication = value2.expressionSourceApplication;
const hasJoinedEmojiSourceGuild = value2.hasJoinedEmojiSourceGuild;
const emoji = value2.emoji;
if (value2.isFetching) {
return null;
}
const value3 = (require(491) /* metro dependency 491 */).v4();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet startExpanded onDismiss={onDismiss_68059}>
<View style={styles.contentWrapper}>
{((Component) => <Component emojiNode={emojiNode} sourceType={sourceType} expressionSourceApplication={expressionSourceApplication} expressionSourceGuild={expressionSourceGuild} customEmojiFromJoinedGuild={emoji} hasJoinedEmojiSourceGuild={hasJoinedEmojiSourceGuild} nonce={value3} />)(importDefault(8631) /* metro dependency 8631: CustomEmojiContent */)}
</View>
</BottomSheet>
);
}
function _default_68060({emojiNode}) { // fn#68060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:1107, offset: 0x01c3d302, size: 69 bytes, params: 2, frame: 15
return 'surrogate' in emojiNode ? <MessageStandardEmojiActionSheet emojiNode={emojiNode} /> : <MessageCustomEmojiActionSheet emojiNode={emojiNode} />;
}
function MessageStandardEmojiActionSheetOnDismiss() { // fn#68057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:393, owner: MessageStandardEmojiActionSheet.onDismiss, offset: 0x01c3d1a1, size: 62 bytes, params: 1, frame: 15
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
Reflect.apply(track, defaultImport, [CLOSE_POPOUT, {nonce: env0_0}]);
}
@@ -0,0 +1,104 @@
/* Metro module 8624; source: modules/messages/native/emoji/StandardEmojiContent.tsx; dependencies: [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244, 7972, 4578, 8629, 2] */
function _fun68061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:6, offset: 0x01c3d347, size: 291 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const env0_9 = Reflect.apply(createStyles, value, [{emojiSurrogate: {'lineHeight': 48, 'fontSize': 40, 'margin': 8},
ctaContainer: {paddingTop: PX_4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/StandardEmojiContent.tsx');
exports.default = _default_68063;
}
function Emoji({surrogate}) { // fn#68062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:294, offset: 0x01c3d46a, size: 256 bytes, params: 2, frame: 21
var r4;
const object2 = {};
var value;
const styles = useStyles();
copyDataProperties(object2, styles, undefined);
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const uRL = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(surrogate);
const emojiWrapper = object2.emojiWrapper;
if (uRL !== '') {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={object2.emojiIcon} resizeMode="contain" source={{uri: uRL}} />)(value);
r4 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r4 = <Text style={object2.emojiSurrogate} variant="text-md/medium">{surrogate}</Text>;
}
return (
<View style={emojiWrapper}>
{r4}
</View>
);
}
function _default_68063({emojiNode, nonce}) { // fn#68063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:608, offset: 0x01c3d56a, size: 695 bytes, params: 2, frame: 32
const object2 = {};
const styles = useStyles();
copyDataProperties(object2, styles, undefined);
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
undefined);
const guildId = SelectedGuildStore.getGuildId();
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({currentGuildId: guildId,
nonce: nonce});
const value4 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useIsFavoriteEmoji(guildId,
env0_3.useMemo(_fun68064, [emojiNode.surrogate]));
const value5 = (importDefault(8627) /* metro dependency 8627: useMaybeAddReactionMarketingEasterEggNote */)(emojiNode.content);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const emojiContainer = object2.emojiContainer;
const emoji = <Emoji surrogate={emojiNode.surrogate} />;
const emojiDescriptionWrapper = object2.emojiDescriptionWrapper;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-md/bold" color="mobile-text-heading-primary">{value5}</Text>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items4 = [<View style={emojiContainer}>{emoji}<View style={emojiDescriptionWrapper}>{text}<Text variant="text-sm/medium">{Reflect.apply(string,
intl, [t.sXdH8c])}</Text></View></View>];
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items4[1] = <FormDivider style={object2.divider} />;
const ctaContainer = object2.ctaContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items4[2] = <View style={ctaContainer}><Button text={value4 ? Reflect.apply(string, intl,
[t.Ay49KA]) : Reflect.apply(string, intl,
[t.nNsr67])} variant={value4 ? 'tertiary' : 'primary'} onPress={onPress_68065} /></View>;
return (
<>
{items4}
</>
);
}
function _fun68064() { // fn#68064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:780, offset: 0x01c3d821, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
return value.convertSurrogateToBase(emojiNode.surrogate);
}
function _default_68063OnPress() { // fn#68065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:1450, owner: _default_68063.onPress, offset: 0x01c3d854, size: 69 bytes, params: 1, frame: 13
const binding = env0_2;
const emojiActionCreatorsModule = require(8629) /* metro dependency 8629: EmojiActionCreators */;
if (binding) {
emojiActionCreatorsModule.unfavoriteEmoji(env0_1);
} else {
emojiActionCreatorsModule.favoriteEmoji(env0_1);
}
}
@@ -0,0 +1,29 @@
/* Metro module 8625; source: modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx; dependencies: [4501, 697, 2] */
function _fun68066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8810:6, offset: 0x01c3d899, size: 320 bytes, params: 8, frame: 22
var object4;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {emojiContainer: {'flexDirection': 'row', 'alignItems': 'center'},
emojiDescriptionWrapper: {'flexDirection': 'column', 'flex': 1}, emojiWrapper: {'marginLeft': -8,
'marginRight': 8}};
const object5 = {'width': 40, 'height': 40, 'marginRight': 12, 'borderRadius': null, 'resizeMode': 'contain'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.emojiIcon = object5;
const object6 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object6.marginLeft = 0;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object6.height = 0.5;
object4.divider = object6;
object4.ctaButton = {marginTop: 16};
value = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx');
exports.useSharedMessageEmojiStyles = value;
}
@@ -0,0 +1,14 @@
/* Metro module 11343; source: modules/messages/native/getEmbeddedActivityKey.tsx; dependencies: [2] */
function _fun86734(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11529:6, offset: 0x01f9e1db, size: 102 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/getEmbeddedActivityKey.tsx');
exports.default = function(a0) {
return '' + a0.location.id + ':' + a0.applicationId + ':' + a0.launchId;
};
exports.parseEmbeddedActivityKey = function(a0) {
var value = a0.split(':');
return value.length < 3 ? null : {channelId: value[0], applicationId: value[1], instanceId: value[2]};
};
}
@@ -0,0 +1,45 @@
/* Metro module 11379; source: modules/messages/native/handlers/handleMessagesLongPressChannel.tsx; dependencies: [4800, 9862, 2] */
function _fun87227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:6, offset: 0x01fb47cd, 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/messages/native/handlers/handleMessagesLongPressChannel.tsx');
exports.handleMessagesLongPressChannel = handleMessagesLongPressChannel;
}
function handleMessagesLongPressChannel({data}) { // fn#87228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:226, offset: 0x01fb4834, size: 137 bytes, params: 2, frame: 18
var r6;
var value;
const guildId = data.guildId;
const channelId = data.channelId;
const messageId = data.messageId;
const originalLink = data.originalLink;
if (channelId != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
}
} else if (originalLink != null) {
if (originalLink != null) {
r6 = originalLink;
} else {
value = require(4800) /* metro dependency 4800: ChannelUtils */;
value = value.getChannelPermalink(guildId, channelId, messageId);
r6 = value;
}
if (r6 != null) {
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
guildId: guildId,
channelId: channelId, messageId: messageId});
}
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,15 @@
/* Metro module 11395; source: modules/messages/native/handlers/handleMessagesTapGameMention.tsx; dependencies: [9959, 9963, 2] */
function _fun87325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11581:6, offset: 0x01fb8956, 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/messages/native/handlers/handleMessagesTapGameMention.tsx');
exports.handleMessagesTapGameMention = function({gameId}) {
var defaultImport = importDefault(dependencyMap[0]);
var object = {gameId: gameId};
object.gameProfileModalChecks = {shouldOpenGameProfile: true, gameId: gameId};
object.source = require(dependencyMap[1]).GameProfileSources.GameMention;
defaultImport.openGameProfileModal(object);
};
}
@@ -0,0 +1,468 @@
/* Metro module 11348; source: modules/messages/native/handlers/handleMessagesTapImage.tsx; dependencies: [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647, 2] */
function _fun86899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:6, offset: 0x01fa6531, size: 172 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapImage.tsx');
exports.handleMessagesTapImage = handleMessagesTapImage;
}
function handleMessagesTapImage({tapImageData, allowWithinModal, message, messageChannel, selectedChannelId, showContextName}) { // fn#86900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:275, offset: 0x01fa65dd, size: 1476 bytes, params: 2, frame: 42
var environment;
var r17;
var r16;
var r26;
var r23;
var components;
var r6;
var r7;
var value2;
var moduleValue;
var markPortalAlive;
var moduleValue2;
var messageReference;
var getMessageByReference;
var message2;
var property;
var length;
var moduleValue3;
var extractMediaFromAttachment;
var guild_id;
var url;
var moduleValue4;
var value6;
var value7;
var moduleValue5;
var flattenSource;
var value8;
var accessoryType;
var mediaViewIndex;
var mediaIndex;
var value9;
var noCarousel;
var moduleValue6;
var setMediaSourcePortal;
var value10;
var object;
var moduleValue7;
var embeds;
var find;
var value11;
var moduleValue8;
var extractMediaSourcesFromComponent;
var moduleValue9;
var asComponentId;
var value12;
var sources;
var initialIndex;
var moduleValue10;
var moduleValue11;
var extractMediaSourcesFromEmbed;
var value13;
var binding;
var moduleValue12;
var some;
var value14;
var moduleValue13;
var openMediaModal;
var id;
var moduleValue14;
var computeChannelName;
var channelName;
var moduleValue15;
var getChannelIcon;
var value15;
var defaultImport;
var Error;
var concat;
const index = tapImageData.index;
const type2 = tapImageData.type;
const layout = tapImageData.layout;
const portal = tapImageData.portal;
const embedIndex = tapImageData.embedIndex;
const componentId = tapImageData.componentId;
const componentMediaIndex = tapImageData.componentMediaIndex;
const embedId = tapImageData.embedId;
const value = undefined;
reducibleJoin2: while (true) {
if (portal == null) {
break reducibleJoin2;
}
value2 = environment;
moduleValue = require(9548) /* metro dependency 9548: NativePortalView */;
markPortalAlive = moduleValue.markPortalAlive;
Reflect.apply(markPortalAlive, moduleValue, [portal]);
break reducibleJoin2;
}
if (allowWithinModal !== true) {
moduleValue2 = require(9877) /* metro dependency 9877: isAlertOrActionSheetOpen */;
reducibleJoin4: while (true) {
if (moduleValue2.isAlertOrActionSheetOpen(selectedChannelId)) {
return value;
}
break reducibleJoin4;
}
}
if (type2 !== 'attachment') {
reducibleJoin8: while (true) {
if (type2 === 'embed') {
break reducibleJoin8;
}
if (type2 === 'sticker') {
break reducibleJoin8;
}
if (type2 !== 'component') {
Error = global.Error;
concat = global.HermesInternal.concat;
throw new Error('Unsupported thumbnail type: ' + type2);
}
break reducibleJoin8;
}
}
let type = message.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
reducibleJoin11: while (true) {
if (type !== THREAD_STARTER_MESSAGE) {
r17 = message;
break reducibleJoin11;
}
messageReference = message.messageReference;
if (messageReference == null) {
r17 = message;
break reducibleJoin11;
}
getMessageByReference = ReferencedMessageStore.getMessageByReference;
messageReference = message.messageReference;
message2 = Reflect.apply(getMessageByReference, ReferencedMessageStore, [messageReference]).message;
if (message2 == null) {
r17 = message;
break reducibleJoin11;
}
r17 = message2;
break reducibleJoin11;
}
messageReference = r17.messageReference;
reducibleJoin13: while (true) {
if (messageReference == null) {
type = value;
break reducibleJoin13;
}
type = messageReference.type;
break reducibleJoin13;
}
const MessageReferenceTypes = (require(679) /* metro dependency 679: MessageReferenceTypes */).MessageReferenceTypes;
const FORWARD = MessageReferenceTypes.FORWARD;
if (type !== FORWARD) {
r16 = r17;
} else {
property = r17.messageSnapshots[0];
reducibleJoin16: while (true) {
if (property == null) {
message = value;
break reducibleJoin16;
}
message = property.message;
break reducibleJoin16;
}
reducibleJoin17: while (true) {
if (message == null) {
return value;
}
r16 = message;
break reducibleJoin17;
}
}
const value5 = r17.attachments.filter(_fun86901);
if (type2 === 'attachment') {
length = value5.length;
reducibleJoin22: while (true) {
if (index < length) {
property = value5[index];
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaFromAttachment = moduleValue3.extractMediaFromAttachment;
guild_id = messageChannel.guild_id;
if (Reflect.apply(extractMediaFromAttachment, moduleValue3, [property, r17, index, guild_id]) != null) {
break reducibleJoin22;
}
url = property.url;
if (url == null) {
break reducibleJoin22;
}
url = property.url;
if (url !== '') {
defaultImport = importDefault(3853) /* metro dependency 3853: Linking */;
defaultImport.openURL(property.url);
return value;
}
break reducibleJoin22;
}
break reducibleJoin22;
}
}
let env0_1 = -1;
if (type2 === 'embed') {
reducibleJoin24: while (true) {
if (embedIndex != null) {
embeds = r16.embeds;
property = embeds[index];
env0_1 = embedIndex;
moduleValue11 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromEmbed = moduleValue11.extractMediaSourcesFromEmbed;
guild_id = messageChannel.guild_id;
value13 = Reflect.apply(extractMediaSourcesFromEmbed, moduleValue11, [r17, r16, property, index,
guild_id]);
binding = env0_1;
length = value13.length;
reducibleJoin51: while (true) {
if (binding < length) {
moduleValue12 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue12.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue12, [value13[env0_1], portal]);
r6 = value13;
break reducibleJoin51;
}
r6 = value13;
break reducibleJoin51;
}
some = r6.some;
value14 = Reflect.apply(some, r6, [_fun86904]);
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: value14, initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout,
analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
}
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
return value;
}
break reducibleJoin24;
}
}
if (type2 === 'component') {
if (componentId == null) {
return null;
}
reducibleJoin42: while (true) {
reducibleJoin41: while (true) {
if (embedId == null) {
break reducibleJoin41;
}
if (embedId === '') {
break reducibleJoin41;
}
embeds = r16.embeds;
find = embeds.find;
value11 = Reflect.apply(find, embeds, [function({id}) {
return id === embedId;
}]);
reducibleJoin40: while (true) {
if (value11 == null) {
components = value;
break reducibleJoin40;
}
components = value11.components;
break reducibleJoin40;
}
break reducibleJoin42;
}
components = r16.components;
break reducibleJoin42;
}
reducibleJoin51: while (true) {
reducibleJoin47: while (true) {
if (components == null) {
break reducibleJoin47;
}
length = components.length;
if (length === 0) {
break reducibleJoin47;
}
moduleValue8 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
extractMediaSourcesFromComponent = moduleValue8.extractMediaSourcesFromComponent;
guild_id = messageChannel.guild_id;
moduleValue9 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
asComponentId = moduleValue9.asComponentId;
value12 = Reflect.apply(extractMediaSourcesFromComponent, moduleValue8, [r17, components, guild_id,
Reflect.apply(asComponentId, moduleValue9, [componentId]), componentMediaIndex]);
if (value12 == null) {
return value;
}
sources = value12.sources;
initialIndex = value12.initialIndex;
env0_1 = initialIndex;
moduleValue10 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue10.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue10, [sources[env0_1], portal]);
r6 = sources;
break reducibleJoin51;
}
return value;
}
} else {
moduleValue4 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value6 = moduleValue4.extractMediaSourcesFromMessage(r17, r16, messageChannel.guild_id);
length = value6.length;
value7 = 0;
if (value7 < length) {
r26 = value7;
reducibleLoop26: while (true) {
moduleValue5 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
flattenSource = moduleValue5.flattenSource;
value8 = Reflect.apply(flattenSource, moduleValue5, [value6[r26]]);
if (value8 != null) {
accessoryType = value8.accessoryType;
reducibleJoin31: while (true) {
if (accessoryType !== type2) {
break reducibleJoin31;
}
mediaViewIndex = value8.mediaViewIndex;
reducibleJoin30: while (true) {
if (mediaViewIndex != null) {
r23 = mediaViewIndex;
break reducibleJoin30;
}
mediaIndex = value8.mediaIndex;
r23 = mediaIndex;
break reducibleJoin30;
}
if (r23 === index) {
noCarousel = value8.noCarousel;
if (noCarousel) {
property = value6[r26];
object = [property];
env0_1 = value7;
moduleValue7 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue7.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue7, [object[value7], portal]);
r6 = object;
} else {
env0_1 = r26;
moduleValue6 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
setMediaSourcePortal = moduleValue6.setMediaSourcePortal;
Reflect.apply(setMediaSourcePortal, moduleValue6, [value6[r26], portal]);
value10 = value6.filter(_fun86903);
r6 = value10;
}
break reducibleLoop26;
}
break reducibleJoin31;
}
}
value9 = typeof r26 === 'bigint' ? r26 + 1n : +r26 + 1;
length = value6.length;
if (value9 < length) {
r26 = value9;
continue reducibleLoop26;
}
r6 = value6;
break reducibleLoop26;
}
} else {
r6 = value6;
}
}
reducibleJoin60: while (true) {
if (env0_1 === -1) {
break reducibleJoin60;
}
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
openMediaModal = moduleValue13.openMediaModal;
object = {disableDownload: r6.some(_fun86904), initialSources: r6, initialIndex: env0_1,
originViewOrOriginLayout: layout, analyticsSource: 'Channel'};
id = messageChannel.id;
object.channelId = id;
reducibleJoin54: while (true) {
if (showContextName) {
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
computeChannelName = moduleValue14.computeChannelName;
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
RelationshipStore,
false]);
r7 = channelName;
break reducibleJoin54;
}
r7 = value;
break reducibleJoin54;
}
object.contextName = r7;
reducibleJoin56: while (true) {
if (showContextName) {
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
getChannelIcon = moduleValue15.getChannelIcon;
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
r7 = value15;
break reducibleJoin56;
}
r7 = value;
break reducibleJoin56;
}
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
return value;
}
function _fun86901(a0) { // fn#86901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:1051, offset: 0x01fa6ba1, size: 44 bytes, params: 2, frame: 11
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
return !value.isThumbnailAttachment(a0);
}
function _fun86903(a0, a1) { // fn#86903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2104, offset: 0x01fa6bcd, size: 96 bytes, params: 3, frame: 12
var binding;
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0);
const r0 = value != null && !value.noCarousel;
if (!r0 && env0_1 >= a1) {
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
}
return r0;
}
function _fun86904(a0) { // fn#86904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2216, offset: 0x01fa6c2d, size: 59 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
value = value.flattenSource(a0, true);
return value != null && value.disableDownload;
}
@@ -0,0 +1,716 @@
/* Metro module 9874; source: modules/messages/native/handlers/handleMessagesTapLink.tsx; dependencies: [7861, 4234, 8183, 9865, 1885, 1379, 4097, 1878, 661, 1483, 1386, 9696, 5079, 1243, 9875, 4093, 4116, 9876, 8872, 9877, 8743, 4080, 9300, 1962, 4796, 8913, 4008, 9879, 9899, 7067, 6789, 8447, 1583, 9900, 4634, 1230, 8235, 9903, 9926, 2] */
function _fun77455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:6, offset: 0x01dfc94b, size: 405 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = handleMessagesTapURLLink;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */).getSection;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
const summaryStore = importDefault(9865) /* metro dependency 9865: SummaryStore */;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_11 = constantsModule.AnalyticsLocations;
const env0_12 = constantsModule.LinkingTypes;
const env0_13 = constantsModule.Routes;
const env0_14 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
const env0_15 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
const env0_16 = (require(9696) /* metro dependency 9696: ChannelDetailsConstants */).ChannelDetailsNavigatorScreens;
const env0_17 = (require(5079) /* metro dependency 5079: PushNotificationConstants */).NotificationTypes;
const env0_18 = (require(1243) /* metro dependency 1243: ThreadConstants */).OpenThreadAnalyticsLocations;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapLink.tsx');
exports.handleMessagesTapURLLink = closure;
exports.handleMessagesTapLink = handleMessagesTapLink;
}
function handleMessagesTapURLLink(a0, a1) { // fn#77456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:420, offset: 0x01dfcae0, size: 393 bytes, params: 3, frame: 19
var r1;
var r2;
var r6;
var node;
var moduleValue;
var payload;
var value3;
var moduleValue2;
var moduleValue3;
var handleClick;
var object2;
var value6;
var moduleValue4;
let url = a0.url;
let value = url != null;
let r0 = value && a0.url !== '';
if (r0) {
url = a0.url;
node = a0.node;
value = false;
if (node == null) {
r2 = value;
} else {
moduleValue = require(9875) /* metro dependency 9875: MarkupReactLinkUtils */;
if (moduleValue.isLinkTrusted(node)) {
payload = (importDefault(4093) /* metro dependency 4093: parseURL */)(url).payload;
if (payload.type !== LinkingTypes.INVITE) {
r2 = value;
} else if (payload.inviteCode == null) {
r2 = value;
} else {
value = InviteStore.getInvite(payload.inviteCode);
value3 = value == null;
if (value3) {
r1 = value3;
} else {
moduleValue2 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
r1 = !moduleValue2.isGuildScheduledEventInviteEmbed(value);
}
if (!r1) {
(importDefault(9876) /* metro dependency 9876: handleAcceptEventInstantInvite */)(value);
value = 0;
r1 = value;
}
value = !r1;
r2 = value;
}
} else {
r2 = value;
}
}
value = true;
if (r2) {
r0 = value;
} else {
moduleValue3 = require(8872) /* metro dependency 8872: MaskedLinkUtils */;
handleClick = moduleValue3.handleClick;
object2 = {};
object2.href = a0.url;
value6 = a0.node != null;
if (value6) {
moduleValue4 = require(9875) /* metro dependency 9875: MarkupReactLinkUtils */;
r6 = moduleValue4.isLinkTrusted(a0.node);
} else {
r6 = value6;
}
object2.trusted = r6;
object2.messageId = a0.messageId;
object2.channelId = a1;
Reflect.apply(handleClick, moduleValue3, [object2]);
r0 = value;
}
}
return r0;
}
function handleMessagesTapLink({allowWithinModal, chatInputRef, handleTransitionToThread, message, messageChannel, selectedChannelId, tapLinkData}) { // fn#77457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:1089, offset: 0x01dfcc69, size: 2644 bytes, params: 2, frame: 31
var id;
var r4;
var r12;
var guild_id;
var r7;
var author;
var r6;
var value;
var handleMessagesTapURLLinkBinding;
var value2;
var action;
var current;
var insertText;
var text;
var addSpace;
var getChannel;
var value3;
var notificationType;
var value4;
var defaultImport;
var openLazy;
var object2;
var MESSAGE_EMBED;
var moduleValue2;
var openGuildHighlightNotificationForPush;
var moduleValue3;
var moduleValue4;
var transitionTo;
var CHANNEL;
var guildId;
var trackRoleSubscriptionPurchaseMessageTierClick;
var value5;
var value6;
var value7;
const KeyboardTypes = require(dependencyMap[32]).KeyboardTypes;
var value9;
var value11;
var moduleValue5;
var defaultImport2;
var moduleValue6;
var userRecord;
var applicationId;
var value12;
var getSectionBinding;
var sectionBinding;
var descriptor;
var value14;
var value16;
var getMessage;
var value18;
var removeAutomodMessageNotice;
var rootNavigationRef;
var stream;
var defaultImport3;
var messageReference;
var defaultImport4;
const data = tapLinkData.data;
if (allowWithinModal === true) {
handleMessagesTapURLLinkBinding = handleMessagesTapURLLink;
value2 = undefined;
id = messageChannel == null ? value2 : messageChannel.id;
if (handleMessagesTapURLLinkBinding(data, id)) {
return undefined;
}
action = data.action;
if (action == null) {
return undefined;
}
action = data.action;
if (action === 'bindUserMenu') {
importDefault(dependencyMap[20])({userId: data.userId, channelId: data.messageChannelId,
messageId: data.messageId});
return undefined;
}
if (action === 'bindGuildMenu') {
messageReference = data.messageReference;
if (messageReference == null) {
return value2;
}
messageReference = data.messageReference;
guild_id = messageReference.guild_id;
if (guild_id == null) {
return value2;
}
defaultImport4 = importDefault(dependencyMap[21]);
openLazy = defaultImport4.openLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport4, [value, 'GuildProfileActionSheet:' + guild_id,
{guildId: guild_id}]);
return undefined;
}
if (action === 'bindJoinStream') {
stream = data.stream;
if (stream == null) {
return value2;
}
defaultImport3 = importDefault(dependencyMap[24]);
defaultImport3.selectVoiceChannel(stream.channelId);
require(dependencyMap[25]).watchStreamAndTransitionToStream(stream);
return undefined;
}
if (action === 'bindOpenPins') {
rootNavigationRef = require(dependencyMap[26]).getRootNavigationRef();
if (rootNavigationRef == null) {
return value2;
}
if (rootNavigationRef.isReady()) {
rootNavigationRef.navigate('sidebar', {initialRouteName: ChannelDetailsNavigatorScreens.PINNED_MESSAGES,
channelId: data.messageChannelId, source: 'pinned-message-system-message'});
return undefined;
}
return value2;
}
if (action === 'bindOpenGdmCustomizeActionSheet') {
importDefault(dependencyMap[27])({channelId: data.messageChannelId});
return undefined;
}
if (action === 'bindDismissMessage') {
getMessage = GuildAutomodMessageStore.getMessage;
message = data.message;
value18 = Reflect.apply(getMessage, GuildAutomodMessageStore, [message == null ? value2 : message.id]);
if (value18 == null) {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
} else if (value18.isBlockedEdit) {
value = require(dependencyMap[28]);
removeAutomodMessageNotice = value.removeAutomodMessageNotice;
message = data.message;
Reflect.apply(removeAutomodMessageNotice, value, [message == null ? value2 : message.id]);
} else {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
}
return undefined;
}
if (action === 'bindTapUsername') {
value = importDefault(dependencyMap[20]);
object2 = {};
object2.userId = data.userId;
object2.channelId = data.messageChannelId;
object2.messageId = data.messageId;
object2.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
value(object2);
return undefined;
}
if (action === 'bindTapCommandName') {
if ((message == null ? value2 : message.interaction) == null) {
return value2;
}
if (messageChannel == null) {
return value2;
}
value11 = UserStore.getUser(data.userId);
if (value11 == null) {
return value2;
}
moduleValue5 = require(dependencyMap[31]);
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
applicationId = message.applicationId;
if (applicationId == null) {
return value2;
}
value12 = ChannelStore.getChannel(data.messageChannelId);
if (value12 == null) {
return value2;
}
getSectionBinding = getSection;
applicationId = message.applicationId;
sectionBinding = getSectionBinding({channel: value12, type: 'channel'}, applicationId);
descriptor = sectionBinding.descriptor;
if ((descriptor == null ? value2 : descriptor.application) != null) {
value16 = chatInputRef == null;
if (value16) {
r4 = value16;
r6 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r6 = current;
}
if (!r4) {
r6.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
application: sectionBinding.descriptor.application,
installOnDemand: !sectionBinding.isGuildInstalled && !sectionBinding.isUserInstalled}});
}
} else {
value14 = chatInputRef == null;
if (value14) {
r4 = value14;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
applicationId: message.applicationId, installOnDemand: true}});
}
}
return undefined;
}
author = message == null ? value2 : message.author;
if (author != null) {
defaultImport2 = importDefault(dependencyMap[33]);
object2 = {};
moduleValue6 = require(dependencyMap[34]);
object2.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
object2.channelId = data.messageChannelId;
object2.chatInputRef = chatInputRef;
object2.messageId = data.messageId;
object2.user = value11;
author = message == null ? value2 : message.author;
userRecord = new UserRecord();
object2.applicationUser = userRecord;
userRecord = messageChannel.getGuildId();
object2.guildId = userRecord ?? value2;
object2.messageType = data.messageType;
defaultImport2(object2);
}
return undefined;
}
if (action === 'bindTapActivityText') {
value6 = ApplicationStore.getApplication(data.applicationUserId);
if (value6 == null) {
value9 = chatInputRef == null;
if (value9) {
r4 = value9;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
applicationId: data.applicationUserId,
initiallyExpanded: true}});
}
} else {
value7 = chatInputRef == null;
if (value7) {
r4 = value7;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: value6,
initiallyExpanded: true}});
}
}
} else if (action === 'bindOpenThreadChannel') {
value5 = ChannelStore.getChannel(data.threadId);
if (value5 != null) {
handleTransitionToThread(value5 == null ? value2 : value5.guild_id, value5.id,
OpenThreadAnalyticsLocations.EMBED);
}
} else if (action === 'bindJumpToMessage') {
importDefault(dependencyMap[29]).jumpToMessage({channelId: data.targetChannelId,
messageId: data.targetMessageId,
flash: true, returnMessageId: data.messageId});
} else if (action === 'bindOpenRoleSubscriptionOverview') {
moduleValue4 = require(dependencyMap[35]);
transitionTo = moduleValue4.transitionTo;
CHANNEL = Routes.CHANNEL;
guildId = data.guildId;
Reflect.apply(transitionTo, moduleValue4, [Reflect.apply(CHANNEL, Routes, [guildId,
StaticChannelRoute.ROLE_SUBSCRIPTIONS])]);
value = require(dependencyMap[36]);
trackRoleSubscriptionPurchaseMessageTierClick = value.trackRoleSubscriptionPurchaseMessageTierClick;
guildId = data.guildId;
Reflect.apply(trackRoleSubscriptionPurchaseMessageTierClick, value, [guildId, data.channelId,
data.messageId,
data.roleSubscriptionListingId]);
} else if (action === 'bindUserSurvey') {
getChannel = ChannelStore.getChannel;
message = data.message;
value3 = Reflect.apply(getChannel, ChannelStore, [message.channel_id]);
guild_id = value3 == null ? value2 : value3.guild_id;
if (guild_id != null) {
notificationType = data.notificationType;
if (NotificationTypes.TRENDING_CONTENT_PUSH === notificationType) {
moduleValue3 = require(dependencyMap[37]);
openGuildHighlightNotificationForPush = moduleValue3.openGuildHighlightNotificationForPush;
message = data.message;
notificationType = data.notificationType;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
value = SummaryStore.selectedSummary(data.message.channel_id);
id = value == null ? value2 : value.id;
value = 'unknown';
Reflect.apply(openGuildHighlightNotificationForPush, moduleValue3, [guild_id, message,
notificationType,
MESSAGE_EMBED, {summary_id: id ?? value}]);
} else if (NotificationTypes.TOP_MESSAGE_PUSH === notificationType) {
moduleValue2 = require(dependencyMap[37]);
moduleValue2.openGuildHighlightNotificationForPush(guild_id, data.message, data.notificationType,
AnalyticsLocations.MESSAGE_EMBED);
} else {
value4 = require(dependencyMap[23])(dependencyMap[38], dependencyMap.paths);
defaultImport = importDefault(dependencyMap[21]);
defaultImport.openLazy(value4, 'NotificationSurvey', {location: AnalyticsLocations.MESSAGE_EMBED,
messageId: data.message.id,
notificationType: data.notificationType ?? NotificationTypes.TOP_MESSAGE_PUSH});
}
}
} else if (action === 'bindInsertText') {
value = chatInputRef == null;
if (value) {
r4 = value;
r12 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r12 = current;
}
if (!r4) {
insertText = r12.insertText;
text = data.text;
addSpace = data.addSpace;
Reflect.apply(insertText, r12, [text, null, addSpace == null || addSpace]);
}
}
} else {
value = require(dependencyMap[19]);
if (value.isAlertOrActionSheetOpen(selectedChannelId)) {
return undefined;
}
handleMessagesTapURLLinkBinding = handleMessagesTapURLLink;
value2 = undefined;
id = messageChannel == null ? value2 : messageChannel.id;
if (handleMessagesTapURLLinkBinding(data, id)) {
return undefined;
}
action = data.action;
if (action == null) {
return undefined;
}
action = data.action;
if (action === 'bindUserMenu') {
importDefault(dependencyMap[20])({userId: data.userId, channelId: data.messageChannelId,
messageId: data.messageId});
return undefined;
}
if (action === 'bindGuildMenu') {
messageReference = data.messageReference;
if (messageReference == null) {
return value2;
}
messageReference = data.messageReference;
guild_id = messageReference.guild_id;
if (guild_id == null) {
return value2;
}
defaultImport4 = importDefault(dependencyMap[21]);
openLazy = defaultImport4.openLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport4, [value, 'GuildProfileActionSheet:' + guild_id,
{guildId: guild_id}]);
return undefined;
}
if (action === 'bindJoinStream') {
stream = data.stream;
if (stream == null) {
return value2;
}
defaultImport3 = importDefault(dependencyMap[24]);
defaultImport3.selectVoiceChannel(stream.channelId);
require(dependencyMap[25]).watchStreamAndTransitionToStream(stream);
return undefined;
}
if (action === 'bindOpenPins') {
rootNavigationRef = require(dependencyMap[26]).getRootNavigationRef();
if (rootNavigationRef == null) {
return value2;
}
if (rootNavigationRef.isReady()) {
rootNavigationRef.navigate('sidebar', {initialRouteName: ChannelDetailsNavigatorScreens.PINNED_MESSAGES,
channelId: data.messageChannelId, source: 'pinned-message-system-message'});
return undefined;
}
return value2;
}
if (action === 'bindOpenGdmCustomizeActionSheet') {
importDefault(dependencyMap[27])({channelId: data.messageChannelId});
return undefined;
}
if (action === 'bindDismissMessage') {
getMessage = GuildAutomodMessageStore.getMessage;
message = data.message;
value18 = Reflect.apply(getMessage, GuildAutomodMessageStore, [message == null ? value2 : message.id]);
if (value18 == null) {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
} else if (value18.isBlockedEdit) {
value = require(dependencyMap[28]);
removeAutomodMessageNotice = value.removeAutomodMessageNotice;
message = data.message;
Reflect.apply(removeAutomodMessageNotice, value, [message == null ? value2 : message.id]);
} else {
value = importDefault(dependencyMap[29]);
value.dismissAutomatedMessage(data.message);
}
return undefined;
}
if (action === 'bindTapUsername') {
value = importDefault(dependencyMap[20]);
object2 = {};
object2.userId = data.userId;
object2.channelId = data.messageChannelId;
object2.messageId = data.messageId;
object2.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
value(object2);
return undefined;
}
if (action === 'bindTapCommandName') {
if ((message == null ? value2 : message.interaction) == null) {
return value2;
}
if (messageChannel == null) {
return value2;
}
value11 = UserStore.getUser(data.userId);
if (value11 == null) {
return value2;
}
moduleValue5 = require(dependencyMap[31]);
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
applicationId = message.applicationId;
if (applicationId == null) {
return value2;
}
value12 = ChannelStore.getChannel(data.messageChannelId);
if (value12 == null) {
return value2;
}
getSectionBinding = getSection;
applicationId = message.applicationId;
sectionBinding = getSectionBinding({channel: value12, type: 'channel'}, applicationId);
descriptor = sectionBinding.descriptor;
if ((descriptor == null ? value2 : descriptor.application) != null) {
value16 = chatInputRef == null;
if (value16) {
r4 = value16;
r6 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r6 = current;
}
if (!r4) {
r6.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
application: sectionBinding.descriptor.application,
installOnDemand: !sectionBinding.isGuildInstalled && !sectionBinding.isUserInstalled}});
}
} else {
value14 = chatInputRef == null;
if (value14) {
r4 = value14;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
applicationId: message.applicationId, installOnDemand: true}});
}
}
return undefined;
}
author = message == null ? value2 : message.author;
if (author != null) {
defaultImport2 = importDefault(dependencyMap[33]);
object2 = {};
moduleValue6 = require(dependencyMap[34]);
object2.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
object2.channelId = data.messageChannelId;
object2.chatInputRef = chatInputRef;
object2.messageId = data.messageId;
object2.user = value11;
author = message == null ? value2 : message.author;
userRecord = new UserRecord();
object2.applicationUser = userRecord;
userRecord = messageChannel.getGuildId();
object2.guildId = userRecord ?? value2;
object2.messageType = data.messageType;
defaultImport2(object2);
}
return undefined;
}
if (action === 'bindTapActivityText') {
value6 = ApplicationStore.getApplication(data.applicationUserId);
if (value6 == null) {
value9 = chatInputRef == null;
if (value9) {
r4 = value9;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
applicationId: data.applicationUserId,
initiallyExpanded: true}});
}
} else {
value7 = chatInputRef == null;
if (value7) {
r4 = value7;
r7 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r7 = current;
}
if (!r4) {
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: value6,
initiallyExpanded: true}});
}
}
} else if (action === 'bindOpenThreadChannel') {
value5 = ChannelStore.getChannel(data.threadId);
if (value5 != null) {
handleTransitionToThread(value5 == null ? value2 : value5.guild_id, value5.id,
OpenThreadAnalyticsLocations.EMBED);
}
} else if (action === 'bindJumpToMessage') {
importDefault(dependencyMap[29]).jumpToMessage({channelId: data.targetChannelId,
messageId: data.targetMessageId,
flash: true, returnMessageId: data.messageId});
} else if (action === 'bindOpenRoleSubscriptionOverview') {
moduleValue4 = require(dependencyMap[35]);
transitionTo = moduleValue4.transitionTo;
CHANNEL = Routes.CHANNEL;
guildId = data.guildId;
Reflect.apply(transitionTo, moduleValue4, [Reflect.apply(CHANNEL, Routes, [guildId,
StaticChannelRoute.ROLE_SUBSCRIPTIONS])]);
value = require(dependencyMap[36]);
trackRoleSubscriptionPurchaseMessageTierClick = value.trackRoleSubscriptionPurchaseMessageTierClick;
guildId = data.guildId;
Reflect.apply(trackRoleSubscriptionPurchaseMessageTierClick, value, [guildId, data.channelId,
data.messageId,
data.roleSubscriptionListingId]);
} else if (action === 'bindUserSurvey') {
getChannel = ChannelStore.getChannel;
message = data.message;
value3 = Reflect.apply(getChannel, ChannelStore, [message.channel_id]);
guild_id = value3 == null ? value2 : value3.guild_id;
if (guild_id != null) {
notificationType = data.notificationType;
if (NotificationTypes.TRENDING_CONTENT_PUSH === notificationType) {
moduleValue3 = require(dependencyMap[37]);
openGuildHighlightNotificationForPush = moduleValue3.openGuildHighlightNotificationForPush;
message = data.message;
notificationType = data.notificationType;
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
value = SummaryStore.selectedSummary(data.message.channel_id);
id = value == null ? value2 : value.id;
value = 'unknown';
Reflect.apply(openGuildHighlightNotificationForPush, moduleValue3, [guild_id, message,
notificationType,
MESSAGE_EMBED, {summary_id: id ?? value}]);
} else if (NotificationTypes.TOP_MESSAGE_PUSH === notificationType) {
moduleValue2 = require(dependencyMap[37]);
moduleValue2.openGuildHighlightNotificationForPush(guild_id, data.message, data.notificationType,
AnalyticsLocations.MESSAGE_EMBED);
} else {
value4 = require(dependencyMap[23])(dependencyMap[38], dependencyMap.paths);
defaultImport = importDefault(dependencyMap[21]);
defaultImport.openLazy(value4, 'NotificationSurvey', {location: AnalyticsLocations.MESSAGE_EMBED,
messageId: data.message.id,
notificationType: data.notificationType ?? NotificationTypes.TOP_MESSAGE_PUSH});
}
}
} else if (action === 'bindInsertText') {
value = chatInputRef == null;
if (value) {
r4 = value;
r12 = value2;
} else {
current = chatInputRef.current;
r4 = current == null;
r12 = current;
}
if (!r4) {
insertText = r12.insertText;
text = data.text;
addSpace = data.addSpace;
Reflect.apply(insertText, r12, [text, null, addSpace == null || addSpace]);
}
}
}
}
@@ -0,0 +1,51 @@
/* Metro module 11344; source: modules/messages/native/hooks/useChannelLoading.tsx; dependencies: [57, 31, 11345, 9835, 4595, 2] */
function _fun86737(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:6, offset: 0x01f9e2c4, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useChannelLoading.tsx');
exports.default = useChannelLoading;
}
function useChannelLoading({channelId, jumpTargetId, oldestUnreadMessageId, shouldJumpToOriginalPost}) { // fn#86738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:211, offset: 0x01f9e34d, size: 150 bytes, params: 2, frame: 16
const property = shouldJumpToOriginalPost(env0_4.useState(_fun86739), 1)[0];
const closure = startOrCancelLatestMessagesLoad;
(importDefault(4595) /* metro dependency 4595: useMountEffect */)(function() {
startOrCancelLatestMessagesLoad(false);
return _fun86742;
});
return {channelLatestMessageLoadingStatsManager: property, startOrCancelLatestMessagesLoad: closure};
}
function _fun86739() { // fn#86739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:337, offset: 0x01f9e3e3, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(11345) /* metro dependency 11345: ChannelLatestMessageLoadingStatsManager */;
const value2 = Object.create(value.prototype, {constructor: {value: value}});
value = new value('Messages');
return value instanceof Object ? value : value2;
}
function startOrCancelLatestMessagesLoad(a0) { // fn#86740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:412, owner: useChannelLoading.startOrCancelLatestMessagesLoad, offset: 0x01f9e416, size: 95 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(9835) /* metro dependency 9835: MessagesUtils */;
const startOrCancelChannelLatestMessagesLoad = value.startOrCancelChannelLatestMessagesLoad;
const object2 = {};
object2.jumpTargetId = jumpTargetId;
object2.oldestUnreadMessageId = oldestUnreadMessageId;
object2.shouldJumpToOriginalPost = shouldJumpToOriginalPost(a0);
object2.channelId = channelId;
object2.tracker = env0_4;
Reflect.apply(startOrCancelChannelLatestMessagesLoad, value, [object2]);
}
function _fun86741() { // fn#86741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:574, offset: 0x01f9e475, size: 27 bytes, params: 1, frame: 11
startOrCancelLatestMessagesLoad(false);
return _fun86742;
}
function _fun86742() { // fn#86742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:615, offset: 0x01f9e490, size: 21 bytes, params: 1, frame: 9
env1_4.cancel();
}
@@ -0,0 +1,721 @@
/* Metro module 11517; source: modules/messages/native/hooks/useRowManager.tsx; dependencies: [14, 11518, 4044, 9850, 477, 9849, 2] */
function _fun88173(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:6, offset: 0x01fd7640, size: 125 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_88176 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useRowManager.tsx');
exports.default = useRowManager;
}
function _createForOfIteratorHelperLoose_88174(a0, a1) { // fn#88174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:46, offset: 0x01fd76bd, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun88175;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_88176(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_88176(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_88176(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun88175;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function useRowManager({chatManager, rowGenerator, animatingStickerMessageIdRef, canAddNewReactions, channel, messages, isMessagesReady, uploads, roleStyle, oldestUnreadMessageId, replyingMessageId, inlineAttachmentMedia, inlineEmbedMedia, renderEmbeds, renderReactions, animateEmoji, gifAutoPlay, timestampHourCycle, currentUserId, renderCommunicationDisabled, selectedSummary, enableSwipeActions, isResourceChannel, shouldObscureSpoiler, shouldDisableInteractiveComponents, unloadableContentEntryMessageIds, containerWidth, chatRef, loadedRef, animatedRef, hasMoreMessagesAfterForLastUpdateRef, updateNativeRows, isLoadingAtTop, channelLatestMessageLoadingStatsManager, channelId, isMessagesCached, chatUpdatesQueue, shouldJumpToOriginalPost, findMessageIndex, scrollToTopMessage, useReducedMotion}) { // fn#88177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:1099, offset: 0x01fd7831, size: 483 bytes, params: 2, frame: 5
return {createRows: createRows, updateRows: updateRows_88184, scrollToMessageId: scrollToMessageId,
maybeRescrollToMessageId: function(a0) {
var value = a1;
var value2 = a2;
var value3 = a3;
var env0_0 = a0;
var env0_1 = value !== undefined ? value : false;
var env0_2 = value2 !== undefined ? value2 : require(dependencyMap[2]).JumpTypes.INSTANT;
var env0_3 = value3 !== undefined ? value3 : false;
if (a0 != null) {
global.setTimeout(_fun88181, 50);
}
}};
}
function createRows({forceRender, updateMessageIds, ignoreEmbedDescriptionCache}) { // fn#88178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:1958, owner: useRowManager.createRows, offset: 0x01fd7a14, size: 125 bytes, params: 2, frame: 13
var environment;
var r0;
var value;
if (channel != null) {
if (messages != null) {
if (isMessagesReady) {
value = environment.__proto__;
value = (importDefault(14) /* metro dependency 14: TTITracker */).firstRowGenerator.measure(_fun88179);
r0 = value;
} else {
r0 = null;
}
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
}
function useRowManagerMaybeRescrollToMessageId(a0) { // fn#88180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:2858, owner: useRowManager.maybeRescrollToMessageId, offset: 0x01fd7c2e, size: 115 bytes, params: 2, frame: 17
var environment;
var INSTANT;
let value = a1;
const value2 = a2;
const value3 = a3;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
if (value2 === undefined) {
value = environment.__proto__;
INSTANT = (require(4044) /* metro dependency 4044: Client */).JumpTypes.INSTANT;
}
const env0_3 = value3 !== undefined ? value3 : false;
if (a0 != null) {
global.setTimeout(_fun88181, 50);
}
}
function scrollToMessageId({scrollToMessageId, jumpTargetId, jumpType, scrollPosition, minimizeScrolling, isRescrolling, hasJumpedToOriginalPost}) { // fn#88182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:3259, owner: useRowManager.scrollToMessageId, offset: 0x01fd7d96, size: 440 bytes, params: 2, frame: 25
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
var messageIndex;
var defaultImport;
jumpTargetId = jumpTargetId === undefined ? null : jumpTargetId;
const r10 = jumpType !== undefined ? jumpType : JumpTypes.ANIMATED;
const r7 = scrollPosition !== undefined ? scrollPosition : (require(9850) /* metro dependency 9850: NativeChatUtils */).ChatScrollPosition.TOP;
minimizeScrolling = !(minimizeScrolling === undefined) && minimizeScrolling;
isRescrolling = !(isRescrolling === undefined) && isRescrolling;
hasJumpedToOriginalPost = !(hasJumpedToOriginalPost === undefined) && hasJumpedToOriginalPost;
const r3 = useReducedMotion || r10 === JumpTypes.INSTANT;
const value4 = !r3;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
if (isRescrolling) {
messageIndex = findMessageIndex(scrollToMessageId);
if (messageIndex != null) {
if (minimizeScrolling) {
global.setTimeout(_fun88183, 5);
} else {
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.scrollTo(chatRef.current, messageIndex, {animated: value4,
highlight: jumpTargetId === scrollToMessageId, position: r7});
}
}
} else {
maybeRescrollToMessageId_88180(scrollToMessageId, true, r3 ? JumpTypes.INSTANT : JumpTypes.ANIMATED,
hasJumpedToOriginalPost);
}
} else {
messageIndex = findMessageIndex(scrollToMessageId);
if (messageIndex != null) {
if (minimizeScrolling) {
global.setTimeout(_fun88183, 5);
} else {
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.scrollTo(chatRef.current, messageIndex, {animated: value4,
highlight: jumpTargetId === scrollToMessageId, position: r7});
}
}
}
}
function useRowManagerUpdateRows() { // fn#88184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:3820, owner: useRowManager.updateRows, offset: 0x01fd7fa5, size: 953 bytes, params: 1, frame: 30
var environment;
var MIDDLE;
var r10;
var object2;
var createRowsBinding;
var rows;
var chatUpdatesQueueBinding;
var value4;
var defaultImport;
var messageIndex;
var value5;
var defaultImport2;
var value6;
var defaultImport3;
var current6;
var value8;
var updateNativeRowsBinding;
const value = a0;
const value2 = undefined;
let r1 = value !== value2 ? value : {};
let forceRender = r1.forceRender;
forceRender = !(forceRender === value2) && forceRender;
const forceReload = r1.forceReload;
const updateMessageIds = r1.updateMessageIds;
const r9 = updateMessageIds !== value2 ? updateMessageIds : new global.Set();
const scrollToMessageId3 = r1.scrollToMessageId;
const scrollToMessageId2 = scrollToMessageId3 !== value2 ? scrollToMessageId3 : null;
let jumpTargetId = r1.jumpTargetId;
jumpTargetId = jumpTargetId === value2 ? null : jumpTargetId;
const jumpType = r1.jumpType;
const r19 = jumpType !== value2 ? jumpType : (require(4044) /* metro dependency 4044: Client */).JumpTypes.ANIMATED;
let focusTargetId = r1.focusTargetId;
focusTargetId = focusTargetId === value2 ? null : focusTargetId;
let ignoreEmbedDescriptionCache = r1.ignoreEmbedDescriptionCache;
ignoreEmbedDescriptionCache = !(ignoreEmbedDescriptionCache === value2) && ignoreEmbedDescriptionCache;
let messagesNewlyLoaded = r1.messagesNewlyLoaded;
messagesNewlyLoaded = !(messagesNewlyLoaded === value2) && messagesNewlyLoaded;
let shouldInitialScroll = r1.shouldInitialScroll;
shouldInitialScroll = !(shouldInitialScroll === value2) && shouldInitialScroll;
let minimizeScrolling = r1.minimizeScrolling;
minimizeScrolling = !(minimizeScrolling === value2) && minimizeScrolling;
let isRescrolling = r1.isRescrolling;
isRescrolling = !(isRescrolling === value2) && isRescrolling;
const overrideScrollJumpType = r1.overrideScrollJumpType;
let isAnimated = r1.isAnimated;
isAnimated = isAnimated === value2 || isAnimated;
let hasJumpedToOriginalPost = r1.hasJumpedToOriginalPost;
hasJumpedToOriginalPost = !(hasJumpedToOriginalPost === value2) && hasJumpedToOriginalPost;
let current = chatRef.current;
if (current != null) {
createRowsBinding = createRows;
object2 = {forceRender: forceRender, updateMessageIds: r9,
ignoreEmbedDescriptionCache: ignoreEmbedDescriptionCache};
rows = createRowsBinding(object2);
current = loadedRef.current;
MIDDLE = selectedSummary != null ? selectedSummary.startId !== scrollToMessageId2 ? value2 : (require(9850) /* metro dependency 9850: NativeChatUtils */).ChatScrollPosition.MIDDLE : value2;
if (rows == null) {
if (loadedRef.current) {
chatUpdatesQueueBinding = chatUpdatesQueue;
if (chatUpdatesQueueBinding.hasUpdates()) {
chatUpdatesQueue.tryFlush();
} else if (loadedRef.current) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId,
jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows == null) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId,
jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows.length !== 0) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId,
jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else {
value4 = environment.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.fadeIn(chatRef.current);
}
} else if (loadedRef.current) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows == null) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows.length !== 0) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else {
value4 = environment.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.fadeIn(chatRef.current);
}
} else if (rows.length > 0) {
value6 = environment.__proto__;
defaultImport3 = importDefault(9849) /* metro dependency 9849: computeScrollData */;
object2 = {};
object2.rows = chatManager.getPreviousRows();
object2.scrollToMessageId = scrollToMessageId2;
object2.jumpTargetId = jumpTargetId;
r10 = overrideScrollJumpType ?? messages.jumpType;
object2.jumpType = r10;
current6 = loadedRef.current;
r10 = current6 ? shouldInitialScroll : !current6;
object2.shouldInitialScroll = r10;
object2.animated = animatedRef.current;
object2.scrollPosition = MIDDLE;
object2.focusTargetId = focusTargetId;
value8 = defaultImport3(object2);
loadedRef.current = true;
updateNativeRowsBinding = updateNativeRows;
object2 = {rows: rows};
object2.hasMoreMessagesAfter = messages.hasMoreAfter;
object2.isLoadingAtTop = isLoadingAtTop(rows, hasMoreMessagesAfterForLastUpdateRef.current);
object2.scrollData = value8;
object2.HACK_iOSForceAnimations = messagesNewlyLoaded;
object2.forceReload = forceReload;
object2.isAnimated = isAnimated;
updateNativeRowsBinding(object2);
if (!current) {
channelLatestMessageLoadingStatsManager.finish({channelId: channelId,
areMessagesCached: isMessagesCached});
}
} else if (loadedRef.current) {
chatUpdatesQueueBinding = chatUpdatesQueue;
if (chatUpdatesQueueBinding.hasUpdates()) {
chatUpdatesQueue.tryFlush();
} else if (loadedRef.current) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows == null) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows.length !== 0) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else {
value4 = environment.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.fadeIn(chatRef.current);
}
} else if (loadedRef.current) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows == null) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else if (rows.length !== 0) {
if (scrollToMessageId2 == null) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
if (focusTargetId != null) {
messageIndex = findMessageIndex(focusTargetId);
if (messageIndex != null) {
value5 = environment.__proto__;
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport2.focus(chatRef.current, messageIndex);
}
}
} else {
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
}
} else {
value4 = environment.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.fadeIn(chatRef.current);
}
r1 = loadedRef.current && loadedRef.current !== current;
r1 = r1 && isResourceChannel;
if (r1) {
global.setTimeout(function() {
return scrollToTopMessage();
}, 100);
}
}
return value2;
}
function _fun88179() { // fn#88179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:2081, offset: 0x01fd7a91, size: 413 bytes, params: 1, frame: 17
var object2;
var r2;
var value6;
var value7;
var value8;
const chatManagerBinding = chatManager;
const setup = chatManagerBinding.setup;
const messagesBinding = messages;
Reflect.apply(setup, chatManagerBinding, [messagesBinding]);
rowGenerator.setOptions({inlineAttachmentMedia: inlineAttachmentMedia, inlineEmbedMedia: inlineEmbedMedia,
renderEmbeds: renderEmbeds, renderReactions: renderReactions, animateEmoji: animateEmoji,
animatingStickerMessageId: animatingStickerMessageIdRef.current, constrainedWidth: containerWidth,
gifAutoPlay: gifAutoPlay, timestampHourCycle: timestampHourCycle,
renderCommunicationDisabled: renderCommunicationDisabled,
ignoreEmbedDescriptionCache: ignoreEmbedDescriptionCache, enableSwipeActions: enableSwipeActions,
shouldObscureSpoiler: shouldObscureSpoiler,
shouldDisableInteractiveComponents: shouldDisableInteractiveComponents});
const _createForOfIteratorHelperLoose_88174Binding = _createForOfIteratorHelperLoose_88174;
const defaultImport = importDefault(11518) /* metro dependency 11518: createChannelStream */;
object2 = {};
object2.channel = channel;
object2.messages = messagesBinding;
object2.uploads = uploads;
object2.oldestUnreadMessageId = oldestUnreadMessageId;
object2.replyingMessageId = replyingMessageId;
object2.currentUserId = currentUserId;
object2.canAddNewReactions = canAddNewReactions();
object2.selectedSummary = selectedSummary;
object2.chatManager = chatManagerBinding;
object2.roleStyle = roleStyle;
object2.forceRender = forceRender;
object2.updateMessageIds = updateMessageIds;
object2.isResourceChannel = isResourceChannel;
object2.unloadableContentEntryMessageIds = unloadableContentEntryMessageIds;
const value4 = _createForOfIteratorHelperLoose_88174Binding(defaultImport(object2));
const value5 = value4();
let done = value5.done;
if (!done) {
for (r2 = value5; true; r2 = value8) {
value6 = r2.value;
value7 = rowGenerator.generate(value6);
chatManager.createRow(value7);
value8 = value4();
done = value8.done;
if (done) {
break;
}
}
}
return chatManager.createChangeset();
}
function _fun88181() { // fn#88181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:2924, offset: 0x01fd7ca1, size: 245 bytes, params: 1, frame: 20
var r2;
var updateRows_88184Binding;
var binding;
var value4;
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
var value5;
var value6;
var defaultImport;
const messageIndex = findMessageIndex(env0_0);
if (messageIndex != null) {
if (chatRef.current != null) {
if (env0_1) {
updateRows_88184Binding = updateRows_88184;
binding = env0_0;
value4 = environment.__proto__.__proto__;
value5 = true;
updateRows_88184Binding({scrollToMessageId: binding, jumpTargetId: binding, jumpType: env0_2,
focusTargetId: binding, overrideScrollJumpType: JumpTypes.INSTANT, isRescrolling: value5,
hasJumpedToOriginalPost: env0_3});
r2 = value5;
} else {
r2 = false;
}
if (!r2) {
value6 = environment.__proto__.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.scrollTo(chatRef.current, messageIndex, {animated: env0_2 === JumpTypes.ANIMATED});
}
}
}
}
function _fun88183() { // fn#88183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:3567, offset: 0x01fd7f4e, size: 87 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__;
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
value.scrollIntoView(chatRef.current, env0_3, {animated: env0_2, highlight: jumpTargetId === scrollToMessageId});
}
@@ -0,0 +1,414 @@
/* Metro module 11346; source: modules/messages/native/hooks/useScrollHandlers.tsx; dependencies: [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531, 2] */
function _fun86749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:6, offset: 0x01f9e6fc, size: 195 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 */;
let value = require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */;
const env0_4 = value.updateIsAtBottom;
const env0_5 = value.updateShouldShowJumpToPresentButton;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('useScrollHandlers');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useScrollHandlers.tsx');
exports.default = useScrollHandlers;
}
function useScrollHandlers({chatRef, chatManager, chatUpdatesQueue, pendingUpdatesQueueRef, animatedRef, fetchMoreBefore, fetchMoreAfter, handleVisibleMessagesChange, applyNativeRowsUpdate, messages, channel, channelId, screenIndex, onScroll, useReducedMotion, isStaff, visibleMessagesWindowHandler}) { // fn#86750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:308, offset: 0x01f9e7bf, size: 445 bytes, params: 2, frame: 21
const binding = pendingUpdatesQueueRef;
return {hasHandledScrollRef: binding.useRef(false), isAtBottomRef: binding.useRef(false),
isNearBottomRef: binding.useRef(false), isNearTopRef: binding.useRef(false),
deceleratingRef: binding.useRef(false), draggingRef: binding.useRef(false),
firstIgnoredScrollEventTimestampRef: binding.useRef(undefined), loadMoreBefore: function() {
animatedRef.current = true;
fetchMoreBefore();
}, loadMoreAfter: function() {
animatedRef.current = true;
fetchMoreAfter();
}, scrollToTop: scrollToTop_86756, scrollToRelativeOffset: scrollToRelativeOffset_86757,
scrollToTopMessage: scrollToTopMessage_86758, updateNativeRows: updateNativeRows,
handleScrollCallbacks: handleScrollCallbacks, handleScroll: handleScroll,
handleScrollPosition: handleScrollPosition};
}
function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, isFirstMessageVisible}) { // fn#86753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:837, owner: useScrollHandlers.handleScrollCallbacks, offset: 0x01f9e9b2, size: 436 bytes, params: 2, frame: 26
var r10;
var r5;
var loadingMore;
var value3;
var isScreenReaderEnabled;
var defaultImport;
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
isNearTop = !(isNearTop === undefined) && isNearTop;
dragging = !(dragging === undefined) && dragging;
decelerating = !(decelerating === undefined) && decelerating;
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
if (channel == null) {
return false;
}
if (messages.length !== 0) {
value3 = environment.__proto__;
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
loadingMore = messages.loadingMore;
if (loadingMore) {
r5 = !loadingMore;
} else {
r10 = dragging || decelerating;
r10 = !r10 ? isScreenReaderEnabled : r10;
r5 = r10;
}
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
if (env0_21.current) {
if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearTop) {
if (messages.hasMoreBefore) {
if (r5) {
loadMoreBefore_86751();
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
onScroll({isFirstMessageVisible: isFirstMessageVisible});
chatUpdatesQueue.tryFlush();
} else {
loadingMore = messages.loadingMore;
if (loadingMore) {
return false;
}
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
loadingMore = messages.loadingMore;
if (loadingMore) {
r5 = !loadingMore;
} else {
r10 = dragging || decelerating;
r10 = !r10 ? isScreenReaderEnabled : r10;
r5 = r10;
}
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
if (env0_21.current) {
if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearTop) {
if (messages.hasMoreBefore) {
if (r5) {
loadMoreBefore_86751();
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (env0_20.current) {
if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
env0_18.current = true;
}
onScroll({isFirstMessageVisible: isFirstMessageVisible});
chatUpdatesQueue.tryFlush();
}
return true;
}
function handleScroll({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, shouldShowJumpToPresent, isFirstMessageVisible}) { // fn#86754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:1361, owner: useScrollHandlers.handleScroll, offset: 0x01f9eb66, size: 249 bytes, params: 2, frame: 21
var environment;
var value;
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
isNearTop = !(isNearTop === undefined) && isNearTop;
dragging = !(dragging === undefined) && dragging;
decelerating = !(decelerating === undefined) && decelerating;
shouldShowJumpToPresent = !(shouldShowJumpToPresent === undefined) && shouldShowJumpToPresent;
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
if (handleScrollCallbacks({eventTimestamp: eventTimestamp, isAtBottom: isAtBottom, isNearBottom: isNearBottom,
isNearTop: isNearTop, dragging: dragging, decelerating: decelerating,
shouldShowJumpToPresent: shouldShowJumpToPresent, isFirstMessageVisible: isFirstMessageVisible})) {
env0_19.current = isAtBottom;
env0_20.current = isNearBottom;
env0_21.current = isNearTop;
env0_23.current = dragging;
env0_22.current = decelerating;
value = environment.__proto__;
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(function() {
updateShouldShowJumpToPresentButton(channelId, screenIndex,
shouldShowJumpToPresent || messages.hasMoreAfter);
updateIsAtBottom(screenIndex, isAtBottom);
});
}
}
function useScrollHandlersScrollToTop() { // fn#86756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2020, owner: useScrollHandlers.scrollToTop, offset: 0x01f9eca2, size: 70 bytes, params: 1, frame: 16
let value = a0;
let r4 = !(value !== undefined) || value;
value = environment.__proto__;
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
const scrollToTop = value.scrollToTop;
const current = chatRef.current;
r4 = r4 && !useReducedMotion;
Reflect.apply(scrollToTop, value, [current, r4]);
}
function useScrollHandlersScrollToRelativeOffset(a0) { // fn#86757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2090, owner: useScrollHandlers.scrollToRelativeOffset, offset: 0x01f9ece8, size: 74 bytes, params: 2, frame: 17
let value = a1;
let r5 = !(value !== undefined) || value;
value = environment.__proto__;
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
const scrollToRelativeOffset = value.scrollToRelativeOffset;
const current = chatRef.current;
r5 = r5 && !useReducedMotion;
Reflect.apply(scrollToRelativeOffset, value, [current, a0, r5]);
}
function useScrollHandlersScrollToTopMessage() { // fn#86758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2171, owner: useScrollHandlers.scrollToTopMessage, offset: 0x01f9ed32, size: 90 bytes, params: 1, frame: 14
var value3;
var defaultImport;
const previousRows = chatManager.getPreviousRows();
if (previousRows.length > 0) {
value3 = environment.__proto__;
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
defaultImport.scrollTo(chatRef.current, previousRows.length - 1);
}
}
function updateNativeRows(a0) { // fn#86759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2271, owner: useScrollHandlers.updateNativeRows, offset: 0x01f9ed8c, size: 101 bytes, params: 2, frame: 12
if (chatUpdatesQueue.isBlocking) {
chatUpdatesQueue.add(a0);
} else if (a0.isLoadingAtTop) {
if (env0_22.current) {
chatUpdatesQueue.add(a0);
} else if (env0_23.current) {
chatUpdatesQueue.add(a0);
} else {
applyNativeRowsUpdate(a0);
}
} else {
applyNativeRowsUpdate(a0);
}
}
function useScrollHandlersHandleScrollPosition({timeStamp, nativeEvent}) { // fn#86760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2444, owner: useScrollHandlers.handleScrollPosition, offset: 0x01f9edf1, size: 407 bytes, params: 2, frame: 32
var binding;
const isAtBottom = nativeEvent.isAtBottom;
const isNearBottom = nativeEvent.isNearBottom;
const isNearTop = nativeEvent.isNearTop;
const dragging = nativeEvent.dragging;
const decelerating = nativeEvent.decelerating;
const shouldShowJumpToPresent = nativeEvent.shouldShowJumpToPresent;
const isFirstMessageVisible = nativeEvent.isFirstMessageVisible;
const firstVisibleMessageIndex = nativeEvent.firstVisibleMessageIndex;
const firstVisibleMessagePercentVisible = nativeEvent.firstVisibleMessagePercentVisible;
const lastVisibleMessageIndex = nativeEvent.lastVisibleMessageIndex;
const changesetUpdateId = nativeEvent.changesetUpdateId;
const lastVisibleMessagePercentVisible = nativeEvent.lastVisibleMessagePercentVisible;
const changesetIdForChat = (require(9852) /* metro dependency 9852: ChatChangesetUpdateTracker */).getChangesetIdForChat(chatRef.current);
if (changesetUpdateId !== changesetIdForChat) {
if (env0_17.current == null) {
env0_17.current = timeStamp;
}
if (isStaff) {
binding = env1_6;
binding.log('STAFF-ACK-LOG: Ignoring outdated scroll event.', channelId, changesetUpdateId,
changesetIdForChat,
timeStamp);
}
} else {
var handleVisibleMessagesChangeBinding = handleVisibleMessagesChange;
var object2 = {firstVisibleMessageRowIndex: firstVisibleMessageIndex,
lastVisibleMessageRowIndex: lastVisibleMessageIndex,
firstVisibleMessagePercentVisible: firstVisibleMessagePercentVisible,
lastVisibleMessagePercentVisible: lastVisibleMessagePercentVisible};
var QuestsVisibleMessagesChangedSource = (require(6531) /* metro dependency 6531: QuestTypes */).QuestsVisibleMessagesChangedSource;
var SCROLL = QuestsVisibleMessagesChangedSource.SCROLL;
object2.source = SCROLL;
handleVisibleMessagesChangeBinding(object2);
var r17 = env0_17.current ?? timeStamp;
env0_17.current = undefined;
handleScroll({eventTimestamp: r17, isAtBottom: isAtBottom, isNearBottom: isNearBottom, isNearTop: isNearTop,
dragging: dragging, decelerating: decelerating, shouldShowJumpToPresent: shouldShowJumpToPresent,
isFirstMessageVisible: isFirstMessageVisible});
visibleMessagesWindowHandler.handleScrollPosition({rows: chatManager._rows,
firstVisibleMessageRowIndex: firstVisibleMessageIndex,
lastVisibleMessageRowIndex: lastVisibleMessageIndex});
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,24 @@
/* Metro module 11167; source: modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx; dependencies: [33, 4501, 697, 8177, 9773, 2] */
function _fun85262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11353:6, offset: 0x01f692d0, size: 222 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
let value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_80 = (importDefault(697) /* metro dependency 697: native */).space.PX_80;
const env0_3 = Reflect.apply(createStyles, value, [{chatItem: {maxHeight: 2 * PX_80}}]);
value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx');
exports.default = LongPressMessageChatItemPreview;
}
function LongPressMessageChatItemPreview({message}) { // fn#85263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11353:308, offset: 0x01f693ae, size: 112 bytes, params: 2, frame: 18
const styles = useStyles();
const ChatItem = importDefault(9773) /* metro dependency 9773: ChatItem */;
const defaultImportProps = {rowGenerator: env0_4, message: message, maxHeight: styles.chatItem.maxHeight};
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
defaultImportProps.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
return <ChatItem {...defaultImportProps} />;
}
@@ -0,0 +1,17 @@
/* Metro module 11401; source: modules/messages/native/long_press/showLongPressMessageActionSheet.tsx; dependencies: [4080, 11402, 1962, 2] */
function _fun87341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11587:6, offset: 0x01fb9d0f, 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/messages/native/long_press/showLongPressMessageActionSheet.tsx');
exports.showLongPressMessageActionSheet = showLongPressMessageActionSheet;
}
function showLongPressMessageActionSheet(a0) { // fn#87342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11587:230, offset: 0x01fb9d76, size: 82 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, 'MessageLongPressActionSheet', a0]);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,24 @@
/* Metro module 8191; source: modules/messages/native/renderer/EmbedUtils.tsx; dependencies: [27, 2] */
function _fun65695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8376:6, offset: 0x01bda508, size: 187 bytes, params: 8, frame: 20
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(27) /* metro dependency 27 */).Image;
Object = global.Object;
const freeze = Object.freeze;
const Set = global.Set;
let set = new Set(['YouTube', 'TikTok']);
set = Reflect.apply(freeze, Object, [set]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/EmbedUtils.tsx');
exports.getAssetUriForEmbed = function(a0) {
return Image.resolveAssetSource(a0).uri;
};
exports.SUPPORTED_VIDEO_PARTNERS = set;
exports.shouldPlayVideoInline = shouldPlayVideoInline;
}
function shouldPlayVideoInline(a0) { // fn#65697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8376:387, offset: 0x01bda5df, size: 38 bytes, params: 2, frame: 13
const value = a0;
const binding = env0_1;
return binding.has(value ?? '');
}
@@ -0,0 +1,108 @@
/* Metro module 8367; source: modules/messages/native/renderer/ExplicitMediaUtils.tsx; dependencies: [661, 1391, 4838, 4841, 4813, 1244, 2] */
function _fun66607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:6, offset: 0x01c0295e, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).MessageAttachmentFlags;
const getContentScanVersionFromMedia = function(a0) {
var value = undefined;
if (value !== a0.content_scan_version) {
return a0.content_scan_version;
}
return value === a0.contentScanVersion ? value : a0.contentScanVersion;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/ExplicitMediaUtils.tsx');
exports.getAttachmentObscurityProps = getAttachmentObscurityProps;
exports.getUnfurledMediaItemObscurityProps = getUnfurledMediaItemObscurityProps;
exports.getAttachmentObscurityDefaults = function() {
return {'isSpoiler': false, 'spoiler': ''};
};
}
function getSpoilerDescriptionForType(a0) { // fn#66608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:311, offset: 0x01c02a03, size: 301 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (a0 === 'image') {
return intl.string(t.sb2W2J);
}
if (a0 === 'video') {
return intl.string(t.ehBaMc);
}
if (a0 === 'file') {
return intl.string(t['3Gc2XP']);
}
if (a0 === 'generic') {
return intl.string(t.G71b77);
}
}
function getAttachmentObscurityProps({attachment, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:714, offset: 0x01c02b5b, size: 528 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const spoiler = attachment.spoiler;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const r5 = attachment.flags ?? 0;
const IS_SPOILER = MessageAttachmentFlags.IS_SPOILER;
const hasFlag2 = Reflect.apply(hasFlag, flagUtilsModule, [r5, IS_SPOILER]);
let object2 = {};
object2.contentScanVersion = getContentScanVersionFromMedia(attachment) ?? 0;
object2.flags = attachment.flags ?? 0;
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
let Attachment = ObscuredMediaTypes.Attachment;
const value4 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: Attachment,
media: object2}, enabledContentHarmTypeFlags]);
const moduleValue3 = obscuredMediaUtilsModule;
const isMediaScanPending = moduleValue3.isMediaScanPending;
Attachment = ObscuredMediaTypes.Attachment;
const isMediaScanPending2 = Reflect.apply(isMediaScanPending, moduleValue3, [{type: Attachment, media: object2},
enabledContentHarmTypeFlags]);
const value5 = value4.length > 0;
const r2 = value5 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
object2 = {};
object2.isSpoiler = shouldObscureSpoiler && (spoiler || hasFlag2);
const value6 = '';
object2.spoiler = shouldObscureSpoiler && (spoiler || hasFlag2) ? intl.string(t['F+x38C']).toUpperCase() : value6;
object2.obscure = value5;
object2.obscureDescription = value5 ? intl.string(t.SpxcUR) : value6;
object2.obscureAwaitingScan = isMediaScanPending2;
object2.verifyAge = value5 && shouldAgeVerify;
object2.obscureHideControls = r2;
object2.obscureIsOpaque = value5;
return object2;
}
function getUnfurledMediaItemObscurityProps({type, mediaItem, isSpoilered, isAuthorBot, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:1532, offset: 0x01c02d6b, size: 363 bytes, params: 2, frame: 25
var object2;
var r5;
var intl;
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
const GenericMedia = ObscuredMediaTypes.GenericMedia;
const value2 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: GenericMedia,
media: mediaItem}, enabledContentHarmTypeFlags]);
const r3 = !isAuthorBot && obscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.GenericMedia,
media: mediaItem}, enabledContentHarmTypeFlags);
const r8 = isSpoilered && shouldObscureSpoiler;
const value4 = value2.length > 0;
const r2 = value4 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
object2 = {isSpoiler: r8};
object2.spoilerDescription = r8 ? getSpoilerDescriptionForType(type) : null;
object2.isObscured = value4;
if (value4) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SpxcUR);
} else {
r5 = null;
}
object2.obscureDescription = r5;
object2.obscureAwaitingScan = r3;
object2.verifyAge = value4 && shouldAgeVerify;
object2.obscureHideControls = r2;
object2.obscureIsOpaque = value4;
return object2;
}
@@ -0,0 +1,240 @@
/* Metro module 8335; source: modules/messages/native/renderer/MarkupParsers.tsx; dependencies: [661, 672, 1393, 6622, 8336, 8349, 2] */
function _fun66357(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:6, offset: 0x01bf854f, size: 384 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
object3 = {'max': Infinity, 'maxAge': null, 'updateAgeOnGet': true};
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const MINUTE = Millis.MINUTE;
object3.maxAge = 15 * MINUTE;
let value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
value = importDefault(1393) /* metro dependency 1393 */;
const object4 = {};
copyDataProperties(object4, object3, undefined);
object4['updateAgeOnGet'] = false;
value = new value(object4);
value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/MarkupParsers.tsx');
exports.parseEmbedTitleMarkup = parseEmbedTitleMarkup;
exports.parseEmbedTitleMarkupWithoutLinks = parseEmbedTitleMarkupWithoutLinks;
exports.parseEmbedDescriptionMarkup = parseEmbedDescriptionMarkup;
exports.parseMessageMarkup = parseMessageMarkup;
}
function parseEmbedTitleMarkup(a0, a1) { // fn#66358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:396, offset: 0x01bf86cf, size: 120 bytes, params: 3, frame: 18
var r0;
var embedTitleToAST;
const value = '' + a0 + '-' + a1;
const value3 = env0_4.get(value);
if (value3 != null) {
r0 = value3;
} else {
embedTitleToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleToAST(a0, true,
{channelId: a1});
env0_4.set(value, embedTitleToAST);
r0 = embedTitleToAST;
}
return r0;
}
function parseEmbedTitleMarkupWithoutLinks(a0, a1) { // fn#66359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:580, offset: 0x01bf8747, size: 129 bytes, params: 3, frame: 19
var r0;
var embedTitleWithoutLinksToAST;
const value = '' + a0 + '-' + a1 + '-nolinks';
const value3 = env0_5.get(value);
if (value3 != null) {
r0 = value3;
} else {
embedTitleWithoutLinksToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleWithoutLinksToAST(a0,
true, {channelId: a1});
env0_5.set(value, embedTitleWithoutLinksToAST);
r0 = embedTitleWithoutLinksToAST;
}
return r0;
}
function parseEmbedDescriptionMarkup({description, channelId, isField, ignoreCache, replaceMap, showListsAndHeaders, showMaskedLinks}) { // fn#66360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:790, offset: 0x01bf87c8, size: 247 bytes, params: 2, frame: 27
var r2;
var r10;
var r6;
var propertyName;
var propertyName2;
var replaceAll;
var value4;
const value = '' + description + '-' + channelId;
const value3 = env0_6.get(value);
if (value3 != null) {
reducibleJoin3: while (true) {
if (!ignoreCache) {
return value3;
}
break reducibleJoin3;
}
}
const properties = Object.keys(replaceMap);
const properties3 = properties.length;
if (properties === undefined) {
r6 = description;
} else {
r2 = description;
r10 = 0;
reducibleLoop4: while (true) {
propertyName = properties[r10];
propertyName2 = r10 + 1;
if (propertyName === undefined) {
r6 = r2;
break reducibleLoop4;
}
replaceAll = r2.replaceAll;
value4 = Reflect.apply(replaceAll, r2, [propertyName, replaceMap[propertyName]]);
r2 = value4;
r10 = propertyName2;
continue reducibleLoop4;
}
}
const toAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseToAST(r6, true,
{'channelId': null, 'allowLinks': true, 'allowEmojiLinks': true, channelId: channelId,
allowHeading: !isField && showListsAndHeaders, allowList: showListsAndHeaders,
previewLinkTarget: showMaskedLinks});
env0_6.set(value, toAST);
return toAST;
}
function parseMessageMarkup(a0, a1, a2) { // fn#66361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:1199, offset: 0x01bf88bf, size: 418 bytes, params: 4, frame: 27
var r8;
var r1;
var r0;
var object4;
var moduleValue;
var renderMessageMarkupToAST;
var object5;
var defaultImport;
var astParserFor;
var moduleValue2;
var value6;
var content;
var object6;
const value = a3;
const value2 = a4;
const value3 = a5;
const value4 = a6;
let r12 = value !== undefined ? value : false;
let r10 = value2 !== undefined ? value2 : false;
const r11 = value3 !== undefined ? value3 : false;
const r4 = value4 !== undefined ? value4 : false;
const value5 = env0_7.get(a0);
if (value5 == null) {
if (a0.type !== MessageTypes.CHANGELOG) {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
} else if (a0.changelogId != null) {
object4 = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false,
'hasBailedAst': false};
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
astParserFor = defaultImport.astParserFor;
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
content = a0.content;
object6 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object6.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object6.allowList = r10;
object6.allowLinks = r4;
object6.previewLinkTarget = r4;
object4.content = value6(content, false, object6);
env0_7.set(a0, object4);
r1 = object4;
} else {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
}
r0 = r1;
} else if (value5.isInlineReplyPreview === r12) {
r0 = value5;
} else {
if (a0.type !== MessageTypes.CHANGELOG) {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
} else if (a0.changelogId != null) {
object4 = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false,
'hasBailedAst': false};
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
astParserFor = defaultImport.astParserFor;
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
content = a0.content;
object6 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object6.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object6.allowList = r10;
object6.allowLinks = r4;
object6.previewLinkTarget = r4;
object4.content = value6(content, false, object6);
env0_7.set(a0, object4);
r1 = object4;
} else {
object4 = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object5.allowHeading = r8;
r8 = r10 || r11;
object5.allowList = r8;
object5.allowLinks = r4;
object5.previewLinkTarget = r4;
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
object4['isInlineReplyPreview'] = r12;
env0_7.set(a0, object4);
r1 = object4;
}
r0 = r1;
}
return r0;
}
@@ -0,0 +1,65 @@
/* Metro module 8182; source: modules/messages/native/renderer/MessageWithContent.tsx; dependencies: [8183, 8178, 8184, 1244, 8352, 2] */
function _fun65624(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8367:6, offset: 0x01bd5821, size: 140 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
const env0_4 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).RowType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/MessageWithContent.tsx');
exports.generateMessageRowData = generateMessageRowData;
}
function generateMessageRowData(a0, a1, a2) { // fn#65625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8367:238, offset: 0x01bd58ad, size: 710 bytes, params: 4, frame: 34
const changeType = a0.changeType;
const message = a0.message;
const roleStyle = a0.roleStyle;
const isFirst = a0.isFirst;
const isEditing = a0.isEditing;
const separatorBefore = a0.separatorBefore;
const canAddNewReactions = a0.canAddNewReactions;
const reactionsTheme = a0.reactionsTheme;
const isSystemDM = a0.isSystemDM;
const r20 = isSystemDM !== undefined && isSystemDM;
const canShowImages = a0.canShowImages;
const r21 = canShowImages === undefined || canShowImages;
const truncation = a0.truncation;
const renderContentOnly = a0.renderContentOnly;
const pushFeedbackType = a0.pushFeedbackType;
const alwaysShowAddReaction = a0.alwaysShowAddReaction;
const r4 = alwaysShowAddReaction !== undefined && alwaysShowAddReaction;
const overrideBackgroundHighlight = a0.overrideBackgroundHighlight;
const showContentInventoryEntryFallbackEmbed = a0.showContentInventoryEntryFallbackEmbed;
const object2 = {};
const MESSAGE = RowType.MESSAGE;
object2.type = MESSAGE;
object2.message = (importDefault(8184) /* metro dependency 8184: createMessageContent */)({options: a1,
message: message, roleStyle: roleStyle, isFirst: isFirst, isEditing: isEditing, canShowImages: r21,
isSystemDM: r20, isInlineReplyPreview: false, pushFeedbackType: pushFeedbackType,
renderContentOnly: renderContentOnly,
showContentInventoryEntryFallbackEmbed: showContentInventoryEntryFallbackEmbed});
object2.canAddNewReactions = canAddNewReactions;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.addNewReactionAccessibilityLabel = Reflect.apply(string, intl, [t.lfIHs4]);
object2.reactionsTheme = reactionsTheme;
object2.highlightLabel = intl.string(t['IOS/dU']);
object2.renderContentOnly = renderContentOnly;
object2.separatorBefore = separatorBefore;
object2.changeType = changeType;
object2.truncation = truncation;
object2.alwaysShowAddReaction = r4;
object2.backgroundHighlight = overrideBackgroundHighlight ?? (importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */).createBackgroundHighlight({message: message,
theme: a2, isEditing: isEditing,
isAutomodBlockedMessage: GuildAutomodMessageStore.getMessage(message.id) != null});
const defaultImport3 = importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */;
object2.swipeActions = defaultImport3.createSwipeActions(a1.enableSwipeActions && a0.canReply,
a1.enableSwipeActions && a0.canEdit);
object2.replyAccessibilityLabel = intl.string(t['5IEsGx']);
string = intl.string;
const I3ltXO = t.I3ltXO;
object2.forwardAccessibilityLabel = Reflect.apply(string, intl, [I3ltXO]);
object2.threadAccessibilityLabel = intl.string(t.rBIGBL);
return object2;
}
@@ -0,0 +1,23 @@
/* Metro module 8179; source: modules/messages/native/renderer/RenderMessageOptionsContext.tsx; dependencies: [2] */
function _fun65617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8364:6, offset: 0x01bd53c7, size: 158 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {USER_SETTING: 0};
object2[0] = 'USER_SETTING';
object2.FORCE_ENABLE = 1;
object2[1] = 'FORCE_ENABLE';
object2.FORCE_DISABLE = 2;
object2[2] = 'FORCE_DISABLE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RenderMessageOptionsContext.tsx');
exports.UserOption = object2;
exports.DEFAULT_OPTIONS = {'renderEmbeds': true, 'renderReactions': true, 'inlineEmbedMedia': true,
'inlineAttachmentMedia': true, 'animateEmoji': true, 'gifAutoPlay': false, 'timestampHourCycle': 0,
'renderCodedLinks': true, 'renderGiftCode': true, 'renderActivityInstanceEmbed': true,
'renderActivityInviteEmbed': true, 'renderComponents': true, 'renderThreadEmbeds': true, 'renderReplies': true,
'renderCommunicationDisabled': false, 'renderAttachments': true, 'renderExecutedCommands': true,
'renderPolls': true, 'renderSharedClientTheme': true, 'renderForumPostActions': true, 'ignoreMentioned': false,
'ignoreEmbedDescriptionCache': false, 'forceHideSimpleEmbedContent': false, 'enableSwipeActions': false,
'useAlternateEmbedColors': false, 'restrictedPreview': false};
}
@@ -0,0 +1,78 @@
/* Metro module 8177; source: modules/messages/native/renderer/RowGenerator.tsx; dependencies: [6, 7, 1310, 8178, 8179, 22, 8180, 8182, 10612, 10613, 1360, 2] */
function _fun65611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8362:6, offset: 0x01bd4e71, size: 239 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
let value = require(8178) /* metro dependency 8178: RowGeneratorConstants */;
const env0_6 = value.RowType;
const env0_7 = value.SeparatorType;
const env0_8 = value.LoadingType;
const DEFAULT_OPTIONS = (require(8179) /* metro dependency 8179: RenderMessageOptionsContext */).DEFAULT_OPTIONS;
copyDataProperties({'constrainedWidth': 0, 'animatingStickerMessageId': null, 'forcedTheme': null,
'shouldObscureSpoiler': true, 'shouldDisableInteractiveComponents': true}, DEFAULT_OPTIONS, undefined);
value = _fun65612();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RowGenerator.tsx');
exports.default = value;
}
function _fun65612() { // fn#65612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8362:344, offset: 0x01bd4f60, size: 84 bytes, params: 1, frame: 15
return env0_4(RowManager, [{key: 'setOptions', value: value_65614}, {key: 'generate', value: value_65615}]);
}
function RowManager() { // fn#65613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8362:365, offset: 0x01bd4fb4, size: 37 bytes, params: 1, frame: 14
env1_3(this, RowManager);
this.options = env1_9;
}
function value_65614(a0) { // fn#65614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8362:448, offset: 0x01bd4fd9, size: 63 bytes, params: 2, frame: 19
const defaultImport = importDefault(22) /* metro dependency 22 */;
this.options = defaultImport.merge({}, env1_9, this.options, a0);
}
function value_65615(a0) { // fn#65615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8362:532, offset: 0x01bd5018, size: 372 bytes, params: 2, frame: 18
const rowType = a0.rowType;
const r2 = this.options.forcedTheme ?? ThemeStore.theme;
let value = environment.__proto__;
const BLOCKED_GROUP = RowType.BLOCKED_GROUP;
if (BLOCKED_GROUP === rowType) {
return (require(8180) /* metro dependency 8180: BlockedGroup */).generateBlockedGroupRowData(a0, r2, this);
}
const IGNORED_GROUP = RowType.IGNORED_GROUP;
if (IGNORED_GROUP === rowType) {
return (require(8180) /* metro dependency 8180: BlockedGroup */).generateBlockedGroupRowData(a0, r2, this);
}
const SUSPENDED_USER_GROUP = RowType.SUSPENDED_USER_GROUP;
if (SUSPENDED_USER_GROUP === rowType) {
return (require(8180) /* metro dependency 8180: BlockedGroup */).generateBlockedGroupRowData(a0, r2, this);
}
const MESSAGE = RowType.MESSAGE;
if (MESSAGE === rowType) {
value = require(8182) /* metro dependency 8182: MessageWithContent */;
return value.generateMessageRowData(a0, this.options, r2);
}
const DAY = SeparatorType.DAY;
if (DAY === rowType) {
return (require(10612) /* metro dependency 10612: Separator */).generateSeparatorRowData(a0, r2);
}
const UNREAD = SeparatorType.UNREAD;
if (UNREAD === rowType) {
return (require(10612) /* metro dependency 10612: Separator */).generateSeparatorRowData(a0, r2);
}
const SUMMARY = SeparatorType.SUMMARY;
if (SUMMARY === rowType) {
return (require(10612) /* metro dependency 10612: Separator */).generateSeparatorRowData(a0, r2);
}
const LOAD_BEFORE = LoadingType.LOAD_BEFORE;
if (LOAD_BEFORE === rowType) {
return (require(10613) /* metro dependency 10613: Loading */).generateLoadingRowData(a0, r2);
}
const LOAD_AFTER = LoadingType.LOAD_AFTER;
if (LOAD_AFTER === rowType) {
return (require(10613) /* metro dependency 10613: Loading */).generateLoadingRowData(a0, r2);
}
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(rowType);
}
@@ -0,0 +1,56 @@
/* Metro module 8178; source: modules/messages/native/renderer/RowGeneratorConstants.tsx; dependencies: [2] */
function _fun65616(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8363:6, offset: 0x01bd518c, size: 571 bytes, params: 8, frame: 24
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {NOOP: 0};
object3[0] = 'NOOP';
object3.INSERT = 1;
object3[1] = 'INSERT';
object3.UPDATE = 2;
object3[2] = 'UPDATE';
object3.REMOVE = 3;
object3[3] = 'REMOVE';
const object4 = {SEPARATOR: 0};
object4[0] = 'SEPARATOR';
object4.MESSAGE = 1;
object4[1] = 'MESSAGE';
object4.BLOCKED_GROUP = 2;
object4[2] = 'BLOCKED_GROUP';
object4.LOADING = 4;
object4[4] = 'LOADING';
object4.EMBEDDED_ACTIVITY = 5;
object4[5] = 'EMBEDDED_ACTIVITY';
object4.IGNORED_GROUP = 6;
object4[6] = 'IGNORED_GROUP';
object4.SUSPENDED_USER_GROUP = 7;
object4[7] = 'SUSPENDED_USER_GROUP';
const object5 = {LOADED: 0};
object5[0] = 'LOADED';
object5.SYSTEM = 1;
object5[1] = 'SYSTEM';
const object8 = {UNSPECIFIED: 0};
object8[0] = 'UNSPECIFIED';
object8.UPLOAD_FAILED = 1;
object8[1] = 'UPLOAD_FAILED';
object8.AUTO_MODERATION_BLOCKED_MESSAGE = 2;
object8[2] = 'AUTO_MODERATION_BLOCKED_MESSAGE';
const object10 = {NONE: 0};
object10[0] = 'NONE';
object10.REPLY = 1;
object10[1] = 'REPLY';
object10.REPLY_EDIT = 2;
object10[2] = 'REPLY_EDIT';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RowGeneratorConstants.tsx');
exports.Changeset = object3;
exports.RowType = object4;
exports.SeparatorType = {DAY: 'day', UNREAD: 'unread', SUMMARY: 'summary'};
exports.SeparatorAction = {TOGGLE_BLOCKED_MESSAGES: 'toggle', LOAD_MORE_BEFORE: 'load_more_before',
LOAD_MORE_AFTER: 'load_more_after', DISMISS_SUSPENDED_USER_MESSAGES: 'dismiss'};
exports.LoadingType = {LOAD_BEFORE: 'load_before', LOAD_AFTER: 'load_after'};
exports.ReferencedMessageRowState = object5;
exports.MessageFailureState = object8;
exports.AttachmentType = {IMAGE: 'image', VIDEO: 'video', AUDIO: 'audio', OTHER: 'other'};
exports.SwipeActionsType = object10;
}
@@ -0,0 +1,20 @@
/* Metro module 8181; source: modules/messages/native/renderer/RowGeneratorStyleSheet.tsx; dependencies: [27, 2] */
function _fun65622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8366:6, offset: 0x01bd5762, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(27) /* metro dependency 27 */).processColor;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RowGeneratorStyleSheet.tsx');
exports.processColorOrThrow = processColorOrThrow_65623;
}
function processColorOrThrow_65623(a0) { // fn#65623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8366:234, offset: 0x01bd57cf, size: 82 bytes, params: 2, frame: 14
var Error;
let value = processColor(a0);
if (value == null) {
Error = global.Error;
value = 'Unable to parse color: "' + a0 + '"';
throw new Error();
}
return value;
}
@@ -0,0 +1,22 @@
/* Metro module 8368; source: modules/messages/native/renderer/RowGeneratorTypes.tsx; dependencies: [2] */
function _fun66613(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8553:6, offset: 0x01c02ee6, size: 181 bytes, params: 8, frame: 17
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {IMAGE: 1};
object3[1] = 'IMAGE';
object3.VIDEO = 2;
object3[2] = 'VIDEO';
object3.VISUAL_PLACEHOLDER = 3;
object3[3] = 'VISUAL_PLACEHOLDER';
const object4 = {DEFAULT: 0};
object4[0] = 'DEFAULT';
object4.SEARCH = 1;
object4[1] = 'SEARCH';
object4.MEDIA_VIEWER = 2;
object4[2] = 'MEDIA_VIEWER';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RowGeneratorTypes.tsx');
exports.MediaGalleryItemType = object3;
exports.MessageContextType = object4;
}
@@ -0,0 +1,120 @@
/* Metro module 8352; source: modules/messages/native/renderer/RowGeneratorUtils.tsx; dependencies: [27, 4502, 1379, 1867, 4503, 8178, 661, 4501, 4000, 697, 6858, 4625, 1477, 2] */
function _fun66494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8537:6, offset: 0x01bfda61, size: 606 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(4503) /* metro dependency 4503: MessageConstants */;
const env0_6 = value.DEFAULT_GUILD_OFFICIAL_COLOR;
const env0_7 = value.GUILD_OFFICIAL_HIGHLIGHT_ALPHA_COLOR;
const env0_8 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).SwipeActionsType;
value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.MessageFlags;
const env0_10 = value.MessageTypes;
value = require(4501) /* metro dependency 4501: createStyles */;
value = value.experimental_createToken(function() {
var moduleValue = require(dependencyMap[8]);
var BRAND_500 = importDefault(dependencyMap[9]).unsafe_rawColors.BRAND_500;
return moduleValue.hexWithOpacity(BRAND_500, 0.1);
});
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = createStylesModule.createNativeStyleProperties;
object2 = {};
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object2.ephemeralBackgroundColor = INTERACTIVE_BACKGROUND_ACTIVE;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.ephemeralGutterColor = BACKGROUND_BRAND;
object2.giftIntentEphemeralBackgroundColor = value;
const MESSAGE_MENTIONED_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_MENTIONED_BACKGROUND_DEFAULT;
object2.mentionedBackgroundColor = MESSAGE_MENTIONED_BACKGROUND_DEFAULT;
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
object2.mentionedGutterColor = YELLOW_300;
const MESSAGE_AUTOMOD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_AUTOMOD_BACKGROUND_DEFAULT;
object2.automodBlockedBackgroundColor = MESSAGE_AUTOMOD_BACKGROUND_DEFAULT;
const RED_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_345;
object2.automodBlockedGutterColor = RED_345;
const MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
object2.editingColor = MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
value = Reflect.apply(createNativeStyleProperties, createStylesModule, [object2]);
const Set = global.Set;
const MediaManager = NativeModules.MediaManager;
const getConstants = MediaManager.getConstants;
const set = new Set(Reflect.apply(getConstants, MediaManager, []).supportedExtensions);
object2 = {getImageSrc: getImageSrc_66496, createBackgroundHighlight: createBackgroundHighlight,
createSwipeActions: function(a0, a1) {
return a0 ? a1 ? SwipeActionsType.REPLY_EDIT : SwipeActionsType.REPLY : SwipeActionsType.NONE;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RowGeneratorUtils.tsx');
exports.default = object2;
exports.InviteEmbedBackground = {'dark': '#313339', 'light': '#fafafa'};
exports.resolveHighlightThemedColors = value;
}
function getImageSrc_66496(a0, a1, a2, a3) { // fn#66496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8537:1032, offset: 0x01bfdd0b, size: 141 bytes, params: 5, frame: 17
const value = a3;
let r1 = !a0.endsWith('.webp') && !a0.endsWith('.avif');
r1 = !r1 ? env0_12.has('webp') : r1;
return (importDefault(1477) /* metro dependency 1477: ImageUtils */).getMobileOptimizedSrc(a0, a1, a2,
!r1 || value ? 'png' : null);
}
function createBackgroundHighlight({message, theme, isEditing, isAutomodBlockedMessage}) { // fn#66497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8537:1212, offset: 0x01bfdd98, size: 489 bytes, params: 2, frame: 20
var r4;
var r2;
var moduleValue;
var value5;
var moduleValue2;
var moduleValue3;
var moduleValue4;
const value3 = env0_11(theme);
if (isEditing) {
return {backgroundColor: value3.editingColor};
}
if (isAutomodBlockedMessage) {
return {backgroundColor: value3.automodBlockedBackgroundColor, gutterColor: value3.automodBlockedGutterColor};
}
const hasFlag = message.hasFlag;
const IS_GUILD_OFFICIAL = MessageFlags.IS_GUILD_OFFICIAL;
if (Reflect.apply(hasFlag, message, [IS_GUILD_OFFICIAL])) {
moduleValue = require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */;
if (moduleValue.showGuildOfficialMessageGradient(AccessibilityStore.officialMessageStyle)) {
value5 = GuildStore.getGuild(ChannelStore.getChannel(message.getChannelId())?.guild_id);
moduleValue2 = require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */;
if (moduleValue2.isGuildOfficialMessagesEnabled(value5, 'RowGeneratorUtils')) {
r4 = value5?.officialMessageColor ?? DEFAULT_GUILD_OFFICIAL_COLOR;
if (message.mentioned) {
r2 = value3.mentionedGutterColor;
} else {
moduleValue4 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
r2 = moduleValue4.hasEphemeralAppearance(message) ? value3.ephemeralGutterColor : undefined;
}
return {backgroundColor: r4 | GUILD_OFFICIAL_HIGHLIGHT_ALPHA_COLOR, gutterColor: r2};
}
if (message.mentioned) {
r4 = {backgroundColor: value3.mentionedBackgroundColor, gutterColor: value3.mentionedGutterColor};
} else {
moduleValue3 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
r4 = moduleValue3.hasEphemeralAppearance(message) ? {backgroundColor: message.type === MessageTypes.GIFTING_PROMPT ? value3.giftIntentEphemeralBackgroundColor : value3.ephemeralBackgroundColor,
gutterColor: value3.ephemeralGutterColor} : undefined;
}
return r4;
}
}
if (message.mentioned) {
r4 = {backgroundColor: value3.mentionedBackgroundColor, gutterColor: value3.mentionedGutterColor};
} else {
moduleValue3 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
r4 = moduleValue3.hasEphemeralAppearance(message) ? {backgroundColor: message.type === MessageTypes.GIFTING_PROMPT ? value3.giftIntentEphemeralBackgroundColor : value3.ephemeralBackgroundColor,
gutterColor: value3.ephemeralGutterColor} : undefined;
}
return r4;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,65 @@
/* Metro module 8393; source: modules/messages/native/renderer/createMessageFailedEmbed.tsx; dependencies: [8178, 661, 8191, 8394, 1244, 8395, 4655, 2] */
function _fun66717(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8578:6, offset: 0x01c069fc, size: 159 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).MessageFailureState;
const env0_4 = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/createMessageFailedEmbed.tsx');
exports.default = createMessageFailedEmbed;
exports.createAutomodBlockedMessageEmbed = function({errorMessage, colors}) {
var object = {};
object.type = MessageEmbedTypes.TEXT;
object.messageSendError = errorMessage;
object.failureState = MessageFailureState.AUTO_MODERATION_BLOCKED_MESSAGE;
object.disableBackgroundColor = true;
object.bodyTextColor = colors.automodBlockedBodyTextColor;
object.iconURL = require(dependencyMap[2]).getAssetUriForEmbed(importDefault(dependencyMap[3]));
return object;
};
}
function createMessageFailedEmbed({uploaderFile, useAttachmentUploadPreview, colors}) { // fn#66718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8578:259, offset: 0x01c06a9b, size: 536 bytes, params: 2, frame: 20
var r2;
var r1;
var r0;
var object2;
var value;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (uploaderFile != null) {
if (useAttachmentUploadPreview) {
object2 = {};
object2.type = MessageEmbedTypes.TEXT;
object2.messageSendError = intl.string(t.lBLP4u);
object2.failureState = MessageFailureState.UNSPECIFIED;
object2.disableBackgroundColor = true;
object2.bodyTextColor = colors.failedMessageBodyTextColor;
object2.iconURL = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8395) /* metro dependency 8395 */);
r1 = object2;
} else {
object2 = {};
object2.type = MessageEmbedTypes.TEXT;
object2.numAttachments = intl.formatToPlainString(t.D0noUt, {count: uploaderFile.attachmentsCount});
object2.failureState = MessageFailureState.UPLOAD_FAILED;
if (uploaderFile.currentSize === 0) {
r2 = '';
} else {
value = require(4655) /* metro dependency 4655: FileUtils */;
value = value.sizeString(uploaderFile.currentSize);
value = ' (' + value + ')';
r2 = value;
}
object2.attachmentsSize = String(r2);
object2.bodyTextColor = colors.embedBodyTextColor;
r1 = object2;
}
r0 = r1;
} else {
r0 = {type: MessageEmbedTypes.TEXT, messageSendError: intl.string(t.lBLP4u),
failureState: MessageFailureState.UNSPECIFIED, disableBackgroundColor: true,
bodyTextColor: colors.failedMessageBodyTextColor};
}
return r0;
}
@@ -0,0 +1,89 @@
/* Metro module 8293; source: modules/messages/native/renderer/getTagProperties.tsx; dependencies: [27, 4503, 8294, 1244, 8296, 8298, 2] */
function _fun66171(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8478:6, offset: 0x01bf03de, size: 146 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const env0_4 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageTagTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/getTagProperties.tsx');
exports.default = getTagProperties;
}
function getTagProperties({message, isSystemDM, channel, colors}) { // fn#66172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8478:235, offset: 0x01bf0470, size: 805 bytes, params: 2, frame: 27
var r3;
var r4;
var r6;
var r8;
var r10;
var r7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value5;
var value6;
var BOT_TAG_SERVER_TYPE;
var value7;
var SYSTEM_DM_TAG_SYSTEM_TYPE;
var value8;
var moduleValue2;
var value10;
isSystemDM = !(isSystemDM === undefined) && isSystemDM;
const isVerifiedBot2 = message.author.isVerifiedBot();
const publicGuildsUtilsModule = require(8294) /* metro dependency 8294: PublicGuildsUtils */;
if (publicGuildsUtilsModule.isPublicSystemMessage(message)) {
value7 = intl.string(t.lKQ7Wt);
SYSTEM_DM_TAG_SYSTEM_TYPE = MessageTagTypes.SYSTEM_DM_TAG_SYSTEM_TYPE;
value8 = true;
r3 = undefined;
r4 = SYSTEM_DM_TAG_SYSTEM_TYPE;
r6 = value8;
r8 = value7;
} else if (isSystemDM) {
value7 = intl.string(t.lKQ7Wt);
SYSTEM_DM_TAG_SYSTEM_TYPE = MessageTagTypes.SYSTEM_DM_TAG_SYSTEM_TYPE;
value8 = true;
r3 = undefined;
r4 = SYSTEM_DM_TAG_SYSTEM_TYPE;
r6 = value8;
r8 = value7;
} else if ((importDefault(8296) /* metro dependency 8296: isCrosspost */)(message)) {
value6 = intl.string(t.PuJGuM);
BOT_TAG_SERVER_TYPE = MessageTagTypes.BOT_TAG_SERVER_TYPE;
r3 = undefined;
r4 = BOT_TAG_SERVER_TYPE;
r6 = isVerifiedBot2;
r8 = value6;
} else if (message.author.bot) {
value5 = intl.string(t['9RNkeF']);
r3 = isVerifiedBot2 ? Image.resolveAssetSource(importDefault(8298) /* metro dependency 8298 */).uri : undefined;
r4 = undefined;
r6 = isVerifiedBot2;
r8 = value5;
} else {
r3 = undefined;
r4 = undefined;
r6 = isVerifiedBot2;
r8 = null;
}
if (r8 != null) {
moduleValue2 = publicGuildsUtilsModule;
if (moduleValue2.isPublicSystemMessage(message)) {
r10 = intl.string(t['7s687k']);
} else if (isSystemDM) {
r10 = intl.string(t['7s687k']);
} else {
value10 = (importDefault(8296) /* metro dependency 8296: isCrosspost */)(message);
string = intl.string;
r10 = value10 ? Reflect.apply(string, intl, [t['39trQT']]) : r6 ? Reflect.apply(string, intl,
[t.g76OcH]) : Reflect.apply(string, intl, [t.qwJHjo]);
}
r7 = r10;
} else {
r7 = null;
}
return {tagText: r8, tagAccessibilityLabel: r7, tagVerified: r6, tagTextColor: undefined,
tagBackgroundColor: undefined, tagType: r4, tagIconUrl: r3,
opTagText: channel?.ownerId === message.author.id && channel != null && channel.isForumPost() ? intl.string(t.fyE8sH) : null,
opTagTextColor: colors.opTagTextColor, opTagBackgroundColor: colors.opTagBackgroundColor};
}
@@ -0,0 +1,80 @@
/* Metro module 8350; source: modules/messages/native/renderer/redactRestrictedContent.tsx; dependencies: [2] */
function _fun66484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8535:6, offset: 0x01bfc982, size: 102 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/redactRestrictedContent.tsx');
exports.default = redactRestrictedContent;
}
function nodeToText(a0) { // fn#66485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8535:43, offset: 0x01bfc9e8, size: 147 bytes, params: 2, frame: 16
var r2;
var r1;
var r0;
var Array;
let value = a0;
const value2 = '';
if (value == null) {
r0 = value2;
} else {
if (typeof value === 'string') {
r1 = value;
} else {
Array = global.Array;
if (Array.isArray(value)) {
value = value.map(nodeToText);
value = value.join(value2);
r2 = value;
} else if (typeof value.content === 'string') {
r2 = value.content;
} else if (value.content != null) {
value = nodeToText(value.content);
r2 = value;
} else {
r2 = value2;
}
r1 = r2;
}
r0 = r1;
}
return r0;
}
function redactRestrictedContent(a0) { // fn#66486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8535:380, offset: 0x01bfca7b, size: 261 bytes, params: 2, frame: 17
var r1;
var r0;
var Array;
var object2;
let value = a0;
if (value == null) {
r0 = value;
} else if (typeof value === 'string') {
r0 = value;
} else {
Array = global.Array;
if (Array.isArray(value)) {
value = value.map(redactRestrictedContent);
r1 = value;
} else if (value.type === 'link') {
object2 = {type: 'inlineCode'};
object2.content = nodeToText(value.content);
r1 = object2;
} else if (value.type === 'attachmentLink') {
object2 = {type: 'inlineCode'};
object2.content = nodeToText(value.content);
r1 = object2;
} else if (value.type === 'customEmoji') {
r1 = {type: 'text', content: ':' + value.alt + ':'};
} else if (value.content == null) {
r1 = value;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
value = redactRestrictedContent(value.content);
object2['content'] = value;
r1 = object2;
}
r0 = r1;
}
return r0;
}
@@ -0,0 +1,80 @@
/* Metro module 8198; source: modules/messages/native/renderer/resolveMessageContentColors.tsx; dependencies: [4501, 4002, 697, 2] */
function _fun65707(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8383:6, offset: 0x01bdadb4, size: 736 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(4501) /* metro dependency 4501: createStyles */;
value = value.experimental_createToken(function({theme}) {
var isThemeDark = require(dependencyMap[1]).isThemeDark(theme);
theme = importDefault(dependencyMap[2]).unsafe_rawColors;
return isThemeDark ? theme.PRIMARY_300 : theme.PRIMARY_630;
});
const value3 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function({theme}) {
var isThemeDark = require(dependencyMap[1]).isThemeDark(theme);
theme = importDefault(dependencyMap[2]).unsafe_rawColors;
return isThemeDark ? theme.BRAND_260 : theme.BRAND_200;
});
object2 = {};
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.textColor = TEXT_STRONG;
const TEXT_LINK = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK;
object2.linkColor = TEXT_LINK;
let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.timestampColor = TEXT_MUTED;
const MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
object2.highlightColor = MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.unsupportedColor = TEXT_MUTED;
object2.embedProviderColor = value;
const BORDER_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_NORMAL;
object2.embedBorderLeftColor = BORDER_NORMAL;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.embedBodyTextColor = TEXT_DEFAULT;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.embedHeaderTextColor = MOBILE_TEXT_HEADING_PRIMARY;
const BRAND_560 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_560;
object2.opTagTextColor = BRAND_560;
object2.opTagBackgroundColor = value3;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.failedMessageBodyTextColor = RED_400;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.automodBlockedBodyTextColor = TEXT_MUTED;
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object2.aiBotTagColor = TEXT_FEEDBACK_POSITIVE;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.editedColor = TEXT_MUTED;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.defaultUsernameColor = INTERACTIVE_TEXT_ACTIVE;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.feedbackColor = BACKGROUND_MOD_MUTED;
const CONTROL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
object2.reportFpTextColor = CONTROL_SECONDARY_TEXT_DEFAULT;
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object2.reportFpBackgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.retryTextColor = WHITE;
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.retryBackgroundColor = BACKGROUND_BRAND;
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.clipTagBackgroundColor = BACKGROUND_BRAND;
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.clipTagTextColor = WHITE;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createNativeStyleProperties(_fun65710);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/resolveMessageContentColors.tsx');
exports.default = _default_65711;
}
function _fun65710(a0) { // fn#65710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8383:1555, offset: 0x01bdb146, size: 70 bytes, params: 2, frame: 14
const object2 = {};
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
object2.embedBackgroundColor = a0 ? colors.EMBED_BACKGROUND_ALTERNATE : colors.EMBED_BACKGROUND;
copyDataProperties(object2, env0_3, importDefault);
return object2;
}
function _default_65711(a0) { // fn#65711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8383:1675, offset: 0x01bdb18c, size: 29 bytes, params: 2, frame: 13
const value = a1;
return env0_4(a0, value !== undefined ? value : false);
}
@@ -0,0 +1,24 @@
/* Metro module 8442; source: modules/messages/native/renderer/row_data/ConnectionsRoleTag.tsx; dependencies: [27, 661, 697, 673, 2] */
function _fun67011(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8627:6, offset: 0x01c124ce, size: 146 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).processColor;
const env0_4 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR_HEX;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/ConnectionsRoleTag.tsx');
exports.createConnectionsRoleTag = createConnectionsRoleTag;
}
function createConnectionsRoleTag({colorString, id, name}) { // fn#67012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8627:277, offset: 0x01c12560, size: 192 bytes, params: 2, frame: 19
const r4 = colorString ?? DEFAULT_ROLE_COLOR_HEX;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const r2 = (require(673) /* metro dependency 673: ColorUtils */).getDarkness((require(673) /* metro dependency 673: ColorUtils */).hex2int(r4)) < 0.3 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630 : WHITE;
const object2 = {};
object2.id = id;
object2.name = name;
const processColorBinding = processColor;
object2.backgroundColor = processColorBinding(r4);
object2.iconColor = processColorBinding(r2);
return object2;
}
@@ -0,0 +1,39 @@
/* Metro module 10608; source: modules/messages/native/renderer/row_data/CtaButton.tsx; dependencies: [4822, 10609, 4813, 1244, 2] */
function _fun81752(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10794:6, offset: 0x01edcf00, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const explicitMediaStore = importDefault(4822) /* metro dependency 4822: ExplicitMediaStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/CtaButton.tsx');
exports.createCtaButton = createCtaButton;
}
function createCtaButton(a0, a1, a2) { // fn#81753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10794:213, offset: 0x01edcf72, size: 431 bytes, params: 4, frame: 22
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = undefined;
const ctaButtonType = (require(10609) /* metro dependency 10609: CtaButtonUtils */).getCtaButtonType(a0, a1);
const isAgeVerified2 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isAgeVerified();
const shouldShowTiggerPawtect2 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).shouldShowTiggerPawtect();
const CtaButtonType = (require(10609) /* metro dependency 10609: CtaButtonUtils */).CtaButtonType;
const MARK_AS_FALSE_POSITIVE = CtaButtonType.MARK_AS_FALSE_POSITIVE;
if (MARK_AS_FALSE_POSITIVE === ctaButtonType) {
object2 = {};
object2.text = intl.string(t['4q1Elf']);
object2.textColor = a2.reportFpTextColor;
object2.backgroundColor = a2.reportFpBackgroundColor;
object2.callback = ExplicitMediaStore.canSubmitFpReport(a0) ? CtaButtonType.MARK_AS_FALSE_POSITIVE : value2;
return object2;
}
const AGE_VERIFICATION_RETRY = CtaButtonType.AGE_VERIFICATION_RETRY;
if (AGE_VERIFICATION_RETRY === ctaButtonType) {
string = intl.string;
return {text: isAgeVerified2 ? Reflect.apply(string, intl, [t['9KiIz6']]) : Reflect.apply(string, intl,
[t['/nicWo']]), textColor: a2.retryTextColor, backgroundColor: a2.retryBackgroundColor,
callback: shouldShowTiggerPawtect2 ? CtaButtonType.AGE_VERIFICATION_RETRY : value2};
}
return value2;
}
@@ -0,0 +1,60 @@
/* Metro module 8331; source: modules/messages/native/renderer/row_data/EphemeralIndication.tsx; dependencies: [8183, 661, 8332, 1244, 1948, 2] */
function _fun66350(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8516:6, offset: 0x01bf78d4, size: 150 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.HelpdeskArticles;
const env0_5 = constantsModule.MessageFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/EphemeralIndication.tsx');
exports.createEphemeralIndication = createEphemeralIndication;
}
function createEphemeralIndication(a0) { // fn#66351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8516:281, offset: 0x01bf796a, size: 621 bytes, params: 2, frame: 23
var interactionMetadata;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport;
var defaultImport2;
var moduleValue;
var getEphemeralReasonMessage;
var value3;
var defaultImport3;
const hasFlag = a0.hasFlag;
const EPHEMERAL = MessageFlags.EPHEMERAL;
const hasFlag2 = Reflect.apply(hasFlag, a0, [EPHEMERAL]);
const value2 = undefined;
if (hasFlag2) {
interactionMetadata = a0.interactionMetadata;
if ((interactionMetadata == null ? value2 : interactionMetadata.ephemerality_reason) != null) {
moduleValue = require(8332) /* metro dependency 8332: ApplicationCommandUserAppUtils */;
getEphemeralReasonMessage = moduleValue.getEphemeralReasonMessage;
interactionMetadata = a0.interactionMetadata;
value3 = Reflect.apply(getEphemeralReasonMessage, moduleValue,
[interactionMetadata == null ? value2 : interactionMetadata.ephemerality_reason]);
object2 = {};
object2.content = intl.formatToParts(t.xgCMRQ, {handleDelete: {action: 'bindDismissMessage', message: a0},
reason: value3});
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object2.helpArticleLink = defaultImport3.getArticleURL(HelpdeskArticles.USING_APPS_FAQ);
object2.helpButtonAccessibilityLabel = intl.string(t.OIWSJe);
return object2;
}
object2 = {};
object2.content = intl.formatToParts(t.uX3ecL, {'count': 1, 'countMessages': 1,
handleDelete: {action: 'bindDismissMessage', message: a0}});
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object2.helpArticleLink = defaultImport.getAppsSupportURL(HelpdeskArticles.EPHEMERAL_MESSAGES);
object2.helpButtonAccessibilityLabel = intl.string(t.htHOrp);
if (GuildAutomodMessageStore.getMessage(a0.id) != null) {
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object2.helpArticleLink = defaultImport2.getArticleURL(HelpdeskArticles.GUILD_AUTOMOD_BLOCKED_MESSAGE);
object2.helpButtonAccessibilityLabel = intl.string(t.OiCBhP);
}
return object2;
}
return value2;
}
@@ -0,0 +1,133 @@
/* Metro module 8193; source: modules/messages/native/renderer/row_data/ForumPostActions.tsx; dependencies: [661, 8191, 4065, 8194, 1216, 4057, 1244, 1948, 8195, 8196, 8197, 1423, 3795, 3801, 2] */
function _fun65699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8378:6, offset: 0x01bda64b, size: 137 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/ForumPostActions.tsx');
exports.createDefaultReaction = createDefaultReaction;
exports.createForumPostActions = createForumPostActions;
}
function createDefaultReaction({defaultReactionEmoji, customGuildEmoji}) { // fn#65700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8378:244, offset: 0x01bda6d4, size: 439 bytes, params: 2, frame: 25
var r6;
var r4;
var r2;
var emojiId;
var emojiName;
var object2;
var animated;
var defaultImport2;
var getEmojiURL;
var value;
const shouldSkipAccessibilityLabels2 = (require(8197) /* metro dependency 8197: AccessibilityLabelOptimizationExperiment */).shouldSkipAccessibilityLabels();
if (defaultReactionEmoji != null) {
emojiId = defaultReactionEmoji.emojiId;
emojiName = defaultReactionEmoji.emojiName;
if (emojiId == null) {
if (emojiName != null) {
r6 = emojiName ?? '';
object2 = {id: undefined, name: emojiName, animated: false};
object2.src = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(emojiName);
if (shouldSkipAccessibilityLabels2) {
r4 = r6;
} else {
value = require(3795) /* metro dependency 3795: ReactionUtils */;
value = value.getAccessibleEmojiDisplayName(false, 0, {id: undefined, name: r6, animated: false});
r4 = value;
}
object2.displayName = r4;
r2 = object2;
} else {
r2 = undefined;
}
} else if (customGuildEmoji != null) {
r6 = customGuildEmoji.name ?? '';
object2 = {id: emojiId, name: undefined};
animated = customGuildEmoji.animated;
object2.animated = animated;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport2.getEmojiURL;
animated = customGuildEmoji.animated;
object2.src = Reflect.apply(getEmojiURL, defaultImport2, [{id: emojiId, animated: animated, size: 48}]);
if (shouldSkipAccessibilityLabels2) {
r4 = r6;
} else {
value = require(3795) /* metro dependency 3795: ReactionUtils */;
value = value.getAccessibleEmojiDisplayName(false, 0, {id: emojiId, name: r6,
animated: customGuildEmoji.animated});
r4 = value;
}
object2.displayName = r4;
r2 = object2;
} else if (emojiName != null) {
r6 = emojiName ?? '';
object2 = {id: undefined, name: emojiName, animated: false};
object2.src = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(emojiName);
if (shouldSkipAccessibilityLabels2) {
r4 = r6;
} else {
value = require(3795) /* metro dependency 3795: ReactionUtils */;
value = value.getAccessibleEmojiDisplayName(false, 0, {id: undefined, name: r6, animated: false});
r4 = value;
}
object2.displayName = r4;
r2 = object2;
} else {
r2 = undefined;
}
} else {
r2 = undefined;
}
return r2 != null ? {'emoji': null, 'me': false, 'count': 0, emoji: r2} : undefined;
}
function createForumPostActions({isFollowing, hasReactions, defaultReaction, showMediaPostSharePrompt}) { // fn#65701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8378:916, offset: 0x01bda88b, size: 818 bytes, params: 2, frame: 32
var r1;
var defaultImport;
const intl = require(dependencyMap[6]).intl;
const t = require(dependencyMap[6]).t;
var object2;
var formatToParts;
var YtCu5p;
var defaultImport3;
const moduleValue = require(dependencyMap[1]);
const getAssetUriForEmbed = moduleValue.getAssetUriForEmbed;
const r7 = isFollowing ? Reflect.apply(getAssetUriForEmbed, moduleValue,
[importDefault(dependencyMap[2])]) : Reflect.apply(getAssetUriForEmbed, moduleValue,
[importDefault(dependencyMap[3])]);
if (r7 == null) {
defaultImport = importDefault(dependencyMap[4]);
defaultImport.captureMessage('Forum follow is null. isFollowing: ' + isFollowing + ' icon: ' + importDefault(isFollowing ? dependencyMap[2] : dependencyMap[3]));
}
const assetUriForEmbed = require(dependencyMap[1]).getAssetUriForEmbed(importDefault(dependencyMap[5]));
const r2 = hasReactions || defaultReaction?.emoji != null ? undefined : intl.string(t.xpOyTO);
if (showMediaPostSharePrompt) {
object2 = {};
object2.title = intl.string(t['5uAO7d']);
formatToParts = intl.formatToParts;
YtCu5p = t.YtCu5p;
defaultImport3 = importDefault(dependencyMap[7]);
object2.subtitle = Reflect.apply(formatToParts, intl, [YtCu5p,
{helpArticleUrl: {url: defaultImport3.getCreatorSupportArticleURL(HelpdeskArticles.MEDIA_CHANNEL)}}]);
object2.cta = intl.string(t.C5UQC9);
object2.icon = require(dependencyMap[1]).getAssetUriForEmbed(importDefault(dependencyMap[8]));
object2.closeIcon = require(dependencyMap[1]).getAssetUriForEmbed(importDefault(dependencyMap[9]));
r1 = object2;
} else {
r1 = undefined;
}
object2 = {numDisplayedReactions: 3, isFollowing: isFollowing, followIcon: r7};
let string = intl.string;
object2.followLabel = isFollowing ? Reflect.apply(string, intl, [t['OtF+lC']]) : Reflect.apply(string, intl,
[t['0rQinA']]);
object2.shareIcon = assetUriForEmbed;
string = intl.string;
const Ej3B3Y = t.Ej3B3Y;
object2.shareLabel = Reflect.apply(string, intl, [Ej3B3Y]);
object2.defaultReaction = defaultReaction;
object2.addReactLabel = r2;
object2.sharePrompt = r1;
return object2;
}
@@ -0,0 +1,23 @@
/* Metro module 8443; source: modules/messages/native/renderer/row_data/SurveyIndication.tsx; dependencies: [5079, 1244, 8191, 4002, 8444, 8445, 2] */
function _fun67013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8628:6, offset: 0x01c12620, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(5079) /* metro dependency 5079: PushNotificationConstants */).NotificationTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/SurveyIndication.tsx');
exports.createSurveyIndication = createSurveyIndication;
}
function createSurveyIndication(a0, a1, a2) { // fn#67014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8628:245, offset: 0x01c1269c, size: 287 bytes, params: 4, frame: 19
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = a2;
const TOP_MESSAGE_PUSH = NotificationTypes.TOP_MESSAGE_PUSH;
const r5 = value === TOP_MESSAGE_PUSH ? t.GwWhce : t['46+Iqc'];
const object2 = {};
object2.content = (require(1244) /* metro dependency 1244: indexNative */).intl.formatToParts(r5,
{handleMessage: {action: 'bindUserSurvey', message: a0,
notificationType: value ?? NotificationTypes.TOP_MESSAGE_PUSH}});
object2.feedbackIconUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(8444) /* metro dependency 8444 */ : importDefault(8445) /* metro dependency 8445 */);
return object2;
}
@@ -0,0 +1,68 @@
/* Metro module 8440; source: modules/messages/native/renderer/row_data/VoiceChannelBadge.tsx; dependencies: [27, 1379, 3784, 4297, 661, 8441, 6647, 5072, 2] */
function _fun67006(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8625:6, offset: 0x01c12127, size: 190 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).Image;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/VoiceChannelBadge.tsx');
exports.createVoiceChannelBadge = createVoiceChannelBadge;
}
function createVoiceChannelBadge(a0, a1) { // fn#67007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8625:287, offset: 0x01c121e5, size: 380 bytes, params: 3, frame: 18
var uri;
var r4;
var r1;
var resolveAssetSource;
var moduleValue2;
var assetSource;
var shouldAgeVerifyForAgeGate2;
var moduleValue4;
let value = a1;
const value3 = undefined;
const voiceChannelBadgeExperimentModule = require(8441) /* metro dependency 8441: VoiceChannelBadgeExperiment */;
const getVoiceChannelBadgeExperiment = voiceChannelBadgeExperimentModule.getVoiceChannelBadgeExperiment;
const object2 = {};
object2.guildId = value ?? value3;
object2.location = 'VoiceChannelBadgeNative';
if (Reflect.apply(getVoiceChannelBadgeExperiment, voiceChannelBadgeExperimentModule, [object2]).enabled) {
if (value == null) {
return value3;
}
value = VoiceStateStore.getDiscoverableVoiceState(value, a0);
if (value == null) {
return value3;
}
value = ChannelStore.getChannel(value == null ? value3 : value.channelId);
if (value == null) {
return value3;
}
resolveAssetSource = Image.resolveAssetSource;
moduleValue2 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue2.getChannelIcon(value)]);
uri = assetSource == null ? value3 : assetSource.uri;
if (uri == null) {
return value3;
}
shouldAgeVerifyForAgeGate2 = (require(5072) /* metro dependency 5072: AgeGateUtils */).shouldAgeVerifyForAgeGate();
if (shouldAgeVerifyForAgeGate2) {
moduleValue4 = require(5072) /* metro dependency 5072: AgeGateUtils */;
r4 = moduleValue4.shouldShowAgeGateForChannelId(value.id);
} else {
r4 = shouldAgeVerifyForAgeGate2;
}
r1 = value.isPrivate() || PermissionStore.can(Permissions.VIEW_CHANNEL,
value) && PermissionStore.can(Permissions.CONNECT, value);
if (r4) {
return value3;
}
if (r1) {
return {channelId: value.id, channelIconUrl: uri};
}
}
return value3;
}
@@ -0,0 +1,586 @@
/* Metro module 10578; source: modules/messages/native/renderer/row_data/embeds/ActivityRichPresenceInviteEmbed.tsx; dependencies: [4234, 6867, 10579, 1885, 1226, 10580, 6877, 4814, 4396, 6876, 1878, 10581, 661, 6868, 6772, 10582, 1244, 10537, 10583, 10584, 10585, 6873, 10586, 10262, 10261, 10259, 10260, 10587, 8045, 8046, 10588, 8375, 10539, 10590, 10591, 10592, 10593, 10594, 10595, 10598, 2678, 2] */
function _fun81593(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10764:6, offset: 0x01ed63c7, size: 454 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const spotifyStore = importDefault(6867) /* metro dependency 6867: SpotifyStore */;
const env0_5 = (require(10579) /* metro dependency 10579: SpotifyApplicationRecord */).SpotifyApplication;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const gamePartyStore = importDefault(10580) /* metro dependency 10580: GamePartyStore */;
const localActivityStore = importDefault(6877) /* metro dependency 6877: LocalActivityStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const activityLauncherStore = importDefault(10581) /* metro dependency 10581: ActivityLauncherStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_15 = value.ActivityActionStates;
const env0_16 = value.ActivityActionTypes;
const env0_17 = value.ActivityTypes;
value = require(6868) /* metro dependency 6868: SpotifyConstants */;
const env0_18 = value.isSpotifyParty;
const env0_19 = value.SPOTIFY_PLATFORM_NAME;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/ActivityRichPresenceInviteEmbed.tsx');
exports.EmbedDisplayType = {ACTIVE: 'active', DEAD: 'dead', DEAD_COMPACT: 'dead_compact', BLOCKED: 'blocked'};
exports.createActivityRichPresenceInviteEmbed = createActivityRichPresenceInviteEmbed;
}
function getPresenceActivity(a0, a1, a2) { // fn#81594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10764:481, offset: 0x01ed658d, size: 215 bytes, params: 4, frame: 18
var r3;
var id;
var activity;
var value2;
var getApplicationActivity;
const value = a2;
if (a0.application != null) {
id = a0.author.id;
activity = a0.activity;
value2 = undefined;
r3 = (activity == null ? value2 : activity.type) === ActivityActionTypes.JOIN_REQUEST ? id !== value ? value : a1.isPrivate() ? a1.getRecipientId() : value : (a0.activity == null ? value2 : a0.activity.type) !== ActivityActionTypes.STREAM_REQUEST ? id : value;
getApplicationActivity = PresenceStore.getApplicationActivity;
id = a0.application.id;
return Reflect.apply(getApplicationActivity, PresenceStore, [r3, id]);
}
return PresenceStore.findActivity(a0.author.id, function({type}) {
return type === ActivityTypes.LISTENING;
});
}
function createRichPresenceDisplayActivityInviteEmbed(a0, a1) { // fn#81596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10764:836, offset: 0x01ed667f, size: 4011 bytes, params: 3, frame: 55
var type;
var name_override;
var r8;
var r15;
var supported_platforms;
var r7;
var r16;
var start;
var r24;
var end;
var r33;
var details;
var r22;
var r11;
var r18;
var r37;
var r9;
var r36;
var r35;
var r2;
var r12;
var r19;
var r21;
var r23;
var r27;
var activity;
var defaultImport;
var value11;
var isAskToJoin;
var name;
var moduleValue4;
var moduleValue5;
var getHeaderText;
var value14;
var object;
var moduleValue6;
var maxPartySize;
var currentActivityGamePlatform;
var defaultImport2;
var value18;
var isInParty2;
var canSendInvite2;
var Set;
var value21;
var set;
var value23;
var canLaunchFrame2;
var isEmbeddedApp2;
var moduleValue12;
var getCanJoin;
var value24;
var canJoin;
var remoteJoinPlatform;
var isSpotifyPartyBinding;
var value26;
var moduleValue13;
var formatActiveTimestamp;
var Date;
var moduleValue14;
var value29;
var moduleValue15;
var getPartyText;
var value30;
var remoteJoinPlatform2;
var canSendInvite;
var isInParty;
var currentUserId;
var message;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var author;
var label;
var value34;
var footerLabel;
var value39;
var value40;
var moduleValue19;
var value42;
var value43;
var value44;
var value45;
var moduleValue20;
var value46;
var deadGameInviteText;
var value48;
var value49;
var value52;
var defaultImport3;
var value53;
var hasConnectedAccount2;
var syncingWith;
var activity2;
var value56;
var value64;
var value65;
var value66;
var value67;
var property;
var appGradientColors;
var moduleValue23;
var getPresenceActivityInviteCoverImageURL;
var value70;
var binding;
var moduleValue24;
var appGradientColors2;
var value74;
var moduleValue26;
var getRequestToStreamText;
var value75;
var value76;
var text;
var isDisabled;
const env0_0 = a1;
const value2 = undefined;
const applicationFromMessage = (require(10583) /* metro dependency 10583: getApplicationFromMessage */).getApplicationFromMessage(a0);
const application = a0.application;
const value4 = null;
let id = value4 == application ? value2 : application.id;
let r0 = value4 != id ? ApplicationStore.getApplication(id) : value4;
let r5 = value4 == r0 && value4 != id && ApplicationStore.isFetchingApplication(id) === false;
if (r5) {
(require(6772) /* metro dependency 6772: ApplicationActionCreators */).fetchApplication(id, false);
}
const r1 = value4 == r0 ? applicationFromMessage : r0;
const id2 = AuthenticationStore.getId();
const presenceActivity = getPresenceActivity(a0, a1, id2);
if (value4 != r1) {
activity = a0.activity;
type = value4 == activity ? value2 : activity.type;
if (type === ActivityActionTypes.STREAM_REQUEST) {
if (value4 != r1.icon) {
moduleValue24 = require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */;
r5 = moduleValue24.getAppIconSrc(r1.id, r1.icon, r1.bot);
} else {
r5 = value4;
}
appGradientColors2 = (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppGradientColors(value4 != r5 ? r5 : value2);
getPresenceActivityBinding = getPresenceActivity;
getId = AuthenticationStore.getId;
value74 = (importDefault(10584) /* metro dependency 10584: isInviteActive */)(getPresenceActivityBinding(a0,
a1,
Reflect.apply(getId, AuthenticationStore, [])), a0, r1.id);
moduleValue26 = require(10586) /* metro dependency 10586: InviteEmbedTextUtils */;
getRequestToStreamText = moduleValue26.getRequestToStreamText;
getId = AuthenticationStore.getId;
value75 = Reflect.apply(getRequestToStreamText, moduleValue26, [a0, a1, Reflect.apply(getId,
AuthenticationStore,
[])]);
value76 = (importDefault(10598) /* metro dependency 10598: getRequestToStreamCTAAndIsDisabled */)(a0);
text = value76.text;
isDisabled = value76.isDisabled;
object = {};
binding = env0_20;
object.displayType = value74 ? binding.ACTIVE : binding.DEAD;
object.ctaButtonEnabled = !isDisabled;
object.ctaButtonText = text;
object.ctaButtonIsLoading = false;
object.footerLabel = value4;
object.gradientColors = appGradientColors2;
object.headerText = intl.string((importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */).nAyuPp);
object.iconSrc = r5;
object.isSpotifyParty = false;
object.isPlatformSupported = true;
object.maxPartySize = 0;
object.partyMemberAvatarURIs = value4;
object.partySizeText = value4;
object.platformIconKeys = [];
object.coverImageUrl = value4;
object.detailsText = value4;
object.subtitle = value75;
object.title = r1.name;
return object;
}
defaultImport = importDefault(10584) /* metro dependency 10584: isInviteActive */;
id = r1.id;
value11 = defaultImport(presenceActivity, a0, id);
isAskToJoin = (require(10585) /* metro dependency 10585: getIsAskToJoin */).getIsAskToJoin(a0);
activity = a0.activity;
name_override = value4 == activity ? value2 : activity.name_override;
r0 = value4 != name_override ? name_override : r1.name;
activity = a0.activity;
if (value4 != (value4 == activity ? value2 : activity.icon_override)) {
moduleValue4 = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
r8 = moduleValue4.getAssetImage(r1.id, a0.activity.icon_override);
} else {
r8 = value4;
}
moduleValue5 = require(10586) /* metro dependency 10586: InviteEmbedTextUtils */;
getHeaderText = moduleValue5.getHeaderText;
activity = a0.activity;
type = value4 == activity ? value2 : activity.type;
value14 = Reflect.apply(getHeaderText, moduleValue5, [r0, type, !value11]);
r15 = value4 == presenceActivity || value4 == presenceActivity.party ? [] : global.Array.from(value4 != GamePartyStore.getParty(presenceActivity.party.id) ? GamePartyStore.getParty(presenceActivity.party.id) : []);
moduleValue6 = require(10262) /* metro dependency 10262: getPartySize */;
maxPartySize = moduleValue6.getPartySize(presenceActivity).maxPartySize;
currentActivityGamePlatform = (require(10261) /* metro dependency 10261: isActivityJoinableOnCurrentPlatform */).getCurrentActivityGamePlatform();
defaultImport2 = importDefault(10259) /* metro dependency 10259: getCurrentUserPresenceActivity */;
id = r1.id;
value18 = defaultImport2(LocalActivityStore, SelfPresenceStore, id);
isInParty2 = (require(10260) /* metro dependency 10260: getIsInParty */).getIsInParty(value18,
presenceActivity);
canSendInvite2 = (require(10587) /* metro dependency 10587: getCanSendInvite */).getCanSendInvite(presenceActivity,
a0, r1, id2);
Set = global.Set;
supported_platforms = value4 == presenceActivity ? value2 : presenceActivity.supported_platforms;
r7 = value4 != supported_platforms ? supported_platforms : [];
value21 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
value23 = (set instanceof Object ? set : value21).has(currentActivityGamePlatform);
canLaunchFrame2 = (require(8045) /* metro dependency 8045: canLaunchFrame */).canLaunchFrame(r1);
isEmbeddedApp2 = (require(8046) /* metro dependency 8046: AppLauncherUtils */).isEmbeddedApp(r1);
moduleValue12 = require(10588) /* metro dependency 10588: getCanJoin */;
getCanJoin = moduleValue12.getCanJoin;
object = {presenceActivity: presenceActivity, currentUserPresenceActivity: value18, currentUserId: id2,
message: a0,
application: r1, isEmbeddedApplication: isEmbeddedApp2, isFrameApplication: canLaunchFrame2,
isGameLaunchable: value23};
value24 = Reflect.apply(getCanJoin, moduleValue12, [object]);
canJoin = value24.canJoin;
remoteJoinPlatform = value24.remoteJoinPlatform;
isSpotifyPartyBinding = isSpotifyParty;
id = value4 == presenceActivity || value4 == presenceActivity.party ? value2 : presenceActivity.party.id;
r16 = isSpotifyPartyBinding(id) || r1.id === SpotifyApplication.id;
start = value4 == presenceActivity || value4 == presenceActivity.timestamps ? value2 : presenceActivity.timestamps.start;
r24 = value4 != start ? start : value4 == presenceActivity ? value2 : presenceActivity.created_at;
end = value4 == presenceActivity || value4 == presenceActivity.timestamps ? value2 : presenceActivity.timestamps.end;
value26 = '';
if (value4 != r24) {
moduleValue13 = require(8375) /* metro dependency 8375: utils */;
formatActiveTimestamp = moduleValue13.formatActiveTimestamp;
Date = global.Date;
r33 = Reflect.apply(formatActiveTimestamp, moduleValue13, [{start: r24, end: end}, Date.now()]);
} else {
r33 = value26;
}
if (value4 == r8) {
if (value4 != r1.icon) {
moduleValue14 = require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */;
r5 = moduleValue14.getAppIconSrc(r1.id, r1.icon, r1.bot);
} else {
r5 = value4;
}
r8 = r5;
}
if (r16) {
r0 = value4 == presenceActivity || value4 == presenceActivity.details ? r1.name : value4 != presenceActivity.state ? intl.formatToPlainString(t.JCvHtx,
{track: presenceActivity.details, artist: presenceActivity.state}).replace('\n', ' ') : r1.name;
value52 = intl.string(t.sTo7s3);
if (value11) {
defaultImport3 = importDefault(10590) /* metro dependency 10590: getCoverImageFromActivity */;
id = r1.id;
value53 = defaultImport3(presenceActivity, id);
r9 = value4 != value53 ? value53 : value2;
author = a0.author;
hasConnectedAccount2 = SpotifyStore.hasConnectedAccount();
syncingWith = SpotifyStore.getSyncingWith();
activity2 = SpotifyStore.getActivity();
id = author.id;
value56 = id === AuthenticationStore.getId();
r36 = value4 != (value4 == activity2 ? value2 : activity2.party) && (value4 == presenceActivity || value4 == presenceActivity.party ? value2 : presenceActivity.party.id) === activity2.party.id;
r37 = value4 != (value4 == syncingWith ? value2 : syncingWith.userId) && (value4 == syncingWith ? value2 : syncingWith.userId) === author.id;
object = {label: hasConnectedAccount2 ? r37 || r36 ? intl.string(t.KC26NR) : intl.string(t.VJlc0S) : intl.formatToPlainString(t.XWSHTb,
{platform: SPOTIFY_PLATFORM_NAME})};
r35 = value56 || r37;
r35 = !r35 ? r36 : r35;
object.disabled = r35;
label = object.label;
value64 = !object.disabled;
value65 = false;
r2 = r0;
r5 = r33;
r7 = value4;
r11 = value26;
r12 = value4;
r18 = r9;
r19 = value14;
r21 = value52;
r22 = value65;
r23 = label;
r24 = value64;
r27 = value65;
} else {
value66 = intl.string(t['84qx9r']);
name = r1.name;
value67 = false;
r2 = name;
r5 = value66;
r7 = value4;
r11 = value26;
r12 = value4;
r18 = r8;
r19 = value14;
r21 = value52;
r22 = value67;
r23 = value2;
r24 = value67;
r27 = value67;
}
} else if (value11) {
value29 = r15.map(_fun81597);
moduleValue15 = require(10586) /* metro dependency 10586: InviteEmbedTextUtils */;
getPartyText = moduleValue15.getPartyText;
activity = a0.activity;
value30 = Reflect.apply(getPartyText, moduleValue15, [{maxPartySize: maxPartySize, partySize: r15.length,
activityActionType: value4 == activity ? value2 : activity.type}]);
details = value4 == presenceActivity ? value2 : presenceActivity.details;
r22 = value4 != details && value26 !== details;
r7 = r22 ? details : value4;
object = {canJoin: canJoin, remoteJoinPlatform: remoteJoinPlatform, canSendInvite: canSendInvite2,
isInParty: isInParty2, message: a0, currentUserId: id2, applicationName: r0, isAskToJoin: isAskToJoin};
object.supportsRemoteJoin = (require(10592) /* metro dependency 10592: getSupportsRemoteJoin */).getSupportsRemoteJoin(presenceActivity);
object.canPromptAuth = (require(10593) /* metro dependency 10593: getShouldShowAppAuthPrompt */).getShouldShowAppAuthPrompt(r1);
canJoin = object.canJoin;
remoteJoinPlatform2 = object.remoteJoinPlatform;
canSendInvite = object.canSendInvite;
isInParty = object.isInParty;
currentUserId = object.currentUserId;
message = object.message;
if (canJoin) {
r11 = {label: intl.string(t.VJlc0S), disabled: false,
footerLabel: value4 != remoteJoinPlatform2 ? (require(10582) /* metro dependency 10582: getRemoteJoinFooterLabel */).getRemoteJoinFooterLabel(remoteJoinPlatform2) : value2};
} else if (canSendInvite) {
object = {};
object.label = intl.string(t['hC/Zey']);
object.disabled = message.author.id === currentUserId;
object.footerLabel = value2;
r11 = object;
} else if (isInParty) {
r11 = {label: intl.string(t.KC26NR), disabled: true, footerLabel: value2};
} else if (object.isAskToJoin) {
object = {label: value2, disabled: false};
object.footerLabel = intl.formatToPlainString(t.gYVkSW, {username: message.author.globalName,
appName: object.applicationName});
r11 = object;
} else {
r11 = object.supportsRemoteJoin && object.canPromptAuth ? {label: intl.string(t.lw71Nf),
disabled: false,
footerLabel: value2} : {label: value2, disabled: false, footerLabel: intl.string(t.OAB5TK)};
}
label = r11.label;
value34 = !r11.disabled;
footerLabel = r11.footerLabel;
r22 = value4 != presenceActivity && value4 != presenceActivity.application_id;
r22 = r22 && ActivityLauncherStore.getState(presenceActivity.application_id,
ActivityActionTypes.JOIN) === ActivityActionStates.LOADING;
value39 = false;
r2 = r0;
r5 = r33;
r11 = value30;
r12 = value29;
r18 = r8;
r19 = value14;
r21 = footerLabel;
r23 = label;
r24 = value34;
r27 = value39;
} else {
value40 = value4 != r1.deepLinkUri;
r37 = value40 ? MessageStore.getMessages(a1.id) : value2;
if (value40) {
if (value4 == r37) {
value42 = intl.string(t.pkq6Vq);
value43 = intl.string(t['Sq/E1I']);
value44 = false;
value45 = true;
r2 = r0;
r5 = value43;
r7 = value4;
r11 = value26;
r12 = value4;
r18 = r8;
r19 = value42;
r21 = value2;
r22 = value44;
r23 = value2;
r24 = value44;
r27 = value45;
} else {
moduleValue19 = require(10591) /* metro dependency 10591: isMostRecentDeadEndInvite */;
if (moduleValue19.isMostRecentDeadEndInvite(a0.id, r37, r1.id, presenceActivity)) {
moduleValue20 = require(10586) /* metro dependency 10586: InviteEmbedTextUtils */;
value46 = true;
deadGameInviteText = moduleValue20.getDeadGameInviteText(a0, r0, a1, id2, value46);
value48 = intl.string(t['s+J8Dl']);
value49 = false;
r2 = r0;
r5 = deadGameInviteText;
r7 = value4;
r11 = value26;
r12 = value4;
r18 = r8;
r19 = value14;
r21 = value2;
r22 = value49;
r23 = value48;
r24 = value46;
r27 = value49;
} else {
value42 = intl.string(t.pkq6Vq);
value43 = intl.string(t['Sq/E1I']);
value44 = false;
value45 = true;
r2 = r0;
r5 = value43;
r7 = value4;
r11 = value26;
r12 = value4;
r18 = r8;
r19 = value42;
r21 = value2;
r22 = value44;
r23 = value2;
r24 = value44;
r27 = value45;
}
}
} else {
value42 = intl.string(t.pkq6Vq);
value43 = intl.string(t['Sq/E1I']);
value44 = false;
value45 = true;
r2 = r0;
r5 = value43;
r7 = value4;
r11 = value26;
r12 = value4;
r18 = r8;
r19 = value42;
r21 = value2;
r22 = value44;
r23 = value2;
r24 = value44;
r27 = value45;
}
}
object = [];
if (value4 != remoteJoinPlatform) {
property = (require(10594) /* metro dependency 10594: useJoinFromSupportedPlatformsIconKeys */).ACTIVITY_GAME_PLATFORM_TO_ICON_KEY[remoteJoinPlatform];
if (value4 == property) {
r9 = object;
} else {
object.push(property);
r9 = object;
}
} else {
r9 = (require(10594) /* metro dependency 10594: useJoinFromSupportedPlatformsIconKeys */).getJoinFromSupportedPlatformsIconKeys({platforms: value4 == presenceActivity ? value2 : presenceActivity.supported_platforms,
currentPlatform: currentActivityGamePlatform, isGameLaunchable: value23});
}
appGradientColors = (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppGradientColors(value4 != r18 ? r18 : value2);
moduleValue23 = require(10595) /* metro dependency 10595: usePresenceActivityInviteCoverImageURL */;
getPresenceActivityInviteCoverImageURL = moduleValue23.getPresenceActivityInviteCoverImageURL;
id = a0.id;
value70 = Reflect.apply(getPresenceActivityInviteCoverImageURL, moduleValue23, [{messageId: id,
presenceActivity: presenceActivity, application: r1}]);
binding = env0_20;
return {displayType: r27 ? binding.DEAD_COMPACT : value11 ? binding.ACTIVE : binding.DEAD,
ctaButtonEnabled: r24,
ctaButtonText: r23, ctaButtonIsLoading: r22, footerLabel: r21, gradientColors: appGradientColors,
headerText: r19, iconSrc: r18, isPlatformSupported: value23, isSpotifyParty: r16,
maxPartySize: maxPartySize > 0 ? maxPartySize : r15.length, partyMemberAvatarURIs: r12, partySizeText: r11,
platformIconKeys: r9, coverImageUrl: value70, detailsText: r7, subtitle: r5, title: r2};
}
return value2;
}
function createActivityRichPresenceInviteEmbed(a0, a1) { // fn#81598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10764:6978, offset: 0x01ed76a2, size: 543 bytes, params: 3, frame: 24
var currentUser;
var value3;
var moduleValue;
var getApplicationEmbedVisibility;
var application;
var value4;
const ApplicationEmbedVisibility = (require(10537) /* metro dependency 10537: getApplicationEmbedVisibility */).ApplicationEmbedVisibility;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (a0.author != null) {
if (a0.activity == null) {
return undefined;
}
if (a1 != null) {
currentUser = UserStore.getCurrentUser();
value3 = undefined;
moduleValue = require(10537) /* metro dependency 10537: getApplicationEmbedVisibility */;
getApplicationEmbedVisibility = moduleValue.getApplicationEmbedVisibility;
application = a0.application;
value4 = Reflect.apply(getApplicationEmbedVisibility, moduleValue,
[application == null ? value3 : application.content_classification,
currentUser == null ? value3 : currentUser.nsfwAllowed, a1]);
if (ApplicationEmbedVisibility.DISPLAY === value4) {
return createRichPresenceDisplayActivityInviteEmbed(a0, a1);
}
if (ApplicationEmbedVisibility.BLOCK_UNDERAGE === value4) {
return {displayType: env0_20.BLOCKED, headerText: intl.string(t.pkq6Vq),
subtitle: value4 === ApplicationEmbedVisibility.BLOCK_UNDERAGE ? intl.string(t.GhU4yl) : intl.string(t.B99UMJ),
ctaButtonEnabled: false, ctaButtonText: value3, ctaButtonIsLoading: false, footerLabel: value3,
gradientColors: [], iconSrc: value3, isPlatformSupported: false, isSpotifyParty: false,
maxPartySize: 0,
partyMemberAvatarURIs: null, partySizeText: value3, platformIconKeys: [], coverImageUrl: value3,
detailsText: value3, title: value3};
}
if (ApplicationEmbedVisibility.BLOCK_CHANNEL_RESTRICTION === value4) {
return {displayType: env0_20.BLOCKED, headerText: intl.string(t.pkq6Vq),
subtitle: value4 === ApplicationEmbedVisibility.BLOCK_UNDERAGE ? intl.string(t.GhU4yl) : intl.string(t.B99UMJ),
ctaButtonEnabled: false, ctaButtonText: value3, ctaButtonIsLoading: false, footerLabel: value3,
gradientColors: [], iconSrc: value3, isPlatformSupported: false, isSpotifyParty: false,
maxPartySize: 0,
partyMemberAvatarURIs: null, partySizeText: value3, platformIconKeys: [], coverImageUrl: value3,
detailsText: value3, title: value3};
}
return null;
}
}
}
function _fun81597(a0) { // fn#81597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10764:4552, offset: 0x01ed762a, size: 120 bytes, params: 2, frame: 16
const value = environment.__proto__;
const r6 = UserStore.getUser(a0) ?? new UserRecord({discriminator: '0005'});
const String = global.String;
return String(r6?.getAvatarURL(require.guild_id, 64));
}
@@ -0,0 +1,174 @@
/* Metro module 10576; source: modules/messages/native/renderer/row_data/embeds/EmbeddedActivityInstanceEmbed.tsx; dependencies: [1378, 4234, 1226, 1379, 4396, 9859, 10552, 10577, 1244, 9466, 10539, 6772, 10538, 8809, 2] */
function _fun81584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10762:6, offset: 0x01ed5788, size: 200 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const env0_7 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/EmbeddedActivityInstanceEmbed.tsx');
exports.createActivityInstanceEmbed = createActivityInstanceEmbed;
}
function createActivityInstanceEmbed(a0) { // fn#81585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10762:325, offset: 0x01ed5850, size: 1282 bytes, params: 2, frame: 30
var r9;
var r1;
var getEmbeddedActivitiesForChannel;
var value5;
var value7;
var currentEmbeddedActivity;
var moduleValue;
var getEmbeddedActivityParticipantAvatarUris;
var object4;
var value9;
var statusText;
var moduleValue2;
var getJoinOrStartButtonState;
var disabled;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var moduleValue3;
var getPlayInContext;
var value17;
var instanceId;
var isCurrentlyInInstance;
var canLaunchInChannel;
var moduleValue4;
var items2;
var getApplication;
var moduleValue5;
var moduleValue6;
var getActivityLaunchURL;
var object5;
var object6;
const application = a0.application;
const activityInstance = a0.activityInstance;
const channel_id = a0.channel_id;
var value;
const channel = ChannelStore.getChannel(channel_id);
const value3 = null;
const value4 = undefined;
const guild_id = value3 == channel ? value4 : channel.guild_id;
let r10 = value3 == channel || value3 == channel.isThread ? channel_id : channel.isThread() ? value3 == channel ? value4 : channel.parent_id : channel_id;
if (value3 != application) {
var id = value3 == activityInstance ? value4 : activityInstance.id;
if (value3 != id) {
getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
value5 = '';
value7 = Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore,
[value3 != r10 ? r10 : value5]).find(function({applicationId}) {
return applicationId === application.id;
});
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
moduleValue = require(10552) /* metro dependency 10552: useEmbeddedActivityParticipantAvatarUris */;
getEmbeddedActivityParticipantAvatarUris = moduleValue.getEmbeddedActivityParticipantAvatarUris;
id = application.id;
value9 = Reflect.apply(getEmbeddedActivityParticipantAvatarUris, moduleValue, [{activity: value7,
applicationId: id,
guildId: guild_id, channelId: channel_id}]);
id = application.id;
statusText = getStatusText(PresenceStore, value7, id);
moduleValue2 = require(10577) /* metro dependency 10577: EmbeddedApplicationInstanceUtils */;
getJoinOrStartButtonState = moduleValue2.getJoinOrStartButtonState;
object4 = {embeddedActivity: value7, currentEmbeddedActivity: currentEmbeddedActivity, channel: channel};
if (value3 != value7) {
r9 = value3 != statusText ? statusText : intl.string(t.oQn0h4);
r1 = value5 + value9.length + ' ' + intl.string(t.BMTj28);
r10 = r9;
} else {
disabled = Reflect.apply(getJoinOrStartButtonState, moduleValue2, [object4]).disabled;
string = intl.string;
r10 = disabled ? Reflect.apply(string, intl, [t.JBnc7N]) : Reflect.apply(string, intl, [t.cX9uLZ]);
r10 = value3 != statusText ? statusText : r10;
r1 = value3;
}
moduleValue3 = require(9466) /* metro dependency 9466: getPlayInContext */;
getPlayInContext = moduleValue3.getPlayInContext;
id = application.id;
value17 = Reflect.apply(getPlayInContext, moduleValue3, [id, channel_id]);
instanceId = value17.instanceId;
isCurrentlyInInstance = value17.isCurrentlyInInstance;
canLaunchInChannel = value17.canLaunchInChannel;
if (value3 != application.icon) {
moduleValue4 = require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */;
r9 = moduleValue4.getAppIconSrc(application.id, application.icon, application.bot);
} else {
r9 = value3;
}
items2 = [{id: 'play_in_channel',
label: value3 == instanceId ? intl.string(t.RscU7I) : intl.string(t.VJlc0S),
disabled: isCurrentlyInInstance || canLaunchInChannel === false}];
getApplication = ApplicationStore.getApplication;
id = application.id;
if (value3 == Reflect.apply(getApplication, ApplicationStore,
[id]) && ApplicationStore.isFetchingApplication(application.id) === false) {
moduleValue5 = require(6772) /* metro dependency 6772: ApplicationActionCreators */;
moduleValue5.fetchApplication(application.id);
}
object4 = {};
object4.displayType = (require(10538) /* metro dependency 10538: CodedLinksTypes */).AppMessageEmbedDisplayType.DISPLAY;
id = application.id;
object4.appId = id;
id = a0.id;
object4.messageId = id;
object4.title = intl.string(t.pkq6Vq);
object4.header = value3 != r10 ? r10 : value5;
object4.info = value3;
object4.tagline = value3;
object4.staticBannerSrc = value3;
object4.iconSrc = r9;
moduleValue6 = require(8809) /* metro dependency 8809: getApplicationInstallURL */;
getActivityLaunchURL = moduleValue6.getActivityLaunchURL;
object5 = {};
id = application.id;
object5.applicationId = id;
object5.referrerId = AuthenticationStore.getId();
object4.embedUrl = Reflect.apply(getActivityLaunchURL, moduleValue6, [object5]);
object4.bannerRatio = 'bot';
object4.actions = items2;
object4.extendedType = CodedLinkExtendedType.APP_MESSAGE_EMBED;
value = require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */;
object4.gradientColors = value.getAppGradientColors(value3 != r9 ? r9 : value4);
object4.backgroundColor = 0;
object4.borderColor = 0;
object4.headerColor = 0;
object4.headerText = value3;
object4.type = value3;
object6 = {};
id = application.id;
object6.applicationId = id;
id = activityInstance.id;
object6.instanceId = id;
object6.appMessageEmbedModel = object4;
object6.participantAvatarUris = value9;
object6.participantsDescription = r1;
return object6;
}
}
return value4;
}
function getStatusText(a0, a1, a2) { // fn#81587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10762:808, owner: createActivityInstanceEmbed.getStatusText, offset: 0x01ed5d6c, size: 97 bytes, params: 4, frame: 16
var r4;
var value2;
const env0_0 = a2;
const value = undefined;
if (a1 == null) {
r4 = value;
} else {
value2 = a1.userIds.values();
r4 = value2.next().value;
}
if (r4 == null) {
return null;
}
const activity = a0.findActivity(r4, function({application_id}) {
return application_id === importDefault;
});
return activity == null ? value : activity.details;
}
@@ -0,0 +1,404 @@
/* Metro module 8449; source: modules/messages/native/renderer/row_data/embeds/GiftCodeEmbed.tsx; dependencies: [27, 1226, 8450, 1878, 4279, 661, 1880, 10516, 10517, 10518, 10519, 10520, 10521, 10522, 10523, 10524, 10525, 10526, 10527, 3995, 8189, 1244, 4002, 10528, 10529, 697, 3738, 8181, 8191, 10530, 10531, 10532, 10533, 10534, 6829, 3802, 2] */
function _fun67032(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8634:6, offset: 0x01c134cb, size: 284 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Image;
const env0_4 = value.processColor;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.AbortCodes;
const env0_10 = value.MessageTypes;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_11 = value.PremiumGiftStyles;
const env0_12 = value.PremiumSubscriptionSKUs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/GiftCodeEmbed.tsx');
exports.createGiftCodeEmbed = createGiftCodeEmbed;
}
function getGiftStyleUrl(a0) { // fn#67033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8634:275, offset: 0x01c135e7, size: 519 bytes, params: 2, frame: 13
var object2;
const BOX = PremiumGiftStyles.BOX;
if (BOX === a0) {
return importDefault(10516) /* metro dependency 10516 */;
}
const CUP = PremiumGiftStyles.CUP;
if (CUP === a0) {
return importDefault(10517) /* metro dependency 10517 */;
}
const SNOWGLOBE = PremiumGiftStyles.SNOWGLOBE;
if (SNOWGLOBE === a0) {
return importDefault(10518) /* metro dependency 10518 */;
}
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
if (STANDARD_BOX !== a0) {
var COFFEE = PremiumGiftStyles.COFFEE;
if (COFFEE === a0) {
return importDefault(10520) /* metro dependency 10520 */;
}
var CAKE = PremiumGiftStyles.CAKE;
if (CAKE === a0) {
return importDefault(10521) /* metro dependency 10521 */;
}
var CHEST = PremiumGiftStyles.CHEST;
if (CHEST === a0) {
return importDefault(10522) /* metro dependency 10522 */;
}
var SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
if (SEASONAL_STANDARD_BOX === a0) {
return importDefault(10523) /* metro dependency 10523 */;
}
var SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
if (SEASONAL_CAKE === a0) {
return importDefault(10524) /* metro dependency 10524 */;
}
var SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
if (SEASONAL_CHEST === a0) {
return importDefault(10525) /* metro dependency 10525 */;
}
var SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
if (SEASONAL_COFFEE === a0) {
return importDefault(10526) /* metro dependency 10526 */;
}
var NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
if (NITROWEEN_STANDARD === a0) {
object2 = {};
object2.uri = importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */;
return object2;
}
}
return importDefault(10519) /* metro dependency 10519 */;
}
function getUserNameOrDefault(a0) { // fn#67034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8634:751, offset: 0x01c137ee, size: 57 bytes, params: 2, frame: 11
let value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(a0);
return value ?? '';
}
function createGiftCodeEmbed(a0, a1) { // fn#67035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8634:955, offset: 0x01c13827, size: 253 bytes, params: 3, frame: 14
var colors;
var headerColor;
var titleColor;
var subtitleColor;
var bodyTextColor;
var borderColor;
var backgroundColor;
var resolvingGradientStart;
var resolvingGradientEnd;
var acceptLabelDisabledBackgroundColor;
var acceptLabelDisabledColor;
var thumbnailBackgroundColor;
var acceptLabelGreenColor;
var acceptBlurpleLabelBackgroundColor;
var object;
const env0_0 = a0;
const env0_1 = a1;
if (a0.author != null) {
if (a0.giftCodes.length !== 0) {
colors = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1).colors;
headerColor = colors.headerColor;
titleColor = colors.titleColor;
subtitleColor = colors.subtitleColor;
bodyTextColor = colors.bodyTextColor;
borderColor = colors.borderColor;
backgroundColor = colors.backgroundColor;
resolvingGradientStart = colors.resolvingGradientStart;
resolvingGradientEnd = colors.resolvingGradientEnd;
acceptLabelDisabledBackgroundColor = colors.acceptLabelDisabledBackgroundColor;
acceptLabelDisabledColor = colors.acceptLabelDisabledColor;
thumbnailBackgroundColor = colors.thumbnailBackgroundColor;
acceptLabelGreenColor = colors.acceptLabelGreenColor;
acceptBlurpleLabelBackgroundColor = colors.acceptBlurpleLabelBackgroundColor;
object = {borderColor: borderColor, backgroundColor: backgroundColor, thumbnailCornerRadius: 3};
return a0.giftCodes.map(_fun67036);
}
}
}
function _fun67036(a0) { // fn#67036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8634:1457, offset: 0x01c13924, size: 3175 bytes, params: 2, frame: 33
var r23;
var r2;
var r5;
var r52;
var r16;
var r15;
var r6;
var r0;
var r8;
var r12;
var r13;
var r14;
var r17;
var code;
var object4;
const intl = require(dependencyMap[21]).intl;
var string;
const t = require(dependencyMap[21]).t;
var id;
var skuId;
var value7;
var isAccepting;
var currentUser;
var value12;
var expiresAt;
var value14;
var formatToPlainString;
var nZBvUR;
var type;
var CUSTOM_GIFT;
var value25;
var moduleValue;
var processColorOrThrow;
var unsafe_rawColors;
var value26;
var moduleValue2;
var value27;
var value28;
var acceptLabelDisabledBackgroundColorBinding;
var acceptLabelDisabledColorBinding;
var value30;
var acceptBlurpleLabelBackgroundColorBinding;
var acceptLabelGreenColorBinding;
var moduleValue3;
var getAssetUriForEmbed;
var value36;
var assetUriForEmbed;
var assetUriForEmbed2;
var assetUriForEmbed3;
var assetUriForEmbed4;
var moduleValue12;
var value47;
var assetUriForEmbed5;
var moduleValue15;
var gameItemThumbnailUrl;
var t1SOId;
var object5;
var value58;
var DDO4Wz;
var object6;
var isPremiumSku;
var INVALID_GIFT_REDEMPTION_CLIENT_UPDATE_REQUIRED;
var resolveAssetSource;
let value = environment.__proto__;
const value2 = GiftCodeStore.get(a0);
if (a0 != null) {
if (GiftCodeStore.getIsResolved(a0)) {
id = AuthenticationStore.getId();
r2 = value2 != null ? id === value2.userId : id === env0_0.author.id;
if (value2 == null) {
code = GiftCodeStore.getError(a0)?.code;
INVALID_GIFT_REDEMPTION_CLIENT_UPDATE_REQUIRED = AbortCodes.INVALID_GIFT_REDEMPTION_CLIENT_UPDATE_REQUIRED;
object4 = {};
resolveAssetSource = Image.resolveAssetSource;
r6 = require(dependencyMap[22]).isThemeDark(require) ? importDefault(dependencyMap[23]) : importDefault(dependencyMap[24]);
object4.thumbnailUrl = Reflect.apply(resolveAssetSource, Image, [r6]).uri;
string = intl.string;
object4.headerText = (r2 ? Reflect.apply(string, intl, [t.kzFKb6]) : Reflect.apply(string, intl,
[t.jwCLTM])).toUpperCase();
object4.titleText = intl.string(t.SdKbX2);
r6 = processColor(importDefault(dependencyMap[25]).unsafe_rawColors.RED_400) ?? titleColor;
object4.titleColor = r6;
object4.headerColor = headerColor;
object4.thumbnailBackgroundColor = thumbnailBackgroundColor;
r2 = code === INVALID_GIFT_REDEMPTION_CLIENT_UPDATE_REQUIRED ? intl.string(t.QXgO5w) : r2 ? intl.string(t.pBDXpb) : intl.string(t.TPamyd);
object4.subtitle = r2;
object4.subtitleColor = subtitleColor;
copyDataProperties(object4, env0_13, r23);
return object4;
}
get = SKUStore.get;
skuId = value2.skuId;
value7 = Reflect.apply(get, SKUStore, [skuId]);
isAccepting = GiftCodeStore.getIsAccepting(a0);
currentUser = UserStore.getCurrentUser();
r5 = currentUser == null || !currentUser.verified;
r5 = !r5 ? value2.redeemed : r5;
r5 = !r5 ? value2.isClaimed : r5;
value12 = !r5;
r52 = r5 ? value12 : value2.expiresAt != null;
value14 = undefined;
if (r52) {
formatToPlainString = intl.formatToPlainString;
nZBvUR = t.nZBvUR;
object4 = {};
expiresAt = value2.expiresAt;
object4.hours = expiresAt.diff(importDefault(dependencyMap[26])(), 'h');
r16 = Reflect.apply(formatToPlainString, intl, [nZBvUR, object4]);
} else {
r16 = value14;
}
r15 = value2.redeemed ? intl.string(t['/cg57l']) : value2.isClaimed ? intl.string(t.ARWFQX) : currentUser != null && currentUser.verified ? value14 : intl.string(t['j+KPkX']);
r6 = value2.giftStyle != null || env0_0.type === MessageTypes.CUSTOM_GIFT;
if (r5) {
if (isAccepting) {
value30 = intl.string(t.rTeOBK);
acceptLabelDisabledBackgroundColorBinding = acceptLabelDisabledBackgroundColor;
acceptLabelDisabledColorBinding = acceptLabelDisabledColor;
r12 = value30;
r13 = acceptLabelDisabledColorBinding;
r14 = acceptLabelDisabledBackgroundColorBinding;
} else if (value2.redeemed) {
value28 = intl.string(t.BTihou);
acceptLabelDisabledBackgroundColorBinding = acceptLabelDisabledBackgroundColor;
acceptLabelDisabledColorBinding = acceptLabelDisabledColor;
r12 = value28;
r13 = acceptLabelDisabledColorBinding;
r14 = acceptLabelDisabledBackgroundColorBinding;
} else if (value2.isClaimed) {
value28 = intl.string(t.BTihou);
acceptLabelDisabledBackgroundColorBinding = acceptLabelDisabledBackgroundColor;
acceptLabelDisabledColorBinding = acceptLabelDisabledColor;
r12 = value28;
r13 = acceptLabelDisabledColorBinding;
r14 = acceptLabelDisabledBackgroundColorBinding;
} else if (currentUser != null && currentUser.verified) {
r12 = value14;
r13 = value14;
r14 = value14;
} else {
value25 = intl.string(t.v740sh);
moduleValue = require(dependencyMap[27]);
processColorOrThrow = moduleValue.processColorOrThrow;
unsafe_rawColors = importDefault(dependencyMap[25]).unsafe_rawColors;
value26 = Reflect.apply(processColorOrThrow, moduleValue, [unsafe_rawColors.BRAND_500]);
moduleValue2 = require(dependencyMap[27]);
processColorOrThrow = moduleValue2.processColorOrThrow;
unsafe_rawColors = importDefault(dependencyMap[25]).unsafe_rawColors;
value27 = Reflect.apply(processColorOrThrow, moduleValue2, [unsafe_rawColors.WHITE]);
r12 = value25;
r13 = value27;
r14 = value26;
r23 = moduleValue;
}
} else {
string = intl.string;
r8 = r6 ? Reflect.apply(string, intl, [t.TiZFqX]) : Reflect.apply(string, intl, [t.bUvv1f]);
acceptBlurpleLabelBackgroundColorBinding = acceptBlurpleLabelBackgroundColor;
acceptLabelGreenColorBinding = acceptLabelGreenColor;
r12 = r8;
r13 = acceptLabelGreenColorBinding;
r14 = acceptBlurpleLabelBackgroundColorBinding;
}
skuId = value2.skuId;
if (PremiumSubscriptionSKUs.TIER_0 === skuId) {
moduleValue12 = require(dependencyMap[28]);
getAssetUriForEmbed = moduleValue12.getAssetUriForEmbed;
r6 = r6 ? getGiftStyleUrl(value2.giftStyle) : importDefault(dependencyMap[29]);
value47 = Reflect.apply(getAssetUriForEmbed, moduleValue12, [r6]);
assetUriForEmbed5 = require(dependencyMap[28]).getAssetUriForEmbed(require(dependencyMap[22]).isThemeDark(require) ? importDefault(dependencyMap[30]) : importDefault(dependencyMap[31]));
r0 = value47;
r5 = assetUriForEmbed5;
} else if (PremiumSubscriptionSKUs.TIER_1 === skuId) {
assetUriForEmbed3 = require(dependencyMap[28]).getAssetUriForEmbed(r6 ? getGiftStyleUrl(value2.giftStyle) : importDefault(dependencyMap[32]));
assetUriForEmbed4 = require(dependencyMap[28]).getAssetUriForEmbed(require(dependencyMap[22]).isThemeDark(require) ? importDefault(dependencyMap[30]) : importDefault(dependencyMap[31]));
r0 = assetUriForEmbed3;
r5 = assetUriForEmbed4;
r23 = dependencyMap;
} else if (PremiumSubscriptionSKUs.TIER_2 === skuId) {
assetUriForEmbed = require(dependencyMap[28]).getAssetUriForEmbed(r6 ? getGiftStyleUrl(value2.giftStyle) : importDefault(dependencyMap[33]));
assetUriForEmbed2 = require(dependencyMap[28]).getAssetUriForEmbed(require(dependencyMap[22]).isThemeDark(require) ? importDefault(dependencyMap[30]) : importDefault(dependencyMap[31]));
r0 = assetUriForEmbed;
r5 = assetUriForEmbed2;
r23 = dependencyMap;
} else if (PremiumSubscriptionSKUs.LEGACY === skuId) {
assetUriForEmbed = require(dependencyMap[28]).getAssetUriForEmbed(r6 ? getGiftStyleUrl(value2.giftStyle) : importDefault(dependencyMap[33]));
assetUriForEmbed2 = require(dependencyMap[28]).getAssetUriForEmbed(require(dependencyMap[22]).isThemeDark(require) ? importDefault(dependencyMap[30]) : importDefault(dependencyMap[31]));
r0 = assetUriForEmbed;
r5 = assetUriForEmbed2;
r23 = dependencyMap;
} else {
moduleValue3 = require(dependencyMap[28]);
getAssetUriForEmbed = moduleValue3.getAssetUriForEmbed;
r0 = require(dependencyMap[22]).isThemeDark(require) ? importDefault(dependencyMap[30]) : importDefault(dependencyMap[31]);
value36 = Reflect.apply(getAssetUriForEmbed, moduleValue3, [r0]);
r0 = require(dependencyMap[28]).getAssetUriForEmbed(getGiftStyleUrl(value2.giftStyle));
r5 = value36;
}
moduleValue15 = require(dependencyMap[34]);
if (moduleValue15.isGameItemSKU(value7)) {
gameItemThumbnailUrl = require(dependencyMap[34]).getGameItemThumbnailUrl(value7);
r0 = (gameItemThumbnailUrl == null ? value14 : gameItemThumbnailUrl.toString()) ?? r0;
r8 = r0;
} else {
r8 = r0;
}
object4 = {};
copyDataProperties(object4, env0_13, r23);
type = env0_0.type;
CUSTOM_GIFT = MessageTypes.CUSTOM_GIFT;
if (type !== CUSTOM_GIFT) {
string = intl.string;
r17 = (r2 ? Reflect.apply(string, intl, [t.QLEMld]) : Reflect.apply(string, intl,
[t.W4DBcy])).toUpperCase();
} else if (r2) {
string = intl.string;
r17 = (r2 ? Reflect.apply(string, intl, [t.QLEMld]) : Reflect.apply(string, intl,
[t.W4DBcy])).toUpperCase();
} else {
formatToPlainString = intl.formatToPlainString;
t1SOId = t.t1SOId;
object5 = {};
object5.recipientDisplayName = getUserNameOrDefault(currentUser);
r17 = Reflect.apply(formatToPlainString, intl, [t1SOId, object5]).toUpperCase();
}
object4['headerText'] = r17;
type = env0_0.type;
CUSTOM_GIFT = MessageTypes.CUSTOM_GIFT;
if (type !== CUSTOM_GIFT) {
r17 = value7 != null ? value7.name : value14;
} else {
value58 = UserStore.getUser(value2.userId);
formatToPlainString = intl.formatToPlainString;
DDO4Wz = t.DDO4Wz;
object6 = {};
object6.sender = getUserNameOrDefault(value58);
r17 = Reflect.apply(formatToPlainString, intl, [DDO4Wz, object6]);
}
object4['titleText'] = r17;
object4['subtitle'] = r16;
object4['bodyText'] = r15;
object4['headerColor'] = headerColor;
object4['titleColor'] = titleColor;
object4['subtitleColor'] = subtitleColor;
object4['bodyTextColor'] = bodyTextColor;
object4['acceptLabelBackgroundColor'] = r14;
object4['acceptLabelColor'] = r13;
object4['acceptLabelText'] = r12;
object4['acceptLabelBorderColor'] = value14;
object4['canBeAccepted'] = value12;
object4['embedCanBeTapped'] = true;
object4['giftCode'] = a0;
object4['thumbnailUrl'] = r8 ?? value14;
type = env0_0.type;
CUSTOM_GIFT = MessageTypes.CUSTOM_GIFT;
r6 = type === CUSTOM_GIFT ? value14 : r5 ?? value14;
object4['splashUrl'] = r6;
value = importDefault(dependencyMap[35]);
isPremiumSku = value.isPremiumSku;
skuId = value2.skuId;
value = !Reflect.apply(isPremiumSku, value, [skuId]);
object4['splashHasRadialGradient'] = value;
value = importDefault(dependencyMap[35]);
isPremiumSku = value.isPremiumSku;
skuId = value2.skuId;
value = Reflect.apply(isPremiumSku, value, [skuId]);
r5 = value ? 0.8 : 0.97;
object4['splashOpacity'] = r5;
return object4;
}
object4 = {};
value = intl.string(t['E+va0m']);
object4.headerText = value.toUpperCase();
object4.headerColor = headerColor;
object4.resolvingGradientStart = resolvingGradientStart;
object4.resolvingGradientEnd = resolvingGradientEnd;
copyDataProperties(object4, env0_13, r23);
return object4;
}
}
@@ -0,0 +1,82 @@
/* Metro module 8325; source: modules/messages/native/renderer/row_data/embeds/GiftIntentEmbed.tsx; dependencies: [8326, 1878, 1880, 4501, 697, 1244, 7643, 3995, 8191, 4049, 8329, 8330, 2] */
function _fun66270(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8510:6, offset: 0x01bf5aaf, size: 287 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const premiumGiftingIntentStore = importDefault(8326) /* metro dependency 8326: PremiumGiftingIntentStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).GiftIntentType;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = createStylesModule.createNativeStyleProperties;
object2 = {};
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.headerTextColor = TEXT_STRONG;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.subHeaderTextColor = TEXT_SUBTLE;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object2.borderColor = BORDER_MUTED;
const env0_6 = Reflect.apply(createNativeStyleProperties, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/GiftIntentEmbed.tsx');
exports.createGiftIntentEmbed = createGiftIntentEmbed;
}
function createGiftIntentEmbed({giftingPrompt}, a1) { // fn#66271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8510:492, offset: 0x01bf5bce, size: 747 bytes, params: 3, frame: 25
var r7;
var r9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let value = null;
if (value == giftingPrompt) {
return value;
}
const giftIntentType = giftingPrompt.giftIntentType;
const recipientUserId = giftingPrompt.recipientUserId;
const user = UserStore.getUser(recipientUserId);
if (value == user) {
return value;
}
const name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
const friendAnniversaryYears = PremiumGiftingIntentStore.getFriendAnniversaryYears(recipientUserId);
const FRIEND_ANNIVERSARY = GiftIntentType.FRIEND_ANNIVERSARY;
if (giftIntentType === FRIEND_ANNIVERSARY) {
r7 = {headerText: intl.string(t.CeQIwZ), subHeaderParts: [{text: intl.formatToPlainString(t.PpG27s,
{numberOfYears: friendAnniversaryYears})}]};
} else {
(require(7643) /* metro dependency 7643: PremiumGiftingUtils */).unhandledGiftIntent(giftIntentType);
r7 = value;
}
if (value == r7) {
return value;
}
const currentUser = UserStore.getCurrentUser();
const value9 = '' + user.getAvatarURL(undefined, 40);
if (value != currentUser) {
value = currentUser.getAvatarURL(undefined, 40);
value = '' + value;
r9 = value;
} else {
r9 = undefined;
}
value = env0_6(a1);
const object2 = {recipientAvatarUrl: value9, currentUserAvatarUrl: r9, recipientName: name};
object2.headerText = r7.headerText;
object2.subHeaderParts = r7.subHeaderParts;
object2.recipientUserId = recipientUserId;
object2.giftIntentType = giftIntentType;
object2.headerTextColor = value.headerTextColor;
object2.subHeaderTextColor = value.subHeaderTextColor;
object2.backgroundColor = value.backgroundColor;
object2.borderColor = value.borderColor;
object2.subHeaderIconUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(4049) /* metro dependency 4049 */);
object2.primaryCtaLabel = intl.string(t.ilhtIa);
object2.primaryCtaIconUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8329) /* metro dependency 8329 */);
object2.secondaryCtaIconUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8330) /* metro dependency 8330 */);
const string = intl.string;
const I5gL2H = t.I5gL2H;
object2.secondaryCtaAccessibilityLabel = Reflect.apply(string, intl, [I5gL2H]);
return object2;
}
@@ -0,0 +1,47 @@
/* Metro module 10602; source: modules/messages/native/renderer/row_data/embeds/PostPreviewEmbeds.tsx; dependencies: [661, 10603, 2] */
function _fun81726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10788:6, offset: 0x01edbc26, size: 120 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_2 = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/PostPreviewEmbeds.tsx');
exports.createPostPreviewEmbeds = function(a0, a1) {
var value = a2;
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = value !== undefined ? value : false;
var embeds = a0.embeds;
if (embeds != null) {
embeds.forEach(_fun81728);
}
return [];
};
}
function createPostPreviewEmbeds(a0, a1) { // fn#81727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10788:254, offset: 0x01edbc9e, size: 70 bytes, params: 3, frame: 12
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = value !== undefined ? value : false;
const embeds = a0.embeds;
if (embeds != null) {
embeds.forEach(_fun81728);
}
return [];
}
function _fun81728(a0) { // fn#81728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10788:346, offset: 0x01edbce4, size: 99 bytes, params: 2, frame: 18
const type = a0.type;
let value = environment.__proto__;
const POST_PREVIEW = MessageEmbedTypes.POST_PREVIEW;
if (type === POST_PREVIEW) {
value = importDefault(10603) /* metro dependency 10603: createMediaPostPreviewEmbedContent */;
var binding = env0_0;
value = value(binding, require, a0.url, env0_2);
if (value == null) {
return undefined;
}
binding = env0_3;
binding.push(value);
}
}
@@ -0,0 +1,70 @@
/* Metro module 8309; source: modules/messages/native/renderer/row_data/embeds/PremiumGroupInviteEmbed.tsx; dependencies: [3816, 4501, 697, 8191, 8310, 7945, 1244, 2806, 2] */
function _fun66211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8494:6, offset: 0x01bf2883, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const premiumGroupConstantsModule = require(3816) /* metro dependency 3816: PremiumGroupConstants */;
const env0_3 = premiumGroupConstantsModule.HELP_CENTER_LINK;
const env0_4 = premiumGroupConstantsModule.PremiumGroupInviteState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/PremiumGroupInviteEmbed.tsx');
exports.createPremiumGroupInviteEmbed = createPremiumGroupInviteEmbed;
}
function createPremiumGroupInviteEmbed(a0, a1, a2, a3) { // fn#66212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8494:297, offset: 0x01bf2909, size: 594 bytes, params: 5, frame: 29
var header;
var body;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let author = a0.author;
if (author != null) {
var value;
var moduleValue = require(4501) /* metro dependency 4501: createStyles */;
var createNativeStyleProperties = moduleValue.createNativeStyleProperties;
var object2 = {};
var colors = (importDefault(697) /* metro dependency 697: native */).colors;
var MOBILE_TEXT_HEADING_PRIMARY = colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.headerTextColor = MOBILE_TEXT_HEADING_PRIMARY;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_DEFAULT = colors.TEXT_DEFAULT;
object2.bodyTextColor = TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_LINK = colors.TEXT_LINK;
object2.linkTextColor = TEXT_LINK;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BACKGROUND_MOD_NORMAL = colors.BACKGROUND_MOD_NORMAL;
object2.backgroundColor = BACKGROUND_MOD_NORMAL;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BLACK = colors.BLACK;
object2.betaPillTextColor = BLACK;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var WHITE = colors.WHITE;
object2.betaPillBackgroundColor = WHITE;
var {headerTextColor, bodyTextColor, linkTextColor, backgroundColor, betaPillTextColor,
betaPillBackgroundColor} = Reflect.apply(createNativeStyleProperties, moduleValue, [object2])(a1);
var assetUriForEmbed = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8310) /* metro dependency 8310 */);
author = a0.author;
var id = author.id;
var moduleValue3 = require(7945) /* metro dependency 7945: PremiumGroupUtilsNative */;
var getPremiumGroupInviteEmbedText = moduleValue3.getPremiumGroupInviteEmbedText;
object2 = {sender: author, channel: a3, isSender: a2 === id};
var UNKNOWN = PremiumGroupInviteState.UNKNOWN;
object2.inviteState = UNKNOWN;
var value4 = Reflect.apply(getPremiumGroupInviteEmbedText, moduleValue3, [object2]);
if (value4 != null) {
header = value4.header;
body = value4.body;
value = intl.formatToParts((importDefault(2806) /* metro dependency 2806: PremiumGroupMessages */)['9VTnfI'],
{learnMoreLinkOnClick: {action: 'bindOpenUrl', url: HELP_CENTER_LINK, linkColor: linkTextColor}});
object2 = {headerText: header, headerColor: headerTextColor, backgroundColor: backgroundColor,
borderColor: backgroundColor, headerImageUrl: assetUriForEmbed};
object2.betaPillText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oW0eUd).toUpperCase();
object2.betaPillTextColor = betaPillTextColor;
object2.betaPillBackgroundColor = betaPillBackgroundColor;
object2.bodyText = body;
object2.bodyTextColor = bodyTextColor;
object2.learnMoreLink = value;
return object2;
}
}
}
@@ -0,0 +1,457 @@
/* Metro module 8316; source: modules/messages/native/renderer/row_data/embeds/ReferralTrialEmbed.tsx; dependencies: [1379, 1878, 3808, 7064, 5140, 661, 1880, 4501, 697, 5143, 8191, 7312, 1244, 8317, 3995, 3802, 7063, 8314, 1948, 1581, 7955, 2] */
function _fun66235(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8501:6, offset: 0x01bf3f87, size: 226 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const env0_9 = (require(1880) /* metro dependency 1880: PremiumConstants */).PREMIUM_TIER_2_REFERRAL_TRIAL_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/ReferralTrialEmbed.tsx');
exports.createReferralTrialEmbedRedeemable = createReferralTrialEmbedRedeemable;
}
function createReferralTrialEmbedRedeemable(a0, a1, a2, a3) { // fn#66236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8501:359, offset: 0x01bf4069, size: 2219 bytes, params: 5, frame: 42
var r32;
var id;
var r13;
var r18;
var r10;
var r15;
var r20;
var r19;
var r16;
var r17;
var r11;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var user;
var user2;
var name;
var value9;
var name2;
var formatToPlainString;
var value11;
var userTrialOffer;
var referralTrialEmbedRedeemableIsReferralTrialProductOfferIdEnabled;
var id2;
var isPremium2;
var hasUserTrialOfferExpired2;
var value16;
var moduleValue5;
var getReferralTrialOfferExpirationCopy;
var Date;
var value17;
var uj94C5;
var moduleValue6;
var formatIntervalDuration;
var object2;
var subscription_trial;
var value18;
var value20;
var formatToParts;
var LwCwT9;
var defaultImport4;
var value22;
var defaultImport5;
var mVzEG8;
var defaultImport6;
var value25;
var object3;
var object5;
var object6;
if (a0.author != null) {
var value;
var value2 = undefined;
var moduleValue = require(4501) /* metro dependency 4501: createStyles */;
var createNativeStyleProperties = moduleValue.createNativeStyleProperties;
var object7 = {};
var colors = (importDefault(697) /* metro dependency 697: native */).colors;
var WHITE = colors.WHITE;
object7.headerTextColor = WHITE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var MOBILE_TEXT_HEADING_PRIMARY = colors.MOBILE_TEXT_HEADING_PRIMARY;
object7.titleColor = MOBILE_TEXT_HEADING_PRIMARY;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_DEFAULT = colors.TEXT_DEFAULT;
object7.bodyTextColor = TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_MUTED = colors.TEXT_MUTED;
object7.footerTextColor = TEXT_MUTED;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var INTERACTIVE_TEXT_DEFAULT = colors.INTERACTIVE_TEXT_DEFAULT;
object7.subTextColor = INTERACTIVE_TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BACKGROUND_MOD_NORMAL = colors.BACKGROUND_MOD_NORMAL;
object7.backgroundColor = BACKGROUND_MOD_NORMAL;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
WHITE = colors.WHITE;
object7.acceptLabelColor = WHITE;
var {headerTextColor, titleColor, bodyTextColor, footerTextColor, subTextColor, acceptLabelColor,
backgroundColor} = Reflect.apply(createNativeStyleProperties, moduleValue, [object7])(a1);
var getChannel = ChannelStore.getChannel;
var getChannelId = a0.getChannelId;
var value4 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getChannelId, a0, [])]);
if (value4 == null) {
return undefined;
}
if (value4.isDM()) {
object7 = {backgroundColor: backgroundColor, borderColor: backgroundColor, thumbnailCornerRadius: 3};
object7.headerLogoUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(7312) /* metro dependency 7312 */);
object7.headerText = intl.string(t.gtNqJQ).toLocaleLowerCase();
object7.headerColor = headerTextColor;
object7.thumbnailUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8317) /* metro dependency 8317 */);
user = UserStore.getUser(a3 == null ? value2 : a3.user_id);
user2 = UserStore.getUser(a3 == null ? value2 : a3.referrer_id);
if (user == null) {
object6 = {};
copyDataProperties(object6, object7, r32);
object6['bodyText'] = intl.string(t.eEz1N5);
object6['bodyTextColor'] = bodyTextColor;
object6['canBeAccepted'] = false;
return object6;
}
if (user2 == null) {
object6 = {};
copyDataProperties(object6, object7, r32);
object6['bodyText'] = intl.string(t.eEz1N5);
object6['bodyTextColor'] = bodyTextColor;
object6['canBeAccepted'] = false;
return object6;
}
name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user2);
id = user2.id;
value9 = id === a2;
name2 = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
value11 = intl.formatToPlainString(t.IiWKwg, {senderUserName: name, recipientUserName: name2});
if (a3 == null) {
object5 = {};
copyDataProperties(object5, object7, r32);
object5['titleText'] = value11;
object5['titleColor'] = titleColor;
object5['bodyText'] = intl.string(t.eEz1N5);
object5['bodyTextColor'] = bodyTextColor;
object5['canBeAccepted'] = false;
return object5;
}
userTrialOffer = UserOfferStore.getUserTrialOffer(PREMIUM_TIER_2_REFERRAL_TRIAL_ID);
referralTrialEmbedRedeemableIsReferralTrialProductOfferIdEnabled = createReferralTrialEmbedRedeemableIsReferralTrialProductOfferIdEnabled();
id2 = a3.id;
id = userTrialOffer == null ? value2 : userTrialOffer.id;
r13 = id2 === id && referralTrialEmbedRedeemableIsReferralTrialProductOfferIdEnabled;
isPremium2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(user);
r18 = isPremium2 || user.id !== a2 ? isPremium2 : SubscriptionStore.getPremiumTypeSubscription() != null;
hasUserTrialOfferExpired2 = (require(7063) /* metro dependency 7063: useTrialOffer */).hasUserTrialOfferExpired(a3);
value16 = a3.redeemed_at != null;
if (a3.expires_at != null) {
if (hasUserTrialOfferExpired2) {
r10 = value2;
r15 = value2;
} else if (r18) {
r10 = value2;
r15 = value2;
} else if (value16) {
r10 = value2;
r15 = value2;
} else {
moduleValue5 = require(8314) /* metro dependency 8314: ReferralProgramUtils */;
getReferralTrialOfferExpirationCopy = moduleValue5.getReferralTrialOfferExpirationCopy;
Date = global.Date;
value17 = Reflect.apply(getReferralTrialOfferExpirationCopy, moduleValue5,
[Date.parse(a3.expires_at)]);
formatToPlainString = intl.formatToPlainString;
uj94C5 = t.uj94C5;
moduleValue6 = require(3802) /* metro dependency 3802: PremiumUtils */;
formatIntervalDuration = moduleValue6.formatIntervalDuration;
object2 = {};
subscription_trial = a3.subscription_trial;
value18 = subscription_trial == null;
object2.intervalType = value18 ? value2 : subscription_trial.interval;
subscription_trial = a3.subscription_trial;
object2.intervalCount = subscription_trial == null ? value2 : subscription_trial.interval_count;
value20 = Reflect.apply(formatToPlainString, intl, [uj94C5,
{duration: Reflect.apply(formatIntervalDuration,
moduleValue6, [object2])}]).replace(RegExp('\\*', 'g'), '');
r10 = value17;
r15 = value20;
r32 = value18;
}
} else {
r10 = value2;
r15 = value2;
}
if (r18) {
if (value9) {
if (r18) {
value25 = intl.formatToPlainString(t['Mptau/'], {username: name2});
r16 = value2;
r17 = value25;
} else if (hasUserTrialOfferExpired2) {
if (value16) {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value9) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport5 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport5.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
} else {
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} else {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value9) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport5 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport5.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
}
} else if (value16) {
if (r18) {
value25 = intl.formatToPlainString(t['Mptau/'], {username: name2});
r16 = value2;
r17 = value25;
} else if (hasUserTrialOfferExpired2) {
if (value16) {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value9) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport5 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport5.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
} else {
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} else {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value9) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport5 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport5.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
}
} else {
formatToParts = intl.formatToParts;
LwCwT9 = t.LwCwT9;
defaultImport4 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r16 = Reflect.apply(formatToParts, intl, [LwCwT9, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport4.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
r17 = value2;
}
} else if (r18) {
value25 = intl.formatToPlainString(t['Mptau/'], {username: name2});
r16 = value2;
r17 = value25;
} else if (hasUserTrialOfferExpired2) {
if (value16) {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value9) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport5 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport5.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
} else {
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} else {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value9) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport5 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport5.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
}
r11 = !hasUserTrialOfferExpired2 && !r18;
r11 = r11 && r13;
r11 = r11 && !value9;
object3 = {};
copyDataProperties(object3, object7, r32);
object3['titleText'] = value11;
object3['titleColor'] = titleColor;
object3['bodyText'] = r17;
object3['structuredBodyText'] = r16;
object3['bodyTextColor'] = bodyTextColor;
object3['subText'] = r10;
object3['subTextColor'] = subTextColor;
object3['canBeAccepted'] = r11;
if (r11) {
object7 = {};
copyDataProperties(object7, object3, r32);
object7['footerText'] = r15;
object7['footerTextColor'] = footerTextColor;
object7['canBeAccepted'] = r11;
object7['acceptLabelText'] = intl.string(t.bXTClc);
object7['acceptLabelColor'] = acceptLabelColor;
object7['acceptLabelIconUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(7955) /* metro dependency 7955 */);
r0 = object7;
} else {
r0 = object3;
}
return r0;
}
}
}
function createReferralTrialEmbedRedeemableIsReferralTrialProductOfferIdEnabled() { // fn#66237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8501:1799, owner: createReferralTrialEmbedRedeemable.isReferralTrialProductOfferIdEnabled, offset: 0x01bf4914, size: 97 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
const env0_0 = IAPStoreAndroid.getOfferIds();
const Object = global.Object;
const values = Object.values;
const TrialIdToProductOfferId = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).TrialIdToProductOfferId;
return Reflect.apply(values, Object, [TrialIdToProductOfferId[PREMIUM_TIER_2_REFERRAL_TRIAL_ID]]).every(_fun66238);
}
@@ -0,0 +1,488 @@
/* Metro module 8312; source: modules/messages/native/renderer/row_data/embeds/ReferralTrialEmbedRedesign.tsx; dependencies: [1379, 1878, 3808, 7064, 5140, 661, 1880, 4501, 697, 5143, 8313, 1244, 3995, 1948, 3802, 7063, 8314, 1581, 8191, 7955, 2] */
function _fun66216(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8497:6, offset: 0x01bf2e55, size: 226 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const userOfferStore = importDefault(7064) /* metro dependency 7064: UserOfferStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const env0_9 = (require(1880) /* metro dependency 1880: PremiumConstants */).PREMIUM_TIER_2_REFERRAL_TRIAL_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/ReferralTrialEmbedRedesign.tsx');
exports.createReferralTrialEmbedRedesign = createReferralTrialEmbedRedesign;
}
function createReferralTrialEmbedRedesign(a0, a1, a2, a3) { // fn#66217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8497:365, offset: 0x01bf2f37, size: 2278 bytes, params: 5, frame: 44
var r34;
var id;
var r13;
var r18;
var r9;
var r15;
var r20;
var r19;
var r16;
var r17;
var r10;
var r0;
var user;
var user2;
var name;
var value8;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var yisueA;
var defaultImport2;
var getArticleURL;
var REFERRAL_PROGRAM;
var value9;
var formatToParts;
var defaultImport3;
var value10;
var userTrialOffer;
var referralTrialEmbedRedesignIsReferralTrialProductOfferIdEnabled;
var id2;
var isPremium2;
var hasUserTrialOfferExpired2;
var name2;
var value16;
var moduleValue3;
var getReferralTrialOfferExpirationCopy;
var Date;
var value17;
var uj94C5;
var moduleValue4;
var formatIntervalDuration;
var object2;
var subscription_trial;
var value18;
var value20;
var LwCwT9;
var defaultImport6;
var value22;
var defaultImport7;
var mVzEG8;
var defaultImport8;
var value25;
var object3;
var object5;
if (a0.author != null) {
var value;
var value2 = undefined;
var moduleValue = require(4501) /* metro dependency 4501: createStyles */;
var createNativeStyleProperties = moduleValue.createNativeStyleProperties;
var object6 = {};
var colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_DEFAULT = colors.TEXT_DEFAULT;
object6.titleColor = TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var MOBILE_TEXT_HEADING_PRIMARY = colors.MOBILE_TEXT_HEADING_PRIMARY;
object6.headerTextColor = MOBILE_TEXT_HEADING_PRIMARY;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_SUBTLE = colors.TEXT_SUBTLE;
object6.bodyTextColor = TEXT_SUBTLE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_MUTED = colors.TEXT_MUTED;
object6.footerTextColor = TEXT_MUTED;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
TEXT_SUBTLE = colors.TEXT_SUBTLE;
object6.subTextColor = TEXT_SUBTLE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BACKGROUND_MOD_NORMAL = colors.BACKGROUND_MOD_NORMAL;
object6.backgroundColor = BACKGROUND_MOD_NORMAL;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var WHITE = colors.WHITE;
object6.acceptLabelColor = WHITE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_LINK = colors.TEXT_LINK;
object6.linkTextColor = TEXT_LINK;
var {titleColor, headerTextColor, bodyTextColor, footerTextColor, subTextColor, acceptLabelColor,
backgroundColor,
linkTextColor} = Reflect.apply(createNativeStyleProperties, moduleValue, [object6])(a1);
var getChannel = ChannelStore.getChannel;
var getChannelId = a0.getChannelId;
var value4 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getChannelId, a0, [])]);
if (value4 == null) {
return undefined;
}
if (value4.isDM()) {
user = UserStore.getUser(a3 == null ? value2 : a3.user_id);
user2 = UserStore.getUser(a3 == null ? value2 : a3.referrer_id);
if (user == null) {
object6 = {titleText: '', titleColor: titleColor};
object6.headerImageUrl = importDefault(8313) /* metro dependency 8313: trialExchangePng */;
object6.headerText = '';
object6.headerColor = headerTextColor;
object6.backgroundColor = backgroundColor;
object6.borderColor = backgroundColor;
object6.bodyText = intl.string(t.eEz1N5);
object6.bodyTextColor = bodyTextColor;
object6.canBeAccepted = false;
return object6;
}
if (user2 == null) {
object6 = {titleText: '', titleColor: titleColor};
object6.headerImageUrl = importDefault(8313) /* metro dependency 8313: trialExchangePng */;
object6.headerText = '';
object6.headerColor = headerTextColor;
object6.backgroundColor = backgroundColor;
object6.borderColor = backgroundColor;
object6.bodyText = intl.string(t.eEz1N5);
object6.bodyTextColor = bodyTextColor;
object6.canBeAccepted = false;
return object6;
}
name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user2);
id = user2.id;
value8 = id === a2;
formatToPlainString = intl.formatToPlainString;
yisueA = t.yisueA;
object6 = {sender: name};
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
getArticleURL = defaultImport2.getArticleURL;
REFERRAL_PROGRAM = HelpdeskArticles.REFERRAL_PROGRAM;
object6.helpdeskArticle = Reflect.apply(getArticleURL, defaultImport2, [REFERRAL_PROGRAM]);
value9 = Reflect.apply(formatToPlainString, intl, [yisueA, object6]);
formatToParts = intl.formatToParts;
yisueA = t.yisueA;
object6 = {sender: name};
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
getArticleURL = defaultImport3.getArticleURL;
REFERRAL_PROGRAM = HelpdeskArticles.REFERRAL_PROGRAM;
object6.helpdeskArticle = {action: 'bindOpenUrl', url: Reflect.apply(getArticleURL, defaultImport3,
[REFERRAL_PROGRAM]), linkColor: linkTextColor};
value10 = Reflect.apply(formatToParts, intl, [yisueA, object6]);
object6 = {titleText: value9, titleColor: titleColor,
headerImageUrl: importDefault(8313) /* metro dependency 8313: trialExchangePng */};
object6.headerText = intl.string(t.HtTvXA);
object6.headerColor = headerTextColor;
object6.backgroundColor = backgroundColor;
object6.borderColor = backgroundColor;
object6.learnMoreLink = value10;
if (a3 == null) {
object5 = {};
copyDataProperties(object5, object6, r34);
object5['bodyText'] = intl.string(t.eEz1N5);
object5['bodyTextColor'] = bodyTextColor;
object5['canBeAccepted'] = false;
return object5;
}
userTrialOffer = UserOfferStore.getUserTrialOffer(PREMIUM_TIER_2_REFERRAL_TRIAL_ID);
referralTrialEmbedRedesignIsReferralTrialProductOfferIdEnabled = createReferralTrialEmbedRedesignIsReferralTrialProductOfferIdEnabled();
id2 = a3.id;
id = userTrialOffer == null ? value2 : userTrialOffer.id;
r13 = id2 === id && referralTrialEmbedRedesignIsReferralTrialProductOfferIdEnabled;
isPremium2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(user);
r18 = isPremium2 || user.id !== a2 ? isPremium2 : SubscriptionStore.getPremiumTypeSubscription() != null;
hasUserTrialOfferExpired2 = (require(7063) /* metro dependency 7063: useTrialOffer */).hasUserTrialOfferExpired(a3);
name2 = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
value16 = a3.redeemed_at != null;
if (a3.expires_at != null) {
if (hasUserTrialOfferExpired2) {
r9 = value2;
r15 = value2;
} else if (r18) {
r9 = value2;
r15 = value2;
} else if (value16) {
r9 = value2;
r15 = value2;
} else {
moduleValue3 = require(8314) /* metro dependency 8314: ReferralProgramUtils */;
getReferralTrialOfferExpirationCopy = moduleValue3.getReferralTrialOfferExpirationCopy;
Date = global.Date;
value17 = Reflect.apply(getReferralTrialOfferExpirationCopy, moduleValue3,
[Date.parse(a3.expires_at)]);
formatToPlainString = intl.formatToPlainString;
uj94C5 = t.uj94C5;
moduleValue4 = require(3802) /* metro dependency 3802: PremiumUtils */;
formatIntervalDuration = moduleValue4.formatIntervalDuration;
object2 = {};
subscription_trial = a3.subscription_trial;
value18 = subscription_trial == null;
object2.intervalType = value18 ? value2 : subscription_trial.interval;
subscription_trial = a3.subscription_trial;
object2.intervalCount = subscription_trial == null ? value2 : subscription_trial.interval_count;
value20 = Reflect.apply(formatToPlainString, intl, [uj94C5,
{duration: Reflect.apply(formatIntervalDuration,
moduleValue4, [object2])}]).replace(RegExp('\\*', 'g'), '');
r9 = value17;
r15 = value20;
r34 = value18;
}
} else {
r9 = value2;
r15 = value2;
}
if (r18) {
if (value8) {
if (r18) {
value25 = intl.formatToPlainString(t['Mptau/'], {username: name2});
r16 = value2;
r17 = value25;
} else if (hasUserTrialOfferExpired2) {
if (value16) {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value8) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport7.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
} else {
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} else {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value8) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport7.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
}
} else if (value16) {
if (r18) {
value25 = intl.formatToPlainString(t['Mptau/'], {username: name2});
r16 = value2;
r17 = value25;
} else if (hasUserTrialOfferExpired2) {
if (value16) {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value8) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8,
{helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport7.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
} else {
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} else {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else if (value8) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)},
username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport7.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
}
} else {
formatToParts = intl.formatToParts;
LwCwT9 = t.LwCwT9;
defaultImport6 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r16 = Reflect.apply(formatToParts, intl, [LwCwT9, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
r17 = value2;
}
} else if (r18) {
value25 = intl.formatToPlainString(t['Mptau/'], {username: name2});
r16 = value2;
r17 = value25;
} else if (hasUserTrialOfferExpired2) {
if (value16) {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value8) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport7.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
} else {
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} else {
if (r13) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value16) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else if (value8) {
formatToParts = intl.formatToParts;
mVzEG8 = t.mVzEG8;
defaultImport8 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [mVzEG8, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
defaultImport7 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
r19 = Reflect.apply(formatToParts, intl, [r20, {helpdeskArticle: {action: 'bindOpenUrl',
url: defaultImport7.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}}]);
}
r16 = r19;
r17 = value2;
}
r10 = !hasUserTrialOfferExpired2 && !r18;
r10 = r10 && r13;
r10 = r10 && !value8;
object3 = {};
copyDataProperties(object3, object6, r34);
object3['bodyText'] = r17;
object3['structuredBodyText'] = r16;
object3['bodyTextColor'] = bodyTextColor;
object3['subText'] = r9;
object3['subTextColor'] = subTextColor;
object3['canBeAccepted'] = r10;
if (r10) {
object6 = {};
copyDataProperties(object6, object3, r34);
object6['footerText'] = r15;
object6['footerTextColor'] = footerTextColor;
object6['canBeAccepted'] = r10;
object6['acceptLabelText'] = intl.string(t.bXTClc);
object6['acceptLabelColor'] = acceptLabelColor;
object6['acceptLabelIconUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(7955) /* metro dependency 7955 */);
r0 = object6;
} else {
r0 = object3;
}
return r0;
}
}
}
function createReferralTrialEmbedRedesignIsReferralTrialProductOfferIdEnabled() { // fn#66218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8497:2024, owner: createReferralTrialEmbedRedesign.isReferralTrialProductOfferIdEnabled, offset: 0x01bf381d, size: 97 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__;
const env0_0 = IAPStoreAndroid.getOfferIds();
const Object = global.Object;
const values = Object.values;
const TrialIdToProductOfferId = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).TrialIdToProductOfferId;
return Reflect.apply(values, Object, [TrialIdToProductOfferId[PREMIUM_TIER_2_REFERRAL_TRIAL_ID]]).every(_fun66219);
}
@@ -0,0 +1,72 @@
/* Metro module 10606; source: modules/messages/native/renderer/row_data/embeds/SafetyPolicyNoticeEmbed.tsx; dependencies: [27, 661, 5267, 3738, 1244, 8191, 8130, 2] */
function _fun81746(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10792:6, offset: 0x01edc83f, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const env0_4 = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
const env0_5 = (require(5267) /* metro dependency 5267: SafetyHubConstants */).SafetyHubPolicyNoticeKeys;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/SafetyPolicyNoticeEmbed.tsx');
exports.createSafetyPolicyNoticeEmbed = createSafetyPolicyNoticeEmbed;
}
function createSafetyPolicyNoticeEmbed(a0) { // fn#81747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10792:318, offset: 0x01edc8e7, size: 623 bytes, params: 2, frame: 24
var r14;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var moduleValue;
var formatToPlainString;
var eevFb6;
var object4;
var value5;
let embeds = a0.embeds;
if (embeds != null) {
embeds = a0.embeds;
var property = embeds[0];
var value = undefined;
var fields = property == null ? value : property.fields;
if (fields == null) {
return undefined;
}
embeds = a0.embeds;
property = embeds[0];
var type = property == null ? value : property.type;
var SAFETY_POLICY_NOTICE = MessageEmbedTypes.SAFETY_POLICY_NOTICE;
if (type !== SAFETY_POLICY_NOTICE) {
return undefined;
}
embeds = a0.embeds;
property = embeds[0];
fields = property.fields;
var r1 = (fields == null ? value : fields.find(function({rawName}) {
return rawName === SafetyHubPolicyNoticeKeys.CLASSIFICATION_ID;
})) ?? value;
r1 = (r1 == null ? value : r1.rawValue) ?? value;
fields = property.fields;
var r2 = (fields == null ? value : fields.find(function({rawName}) {
return rawName === SafetyHubPolicyNoticeKeys.INCIDENT_TIMESTAMP;
})) ?? value;
r14 = r2 == null || r2.rawValue == null ? value : global.parseFloat(r2.rawValue);
if (r1 == null) {
return undefined;
}
if (r14 != null) {
object3 = {};
object3.titleText = intl.string(t['4CxGXi']);
moduleValue = require(8191) /* metro dependency 8191: EmbedUtils */;
object3.titleIcon = moduleValue.getAssetUriForEmbed(Image.resolveAssetSource(importDefault(8130) /* metro dependency 8130 */));
formatToPlainString = intl.formatToPlainString;
eevFb6 = t.eevFb6;
object4 = {};
value5 = (importDefault(3738) /* metro dependency 3738 */)();
object4.daysAgo = value5.diff((importDefault(3738) /* metro dependency 3738 */).unix(r14), 'days');
object3.subtitleText = Reflect.apply(formatToPlainString, intl, [eevFb6, object4]);
object3.descriptionText = intl.string(t['5CLb0A']);
object3.ctaText = intl.string(t.zKnzwm);
object3.classificationId = r1;
return object3;
}
}
}
@@ -0,0 +1,118 @@
/* Metro module 10607; source: modules/messages/native/renderer/row_data/embeds/SafetySystemNotificationEmbed.tsx; dependencies: [27, 661, 3738, 8130, 6654, 5266, 8191, 1244, 2] */
function _fun81750(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10793:6, offset: 0x01edcb8e, size: 146 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const env0_4 = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/SafetySystemNotificationEmbed.tsx');
exports.createSafetySystemNotificationEmbed = createSafetySystemNotificationEmbed;
}
function createSafetySystemNotificationEmbed(a0) { // fn#81751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10793:294, offset: 0x01edcc20, size: 736 bytes, params: 2, frame: 27
var r5;
var r0;
var r3;
var r6;
var r7;
var r15;
var text;
var key;
var ctas;
var moduleValue2;
var moduleValue3;
var object3;
var header;
var value6;
var moduleValue4;
var getAssetUriForEmbed;
var resolveAssetSource;
var intl;
var formatToPlainString;
var eevFb6;
var object4;
if (a0 != null) {
var embeds = a0.embeds;
if (embeds == null) {
return undefined;
}
embeds = a0.embeds;
var value = 0;
var property = embeds[value];
var value2 = undefined;
if ((property == null ? value2 : property.fields) == null) {
return undefined;
}
embeds = a0.embeds;
property = embeds[value];
var type = property == null ? value2 : property.type;
var SAFETY_SYSTEM_NOTIFICATION = MessageEmbedTypes.SAFETY_SYSTEM_NOTIFICATION;
if (type !== SAFETY_SYSTEM_NOTIFICATION) {
return undefined;
}
var messageForProps = require(dependencyMap[5]).parseMessageForProps(a0);
if (messageForProps != null) {
ctas = messageForProps.ctas;
if (ctas != null) {
ctas = messageForProps.ctas;
if (ctas[value] != null) {
moduleValue2 = require(dependencyMap[5]);
r5 = moduleValue2.mapCtaToNativeData(messageForProps.ctas[value], messageForProps.learn_more_link,
messageForProps.classification_id);
} else {
r5 = value2;
}
ctas = messageForProps.ctas;
if (ctas[1] != null) {
moduleValue3 = require(dependencyMap[5]);
r0 = moduleValue3.mapCtaToNativeData(messageForProps.ctas[1], messageForProps.learn_more_link,
messageForProps.classification_id);
} else {
r0 = value2;
}
r3 = r0;
r6 = r5;
} else {
r3 = value2;
r6 = value2;
}
object3 = {};
header = messageForProps.header;
value6 = '';
r7 = header ?? value6;
object3.titleText = r7;
moduleValue4 = require(dependencyMap[6]);
getAssetUriForEmbed = moduleValue4.getAssetUriForEmbed;
resolveAssetSource = Image.resolveAssetSource;
r7 = messageForProps.icon === 'danger' ? dependencyMap[3] : dependencyMap[4];
object3.titleIcon = Reflect.apply(getAssetUriForEmbed, moduleValue4, [Reflect.apply(resolveAssetSource,
Image,
[importDefault(r7)])]);
intl = require(dependencyMap[7]).intl;
formatToPlainString = intl.formatToPlainString;
eevFb6 = require(dependencyMap[7]).t.eevFb6;
object4 = {};
r15 = messageForProps.timestamp ?? value;
value = importDefault(dependencyMap[2])();
object4.daysAgo = value.diff(importDefault(dependencyMap[2]).unix(r15), 'days');
object3.subtitleText = Reflect.apply(formatToPlainString, intl, [eevFb6, object4]);
r5 = messageForProps.body ?? value6;
object3.descriptionText = r5;
text = r6 == null ? value2 : r6.text;
object3.primaryCtaText = text;
type = r6 == null ? value2 : r6.type;
object3.primaryCtaType = type;
key = r6 == null ? value2 : r6.key;
object3.primaryCtaKey = key;
text = r3 == null ? value2 : r3.text;
object3.secondaryCtaText = text;
type = r3 == null ? value2 : r3.type;
object3.secondaryCtaType = type;
key = r3 == null ? value2 : r3.key;
object3.secondaryCtaKey = key;
object3.footerTheme = messageForProps.theme;
return object3;
}
}
}
@@ -0,0 +1,134 @@
/* Metro module 10556; source: modules/messages/native/renderer/row_data/embeds/coded_links/BuildOverrideEmbed.tsx; dependencies: [27, 10557, 4118, 8189, 10558, 10561, 1582, 1244, 8181, 697, 4002, 10528, 10529, 10555, 2] */
function _fun81355(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10742:6, offset: 0x01ecd63c, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = (require(27) /* metro dependency 27 */).Image;
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
const env0_6 = (require(10557) /* metro dependency 10557: BuildOverrideStore */).State;
const env0_7 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/BuildOverrideEmbed.tsx');
exports.createBuildOverrideEmbed = createBuildOverrideEmbed;
}
function createBuildOverrideEmbed(a0, a1) { // fn#81356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10742:305, offset: 0x01ecd6f8, size: 1216 bytes, params: 3, frame: 26
var r0;
const DEVICE_FIELD = (require(10558) /* metro dependency 10558: BuildOverrideUtils */).DEVICE_FIELD;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var moduleValue2;
const value2 = undefined;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1);
const currentBuildOverride = BuildOverrideStore.getCurrentBuildOverride();
const buildOverride = BuildOverrideStore.getBuildOverride(a0);
let state = buildOverride.state;
const Resolving = State.Resolving;
if (state === Resolving) {
object2 = {headerText: 'RESOLVING'};
object2.resolvingGradientEnd = colors.resolvingGradientEnd;
object2.resolvingGradientStart = colors.resolvingGradientStart;
object2.type = InviteTypes.GUILD;
copyDataProperties(object2, baseColors, undefined);
return object2;
}
let override = buildOverride.override;
const id = override == null || override.targetBuildOverride == null || override.targetBuildOverride[DEVICE_FIELD] == null ? value2 : override.targetBuildOverride[DEVICE_FIELD].id;
let r6 = id != null && id === (currentBuildOverride.overrides == null || currentBuildOverride.overrides[DEVICE_FIELD] == null ? value2 : currentBuildOverride.overrides[DEVICE_FIELD].id);
const defaultImport = importDefault(10561) /* metro dependency 10561: validateBuildOverride */;
override = buildOverride.override;
const clientInfoUtilsModule = importAll(1582) /* metro dependency 1582: ClientInfoUtils */;
const getConstants = clientInfoUtilsModule.getConstants;
const Version = Reflect.apply(getConstants, clientInfoUtilsModule, []).Version;
const value8 = defaultImport(override, ['discord_ios', 'discord_android'], Version);
state = currentBuildOverride.state;
const Invalid = State.Invalid;
if (state === Invalid) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object2['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object2['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object2['subtitle'] = id;
object2['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['type'] = InviteTypes.GUILD;
r0 = object2;
} else if (buildOverride.state === State.Invalid) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object2['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object2['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object2['subtitle'] = id;
object2['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['type'] = InviteTypes.GUILD;
r0 = object2;
} else if (buildOverride.override == null) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object2['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object2['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object2['subtitle'] = id;
object2['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['type'] = InviteTypes.GUILD;
r0 = object2;
} else if (id == null) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object2['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object2['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object2['subtitle'] = id;
object2['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['type'] = InviteTypes.GUILD;
r0 = object2;
} else if (value8.valid) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
string = intl.string;
object2['headerText'] = Reflect.apply(string, intl, [t.Wj3LW4]).toLocaleUpperCase();
object2['headerColor'] = colors.headerColor;
string = intl.string;
object2['titleText'] = Reflect.apply(string, intl, [t.RCYGot]);
object2['titleColor'] = colors.titleColor;
object2['subtitle'] = id;
object2['subtitleColor'] = colors.subtitleColor;
object2['thumbnailUrl'] = Image.resolveAssetSource(importDefault(10555) /* metro dependency 10555 */).uri;
object2['acceptButtonVariant'] = r6 ? 'destructive' : 'primary';
string = intl.string;
r6 = r6 ? Reflect.apply(string, intl, [t.tX4xrt]) : Reflect.apply(string, intl, [t.nOunHC]);
object2['acceptLabelText'] = r6;
object2['embedCanBeTapped'] = true;
object2['type'] = InviteTypes.GUILD;
r0 = object2;
} else {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object2['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object2['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object2['subtitle'] = id;
object2['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['type'] = InviteTypes.GUILD;
r0 = object2;
}
return r0;
}
@@ -0,0 +1,231 @@
/* Metro module 10535; source: modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinks.tsx; dependencies: [57, 3785, 1867, 1878, 7083, 10536, 4101, 10541, 10542, 10554, 10556, 10549, 10562, 10551, 10563, 10567, 8354, 10572, 10574, 1360, 2] */
function _fun81286(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10721:6, offset: 0x01ec6d02, size: 173 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let env0_2 = importDefault(57) /* metro dependency 57 */;
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinks.tsx');
exports.createCodedLinkEmbeds = function(a0, a1, a2, a3) {
var env0_0 = a0;
var env0_1 = a2;
var env0_2 = a3;
if (a0.author == null) {
return [];
}
if (a1.codedLinks.length === 0) {
return [];
}
var env0_3 = UserStore.getCurrentUser();
return a1.codedLinks.map(_fun81289);
};
}
function canSeeDevLinks() { // fn#81287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10721:136, offset: 0x01ec6daf, size: 129 bytes, params: 1, frame: 14
var currentUser;
const currentUser2 = UserStore.getCurrentUser();
const value3 = undefined;
let r0 = currentUser2 == null ? value3 : currentUser2.isStaff();
if (!r0) {
currentUser = UserStore.getCurrentUser();
r0 = currentUser == null ? value3 : currentUser.isStaffPersonal();
}
r0 = !r0 ? GuildStore.getGuild('943265993613008967') != null && !LurkingStore.isLurking('943265993613008967') : r0;
return r0;
}
function createCodedLinkEmbeds(a0, a1, a2, a3) { // fn#81288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10721:520, offset: 0x01ec6e30, size: 106 bytes, params: 5, frame: 12
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
if (a0.author == null) {
return [];
}
if (a1.codedLinks.length === 0) {
return [];
}
const env0_3 = UserStore.getCurrentUser();
return a1.codedLinks.map(_fun81289);
}
function _fun81289({type, code, url}) { // fn#81289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10721:662, offset: 0x01ec6e9a, size: 1808 bytes, params: 2, frame: 23
var r0;
const CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
var moduleValue2;
var value4;
var value7;
var moduleValue4;
var applicationCodedLinkData;
var appLinkGateResult;
var state;
var app;
let value = environment.__proto__;
const applicationCodedLinkModule = require(7083) /* metro dependency 7083: ApplicationCodedLink */;
if (applicationCodedLinkModule.isApplicationCodedLink(type)) {
if (importDefault == null) {
return null;
}
moduleValue4 = applicationCodedLinkModule;
if (moduleValue4.isApplicationCodedLinkMobileSupported(type)) {
applicationCodedLinkData = (require(7083) /* metro dependency 7083: ApplicationCodedLink */).getApplicationCodedLinkData(type,
code, url);
if (applicationCodedLinkData == null) {
return null;
}
appLinkGateResult = (require(10536) /* metro dependency 10536: createAppMessageEmbed */).getAppLinkGateResult({appId: applicationCodedLinkData.applicationId,
channel: importDefault, message: env0_0, theme: importAll});
state = appLinkGateResult.state;
if (state === 'unavailable') {
return null;
}
state = appLinkGateResult.state;
if (state === 'blocked') {
return appLinkGateResult.model;
}
app = appLinkGateResult.app;
type = applicationCodedLinkData.type;
if (CodedLinkType.ACTIVITY_BOOKMARK === type) {
return (require(10541) /* metro dependency 10541: createActivityMessageEmbed */).createActivityMessageEmbed({theme: importAll,
embedUrl: url, message: env0_0, app: app, params: applicationCodedLinkData.params});
}
if (CodedLinkType.APP_DIRECTORY_PROFILE === type) {
return (require(10536) /* metro dependency 10536: createAppMessageEmbed */).createAppMessageEmbed({theme: importAll,
embedUrl: url, message: env0_0, app: app});
}
if (CodedLinkType.APP_OAUTH2_LINK === type) {
return (require(10536) /* metro dependency 10536: createAppMessageEmbed */).createAppMessageEmbed({theme: importAll,
embedUrl: url, message: env0_0, app: app});
}
return null;
}
return null;
}
const INVITE = CodedLinkType.INVITE;
if (INVITE === type) {
value = require(10542) /* metro dependency 10542: InviteEmbed */;
return value.createInviteEmbed(env0_0, code, importAll);
}
const TEMPLATE = CodedLinkType.TEMPLATE;
if (TEMPLATE === type) {
return (require(10554) /* metro dependency 10554: GuildTemplateEmbed */).createGuildTemplateEmbed(code,
importAll);
}
const BUILD_OVERRIDE = CodedLinkType.BUILD_OVERRIDE;
if (BUILD_OVERRIDE === type) {
return (require(10556) /* metro dependency 10556: BuildOverrideEmbed */).createBuildOverrideEmbed(code,
importAll);
}
const MANUAL_BUILD_OVERRIDE = CodedLinkType.MANUAL_BUILD_OVERRIDE;
if (MANUAL_BUILD_OVERRIDE === type) {
if (canSeeDevLinks()) {
value = require(10556) /* metro dependency 10556: BuildOverrideEmbed */;
value = value.createBuildOverrideEmbed(code, importAll);
r0 = value;
} else {
r0 = null;
}
return r0;
}
const EVENT = CodedLinkType.EVENT;
if (EVENT === type) {
return (require(10549) /* metro dependency 10549: GuildScheduledEventEmbed */).createGuildScheduledEventLinkEmbed(code,
importAll);
}
const CHANNEL_LINK = CodedLinkType.CHANNEL_LINK;
if (CHANNEL_LINK === type) {
return (require(10562) /* metro dependency 10562: VoiceChannelLinkEmbed */).createVoiceChannelLinkEmbed(code,
importAll);
}
const EMBEDDED_ACTIVITY_INVITE = CodedLinkType.EMBEDDED_ACTIVITY_INVITE;
if (EMBEDDED_ACTIVITY_INVITE === type) {
return (require(10551) /* metro dependency 10551: EmbeddedActivityInviteEmbed */).createEmbeddedActivityInviteEmbed({theme: importAll,
inviteCode: code});
}
const EXPERIMENT = CodedLinkType.EXPERIMENT;
if (EXPERIMENT === type) {
if ((require(10563) /* metro dependency 10563: useCodedLinksExperimentEmbeds */).canSeeExperimentEmbeds()) {
value = require(10567) /* metro dependency 10567: ExperimentEmbed */;
value = value.createExperimentEmbed(url, importAll);
r0 = value;
} else {
r0 = null;
}
return r0;
}
const GUILD_PRODUCT = CodedLinkType.GUILD_PRODUCT;
if (GUILD_PRODUCT === type) {
return null;
}
const SERVER_SHOP = CodedLinkType.SERVER_SHOP;
if (SERVER_SHOP === type) {
return null;
}
const SOCIAL_LAYER_STOREFRONT = CodedLinkType.SOCIAL_LAYER_STOREFRONT;
if (SOCIAL_LAYER_STOREFRONT === type) {
moduleValue2 = require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */;
if (moduleValue2.getIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'create_coded_link_embeds'})) {
if (type === CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP) {
value7 = env1_2(code.split('-'), 2);
return (require(10572) /* metro dependency 10572: createSocialLayerStorefrontProductDetailsEmbed */).createSocialLayerStorefrontProductDetailsEmbed({skuId: value7[0],
guildOrApplication: {type: 'application', applicationId: value7[1]}, theme: importAll});
}
value4 = env1_2(code.split('-'), 2);
return (require(10572) /* metro dependency 10572: createSocialLayerStorefrontProductDetailsEmbed */).createSocialLayerStorefrontProductDetailsEmbed({skuId: value4[0],
guildOrApplication: {type: 'guild', guildId: value4[1]}, theme: importAll});
}
return null;
}
const SOCIAL_LAYER_STOREFRONT_APP = CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP;
if (SOCIAL_LAYER_STOREFRONT_APP === type) {
moduleValue2 = require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */;
if (moduleValue2.getIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'create_coded_link_embeds'})) {
if (type === CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP) {
value7 = env1_2(code.split('-'), 2);
return (require(10572) /* metro dependency 10572: createSocialLayerStorefrontProductDetailsEmbed */).createSocialLayerStorefrontProductDetailsEmbed({skuId: value7[0],
guildOrApplication: {type: 'application', applicationId: value7[1]}, theme: importAll});
}
value4 = env1_2(code.split('-'), 2);
return (require(10572) /* metro dependency 10572: createSocialLayerStorefrontProductDetailsEmbed */).createSocialLayerStorefrontProductDetailsEmbed({skuId: value4[0],
guildOrApplication: {type: 'guild', guildId: value4[1]}, theme: importAll});
}
return null;
}
const QUESTS_EMBED = CodedLinkType.QUESTS_EMBED;
if (QUESTS_EMBED === type) {
return (require(10574) /* metro dependency 10574: QuestEmbedNative */).createQuestsEmbed({theme: importAll,
questId: code, currentUser: env0_3});
}
const COLLECTIBLES_SHOP = CodedLinkType.COLLECTIBLES_SHOP;
if (COLLECTIBLES_SHOP === type) {
return null;
}
return (require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(type);
}
@@ -0,0 +1,23 @@
/* Metro module 9859; source: modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksConstants.tsx; dependencies: [2] */
function _fun77299(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10045:6, offset: 0x01df8789, size: 196 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {STAGE_INSTANCE: 0};
object2[0] = 'STAGE_INSTANCE';
object2.GUILD_SCHEDULED_EVENT = 1;
object2[1] = 'GUILD_SCHEDULED_EVENT';
object2.GUILD_INVITE_DISABLED = 2;
object2[2] = 'GUILD_INVITE_DISABLED';
object2.EMBEDDED_ACTIVITY_INVITE = 3;
object2[3] = 'EMBEDDED_ACTIVITY_INVITE';
object2.APP_MESSAGE_EMBED = 4;
object2[4] = 'APP_MESSAGE_EMBED';
object2.GUILD_PROFILE_INVITE = 5;
object2[5] = 'GUILD_PROFILE_INVITE';
object2.VOICE_CHANNEL_LIST_INVITE = 6;
object2[6] = 'VOICE_CHANNEL_LIST_INVITE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksConstants.tsx');
exports.CodedLinkExtendedType = object2;
}
@@ -0,0 +1,8 @@
/* Metro module 10538; source: modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksTypes.tsx; dependencies: [2] */
function _fun81297(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10724:6, offset: 0x01ec840d, size: 100 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksTypes.tsx');
exports.AppMessageEmbedDisplayType = {DISPLAY: 'display', BLOCKED: 'blocked'};
}
@@ -0,0 +1,142 @@
/* Metro module 10551; source: modules/messages/native/renderer/row_data/embeds/coded_links/EmbeddedActivityInviteEmbed.tsx; dependencies: [57, 27, 1378, 6874, 4234, 1226, 1379, 4097, 3793, 1878, 9859, 4118, 694, 6873, 8189, 6647, 1244, 4805, 10552, 2] */
function _fun81335(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10737:6, offset: 0x01ecbcd1, size: 345 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = (require(27) /* metro dependency 27 */).Image;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const applicationAssetsStore = importDefault(6874) /* metro dependency 6874: ApplicationAssetsStore */;
const env0_7 = (require(6874) /* metro dependency 6874: ApplicationAssetsStore */).FetchState;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_14 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
const env0_15 = (require(4118) /* metro dependency 4118: Constants */).InviteTargetTypes;
const env0_16 = ['embedded_cover'];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/EmbeddedActivityInviteEmbed.tsx');
exports.createEmbeddedActivityInviteEmbed = createEmbeddedActivityInviteEmbed;
}
function createEmbeddedActivityInviteEmbed({inviteCode, theme}) { // fn#81336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10737:469, offset: 0x01ecbe2a, size: 1340 bytes, params: 2, frame: 34
var r14;
var r10;
var r2;
var r9;
var defaultImport;
var object2;
var assetSource;
var formatToParts;
var omZR7L;
var value14;
var moduleValue4;
const value = undefined;
const invite = InviteStore.getInvite(inviteCode);
if (invite == null) {
return null;
}
const target_type = invite.target_type;
const target_application = invite.target_application;
const EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
if (target_type !== EMBEDDED_APPLICATION) {
return null;
}
if (target_application == null) {
return null;
}
const getApplication = ApplicationStore.getApplication;
let id = target_application.id;
if (Reflect.apply(getApplication, ApplicationStore, [id]) == null) {
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'APPLICATION_UPDATE', application: target_application});
}
const id3 = target_application.id;
const applicationAssetFetchState = ApplicationAssetsStore.getApplicationAssetFetchState(id3);
const NOT_FETCHED = FetchState.NOT_FETCHED;
if (applicationAssetFetchState === NOT_FETCHED) {
(require(6873) /* metro dependency 6873: ApplicationAssetUtils */).fetchAssetIds(id3, env0_16);
}
const value6 = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(theme);
const baseColors = value6.baseColors;
const acceptLabelGreenBackgroundColor = value6.colors.acceptLabelGreenBackgroundColor;
let guild = invite.guild;
const name = guild == null ? value : guild.name;
const channel = invite.channel;
id = channel == null ? value : channel.id;
guild = invite.guild;
const id2 = guild == null ? value : guild.id;
const r23 = id != null ? ChannelStore.getChannel(id) : null;
const r8 = r23 != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getSimpleChannelIcon(r23) : null;
if (r8 != null) {
assetSource = Image.resolveAssetSource(r8);
r14 = assetSource == null ? value : assetSource.uri;
} else {
r14 = value;
}
const r13 = (target_application == null ? value : target_application.name) ?? null;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value9 = Reflect.apply(string, intl, [t['1qHIZ4']]);
if (r23 == null) {
r10 = name != null ? intl.formatToParts(t.u0vaDE, {guildName: name}) : null;
} else if (name != null) {
formatToParts = intl.formatToParts;
omZR7L = t.omZR7L;
object2 = {};
object2.channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(r23,
UserStore,
RelationshipStore);
object2.guildName = name;
r10 = Reflect.apply(formatToParts, intl, [omZR7L, object2]);
} else {
r10 = name != null ? intl.formatToParts(t.u0vaDE, {guildName: name}) : null;
}
const value12 = id != null;
if (value12) {
value14 = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(id).find(function({applicationId}) {
return applicationId === id;
});
r2 = value14 == null || value14.userIds == null ? value : value14.userIds.has(AuthenticationStore.getId());
} else {
r2 = value12;
}
if (id == null) {
r9 = [];
} else if (id2 != null) {
moduleValue4 = require(10552) /* metro dependency 10552: useEmbeddedActivityParticipantAvatarUris */;
r9 = moduleValue4.getEmbeddedActivityParticipantAvatarUris({channelId: id, guildId: id2, applicationId: id3});
} else {
r9 = [];
}
string = intl.string;
const VJlc0S = t.VJlc0S;
const r6 = r9.length === 0 ? intl.string(t.I0v0Qv) : r2 ? intl.string(t.KC26NR) : Reflect.apply(string, intl,
[VJlc0S]);
const property = env0_3((require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetIds(id3,
env0_16) ?? [], 1)[0];
const r5 = property != null ? (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetImage(id3,
property, 1024) : value;
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['channelIcon'] = r14;
object2['headerText'] = r13;
object2['acceptLabelBackgroundColor'] = acceptLabelGreenBackgroundColor;
object2['titleText'] = value9;
object2['structurableSubtitleText'] = r10;
object2['type'] = null;
const EMBEDDED_ACTIVITY_INVITE = CodedLinkExtendedType.EMBEDDED_ACTIVITY_INVITE;
object2['extendedType'] = EMBEDDED_ACTIVITY_INVITE;
object2['participantAvatarUris'] = r9;
object2['acceptLabelText'] = r6;
object2['splashUrl'] = r5;
string = intl.string;
const PZLnuD = t.PZLnuD;
object2['noParticipantsText'] = Reflect.apply(string, intl, [PZLnuD]);
object2['ctaEnabled'] = !r2;
return object2;
}
@@ -0,0 +1,217 @@
/* Metro module 10567; source: modules/messages/native/renderer/row_data/embeds/coded_links/ExperimentEmbed.tsx; dependencies: [31, 27, 1226, 4108, 4118, 33, 8189, 4105, 10564, 10565, 3866, 10528, 10529, 10568, 8191, 10569, 4113, 4080, 4106, 6275, 6758, 10570, 10563, 2] */
function _fun81494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:6, offset: 0x01ed14a3, size: 248 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 env0_4 = (require(27) /* metro dependency 27 */).Image;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_6 = (require(4108) /* metro dependency 4108: ExperimentConstants */).ExperimentEmbedType;
const env0_7 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/ExperimentEmbed.tsx');
exports.default = ConnectedExperimentOverrideActionSheet;
exports.createExperimentEmbed = createExperimentEmbed;
}
function ExperimentOverrideActionSheet({id, experiment, override}) { // fn#81495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:198, offset: 0x01ed159b, size: 278 bytes, params: 2, frame: 25
var object2;
const binding = env0_3;
const useMemo = binding.useMemo;
const value3 = env0_3.useMemo(_fun81497, [id, experiment, Reflect.apply(useMemo, binding, [_fun81496,
[experiment]])]);
const value4 = env0_3.useCallback(_fun81502, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={experiment.title} subtitle={id} />;
const ExperimentDetails = (require(10570) /* metro dependency 10570: DevToolsExperimentsScreen */).ExperimentDetails;
return (
<BottomSheet {...object2}>
<ExperimentDetails
experiment={experiment}
override={override}
id={id}
options={value3}
onCopyLink={value4}
/>
</BottomSheet>
);
}
function ConnectedExperimentOverrideActionSheet({id}) { // fn#81503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:1165, offset: 0x01ed18b6, size: 257 bytes, params: 2, frame: 22
const {experiments,
overridesInfo} = (require(10564) /* metro dependency 10564: useLegacyExperiments */).useLegacyExperiments();
const value3 = (require(10565) /* metro dependency 10565: useApexExperiments */).useApexExperiments();
const experiments2 = value3.experiments;
const env0_3 = experiments2;
const overridesInfo2 = value3.overridesInfo;
const value4 = env0_3.useMemo(function() {
var r1;
var property = experiments[id];
var value2 = null;
r1 = value2 != property ? property : experiments[id];
return value2 != r1 ? r1 : value2;
}, [experiments, experiments2, id]);
return value4 != null && (require(10563) /* metro dependency 10563: useCodedLinksExperimentEmbeds */).useCanSeeExperimentEmbeds() ? <ExperimentOverrideActionSheet id={id} experiment={value4} override={env0_3.useMemo(function() {
var r1;
var property = overridesInfo[id];
var value2 = null;
r1 = value2 != property ? property : overridesInfo[id];
return value2 != r1 ? r1 : value2;
}, [overridesInfo, overridesInfo2, id])} /> : null;
}
function createExperimentEmbed(a0, a1) { // fn#81506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:1674, offset: 0x01ed1a15, size: 1277 bytes, params: 3, frame: 27
var r10;
var r14;
var r6;
var property;
var object2;
var value24;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1);
const experimentFromEmbedURL = (require(4105) /* metro dependency 4105: ExperimentEmbedUtils */).getExperimentFromEmbedURL(a0);
const experimentTreatmentFromEmbedURL = (require(4105) /* metro dependency 4105: ExperimentEmbedUtils */).getExperimentTreatmentFromEmbedURL(a0);
const {experiments,
overridesInfo} = (require(10564) /* metro dependency 10564: useLegacyExperiments */).getLegacyExperiments();
const apexExperiments = (require(10565) /* metro dependency 10565: useApexExperiments */).getApexExperiments();
const experiments2 = apexExperiments.experiments;
const overridesInfo2 = apexExperiments.overridesInfo;
const value7 = null;
if (value7 != experimentFromEmbedURL) {
property = experiments[experimentFromEmbedURL];
r14 = value7 != property ? property : experiments2[experimentFromEmbedURL];
} else {
r14 = value7;
}
if (value7 == experimentFromEmbedURL) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = 'EXPERIMENT';
value24 = 'Unknown Experiment';
object2['titleText'] = value7 == experimentFromEmbedURL ? value24 : experimentFromEmbedURL;
object2['titleColor'] = colors.titleColor;
object2['subtitle'] = value24;
object2['subtitleColor'] = colors.subtitleColor;
object2['bodyText'] = 'This client is missing this experiment. You may need to open the surface where the experiment is used first.';
object2['bodyTextColor'] = colors.bodyTextColor;
object2['thumbnailUrl'] = Image.resolveAssetSource((require(3866) /* metro dependency 3866: themes */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
} else {
if (value7 == r14) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = 'EXPERIMENT';
value24 = 'Unknown Experiment';
object2['titleText'] = value7 == experimentFromEmbedURL ? value24 : experimentFromEmbedURL;
object2['titleColor'] = colors.titleColor;
object2['subtitle'] = value24;
object2['subtitleColor'] = colors.subtitleColor;
object2['bodyText'] = 'This client is missing this experiment. You may need to open the surface where the experiment is used first.';
object2['bodyTextColor'] = colors.bodyTextColor;
object2['thumbnailUrl'] = Image.resolveAssetSource((require(3866) /* metro dependency 3866: themes */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['type'] = InviteTypes.GUILD;
return object2;
}
property = overridesInfo[experimentFromEmbedURL];
r6 = value7 != property ? property : overridesInfo2[experimentFromEmbedURL];
var r9 = value7 != r6 ? r6 : value7;
var value9 = (require(4105) /* metro dependency 4105: ExperimentEmbedUtils */).getExperimentBuckets(r14).find(_fun81507);
r10 = value7 != value9 ? ExperimentEmbedType.EXPERIMENT_TREATMENT : ExperimentEmbedType.EXPERIMENT;
var id = AuthenticationStore.getId();
var experimentServerAssignmentLabel = (require(4105) /* metro dependency 4105: ExperimentEmbedUtils */).getExperimentServerAssignmentLabel(r14,
(require(10568) /* metro dependency 10568: useExperimentAssignments */).getExperimentServerAssignment(r14,
id));
if (r10 === ExperimentEmbedType.EXPERIMENT_TREATMENT) {
r10 = value7 != value9 ? value9.label : 'Server Config: ' + experimentServerAssignmentLabel;
r6 = value7 != r9 && value7 != value9;
r6 = r6 && r9.variantId === value9.value;
object2 = {};
copyDataProperties(object2, baseColors, id);
object2['headerText'] = 'EXPERIMENT TREATMENT';
object2['titleText'] = experimentFromEmbedURL;
object2['titleColor'] = colors.titleColor;
object2['subtitle'] = r10;
object2['subtitleColor'] = colors.subtitleColor;
object2['thumbnailUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(10569) /* metro dependency 10569 */);
object2['thumbnailBackgroundColor'] = colors.backgroundColor;
r10 = r6 ? colors.clearLabelRedColor : colors.acceptLabelGreenColor;
object2['acceptLabelColor'] = r10;
r10 = r6 ? colors.clearLabelRedBackgroundColor : colors.acceptLabelGreenBackgroundColor;
object2['acceptLabelBackgroundColor'] = r10;
r9 = r6 ? 'Clear Treatment ' + experimentTreatmentFromEmbedURL : 'Apply Treatment ' + experimentTreatmentFromEmbedURL;
object2['acceptLabelText'] = r9;
object2['embedCanBeTapped'] = true;
object2['type'] = InviteTypes.GUILD;
return object2;
}
object2 = {};
copyDataProperties(object2, baseColors, id);
object2['headerText'] = 'EXPERIMENT';
object2['titleText'] = experimentFromEmbedURL;
object2['titleColor'] = colors.titleColor;
object2['subtitle'] = value7 != r9 ? 'Client Override Applied: Treatment ' + r9.variantId : 'Server Assignment: ' + experimentServerAssignmentLabel;
object2['subtitleColor'] = colors.subtitleColor;
object2['thumbnailUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(10569) /* metro dependency 10569 */);
object2['thumbnailBackgroundColor'] = colors.backgroundColor;
object2['acceptLabelColor'] = colors.acceptLabelGreenColor;
object2['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
object2['acceptLabelText'] = 'View Experiment Details';
object2['embedCanBeTapped'] = true;
}
const GUILD = InviteTypes.GUILD;
object2['type'] = GUILD;
return object2;
}
function _fun81496() { // fn#81496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:286, offset: 0x01ed16b1, size: 61 bytes, params: 1, frame: 13
var r0;
var value2;
var moduleValue;
if (experiment != null) {
value2 = environment.__proto__;
moduleValue = require(4113) /* metro dependency 4113: ExperimentDevToolsUtils */;
r0 = moduleValue.getExperimentVariantsForDevTools(experiment);
} else {
r0 = [];
}
return r0;
}
function _fun81497() { // fn#81497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:365, offset: 0x01ed16ee, size: 136 bytes, params: 1, frame: 13
if (experiment == null) {
return [];
}
const Map = global.Map;
const map = new Map();
env0_2.forEach(_fun81498);
map.forEach(_fun81499);
return [{'label': 'Clear Override', 'isDestructive': true, onPress: onPress_81501}];
}
function _fun81502() { // fn#81502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:782, offset: 0x01ed188a, size: 44 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('ExperimentOverrideSheet');
}
function _fun81499(a0) { // fn#81499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:463, offset: 0x01ed1794, size: 52 bytes, params: 2, frame: 13
const env0_0 = a0;
env0_1.push({label: a0.label, onPress: onPress_81500});
}
function onPress_81501() { // fn#81501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:646, offset: 0x01ed182e, size: 92 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('ExperimentOverrideSheet');
value = require(4106) /* metro dependency 4106: ExperimentManager */;
value.overrideBucket(experiment.system, id, null);
}
function onPress_81500() { // fn#81500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:489, offset: 0x01ed17c8, size: 102 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('ExperimentOverrideSheet');
value = require(4106) /* metro dependency 4106: ExperimentManager */;
value.overrideBucket(experiment.system, id, env0_0.id);
}
@@ -0,0 +1,268 @@
/* Metro module 10549; source: modules/messages/native/renderer/row_data/embeds/coded_links/GuildScheduledEventEmbed.tsx; dependencies: [57, 27, 4117, 1422, 1379, 1867, 3793, 1878, 9859, 1385, 4118, 8189, 8191, 9049, 9045, 9039, 9219, 1244, 8194, 9173, 8181, 697, 8096, 6622, 9042, 4805, 9121, 9036, 10550, 9037, 1418, 2] */
function _fun81328(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10735:6, offset: 0x01ecb120, size: 367 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = (require(27) /* metro dependency 27 */).processColor;
const guildScheduledEventStoreModule = require(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_5 = guildScheduledEventStoreModule.isGuildEventEnded;
const env0_6 = guildScheduledEventStoreModule.isGuildScheduledEventActive;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_8 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildIconSource;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_13 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
const env0_14 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_15 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
const env0_16 = {};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/GuildScheduledEventEmbed.tsx');
exports.createGuildScheduledEventInviteEmbed = createGuildScheduledEventInviteEmbed;
exports.createGuildScheduledEventLinkEmbed = createGuildScheduledEventLinkEmbed;
}
function createGuildScheduledEventEmbed({channel, guildEvent, userCount, guild, theme, type, recurrenceId}) { // fn#81329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10735:368, offset: 0x01ecb28f, size: 1756 bytes, params: 2, frame: 50
var object2;
var r22;
var r5;
var r20;
var r24;
var r25;
var r26;
var moduleValue8;
var value13;
var value14;
var acceptLabelGreenColor;
var value15;
var acceptLabelActiveBackgroundColor;
var assetUriForEmbed;
var acceptLabelDisabledTextColor;
var value19;
var moduleValue15;
const colors = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(theme).colors;
const id = channel?.id;
let r6 = guild != null ? getGuildIconSource(guild, 128, false) : undefined;
const r17 = r6 != null ? (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(r6) : undefined;
const isGuildEventInvitable2 = (require(9049) /* metro dependency 9049: useCanInviteForGuildEvent */).isGuildEventInvitable(guildEvent);
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(guildEvent);
const entity_type = guildEvent.entity_type;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const isInterestedInEventRecurrence2 = GuildScheduledEventStore.isInterestedInEventRecurrence(guildEvent.id,
recurrenceId);
const name2 = guildEvent.name;
const description = guildEvent.description;
const entity_type2 = guildEvent.entity_type;
const STAGE_INSTANCE = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
const eventSchedule = (require(9045) /* metro dependency 9045: useEventSchedule */).getEventSchedule(guildEvent,
recurrenceId);
const scheduleUtilsModule = require(9039) /* metro dependency 9039: ScheduleUtils */;
const getEventTimeData = scheduleUtilsModule.getEventTimeData;
const {color, icon, shouldChangeTextColor,
text} = (require(9219) /* metro dependency 9219: GuildScheduledEventHeaderUtils */).getGuildScheduledEventHeaderProps({eventTimeData: Reflect.apply(getEventTimeData,
scheduleUtilsModule, [eventSchedule == null ? undefined : eventSchedule.startTime.toISOString()]),
isStage: entity_type2 === STAGE_INSTANCE, theme: theme, event: guildEvent});
const value9 = guild != null;
object2 = {};
object2.titleColor = colors.titleColor;
object2.borderColor = colors.borderColor;
let backgroundColor = colors.backgroundColor;
object2.backgroundColor = backgroundColor;
object2.thumbnailCornerRadius = 15;
object2.embedCanBeTapped = value9;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const DlcqlU = t.DlcqlU;
const value10 = Reflect.apply(string, intl, [DlcqlU]);
const assetUriForEmbed2 = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8194) /* metro dependency 8194 */);
const assetUriForEmbed3 = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(9173) /* metro dependency 9173: Share */);
if (value9) {
if (isGuildScheduledEventActive2) {
acceptLabelActiveBackgroundColor = colors.acceptLabelActiveBackgroundColor;
r22 = entity_type === EXTERNAL ? intl.string(t.GoCQxU) : intl.string(t.IaYdtW);
acceptLabelGreenColor = colors.acceptLabelGreenColor;
value19 = false;
r5 = assetUriForEmbed3;
r6 = value19;
r20 = r22;
r24 = undefined;
r25 = acceptLabelGreenColor;
r26 = acceptLabelActiveBackgroundColor;
} else if (isInterestedInEventRecurrence2) {
backgroundColor = colors.backgroundColor;
assetUriForEmbed = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8096) /* metro dependency 8096 */);
acceptLabelDisabledTextColor = colors.acceptLabelDisabledTextColor;
r5 = assetUriForEmbed3;
r6 = isInterestedInEventRecurrence2;
r20 = value10;
r24 = assetUriForEmbed;
r25 = acceptLabelDisabledTextColor;
r26 = backgroundColor;
} else {
acceptLabelActiveBackgroundColor = colors.acceptLabelActiveBackgroundColor;
acceptLabelGreenColor = colors.acceptLabelGreenColor;
r5 = assetUriForEmbed3;
r6 = isInterestedInEventRecurrence2;
r20 = value10;
r24 = assetUriForEmbed2;
r25 = acceptLabelGreenColor;
r26 = acceptLabelActiveBackgroundColor;
}
} else {
moduleValue8 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
value13 = moduleValue8.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360);
value14 = intl.string(t.XpeFYr);
acceptLabelGreenColor = colors.acceptLabelGreenColor;
value15 = false;
r5 = undefined;
r6 = value15;
r20 = value14;
r24 = undefined;
r25 = acceptLabelGreenColor;
r26 = value13;
}
r5 = !isGuildEventInvitable2 ? undefined : r5;
let r18 = description != null ? (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseToAST(description,
true, {'channelId': null, 'allowLinks': true, 'allowEmojiLinks': true, 'allowHeading': true, 'allowList': true,
channelId: id}) : undefined;
const r14 = (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(guildEvent) ?? (channel != null ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel,
UserStore, RelationshipStore) : undefined);
const eventLocationIconSource = (require(9121) /* metro dependency 9121: GuildEventUtils */).getEventLocationIconSource(guildEvent,
channel, value9);
const user = UserStore.getUser(guildEvent.creator_id);
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventUserCounts(guildEvent.guild_id,
guildEvent.id, recurrenceId != null ? [recurrenceId] : []);
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventsForCurrentUser(guildEvent.guild_id);
const object4 = {};
copyDataProperties(object4, object2, undefined);
object4['acceptLabelBackgroundColor'] = r26;
object4['acceptLabelBorderColor'] = r6 ? colors.acceptLabelDisabledBorderColor : undefined;
object4['acceptLabelColor'] = r25;
object4['acceptLabelIcon'] = r24;
object4['acceptLabelText'] = r20;
object4['badgeCount'] = userCount?.toLocaleString();
object4['badgeIcon'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(10550) /* metro dependency 10550 */);
object4['channelIcon'] = eventLocationIconSource != null ? (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(eventLocationIconSource) : undefined;
object4['channelName'] = r14 ?? undefined;
object4['content'] = r18;
if (user != null) {
moduleValue15 = require(8191) /* metro dependency 8191: EmbedUtils */;
r18 = moduleValue15.getAssetUriForEmbed(user.getAvatarSource(guildEvent.guild_id));
} else {
r18 = undefined;
}
object4['creatorAvatar'] = r18;
const GUILD_SCHEDULED_EVENT = CodedLinkExtendedType.GUILD_SCHEDULED_EVENT;
object4['extendedType'] = GUILD_SCHEDULED_EVENT;
object4['guildIcon'] = r17;
object4['guildName'] = guild?.name;
object4['headerColor'] = processColor(color) ?? colors.headerColor;
object4['headerIcon'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(icon);
object4['headerText'] = text;
object4['headerTextColor'] = shouldChangeTextColor ? processColor(color) ?? colors.headerColor : colors.headerColor;
object4['isRsvped'] = r6;
object4['secondaryActionIcon'] = r5;
object4['titleText'] = name2;
object4['type'] = type;
object4['guildEventId'] = guildEvent.id;
return object4;
}
function createGuildScheduledEventInviteEmbed(a0, a1) { // fn#81330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10735:3131, offset: 0x01ecb96b, size: 363 bytes, params: 3, frame: 22
var r7;
var r0;
var defaultImport;
var createGuildScheduledEventEmbedBinding;
var object2;
var moduleValue;
var type;
const getChannel = ChannelStore.getChannel;
const channel = a0.channel;
const value2 = null;
const value3 = undefined;
const value4 = Reflect.apply(getChannel, ChannelStore, [value2 == channel ? value3 : channel.id]);
const guild_id = value2 == value4 ? value3 : value4.guild_id;
const getGuildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent;
let guild_scheduled_event = a0.guild_scheduled_event;
const value5 = Reflect.apply(getGuildScheduledEvent, GuildScheduledEventStore,
[value2 == guild_scheduled_event ? value3 : guild_scheduled_event.id]);
const getUserCount = GuildScheduledEventStore.getUserCount;
guild_scheduled_event = a0.guild_scheduled_event;
if (value2 == value5) {
if (value2 != guild_id) {
(importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */).fetchGuildEventsForGuild(guild_id);
r0 = value2;
} else {
r0 = value2;
}
} else {
if (value2 != guild_id) {
defaultImport = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
defaultImport.getGuildEventUserCounts(guild_id, value5.id, []);
}
createGuildScheduledEventEmbedBinding = createGuildScheduledEventEmbed;
object2 = {channel: value4, guildEvent: value5, userCount: Reflect.apply(getUserCount, GuildScheduledEventStore,
[value2 == guild_scheduled_event ? value3 : guild_scheduled_event.id, value2])};
if (value2 != a0.guild) {
moduleValue = require(1418) /* metro dependency 1418: GuildRecordUtils */;
r7 = moduleValue.fromInviteGuild(a0.guild);
} else {
r7 = GuildStore.getGuild(value2 == value4 ? value3 : value4.guild_id);
}
object2.guild = r7;
object2.theme = a1;
type = a0.type;
object2.type = value2 != type ? type : InviteTypes.GUILD;
r0 = createGuildScheduledEventEmbedBinding(object2);
}
return r0;
}
function createGuildScheduledEventLinkEmbed(a0, a1) { // fn#81331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10735:3775, offset: 0x01ecbad6, size: 417 bytes, params: 3, frame: 24
let value = a0.split('-');
const value3 = undefined;
value = env0_3(value, 3);
const property = value[0];
const r7 = value[2] ?? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(GuildScheduledEventStore.getGuildScheduledEvent(value[1])) ?? value3;
if (value == null) {
if (!env0_16[property]) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.fetchGuildEventsForGuild(property);
value = value.then(_fun81332);
value.catch(_fun81333);
env0_16[property] = true;
}
return null;
}
if (isGuildEventEnded(value)) {
if (!env0_16[property]) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.fetchGuildEventsForGuild(property);
value = value.then(_fun81332);
value.catch(_fun81333);
env0_16[property] = true;
}
return null;
}
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventUserCounts(property,
value.id, r7 != null ? [r7] : []);
const userCount = GuildScheduledEventStore.getUserCount(value.id, r7);
const createGuildScheduledEventEmbedBinding = createGuildScheduledEventEmbed;
const object2 = {};
object2.channel = ChannelStore.getChannel(value == null ? value3 : value.channel_id);
object2.guildEvent = value;
object2.userCount = userCount;
object2.guild = GuildStore.getGuild(property);
object2.theme = a1;
const GUILD = InviteTypes.GUILD;
object2.type = GUILD;
object2.recurrenceId = r7;
return createGuildScheduledEventEmbedBinding(object2);
}
function _fun81332() { // fn#81332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10735:4049, offset: 0x01ecbc77, size: 20 bytes, params: 1, frame: 2
return delete env1_16[env0_0];
}
@@ -0,0 +1,74 @@
/* Metro module 10554; source: modules/messages/native/renderer/row_data/embeds/coded_links/GuildTemplateEmbed.tsx; dependencies: [27, 7069, 6934, 4118, 8189, 1244, 8181, 697, 4002, 10528, 10529, 10555, 2] */
function _fun81352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10740:6, offset: 0x01ecd17f, size: 184 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const guildTemplateStore = importDefault(7069) /* metro dependency 7069: GuildTemplateStore */;
const env0_5 = (require(6934) /* metro dependency 6934: GuildTemplatesConstants */).GuildTemplateStates;
const env0_6 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/GuildTemplateEmbed.tsx');
exports.createGuildTemplateEmbed = createGuildTemplateEmbed;
}
function createGuildTemplateEmbed(a0, a1) { // fn#81353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10740:319, offset: 0x01ecd237, size: 959 bytes, params: 3, frame: 25
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var string;
var moduleValue;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1);
const guildTemplate = GuildTemplateStore.getGuildTemplate(a0);
if (guildTemplate == null) {
return null;
}
let state = guildTemplate.state;
const RESOLVING = GuildTemplateStates.RESOLVING;
if (state === RESOLVING) {
object2 = {};
object2.headerText = intl.string(t.Xj87Yf).toUpperCase();
object2.resolvingGradientEnd = colors.resolvingGradientEnd;
object2.resolvingGradientStart = colors.resolvingGradientStart;
object2.type = InviteTypes.GUILD;
copyDataProperties(object2, baseColors, undefined);
} else {
state = guildTemplate.state;
var EXPIRED = GuildTemplateStates.EXPIRED;
if (state === EXPIRED) {
object2 = {};
copyDataProperties(object2, baseColors, undefined);
string = intl.string;
object2['headerText'] = Reflect.apply(string, intl, [t.C7ZRNw]).toUpperCase();
moduleValue = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object2['titleColor'] = moduleValue.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
string = intl.string;
object2['titleText'] = Reflect.apply(string, intl, [t.A6MwXE]);
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['type'] = InviteTypes.GUILD;
return object2;
}
var formatToPlainString = intl.formatToPlainString;
var L8Awgh = t.L8Awgh;
object2 = {};
var usageCount = guildTemplate.usageCount;
object2.usageCount = usageCount.toString();
var value4 = Reflect.apply(formatToPlainString, intl, [L8Awgh, object2]);
object2 = {};
copyDataProperties(object2, baseColors, usageCount);
object2['headerText'] = intl.string(t.kAvFkO).toUpperCase();
object2['headerColor'] = colors.headerColor;
object2['titleText'] = guildTemplate.name;
object2['titleColor'] = colors.titleColor;
object2['subtitle'] = value4;
object2['subtitleColor'] = colors.subtitleColor;
object2['thumbnailUrl'] = Image.resolveAssetSource(importDefault(10555) /* metro dependency 10555 */).uri;
object2['acceptLabelColor'] = colors.acceptLabelGreenColor;
object2['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
object2['acceptLabelText'] = intl.string(t['a3Gl+e']);
object2['embedCanBeTapped'] = true;
object2['type'] = InviteTypes.GUILD;
}
return object2;
}
@@ -0,0 +1,113 @@
/* Metro module 10542; source: modules/messages/native/renderer/row_data/embeds/coded_links/InviteEmbed.tsx; dependencies: [4097, 1878, 661, 4118, 10543, 4116, 10547, 10548, 10549, 10551, 10553, 9856, 9857, 2] */
function _fun81309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10728:6, offset: 0x01ec8a47, size: 184 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.InviteStates;
const env0_5 = constantsModule.AbortCodes;
const env0_6 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/InviteEmbed.tsx');
exports.createInviteEmbed = createInviteEmbed;
}
function createInviteEmbed(a0, a1, a2) { // fn#81310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10728:311, offset: 0x01ec8aff, size: 992 bytes, params: 4, frame: 25
var r2;
var guild;
var moduleValue3;
var voiceChannelListInviteEmbed;
var inviteError;
var value;
const invite = InviteStore.getInvite(a1);
if (invite == null) {
return null;
}
const currentUser = UserStore.getCurrentUser();
const value4 = undefined;
let id = currentUser == null ? value4 : currentUser.id;
const value5 = id === a0.author.id;
let state = invite.state;
const RESOLVING = InviteStates.RESOLVING;
if (state === RESOLVING) {
return (require(10543) /* metro dependency 10543: GuildInvite */).createResolvingGuildInvite(a2);
}
state = invite.state;
const EXPIRED = InviteStates.EXPIRED;
if (state === EXPIRED) {
return (require(10543) /* metro dependency 10543: GuildInvite */).createExpiredGuildInvite(a0, value5, a2);
}
state = invite.state;
const BANNED = InviteStates.BANNED;
if (state === BANNED) {
return (require(10543) /* metro dependency 10543: GuildInvite */).createExpiredGuildInvite(a0, value5, a2);
}
state = invite.state;
const ERROR = InviteStates.ERROR;
if (state === ERROR) {
inviteError = InviteStore.getInviteError(a1);
if (inviteError == null) {
value = require(10543) /* metro dependency 10543: GuildInvite */;
value = value.createErroredGuildInvite(a1, value5, a2);
r2 = value;
} else if (inviteError.code === AbortCodes.INVITES_DISABLED) {
value = require(10543) /* metro dependency 10543: GuildInvite */;
value = value.createDisabledGuildInvite(invite, a2);
r2 = value;
} else {
value = require(10543) /* metro dependency 10543: GuildInvite */;
value = value.createErroredGuildInvite(a1, value5, a2);
r2 = value;
}
return r2;
}
const inviteType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getInviteType(invite);
const GROUP_DM = InviteTypes.GROUP_DM;
if (GROUP_DM === inviteType) {
return (require(10547) /* metro dependency 10547: GroupDMInvite */).createGroupDMInvite(invite, value5, a2);
}
const FRIEND = InviteTypes.FRIEND;
if (FRIEND === inviteType) {
return (require(10548) /* metro dependency 10548: FriendInvite */).createFriendInvite(invite, value5, id, a2);
}
const guildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getGuildInviteExtendedType(invite);
const GuildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).GuildInviteExtendedType;
const EVENT = GuildInviteExtendedType.EVENT;
if (EVENT === guildInviteExtendedType) {
return (require(10549) /* metro dependency 10549: GuildScheduledEventEmbed */).createGuildScheduledEventInviteEmbed(invite,
a2);
}
const APPLICATION = GuildInviteExtendedType.APPLICATION;
if (APPLICATION === guildInviteExtendedType) {
return (require(10551) /* metro dependency 10551: EmbeddedActivityInviteEmbed */).createEmbeddedActivityInviteEmbed({inviteCode: invite.code,
theme: a2});
}
const PROFILE = GuildInviteExtendedType.PROFILE;
if (PROFILE === guildInviteExtendedType) {
return (require(10553) /* metro dependency 10553: GuildProfileInvite */).createGuildProfileInvite(invite, a2);
}
const VOICE_CHANNEL = GuildInviteExtendedType.VOICE_CHANNEL;
if (VOICE_CHANNEL === guildInviteExtendedType) {
guild = invite.guild;
id = guild == null ? value4 : guild.id;
if (id == null) {
return (require(10543) /* metro dependency 10543: GuildInvite */).createGuildInvite(invite, value5, a2);
}
moduleValue3 = require(9856) /* metro dependency 9856: VoiceChannelListInviteExperiment */;
if (moduleValue3.getVoiceChannelListInviteExperiment({guildId: id, location: 'mobile_invite_embed'}).enabled) {
voiceChannelListInviteEmbed = (require(9857) /* metro dependency 9857: VoiceChannelListInviteEmbed */).createVoiceChannelListInviteEmbed(invite,
a2);
if (voiceChannelListInviteEmbed != null) {
return voiceChannelListInviteEmbed;
}
return (require(10543) /* metro dependency 10543: GuildInvite */).createGuildInvite(invite, value5, a2);
}
}
return (require(10543) /* metro dependency 10543: GuildInvite */).createGuildInvite(invite, value5, a2);
}
@@ -0,0 +1,107 @@
/* Metro module 10562; source: modules/messages/native/renderer/row_data/embeds/coded_links/VoiceChannelLinkEmbed.tsx; dependencies: [57, 27, 1422, 1379, 1867, 3784, 3793, 1878, 661, 4118, 8189, 1423, 477, 1244, 6647, 4805, 2] */
function _fun81440(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10748:6, offset: 0x01ecf9f7, size: 286 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = (require(27) /* metro dependency 27 */).Image;
const env0_5 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildAcronym;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).Permissions;
const env0_12 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/VoiceChannelLinkEmbed.tsx');
exports.createVoiceChannelLinkEmbed = createVoiceChannelLinkEmbed;
}
function createVoiceChannelLinkEmbed(a0, a1) { // fn#81441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10748:393, offset: 0x01ecfb15, size: 893 bytes, params: 3, frame: 25
var r6;
var r5;
var value5;
var colors;
var baseColors;
var object2;
var moduleValue;
var isGuildStageVoice2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var resolveAssetSource;
var moduleValue2;
var assetSource;
let value = a0.split('/');
const value3 = undefined;
value = env0_3(value, 2);
const property = value[0];
value = ChannelStore.getChannel(value[1]);
const guild = GuildStore.getGuild(property);
if (value != null) {
if (value.isGuildVocal()) {
if (guild == null) {
return null;
}
if (PermissionStore.can(Permissions.VIEW_CHANNEL, value)) {
if (PermissionStore.can(Permissions.CONNECT, value)) {
value5 = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1);
colors = value5.colors;
baseColors = value5.baseColors;
if ((guild == null ? value3 : guild.icon) != null) {
r5 = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guild == null ? value3 : guild.id,
icon: guild == null ? value3 : guild.icon, canAnimate: true, size: 128});
r6 = value3;
} else {
r6 = guild != null ? getGuildAcronym(guild) : value3;
r5 = value3;
}
object2 = {};
copyDataProperties(object2, baseColors, undefined);
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
object2['headerText'] = moduleValue.isAndroid() ? '' : value3;
object2['headerColor'] = colors.headerColor;
isGuildStageVoice2 = value.isGuildStageVoice();
string = intl.string;
object2['acceptLabelText'] = isGuildStageVoice2 ? Reflect.apply(string, intl,
[t['7vb2cc']]) : Reflect.apply(string,
intl, [t.gpqgah]);
object2['onlineText'] = value3;
object2['memberText'] = value3;
resolveAssetSource = Image.resolveAssetSource;
moduleValue2 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue2.getChannelIcon(value)]);
object2['channelIcon'] = assetSource == null ? value3 : assetSource.uri;
value = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value,
UserStore,
RelationshipStore);
object2['titleText'] = value;
object2['titleColor'] = colors.titleColor;
object2['thumbnailUrl'] = r5 ?? value3;
object2['thumbnailText'] = r6;
object2['subtitleColor'] = value3;
object2['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
object2['acceptLabelBorderColor'] = value3;
object2['acceptLabelColor'] = colors.acceptLabelGreenColor;
object2['embedCanBeTapped'] = true;
object2['canBeAccepted'] = false;
value = intl.formatToPlainString(t['2wimj5'], {guildName: guild.name});
object2['channelName'] = value;
object2['subtitle'] = '';
object2['type'] = InviteTypes.GUILD;
object2['inviteSplash'] = value3;
return object2;
}
return null;
}
return null;
}
}
return null;
}
@@ -0,0 +1,101 @@
/* Metro module 10548; source: modules/messages/native/renderer/row_data/embeds/coded_links/invite/FriendInvite.tsx; dependencies: [27, 3793, 4118, 8189, 1244, 3995, 1423, 2] */
function _fun81326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10734:6, offset: 0x01ecad51, size: 162 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).Image;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_5 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/invite/FriendInvite.tsx');
exports.createFriendInvite = createFriendInvite_81327;
}
function createFriendInvite_81327(a0, a1, a2, a3) { // fn#81327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10734:283, offset: 0x01ecadf3, size: 813 bytes, params: 5, frame: 31
var r10;
var r9;
var r7;
var r8;
var r14;
var defaultImport2;
var resolveAssetSource;
var defaultImport3;
var acceptLabelGreenColor;
var acceptLabelGreenBackgroundColor;
var value9;
var value11;
var acceptLabelDisabledColor;
var acceptLabelDisabledBackgroundColor;
var value13;
const value2 = undefined;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a3);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r16 = a1 ? Reflect.apply(string, intl, [t.eQyu1F]) : Reflect.apply(string, intl, [t.PYJHW6]);
let inviter = a0.inviter;
const value6 = '';
const r13 = inviter != null ? a0.inviter.username : value6;
if (a0.inviter != null) {
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r10 = defaultImport2.getUserTag(a0.inviter);
} else {
r10 = value6;
}
let r6 = a0.inviter != null && RelationshipStore.isFriend(a0.inviter == null ? value2 : a0.inviter.id);
if (a0.inviter != null) {
resolveAssetSource = Image.resolveAssetSource;
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r9 = Reflect.apply(resolveAssetSource, Image, [defaultImport3.getUserAvatarSource(a0.inviter)]).uri;
} else {
r9 = value6;
}
inviter = a0.inviter;
if ((inviter == null ? value2 : inviter.id) === a2) {
acceptLabelDisabledColor = colors.acceptLabelDisabledColor;
acceptLabelDisabledBackgroundColor = colors.acceptLabelDisabledBackgroundColor;
value13 = intl.string(t.ib7Ng1);
r6 = false;
r7 = acceptLabelDisabledColor;
r8 = acceptLabelDisabledBackgroundColor;
r14 = value13;
} else {
acceptLabelGreenColor = colors.acceptLabelGreenColor;
acceptLabelGreenBackgroundColor = colors.acceptLabelGreenBackgroundColor;
string = intl.string;
if (r6) {
value11 = Reflect.apply(string, intl, [t.xhxnPn]);
r6 = true;
r7 = acceptLabelGreenColor;
r8 = acceptLabelGreenBackgroundColor;
r14 = value11;
} else {
value9 = Reflect.apply(string, intl, [t.ib7Ng1]);
r6 = true;
r7 = acceptLabelGreenColor;
r8 = acceptLabelGreenBackgroundColor;
r14 = value9;
}
}
const object2 = {};
copyDataProperties(object2, baseColors, 4);
object2['thumbnailCornerRadius'] = 25;
object2['headerText'] = r16 != null ? r16.toUpperCase() : value2;
object2['headerColor'] = colors.headerColor;
object2['acceptLabelText'] = r14;
object2['channelIcon'] = value2;
object2['titleText'] = r13;
object2['titleColor'] = colors.titleColor;
object2['thumbnailUrl'] = r9 ?? value2;
object2['subtitle'] = r10;
object2['subtitleColor'] = value6 === r10 ? value2 : colors.subtitleColor;
object2['acceptLabelBackgroundColor'] = r8;
object2['acceptLabelBorderColor'] = value2;
object2['acceptLabelColor'] = r7;
object2['embedCanBeTapped'] = false;
object2['canBeAccepted'] = r6;
const channel = a0.channel;
object2['channelName'] = (channel == null ? value2 : channel.name) ?? value2;
object2['type'] = a0.type ?? InviteTypes.FRIEND;
return object2;
}
@@ -0,0 +1,106 @@
/* Metro module 10547; source: modules/messages/native/renderer/row_data/embeds/coded_links/invite/GroupDMInvite.tsx; dependencies: [1379, 3793, 1878, 4118, 8189, 9860, 1244, 10254, 1426, 4805, 2] */
function _fun81323(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10733:6, offset: 0x01eca880, size: 172 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/invite/GroupDMInvite.tsx');
exports.createGroupDMInvite = createGroupDMInvite;
}
function createGroupDMInvite(a0, a1, a2) { // fn#81324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10733:290, offset: 0x01eca92c, size: 1061 bytes, params: 4, frame: 33
var r6;
var r9;
var uri;
var r11;
var r15;
var moduleValue2;
var acceptLabelGreenColor;
var acceptLabelGreenBackgroundColor;
var value16;
var acceptLabelDisabledColor;
var acceptLabelDisabledBackgroundColor;
var value17;
const value2 = undefined;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a2);
const {channel,
recipients_} = (importDefault(9860) /* metro dependency 9860: getChannelAndRecipientsFromInvite */)(a0);
const value5 = null;
const channel2 = ChannelStore.getChannel(value5 == channel ? value2 : channel.id);
const value7 = false;
if (value5 != channel2) {
r6 = true;
r9 = channel2;
} else {
r6 = value7;
r9 = channel;
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = a1 ? Reflect.apply(string, intl, [t.qmtuXE]) : Reflect.apply(string, intl, [t['3p3/BK']]);
string = intl.string;
if (r6) {
Reflect.apply(string, intl, [t.cEnaWx]);
} else {
Reflect.apply(string, intl, [t.XpeFYr]);
}
const r14 = recipients_.length > 0 ? intl.formatToPlainString(t.zRl6XR, {count: recipients_.length}) : value2;
let r10 = value5 != r9 ? (require(10254) /* metro dependency 10254: getChannelIcon */).getChannelIconSource(r9) : value5;
if (value5 != r10) {
moduleValue2 = require(1426) /* metro dependency 1426: AvatarUtils */;
uri = moduleValue2.ensureAvatarSource(r10).uri;
} else {
uri = value5;
}
let r4 = r6 && value5 != r9 ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(r9,
UserStore, RelationshipStore) : value5;
r4 = !r4 ? value5 == a0.channel ? value2 : a0.channel.name : r4;
r4 = !r4 ? recipients_.map(function(a0) {
return a0.username;
}).join(', ') : r4;
r4 = !r4 ? intl.string(t.LJpTRF) : r4;
if (r6) {
acceptLabelDisabledColor = colors.acceptLabelDisabledColor;
acceptLabelDisabledBackgroundColor = colors.acceptLabelDisabledBackgroundColor;
value17 = intl.string(t.cEnaWx);
r10 = acceptLabelDisabledColor;
r11 = acceptLabelDisabledBackgroundColor;
r15 = value17;
} else {
acceptLabelGreenColor = colors.acceptLabelGreenColor;
acceptLabelGreenBackgroundColor = colors.acceptLabelGreenBackgroundColor;
value16 = intl.string(t.XpeFYr);
r10 = acceptLabelGreenColor;
r11 = acceptLabelGreenBackgroundColor;
r15 = value16;
}
const object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = value5 != r17 ? r17.toUpperCase() : value2;
object2['headerColor'] = colors.headerColor;
object2['acceptLabelText'] = r15;
object2['onlineText'] = value2;
object2['memberText'] = r14;
object2['channelIcon'] = value2;
object2['titleText'] = r4;
object2['titleColor'] = colors.titleColor;
object2['thumbnailUrl'] = value5 != uri ? uri : value2;
object2['thumbnailText'] = value2;
object2['subtitle'] = '';
object2['subtitleColor'] = value2;
object2['acceptLabelBackgroundColor'] = r11;
object2['acceptLabelBorderColor'] = value2;
object2['acceptLabelColor'] = r10;
object2['embedCanBeTapped'] = true;
object2['canBeAccepted'] = value7;
object2['channelName'] = r6 ? value5 == r9 ? r4 : (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(r9,
UserStore, RelationshipStore) : r4;
const type = a0.type;
object2['type'] = value5 != type ? type : InviteTypes.GROUP_DM;
return object2;
}
@@ -0,0 +1,704 @@
/* Metro module 10543; source: modules/messages/native/renderer/row_data/embeds/coded_links/invite/GuildInvite.tsx; dependencies: [27, 1422, 4492, 1379, 1945, 1867, 4097, 3793, 1878, 9859, 661, 4118, 8189, 1244, 8181, 697, 3995, 4002, 10528, 10529, 1418, 1948, 8191, 10544, 10545, 9861, 9860, 10546, 1391, 8898, 1423, 1852, 6647, 6916, 4805, 2] */
function _fun81311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10729:6, offset: 0x01ec8edf, size: 416 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).Image;
let value = require(1422) /* metro dependency 1422: GuildRecord */;
const env0_4 = value.getGuildIconURL;
const env0_5 = value.getGuildAcronym;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_13 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
value = require(661) /* metro dependency 661: Constants */;
const env0_14 = value.HelpdeskArticles;
const env0_15 = value.ChannelTypes;
const env0_16 = value.GuildFeatures;
value = require(4118) /* metro dependency 4118: Constants */;
const env0_17 = value.InviteTargetTypes;
const env0_18 = value.InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/invite/GuildInvite.tsx');
exports.createResolvingGuildInvite = createResolvingGuildInvite;
exports.createExpiredGuildInvite = createExpiredGuildInvite;
exports.createDisabledGuildInvite = createDisabledGuildInvite;
exports.createErroredGuildInvite = createErroredGuildInvite;
exports.createGuildInvite = createGuildInvite;
}
function createResolvingGuildInvite(a0) { // fn#81312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10729:527, offset: 0x01ec907f, size: 159 bytes, params: 2, frame: 19
const {colors, baseColors} = importDefault(dependencyMap[12])(a0);
const object2 = {};
const intl = require(dependencyMap[13]).intl;
object2.headerText = intl.string(require(dependencyMap[13]).t['N/g9Z4']).toUpperCase();
object2.resolvingGradientEnd = colors.resolvingGradientEnd;
object2.resolvingGradientStart = colors.resolvingGradientStart;
const GUILD = InviteTypes.GUILD;
object2.type = GUILD;
copyDataProperties(object2, baseColors, dependencyMap);
return object2;
}
function createExpiredGuildInvite(a0, a1, a2) { // fn#81313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10729:824, offset: 0x01ec911e, size: 666 bytes, params: 4, frame: 24
var r5;
var author;
var formatToPlainString;
var property;
var defaultImport;
const value2 = undefined;
const value3 = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a2);
const colors = value3.colors;
const object2 = {};
copyDataProperties(object2, value3.baseColors, undefined);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2['headerText'] = (a1 ? Reflect.apply(string, intl, [t.C89OLE]) : Reflect.apply(string, intl,
[t.YVub5y])).toUpperCase();
const rowGeneratorStyleSheetModule = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
const processColorOrThrow = rowGeneratorStyleSheetModule.processColorOrThrow;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2['titleColor'] = Reflect.apply(processColorOrThrow, rowGeneratorStyleSheetModule, [RED_400]);
if (a1) {
r5 = intl.string(t['F/OLvL']);
} else {
author = a0.author;
if ((author == null ? value2 : author.username) != null) {
formatToPlainString = intl.formatToPlainString;
property = t['9Akp1s'];
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
r5 = Reflect.apply(formatToPlainString, intl, [property,
{username: defaultImport.getFormattedName(a0.author)}]);
} else {
r5 = intl.string(t['SMJr+a']);
}
}
object2['subtitle'] = r5;
object2['titleText'] = intl.string(t['Jhx/ud']);
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a2) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['subtitleColor'] = colors.subtitleColor;
const GUILD = InviteTypes.GUILD;
object2['type'] = GUILD;
return object2;
}
function createDisabledGuildInvite(a0, a1) { // fn#81314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10729:1607, offset: 0x01ec93b8, size: 809 bytes, params: 3, frame: 23
var r6;
var getGuild;
var getChannel;
var channel;
var value4;
var moduleValue;
const value2 = undefined;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1);
if (a0.guild != null) {
moduleValue = require(1418) /* metro dependency 1418: GuildRecordUtils */;
r6 = moduleValue.fromInviteGuild(a0.guild);
} else {
getGuild = GuildStore.getGuild;
getChannel = ChannelStore.getChannel;
channel = a0.channel;
value4 = Reflect.apply(getChannel, ChannelStore, [channel == null ? value2 : channel.id]);
r6 = Reflect.apply(getGuild, GuildStore, [value4 == null ? value2 : value4.guild_id]);
}
let r4 = r6 != null ? getGuildIconURL(r6, 48, false) : value2;
const object2 = {};
copyDataProperties(object2, baseColors, undefined);
const GUILD_INVITE_DISABLED = CodedLinkExtendedType.GUILD_INVITE_DISABLED;
object2['extendedType'] = GUILD_INVITE_DISABLED;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2['headerText'] = Reflect.apply(string, intl, [t['Hyx2F/']]).toUpperCase();
object2['titleText'] = intl.string(t.tQ4AnN);
const rowGeneratorStyleSheetModule = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
const processColorOrThrow = rowGeneratorStyleSheetModule.processColorOrThrow;
const RED_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_345;
object2['titleColor'] = Reflect.apply(processColorOrThrow, rowGeneratorStyleSheetModule, [RED_345]);
object2['guildName'] = (r6 == null ? value2 : r6.name) ?? intl.string(t.wBceYP);
object2['subtitle'] = intl.string(t['x+XpjL']);
object2['helpCenterArticleLabel'] = intl.string(t['4FlZqw']);
const defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport2.getArticleURL;
const INVITE_DISABLED = HelpdeskArticles.INVITE_DISABLED;
object2['helpCenterArticleURL'] = Reflect.apply(getArticleURL, defaultImport2, [INVITE_DISABLED]);
object2['guildIcon'] = r4 ?? value2;
object2['thumbnailUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(10544) /* metro dependency 10544 */);
r4 = r4 != null ? value2 : r6 != null ? getGuildAcronym(r6) : value2;
object2['thumbnailText'] = r4;
object2['subtitleColor'] = colors.subtitleColor;
const GUILD = InviteTypes.GUILD;
object2['type'] = GUILD;
return object2;
}
function createErroredGuildInvite(a0, a1, a2) { // fn#81315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10729:2568, offset: 0x01ec96e1, size: 548 bytes, params: 4, frame: 23
const value2 = undefined;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a2);
const inviteError = InviteStore.getInviteError(a0);
const descriptiveInviteError = (require(10545) /* metro dependency 10545: InviteErrorUtils */).getDescriptiveInviteError(inviteError == null ? value2 : inviteError.code);
const object2 = {};
copyDataProperties(object2, baseColors, undefined);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2['headerText'] = (a1 ? Reflect.apply(string, intl, [t.C89OLE]) : Reflect.apply(string, intl,
[t.YVub5y])).toUpperCase();
const rowGeneratorStyleSheetModule = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
const processColorOrThrow = rowGeneratorStyleSheetModule.processColorOrThrow;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2['titleColor'] = Reflect.apply(processColorOrThrow, rowGeneratorStyleSheetModule, [RED_400]);
object2['subtitle'] = (descriptiveInviteError == null ? value2 : descriptiveInviteError.description) ?? (inviteError == null ? value2 : inviteError.message);
object2['titleText'] = (descriptiveInviteError == null ? value2 : descriptiveInviteError.title) ?? intl.string(t['Jhx/ud']);
object2['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a2) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object2['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object2['subtitleColor'] = colors.subtitleColor;
const GUILD = InviteTypes.GUILD;
object2['type'] = GUILD;
return object2;
}
function createGuildInvite(a0, a1, a2) { // fn#81316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10729:3296, offset: 0x01ec9905, size: 2189 bytes, params: 4, frame: 49
var object2;
var r21;
var r26;
var r27;
var r6;
var uri;
var r13;
var r17;
var r18;
var r19;
var r20;
var r10;
var r11;
var r2;
var moduleValue;
var value12;
var guildIconURL;
var defaultImport3;
var getGuildSplashURL;
var value21;
var value22;
var resolveAssetSource;
var moduleValue4;
var assetSource;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value23;
var value24;
var value25;
var moduleValue5;
var assetSource2;
var value26;
var moduleValue6;
var assetSource3;
var value27;
var defaultImport4;
var QmlLEq;
var value28;
var value29;
var acceptLabelGreenColor;
var acceptLabelGreenBackgroundColor;
var string;
var value31;
var acceptLabelDisabledColor;
var acceptLabelDisabledBackgroundColor;
var value32;
var value;
const value2 = undefined;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a2);
const guild = a0.guild;
const value4 = null;
let r24 = value4 != guild ? GuildStore.getGuild(a0.guild.id) : value4;
const canAcceptInvite2 = (importDefault(9861) /* metro dependency 9861: GuestUtils */).canAcceptInvite([GuildMemberStore],
a0);
const channel = (importDefault(9860) /* metro dependency 9860: getChannelAndRecipientsFromInvite */)(a0).channel;
let r4 = value4 != channel && channel.isGuildVocal();
let r0 = value4 == channel ? value2 : channel.isGuildStageVoice();
let r22 = value4 != r0 && r0;
const target_user = a0.target_user;
const target_type = a0.target_type;
const approximate_member_count = a0.approximate_member_count;
const approximate_presence_count = a0.approximate_presence_count;
const STREAM = InviteTargetTypes.STREAM;
const value8 = target_type === STREAM;
r0 = value4 != a0.guild && value4 == r24;
const value11 = true;
if (r0) {
moduleValue = require(1418) /* metro dependency 1418: GuildRecordUtils */;
value12 = moduleValue.fromInviteGuild(a0.guild);
r21 = false;
r24 = value12;
} else {
r21 = value11;
}
const getHeaderTextForInviteModule = require(10546) /* metro dependency 10546: getHeaderTextForInvite */;
const getHeaderTextForInvite = getHeaderTextForInviteModule.getHeaderTextForInvite;
object2 = {isVoiceChannel: r4, isOwnInvite: a1};
let r15 = value4 == r24 ? value2 : r24.features.has(GuildFeatures.HUB);
let r14 = value4 != r15 && r15;
object2.isHubGuild = r14;
object2.isStream = value8;
object2.isStage = r22;
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const flags = a0.flags;
const value16 = 0;
r15 = value4 != flags ? flags : value16;
const GuildInviteFlags = (require(8898) /* metro dependency 8898: GuildInviteFlags */).GuildInviteFlags;
const IS_GUEST_INVITE = GuildInviteFlags.IS_GUEST_INVITE;
object2.isGuest = Reflect.apply(hasFlag, flagUtilsModule, [r15, IS_GUEST_INVITE]);
const value17 = Reflect.apply(getHeaderTextForInvite, getHeaderTextForInviteModule, [object2]);
const name = value4 == r24 ? value2 : r24.name;
if (value4 != (value4 == r24 ? value2 : r24.icon)) {
guildIconURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: value4 == r24 ? value2 : r24.id,
icon: value4 == r24 ? value2 : r24.icon, canAnimate: value11, size: 128});
r26 = value2;
r27 = guildIconURL;
} else {
r26 = value4 != r24 ? getGuildAcronym(r24) : value2;
r27 = value2;
}
if (value4 != (value4 == r24 ? value2 : r24.splash)) {
defaultImport3 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGuildSplashURL = defaultImport3.getGuildSplashURL;
object2 = {};
object2.id = r24.id;
object2.splash = r24.splash;
object2.size = 400 * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
value21 = Reflect.apply(getGuildSplashURL, defaultImport3, [object2]);
r6 = value4 != value21 ? value21 : value2;
} else {
r6 = value2;
}
if (r4) {
if (r21) {
if (value4 == target_user) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue6 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource3 = Reflect.apply(resolveAssetSource, Image, [moduleValue6.getChannelIcon(channel)]);
uri = value4 == assetSource3 ? value2 : assetSource3.uri;
value27 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value27;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else if (value8) {
resolveAssetSource = Image.resolveAssetSource;
defaultImport4 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
uri = Reflect.apply(resolveAssetSource, Image, [defaultImport4.getUserAvatarSource(target_user)]).uri;
formatToPlainString = intl.formatToPlainString;
QmlLEq = t.QmlLEq;
object2 = {};
object2.name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getFormattedName(target_user);
value28 = Reflect.apply(formatToPlainString, intl, [QmlLEq, object2]);
value29 = intl.formatToPlainString(t.u0vaDE, {guildName: value4 == r24 ? value2 : r24.name});
r0 = value4 != ApplicationStreamingStore.getActiveStreamForUser(target_user.id, channel.getGuildId());
r13 = uri;
r14 = value2;
r15 = value29;
r17 = value28;
r18 = value2;
r19 = value2;
r20 = value2;
} else {
resolveAssetSource = Image.resolveAssetSource;
moduleValue6 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource3 = Reflect.apply(resolveAssetSource, Image, [moduleValue6.getChannelIcon(channel)]);
uri = value4 == assetSource3 ? value2 : assetSource3.uri;
value27 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value27;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
}
} else {
resolveAssetSource = Image.resolveAssetSource;
moduleValue6 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource3 = Reflect.apply(resolveAssetSource, Image, [moduleValue6.getChannelIcon(channel)]);
uri = value4 == assetSource3 ? value2 : assetSource3.uri;
value27 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value27;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
}
} else if (value4 == channel) {
if (value4 == approximate_member_count) {
if (value4 == approximate_presence_count) {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
} else if (approximate_presence_count > value16) {
value23 = intl.formatToPlainString(t['LC+S+m'], {membersOnline: approximate_presence_count});
value24 = intl.formatToPlainString(t.zRl6XR,
{count: value4 != approximate_member_count ? approximate_member_count : value16});
value25 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value25;
r17 = name;
r18 = value2;
r19 = value24;
r20 = value23;
} else {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
}
} else if (approximate_member_count >= 5) {
value23 = intl.formatToPlainString(t['LC+S+m'], {membersOnline: approximate_presence_count});
value24 = intl.formatToPlainString(t.zRl6XR,
{count: value4 != approximate_member_count ? approximate_member_count : value16});
value25 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value25;
r17 = name;
r18 = value2;
r19 = value24;
r20 = value23;
} else if (value4 == approximate_presence_count) {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
} else if (approximate_presence_count > value16) {
value23 = intl.formatToPlainString(t['LC+S+m'], {membersOnline: approximate_presence_count});
value24 = intl.formatToPlainString(t.zRl6XR,
{count: value4 != approximate_member_count ? approximate_member_count : value16});
value25 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value25;
r17 = name;
r18 = value2;
r19 = value24;
r20 = value23;
} else {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
}
} else if (channel.type === ChannelTypes.GUILD_STAGE_VOICE) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue5 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource2 = Reflect.apply(resolveAssetSource, Image, [moduleValue5.getChannelIcon(channel)]);
uri = value4 == assetSource2 ? value2 : assetSource2.uri;
value26 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value26;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else if (value4 == approximate_member_count) {
if (value4 == approximate_presence_count) {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
} else if (approximate_presence_count > value16) {
value23 = intl.formatToPlainString(t['LC+S+m'], {membersOnline: approximate_presence_count});
value24 = intl.formatToPlainString(t.zRl6XR,
{count: value4 != approximate_member_count ? approximate_member_count : value16});
value25 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value25;
r17 = name;
r18 = value2;
r19 = value24;
r20 = value23;
} else {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
}
} else if (approximate_member_count >= 5) {
value23 = intl.formatToPlainString(t['LC+S+m'], {membersOnline: approximate_presence_count});
value24 = intl.formatToPlainString(t.zRl6XR,
{count: value4 != approximate_member_count ? approximate_member_count : value16});
value25 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value25;
r17 = name;
r18 = value2;
r19 = value24;
r20 = value23;
} else if (value4 == approximate_presence_count) {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
} else if (approximate_presence_count > value16) {
value23 = intl.formatToPlainString(t['LC+S+m'], {membersOnline: approximate_presence_count});
value24 = intl.formatToPlainString(t.zRl6XR,
{count: value4 != approximate_member_count ? approximate_member_count : value16});
value25 = '';
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value25;
r17 = name;
r18 = value2;
r19 = value24;
r20 = value23;
} else {
value22 = '';
if (value4 != channel) {
resolveAssetSource = Image.resolveAssetSource;
moduleValue4 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue4.getChannelIcon(channel)]);
uri = value4 == assetSource ? value2 : assetSource.uri;
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = uri;
r19 = value2;
r20 = value2;
} else {
r0 = r21;
r13 = r27;
r14 = r26;
r15 = value22;
r17 = name;
r18 = value2;
r19 = value2;
r20 = value2;
}
}
if (r4) {
acceptLabelGreenColor = colors.acceptLabelGreenColor;
acceptLabelGreenBackgroundColor = colors.acceptLabelGreenBackgroundColor;
string = intl.string;
r22 = r22 ? Reflect.apply(string, intl, [t['7vb2cc']]) : Reflect.apply(string, intl, [t.gpqgah]);
r10 = acceptLabelGreenColor;
r11 = acceptLabelGreenBackgroundColor;
r21 = r22;
} else if (r0) {
acceptLabelDisabledColor = colors.acceptLabelDisabledColor;
acceptLabelDisabledBackgroundColor = colors.acceptLabelDisabledBackgroundColor;
value32 = intl.string(t.cEnaWx);
r10 = acceptLabelDisabledColor;
r11 = acceptLabelDisabledBackgroundColor;
r21 = value32;
} else {
acceptLabelGreenColor = colors.acceptLabelGreenColor;
acceptLabelGreenBackgroundColor = colors.acceptLabelGreenBackgroundColor;
value31 = intl.string(t.XpeFYr);
r10 = acceptLabelGreenColor;
r11 = acceptLabelGreenBackgroundColor;
r21 = value31;
}
r4 = value4 != r24 ? (require(6916) /* metro dependency 6916: GuildBadgeImageSource */).getGuildBadgeImageSource(r24,
a2) : value2;
object2 = {};
copyDataProperties(object2, baseColors, undefined);
object2['headerText'] = value4 != value17 ? value17.toUpperCase() : value2;
object2['headerColor'] = colors.headerColor;
object2['acceptLabelText'] = r21;
object2['onlineText'] = r20;
object2['memberText'] = r19;
object2['channelIcon'] = r18;
object2['titleText'] = r17;
object2['titleColor'] = colors.titleColor;
object2['thumbnailUrl'] = value4 != r13 ? r13 : value2;
object2['thumbnailText'] = r14;
object2['subtitle'] = r15;
object2['subtitleColor'] = r15 === '' ? value2 : colors.subtitleColor;
object2['acceptLabelBackgroundColor'] = r11;
object2['acceptLabelBorderColor'] = value2;
object2['acceptLabelColor'] = r10;
object2['embedCanBeTapped'] = value11;
object2['canBeAccepted'] = canAcceptInvite2;
object2['channelName'] = value4 != channel ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel,
UserStore, RelationshipStore) : value2;
const type = a0.type;
object2['type'] = value4 != type ? type : InviteTypes.GUILD;
object2['inviteSplash'] = r6;
if (value4 != r4) {
value = require(8191) /* metro dependency 8191: EmbedUtils */;
value = value.getAssetUriForEmbed(r4);
r2 = value;
} else {
r2 = value2;
}
object2['badgeIconUrl'] = r2;
return object2;
}
@@ -0,0 +1,245 @@
/* Metro module 10553; source: modules/messages/native/renderer/row_data/embeds/coded_links/invite/GuildProfileInvite.tsx; dependencies: [57, 1949, 9859, 661, 4118, 8189, 6718, 4002, 697, 1418, 9304, 9302, 1423, 1862, 1852, 1244, 9318, 6916, 4119, 21, 1940, 6794, 673, 8181, 8191, 2] */
function _fun81348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10739:6, offset: 0x01ecc670, size: 200 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const env0_5 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
const env0_6 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
const env0_7 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/invite/GuildProfileInvite.tsx');
exports.createGuildProfileInvite = createGuildProfileInvite;
}
function createGuildProfileInvite(a0, a1) { // fn#81349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10739:346, offset: 0x01ecc738, size: 2261 bytes, params: 3, frame: 37
var r26;
var r27;
var name;
var r14;
var r15;
var r12;
var r7;
var r18;
var r19;
var r20;
var moduleValue6;
var getAcronym;
var value11;
var object;
var id;
var defaultImport2;
var getGuildDiscoverySplashURL;
var value15;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var moduleValue7;
var moduleValue9;
var getEstablishedDate;
var defaultImport3;
const value2 = undefined;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1);
const guildProfileFromInvite = (require(6718) /* metro dependency 6718: GuildProfileBuilders */).buildGuildProfileFromInvite(a0);
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1);
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
let r11 = isThemeDark2 ? unsafe_rawColors.PRIMARY_660 : unsafe_rawColors.PRIMARY_160;
const value4 = null;
let r8 = value4 != guildProfileFromInvite ? (require(1418) /* metro dependency 1418: GuildRecordUtils */).fromGuildProfile(guildProfileFromInvite) : value4;
const profilePrimaryColor = (require(9304) /* metro dependency 9304: GuildProfileUtils */).getProfilePrimaryColor(guildProfileFromInvite);
const guildProfileViewModule = require(9302) /* metro dependency 9302: GuildProfileView */;
const getBackgroundForProfile = guildProfileViewModule.getBackgroundForProfile;
r11 = value4 != profilePrimaryColor ? profilePrimaryColor : r11;
const value8 = env0_3(Reflect.apply(getBackgroundForProfile, guildProfileViewModule, [a1, r11]), 2);
const value9 = 0;
let property = value8[value9];
const property2 = value8[1];
const memberCount = value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.memberCount;
const r24 = value4 != memberCount ? memberCount : a0.approximate_member_count;
const onlineCount = value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.onlineCount;
const r23 = value4 != onlineCount ? onlineCount : a0.approximate_presence_count;
if (value4 != (value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.icon)) {
r14 = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: guildProfileFromInvite.id,
icon: guildProfileFromInvite.icon, canAnimate: true, size: 128});
r15 = value2;
} else {
moduleValue6 = require(1862) /* metro dependency 1862: StringUtils */;
getAcronym = moduleValue6.getAcronym;
name = value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.name;
value11 = Reflect.apply(getAcronym, moduleValue6, [value4 != name ? name : '']);
r14 = value2;
r15 = value11;
}
if (value4 == r8 ? value2 : r8.features.has(GuildFeatures.DISCOVERABLE)) {
if (value4 != (value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.customBanner)) {
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGuildDiscoverySplashURL = defaultImport2.getGuildDiscoverySplashURL;
object = {};
object.id = guildProfileFromInvite.id;
object.splash = guildProfileFromInvite.customBanner;
object.size = 400 * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
value15 = Reflect.apply(getGuildDiscoverySplashURL, defaultImport2, [object]);
r12 = value4 != value15 ? value15 : value2;
} else {
r12 = value2;
}
} else {
r12 = value2;
}
let r3 = value4 != r24 && r24 >= 5;
r3 = !r3 ? value4 != r23 && r23 > value9 : r3;
if (r3) {
r7 = value4 != r23 ? intl.formatToPlainString(t['LC+S+m'], {membersOnline: r23}) : value2;
r18 = value4 != r24 ? intl.formatToPlainString(t.zRl6XR, {count: r24}) : value2;
r19 = r7;
} else {
r18 = value2;
r19 = value2;
}
if (value4 != guildProfileFromInvite) {
moduleValue7 = require(9318) /* metro dependency 9318: useGuildProfileCTA */;
r7 = moduleValue7.getGuildProfileCTAType(guildProfileFromInvite, a0.code);
} else {
r7 = value4;
}
const CTATypes = (require(9318) /* metro dependency 9318: useGuildProfileCTA */).CTATypes;
const IS_MEMBER = CTATypes.IS_MEMBER;
if (IS_MEMBER === r7) {
r20 = intl.string(t.IRoQXr);
} else if (CTATypes.HAS_APPLICATION === r7) {
r20 = intl.string(t['4yfIDk']);
} else if (CTATypes.APPLY_TO_JOIN === r7) {
r20 = intl.string(t['7XdMW2']);
} else if (CTATypes.ACCEPT_ROLES === r7) {
r20 = intl.string(t.MMlhsr);
} else {
if (CTATypes.LURK_DISCOVERABLE !== r7) {
CTATypes.JOIN_VIA_INVITE;
}
r20 = intl.string(t.XpeFYr);
}
r11 = value4 != r8 ? (require(6916) /* metro dependency 6916: GuildBadgeImageSource */).getGuildBadgeImageSource(r8,
a1) : value2;
r8 = value4 == guildProfileFromInvite || value4 == guildProfileFromInvite.traits ? value2 : guildProfileFromInvite.traits.filter(function(a0) {
var r0;
var property;
var value = a0 != null;
if (value) {
property = a0.label;
property = property.trim().length;
r0 = property > 0;
} else {
r0 = value;
}
return r0;
});
if (value4 != guildProfileFromInvite) {
moduleValue9 = require(4119) /* metro dependency 4119: GuildProfileUtils */;
getEstablishedDate = moduleValue9.getEstablishedDate;
defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r7 = intl.formatToPlainString(t.zb2Q56, {createdAtDate: Reflect.apply(getEstablishedDate, moduleValue9,
[defaultImport3.extractTimestamp(guildProfileFromInvite.id), LocaleStore.locale])});
r26 = defaultImport3;
} else {
r7 = value2;
}
let roles = a0.roles;
if (value4 != roles) {
roles = a0.roles;
if (roles.length > value9) {
if (value4 != a0.guild) {
id = a0.guild.id;
roles = a0.roles;
object = [];
arraySpread(object, roles, value9, r26);
r3 = object.sort((require(1940) /* metro dependency 1940: GuildRoleUtils */).sortInviteRoles).map(_fun81351);
r27 = value9;
} else {
r3 = value2;
}
} else {
r3 = value2;
}
} else {
r3 = value2;
}
object = {};
copyDataProperties(object, baseColors, r27);
const GUILD_PROFILE_INVITE = CodedLinkExtendedType.GUILD_PROFILE_INVITE;
object['extendedType'] = GUILD_PROFILE_INVITE;
object['acceptLabelText'] = r20;
object['onlineText'] = r19;
object['memberText'] = r18;
object['titleText'] = value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.name;
object['thumbnailUrl'] = value4 != r14 ? r14 : value2;
object['thumbnailText'] = r15;
const description = value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.description;
object['bodyText'] = value4 != description ? description : '';
object['embedCanBeTapped'] = true;
object['canBeAccepted'] = true;
const type = a0.type;
object['type'] = value4 != type ? type : InviteTypes.GUILD;
object['inviteSplash'] = r12;
object['bannerColor'] = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(property);
object['bannerColorSecondary'] = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(property2);
r8 = value4 == r8 ? [] : r8;
object['hasProfileOverflow'] = r8.length > value9 || (value4 != (value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.gameApplicationIds) ? value4 == guildProfileFromInvite ? value2 : guildProfileFromInvite.gameApplicationIds : []).length > value9;
object['badgeIconUrl'] = value4 != r11 ? (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(r11) : value2;
object['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
object['establishedText'] = r7;
object['headerText'] = value4;
object['roles'] = r3;
object['rolesHeadingText'] = value4 != r3 && r3.length > value9 ? intl.string(t.stcSfI) : value2;
return object;
}
function _fun81351(a0) { // fn#81351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10739:2452, offset: 0x01ecd035, size: 330 bytes, params: 2, frame: 21
var r1;
var object2;
var name;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var property;
const value = environment.__proto__;
const value2 = undefined;
const guildRoleUtilsModule = require(1940) /* metro dependency 1940: GuildRoleUtils */;
const r0 = (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(guildRoleUtilsModule.inviteRoleToDisplayData(id,
a0), 16) ?? ({});
const customIconSrc = r0.customIconSrc;
const unicodeEmoji = r0.unicodeEmoji;
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const value7 = colorUtilsModule.int2hex(a0.color ?? 0);
if (customIconSrc != null) {
object2 = {source: customIconSrc};
object2.unicodeEmoji = unicodeEmoji == null ? value2 : unicodeEmoji.surrogates;
name = a0.name;
object2.name = name;
object2.size = 16;
formatToPlainString = intl.formatToPlainString;
property = t['9+YWrE'];
name = a0.name;
object2.alt = Reflect.apply(formatToPlainString, intl, [property, {name: name}]);
r1 = object2;
} else if (unicodeEmoji != null) {
object2 = {source: customIconSrc};
object2.unicodeEmoji = unicodeEmoji == null ? value2 : unicodeEmoji.surrogates;
name = a0.name;
object2.name = name;
object2.size = 16;
formatToPlainString = intl.formatToPlainString;
property = t['9+YWrE'];
name = a0.name;
object2.alt = Reflect.apply(formatToPlainString, intl, [property, {name: name}]);
r1 = object2;
} else {
r1 = value2;
}
object2 = {};
object2.id = a0.id;
object2.name = a0.name;
object2.color = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(value7);
object2.roleIcon = r1;
return object2;
}
@@ -0,0 +1,184 @@
/* Metro module 9857; source: modules/messages/native/renderer/row_data/embeds/coded_links/invite/VoiceChannelListInviteEmbed.tsx; dependencies: [27, 4502, 9858, 1422, 1379, 1945, 1867, 3784, 3793, 1878, 4297, 4300, 9859, 661, 4118, 9860, 8189, 8191, 1423, 3995, 3963, 4805, 1244, 9861, 2] */
function _fun77274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10043:6, offset: 0x01df79c0, size: 396 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).processColor;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const voiceChannelStartTimeStore = importDefault(9858) /* metro dependency 9858: VoiceChannelStartTimeStore */;
const env0_6 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildIconSource;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const env0_15 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
const env0_16 = (require(661) /* metro dependency 661: Constants */).BasicPermissions;
const env0_17 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/invite/VoiceChannelListInviteEmbed.tsx');
exports.canShowVoiceChannelListInviteEmbed = canShowVoiceChannelListInviteEmbed;
exports.createVoiceChannelListInviteEmbed = createVoiceChannelListInviteEmbed;
}
function resolveVoiceChannelListInviteEmbedData(a0) { // fn#77275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10043:334, offset: 0x01df7b4c, size: 182 bytes, params: 2, frame: 16
var r1;
var value4;
const guild = a0.guild;
const value = null;
if (value != guild) {
var guild2 = GuildStore.getGuild(a0.guild.id);
if (value == guild2) {
return value;
}
var channel = (importDefault(9860) /* metro dependency 9860: getChannelAndRecipientsFromInvite */)(a0).channel;
if (value == channel) {
return value;
}
if (channel.isGuildVocal()) {
value4 = ChannelStore.getChannel(channel.id);
r1 = value == value4 ? channel : value4;
r1 = PermissionStore.canBasicChannel(BasicPermissions.VIEW_CHANNEL, r1) ? {guild: guild2,
channel: r1} : value;
return r1;
}
}
return value;
}
function canShowVoiceChannelListInviteEmbed(a0) { // fn#77276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10043:818, offset: 0x01df7c02, size: 25 bytes, params: 2, frame: 11
return resolveVoiceChannelListInviteEmbedData(a0) != null;
}
function createVoiceChannelListInviteEmbed(a0, a1) { // fn#77277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10043:957, offset: 0x01df7c1b, size: 985 bytes, params: 3, frame: 30
var r10;
var moduleValue;
const resolveVoiceChannelListInviteEmbedDataBinding = resolveVoiceChannelListInviteEmbedData;
const value2 = undefined;
const voiceChannelListInviteEmbedData = resolveVoiceChannelListInviteEmbedDataBinding(a0);
if (voiceChannelListInviteEmbedData == null) {
return null;
}
const guild = voiceChannelListInviteEmbedData.guild;
const channel = voiceChannelListInviteEmbedData.channel;
const {colors, baseColors} = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(a1);
if (guild.icon != null) {
moduleValue = require(8191) /* metro dependency 8191: EmbedUtils */;
r10 = moduleValue.getAssetUriForEmbed(getGuildIconSource(guild, 128, false));
} else {
r10 = value2;
}
const getVoiceStatesForChannelAlt = SortedVoiceStateStore.getVoiceStatesForChannelAlt;
let id = channel.id;
const value5 = Reflect.apply(getVoiceStatesForChannelAlt, SortedVoiceStateStore, [id, guild.id]);
const value6 = value5.filter(function(a0) {
return a0.voiceState.selfStream;
});
let object = [];
const value7 = arraySpread(object, value6, 0, undefined);
arraySpread(object, value5.filter(function(a0) {
return !a0.voiceState.selfStream;
}), value7, undefined);
const value8 = object.slice(0, 10);
const env0_1 = AccessibilityStore.displayNameStylesEnabled;
const value9 = value8.map(_fun77280);
const r11 = VoiceChannelStartTimeStore.getStartTime(channel) ?? value2;
const currentClientVoiceChannelId = VoiceStateStore.getCurrentClientVoiceChannelId(guild.id);
id = channel.id;
object = {};
copyDataProperties(object, baseColors, value7);
object['backgroundColor'] = processColor((require(3963) /* metro dependency 3963: ClientThemesUtils */).getEmbedScrollGradientBackground() ?? value2) ?? baseColors.backgroundColor;
const VOICE_CHANNEL_LIST_INVITE = CodedLinkExtendedType.VOICE_CHANNEL_LIST_INVITE;
object['extendedType'] = VOICE_CHANNEL_LIST_INVITE;
object['headerColor'] = colors.headerColor;
object['guildName'] = guild.name;
object['guildIcon'] = r10;
object['headerText'] = '';
object['titleText'] = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel,
UserStore, RelationshipStore);
object['titleColor'] = value5.length > 0 ? colors.voiceActiveColor : colors.voiceMutedColor;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object['acceptLabelText'] = Reflect.apply(string, intl, [t.gpqgah]);
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
object['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
const defaultImport2 = importDefault(9861) /* metro dependency 9861: GuestUtils */;
object['canBeAccepted'] = defaultImport2.canAcceptInvite([GuildMemberStore], a0);
object['embedCanBeTapped'] = true;
const GUILD = InviteTypes.GUILD;
object['type'] = GUILD;
object['voiceUsers'] = value9;
object['voiceStartTimestamp'] = r11;
object['emptyStateText'] = intl.string(t.zSqdrS);
object['streamingLabel'] = intl.string(t.dI3q4h).toUpperCase();
object['voiceHeaderBackgroundColor'] = colors.voiceHeaderBackgroundColor;
const useReducedMotion = AccessibilityStore.useReducedMotion;
object['reducedMotion'] = useReducedMotion;
object['isConnected'] = currentClientVoiceChannelId === id;
object['privacyHintText'] = intl.string(t.fkg9mQ);
return object;
}
function _fun77280(a0) { // fn#77280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10043:1394, offset: 0x01df8008, size: 443 bytes, params: 2, frame: 20
var r5;
var r6;
var value;
var id;
var value2;
var defaultImport;
var value4;
var defaultImport2;
var getGuildMemberAvatarURLSimple;
var object2;
var value10;
const member = a0.member;
if (member != null) {
r5 = member;
} else {
value = environment.__proto__;
value = GuildMemberStore.getMember(guild.id, a0.user.id);
r5 = value;
}
value = undefined;
if ((r5 == null ? value : r5.avatar) != null) {
value4 = environment.__proto__;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGuildMemberAvatarURLSimple = defaultImport2.getGuildMemberAvatarURLSimple;
object2 = {};
id = guild.id;
object2.guildId = id;
id = a0.user.id;
object2.userId = id;
object2.avatar = r5.avatar;
object2.size = 24;
r6 = Reflect.apply(getGuildMemberAvatarURLSimple, defaultImport2, [object2]);
} else {
value2 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
r6 = defaultImport.getUserAvatarURL(a0.user, false, 24);
}
const r4 = typeof r6 !== 'number' ? r6 : (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(r6);
const r1 = displayNameStylesEnabled ? (r5 == null || r5.displayNameStyles == null ? value : r5.displayNameStyles.fontId) ?? (a0.user.displayNameStyles == null ? value : a0.user.displayNameStyles.fontId) : value;
object2 = {};
const user = a0.user;
object2.userId = user.id;
const nick = a0.nick;
if (nick != null) {
r5 = nick;
} else {
value10 = environment.__proto__;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(a0.user);
r5 = value;
}
object2.displayName = r5;
object2.avatarUrl = r4;
const selfStream = a0.voiceState.selfStream;
object2.isStreaming = selfStream != null && selfStream;
object2.fontId = r1;
return object2;
}
@@ -0,0 +1,30 @@
/* Metro module 9860; source: modules/messages/native/renderer/row_data/embeds/coded_links/invite/getChannelAndRecipientsFromInvite.tsx; dependencies: [1383, 2] */
function _fun77300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10046:6, offset: 0x01df884d, size: 109 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1383) /* metro dependency 1383: ChannelRecord */).createChannelRecordFromInvite;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/invite/getChannelAndRecipientsFromInvite.tsx');
exports.default = getChannelAndRecipientsFromInvite;
}
function getChannelAndRecipientsFromInvite(a0) { // fn#77301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10046:285, offset: 0x01df88ba, size: 119 bytes, params: 2, frame: 15
var r1;
var createChannelRecordFromInviteBinding;
var object4;
const channel = a0.channel;
const value = null;
const r5 = value == channel ? [] : value != a0.channel.recipients ? a0.channel.recipients.slice() : [];
const object3 = {recipients_: r5};
if (value != a0.channel) {
createChannelRecordFromInviteBinding = createChannelRecordFromInvite;
object4 = {};
copyDataProperties(object4, a0.channel, r5);
object4['recipients'] = r5;
r1 = createChannelRecordFromInviteBinding(object4);
} else {
r1 = value;
}
object3.channel = r1;
return object3;
}
@@ -0,0 +1,72 @@
/* Metro module 10552; source: modules/messages/native/renderer/row_data/embeds/coded_links/useEmbeddedActivityParticipantAvatarUris.tsx; dependencies: [31, 1378, 1878, 1360, 632, 2] */
function _fun81338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10738:6, offset: 0x01ecc366, size: 162 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/useEmbeddedActivityParticipantAvatarUris.tsx');
exports.default = useEmbeddedActivityParticipantAvatarUris;
exports.getEmbeddedActivityParticipantAvatarUris = getEmbeddedActivityParticipantAvatarUris;
}
function useEmbeddedActivityParticipantAvatarUris({activity, guildId}) { // fn#81339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10738:275, offset: 0x01ecc408, size: 159 bytes, params: 2, frame: 18
const binding = env0_2;
return binding.useMemo(_fun81343, [guildId,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([UserStore], _fun81341,
[binding.useMemo(function() {
var r0;
var Array = global.Array;
var from = Array.from;
r0 = activity?.userIds;
r0 = r0 ?? [];
return Reflect.apply(from, Array, [r0]);
}, [activity])])]);
}
function getEmbeddedActivityParticipantAvatarUris({channelId, guildId, applicationId, activity}) { // fn#81345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10738:658, offset: 0x01ecc571, size: 177 bytes, params: 2, frame: 16
var r6;
var value;
if (activity != null) {
r6 = activity;
} else {
value = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(channelId);
value = value.find(function({applicationId}) {
return applicationId === applicationId;
});
r6 = value;
}
const Array = global.Array;
const from = Array.from;
const userIds = r6?.userIds;
const value3 = Reflect.apply(from, Array, [userIds ?? []]).map(_fun81347);
return value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun81341() { // fn#81341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10738:482, offset: 0x01ecc4df, size: 28 bytes, params: 1, frame: 11
return env0_2.map(function(a0) {
return UserStore.getUser(a0);
});
}
function _fun81343() { // fn#81343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10738:535, offset: 0x01ecc4fb, size: 69 bytes, params: 1, frame: 13
var environment;
const binding = env0_3;
const filter = binding.filter;
const value = environment.__proto__;
return Reflect.apply(filter, binding,
[(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]).map(_fun81344);
}
function _fun81347(a0) { // fn#81347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10738:917, offset: 0x01ecc622, size: 78 bytes, params: 2, frame: 14
const value = environment.__proto__;
return '' + UserStore.getUser(a0)?.getAvatarURL(guildId, 64);
}
function _fun81344(a0) { // fn#81344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10738:575, offset: 0x01ecc540, size: 49 bytes, params: 2, frame: 13
const getAvatarURL = a0.getAvatarURL;
const value = environment.__proto__;
return '' + Reflect.apply(getAvatarURL, a0, [guildId, 64]);
}
@@ -0,0 +1,134 @@
/* Metro module 8189; source: modules/messages/native/renderer/row_data/embeds/getEmbedThemeColors.tsx; dependencies: [31, 4501, 4002, 697, 4000, 2] */
function _fun65676(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8374:6, offset: 0x01bd9bea, size: 784 bytes, params: 8, frame: 31
var object2;
const env0_0 = require;
const closure = getEmbedThemeColors;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(4501) /* metro dependency 4501: createStyles */;
value = value.experimental_createToken(function({theme}) {
var isThemeDark = require(dependencyMap[2]).isThemeDark(theme);
theme = importDefault(dependencyMap[3]).unsafe_rawColors;
return isThemeDark ? theme.PRIMARY_500 : theme.PRIMARY_400;
});
const value3 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(_fun65679);
const value5 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function({theme}) {
var isThemeDark = require(dependencyMap[2]).isThemeDark(theme);
theme = importDefault(dependencyMap[3]).unsafe_rawColors;
return isThemeDark ? theme.PRIMARY_500 : theme.PRIMARY_400;
});
const value7 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function({theme}) {
var isThemeDark = require(dependencyMap[2]).isThemeDark(theme);
theme = importDefault(dependencyMap[3]).unsafe_rawColors;
return isThemeDark ? theme.PRIMARY_500 : theme.PRIMARY_400;
});
const value9 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function({theme}) {
var isThemeDark = require(dependencyMap[2]).isThemeDark(theme);
theme = importDefault(dependencyMap[3]).unsafe_rawColors;
return isThemeDark ? theme.PRIMARY_500 : theme.PRIMARY_100;
});
const value11 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(_fun65683);
const value13 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function({theme}) {
var isThemeDark = require(dependencyMap[2]).isThemeDark(theme);
theme = importDefault(dependencyMap[3]).unsafe_rawColors;
return isThemeDark ? theme.PRIMARY_600 : theme.PRIMARY_100;
});
const value15 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function({theme}) {
return require(dependencyMap[2]).isThemeDark(theme) ? '#666b73' : importDefault(dependencyMap[3]).unsafe_rawColors.PRIMARY_300;
});
const value17 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(_fun65686);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = createStylesModule.createNativeStyleProperties;
object2 = {};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.acceptBlurpleLabelBackgroundColor = BACKGROUND_BRAND;
const CONTROL_CONNECTED_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CONNECTED_BACKGROUND_DEFAULT;
object2.acceptLabelGreenBackgroundColor = CONTROL_CONNECTED_BACKGROUND_DEFAULT;
let WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.acceptLabelGreenColor = WHITE;
const MOBILE_EMBED_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_EMBED_BACKGROUND_DEFAULT;
object2.backgroundColor = MOBILE_EMBED_BACKGROUND_DEFAULT;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.bodyTextColor = TEXT_DEFAULT;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.clearLabelRedBackgroundColor = RED_400;
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.clearLabelRedColor = WHITE;
let TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.headerColor = TEXT_SUBTLE;
TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.subtitleColor = TEXT_SUBTLE;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.titleColor = MOBILE_TEXT_HEADING_PRIMARY;
object2.acceptLabelActiveBackgroundColor = value;
object2.acceptLabelDisabledBackgroundColor = value3;
object2.acceptLabelDisabledBorderColor = value5;
object2.acceptLabelDisabledTextColor = value7;
object2.acceptLabelDisabledColor = value9;
object2.borderColor = value11;
object2.resolvingGradientEnd = value13;
object2.resolvingGradientStart = value15;
object2.thumbnailBackgroundColor = value17;
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object2.voiceActiveColor = TEXT_FEEDBACK_POSITIVE;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.voiceHeaderBackgroundColor = BACKGROUND_MOD_MUTED;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.voiceMutedColor = TEXT_MUTED;
const env0_4 = Reflect.apply(createNativeStyleProperties, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/getEmbedThemeColors.tsx');
exports.default = closure;
exports.useEmbedThemeColors = useEmbedThemeColors;
}
function getEmbedThemeColors(a0) { // fn#65677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8374:2522, offset: 0x01bd9efa, size: 71 bytes, params: 2, frame: 13
const value = env0_4(a0);
return {colors: value, baseColors: {borderColor: value.borderColor, backgroundColor: value.backgroundColor,
thumbnailCornerRadius: 15, headerColor: value.headerColor}};
}
function _fun65679({theme}) { // fn#65679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8374:290, offset: 0x01bd9f9a, size: 152 bytes, params: 2, frame: 16
var r0;
var moduleValue2;
const sharedModule = require(4002) /* metro dependency 4002: shared */;
if (sharedModule.isThemeDark(theme)) {
r0 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_600;
} else {
moduleValue2 = require(4000) /* metro dependency 4000: ColorUtils */;
r0 = moduleValue2.hexWithOpacity((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500,
0.3);
}
return r0;
}
function _fun65683({theme}) { // fn#65683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8374:909, offset: 0x01bda08b, size: 143 bytes, params: 2, frame: 16
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(theme);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
return isThemeDark2 ? Reflect.apply(hexWithOpacity, colorUtilsModule, [unsafe_rawColors.WHITE,
0.06]) : Reflect.apply(hexWithOpacity, colorUtilsModule, [unsafe_rawColors.PRIMARY_860, 0.08]);
}
function _fun65686({theme}) { // fn#65686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8374:1376, offset: 0x01bda1ca, size: 152 bytes, params: 2, frame: 16
var r0;
var moduleValue2;
const sharedModule = require(4002) /* metro dependency 4002: shared */;
if (sharedModule.isThemeDark(theme)) {
r0 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_600;
} else {
moduleValue2 = require(4000) /* metro dependency 4000: ColorUtils */;
r0 = moduleValue2.hexWithOpacity((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_200,
0.3);
}
return r0;
}
function useEmbedThemeColors(a0) { // fn#65687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8374:2868, offset: 0x01bda262, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_3.useMemo(_fun65688, [a0]);
}
@@ -0,0 +1,627 @@
/* Metro module 8446; source: modules/messages/native/renderer/row_data/interaction/ExecutedCommand.tsx; dependencies: [27, 1885, 1379, 1878, 661, 1426, 1423, 4634, 8447, 697, 5065, 1909, 8206, 8448, 1244, 8046, 2] */
function _fun67017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8631:6, offset: 0x01c12847, size: 205 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).processColor;
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/interaction/ExecutedCommand.tsx');
exports.createExecutedCommand = createExecutedCommand;
}
function getCommandUserAvatar(a0, a1) { // fn#67018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8631:172, offset: 0x01c12914, size: 298 bytes, params: 3, frame: 19
var r7;
var r2;
var object2;
var moduleValue;
var guildMemberAvatar;
var guildId;
let value = a1;
const interaction = a0.interaction;
const value2 = undefined;
let user = interaction == null ? value2 : interaction.user;
const user2 = UserStore.getUser(user == null ? value2 : user.id);
if (user2 != null) {
r7 = value ?? ChannelStore.getChannel(a0.getChannelId());
object2 = {user: user2};
moduleValue = require(4634) /* metro dependency 4634: useMessageAuthor */;
guildMemberAvatar = moduleValue.getUserAuthor(user2, r7).guildMemberAvatar;
object2.guildMemberAvatar = guildMemberAvatar;
if (value == null) {
r2 = value2;
} else {
value = value.getGuildId();
r2 = value;
}
object2.guildId = r2;
user = object2.user;
guildMemberAvatar = object2.guildMemberAvatar;
guildId = object2.guildId;
value = require(1426) /* metro dependency 1426: AvatarUtils */;
return value.ensureAvatarSource(guildMemberAvatar == null ? user.getAvatarSource(value2) : guildId != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildMemberAvatarSource({userId: user.id,
avatar: guildMemberAvatar, guildId: guildId}, user) : user.getAvatarSource(value2)).uri;
}
return value2;
}
function createExecutedCommand(a0, a1, a2, a3, a4) { // fn#67019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8631:821, offset: 0x01c12a3e, size: 1613 bytes, params: 6, frame: 37
var r23;
var type;
var r5;
var r7;
var r52;
var r2;
var id;
var r10;
var r18;
var r15;
var r24;
var r14;
var r19;
var getCommandUserAvatarBinding;
var value6;
var commandUserAvatarBinding;
var isPrimaryEntryPointCommandMessage2;
var moduleValue2;
var getUserAuthor;
var user;
var value10;
var colorString;
var colorStrings;
var internal;
var semanticColor;
var initialInteractionMetadata;
const InteractionTypes = (require(1909) /* metro dependency 1909: Server */).InteractionTypes;
var target_user;
var userRecord;
var userAuthor;
var colorString2;
var colorStrings2;
var value15;
var processColorBinding;
var value16;
var value17;
var id2;
var isNativeMessageEligibleForEnhancedRoleColors;
var moduleValue5;
var value18;
var isNativeMessageEligibleForEnhancedRoleColors2;
var object5;
var object7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToParts;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var k964Wm;
var object12;
var property;
var object13;
var SSrolr;
var object14;
var object15;
var mqKdCM;
var object16;
var moduleValue7;
var object17;
var value22;
var object18;
let value = a4;
const activityInstance = a0.activityInstance;
const value2 = null;
const r0 = value2 != activityInstance && a0.activityInstance !== undefined;
let interaction = a0.interaction;
if (value2 != interaction) {
interaction = a0.interaction;
var displayName = interaction.displayName;
if (displayName !== '') {
getCommandUserAvatarBinding = getCommandUserAvatar;
value6 = undefined;
commandUserAvatarBinding = getCommandUserAvatarBinding(a0, a1);
type = a0.type;
r23 = type === MessageTypes.CHAT_INPUT_COMMAND || a0.type === MessageTypes.INTERACTION_PREMIUM_UPSELL;
isPrimaryEntryPointCommandMessage2 = (require(8447) /* metro dependency 8447: ApplicationInteractionInfoUtils */).isPrimaryEntryPointCommandMessage(a0);
moduleValue2 = require(4634) /* metro dependency 4634: useMessageAuthor */;
getUserAuthor = moduleValue2.getUserAuthor;
interaction = a0.interaction;
user = interaction.user;
value10 = Reflect.apply(getUserAuthor, moduleValue2, [user, a1]);
colorString = value10.colorString;
colorStrings = value10.colorStrings;
interaction = a0.interaction;
displayName = interaction.displayName;
internal = (importDefault(697) /* metro dependency 697: native */).internal;
semanticColor = internal.resolveSemanticColor(a3,
(importDefault(697) /* metro dependency 697: native */).colors.MENTION_BACKGROUND);
initialInteractionMetadata = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).getInitialInteractionMetadata(a0);
type = value2 == initialInteractionMetadata ? value6 : initialInteractionMetadata.type;
if (type !== InteractionTypes.APPLICATION_COMMAND) {
r5 = value2;
} else {
target_user = initialInteractionMetadata.target_user;
if (value2 != target_user) {
target_user = initialInteractionMetadata.target_user;
userRecord = new UserRecord();
} else {
r5 = value2;
}
}
userAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(r5, a1);
colorString2 = userAuthor.colorString;
colorStrings2 = userAuthor.colorStrings;
value15 = a2 === 'username';
if (value15) {
value16 = processColor(value2 != colorString2 ? colorString2 : value6);
r52 = value2 == value16 ? value : value16;
} else {
r52 = value;
}
if (value15) {
value17 = processColor(value2 != colorString ? colorString : value6);
r7 = value2 == value17 ? value : value17;
} else {
r7 = value;
}
r2 = value2 == a1 ? value6 : a1.getGuildId();
interaction = a0.interaction;
user = interaction.user;
id2 = user.id;
value = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
value = value.isNativeMessageEligibleForEnhancedRoleColors(r2, id2);
moduleValue5 = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
isNativeMessageEligibleForEnhancedRoleColors = moduleValue5.isNativeMessageEligibleForEnhancedRoleColors;
value18 = value2 == r5;
id = value18 ? value6 : r5.id;
isNativeMessageEligibleForEnhancedRoleColors2 = Reflect.apply(isNativeMessageEligibleForEnhancedRoleColors,
moduleValue5, [r2, id]);
if (value) {
value = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
value = value.processColorStrings(colorStrings);
r10 = value;
} else {
r10 = value2;
}
if (isNativeMessageEligibleForEnhancedRoleColors2) {
value = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
value = value.processColorStrings(colorStrings2);
r18 = value;
} else {
r18 = value2;
}
object5 = {};
value = require(4634) /* metro dependency 4634: useMessageAuthor */;
getUserAuthor = value.getUserAuthor;
interaction = a0.interaction;
user = interaction.user;
object5.username = Reflect.apply(getUserAuthor, value, [user, a1]).nick;
object7 = {'name': 'usernameOnClick', 'action': 'bindUserMenu'};
object7.userId = id2;
object7.messageChannelId = a0.channel_id;
object7.linkColor = r7;
processColorBinding = processColor;
r15 = value2 != colorString ? colorString : value6;
value = processColorBinding(r15);
r15 = value2 != value ? value : value2;
object7.roleColor = r15;
object7.roleColors = r10;
value = a2 === 'dot';
r10 = value && value2 != colorString;
object7.shouldShowRoleDot = r10;
object5.usernameOnClick = object7;
if (r0) {
if (isPrimaryEntryPointCommandMessage2) {
r24 = isPrimaryEntryPointCommandMessage2 ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).formatPrimaryEntryPointCommandName(displayName) : displayName;
formatToParts = intl.formatToParts;
SSrolr = t.SSrolr;
object14 = {};
copyDataProperties(object14, object5, value18);
object14['commandName'] = r24;
if (value2 == a1) {
r14 = {};
} else if (r23) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else if (isPrimaryEntryPointCommandMessage2) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else {
r14 = {};
}
object14['commandNameOnClick'] = r14;
if (value2 == r5) {
r2 = Reflect.apply(formatToParts, intl, [SSrolr, object14]);
} else {
formatToParts = intl.formatToParts;
mqKdCM = t.mqKdCM;
object16 = {};
copyDataProperties(object16, object5, value18);
object16['commandName'] = r24;
object16['commandNameOnClick'] = {};
moduleValue7 = require(4634) /* metro dependency 4634: useMessageAuthor */;
object16['targetUsername'] = moduleValue7.getUserAuthor(r5, a1).nick;
object17 = {'name': 'targetUsernameOnClick', 'action': 'bindUserMenu'};
object17.userId = value2 == r5 ? value6 : r5.id;
object17.messageChannelId = a0.channel_id;
object17.linkColor = r52;
processColorBinding = processColor;
r19 = value2 != colorString2 ? colorString2 : value6;
value22 = processColorBinding(r19);
r19 = value2 != value22 ? value22 : value2;
object17.roleColor = r19;
object17.roleColors = r18;
object17.shouldShowRoleDot = value && value2 != colorString2;
object16['targetUsernameOnClick'] = object17;
value = Reflect.apply(formatToParts, intl, [mqKdCM, object16]);
r2 = value;
}
} else {
value = require(8448) /* metro dependency 8448: ActivitiesInTextUtils */;
value = value.isActivitiesInTextEnabled(a1);
formatToParts = intl.formatToParts;
if (value) {
property = t['R/mrBi'];
object13 = {};
copyDataProperties(object13, object5, value18);
object13['activityTextOnClick'] = {action: 'bindTapActivityText',
applicationUserId: a0.author.id,
messageChannelId: a0.channel_id};
r2 = Reflect.apply(formatToParts, intl, [property, object13]);
} else {
k964Wm = t.k964Wm;
object12 = {};
copyDataProperties(object12, object5, value18);
r2 = Reflect.apply(formatToParts, intl, [k964Wm, object12]);
}
}
} else {
r24 = isPrimaryEntryPointCommandMessage2 ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).formatPrimaryEntryPointCommandName(displayName) : displayName;
formatToParts = intl.formatToParts;
SSrolr = t.SSrolr;
object14 = {};
copyDataProperties(object14, object5, value18);
object14['commandName'] = r24;
if (value2 == a1) {
r14 = {};
} else if (r23) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else if (isPrimaryEntryPointCommandMessage2) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else {
r14 = {};
}
object14['commandNameOnClick'] = r14;
if (value2 == r5) {
r2 = Reflect.apply(formatToParts, intl, [SSrolr, object14]);
} else {
formatToParts = intl.formatToParts;
mqKdCM = t.mqKdCM;
object16 = {};
copyDataProperties(object16, object5, value18);
object16['commandName'] = r24;
object16['commandNameOnClick'] = {};
moduleValue7 = require(4634) /* metro dependency 4634: useMessageAuthor */;
object16['targetUsername'] = moduleValue7.getUserAuthor(r5, a1).nick;
object17 = {'name': 'targetUsernameOnClick', 'action': 'bindUserMenu'};
object17.userId = value2 == r5 ? value6 : r5.id;
object17.messageChannelId = a0.channel_id;
object17.linkColor = r52;
processColorBinding = processColor;
r19 = value2 != colorString2 ? colorString2 : value6;
value22 = processColorBinding(r19);
r19 = value2 != value22 ? value22 : value2;
object17.roleColor = r19;
object17.roleColors = r18;
object17.shouldShowRoleDot = value && value2 != colorString2;
object16['targetUsernameOnClick'] = object17;
value = Reflect.apply(formatToParts, intl, [mqKdCM, object16]);
r2 = value;
}
}
object18 = {};
interaction = a0.interaction;
user = interaction.user;
id = user.id;
object18.userId = id;
object18.username = object5.username;
object18.usernameColor = r7;
object18.avatarURL = commandUserAvatarBinding;
object18.targetUsernameColor = r52;
object18.content = r2;
object5 = {'color': null, 'borderRadius': 4, 'spaceAround': true};
object5.color = processColor(semanticColor);
object18.commandNameBackgroundStyles = object5;
object18.showAppsIcon = true;
return object18;
}
if (r0) {
getCommandUserAvatarBinding = getCommandUserAvatar;
value6 = undefined;
commandUserAvatarBinding = getCommandUserAvatarBinding(a0, a1);
type = a0.type;
r23 = type === MessageTypes.CHAT_INPUT_COMMAND || a0.type === MessageTypes.INTERACTION_PREMIUM_UPSELL;
isPrimaryEntryPointCommandMessage2 = (require(8447) /* metro dependency 8447: ApplicationInteractionInfoUtils */).isPrimaryEntryPointCommandMessage(a0);
moduleValue2 = require(4634) /* metro dependency 4634: useMessageAuthor */;
getUserAuthor = moduleValue2.getUserAuthor;
interaction = a0.interaction;
user = interaction.user;
value10 = Reflect.apply(getUserAuthor, moduleValue2, [user, a1]);
colorString = value10.colorString;
colorStrings = value10.colorStrings;
interaction = a0.interaction;
displayName = interaction.displayName;
internal = (importDefault(697) /* metro dependency 697: native */).internal;
semanticColor = internal.resolveSemanticColor(a3,
(importDefault(697) /* metro dependency 697: native */).colors.MENTION_BACKGROUND);
initialInteractionMetadata = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).getInitialInteractionMetadata(a0);
type = value2 == initialInteractionMetadata ? value6 : initialInteractionMetadata.type;
if (type !== InteractionTypes.APPLICATION_COMMAND) {
r5 = value2;
} else {
target_user = initialInteractionMetadata.target_user;
if (value2 != target_user) {
target_user = initialInteractionMetadata.target_user;
userRecord = new UserRecord();
} else {
r5 = value2;
}
}
userAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(r5, a1);
colorString2 = userAuthor.colorString;
colorStrings2 = userAuthor.colorStrings;
value15 = a2 === 'username';
if (value15) {
value16 = processColor(value2 != colorString2 ? colorString2 : value6);
r52 = value2 == value16 ? value : value16;
} else {
r52 = value;
}
if (value15) {
value17 = processColor(value2 != colorString ? colorString : value6);
r7 = value2 == value17 ? value : value17;
} else {
r7 = value;
}
r2 = value2 == a1 ? value6 : a1.getGuildId();
interaction = a0.interaction;
user = interaction.user;
id2 = user.id;
value = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
value = value.isNativeMessageEligibleForEnhancedRoleColors(r2, id2);
moduleValue5 = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
isNativeMessageEligibleForEnhancedRoleColors = moduleValue5.isNativeMessageEligibleForEnhancedRoleColors;
value18 = value2 == r5;
id = value18 ? value6 : r5.id;
isNativeMessageEligibleForEnhancedRoleColors2 = Reflect.apply(isNativeMessageEligibleForEnhancedRoleColors,
moduleValue5, [r2, id]);
if (value) {
value = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
value = value.processColorStrings(colorStrings);
r10 = value;
} else {
r10 = value2;
}
if (isNativeMessageEligibleForEnhancedRoleColors2) {
value = require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */;
value = value.processColorStrings(colorStrings2);
r18 = value;
} else {
r18 = value2;
}
object5 = {};
value = require(4634) /* metro dependency 4634: useMessageAuthor */;
getUserAuthor = value.getUserAuthor;
interaction = a0.interaction;
user = interaction.user;
object5.username = Reflect.apply(getUserAuthor, value, [user, a1]).nick;
object7 = {'name': 'usernameOnClick', 'action': 'bindUserMenu'};
object7.userId = id2;
object7.messageChannelId = a0.channel_id;
object7.linkColor = r7;
processColorBinding = processColor;
r15 = value2 != colorString ? colorString : value6;
value = processColorBinding(r15);
r15 = value2 != value ? value : value2;
object7.roleColor = r15;
object7.roleColors = r10;
value = a2 === 'dot';
r10 = value && value2 != colorString;
object7.shouldShowRoleDot = r10;
object5.usernameOnClick = object7;
if (r0) {
if (isPrimaryEntryPointCommandMessage2) {
r24 = isPrimaryEntryPointCommandMessage2 ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).formatPrimaryEntryPointCommandName(displayName) : displayName;
formatToParts = intl.formatToParts;
SSrolr = t.SSrolr;
object14 = {};
copyDataProperties(object14, object5, value18);
object14['commandName'] = r24;
if (value2 == a1) {
r14 = {};
} else if (r23) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else if (isPrimaryEntryPointCommandMessage2) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else {
r14 = {};
}
object14['commandNameOnClick'] = r14;
if (value2 == r5) {
r2 = Reflect.apply(formatToParts, intl, [SSrolr, object14]);
} else {
formatToParts = intl.formatToParts;
mqKdCM = t.mqKdCM;
object16 = {};
copyDataProperties(object16, object5, value18);
object16['commandName'] = r24;
object16['commandNameOnClick'] = {};
moduleValue7 = require(4634) /* metro dependency 4634: useMessageAuthor */;
object16['targetUsername'] = moduleValue7.getUserAuthor(r5, a1).nick;
object17 = {'name': 'targetUsernameOnClick', 'action': 'bindUserMenu'};
object17.userId = value2 == r5 ? value6 : r5.id;
object17.messageChannelId = a0.channel_id;
object17.linkColor = r52;
processColorBinding = processColor;
r19 = value2 != colorString2 ? colorString2 : value6;
value22 = processColorBinding(r19);
r19 = value2 != value22 ? value22 : value2;
object17.roleColor = r19;
object17.roleColors = r18;
object17.shouldShowRoleDot = value && value2 != colorString2;
object16['targetUsernameOnClick'] = object17;
value = Reflect.apply(formatToParts, intl, [mqKdCM, object16]);
r2 = value;
}
} else {
value = require(8448) /* metro dependency 8448: ActivitiesInTextUtils */;
value = value.isActivitiesInTextEnabled(a1);
formatToParts = intl.formatToParts;
if (value) {
property = t['R/mrBi'];
object13 = {};
copyDataProperties(object13, object5, value18);
object13['activityTextOnClick'] = {action: 'bindTapActivityText',
applicationUserId: a0.author.id,
messageChannelId: a0.channel_id};
r2 = Reflect.apply(formatToParts, intl, [property, object13]);
} else {
k964Wm = t.k964Wm;
object12 = {};
copyDataProperties(object12, object5, value18);
r2 = Reflect.apply(formatToParts, intl, [k964Wm, object12]);
}
}
} else {
r24 = isPrimaryEntryPointCommandMessage2 ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).formatPrimaryEntryPointCommandName(displayName) : displayName;
formatToParts = intl.formatToParts;
SSrolr = t.SSrolr;
object14 = {};
copyDataProperties(object14, object5, value18);
object14['commandName'] = r24;
if (value2 == a1) {
r14 = {};
} else if (r23) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else if (isPrimaryEntryPointCommandMessage2) {
object15 = {'name': 'commandNameOnClick', 'action': 'bindTapCommandName'};
id = a0.interaction.user.id;
object15.userId = id;
id = a0.id;
object15.messageId = id;
id = a0.author.id;
object15.applicationUserId = id;
object15.messageType = a0.type;
object15.messageChannelId = a0.channel_id;
r14 = object15;
} else {
r14 = {};
}
object14['commandNameOnClick'] = r14;
if (value2 == r5) {
r2 = Reflect.apply(formatToParts, intl, [SSrolr, object14]);
} else {
formatToParts = intl.formatToParts;
mqKdCM = t.mqKdCM;
object16 = {};
copyDataProperties(object16, object5, value18);
object16['commandName'] = r24;
object16['commandNameOnClick'] = {};
moduleValue7 = require(4634) /* metro dependency 4634: useMessageAuthor */;
object16['targetUsername'] = moduleValue7.getUserAuthor(r5, a1).nick;
object17 = {'name': 'targetUsernameOnClick', 'action': 'bindUserMenu'};
object17.userId = value2 == r5 ? value6 : r5.id;
object17.messageChannelId = a0.channel_id;
object17.linkColor = r52;
processColorBinding = processColor;
r19 = value2 != colorString2 ? colorString2 : value6;
value22 = processColorBinding(r19);
r19 = value2 != value22 ? value22 : value2;
object17.roleColor = r19;
object17.roleColors = r18;
object17.shouldShowRoleDot = value && value2 != colorString2;
object16['targetUsernameOnClick'] = object17;
value = Reflect.apply(formatToParts, intl, [mqKdCM, object16]);
r2 = value;
}
}
object18 = {};
interaction = a0.interaction;
user = interaction.user;
id = user.id;
object18.userId = id;
object18.username = object5.username;
object18.usernameColor = r7;
object18.avatarURL = commandUserAvatarBinding;
object18.targetUsernameColor = r52;
object18.content = r2;
object5 = {'color': null, 'borderRadius': 4, 'spaceAround': true};
object5.color = processColor(semanticColor);
object18.commandNameBackgroundStyles = object5;
object18.showAppsIcon = true;
return object18;
}
}
}
@@ -0,0 +1,45 @@
/* Metro module 8426; source: modules/messages/native/renderer/row_data/interaction/InteractionStatus.tsx; dependencies: [8056, 1244, 2] */
function _fun66905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8611:6, offset: 0x01c0e995, size: 155 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {LOADING: 0};
object2[0] = 'LOADING';
object2.FAILED = 1;
object2[1] = 'FAILED';
object2.EPHEMERAL_SUCCESS = 999;
object2[999] = 'EPHEMERAL_SUCCESS';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/row_data/interaction/InteractionStatus.tsx');
exports.createInteractionStatus = createInteractionStatus;
}
function createInteractionStatus(a0, a1) { // fn#66906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8611:357, offset: 0x01c0ea30, size: 582 bytes, params: 3, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const interactionStatusViewState = (require(8056) /* metro dependency 8056: InteractionUtils */).getInteractionStatusViewState(a0,
a1);
const InteractionStatusViewState = (require(8056) /* metro dependency 8056: InteractionUtils */).InteractionStatusViewState;
const SENDING = InteractionStatusViewState.SENDING;
if (SENDING === interactionStatusViewState) {
return {text: intl.string(t.RiLfBY), state: env0_2.LOADING};
}
const CREATED = InteractionStatusViewState.CREATED;
if (CREATED === interactionStatusViewState) {
return {text: intl.formatToPlainString(t['7ePV4t'], {applicationName: a0.author.username}),
state: env0_2.LOADING};
}
const TIMED_OUT = InteractionStatusViewState.TIMED_OUT;
if (TIMED_OUT === interactionStatusViewState) {
return {text: intl.string(t.h8hzPd), state: env0_2.FAILED};
}
const FAILED = InteractionStatusViewState.FAILED;
if (FAILED === interactionStatusViewState) {
return {text: a0.interactionError ?? intl.string(t.VCsUJu), state: env0_2.FAILED};
}
const EPHEMERAL_SUCCESS = InteractionStatusViewState.EPHEMERAL_SUCCESS;
if (EPHEMERAL_SUCCESS === interactionStatusViewState) {
return {text: '', state: env0_2.EPHEMERAL_SUCCESS};
}
}
@@ -0,0 +1,61 @@
/* Metro module 8180; source: modules/messages/native/renderer/rows/BlockedGroup.tsx; dependencies: [8178, 482, 22, 4002, 697, 4000, 8181, 2] */
function _fun65618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8365:6, offset: 0x01bd5465, size: 180 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).SeparatorAction;
const env0_4 = (require(482) /* metro dependency 482: Constants */).UNSAFE_Colors;
const env0_5 = (require(22) /* metro dependency 22 */).memoize(_fun65619);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/rows/BlockedGroup.tsx');
exports.generateBlockedGroupRowData = generateBlockedGroupRowData;
}
function _fun65619(a0) { // fn#65619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8365:165, offset: 0x01bd5519, size: 347 bytes, params: 2, frame: 19
var r3;
var moduleValue4;
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const PRIMARY_700 = sharedModule.isThemeDark(a0) ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700 : '#DBE0E4';
const PRIMARY_630 = sharedModule.isThemeDark(a0) ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630 : '#FAFAFA';
const moduleValue3 = sharedModule;
if (moduleValue3.isThemeDark(a0)) {
moduleValue4 = require(4000) /* metro dependency 4000: ColorUtils */;
r3 = moduleValue4.hexWithOpacity((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_300,
0.6);
} else {
r3 = UNSAFE_Colors.GREY1;
}
const object2 = {};
object2.borderColor = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(PRIMARY_700);
object2.backgroundColor = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(PRIMARY_630);
object2.color = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(r3);
return object2;
}
function generateBlockedGroupRowData(a0, a1, a2) { // fn#65620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8365:670, offset: 0x01bd5674, size: 215 bytes, params: 4, frame: 24
const env0_0 = a2;
const changeType = a0.changeType;
const message = a0.message;
const content = a0.content;
const text = a0.text;
const revealed = a0.revealed;
const context = a0.context;
const rowType = a0.rowType;
const value = 'canUncollapse' in a0;
const r1 = value ? a0.canUncollapse : !value;
const object2 = {};
const binding = env0_5;
copyDataProperties(object2, binding(a1), binding);
object2['type'] = rowType;
object2['content'] = content.map(function(a0) {
return importDefault.generate(a0);
});
const TOGGLE_BLOCKED_MESSAGES = SeparatorAction.TOGGLE_BLOCKED_MESSAGES;
object2['button'] = {action: {type: TOGGLE_BLOCKED_MESSAGES, context: context ?? message.id}};
object2['changeType'] = changeType;
object2['text'] = text;
object2['revealed'] = revealed;
object2['canUncollapse'] = r1;
return object2;
}
@@ -0,0 +1,33 @@
/* Metro module 10613; source: modules/messages/native/renderer/rows/Loading.tsx; dependencies: [8178, 4501, 697, 2] */
function _fun81765(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10799:6, offset: 0x01edd681, size: 239 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(8178) /* metro dependency 8178: RowGeneratorConstants */;
const env0_0 = value.LoadingType;
const env0_1 = value.RowType;
const env0_2 = value.SeparatorAction;
value = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = value.createNativeStyleProperties;
object2 = {};
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object2.loadButtonBackgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
const CONTROL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
object2.loadButtonColor = CONTROL_SECONDARY_TEXT_DEFAULT;
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
object2.loadingColor = ICON_SUBTLE;
const env0_3 = Reflect.apply(createNativeStyleProperties, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/rows/Loading.tsx');
exports.generateLoadingRowData = generateLoadingRowData;
}
function generateLoadingRowData({rowType, changeType, text, isLoading}, a1) { // fn#81766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10799:483, offset: 0x01edd770, size: 171 bytes, params: 3, frame: 16
const value2 = env0_3(a1);
const LOAD_BEFORE = LoadingType.LOAD_BEFORE;
const r7 = rowType === LOAD_BEFORE ? SeparatorAction.LOAD_MORE_BEFORE : SeparatorAction.LOAD_MORE_AFTER;
const LOADING = RowType.LOADING;
return {type: LOADING, id: rowType, button: {action: {type: r7}, backgroundColor: value2.loadButtonBackgroundColor,
cornerRadius: 4, text: text}, color: isLoading ? value2.loadingColor : value2.loadButtonColor,
changeType: changeType, isLoading: isLoading};
}
@@ -0,0 +1,45 @@
/* Metro module 10612; source: modules/messages/native/renderer/rows/Separator.tsx; dependencies: [8178, 4501, 697, 1360, 2] */
function _fun81763(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10798:6, offset: 0x01edd485, size: 237 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(8178) /* metro dependency 8178: RowGeneratorConstants */;
const env0_2 = value.RowType;
const env0_3 = value.SeparatorType;
value = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = value.createNativeStyleProperties;
object2 = {};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.dayColor = TEXT_MUTED;
const BACKGROUND_FEEDBACK_NOTIFICATION = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_NOTIFICATION;
object2.unreadColor = BACKGROUND_FEEDBACK_NOTIFICATION;
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object2.summaryColor = TEXT_BRAND;
const env0_4 = Reflect.apply(createNativeStyleProperties, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/rows/Separator.tsx');
exports.generateSeparatorRowData = generateSeparatorRowData;
}
function generateSeparatorRowData(a0, a1) { // fn#81764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10798:423, offset: 0x01edd572, size: 271 bytes, params: 3, frame: 17
var summary;
const rowType = a0.rowType;
const changeType = a0.changeType;
const value2 = env0_4(a1);
const DAY = SeparatorType.DAY;
if (DAY === rowType) {
return {type: RowType.SEPARATOR, id: rowType, color: value2.dayColor, text: a0.text, changeType: changeType};
}
const UNREAD = SeparatorType.UNREAD;
if (UNREAD === rowType) {
return {type: RowType.SEPARATOR, id: rowType, color: value2.unreadColor, changeType: changeType, text: a0.text};
}
const SUMMARY = SeparatorType.SUMMARY;
if (SUMMARY === rowType) {
summary = a0.summary;
return {type: RowType.SEPARATOR, id: rowType, color: value2.summaryColor, text: summary.topic, summary: summary,
isBeforeContent: a0.isBeforeContent, changeType: changeType};
}
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(rowType);
}
@@ -0,0 +1,40 @@
/* Metro module 8204; source: modules/messages/native/renderer/system_messages/AddRecipientSystemMessage.tsx; dependencies: [1383, 1379, 1878, 8205, 8207, 1244, 8208, 2] */
function _fun65741(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8389:6, offset: 0x01bdcbe6, size: 156 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/system_messages/AddRecipientSystemMessage.tsx');
exports.createAddRecipientSystemMessage = createAddRecipientSystemMessage;
}
function createAddRecipientSystemMessage(a0) { // fn#65742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8389:293, offset: 0x01bdcc82, size: 366 bytes, params: 2, frame: 25
const message = a0.message;
const roleStyle = a0.roleStyle;
const property = message.mentions[0];
const user = UserStore.getUser(property);
const channel = ChannelStore.getChannel(message.channel_id);
let r4 = channel != null && THREAD_CHANNEL_TYPES.has(channel.type);
const messageAuthorWithProcessedColor = (require(8205) /* metro dependency 8205: useAuthorWithProcessedColor */).getMessageAuthorWithProcessedColor(message);
const userAuthorWithProcessedColor = (require(8205) /* metro dependency 8205: useAuthorWithProcessedColor */).getUserAuthorWithProcessedColor(user,
channel);
const object2 = {};
object2.username = messageAuthorWithProcessedColor.nick;
object2.usernameOnClick = (importDefault(8207) /* metro dependency 8207: formatUsernameOnClick */)({message: message,
author: messageAuthorWithProcessedColor, roleStyle: roleStyle});
object2.otherUsername = userAuthorWithProcessedColor.nick;
object2.otherUsernameOnClick = (importDefault(8207) /* metro dependency 8207: formatUsernameOnClick */)({userId: property,
message: message, author: userAuthorWithProcessedColor, roleStyle: roleStyle});
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToParts = intl.formatToParts;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
r4 = r4 ? Reflect.apply(formatToParts, intl, [t.Vej1Nw, object2]) : Reflect.apply(formatToParts, intl, [t['7/Xl0S'],
object2]);
object3.content = r4;
copyDataProperties(object3, (importDefault(8208) /* metro dependency 8208: createCommonMessage */)(a0), undefined);
return object3;
}
@@ -0,0 +1,42 @@
/* Metro module 8269; source: modules/messages/native/renderer/system_messages/ApplicationCommandSourceSystemMessage.tsx; dependencies: [661, 6625, 8270, 8205, 1244, 8207, 8208, 2] */
function _fun66115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8454:6, offset: 0x01bec7fc, size: 146 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
const env0_4 = (require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */).COMMAND_SENTINEL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/system_messages/ApplicationCommandSourceSystemMessage.tsx');
exports.createApplicationCommandSourceSystemMessage = createApplicationCommandSourceSystemMessage;
}
function createApplicationCommandSourceSystemMessage(a0) { // fn#66116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8454:316, offset: 0x01bec88e, size: 337 bytes, params: 2, frame: 26
const message = a0.message;
const roleStyle = a0.roleStyle;
const value2 = undefined;
const applicationCommand = require(dependencyMap[2]).getApplicationCommand(message.content);
const application = message.application;
const name = application == null ? value2 : application.name;
if (applicationCommand == null) {
return null;
}
if (name == null) {
return null;
}
const messageAuthorWithProcessedColor = require(dependencyMap[3]).getMessageAuthorWithProcessedColor(message);
const object3 = {};
const intl = require(dependencyMap[4]).intl;
const formatToParts = intl.formatToParts;
const property = require(dependencyMap[4]).t['1Zm+zw'];
const object4 = {};
object4.username = messageAuthorWithProcessedColor.nick;
object4.usernameOnClick = importDefault(dependencyMap[5])({message: message,
author: messageAuthorWithProcessedColor, roleStyle: roleStyle});
const type = message.type;
const CHAT_INPUT_COMMAND = MessageTypes.CHAT_INPUT_COMMAND;
object4.commandName = type === CHAT_INPUT_COMMAND ? '' + COMMAND_SENTINEL + applicationCommand.name : applicationCommand.name;
object4.applicationName = name;
object3.content = Reflect.apply(formatToParts, intl, [property, object4]);
copyDataProperties(object3, importDefault(dependencyMap[6])(a0), dependencyMap);
return object3;
}
@@ -0,0 +1,27 @@
/* Metro module 8290; source: modules/messages/native/renderer/system_messages/ApplicationSubscriptionPurchaseSystemMessage.tsx; dependencies: [8205, 8238, 8207, 8208, 2] */
function _fun66164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8475:6, offset: 0x01befc42, 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/messages/native/renderer/system_messages/ApplicationSubscriptionPurchaseSystemMessage.tsx');
exports.createApplicationSubscriptionPurchaseSystemMessage = createApplicationSubscriptionPurchaseSystemMessage;
}
function createApplicationSubscriptionPurchaseSystemMessage(a0) { // fn#66165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8475:276, offset: 0x01befca9, size: 168 bytes, params: 2, frame: 22
const message = a0.message;
const roleStyle = a0.roleStyle;
const messageAuthorWithProcessedColor = (require(8205) /* metro dependency 8205: useAuthorWithProcessedColor */).getMessageAuthorWithProcessedColor(message);
const object3 = {};
const applicationSubscriptionSystemMessageUtilsModule = require(8238) /* metro dependency 8238: ApplicationSubscriptionSystemMessageUtils */;
const getApplicationSubscriptionSystemMessageASTContent = applicationSubscriptionSystemMessageUtilsModule.getApplicationSubscriptionSystemMessageASTContent;
const object4 = {};
object4.application = message.application;
object4.username = messageAuthorWithProcessedColor.nick;
object4.usernameOnClick = (importDefault(8207) /* metro dependency 8207: formatUsernameOnClick */)({message: message,
author: messageAuthorWithProcessedColor, roleStyle: roleStyle});
object3.content = Reflect.apply(getApplicationSubscriptionSystemMessageASTContent,
applicationSubscriptionSystemMessageUtilsModule, [object4]);
copyDataProperties(object3, (importDefault(8208) /* metro dependency 8208: createCommonMessage */)(a0), message);
return object3;
}
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff. Show more