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

No files matched your search

@@ -1,60 +1,63 @@
/* Metro module 11345; source: modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx; dependencies: [6, 7, 661, 4878, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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});
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 CreateClass(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;
}
}
}
}
}
global.__d(_fun86743, 11345, [6, 7, 661, 4878, 2]) /* metro module 11345, dependencies: [6, 7, 661, 4878, 2] */;
+353 -262
View File
@@ -1,17 +1,32 @@
/* 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] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import GatewayConnectionStore from '../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import ReadStateStore from '../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import ThreadActionCreators from '../../threads/ThreadActionCreators.tsx'; /* Metro dependency 7153 */
import UseShowChannelOptInNotice from '../../opt_in_channels/useShowChannelOptInNotice.tsx'; /* Metro dependency 11319 */
import UseAllowedChatOverlays from '../useAllowedChatOverlays.tsx'; /* Metro dependency 11320 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as OptInChannelsActionCreatorsModule from '../../opt_in_channels/OptInChannelsActionCreators.tsx'; /* Metro dependency 6609 */
import * as ThreadHooksModule from '../../threads/ThreadHooks.tsx'; /* Metro dependency 6860 */
import * as ChatOverlayConstantsModule from '../ChatOverlayConstants.tsx'; /* Metro dependency 11318 */
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 OptInChannelBanner2 = 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 */;
let value = ReactNativeModule;
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;
@@ -22,278 +37,354 @@ function _fun86326(global, require, importDefault, importAll, module, exports, d
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.threadBannerContainer = {'alignSelf': 'stretch', 'minHeight': 60, 'flexDirection': 'row',
object.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};
object.threadBannerTitle = {'flex': 1, 'lineHeight': 18};
object.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',
object.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',
object.newMessageBarTextContainer = {'flex': 1, 'paddingLeft': 16, 'paddingVertical': 10};
object.newMessageBarCloseButton = {paddingHorizontal: 12};
const object5 = {'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;
object5.backgroundColor = CHAT_BANNER_BG;
object5.borderBottomWidth = StyleSheet.hairlineWidth;
let CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
object3.borderBottomColor = CHAT_BORDER;
object2.optInChannelBannerContainer = object3;
object5.borderBottomColor = CHAT_BORDER;
object.optInChannelBannerContainer = object5;
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;
object.optInChannelBannerLegacyBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
const object6 = {};
object6.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');
object6.borderTopColor = CHAT_BORDER;
object.topBorder = object6;
object.optInChannelBannerText = {flex: 1};
object.optInChannelBannerButtonContainer = {'flexShrink': 0, 'marginLeft': 8};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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'])}
/>
exports.OptInChannelBanner = OptInChannelBanner2;
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 = (MobileVisualRefreshExperiment)('OptInChannelBanner');
ReactModule.useEffect(_fun86328, [channel]);
const value3 = ReactModule.useCallback(_fun86329, [channel]);
const items2 = [styles.optInChannelBannerContainer];
items2[1] = value2 ? null : styles.optInChannelBannerLegacyBorder;
topBorder = topBorder ? styles.topBorder : null;
items2[2] = topBorder;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const text = (
<Text
lineClamp={2}
style={styles.optInChannelBannerText}
variant="text-sm/semibold"
>
{intl.string((IndexNativeModule).t.iOWmmB)}
</Text>
);
const Button = (ButtonNativeModule).Button;
return (
<View style={items2}>
{text}
<View style={styles.optInChannelBannerButtonContainer}>
<Button
onPress={value3}
size="sm"
text={intl.string((IndexNativeModule).t['TD/+zP'])}
/>
</View>
</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>;
);
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 = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'channel_opt_in';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object]);
}
r0 = r1;
} else {
r0 = null;
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 = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object = {};
const collectGuildAnalyticsMetadata = AppAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, AppAnalyticsUtilsModule,
[Reflect.apply(getGuildId, channelBinding, [])]), undefined);
copyDataProperties(object, AppAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), undefined);
object['banner_type'] = 'channel_opt_in';
object['cta_type'] = 'add channel';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object]);
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}]);
}
}
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 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();
ReactModule.useEffect(_fun86331, [channel]);
const value2 = (ThreadHooksModule).useCanUnarchiveThread(channel);
const Text = (TextModule).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 _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 = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object]);
}
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 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 = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
object['cta_type'] = 'unarchive';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object]);
(ThreadActionCreators).unarchiveThread(channelBinding, false);
}
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;
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();
ReactModule.useEffect(_fun86334, [channel]);
const value2 = (ThreadHooksModule).useIsThreadModerator(channel);
const Text = (TextModule).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 _fun86334() { // fn#86334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3556, offset: 0x01f9164c, size: 141 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object]);
}
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 = AnalyticsUtils;
const track = defaultImport.track;
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
const object = {};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
const channelBinding = channel;
const getGuildId = channelBinding.getGuildId;
copyDataProperties(object, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
channelBinding, [])]), value);
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
object['banner_type'] = 'thread';
object['cta_type'] = 'unlock';
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object]);
(ThreadActionCreators).unlockThread(channelBinding);
}
}
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;
var readStateStoreBinding;
const t = (IndexNativeModule).t;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
var items2;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, FluxModule, [[GatewayConnectionStore], function() {
return GatewayConnectionStore.isConnected();
}, []])) {
if (unreadCount <= 0) {
r1 = null;
} else {
readStateStoreBinding = ReadStateStore;
r23 = readStateStoreBinding.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 = (UseShowChannelOptInNotice)(channel);
const value3 = (UseAllowedChatOverlays)();
const value4 = (FluxModule).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 _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 readStateStoreBinding = ReadStateStore;
const getOldestUnreadTimestamp = readStateStoreBinding.getOldestUnreadTimestamp;
const channelBinding = channel;
const value3 = Reflect.apply(getOldestUnreadTimestamp, readStateStoreBinding, [channelBinding.id]);
const object = {};
object.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;
}
object.oldestUnreadTimestamp = r1;
return object;
}
}
}
global.__d(_fun86326, 11317, [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]) /* metro module 11317, 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] */;
File diff suppressed because it is too large. Load diff
@@ -1,122 +1,129 @@
/* Metro module 8216; source: modules/messages/native/MessageAccessibilityActions.tsx; dependencies: [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228, 2] */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildVerificationStore from '../../../stores/GuildVerificationStore.tsx'; /* Metro dependency 4798 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as DoubleTapExpandExperimentModule from '../../double_tap_to_react/native/DoubleTapExpandExperiment.tsx'; /* Metro dependency 8220 */
import * as CanReplyToMessageModule from '../../replies/canReplyToMessage.tsx'; /* Metro dependency 8228 */
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');
(FileImportTrackerModule).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});
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 = (DoubleTapExpandExperimentModule).DoubleTapExpandExperiment;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value2 = undefined;
const DoubleTapReactionEmoji = (UserSettingsModule).DoubleTapReactionEmoji;
const setting = DoubleTapReactionEmoji.getSetting();
const value4 = null;
if ((value4 == setting ? value2 : setting.disableDoubleTap) === true) {
return value4;
}
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
{emojiName: 'heart'}) : 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;
}
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();
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 object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const value2 = Reflect.apply(string, intl, [t.iXAna6]);
const binding = env0_5;
const VIEW_PROFILE = binding.VIEW_PROFILE;
object[value2] = VIEW_PROFILE;
const value3 = intl.string(t.lfIHs4);
const ADD_REACTION = binding.ADD_REACTION;
object[value3] = ADD_REACTION;
const value4 = intl.string(t['5IEsGx']);
const REPLY = binding.REPLY;
object[value4] = REPLY;
string = intl.string;
const ChPNkN = t.ChPNkN;
const value5 = Reflect.apply(string, intl, [ChPNkN]);
const MESSAGE_ACTIONS_MENU = binding.MESSAGE_ACTIONS_MENU;
object[value5] = MESSAGE_ACTIONS_MENU;
const value6 = intl.string(t['5Q9+/L']);
const EDIT_GDM = binding.EDIT_GDM;
object[value6] = EDIT_GDM;
const quickReactionLabel = getQuickReactionLabel();
if (quickReactionLabel != null) {
items2.push({label: quickReactionLabel, name: env0_5.ADD_QUICK_REACTION});
object[quickReactionLabel] = env0_5.ADD_QUICK_REACTION;
}
return object[a0];
}
const canReplyToMessageModule = require(8228) /* metro dependency 8228: canReplyToMessage */;
if (canReplyToMessageModule.canReplyToMessage(a1, 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 object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.label = Reflect.apply(string, intl, [t.iXAna6]);
const VIEW_PROFILE = env0_5.VIEW_PROFILE;
object.name = VIEW_PROFILE;
const items2 = [object];
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});
}
}
if (CanReplyToMessageModule.canReplyToMessage(a1, a0)) {
push = items2.push;
object = {};
object.label = intl.string(t['5IEsGx']);
object.name = env0_5.REPLY;
Reflect.apply(push, items2, [object]);
}
push = items2.push;
object2 = {};
object2.label = intl.string(t['5IEsGx']);
object2.name = env0_5.REPLY;
Reflect.apply(push, items2, [object2]);
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;
}
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;
}
global.__d(_fun65778, 8216, [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228,
2]) /* metro module 8216, dependencies: [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228, 2] */;
@@ -1,80 +1,109 @@
/* 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] */
import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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');
const createStyles = CreateStylesModule.createStyles;
object = {};
object.contentWrapper = {'paddingHorizontal': 24, 'paddingTop': 8,
paddingBottom: PlatformUtilsModule.isAndroid() ? 16 : value};
object.gameDescriptionWrapper = {'flexDirection': 'column', 'justifyContent': 'flex-start', 'flex': 1};
const object3 = {'width': 56, 'height': 56, 'marginRight': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.gameIcon = object3;
object.gameDescriptionWrapperOuter = {flexDirection: 'row'};
object.timestamp = {marginBottom: 4};
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).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>;
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 object2;
var items4;
var items2;
var TextWithIOSLinkWorkaround;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).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'};
object2 = {};
object2.uri = application?.getIconURL(56) ?? '';
iconProps.source = object2;
iconProps.disableColor = true;
items4 = [
<Icon {...iconProps} />,
];
var viewBinding2Props = {style: styles.gameDescriptionWrapper};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2 = [
<Text
style={styles.timestamp}
variant="text-xs/medium"
color="text-muted"
>
{messageTimestamp}
</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;
}
return r0;
}
global.__d(_fun87512, 11434, [31, 27, 4234, 661, 33, 4501, 477, 697, 566, 6275, 1305, 4573, 6766, 1244, 1948,
2]) /* metro module 11434, dependencies: [31, 27, 4234, 661, 33, 4501, 477, 697, 566, 6275, 1305, 4573, 6766, 1244, 1948, 2] */;
@@ -1,4 +1,15 @@
/* Metro module 9854; source: modules/messages/native/MessageImpressionAnalyticsHelpers.tsx; dependencies: [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098, 2] */
import InviteStore from '../../../stores/InviteStore.tsx'; /* Metro dependency 4097 */
import SortedVoiceStateStore from '../../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CodedLinkModule from '../../coded_links/CodedLink.tsx'; /* Metro dependency 4101 */
import * as InviteTypeUtilsModule from '../../instant_invite/InviteTypeUtils.tsx'; /* Metro dependency 4116 */
import * as ConstantsModule2 from '../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as MessageEmbedConstantsModule from '../../applications/message_embed/MessageEmbedConstants.tsx'; /* Metro dependency 7082 */
import * as MessageViewTrackingManagerModule from '../MessageViewTrackingManager.tsx'; /* Metro dependency 9855 */
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) {
@@ -46,17 +57,7 @@ function _fun77223(global, require, importDefault, importAll, module, exports, d
};
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');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessageImpressionAnalyticsHelpers.tsx');
exports.useShouldTrackAnnouncementMessageViews = useShouldTrackAnnouncementMessageViews;
exports.useShouldTrackRichPresenceInviteEmbedViews = useShouldTrackRichPresenceInviteEmbedViews;
exports.handleAnnouncementMessageViewTracking = handleAnnouncementMessageViewTracking;
@@ -65,471 +66,486 @@ function _fun77223(global, require, importDefault, importAll, module, exports, d
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)) {
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
r6 = value;
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;
}
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;
r5 = value;
}
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);
if (r5) {
if (r5) {
}
return _fun77225;
}
}
}
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);
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 _fun77225() { // fn#77225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:825, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
}
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 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 = (InviteTypeUtilsModule).getInviteType(a0);
const GUILD = InviteTypes.GUILD;
if (inviteType !== GUILD) {
return null;
}
const guildInviteExtendedType = (InviteTypeUtilsModule).getGuildInviteExtendedType(a0);
const GuildInviteExtendedType = (InviteTypeUtilsModule).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 _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;
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 _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 && ReactModule;
r0 = !r0 ? isMessagesReady && messages.some(_fun77230) : r0;
return r0;
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;
}
value15 = value3();
done = value15.done;
if (done) {
break;
if (r0) {
value = environment.__proto__;
value = channel.guild_id != null;
r0 = value;
}
r11 = value15;
continue;
return r0;
}
}
}
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 ReactModule.useMemo(_fun77232, [messages, isMessagesReady]);
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 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 _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 = (MessageViewTrackingManagerModule).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 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 _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 object;
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;
object = {};
object.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED;
id = message.id;
object.messageId = id;
id = importAll.id;
object.channelId = id;
object.guildId = importDefault;
id = message.application.id;
object.applicationId = id;
object.linkType = LinkType.RICH_PRESENCE_INVITE;
Reflect.apply(push, binding, [object]);
}
}
}
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 ReactModule.useMemo(_fun77239, [value, isMessagesReady, messages]);
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 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 _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 object;
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;
object = {};
object.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE;
id = message.id;
object.messageId = id;
id = importAll.id;
object.channelId = id;
object.guildId = importDefault;
Reflect.apply(push, binding, [object]);
}
}
}
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 ReactModule.useMemo(_fun77244, [messages, isMessagesReady]);
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 _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;
});
function _fun77246({type}) { // fn#77246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4637, offset: 0x01df6982, size: 51 bytes, params: 2, frame: 12
const CodedLinkType = (CodedLinkModule).CodedLinkType;
const INVITE = CodedLinkType.INVITE;
return type === INVITE;
}
}
}
}
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 _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 inviteStoreBinding;
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 object;
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) {
inviteStoreBinding = InviteStore;
getInvite = inviteStoreBinding.getInvite;
code = value7.code;
value8 = Reflect.apply(getInvite, inviteStoreBinding, [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;
object = {};
MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
VOICE_INVITE_EMBED = MessageViewTrackingType.VOICE_INVITE_EMBED;
object.type = VOICE_INVITE_EMBED;
id = message.id;
object.messageId = id;
id = importAll.id;
object.channelId = id;
object.guildId = importDefault;
code = value7.code;
object.inviteCode = code;
object.inviteGuildId = r31;
object.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;
object.inviteInstanceId = r43;
treatmentRendered = voiceInviteEmbedRenderInfo.treatmentRendered;
object.treatmentRendered = treatmentRendered;
object.hasActiveStream = r0;
Reflect.apply(push, binding, [object]);
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;
});
}
global.__d(_fun77223, 9854, [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098,
2]) /* metro module 9854, dependencies: [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098, 2] */;
@@ -1,152 +1,164 @@
/* 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] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from '../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import InAppNotificationActionCreators from '../../../actions/native/InAppNotificationActionCreators.tsx'; /* Metro dependency 10920 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule2 from '../../local_push_notification/native/Constants.tsx'; /* Metro dependency 12560 */
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 */;
let value = ConstantsModule;
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');
(FileImportTrackerModule).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;
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) {
}
if (channelId === SelectedChannelStore.getChannelId(SelectedGuildStore.getGuildId())) {
return undefined;
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 guildId;
var selectedChannelStoreBinding;
var defaultImport;
var enqueueNotification;
var object;
var defaultImport2;
var presentLocalNotification;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).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;
object = {category: 'local'};
object.alertTitle = intl.string(t.LdlH2M);
object.alertBody = intl.string(t.xxRPOT);
object.userInfo = {channelId: channelId, messageId: messageId,
type: LocalNotificationTypes.MESSAGE_SEND_FAILED};
Reflect.apply(presentLocalNotification, defaultImport2, [object]);
return undefined;
}
guildId = SelectedGuildStore.getGuildId();
selectedChannelStoreBinding = SelectedChannelStore;
if (channelId === selectedChannelStoreBinding.getChannelId(guildId)) {
return undefined;
}
defaultImport = importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */;
enqueueNotification = defaultImport.enqueueNotification;
object = {};
object.type = InAppNotificationTypes.MESSAGE_FAILED_TO_SEND;
object.channelId = channelId;
object.messageId = messageId;
object.key = channelId + '-' + messageId;
object.duration = 5000;
object.onDismiss = onDismiss_124881;
object.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId();
Reflect.apply(enqueueNotification, defaultImport, [object]);
}
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 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__;
(InAppNotificationActionCreators).clearNotification();
}
}
}
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;
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);
}
}
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 MessageSendFailureNotificationManager2 = MessageSendFailureNotificationManager;
Inherits(MessageSendFailureNotificationManager2, a0);
return CreateClass(MessageSendFailureNotificationManager2);
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 items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(MessageSendFailureNotificationManager);
binding = env1_5;
if (_isNativeReflectConstruct_124877()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {MESSAGE_CREATE: handleMessageCreate_124882, MESSAGE_SEND_FAILED: handleMessageSendFailure};
return value;
}
}
}
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;
}
global.__d(_fun124876, 16154, [7, 6, 15, 17, 18, 1934, 3969, 1878, 7030, 661, 12560, 10920, 10921, 10741, 1244,
4860,
2]) /* metro module 16154, dependencies: [7, 6, 15, 17, 18, 1934, 3969, 1878, 7030, 661, 12560, 10920, 10921, 10741, 1244, 4860, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+358 -323
View File
@@ -1,4 +1,16 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import GuildAvailabilityStore from '../../../stores/GuildAvailabilityStore.tsx'; /* Metro dependency 4646 */
import VoiceChannelStartTimeStore from '../../channel/VoiceChannelStartTimeStore.tsx'; /* Metro dependency 9858 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ShallowEqualModule from '../../../external/discord_common/js/packages/shallow-equal/shallowEqual.tsx'; /* Metro dependency 628 */
import * as UseChatBottomManagerUIStoreModule from '../../chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */
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) {
@@ -46,357 +58,380 @@ function _fun86505(global, require, importDefault, importAll, module, exports, d
};
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;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/MessagesHooks.tsx');
exports.useMessageAuthorActivities = useMessageAuthorActivities_86509;
exports.useFetchMessageApplications = useFetchMessageApplications_86514;
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)) {
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
r6 = value;
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;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun86507;
}
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 _fun86507() { // fn#86507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:805, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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;
function useMessageAuthorActivities_86509(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,
[ReactModule.useMemo(function() {
var object = {};
object.forEach(_fun86511);
return object;
}, [a0])]);
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 object = {};
object.forEach(_fun86511);
return object;
function _fun86511(a0) { // fn#86511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1339, offset: 0x01f93bdc, size: 57 bytes, params: 2, frame: 4
if (a0.author != null && a0.activity != null) {
env0_0[a0.author.id] = null;
}
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])) {
}
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 useFetchMessageApplications_86514(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 value = ReactModule.useMemo(function() {
var value2 = new global.Set();
value2.forEach(_fun86516);
return global.Array.from(value2);
}, [a0]);
const env0_2 = ReactModule.useRef([]);
ReactModule.useEffect(_fun86517, [value]);
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 _fun86516(a0) { // fn#86516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1647, offset: 0x01f93d0d, size: 55 bytes, params: 2, frame: 12
var binding;
if (a0.applicationId != null && a0.application == null) {
binding = env0_0;
binding.add(a0.applicationId);
}
}
}
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 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 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;
ReactModule.useEffect(_fun86520, [a0,
(FluxModule).useStateFromStoresObject([GuildStore, GuildAvailabilityStore],
_fun86519, [a0])]);
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 guildStoreBinding;
var getGuild;
var value7;
var guildAvailabilityStoreBinding;
var isUnavailable;
var value8;
var value9;
const object = {};
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;
id = guild.id;
value7 = env0_1[id] !== true;
if (value7) {
r12 = value7;
continue;
}
hasRequestedStartTimes2 = VoiceChannelStartTimeStore.hasRequestedStartTimes(id);
r12 = hasRequestedStartTimes2;
if (r12) {
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;
guildStoreBinding = GuildStore;
getGuild = guildStoreBinding.getGuild;
value7 = Reflect.apply(getGuild, guildStoreBinding, [id]) != null;
if (!value7) {
r10 = value7;
continue;
}
guildAvailabilityStoreBinding = GuildAvailabilityStore;
isUnavailable = guildAvailabilityStoreBinding.isUnavailable;
value8 = !Reflect.apply(isUnavailable, guildAvailabilityStoreBinding, [id]);
r10 = value8;
object[id] = r10;
break;
}
break;
}
moduleValue2 = require(11331) /* metro dependency 11331: ChannelInfoActionCreators */;
moduleValue2.fetchChannelInfo(id);
break;
value9 = value4();
done = value9.done;
if (done) {
break;
}
r3 = value9;
continue;
}
break;
}
value8 = value4();
done = value8.done;
if (done) {
break;
}
r3 = value8;
continue;
return object;
}
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 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 _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 _fun86524() { // fn#86524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2935, offset: 0x01f96f01, size: 31 bytes, params: 1, frame: 15
updateShouldShowJumpToPresentButton(channelId, screenIndex, false);
}
}
}
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 value = Module00057(ReactModule.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 = ReactModule.useCallback;
return [property, Reflect.apply(useCallback, ReactModule, [function(a0) {
a0(_fun86527);
}, []])];
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 _fun86527(a0) { // fn#86527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3229, offset: 0x01d0cd72, size: 28 bytes, params: 2, frame: 11
const object = {};
copyDataProperties(object, a0, undefined);
copyDataProperties(object, env0_0, environment);
return object;
}
}
}
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 value = ReactModule.useMemo(_fun86529, [a0, a1]);
ReactModule.useEffect(function() {
return _fun86533;
}, [value]);
return value;
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 _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 _fun86532() { // fn#86532, offset: 0x01f97077, size: 11 bytes, params: 1, frame: 1
return _fun86533;
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();
}
}
}
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
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [false]);
let value = Module00057(value2, 2);
const property = value[0];
const property2 = value[1];
useState = ReactModule.useState;
value = Module00057(Reflect.apply(useState, ReactModule, [false]), 2);
return {shouldForceRender: property, hasJumpedToOriginalPost: value[0], setHasJumpedToOriginalPost: value[1],
setShouldForceRender: property2};
}
}
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();
}
global.__d(_fun86505, 11330, [57, 31, 27, 9858, 7729, 4646, 1867, 4396, 566, 22, 628, 6772, 1360, 4116, 11331, 9835,
11332,
2]) /* metro module 11330, dependencies: [57, 31, 27, 9858, 7729, 4646, 1867, 4396, 566, 22, 628, 6772, 1360, 4116, 11331, 9835, 11332, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,94 +1,117 @@
/* 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] */
import GuildRoleStore from '../../../stores/GuildRoleStore.tsx'; /* Metro dependency 1938 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ChannelMemberStoreModule from '../../../stores/ChannelMemberStore.tsx'; /* Metro dependency 6875 */
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 */;
let value = JsxRuntimeModule;
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'};
object = {};
const object2 = {'flexDirection': 'row', 'alignItems': 'center'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.gap = PX_4;
object2.gap = PX_4;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingTop = PX_12;
object2.paddingTop = PX_12;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.paddingBottom = PX_4;
object2.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};
object2.paddingHorizontal = PX_16;
object.header = object2;
object.headerText = {flex: 1};
object.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');
object.memberCount = {color: TEXT_MUTED};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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;
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]);
let useStateFromStores = FluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[GuildRoleStore], function() {
return GuildRoleStore.getRole(guildId, roleId);
}, [guildId, roleId]]);
var env0_3 = value3;
useStateFromStores = FluxModule.useStateFromStores;
const r13 = Reflect.apply(useStateFromStores, FluxModule, [[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;
r0 = <RoleDot color={binding.colorString} colors={binding.colorStrings} size="small" containerStyles={styles.roleDot} />;
} else {
r0 = value3;
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 = (TextModule).Text;
var r0;
var RoleDot;
var binding;
const value = environment.__proto__;
const value3 = null;
if (ReactNativeModule.View) {
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>
);
}
}
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>
);
}
global.__d(_fun87242, 11381, [31, 27, 4502, 6875, 1938, 33, 4501, 697, 21, 6738, 566, 6736, 1305, 4573, 6275, 11382,
2]) /* metro module 11381, dependencies: [31, 27, 4502, 6875, 1938, 33, 4501, 697, 21, 6738, 566, 6736, 1305, 4573, 6275, 11382, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 11274; source: modules/messages/native/VisibleMessagesWindowHandler.tsx; dependencies: [7, 6, 8178, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as RowGeneratorConstantsModule from './renderer/RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
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;
let value = CreateClass;
value = value(function() {
this(this, VisibleMessagesWindowHandler);
this.data = null;
@@ -13,157 +16,157 @@ function _fun86106(global, require, importDefault, importAll, module, exports, d
this.clearCallback = _fun86110;
this.handleScrollPosition = _fun86111;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/VisibleMessagesWindowHandler.tsx');
(FileImportTrackerModule).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;
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;
}
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;
if ('rowType' in a0) {
if (a0.rowType === RowType.MESSAGE) {
return a0.message.id;
}
} else {
r4 = null;
return undefined;
}
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;
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 = ClassCallCheck;
binding.callback = a0;
if (binding.data != null) {
binding = ClassCallCheck;
binding.callback(binding.data);
}
} 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;
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
ClassCallCheck.callback = null;
ClassCallCheck.data = null;
}
function handleScrollPosition({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 (ClassCallCheck.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;
}
value12 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = rows.length;
if (value12 < length) {
r7 = value12;
continue;
} 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;
break;
}
} else {
r3 = null;
}
} else {
r3 = null;
binding = ClassCallCheck;
binding.data = {topVisibleMessage: r4, middleVisibleMessage: r3, bottomVisibleMessage: r1};
binding.callback(binding.data);
}
} else {
r3 = null;
}
binding = env0_0;
binding.data = {topVisibleMessage: r4, middleVisibleMessage: r3, bottomVisibleMessage: r1};
binding.callback(binding.data);
}
}
global.__d(_fun86106, 11274, [7, 6, 8178, 2]) /* metro module 11274, dependencies: [7, 6, 8178, 2] */;
@@ -1,43 +1,49 @@
/* Metro module 7214; source: modules/messages/native/burst_reactions/BurstReactionAnimation.tsx; dependencies: [31, 4502, 33, 4501, 7172, 566, 7215, 6760, 2] */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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');
ReactModule;
const env0_5 = (CreateStylesModule).createStyles({content: {width: '100%'}});
(FileImportTrackerModule).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 object = {'channelId': 0, 'messageId': 0, 'emoji': 0, 'isFullscreen': 0, 'onComplete': 0, 'withFadeOut': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, 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 object3 = {};
if (withFadeOut) {
object3.onComplete = onComplete;
} else {
object3.onAnimationFinish = onComplete;
}
return ((Component) => <Component style={styles.content} loop={false} speed={useReducedMotion ? 0.5 : 1.2} {...value} {...object3} {...{['source']: value3}} />)(defaultImport);
}
}
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);
}
global.__d(_fun57703, 7214, [31, 4502, 33, 4501, 7172, 566, 7215, 6760,
2]) /* metro module 7214, dependencies: [31, 4502, 33, 4501, 7172, 566, 7215, 6760, 2] */;
@@ -1,239 +1,286 @@
/* 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] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import HapticFeedbackTypes from '../../../haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as NativeModule2 from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as HapticUtilsNativeModule from '../../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as BurstReactionEffectUtilsModule from './BurstReactionEffectUtils.tsx'; /* Metro dependency 7172 */
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 */;
let value = ReactNativeModule;
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);
object = {};
const object2 = {};
copyDataProperties(object2, 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,
object2['backgroundColor'] = BLACK;
const BACKDROP_OPACITY = (BurstReactionEffectUtilsModule).BACKDROP_OPACITY;
object2['opacity'] = BACKDROP_OPACITY;
object.background = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['flex'] = 1;
object3['alignItems'] = 'center';
object3['justifyContent'] = 'center';
object.fill = object3;
object.dismissTextContainer = {'position': 'absolute', 'bottom': 48, 'zIndex': 1};
const object4 = {'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');
object4.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.dismissTextBackground = object4;
const env0_11 = Reflect.apply(createStyles, value, [object]);
object = {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})};}"};
object = {code: 'function BurstReactionAnimationContainerTsx2(finished){const{runOnJS,handleComponentFinish}=this.__closure;if(finished)runOnJS(handleComponentFinish)();}'};
(FileImportTrackerModule).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;
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 handleComponentFinish2 = handleComponentFinish;
const env0_0 = useStyles();
const binding = env0_4Binding;
const value2 = null;
const [property, env0_2] = Module00057(binding.useState(value2), 2);
var [property2, env0_4] = Module00057(env0_4Binding.useState(false), 2);
const env0_5 = env0_4Binding.useRef(false);
env0_4Binding.useEffect(_fun116714, []);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const BurstReactionAnimationContainerInnerY2 = BurstReactionAnimationContainerInnerY;
const object = {animationData: property, showAnimation: property2};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.handleComponentFinish = handleComponentFinish2;
BurstReactionAnimationContainerInnerY2.__closure = object;
BurstReactionAnimationContainerInnerY2.__workletHash = 12044515783370;
BurstReactionAnimationContainerInnerY2.__initData = env0_12;
const env0_6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [BurstReactionAnimationContainerInnerY2]);
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 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 BurstReactionAnimationContainerInnerHandleAnimationFinish(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 handleEffectReceived2 = handleEffectReceived;
const value = environment.__proto__;
(Dispatcher).subscribe('BURST_REACTION_EFFECT_SEND',
handleEffectReceived2);
return _fun116716;
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 triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_HEAVY = (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 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 object;
var value2;
var moduleValue;
var withTiming;
var object2;
var yN2;
var object3;
if (env0_1 == null) {
r0 = {opacity: 0};
} else {
binding = Module00057;
object = {};
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object2 = {duration: 300};
if (binding) {
object.opacity = Reflect.apply(withTiming, moduleValue, [1, object2]);
r0 = object;
} else {
yN2 = yN;
object3 = {};
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object3.handleComponentFinish = handleComponentFinish;
yN2.__closure = object3;
yN2.__workletHash = 9326347209552;
yN2.__initData = env1_13;
object.opacity = Reflect.apply(withTiming, moduleValue, [0, object2, 'respect-motion-settings', yN2]);
r0 = object;
}
}
return r0;
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 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 object;
var intl;
const value = environment.__proto__;
const OverlayView = (NativeModule).OverlayView;
const object3 = {};
let stylesBinding = styles;
let fill = stylesBinding.fill;
object3.style = fill;
const View2 = (ReanimatedRexport).View;
const items3 = [stylesBinding.fill, env0_6];
const object6 = {};
const BACKDROP_OPACITY = (BurstReactionEffectUtilsModule).BACKDROP_OPACITY;
object6.activeOpacity = BACKDROP_OPACITY;
object6.onPress = function() {
BurstReactionAnimationContainerInnerHandleAnimationFinish(_fun116721);
};
object6.style = stylesBinding.fill;
const items2 = [
<View style={stylesBinding.background} />,
];
fill = stylesBinding.fill;
if (Module00057) {
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() {
BurstReactionAnimationContainerInnerHandleAnimationFinish();
}}
/>
);
} else {
r15 = null;
}
items2[1] = (
<View style={fill}>
{r15}
</View>
);
const DismissibleContent = (Dismissible_contentModule).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;
object = {};
stylesBinding = styles;
object.style = stylesBinding.dismissTextContainer;
object.variant = 'text-sm/medium';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r11 = (
<>
<Text {...object}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QpPMih)}
</Text>
<View style={stylesBinding.dismissTextBackground} />
</>
);
} else {
r11 = value6;
}
items2[2] = r11;
return (
<OverlayView {...object3}>
<View2 style={items3}>
<TouchableOpacity {...object6}>
{items2}
</TouchableOpacity>
</View2>
</OverlayView>
);
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
BurstReactionAnimationContainerInnerHandleAnimationFinish(function() {
return markAsDismissed(ContentDismissActionType.UNKNOWN);
});
function _fun116721() { // fn#116721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2816, offset: 0x02494e33, size: 29 bytes, params: 1, frame: 11
const markAsDismissedBinding = markAsDismissed;
const UNKNOWN = ContentDismissActionType.UNKNOWN;
return markAsDismissedBinding(UNKNOWN);
}
}
}
}
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;
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 = (NativeModule2).ThemeContextProvider;
const DARKER = (Native).themes.DARKER;
return (
<ThemeContextProvider theme={DARKER}>
<BurstReactionAnimationContainerInner />
</ThemeContextProvider>
);
}
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);
});
}
global.__d(_fun116710, 15265, [57, 31, 27, 1376, 33, 4501, 697, 7172, 4081, 4082, 694, 4017, 4504, 10357, 1365,
1305, 7214, 4573, 1244, 3868,
2]) /* metro module 15265, dependencies: [57, 31, 27, 1376, 33, 4501, 697, 7172, 4081, 4082, 694, 4017, 4504, 10357, 1365, 1305, 7214, 4573, 1244, 3868, 2] */;
@@ -1,26 +1,31 @@
/* Metro module 7213; source: modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx; dependencies: [31, 33, 7152, 7214, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as MessageReactionsTypesModule from '../../MessageReactionsTypes.tsx'; /* Metro dependency 7152 */
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');
ReactModule;
(FileImportTrackerModule).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;
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 = (MessageReactionsTypesModule).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;
}
return r0;
}
global.__d(_fun57701, 7213, [31, 33, 7152, 7214, 2]) /* metro module 7213, dependencies: [31, 33, 7152, 7214, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,128 +1,142 @@
/* Metro module 7215; source: modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx; dependencies: [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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%'}});
const env0_7 = (CreateStylesModule).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');
(FileImportTrackerModule).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) {
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 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();
let useState = ReactModule.useState;
const value5 = Reflect.apply(useState, ReactModule, [false]);
const value6 = Module00057(value5, 2);
const property = value6[0];
const value7 = 1;
const env0_2 = value6[value7];
useState = ReactModule.useState;
const value8 = Module00057(Reflect.apply(useState, ReactModule, [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;
ReactModule.useEffect(closure, []);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = FadeOutLottieAnimationT;
object = {isAnimationComplete: property, isFadeOut: property2};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.setIsFadeOut = property3;
closure.__closure = object;
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;
object = {style: value9};
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
value = (
<View {...object}>
{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish_57712} {...value3} />)(value)}
</View>
);
r0 = value;
} else {
r0 = value;
}
} else {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {style: value9};
object = {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 {
value = (
<View {...object}>
{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish_57712} {...value3} />)(value)}
</View>
);
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;
return r0;
function _fun57709() { // fn#57709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1002, offset: 0x016b4188, size: 18 bytes, params: 1, frame: 11
env0_2(false);
}
} 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 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 TT_577112;
var object;
const binding = env0_1;
const object3 = {};
if (binding) {
if (Module00057) {
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
TT_577112 = TT_57711;
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.setIsFadeOut = ReactModule;
TT_577112.__closure = object;
TT_577112.__workletHash = 14133863353798;
TT_577112.__initData = env1_9;
object3.opacity = Reflect.apply(withTiming, moduleValue, [0, {duration: 300}, 'respect-motion-settings',
TT_577112]);
} else {
object3.opacity = 0;
}
} else {
object3.opacity = 1;
}
return object3;
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);
}
}
}
function FadeOutLottieAnimationOnAnimationFinish(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);
}
}
global.__d(_fun57706, 7215, [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760,
2]) /* metro module 7215, dependencies: [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760, 2] */;
@@ -1,32 +1,37 @@
/* Metro module 8573; source: modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx; dependencies: [31, 33, 7172, 7215, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as BurstReactionEffectUtilsModule from './BurstReactionEffectUtils.tsx'; /* Metro dependency 7172 */
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');
ReactModule;
(FileImportTrackerModule).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;
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 = (BurstReactionEffectUtilsModule).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;
}
return r0;
}
global.__d(_fun67838, 8573, [31, 33, 7172, 7215, 2]) /* metro module 8573, dependencies: [31, 33, 7172, 7215, 2] */;
@@ -1,16 +1,28 @@
/* 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] */
import Module00022 from '../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import SuperReactionLocalImageAnimation from './SuperReactionLocalImageAnimation.tsx'; /* Metro dependency 8573 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as Dismissible_contentModule from '../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as PremiumUtilsModule from '../../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import * as Module07183Module from '../../../../by-id/module-07183.js'; /* Metro dependency 7183 */
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 */;
let value = ReactNativeModule;
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 DismissibleContent = (Dismissible_contentModule).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 */,
@@ -19,90 +31,92 @@ function _fun67825(global, require, importDefault, importAll, module, exports, d
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;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['flex'] = 1;
object2['alignItems'] = 'center';
object2['justifyContent'] = 'center';
object2['top'] = -150;
object.fill = object2;
const WHITE = (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');
(FileImportTrackerModule).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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object;
const styles = useStyles();
const env0_1 = (UseAnalyticsLocations)().analyticsLocations;
const object2 = {};
const PREMIUM_UPSELL_BURST_REACTIONS = AnalyticsPages.PREMIUM_UPSELL_BURST_REACTIONS;
object2.page = PREMIUM_UPSELL_BURST_REACTIONS;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (PremiumUtilsModule).isPremium(currentUser);
const useMemo = ReactModule.useMemo;
if (isPremium2) {
r0 = null;
} else {
PremiumUpsellTooltipActionSheet = importDefault(8574) /* metro dependency 8574: PremiumUpsellTooltipActionSheet */;
var premiumUpsellTooltipActionSheetProps = {title: intl.string(t.Wfl5zp)};
object = {};
object.backdropOpacity = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
object.backdropChildren = Reflect.apply(useMemo, ReactModule, [_fun67828, [styles]]);
premiumUpsellTooltipActionSheetProps.backdropProps = object;
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 = Module00022;
return (
<View style={styles.fill}>
{((Component) => <Component localImageSource={binding[defaultImport.random(0,
binding.length - 1)]} animationSource={Module07183Module} />)(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 = (NativeModule).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 object = {};
object.analyticsLocation = env0_2;
object.analyticsLocations = analyticsLocations;
const PremiumFeatureCardOrder = require(dependencyMap[21]).PremiumFeatureCardOrder;
const TIER_2_LEADING = PremiumFeatureCardOrder.TIER_2_LEADING;
object.premiumFeatureCardOrder = TIER_2_LEADING;
Reflect.apply(pushLazy, defaultImport2, [value, object]);
}
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]);
}
global.__d(_fun67825, 8565, [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]) /* metro module 8565, 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] */;
File diff suppressed because it is too large. Load diff
@@ -1,16 +1,36 @@
/* 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] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumUtils from '../../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import SubscriptionRoleStore from '../../../guild_role_subscriptions/SubscriptionRoleStore.tsx'; /* Metro dependency 6541 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import TidaWebformExperiment from '../../../guild/TidaWebformExperiment.tsx'; /* Metro dependency 6796 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as OpenUserSettingsModule from '../../../user_settings/core/native/openUserSettings.tsx'; /* Metro dependency 7007 */
import * as EmojiPickerUtilsModule from '../../../emoji_picker/EmojiPickerUtils.tsx'; /* Metro dependency 8533 */
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
import * as EmojiActionCreatorsModule from '../../../../actions/EmojiActionCreators.tsx'; /* Metro dependency 8629 */
import * as GetEmojiPopoutMessageModule from '../../getEmojiPopoutMessage.tsx'; /* Metro dependency 8632 */
import * as StarOutlineIconModule from '../../../../design/components/Icon/native/redesign/generated/StarOutlineIcon.tsx'; /* Metro dependency 8635 */
import * as GuildUtilsModule from '../../../guild/GuildUtils.tsx'; /* Metro dependency 8640 */
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 */;
let value = ReactNativeModule;
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;
@@ -22,398 +42,480 @@ function _fun68107(global, require, importDefault, importAll, module, exports, d
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',
object = {nitroWheel: {'height': 32, 'width': 32}};
const CONTROL_BRAND_FOREGROUND_NEW = (Native).colors.CONTROL_BRAND_FOREGROUND_NEW;
object.nitroWheelPurple = {tintColor: CONTROL_BRAND_FOREGROUND_NEW};
object.emojiDescriptionWrapperOuter = {'flexDirection': 'row', 'flex': 1, 'alignItems': 'center', 'gap': 8};
object.starIcon = {'height': 32, 'width': 32, 'margin': 0, 'padding': 0, 'flex': 0};
const ICON_FEEDBACK_WARNING = (Native).colors.ICON_FEEDBACK_WARNING;
object.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
object.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
const INTERACTIVE_ICON_DEFAULT = (Native).colors.INTERACTIVE_ICON_DEFAULT;
object.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',
object.bottomCtaButton = {marginTop: 24};
object.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');
const WHITE = (Native).colors.WHITE;
object.betaTag = {backgroundColor: WHITE};
const BRAND_530 = (Native).unsafe_rawColors.BRAND_530;
object.betaTagTextAddPack = {color: BRAND_530};
const PRIMARY_500 = (Native).unsafe_rawColors.PRIMARY_500;
object.betaTagTextRemovePack = {color: PRIMARY_500};
const PX_4 = (Native).space.PX_4;
object.favoriteButtonContainer = {paddingTop: PX_4};
const env0_17 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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;
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 = (TextModule).Text;
var r19;
var r32;
var r27;
var r5;
var r16;
var moduleValue4;
var object;
var StarOutlineIcon;
var object4;
var StarIcon;
var object7;
const Button = (ButtonNativeModule).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 object10 = {};
const styles = useStyles();
copyDataProperties(object10, styles, undefined);
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object10, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const isPremium2 = (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 = (UseAnalyticsLocations)().analyticsLocations;
const {isRoleSubscriptionEmoji, isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber} = ReactModule.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 {
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} />;
moduleValue4 = require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */;
r19 = moduleValue4.shouldHideGuildPurchaseEntryPoints(customEmojiFromJoinedGuild?.guildId);
}
const value10 = (EmojiPickerUtilsModule).useIsFavoriteEmoji(guildId2,
customEmojiFromJoinedGuild);
let defaultImport2 = TidaWebformExperiment;
const useExperiment = defaultImport2.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'CustomEmojiContent'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value11 = DeveloperMode.useSetting();
r1 = expressionSourceGuild?.isDiscoverable();
const r9 = r1 != null && r1;
const object12 = {};
object12.page = guildId2 != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL;
const EMOJI_UPSELL_POPOUT = AnalyticsSections.EMOJI_UPSELL_POPOUT;
object12.section = EMOJI_UPSELL_POPOUT;
const emojiPopoutData = (GetEmojiPopoutMessageModule).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 onPress_681152 = 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 = (GetEmojiPopoutMessageModule).EmojiPopoutType;
let JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
const value16 = type === JOIN_GUILD;
const object13 = {};
let GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
const items4 = [GET_PREMIUM];
JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
items4[1] = JOIN_GUILD;
copyDataProperties(object13, items4.includes(type) ? object10.ctaButton : object10.bottomCtaButton, undefined);
object13['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
const object14 = {};
copyDataProperties(object14, object10.emojiContainer, undefined);
object14['marginTop'] = 8;
const value17 = ((Component) => <Component style={object10.emojiIcon} source={{uri: emojiNode.src}} />)(FastImage);
const emojiDescriptionWrapperOuter = object10.emojiDescriptionWrapperOuter;
const items7 = [
<View style={object10.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 {
StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
object3 = {};
copyDataProperties(object3, object6.starIconUnselected, copyDataProperties(object3, object6.starIcon,
undefined));
r32 = <StarOutlineIcon style={object3} />;
object = {};
string = intl.string;
r32 = value10 ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
object.accessibilityLabel = r32;
object.style = object10.moreMenuIcon;
object.onPress = onPress_681152;
if (value10) {
StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
object7 = {};
copyDataProperties(object7, object10.starIcon, undefined);
copyDataProperties(object7, object10.starIconSelected, undefined);
r32 = <StarIcon style={object7} />;
} else {
StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
object4 = {};
copyDataProperties(object4, object10.starIconUnselected, copyDataProperties(object4, object10.starIcon,
undefined));
r32 = <StarOutlineIcon style={object4} />;
}
r27 = (
<Pressable {...object}>
{r32}
</Pressable>
);
}
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}</>;
r27 = null;
}
} 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}</>;
items7[1] = r27;
items7[2] = (
tidaWebformEnabled && value11
? (
<Pressable
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)}
style={object10.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={object14}>
{value17}
<View style={emojiDescriptionWrapperOuter}>
{items7}
</View>
</View>,
];
GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
items8[1] = (
type === GET_PREMIUM
? renderPremiumUpsellButton()
: (
value16
? (
<View style={object13}>
<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;
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
items9 = [
<FormDivider style={object10.divider} />,
];
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;
const FormDivider2 = (require(7972) /* metro dependency 7972: native */).FormDivider;
items9 = [
<FormDivider2 style={object10.divider} />,
];
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;
}
} 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};
items8[2] = r5;
if (r8) {
if (tidaWebformEnabled) {
jsxRuntimeEnv0_16Binding3 = jsxRuntimeEnv0_16;
const FormDivider3 = (require(7972) /* metro dependency 7972: native */).FormDivider;
items11 = [
<FormDivider3 style={object10.divider} />,
];
var viewBindingProps = {style: object10.favoriteButtonContainer};
object10 = {};
string = intl.string;
r16 = value10 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67]);
object10.text = r16;
r16 = value10 ? 'tertiary' : 'primary';
object10.variant = r16;
object10.size = 'md';
object10.onPress = onPress_681152;
items11[1] = (
<View {...viewBindingProps}>
<Button {...object10} />
</View>
);
r5 = (
<>
{items11}
</>
);
} else {
r5 = null;
}
} 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;
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 object;
var moduleValue;
var isPurchasableRoleSubscriptionEmoji;
var moduleValue2;
var subscriptionRoleStoreBinding;
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 {
object = {};
moduleValue = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
isPurchasableRoleSubscriptionEmoji = moduleValue.isPurchasableRoleSubscriptionEmoji;
customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
object.isRoleSubscriptionEmoji = Reflect.apply(isPurchasableRoleSubscriptionEmoji, moduleValue,
[customEmojiFromJoinedGuildBinding]);
moduleValue2 = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
object.isUnusableRoleSubscriptionEmoji = moduleValue2.isUnusableRoleSubscriptionEmoji(customEmojiFromJoinedGuildBinding,
guildId ?? undefined);
subscriptionRoleStoreBinding = SubscriptionRoleStore;
object.userIsRoleSubscriber = subscriptionRoleStoreBinding.getUserSubscriptionRoles(customEmojiFromJoinedGuild.guildId).size > 0;
r0 = object;
}
}
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 = 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 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 object = {};
const binding = env0_5;
copyDataProperties(object, binding.starIcon, undefined);
if (isSelected) {
copyDataProperties(object, binding.starIconSelected, undefined);
value = environment.__proto__;
const StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
return <StarIcon style={object} />;
}
copyDataProperties(object, binding.starIconUnselected, undefined);
const StarOutlineIcon = (StarOutlineIconModule).StarOutlineIcon;
return <StarOutlineIcon style={object} />;
}
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 content2 = content;
const binding = env0_9;
if (binding) {
EmojiActionCreatorsModule.unfavoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_UNFAVORITED', icon: function() {
return renderStarIcon({isSelected: false});
}, content: content2});
} else {
EmojiActionCreatorsModule.favoriteEmoji(customEmojiFromJoinedGuild);
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
value.open({key: 'EMOJI_FAVORITED', icon: icon, content: content2});
}
function content() { // 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 = (TextModule).Text;
const binding = env1_9;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).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 _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 object;
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) {
object = {};
copyDataProperties(object, nitroWheel, undefined);
copyDataProperties(object, binding.nitroWheelPurple, undefined);
r4 = object;
} else {
r4 = nitroWheel;
}
value = environment.__proto__;
const NitroWheel = (NativeModule).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 = (GetEmojiPopoutMessageModule).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 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}]);
}
}
}
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;
GuildUtilsModule.handleJoinGuild(expressionSourceGuild == null ? value : expressionSourceGuild.id);
return value;
}
}
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}]);
}
}
global.__d(_fun68107, 8631, [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]) /* metro module 8631, 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] */;
@@ -1,88 +1,94 @@
/* Metro module 8645; source: modules/messages/native/emoji/EmojiGrid.tsx; dependencies: [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649, 2] */
import Emoji from '../../../emojis/native/Emoji.tsx'; /* Metro dependency 6739 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
import * as LayoutUtilsModule from '../../../guild_role_subscriptions/native/components/LayoutUtils.tsx'; /* Metro dependency 8649 */
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,
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'height': 40, 'width': 40};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{gridEmojiFastImage: object2,
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');
(FileImportTrackerModule).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;
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();
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}
/>
);
}
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 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 object = {};
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const styles = useStyles();
copyDataProperties(object, styles, undefined);
const value8 = (importDefault(8646) /* metro dependency 8646 */)((expressionSourceGuild?.emojis ?? []).slice(0,
numberToShow + 1).filter(_fun68153).slice(0, numberToShow), maxPerRow);
const emojiGridContainer = object.emojiGridContainer;
const GappedList = (LayoutUtilsModule).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 _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 = (LayoutUtilsModule).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} />;
}
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} />;
}
global.__d(_fun68150, 8645, [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649,
2]) /* metro module 8645, dependencies: [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649, 2] */;
@@ -1,31 +1,49 @@
/* Metro module 8637; source: modules/messages/native/emoji/EmojiOptionsActionSheet.tsx; dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as LinkIconModule from '../../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ClipboardUtilsNativeModule from '../../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
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');
(FileImportTrackerModule).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 = ReactModule.useCallback(_fun68134, [emojiSrc]);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {};
const LinkIcon = (LinkIconModule).LinkIcon;
object2.icon = <LinkIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cIoudn);
object2.onPress = value2;
return (
<ActionSheet>
<TableRowGroup hasIcons>
<TableRow {...object2} />
</TableRowGroup>
</ActionSheet>
);
function _fun68134() { // fn#68134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:290, offset: 0x01c408ce, size: 93 bytes, params: 1, frame: 15
const value = environment.__proto__;
ClipboardUtilsNativeModule.copy(emojiSrc);
(ToastUtilsModule).presentCopiedToClipboard();
(ActionSheetActionCreators).hideActionSheet();
}
}
}
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>
);
}
global.__d(_fun68132, 8637, [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244,
2]) /* metro module 8637, dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */;
@@ -1,108 +1,153 @@
/* 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] */
import GuildBadge from '../../../guild/native/GuildBadge.tsx'; /* Metro dependency 8642 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ExpressionSourceRecordModule from '../../../emojis/records/ExpressionSourceRecord.tsx'; /* Metro dependency 6820 */
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 */;
ReactModule;
let value = JsxRuntimeModule;
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;
object = {};
object.guildDetailsContainer = {flexDirection: 'column'};
object.guildDetailsContent = {'flexDirection': 'row', 'marginTop': 8, 'alignItems': 'center'};
const object3 = {'width': 40, 'height': 40, 'borderRadius': null, 'marginRight': 12};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.guildIcon = object3;
object.guildNameAndOnlineMembers = {flexDirection: 'column'};
object.guildNameWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'marginRight': 32};
object.guildPartnerIcon = {marginRight: 8};
object.guildDescriptionSection = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
const object6 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
object6.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,
object6.backgroundColor = BACKGROUND_MOD_MUTED;
object.dotSeparator = object6;
const object7 = {'borderRadius': null, 'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 4,
'paddingBottom': 2};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object7.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}</>;
object7.borderColor = BORDER_STRONG;
object.joinGuildButton = object7;
const env0_8 = Reflect.apply(createStyles, value, [object]);
const ExpressionGuildDetails2 = ExpressionGuildDetails;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/ExpressionGuildDetails.tsx');
exports.default = ExpressionGuildDetails2;
exports.ExpressionGuildDetails = ExpressionGuildDetails2;
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 {
r11 = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}</Text>;
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 */);
}
} 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}
const Text = (TextModule).Text;
const text = (
<Text variant="eyebrow" color="text-default">
{title}
</Text>
);
const Icon = (NativeModule).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>
</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);
}
}
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);
}
global.__d(_fun68141, 8641, [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305,
2]) /* metro module 8641, dependencies: [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305, 2] */;
@@ -1,68 +1,93 @@
/* Metro module 8623; source: modules/messages/native/emoji/MessageEmojiActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import StandardEmojiContent from './StandardEmojiContent.tsx'; /* Metro dependency 8624 */
import CustomEmojiContent from './CustomEmojiContent.tsx'; /* Metro dependency 8631 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as Module00491Module from '../../../../by-id/module-00491.js'; /* Metro dependency 491 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as UseEmojiAndSourceModule from '../../../emojis/hooks/useEmojiAndSource.tsx'; /* Metro dependency 8630 */
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 createStyles = CreateStylesModule.createStyles;
const object2 = {};
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');
object2.paddingHorizontal = value3;
object2.paddingBottom = PlatformUtilsModule.isAndroid() ? value3 : value;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{contentWrapper: object2}]);
(FileImportTrackerModule).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 = (Module00491Module).v4();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
return (
<BottomSheet startExpanded onDismiss={onDismiss_68057}>
<View style={styles.contentWrapper}>
{((Component) => <Component emojiNode={emojiNode} nonce={value2} />)(StandardEmojiContent)}
</View>
</BottomSheet>
);
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 = AnalyticsUtils;
const track = defaultImport.track;
const CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
Reflect.apply(track, defaultImport, [CLOSE_POPOUT, {nonce: env0_0}]);
}
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 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 = (UseEmojiAndSourceModule).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 = (Module00491Module).v4();
const BottomSheet = (BottomSheetNativeModule).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} />)(CustomEmojiContent)}
</View>
</BottomSheet>
);
function MessageCustomEmojiActionSheetOnDismiss() { // fn#68059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:843, owner: MessageCustomEmojiActionSheet.onDismiss, offset: 0x01c3d1a1, size: 62 bytes, params: 1, frame: 15
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
Reflect.apply(track, defaultImport, [CLOSE_POPOUT, {nonce: env0_0}]);
}
}
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}]);
}
global.__d(_fun68055, 8623, [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631,
2]) /* metro module 8623, dependencies: [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631, 2] */;
@@ -1,104 +1,141 @@
/* 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] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import EmojiUtils from '../../../../utils/EmojiUtils.tsx'; /* Metro dependency 3801 */
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import UseMaybeAddReactionMarketingEasterEggNote from '../../useMaybeAddReactionMarketingEasterEggNote.tsx'; /* Metro dependency 8627 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as EmojiPickerUtilsModule from '../../../emoji_picker/EmojiPickerUtils.tsx'; /* Metro dependency 8533 */
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
import * as UseTrackOpenPopoutModule from '../../../emojis/useTrackOpenPopout.tsx'; /* Metro dependency 8626 */
import * as EmojiActionCreatorsModule from '../../../../actions/EmojiActionCreators.tsx'; /* Metro dependency 8629 */
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 */;
let value = JsxRuntimeModule;
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 PX_4 = (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');
(FileImportTrackerModule).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>;
function Emoji_68062({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 object = {};
var value;
const styles = useStyles();
copyDataProperties(object, styles, undefined);
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const uRL = (EmojiUtils).getURL(surrogate);
const emojiWrapper = object.emojiWrapper;
if (uRL !== '') {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={object.emojiIcon} resizeMode="contain" source={{uri: uRL}} />)(value);
r4 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r4 = (
<Text style={object.emojiSurrogate} variant="text-md/medium">
{surrogate}
</Text>
);
}
return (
<View style={emojiWrapper}>
{r4}
</View>
);
}
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 _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 object = {};
const styles = useStyles();
copyDataProperties(object, styles, undefined);
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
copyDataProperties(object, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
undefined);
const guildId = SelectedGuildStore.getGuildId();
(UseTrackOpenPopoutModule).useTrackOpenPopout({currentGuildId: guildId,
nonce: nonce});
const value4 = (EmojiPickerUtilsModule).useIsFavoriteEmoji(guildId,
ReactModule.useMemo(_fun68064, [emojiNode.surrogate]));
const value5 = (UseMaybeAddReactionMarketingEasterEggNote)(emojiNode.content);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const emojiContainer = object.emojiContainer;
const emoji_68062 = <Emoji_68062 surrogate={emojiNode.surrogate} />;
const emojiDescriptionWrapper = object.emojiDescriptionWrapper;
const Text = (TextModule).Text;
const text = (
<Text variant="text-md/bold" color="mobile-text-heading-primary">
{value5}
</Text>
);
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const items4 = [
<View style={emojiContainer}>
{emoji_68062}
<View style={emojiDescriptionWrapper}>
{text}
<Text variant="text-sm/medium">
{Reflect.apply(string, intl, [t.sXdH8c])}
</Text>
</View>
</View>,
];
const FormDivider = (NativeModule).FormDivider;
items4[1] = <FormDivider style={object.divider} />;
const ctaContainer = object.ctaContainer;
const Button = (ButtonNativeModule).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 _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;
if (binding) {
EmojiActionCreatorsModule.unfavoriteEmoji(env0_1);
} else {
EmojiActionCreatorsModule.favoriteEmoji(env0_1);
}
}
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);
}
}
global.__d(_fun68061, 8624, [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244,
7972, 4578, 8629,
2]) /* metro module 8624, dependencies: [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244, 7972, 4578, 8629, 2] */;
@@ -1,29 +1,32 @@
/* Metro module 8625; source: modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx; dependencies: [4501, 697, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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 */;
let value = CreateStylesModule;
const createStyles = value.createStyles;
object4 = {emojiContainer: {'flexDirection': 'row', 'alignItems': 'center'},
object = {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 = {};
const object2 = {'width': 40, 'height': 40, 'marginRight': 12, 'borderRadius': null, 'resizeMode': 'contain'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.emojiIcon = object2;
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginTop = PX_16;
object3.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object6.marginLeft = 0;
object3.marginBottom = PX_16;
object3.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');
object3.backgroundColor = BORDER_SUBTLE;
object3.height = 0.5;
object.divider = object3;
object.ctaButton = {marginTop: 16};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx');
exports.useSharedMessageEmojiStyles = value;
}
global.__d(_fun68066, 8625, [4501, 697, 2]) /* metro module 8625, dependencies: [4501, 697, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 11343; source: modules/messages/native/getEmbeddedActivityKey.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/getEmbeddedActivityKey.tsx');
exports.default = function(a0) {
return '' + a0.location.id + ':' + a0.applicationId + ':' + a0.launchId;
};
@@ -12,3 +14,4 @@ function _fun86734(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun86734, 11343, [2]) /* metro module 11343, dependencies: [2] */;
@@ -1,45 +1,48 @@
/* Metro module 11379; source: modules/messages/native/handlers/handleMessagesLongPressChannel.tsx; dependencies: [4800, 9862, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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});
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});
}
}
}
}
global.__d(_fun87227, 11379, [4800, 9862, 2]) /* metro module 11379, dependencies: [4800, 9862, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,9 +1,11 @@
/* Metro module 11395; source: modules/messages/native/handlers/handleMessagesTapGameMention.tsx; dependencies: [9959, 9963, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapGameMention.tsx');
exports.handleMessagesTapGameMention = function({gameId}) {
var defaultImport = importDefault(dependencyMap[0]);
var object = {gameId: gameId};
@@ -13,3 +15,4 @@ function _fun87325(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun87325, 11395, [9959, 9963, 2]) /* metro module 11395, dependencies: [9959, 9963, 2] */;
@@ -1,468 +1,475 @@
/* 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] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ReferencedMessageStore from '../../../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MessageReferenceTypesModule from '../../../../external/discord_common/js/shared/shared-constants/MessageReferenceTypes.tsx'; /* Metro dependency 679 */
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');
(FileImportTrackerModule).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) {
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 referencedMessageStoreBinding;
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;
}
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;
if (allowWithinModal !== true) {
moduleValue2 = require(9877) /* metro dependency 9877: isAlertOrActionSheetOpen */;
reducibleJoin4: while (true) {
if (moduleValue2.isAlertOrActionSheetOpen(selectedChannelId)) {
return value;
}
break reducibleJoin4;
}
break reducibleJoin4;
}
}
if (type2 !== 'attachment') {
reducibleJoin8: while (true) {
if (type2 === 'embed') {
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;
}
if (type2 === 'sticker') {
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;
}
if (type2 !== 'component') {
Error = global.Error;
concat = global.HermesInternal.concat;
throw new Error('Unsupported thumbnail type: ' + type2);
messageReference = message.messageReference;
if (messageReference == null) {
r17 = message;
break reducibleJoin11;
}
break reducibleJoin8;
}
}
let type = message.type;
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
reducibleJoin11: while (true) {
if (type !== THREAD_STARTER_MESSAGE) {
r17 = message;
referencedMessageStoreBinding = ReferencedMessageStore;
getMessageByReference = referencedMessageStoreBinding.getMessageByReference;
messageReference = message.messageReference;
message2 = Reflect.apply(getMessageByReference, referencedMessageStoreBinding, [messageReference]).message;
if (message2 == null) {
r17 = message;
break reducibleJoin11;
}
r17 = message2;
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;
messageReference = r17.messageReference;
reducibleJoin13: while (true) {
if (messageReference == null) {
type = value;
break reducibleJoin13;
}
type = messageReference.type;
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;
const MessageReferenceTypes = (MessageReferenceTypesModule).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;
}
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);
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;
}
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]);
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;
}
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;
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;
}
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;
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;
}
r7 = value;
break reducibleJoin56;
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
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;
}
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;
} 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;
}
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;
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 reducibleLoop26;
break reducibleJoin31;
}
break reducibleJoin31;
}
value9 = typeof r26 === 'bigint' ? r26 + 1n : +r26 + 1;
length = value6.length;
if (value9 < length) {
r26 = value9;
continue reducibleLoop26;
}
r6 = value6;
break reducibleLoop26;
}
value9 = typeof r26 === 'bigint' ? r26 + 1n : +r26 + 1;
length = value6.length;
if (value9 < length) {
r26 = value9;
continue reducibleLoop26;
}
} else {
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;
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;
}
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;
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;
}
r7 = value;
break reducibleJoin56;
object.contextIcon = r7;
Reflect.apply(openMediaModal, moduleValue13, [object]);
break reducibleJoin60;
}
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;
}
}
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;
}
global.__d(_fun86899, 11348, [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647,
2]) /* metro module 11348, dependencies: [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,51 +1,56 @@
/* Metro module 11344; source: modules/messages/native/hooks/useChannelLoading.tsx; dependencies: [57, 31, 11345, 9835, 4595, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
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');
(FileImportTrackerModule).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(ReactModule.useState(_fun86739), 1)[0];
const startOrCancelLatestMessagesLoad2 = startOrCancelLatestMessagesLoad;
(importDefault(4595) /* metro dependency 4595: useMountEffect */)(function() {
startOrCancelLatestMessagesLoad(false);
return _fun86742;
});
return {channelLatestMessageLoadingStatsManager: property,
startOrCancelLatestMessagesLoad: startOrCancelLatestMessagesLoad2};
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 object = {};
object.jumpTargetId = jumpTargetId;
object.oldestUnreadMessageId = oldestUnreadMessageId;
object.shouldJumpToOriginalPost = shouldJumpToOriginalPost(a0);
object.channelId = channelId;
object.tracker = ReactModule;
Reflect.apply(startOrCancelChannelLatestMessagesLoad, value, [object]);
}
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();
}
}
}
}
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();
}
global.__d(_fun86737, 11344, [57, 31, 11345, 9835, 4595,
2]) /* metro module 11344, dependencies: [57, 31, 11345, 9835, 4595, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,92 +1,142 @@
/* Metro module 11346; source: modules/messages/native/hooks/useScrollHandlers.tsx; dependencies: [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseChatBottomManagerUIStoreModule from '../../../chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */
import * as ChatChangesetUpdateTrackerModule from '../../../chat/native/ChatChangesetUpdateTracker.tsx'; /* Metro dependency 9852 */
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 */;
let value = UseChatBottomManagerUIStoreModule;
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');
(FileImportTrackerModule).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;
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_86754,
handleScrollPosition: handleScrollPosition_86760};
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;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
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_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 */;
@@ -112,103 +162,103 @@ function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNear
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;
onScroll({isFirstMessageVisible: isFirstMessageVisible});
chatUpdatesQueue.tryFlush();
} else {
loadingMore = messages.loadingMore;
if (loadingMore) {
return false;
}
} else if (isNearBottom) {
if (messages.hasMoreAfter) {
if (r5) {
loadMoreAfter_86752();
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 (!(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 (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_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 */;
@@ -234,181 +284,138 @@ function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNear
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 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;
return true;
}
function useScrollHandlersHandleScroll({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);
});
}
} 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;
}
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 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 {
applyNativeRowsUpdate(a0);
}
} 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);
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 = (ChatChangesetUpdateTrackerModule).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 object = {firstVisibleMessageRowIndex: firstVisibleMessageIndex,
lastVisibleMessageRowIndex: lastVisibleMessageIndex,
firstVisibleMessagePercentVisible: firstVisibleMessagePercentVisible,
lastVisibleMessagePercentVisible: lastVisibleMessagePercentVisible};
var QuestsVisibleMessagesChangedSource = (require(6531) /* metro dependency 6531: QuestTypes */).QuestsVisibleMessagesChangedSource;
var SCROLL = QuestsVisibleMessagesChangedSource.SCROLL;
object.source = SCROLL;
handleVisibleMessagesChangeBinding(object);
var r17 = env0_17.current ?? timeStamp;
env0_17.current = undefined;
handleScroll_86754({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});
}
}
} 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});
}
}
global.__d(_fun86749, 11346, [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531,
2]) /* metro module 11346, dependencies: [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,24 +1,30 @@
/* Metro module 11167; source: modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx; dependencies: [33, 4501, 697, 8177, 9773, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChatItem from '../../../../components_native/chat/ChatItem.tsx'; /* Metro dependency 9773 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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 */;
let value = CreateStylesModule;
const createStyles = value.createStyles;
const PX_80 = (importDefault(697) /* metro dependency 697: native */).space.PX_80;
const PX_80 = (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');
(FileImportTrackerModule).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 defaultImportProps = {rowGenerator: env0_4, message: message, maxHeight: styles.chatItem.maxHeight};
const MOBILE_ALERT_BACKGROUND_DEFAULT = (Native).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
defaultImportProps.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
return <ChatItem {...defaultImportProps} />;
}
}
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} />;
}
global.__d(_fun85262, 11167, [33, 4501, 697, 8177, 9773,
2]) /* metro module 11167, dependencies: [33, 4501, 697, 8177, 9773, 2] */;
@@ -1,17 +1,20 @@
/* Metro module 11401; source: modules/messages/native/long_press/showLongPressMessageActionSheet.tsx; dependencies: [4080, 11402, 1962, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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]);
}
}
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]);
}
global.__d(_fun87341, 11401, [4080, 11402, 1962, 2]) /* metro module 11401, dependencies: [4080, 11402, 1962, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,24 +1,27 @@
/* Metro module 8191; source: modules/messages/native/renderer/EmbedUtils.tsx; dependencies: [27, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
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');
(FileImportTrackerModule).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 ?? '');
}
}
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 ?? '');
}
global.__d(_fun65695, 8191, [27, 2]) /* metro module 8191, dependencies: [27, 2] */;
@@ -1,9 +1,15 @@
/* Metro module 8367; source: modules/messages/native/renderer/ExplicitMediaUtils.tsx; dependencies: [661, 1391, 4838, 4841, 4813, 1244, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as FlagUtilsModule from '../../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as ObscuredMediaUtilsModule from '../../../explicit_media_redaction/ObscuredMediaUtils.tsx'; /* Metro dependency 4838 */
import * as ExplicitMediaRedactionModelsModule from '../../../explicit_media_redaction/ExplicitMediaRedactionModels.tsx'; /* Metro dependency 4841 */
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) {
@@ -11,98 +17,95 @@ function _fun66607(global, require, importDefault, importAll, module, exports, d
}
return value === a0.contentScanVersion ? value : a0.contentScanVersion;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/ExplicitMediaUtils.tsx');
(FileImportTrackerModule).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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const spoiler = attachment.spoiler;
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 object = {};
object.contentScanVersion = getContentScanVersionFromMedia(attachment) ?? 0;
object.flags = attachment.flags ?? 0;
const getMediaObscuredReasonFromBitmask = ObscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
let Attachment = ObscuredMediaTypes.Attachment;
const value4 = Reflect.apply(getMediaObscuredReasonFromBitmask, ObscuredMediaUtilsModule, [{type: Attachment,
media: object}, enabledContentHarmTypeFlags]);
const isMediaScanPending = ObscuredMediaUtilsModule.isMediaScanPending;
Attachment = ObscuredMediaTypes.Attachment;
const isMediaScanPending2 = Reflect.apply(isMediaScanPending, ObscuredMediaUtilsModule, [{type: Attachment, media: object},
enabledContentHarmTypeFlags]);
const value5 = value4.length > 0;
const r2 = value5 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
object = {};
object.isSpoiler = shouldObscureSpoiler && (spoiler || hasFlag2);
const value6 = '';
object.spoiler = shouldObscureSpoiler && (spoiler || hasFlag2) ? intl.string(t['F+x38C']).toUpperCase() : value6;
object.obscure = value5;
object.obscureDescription = value5 ? intl.string(t.SpxcUR) : value6;
object.obscureAwaitingScan = isMediaScanPending2;
object.verifyAge = value5 && shouldAgeVerify;
object.obscureHideControls = r2;
object.obscureIsOpaque = value5;
return object;
}
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 r5;
var intl;
const getMediaObscuredReasonFromBitmask = ObscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).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();
object = {isSpoiler: r8};
object.spoilerDescription = r8 ? getSpoilerDescriptionForType(type) : null;
object.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;
}
object.obscureDescription = r5;
object.obscureAwaitingScan = r3;
object.verifyAge = value4 && shouldAgeVerify;
object.obscureHideControls = r2;
object.obscureIsOpaque = value4;
return object;
}
}
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;
}
global.__d(_fun66607, 8367, [661, 1391, 4838, 4841, 4813, 1244,
2]) /* metro module 8367, dependencies: [661, 1391, 4838, 4841, 4813, 1244, 2] */;
@@ -1,240 +1,242 @@
/* Metro module 8335; source: modules/messages/native/renderer/MarkupParsers.tsx; dependencies: [661, 672, 1393, 6622, 8336, 8349, 2] */
import Durations from '../../../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
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;
object = {'max': Infinity, 'maxAge': null, 'updateAgeOnGet': true};
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
object3.maxAge = 15 * MINUTE;
object.maxAge = 15 * MINUTE;
let value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
value = new value(object);
value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
value = new value(object);
value = importDefault(1393) /* metro dependency 1393 */;
const object4 = {};
copyDataProperties(object4, object3, undefined);
object4['updateAgeOnGet'] = false;
value = new value(object4);
const object2 = {};
copyDataProperties(object2, object, undefined);
object2['updateAgeOnGet'] = false;
value = new value(object2);
value = importDefault(1393) /* metro dependency 1393 */;
value = new value(object3);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/MarkupParsers.tsx');
value = new value(object);
(FileImportTrackerModule).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;
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 {
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;
embedTitleToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleToAST(a0, true,
{channelId: a1});
env0_4.set(value, embedTitleToAST);
r0 = embedTitleToAST;
}
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;
}
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 object;
var moduleValue;
var renderMessageMarkupToAST;
var object2;
var defaultImport;
var astParserFor;
var moduleValue2;
var value6;
var content;
var object3;
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) {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
} else if (a0.changelogId != null) {
object = {'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;
object3 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object3.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object3.allowList = r10;
object3.allowLinks = r4;
object3.previewLinkTarget = r4;
object.content = value6(content, false, object3);
env0_7.set(a0, object);
r1 = object;
} else {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
}
r0 = r1;
} else if (value5.isInlineReplyPreview === r12) {
r0 = value5;
} else {
if (a0.type !== MessageTypes.CHANGELOG) {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
} else if (a0.changelogId != null) {
object = {'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;
object3 = {hideSimpleEmbedContent: a2, formatInline: r12};
r12 = r10 || r11;
object3.allowHeading = r12;
r10 = !r10 ? r11 : r10;
object3.allowList = r10;
object3.allowLinks = r4;
object3.previewLinkTarget = r4;
object.content = value6(content, false, object3);
env0_7.set(a0, object);
r1 = object;
} else {
object = {};
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
object2 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
r8 = r10 || r11;
object2.allowHeading = r8;
r8 = r10 || r11;
object2.allowList = r8;
object2.allowLinks = r4;
object2.previewLinkTarget = r4;
copyDataProperties(object, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object2]), undefined);
object['isInlineReplyPreview'] = r12;
env0_7.set(a0, object);
r1 = object;
}
r0 = r1;
}
return r0;
}
}
global.__d(_fun66357, 8335, [661, 672, 1393, 6622, 8336, 8349,
2]) /* metro module 8335, dependencies: [661, 672, 1393, 6622, 8336, 8349, 2] */;
@@ -1,65 +1,82 @@
/* Metro module 8182; source: modules/messages/native/renderer/MessageWithContent.tsx; dependencies: [8183, 8178, 8184, 1244, 8352, 2] */
import GuildAutomodMessageStore from '../../../guild_automod/GuildAutomodMessageStore.tsx'; /* Metro dependency 8183 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as RowGeneratorConstantsModule from './RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
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');
(FileImportTrackerModule).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
var r3;
var defaultImport2;
var createBackgroundHighlight;
var guildAutomodMessageStoreBinding;
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 object = {};
const MESSAGE = RowType.MESSAGE;
object.type = MESSAGE;
object.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});
object.canAddNewReactions = canAddNewReactions;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.addNewReactionAccessibilityLabel = Reflect.apply(string, intl, [t.lfIHs4]);
object.reactionsTheme = reactionsTheme;
object.highlightLabel = intl.string(t['IOS/dU']);
object.renderContentOnly = renderContentOnly;
object.separatorBefore = separatorBefore;
object.changeType = changeType;
object.truncation = truncation;
object.alwaysShowAddReaction = r4;
if (overrideBackgroundHighlight != null) {
r3 = overrideBackgroundHighlight;
} else {
defaultImport2 = importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */;
createBackgroundHighlight = defaultImport2.createBackgroundHighlight;
guildAutomodMessageStoreBinding = GuildAutomodMessageStore;
r3 = Reflect.apply(createBackgroundHighlight, defaultImport2, [{message: message, theme: a2,
isEditing: isEditing,
isAutomodBlockedMessage: guildAutomodMessageStoreBinding.getMessage(message.id) != null}]);
}
object.backgroundHighlight = r3;
const defaultImport3 = importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */;
object.swipeActions = defaultImport3.createSwipeActions(a1.enableSwipeActions && a0.canReply,
a1.enableSwipeActions && a0.canEdit);
object.replyAccessibilityLabel = intl.string(t['5IEsGx']);
string = intl.string;
const I3ltXO = t.I3ltXO;
object.forwardAccessibilityLabel = Reflect.apply(string, intl, [I3ltXO]);
object.threadAccessibilityLabel = intl.string(t.rBIGBL);
return object;
}
}
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;
}
global.__d(_fun65624, 8182, [8183, 8178, 8184, 1244, 8352,
2]) /* metro module 8182, dependencies: [8183, 8178, 8184, 1244, 8352, 2] */;
@@ -1,16 +1,17 @@
/* Metro module 8179; source: modules/messages/native/renderer/RenderMessageOptionsContext.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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;
object = {USER_SETTING: 0};
object[0] = 'USER_SETTING';
object.FORCE_ENABLE = 1;
object[1] = 'FORCE_ENABLE';
object.FORCE_DISABLE = 2;
object[2] = 'FORCE_DISABLE';
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/RenderMessageOptionsContext.tsx');
exports.UserOption = object;
exports.DEFAULT_OPTIONS = {'renderEmbeds': true, 'renderReactions': true, 'inlineEmbedMedia': true,
'inlineAttachmentMedia': true, 'animateEmoji': true, 'gifAutoPlay': false, 'timestampHourCycle': 0,
'renderCodedLinks': true, 'renderGiftCode': true, 'renderActivityInstanceEmbed': true,
@@ -21,3 +22,4 @@ function _fun65617(global, require, importDefault, importAll, module, exports, d
'useAlternateEmbedColors': false, 'restrictedPreview': false};
}
global.__d(_fun65617, 8179, [2]) /* metro module 8179, dependencies: [2] */;
@@ -1,78 +1,86 @@
/* Metro module 8177; source: modules/messages/native/renderer/RowGenerator.tsx; dependencies: [6, 7, 1310, 8178, 8179, 22, 8180, 8182, 10612, 10613, 1360, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import Module00022 from '../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import ThemeStore from '../../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GlobalUtilsModule from '../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as RowGeneratorConstantsModule from './RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
import * as RenderMessageOptionsContextModule from './RenderMessageOptionsContext.tsx'; /* Metro dependency 8179 */
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 */;
let value = RowGeneratorConstantsModule;
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;
const DEFAULT_OPTIONS = (RenderMessageOptionsContextModule).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');
(FileImportTrackerModule).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 CreateClass(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 = Module00022;
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);
}
(GlobalUtilsModule).assertNever(rowType);
}
}
}
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);
}
global.__d(_fun65611, 8177, [6, 7, 1310, 8178, 8179, 22, 8180, 8182, 10612, 10613, 1360,
2]) /* metro module 8177, dependencies: [6, 7, 1310, 8178, 8179, 22, 8180, 8182, 10612, 10613, 1360, 2] */;
@@ -1,56 +1,58 @@
/* Metro module 8178; source: modules/messages/native/renderer/RowGeneratorConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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;
object = {NOOP: 0};
object[0] = 'NOOP';
object.INSERT = 1;
object[1] = 'INSERT';
object.UPDATE = 2;
object[2] = 'UPDATE';
object.REMOVE = 3;
object[3] = 'REMOVE';
const object2 = {SEPARATOR: 0};
object2[0] = 'SEPARATOR';
object2.MESSAGE = 1;
object2[1] = 'MESSAGE';
object2.BLOCKED_GROUP = 2;
object2[2] = 'BLOCKED_GROUP';
object2.LOADING = 4;
object2[4] = 'LOADING';
object2.EMBEDDED_ACTIVITY = 5;
object2[5] = 'EMBEDDED_ACTIVITY';
object2.IGNORED_GROUP = 6;
object2[6] = 'IGNORED_GROUP';
object2.SUSPENDED_USER_GROUP = 7;
object2[7] = 'SUSPENDED_USER_GROUP';
const object6 = {LOADED: 0};
object6[0] = 'LOADED';
object6.SYSTEM = 1;
object6[1] = 'SYSTEM';
const object7 = {UNSPECIFIED: 0};
object7[0] = 'UNSPECIFIED';
object7.UPLOAD_FAILED = 1;
object7[1] = 'UPLOAD_FAILED';
object7.AUTO_MODERATION_BLOCKED_MESSAGE = 2;
object7[2] = 'AUTO_MODERATION_BLOCKED_MESSAGE';
const object9 = {NONE: 0};
object9[0] = 'NONE';
object9.REPLY = 1;
object9[1] = 'REPLY';
object9.REPLY_EDIT = 2;
object9[2] = 'REPLY_EDIT';
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/RowGeneratorConstants.tsx');
exports.Changeset = object;
exports.RowType = object2;
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.ReferencedMessageRowState = object6;
exports.MessageFailureState = object7;
exports.AttachmentType = {IMAGE: 'image', VIDEO: 'video', AUDIO: 'audio', OTHER: 'other'};
exports.SwipeActionsType = object10;
exports.SwipeActionsType = object9;
}
global.__d(_fun65616, 8178, [2]) /* metro module 8178, dependencies: [2] */;
@@ -1,20 +1,23 @@
/* Metro module 8181; source: modules/messages/native/renderer/RowGeneratorStyleSheet.tsx; dependencies: [27, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
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');
(FileImportTrackerModule).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();
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;
}
return value;
}
global.__d(_fun65622, 8181, [27, 2]) /* metro module 8181, dependencies: [27, 2] */;
@@ -1,22 +1,24 @@
/* Metro module 8368; source: modules/messages/native/renderer/RowGeneratorTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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;
object = {IMAGE: 1};
object[1] = 'IMAGE';
object.VIDEO = 2;
object[2] = 'VIDEO';
object.VISUAL_PLACEHOLDER = 3;
object[3] = 'VISUAL_PLACEHOLDER';
const object2 = {DEFAULT: 0};
object2[0] = 'DEFAULT';
object2.SEARCH = 1;
object2[1] = 'SEARCH';
object2.MEDIA_VIEWER = 2;
object2[2] = 'MEDIA_VIEWER';
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/RowGeneratorTypes.tsx');
exports.MediaGalleryItemType = object;
exports.MessageContextType = object2;
}
global.__d(_fun66613, 8368, [2]) /* metro module 8368, dependencies: [2] */;
@@ -1,17 +1,21 @@
/* 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] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as MessageConstantsModule from '../../MessageConstants.tsx'; /* Metro dependency 4503 */
import * as RowGeneratorConstantsModule from './RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
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 NativeModules = (ReactNativeModule).NativeModules;
let value = MessageConstantsModule;
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;
@@ -23,98 +27,106 @@ function _fun66494(global, require, importDefault, importAll, module, exports, d
});
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]);
object = {};
const INTERACTIVE_BACKGROUND_ACTIVE = (Native).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object.ephemeralBackgroundColor = INTERACTIVE_BACKGROUND_ACTIVE;
const BACKGROUND_BRAND = (Native).colors.BACKGROUND_BRAND;
object.ephemeralGutterColor = BACKGROUND_BRAND;
object.giftIntentEphemeralBackgroundColor = value;
const MESSAGE_MENTIONED_BACKGROUND_DEFAULT = (Native).colors.MESSAGE_MENTIONED_BACKGROUND_DEFAULT;
object.mentionedBackgroundColor = MESSAGE_MENTIONED_BACKGROUND_DEFAULT;
const YELLOW_300 = (Native).unsafe_rawColors.YELLOW_300;
object.mentionedGutterColor = YELLOW_300;
const MESSAGE_AUTOMOD_BACKGROUND_DEFAULT = (Native).colors.MESSAGE_AUTOMOD_BACKGROUND_DEFAULT;
object.automodBlockedBackgroundColor = MESSAGE_AUTOMOD_BACKGROUND_DEFAULT;
const RED_345 = (Native).unsafe_rawColors.RED_345;
object.automodBlockedGutterColor = RED_345;
const MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT = (Native).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
object.editingColor = MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
value = Reflect.apply(createNativeStyleProperties, createStylesModule, [object]);
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,
object = {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;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/RowGeneratorUtils.tsx');
exports.default = object;
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};
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);
}
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;
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 channelStoreBinding;
var value4;
var guildStoreBinding;
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)) {
channelStoreBinding = ChannelStore;
value4 = channelStoreBinding.getChannel(message.getChannelId());
guildStoreBinding = GuildStore;
value5 = guildStoreBinding.getGuild(value4?.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;
}
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;
}
global.__d(_fun66494, 8352, [27, 4502, 1379, 1867, 4503, 8178, 661, 4501, 4000, 697, 6858, 4625, 1477,
2]) /* metro module 8352, dependencies: [27, 4502, 1379, 1867, 4503, 8178, 661, 4501, 4000, 697, 6858, 4625, 1477, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,11 +1,14 @@
/* Metro module 8393; source: modules/messages/native/renderer/createMessageFailedEmbed.tsx; dependencies: [8178, 661, 8191, 8394, 1244, 8395, 4655, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as RowGeneratorConstantsModule from './RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
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');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/createMessageFailedEmbed.tsx');
exports.default = createMessageFailedEmbed;
exports.createAutomodBlockedMessageEmbed = function({errorMessage, colors}) {
var object = {};
@@ -17,49 +20,51 @@ function _fun66717(global, require, importDefault, importAll, module, exports, d
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 = '';
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 object;
var value;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
if (uploaderFile != null) {
if (useAttachmentUploadPreview) {
object = {};
object.type = MessageEmbedTypes.TEXT;
object.messageSendError = intl.string(t.lBLP4u);
object.failureState = MessageFailureState.UNSPECIFIED;
object.disableBackgroundColor = true;
object.bodyTextColor = colors.failedMessageBodyTextColor;
object.iconURL = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8395) /* metro dependency 8395 */);
r1 = object;
} else {
value = require(4655) /* metro dependency 4655: FileUtils */;
value = value.sizeString(uploaderFile.currentSize);
value = ' (' + value + ')';
r2 = value;
object = {};
object.type = MessageEmbedTypes.TEXT;
object.numAttachments = intl.formatToPlainString(t.D0noUt, {count: uploaderFile.attachmentsCount});
object.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;
}
object.attachmentsSize = String(r2);
object.bodyTextColor = colors.embedBodyTextColor;
r1 = object;
}
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};
}
r0 = r1;
} else {
r0 = {type: MessageEmbedTypes.TEXT, messageSendError: intl.string(t.lBLP4u),
failureState: MessageFailureState.UNSPECIFIED, disableBackgroundColor: true,
bodyTextColor: colors.failedMessageBodyTextColor};
return r0;
}
return r0;
}
global.__d(_fun66717, 8393, [8178, 661, 8191, 8394, 1244, 8395, 4655,
2]) /* metro module 8393, dependencies: [8178, 661, 8191, 8394, 1244, 8395, 4655, 2] */;
@@ -1,89 +1,94 @@
/* Metro module 8293; source: modules/messages/native/renderer/getTagProperties.tsx; dependencies: [27, 4503, 8294, 1244, 8296, 8298, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MessageConstantsModule from '../../MessageConstants.tsx'; /* Metro dependency 4503 */
import * as PublicGuildsUtilsModule from '../../../public_guilds/PublicGuildsUtils.tsx'; /* Metro dependency 8294 */
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');
(FileImportTrackerModule).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']);
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 = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).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();
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) {
r10 = intl.string(t['7s687k']);
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 {
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]);
r3 = undefined;
r4 = undefined;
r6 = isVerifiedBot2;
r8 = null;
}
r7 = r10;
} else {
r7 = 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};
}
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};
}
global.__d(_fun66171, 8293, [27, 4503, 8294, 1244, 8296, 8298,
2]) /* metro module 8293, dependencies: [27, 4503, 8294, 1244, 8296, 8298, 2] */;
@@ -1,80 +1,83 @@
/* Metro module 8350; source: modules/messages/native/renderer/redactRestrictedContent.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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 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;
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 object;
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(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;
value = value.map(redactRestrictedContent);
r1 = value;
} else if (value.type === 'link') {
object = {type: 'inlineCode'};
object.content = nodeToText(value.content);
r1 = object;
} else if (value.type === 'attachmentLink') {
object = {type: 'inlineCode'};
object.content = nodeToText(value.content);
r1 = object;
} else if (value.type === 'customEmoji') {
r1 = {type: 'text', content: ':' + value.alt + ':'};
} else if (value.content == null) {
r1 = value;
} else {
r2 = value2;
object = {};
copyDataProperties(object, value, undefined);
value = redactRestrictedContent(value.content);
object['content'] = value;
r1 = object;
}
r1 = r2;
r0 = r1;
}
r0 = r1;
return r0;
}
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;
}
global.__d(_fun66484, 8350, [2]) /* metro module 8350, dependencies: [2] */;
@@ -1,6 +1,8 @@
/* Metro module 8198; source: modules/messages/native/renderer/resolveMessageContentColors.tsx; dependencies: [4501, 4002, 697, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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});
@@ -15,66 +17,67 @@ function _fun65707(global, require, importDefault, importAll, module, exports, d
theme = importDefault(dependencyMap[2]).unsafe_rawColors;
return isThemeDark ? theme.BRAND_260 : theme.BRAND_200;
});
object2 = {};
object = {};
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.textColor = TEXT_STRONG;
object.textColor = TEXT_STRONG;
const TEXT_LINK = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK;
object2.linkColor = TEXT_LINK;
object.linkColor = TEXT_LINK;
let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.timestampColor = TEXT_MUTED;
object.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;
object.highlightColor = MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.unsupportedColor = TEXT_MUTED;
object2.embedProviderColor = value;
object.unsupportedColor = TEXT_MUTED;
object.embedProviderColor = value;
const BORDER_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_NORMAL;
object2.embedBorderLeftColor = BORDER_NORMAL;
object.embedBorderLeftColor = BORDER_NORMAL;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.embedBodyTextColor = TEXT_DEFAULT;
object.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;
object.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;
object.opTagTextColor = BRAND_560;
object.opTagBackgroundColor = value3;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.failedMessageBodyTextColor = RED_400;
object.failedMessageBodyTextColor = RED_400;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.automodBlockedBodyTextColor = TEXT_MUTED;
object.automodBlockedBodyTextColor = TEXT_MUTED;
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object2.aiBotTagColor = TEXT_FEEDBACK_POSITIVE;
object.aiBotTagColor = TEXT_FEEDBACK_POSITIVE;
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.editedColor = TEXT_MUTED;
object.editedColor = TEXT_MUTED;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object2.defaultUsernameColor = INTERACTIVE_TEXT_ACTIVE;
object.defaultUsernameColor = INTERACTIVE_TEXT_ACTIVE;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.feedbackColor = BACKGROUND_MOD_MUTED;
object.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;
object.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;
object.reportFpBackgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.retryTextColor = WHITE;
object.retryTextColor = WHITE;
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.retryBackgroundColor = BACKGROUND_BRAND;
object.retryBackgroundColor = BACKGROUND_BRAND;
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.clipTagBackgroundColor = BACKGROUND_BRAND;
object.clipTagBackgroundColor = BACKGROUND_BRAND;
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.clipTagTextColor = WHITE;
object.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');
(FileImportTrackerModule).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 object = {};
const colors = (Native).colors;
object.embedBackgroundColor = a0 ? colors.EMBED_BACKGROUND_ALTERNATE : colors.EMBED_BACKGROUND;
copyDataProperties(object, env0_3, importDefault);
return object;
}
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);
}
}
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);
}
global.__d(_fun65707, 8198, [4501, 4002, 697, 2]) /* metro module 8198, dependencies: [4501, 4002, 697, 2] */;
@@ -1,24 +1,27 @@
/* Metro module 8442; source: modules/messages/native/renderer/row_data/ConnectionsRoleTag.tsx; dependencies: [27, 661, 697, 673, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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 object = {};
object.id = id;
object.name = name;
const processColorBinding = processColor;
object.backgroundColor = processColorBinding(r4);
object.iconColor = processColorBinding(r2);
return object;
}
}
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;
}
global.__d(_fun67011, 8442, [27, 661, 697, 673, 2]) /* metro module 8442, dependencies: [27, 661, 697, 673, 2] */;
@@ -1,39 +1,48 @@
/* Metro module 10608; source: modules/messages/native/renderer/row_data/CtaButton.tsx; dependencies: [4822, 10609, 4813, 1244, 2] */
import ExplicitMediaStore from '../../../../explicit_media_redaction/ExplicitMediaStore.tsx'; /* Metro dependency 4822 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AgeVerificationUtilsModule from '../../../../age_assurance/AgeVerificationUtils.tsx'; /* Metro dependency 4813 */
import * as CtaButtonUtilsModule from '../../../CtaButtonUtils.tsx'; /* Metro dependency 10609 */
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');
(FileImportTrackerModule).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 object;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var explicitMediaStoreBinding;
const value2 = undefined;
const ctaButtonType = (CtaButtonUtilsModule).getCtaButtonType(a0, a1);
const isAgeVerified2 = (AgeVerificationUtilsModule).isAgeVerified();
const shouldShowTiggerPawtect2 = (AgeVerificationUtilsModule).shouldShowTiggerPawtect();
const CtaButtonType = (CtaButtonUtilsModule).CtaButtonType;
const MARK_AS_FALSE_POSITIVE = CtaButtonType.MARK_AS_FALSE_POSITIVE;
if (MARK_AS_FALSE_POSITIVE === ctaButtonType) {
object = {};
object.text = intl.string(t['4q1Elf']);
object.textColor = a2.reportFpTextColor;
object.backgroundColor = a2.reportFpBackgroundColor;
explicitMediaStoreBinding = ExplicitMediaStore;
object.callback = explicitMediaStoreBinding.canSubmitFpReport(a0) ? CtaButtonType.MARK_AS_FALSE_POSITIVE : value2;
return object;
}
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;
}
}
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;
}
global.__d(_fun81752, 10608, [4822, 10609, 4813, 1244,
2]) /* metro module 10608, dependencies: [4822, 10609, 4813, 1244, 2] */;
@@ -1,60 +1,65 @@
/* Metro module 8331; source: modules/messages/native/renderer/row_data/EphemeralIndication.tsx; dependencies: [8183, 661, 8332, 1244, 1948, 2] */
import GuildAutomodMessageStore from '../../../../guild_automod/GuildAutomodMessageStore.tsx'; /* Metro dependency 8183 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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');
(FileImportTrackerModule).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;
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 object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var defaultImport;
var guildAutomodMessageStoreBinding;
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;
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;
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]);
object = {};
object.content = intl.formatToParts(t.xgCMRQ, {handleDelete: {action: 'bindDismissMessage', message: a0},
reason: value3});
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object.helpArticleLink = defaultImport3.getArticleURL(HelpdeskArticles.USING_APPS_FAQ);
object.helpButtonAccessibilityLabel = intl.string(t.OIWSJe);
return object;
}
object = {};
object.content = intl.formatToParts(t.uX3ecL, {'count': 1, 'countMessages': 1,
handleDelete: {action: 'bindDismissMessage', message: a0}});
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object.helpArticleLink = defaultImport.getAppsSupportURL(HelpdeskArticles.EPHEMERAL_MESSAGES);
object.helpButtonAccessibilityLabel = intl.string(t.htHOrp);
guildAutomodMessageStoreBinding = GuildAutomodMessageStore;
if (guildAutomodMessageStoreBinding.getMessage(a0.id) != null) {
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
object.helpArticleLink = defaultImport2.getArticleURL(HelpdeskArticles.GUILD_AUTOMOD_BLOCKED_MESSAGE);
object.helpButtonAccessibilityLabel = intl.string(t.OiCBhP);
}
return object;
}
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;
}
return value2;
}
global.__d(_fun66350, 8331, [8183, 661, 8332, 1244, 1948,
2]) /* metro module 8331, dependencies: [8183, 661, 8332, 1244, 1948, 2] */;
@@ -1,34 +1,70 @@
/* 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] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as AccessibilityLabelOptimizationExperimentModule from '../../../../a11y/native/AccessibilityLabelOptimizationExperiment.tsx'; /* Metro dependency 8197 */
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');
(FileImportTrackerModule).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) {
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 object;
var animated;
var defaultImport2;
var getEmojiURL;
var value;
const shouldSkipAccessibilityLabels2 = (AccessibilityLabelOptimizationExperimentModule).shouldSkipAccessibilityLabels();
if (defaultReactionEmoji != null) {
emojiId = defaultReactionEmoji.emojiId;
emojiName = defaultReactionEmoji.emojiName;
if (emojiId == null) {
if (emojiName != null) {
r6 = emojiName ?? '';
object = {id: undefined, name: emojiName, animated: false};
object.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;
}
object.displayName = r4;
r2 = object;
} else {
r2 = undefined;
}
} else if (customGuildEmoji != null) {
r6 = customGuildEmoji.name ?? '';
object = {id: emojiId, name: undefined};
animated = customGuildEmoji.animated;
object.animated = animated;
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getEmojiURL = defaultImport2.getEmojiURL;
animated = customGuildEmoji.animated;
object.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;
}
object.displayName = r4;
r2 = object;
} else if (emojiName != null) {
r6 = emojiName ?? '';
object2 = {id: undefined, name: emojiName, animated: false};
object2.src = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(emojiName);
object = {id: undefined, name: emojiName, animated: false};
object.src = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(emojiName);
if (shouldSkipAccessibilityLabels2) {
r4 = r6;
} else {
@@ -36,98 +72,67 @@ function createDefaultReaction({defaultReactionEmoji, customGuildEmoji}) { // fn
value = value.getAccessibleEmojiDisplayName(false, 0, {id: undefined, name: r6, animated: false});
r4 = value;
}
object2.displayName = r4;
r2 = object2;
object.displayName = r4;
r2 = object;
} 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;
}
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]));
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 object;
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) {
object = {};
object.title = intl.string(t['5uAO7d']);
formatToParts = intl.formatToParts;
YtCu5p = t.YtCu5p;
defaultImport3 = importDefault(dependencyMap[7]);
object.subtitle = Reflect.apply(formatToParts, intl, [YtCu5p,
{helpArticleUrl: {url: defaultImport3.getCreatorSupportArticleURL(HelpdeskArticles.MEDIA_CHANNEL)}}]);
object.cta = intl.string(t.C5UQC9);
object.icon = require(dependencyMap[1]).getAssetUriForEmbed(importDefault(dependencyMap[8]));
object.closeIcon = require(dependencyMap[1]).getAssetUriForEmbed(importDefault(dependencyMap[9]));
r1 = object;
} else {
r1 = undefined;
}
object = {numDisplayedReactions: 3, isFollowing: isFollowing, followIcon: r7};
let string = intl.string;
object.followLabel = isFollowing ? Reflect.apply(string, intl, [t['OtF+lC']]) : Reflect.apply(string, intl,
[t['0rQinA']]);
object.shareIcon = assetUriForEmbed;
string = intl.string;
const Ej3B3Y = t.Ej3B3Y;
object.shareLabel = Reflect.apply(string, intl, [Ej3B3Y]);
object.defaultReaction = defaultReaction;
object.addReactLabel = r2;
object.sharePrompt = r1;
return object;
}
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;
}
global.__d(_fun65699, 8193, [661, 8191, 4065, 8194, 1216, 4057, 1244, 1948, 8195, 8196, 8197, 1423, 3795, 3801,
2]) /* metro module 8193, dependencies: [661, 8191, 4065, 8194, 1216, 4057, 1244, 1948, 8195, 8196, 8197, 1423, 3795, 3801, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 8443; source: modules/messages/native/renderer/row_data/SurveyIndication.tsx; dependencies: [5079, 1244, 8191, 4002, 8444, 8445, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PushNotificationConstantsModule from '../../../../push_notifications/PushNotificationConstants.tsx'; /* Metro dependency 5079 */
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');
(FileImportTrackerModule).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 object = {};
object.content = (require(1244) /* metro dependency 1244: indexNative */).intl.formatToParts(r5,
{handleMessage: {action: 'bindUserSurvey', message: a0,
notificationType: value ?? NotificationTypes.TOP_MESSAGE_PUSH}});
object.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 object;
}
}
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;
}
global.__d(_fun67013, 8443, [5079, 1244, 8191, 4002, 8444, 8445,
2]) /* metro module 8443, dependencies: [5079, 1244, 8191, 4002, 8444, 8445, 2] */;
@@ -1,68 +1,74 @@
/* Metro module 8440; source: modules/messages/native/renderer/row_data/VoiceChannelBadge.tsx; dependencies: [27, 1379, 3784, 4297, 661, 8441, 6647, 5072, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import PermissionStore from '../../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import VoiceStateStore from '../../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as VoiceChannelBadgeExperimentModule from '../../../../channel/VoiceChannelBadgeExperiment.tsx'; /* Metro dependency 8441 */
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');
(FileImportTrackerModule).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};
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 channelStoreBinding;
var resolveAssetSource;
var moduleValue2;
var assetSource;
var shouldAgeVerifyForAgeGate2;
var moduleValue4;
let value = a1;
const value3 = undefined;
const getVoiceChannelBadgeExperiment = VoiceChannelBadgeExperimentModule.getVoiceChannelBadgeExperiment;
const object = {};
object.guildId = value ?? value3;
object.location = 'VoiceChannelBadgeNative';
if (Reflect.apply(getVoiceChannelBadgeExperiment, VoiceChannelBadgeExperimentModule, [object]).enabled) {
if (value == null) {
return value3;
}
value = VoiceStateStore.getDiscoverableVoiceState(value, a0);
if (value == null) {
return value3;
}
channelStoreBinding = ChannelStore;
value = channelStoreBinding.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;
}
return value3;
}
global.__d(_fun67006, 8440, [27, 1379, 3784, 4297, 661, 8441, 6647, 5072,
2]) /* metro module 8440, dependencies: [27, 1379, 3784, 4297, 661, 8441, 6647, 5072, 2] */;
@@ -1,174 +1,186 @@
/* 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] */
import AuthenticationStore from '../../../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ApplicationStore from '../../../../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import PresenceStore from '../../../../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CodedLinksConstantsModule from './coded_links/CodedLinksConstants.tsx'; /* Metro dependency 9859 */
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');
(FileImportTrackerModule).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;
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 embeddedActivitiesStoreBinding;
var getEmbeddedActivitiesForChannel;
var value5;
var value7;
var currentEmbeddedActivity;
var moduleValue;
var getEmbeddedActivityParticipantAvatarUris;
var object;
var value9;
var presenceStoreBinding;
var statusText;
var moduleValue2;
var getJoinOrStartButtonState;
var disabled;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var moduleValue3;
var getPlayInContext;
var value17;
var instanceId;
var isCurrentlyInInstance;
var canLaunchInChannel;
var moduleValue4;
var items2;
var applicationStoreBinding;
var getApplication;
var moduleValue5;
var moduleValue6;
var getActivityLaunchURL;
var object2;
var object3;
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) {
embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
getEmbeddedActivitiesForChannel = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForChannel;
value5 = '';
value7 = Reflect.apply(getEmbeddedActivitiesForChannel, embeddedActivitiesStoreBinding,
[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}]);
presenceStoreBinding = PresenceStore;
id = application.id;
statusText = getStatusText(presenceStoreBinding, value7, id);
moduleValue2 = require(10577) /* metro dependency 10577: EmbeddedApplicationInstanceUtils */;
getJoinOrStartButtonState = moduleValue2.getJoinOrStartButtonState;
object = {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, [object]).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}];
applicationStoreBinding = ApplicationStore;
getApplication = applicationStoreBinding.getApplication;
id = application.id;
if (value3 == Reflect.apply(getApplication, applicationStoreBinding,
[id]) && ApplicationStore.isFetchingApplication(application.id) === false) {
moduleValue5 = require(6772) /* metro dependency 6772: ApplicationActionCreators */;
moduleValue5.fetchApplication(application.id);
}
object = {};
object.displayType = (require(10538) /* metro dependency 10538: CodedLinksTypes */).AppMessageEmbedDisplayType.DISPLAY;
id = application.id;
object.appId = id;
id = a0.id;
object.messageId = id;
object.title = intl.string(t.pkq6Vq);
object.header = value3 != r10 ? r10 : value5;
object.info = value3;
object.tagline = value3;
object.staticBannerSrc = value3;
object.iconSrc = r9;
moduleValue6 = require(8809) /* metro dependency 8809: getApplicationInstallURL */;
getActivityLaunchURL = moduleValue6.getActivityLaunchURL;
object2 = {};
id = application.id;
object2.applicationId = id;
object2.referrerId = AuthenticationStore.getId();
object.embedUrl = Reflect.apply(getActivityLaunchURL, moduleValue6, [object2]);
object.bannerRatio = 'bot';
object.actions = items2;
object.extendedType = CodedLinkExtendedType.APP_MESSAGE_EMBED;
value = require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */;
object.gradientColors = value.getAppGradientColors(value3 != r9 ? r9 : value4);
object.backgroundColor = 0;
object.borderColor = 0;
object.headerColor = 0;
object.headerText = value3;
object.type = value3;
object3 = {};
id = application.id;
object3.applicationId = id;
id = activityInstance.id;
object3.instanceId = id;
object3.appMessageEmbedModel = object;
object3.participantAvatarUris = value9;
object3.participantsDescription = r1;
return object3;
}
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;
}
}
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;
}
global.__d(_fun81584, 10576, [1378, 4234, 1226, 1379, 4396, 9859, 10552, 10577, 1244, 9466, 10539, 6772, 10538,
8809,
2]) /* metro module 10576, dependencies: [1378, 4234, 1226, 1379, 4396, 9859, 10552, 10577, 1244, 9466, 10539, 6772, 10538, 8809, 2] */;
@@ -1,404 +1,418 @@
/* 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] */
import AuthenticationStore from '../../../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserUtils from '../../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import SKUStore from '../../../../../../stores/game_store/SKUStore.tsx'; /* Metro dependency 4279 */
import GiftCodeStore from '../../../../../../stores/GiftCodeStore.tsx'; /* Metro dependency 8450 */
import Module10519 from '../../../../../../by-id/module-10519.js'; /* Metro dependency 10519 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
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 */;
let value = ReactNativeModule;
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');
(FileImportTrackerModule).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 */;
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 object;
const BOX = PremiumGiftStyles.BOX;
if (BOX === a0) {
return importDefault(10516) /* metro dependency 10516 */;
}
var CAKE = PremiumGiftStyles.CAKE;
if (CAKE === a0) {
return importDefault(10521) /* metro dependency 10521 */;
const CUP = PremiumGiftStyles.CUP;
if (CUP === a0) {
return importDefault(10517) /* metro dependency 10517 */;
}
var CHEST = PremiumGiftStyles.CHEST;
if (CHEST === a0) {
return importDefault(10522) /* metro dependency 10522 */;
const SNOWGLOBE = PremiumGiftStyles.SNOWGLOBE;
if (SNOWGLOBE === a0) {
return importDefault(10518) /* metro dependency 10518 */;
}
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;
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
if (STANDARD_BOX !== a0) {
var COFFEE = PremiumGiftStyles.COFFEE;
if (COFFEE === a0) {
return importDefault(10520) /* metro dependency 10520 */;
}
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;
var CAKE = PremiumGiftStyles.CAKE;
if (CAKE === a0) {
return importDefault(10521) /* metro dependency 10521 */;
}
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;
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) {
object = {};
object.uri = importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */;
return object;
}
}
return Module10519;
}
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 = 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 object;
const intl = require(dependencyMap[21]).intl;
var string;
const t = require(dependencyMap[21]).t;
var id;
var skuStoreBinding;
var skuId;
var value7;
var isAccepting;
var userStoreBinding;
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 object2;
var value58;
var DDO4Wz;
var object3;
var isPremiumSku;
var INVALID_GIFT_REDEMPTION_CLIENT_UPDATE_REQUIRED;
var resolveAssetSource;
let value = environment.__proto__;
const value2 = GiftCodeStore.get(a0);
if (a0 != null) {
giftCodeStoreBinding = GiftCodeStore;
if (giftCodeStoreBinding.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;
object = {};
resolveAssetSource = Image.resolveAssetSource;
r6 = require(dependencyMap[22]).isThemeDark(require) ? importDefault(dependencyMap[23]) : importDefault(dependencyMap[24]);
object.thumbnailUrl = Reflect.apply(resolveAssetSource, Image, [r6]).uri;
string = intl.string;
object.headerText = (r2 ? Reflect.apply(string, intl, [t.kzFKb6]) : Reflect.apply(string, intl,
[t.jwCLTM])).toUpperCase();
object.titleText = intl.string(t.SdKbX2);
r6 = processColor(importDefault(dependencyMap[25]).unsafe_rawColors.RED_400) ?? titleColor;
object.titleColor = r6;
object.headerColor = headerColor;
object.thumbnailBackgroundColor = thumbnailBackgroundColor;
r2 = code === INVALID_GIFT_REDEMPTION_CLIENT_UPDATE_REQUIRED ? intl.string(t.QXgO5w) : r2 ? intl.string(t.pBDXpb) : intl.string(t.TPamyd);
object.subtitle = r2;
object.subtitleColor = subtitleColor;
copyDataProperties(object, env0_13, r23);
return object;
}
skuStoreBinding = SKUStore;
get = skuStoreBinding.get;
skuId = value2.skuId;
value7 = Reflect.apply(get, skuStoreBinding, [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;
object = {};
expiresAt = value2.expiresAt;
object.hours = expiresAt.diff(importDefault(dependencyMap[26])(), 'h');
r16 = Reflect.apply(formatToPlainString, intl, [nZBvUR, object]);
} 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;
}
object = {};
copyDataProperties(object, 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;
object2 = {};
object2.recipientDisplayName = getUserNameOrDefault(currentUser);
r17 = Reflect.apply(formatToPlainString, intl, [t1SOId, object2]).toUpperCase();
}
object['headerText'] = r17;
type = env0_0.type;
CUSTOM_GIFT = MessageTypes.CUSTOM_GIFT;
if (type !== CUSTOM_GIFT) {
r17 = value7 != null ? value7.name : value14;
} else {
userStoreBinding = UserStore;
value58 = userStoreBinding.getUser(value2.userId);
formatToPlainString = intl.formatToPlainString;
DDO4Wz = t.DDO4Wz;
object3 = {};
object3.sender = getUserNameOrDefault(value58);
r17 = Reflect.apply(formatToPlainString, intl, [DDO4Wz, object3]);
}
object['titleText'] = r17;
object['subtitle'] = r16;
object['bodyText'] = r15;
object['headerColor'] = headerColor;
object['titleColor'] = titleColor;
object['subtitleColor'] = subtitleColor;
object['bodyTextColor'] = bodyTextColor;
object['acceptLabelBackgroundColor'] = r14;
object['acceptLabelColor'] = r13;
object['acceptLabelText'] = r12;
object['acceptLabelBorderColor'] = value14;
object['canBeAccepted'] = value12;
object['embedCanBeTapped'] = true;
object['giftCode'] = a0;
object['thumbnailUrl'] = r8 ?? value14;
type = env0_0.type;
CUSTOM_GIFT = MessageTypes.CUSTOM_GIFT;
r6 = type === CUSTOM_GIFT ? value14 : r5 ?? value14;
object['splashUrl'] = r6;
value = importDefault(dependencyMap[35]);
isPremiumSku = value.isPremiumSku;
skuId = value2.skuId;
value = !Reflect.apply(isPremiumSku, value, [skuId]);
object['splashHasRadialGradient'] = value;
value = importDefault(dependencyMap[35]);
isPremiumSku = value.isPremiumSku;
skuId = value2.skuId;
value = Reflect.apply(isPremiumSku, value, [skuId]);
r5 = value ? 0.8 : 0.97;
object['splashOpacity'] = r5;
return object;
}
} 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;
object = {};
value = intl.string(t['E+va0m']);
object.headerText = value.toUpperCase();
object.headerColor = headerColor;
object.resolvingGradientStart = resolvingGradientStart;
object.resolvingGradientEnd = resolvingGradientEnd;
copyDataProperties(object, env0_13, r23);
return object;
}
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;
}
}
global.__d(_fun67032, 8449, [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]) /* metro module 8449, 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] */;
@@ -1,82 +1,88 @@
/* 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] */
import Native from '../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserUtils from '../../../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import PremiumGiftingIntentStore from '../../../../../premium/gifting/PremiumGiftingIntentStore.tsx'; /* Metro dependency 8326 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../../../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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');
const createNativeStyleProperties = CreateStylesModule.createNativeStyleProperties;
object = {};
const TEXT_STRONG = (Native).colors.TEXT_STRONG;
object.headerTextColor = TEXT_STRONG;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.subHeaderTextColor = TEXT_SUBTLE;
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
const BORDER_MUTED = (Native).colors.BORDER_MUTED;
object.borderColor = BORDER_MUTED;
const env0_6 = Reflect.apply(createNativeStyleProperties, CreateStylesModule, [object]);
(FileImportTrackerModule).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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).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 = (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 object = {recipientAvatarUrl: value9, currentUserAvatarUrl: r9, recipientName: name};
object.headerText = r7.headerText;
object.subHeaderParts = r7.subHeaderParts;
object.recipientUserId = recipientUserId;
object.giftIntentType = giftIntentType;
object.headerTextColor = value.headerTextColor;
object.subHeaderTextColor = value.subHeaderTextColor;
object.backgroundColor = value.backgroundColor;
object.borderColor = value.borderColor;
object.subHeaderIconUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(4049) /* metro dependency 4049 */);
object.primaryCtaLabel = intl.string(t.ilhtIa);
object.primaryCtaIconUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8329) /* metro dependency 8329 */);
object.secondaryCtaIconUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(8330) /* metro dependency 8330 */);
const string = intl.string;
const I5gL2H = t.I5gL2H;
object.secondaryCtaAccessibilityLabel = Reflect.apply(string, intl, [I5gL2H]);
return object;
}
}
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;
}
global.__d(_fun66270, 8325, [8326, 1878, 1880, 4501, 697, 1244, 7643, 3995, 8191, 4049, 8329, 8330,
2]) /* metro module 8325, dependencies: [8326, 1878, 1880, 4501, 697, 1244, 7643, 3995, 8191, 4049, 8329, 8330, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 10602; source: modules/messages/native/renderer/row_data/embeds/PostPreviewEmbeds.tsx; dependencies: [661, 10603, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
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');
let env0_2 = (ConstantsModule).MessageEmbedTypes;
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/PostPreviewEmbeds.tsx');
exports.createPostPreviewEmbeds = function(a0, a1) {
var value = a2;
var env0_0 = a0;
@@ -15,33 +18,34 @@ function _fun81726(global, require, importDefault, importAll, module, exports, d
}
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;
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);
}
binding = env0_3;
binding.push(value);
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);
}
}
}
}
global.__d(_fun81726, 10602, [661, 10603, 2]) /* metro module 10602, dependencies: [661, 10603, 2] */;
@@ -1,70 +1,72 @@
/* Metro module 8309; source: modules/messages/native/renderer/row_data/embeds/PremiumGroupInviteEmbed.tsx; dependencies: [3816, 4501, 697, 8191, 8310, 7945, 1244, 2806, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PremiumGroupConstantsModule from '../../../../../premium/premium_group/PremiumGroupConstants.tsx'; /* Metro dependency 3816 */
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');
(FileImportTrackerModule).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;
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 object = {};
var colors = (importDefault(697) /* metro dependency 697: native */).colors;
var MOBILE_TEXT_HEADING_PRIMARY = colors.MOBILE_TEXT_HEADING_PRIMARY;
object.headerTextColor = MOBILE_TEXT_HEADING_PRIMARY;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_DEFAULT = colors.TEXT_DEFAULT;
object.bodyTextColor = TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_LINK = colors.TEXT_LINK;
object.linkTextColor = TEXT_LINK;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BACKGROUND_MOD_NORMAL = colors.BACKGROUND_MOD_NORMAL;
object.backgroundColor = BACKGROUND_MOD_NORMAL;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BLACK = colors.BLACK;
object.betaPillTextColor = BLACK;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var WHITE = colors.WHITE;
object.betaPillBackgroundColor = WHITE;
var {headerTextColor, bodyTextColor, linkTextColor, backgroundColor, betaPillTextColor,
betaPillBackgroundColor} = Reflect.apply(createNativeStyleProperties, moduleValue, [object])(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;
object = {sender: author, channel: a3, isSender: a2 === id};
var UNKNOWN = PremiumGroupInviteState.UNKNOWN;
object.inviteState = UNKNOWN;
var value4 = Reflect.apply(getPremiumGroupInviteEmbedText, moduleValue3, [object]);
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}});
object = {headerText: header, headerColor: headerTextColor, backgroundColor: backgroundColor,
borderColor: backgroundColor, headerImageUrl: assetUriForEmbed};
object.betaPillText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oW0eUd).toUpperCase();
object.betaPillTextColor = betaPillTextColor;
object.betaPillBackgroundColor = betaPillBackgroundColor;
object.bodyText = body;
object.bodyTextColor = bodyTextColor;
object.learnMoreLink = value;
return object;
}
}
}
}
global.__d(_fun66211, 8309, [3816, 4501, 697, 8191, 8310, 7945, 1244, 2806,
2]) /* metro module 8309, dependencies: [3816, 4501, 697, 8191, 8310, 7945, 1244, 2806, 2] */;
@@ -1,257 +1,379 @@
/* 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] */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SubscriptionStore from '../../../../../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import IAPStoreAndroid from '../../../../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UserOfferStore from '../../../../../../stores/billing/UserOfferStore.tsx'; /* Metro dependency 7064 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../../../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as ProductIdsAndroidModule from '../../../../../premium/native/ProductIds.android.tsx'; /* Metro dependency 5143 */
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');
(FileImportTrackerModule).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;
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).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 object;
var subscription_trial;
var value18;
var value20;
var formatToParts;
var LwCwT9;
var defaultImport4;
var value22;
var defaultImport5;
var mVzEG8;
var defaultImport6;
var value25;
var object4;
var object8;
var object9;
if (a0.author != null) {
var value;
var value2 = undefined;
var moduleValue = require(4501) /* metro dependency 4501: createStyles */;
var createNativeStyleProperties = moduleValue.createNativeStyleProperties;
var object10 = {};
var colors = (importDefault(697) /* metro dependency 697: native */).colors;
var WHITE = colors.WHITE;
object10.headerTextColor = WHITE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var MOBILE_TEXT_HEADING_PRIMARY = colors.MOBILE_TEXT_HEADING_PRIMARY;
object10.titleColor = MOBILE_TEXT_HEADING_PRIMARY;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_DEFAULT = colors.TEXT_DEFAULT;
object10.bodyTextColor = TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_MUTED = colors.TEXT_MUTED;
object10.footerTextColor = TEXT_MUTED;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var INTERACTIVE_TEXT_DEFAULT = colors.INTERACTIVE_TEXT_DEFAULT;
object10.subTextColor = INTERACTIVE_TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BACKGROUND_MOD_NORMAL = colors.BACKGROUND_MOD_NORMAL;
object10.backgroundColor = BACKGROUND_MOD_NORMAL;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
WHITE = colors.WHITE;
object10.acceptLabelColor = WHITE;
var {headerTextColor, titleColor, bodyTextColor, footerTextColor, subTextColor, acceptLabelColor,
backgroundColor} = Reflect.apply(createNativeStyleProperties, moduleValue, [object10])(a1);
var channelStoreBinding = ChannelStore;
var getChannel = channelStoreBinding.getChannel;
var getChannelId = a0.getChannelId;
var value4 = Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getChannelId, a0, [])]);
if (value4 == null) {
return undefined;
}
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) {
if (value4.isDM()) {
object10 = {backgroundColor: backgroundColor, borderColor: backgroundColor, thumbnailCornerRadius: 3};
object10.headerLogoUrl = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(7312) /* metro dependency 7312 */);
object10.headerText = intl.string(t.gtNqJQ).toLocaleLowerCase();
object10.headerColor = headerTextColor;
object10.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) {
object9 = {};
copyDataProperties(object9, object10, r32);
object9['bodyText'] = intl.string(t.eEz1N5);
object9['bodyTextColor'] = bodyTextColor;
object9['canBeAccepted'] = false;
return object9;
}
if (user2 == null) {
object9 = {};
copyDataProperties(object9, object10, r32);
object9['bodyText'] = intl.string(t.eEz1N5);
object9['bodyTextColor'] = bodyTextColor;
object9['canBeAccepted'] = false;
return object9;
}
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) {
object8 = {};
copyDataProperties(object8, object10, r32);
object8['titleText'] = value11;
object8['titleColor'] = titleColor;
object8['bodyText'] = intl.string(t.eEz1N5);
object8['bodyTextColor'] = bodyTextColor;
object8['canBeAccepted'] = false;
return object8;
}
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;
object = {};
subscription_trial = a3.subscription_trial;
value18 = subscription_trial == null;
object.intervalType = value18 ? value2 : subscription_trial.interval;
subscription_trial = a3.subscription_trial;
object.intervalCount = subscription_trial == null ? value2 : subscription_trial.interval_count;
value20 = Reflect.apply(formatToPlainString, intl, [uj94C5,
{duration: Reflect.apply(formatIntervalDuration,
moduleValue6, [object])}]).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) {
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 {
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}]);
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}]);
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}]);
url: defaultImport6.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
@@ -261,98 +383,12 @@ function createReferralTrialEmbedRedeemable(a0, a1, a2, a3) { // fn#66236, sourc
}
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;
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} 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;
@@ -380,78 +416,54 @@ function createReferralTrialEmbedRedeemable(a0, a1, a2, a3) { // fn#66236, sourc
}
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}]);
r11 = !hasUserTrialOfferExpired2 && !r18;
r11 = r11 && r13;
r11 = r11 && !value9;
object4 = {};
copyDataProperties(object4, object10, r32);
object4['titleText'] = value11;
object4['titleColor'] = titleColor;
object4['bodyText'] = r17;
object4['structuredBodyText'] = r16;
object4['bodyTextColor'] = bodyTextColor;
object4['subText'] = r10;
object4['subTextColor'] = subTextColor;
object4['canBeAccepted'] = r11;
if (r11) {
object10 = {};
copyDataProperties(object10, object4, r32);
object10['footerText'] = r15;
object10['footerTextColor'] = footerTextColor;
object10['canBeAccepted'] = r11;
object10['acceptLabelText'] = intl.string(t.bXTClc);
object10['acceptLabelColor'] = acceptLabelColor;
object10['acceptLabelIconUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(7955) /* metro dependency 7955 */);
r0 = object10;
} 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)}}]);
r0 = object4;
}
r16 = r19;
r17 = value2;
return r0;
}
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 = (ProductIdsAndroidModule).TrialIdToProductOfferId;
return Reflect.apply(values, Object, [TrialIdToProductOfferId[PREMIUM_TIER_2_REFERRAL_TRIAL_ID]]).every(_fun66238);
function _fun66238(a0) { // fn#66238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8501:1933, offset: 0x00e4010b, size: 22 bytes, params: 2, frame: 11
return env0_0.has(a0);
}
}
}
}
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);
}
global.__d(_fun66235, 8316, [1379, 1878, 3808, 7064, 5140, 661, 1880, 4501, 697, 5143, 8191, 7312, 1244, 8317, 3995,
3802, 7063, 8314, 1948, 1581, 7955,
2]) /* metro module 8316, dependencies: [1379, 1878, 3808, 7064, 5140, 661, 1880, 4501, 697, 5143, 8191, 7312, 1244, 8317, 3995, 3802, 7063, 8314, 1948, 1581, 7955, 2] */;
@@ -1,290 +1,412 @@
/* 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] */
import ChannelStore from '../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SubscriptionStore from '../../../../../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import IAPStoreAndroid from '../../../../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UserOfferStore from '../../../../../../stores/billing/UserOfferStore.tsx'; /* Metro dependency 7064 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../../../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as ProductIdsAndroidModule from '../../../../../premium/native/ProductIds.android.tsx'; /* Metro dependency 5143 */
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');
(FileImportTrackerModule).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;
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 = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).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 object;
var subscription_trial;
var value18;
var value20;
var LwCwT9;
var defaultImport6;
var value22;
var defaultImport7;
var mVzEG8;
var defaultImport8;
var value25;
var object4;
var object7;
if (a0.author != null) {
var value;
var value2 = undefined;
var moduleValue = require(4501) /* metro dependency 4501: createStyles */;
var createNativeStyleProperties = moduleValue.createNativeStyleProperties;
var object8 = {};
var colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_DEFAULT = colors.TEXT_DEFAULT;
object8.titleColor = TEXT_DEFAULT;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var MOBILE_TEXT_HEADING_PRIMARY = colors.MOBILE_TEXT_HEADING_PRIMARY;
object8.headerTextColor = MOBILE_TEXT_HEADING_PRIMARY;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_SUBTLE = colors.TEXT_SUBTLE;
object8.bodyTextColor = TEXT_SUBTLE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_MUTED = colors.TEXT_MUTED;
object8.footerTextColor = TEXT_MUTED;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
TEXT_SUBTLE = colors.TEXT_SUBTLE;
object8.subTextColor = TEXT_SUBTLE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var BACKGROUND_MOD_NORMAL = colors.BACKGROUND_MOD_NORMAL;
object8.backgroundColor = BACKGROUND_MOD_NORMAL;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var WHITE = colors.WHITE;
object8.acceptLabelColor = WHITE;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
var TEXT_LINK = colors.TEXT_LINK;
object8.linkTextColor = TEXT_LINK;
var {titleColor, headerTextColor, bodyTextColor, footerTextColor, subTextColor, acceptLabelColor,
backgroundColor,
linkTextColor} = Reflect.apply(createNativeStyleProperties, moduleValue, [object8])(a1);
var channelStoreBinding = ChannelStore;
var getChannel = channelStoreBinding.getChannel;
var getChannelId = a0.getChannelId;
var value4 = Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getChannelId, a0, [])]);
if (value4 == null) {
return undefined;
}
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) {
if (value4.isDM()) {
user = UserStore.getUser(a3 == null ? value2 : a3.user_id);
user2 = UserStore.getUser(a3 == null ? value2 : a3.referrer_id);
if (user == null) {
object8 = {titleText: '', titleColor: titleColor};
object8.headerImageUrl = importDefault(8313) /* metro dependency 8313: trialExchangePng */;
object8.headerText = '';
object8.headerColor = headerTextColor;
object8.backgroundColor = backgroundColor;
object8.borderColor = backgroundColor;
object8.bodyText = intl.string(t.eEz1N5);
object8.bodyTextColor = bodyTextColor;
object8.canBeAccepted = false;
return object8;
}
if (user2 == null) {
object8 = {titleText: '', titleColor: titleColor};
object8.headerImageUrl = importDefault(8313) /* metro dependency 8313: trialExchangePng */;
object8.headerText = '';
object8.headerColor = headerTextColor;
object8.backgroundColor = backgroundColor;
object8.borderColor = backgroundColor;
object8.bodyText = intl.string(t.eEz1N5);
object8.bodyTextColor = bodyTextColor;
object8.canBeAccepted = false;
return object8;
}
name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user2);
id = user2.id;
value8 = id === a2;
formatToPlainString = intl.formatToPlainString;
yisueA = t.yisueA;
object8 = {sender: name};
defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
getArticleURL = defaultImport2.getArticleURL;
REFERRAL_PROGRAM = HelpdeskArticles.REFERRAL_PROGRAM;
object8.helpdeskArticle = Reflect.apply(getArticleURL, defaultImport2, [REFERRAL_PROGRAM]);
value9 = Reflect.apply(formatToPlainString, intl, [yisueA, object8]);
formatToParts = intl.formatToParts;
yisueA = t.yisueA;
object8 = {sender: name};
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
getArticleURL = defaultImport3.getArticleURL;
REFERRAL_PROGRAM = HelpdeskArticles.REFERRAL_PROGRAM;
object8.helpdeskArticle = {action: 'bindOpenUrl', url: Reflect.apply(getArticleURL, defaultImport3,
[REFERRAL_PROGRAM]), linkColor: linkTextColor};
value10 = Reflect.apply(formatToParts, intl, [yisueA, object8]);
object8 = {titleText: value9, titleColor: titleColor,
headerImageUrl: importDefault(8313) /* metro dependency 8313: trialExchangePng */};
object8.headerText = intl.string(t.HtTvXA);
object8.headerColor = headerTextColor;
object8.backgroundColor = backgroundColor;
object8.borderColor = backgroundColor;
object8.learnMoreLink = value10;
if (a3 == null) {
object7 = {};
copyDataProperties(object7, object8, r34);
object7['bodyText'] = intl.string(t.eEz1N5);
object7['bodyTextColor'] = bodyTextColor;
object7['canBeAccepted'] = false;
return object7;
}
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;
object = {};
subscription_trial = a3.subscription_trial;
value18 = subscription_trial == null;
object.intervalType = value18 ? value2 : subscription_trial.interval;
subscription_trial = a3.subscription_trial;
object.intervalCount = subscription_trial == null ? value2 : subscription_trial.interval_count;
value20 = Reflect.apply(formatToPlainString, intl, [uj94C5,
{duration: Reflect.apply(formatIntervalDuration,
moduleValue4, [object])}]).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) {
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 {
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}]);
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}]);
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}]);
url: defaultImport8.getArticleURL(HelpdeskArticles.REFERRAL_PROGRAM)}, username: name}]);
} else {
formatToParts = intl.formatToParts;
r20 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? t.yqX4Dr : t['7O7Zg3'];
@@ -294,98 +416,12 @@ function createReferralTrialEmbedRedesign(a0, a1, a2, a3) { // fn#66217, source:
}
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;
value22 = intl.string(t['9SNdf4']);
r16 = value2;
r17 = value22;
}
} 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;
@@ -413,76 +449,52 @@ function createReferralTrialEmbedRedesign(a0, a1, a2, a3) { // fn#66217, source:
}
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}]);
r10 = !hasUserTrialOfferExpired2 && !r18;
r10 = r10 && r13;
r10 = r10 && !value8;
object4 = {};
copyDataProperties(object4, object8, r34);
object4['bodyText'] = r17;
object4['structuredBodyText'] = r16;
object4['bodyTextColor'] = bodyTextColor;
object4['subText'] = r9;
object4['subTextColor'] = subTextColor;
object4['canBeAccepted'] = r10;
if (r10) {
object8 = {};
copyDataProperties(object8, object4, r34);
object8['footerText'] = r15;
object8['footerTextColor'] = footerTextColor;
object8['canBeAccepted'] = r10;
object8['acceptLabelText'] = intl.string(t.bXTClc);
object8['acceptLabelColor'] = acceptLabelColor;
object8['acceptLabelIconUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(7955) /* metro dependency 7955 */);
r0 = object8;
} 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)}}]);
r0 = object4;
}
r16 = r19;
r17 = value2;
return r0;
}
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 = (ProductIdsAndroidModule).TrialIdToProductOfferId;
return Reflect.apply(values, Object, [TrialIdToProductOfferId[PREMIUM_TIER_2_REFERRAL_TRIAL_ID]]).every(_fun66219);
function _fun66219(a0) { // fn#66219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8497:2158, offset: 0x00e4010b, size: 22 bytes, params: 2, frame: 11
return env0_0.has(a0);
}
}
}
}
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);
}
global.__d(_fun66216, 8312, [1379, 1878, 3808, 7064, 5140, 661, 1880, 4501, 697, 5143, 8313, 1244, 3995, 1948, 3802,
7063, 8314, 1581, 8191, 7955,
2]) /* metro module 8312, dependencies: [1379, 1878, 3808, 7064, 5140, 661, 1880, 4501, 697, 5143, 8313, 1244, 3995, 1948, 3802, 7063, 8314, 1581, 8191, 7955, 2] */;
@@ -1,72 +1,77 @@
/* Metro module 10606; source: modules/messages/native/renderer/row_data/embeds/SafetyPolicyNoticeEmbed.tsx; dependencies: [27, 661, 5267, 3738, 1244, 8191, 8130, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SafetyHubConstantsModule from '../../../../../safety_hub/SafetyHubConstants.tsx'; /* Metro dependency 5267 */
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');
(FileImportTrackerModule).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;
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 object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var moduleValue;
var formatToPlainString;
var eevFb6;
var object2;
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) {
object = {};
object.titleText = intl.string(t['4CxGXi']);
moduleValue = require(8191) /* metro dependency 8191: EmbedUtils */;
object.titleIcon = moduleValue.getAssetUriForEmbed(Image.resolveAssetSource(importDefault(8130) /* metro dependency 8130 */));
formatToPlainString = intl.formatToPlainString;
eevFb6 = t.eevFb6;
object2 = {};
value5 = (importDefault(3738) /* metro dependency 3738 */)();
object2.daysAgo = value5.diff((importDefault(3738) /* metro dependency 3738 */).unix(r14), 'days');
object.subtitleText = Reflect.apply(formatToPlainString, intl, [eevFb6, object2]);
object.descriptionText = intl.string(t['5CLb0A']);
object.ctaText = intl.string(t.zKnzwm);
object.classificationId = r1;
return object;
}
}
}
}
global.__d(_fun81746, 10606, [27, 661, 5267, 3738, 1244, 8191, 8130,
2]) /* metro module 10606, dependencies: [27, 661, 5267, 3738, 1244, 8191, 8130, 2] */;
@@ -1,118 +1,122 @@
/* Metro module 10607; source: modules/messages/native/renderer/row_data/embeds/SafetySystemNotificationEmbed.tsx; dependencies: [27, 661, 3738, 8130, 6654, 5266, 8191, 1244, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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) {
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 object;
var header;
var value6;
var moduleValue4;
var getAssetUriForEmbed;
var resolveAssetSource;
var intl;
var formatToPlainString;
var eevFb6;
var object2;
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[value] != null) {
moduleValue2 = require(dependencyMap[5]);
r5 = moduleValue2.mapCtaToNativeData(messageForProps.ctas[value], messageForProps.learn_more_link,
messageForProps.classification_id);
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 {
r5 = value2;
r3 = value2;
r6 = 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;
object = {};
header = messageForProps.header;
value6 = '';
r7 = header ?? value6;
object.titleText = r7;
moduleValue4 = require(dependencyMap[6]);
getAssetUriForEmbed = moduleValue4.getAssetUriForEmbed;
resolveAssetSource = Image.resolveAssetSource;
r7 = messageForProps.icon === 'danger' ? dependencyMap[3] : dependencyMap[4];
object.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;
object2 = {};
r15 = messageForProps.timestamp ?? value;
value = importDefault(dependencyMap[2])();
object2.daysAgo = value.diff(importDefault(dependencyMap[2]).unix(r15), 'days');
object.subtitleText = Reflect.apply(formatToPlainString, intl, [eevFb6, object2]);
r5 = messageForProps.body ?? value6;
object.descriptionText = r5;
text = r6 == null ? value2 : r6.text;
object.primaryCtaText = text;
type = r6 == null ? value2 : r6.type;
object.primaryCtaType = type;
key = r6 == null ? value2 : r6.key;
object.primaryCtaKey = key;
text = r3 == null ? value2 : r3.text;
object.secondaryCtaText = text;
type = r3 == null ? value2 : r3.type;
object.secondaryCtaType = type;
key = r3 == null ? value2 : r3.key;
object.secondaryCtaKey = key;
object.footerTheme = messageForProps.theme;
return object;
}
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;
}
}
}
global.__d(_fun81750, 10607, [27, 661, 3738, 8130, 6654, 5266, 8191, 1244,
2]) /* metro module 10607, dependencies: [27, 661, 3738, 8130, 6654, 5266, 8191, 1244, 2] */;
@@ -1,134 +1,143 @@
/* 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] */
import GetEmbedThemeColors from '../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import BuildOverrideStore from '../../../../../../build_overrides/BuildOverrideStore.tsx'; /* Metro dependency 10557 */
import ValidateBuildOverride from '../../../../../../build_overrides/validateBuildOverride.tsx'; /* Metro dependency 10561 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as IndexNativeModule from '../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ClientInfoUtilsModule from '../../../../../../../utils/native/ClientInfoUtils.tsx'; /* Metro dependency 1582 */
import * as ConstantsModule from '../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as BuildOverrideStoreModule from '../../../../../../build_overrides/BuildOverrideStore.tsx'; /* Metro dependency 10557 */
import * as BuildOverrideUtilsModule from '../../../../../../build_overrides/native/BuildOverrideUtils.tsx'; /* Metro dependency 10558 */
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');
(FileImportTrackerModule).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 = (BuildOverrideUtilsModule).DEVICE_FIELD;
var object;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var moduleValue2;
const value2 = undefined;
const {colors, baseColors} = (GetEmbedThemeColors)(a1);
const buildOverrideStoreBinding = BuildOverrideStore;
const currentBuildOverride = buildOverrideStoreBinding.getCurrentBuildOverride();
const buildOverride = buildOverrideStoreBinding.getBuildOverride(a0);
let state = buildOverride.state;
const Resolving = State.Resolving;
if (state === Resolving) {
object = {headerText: 'RESOLVING'};
object.resolvingGradientEnd = colors.resolvingGradientEnd;
object.resolvingGradientStart = colors.resolvingGradientStart;
object.type = InviteTypes.GUILD;
copyDataProperties(object, baseColors, undefined);
return object;
}
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 = ValidateBuildOverride;
override = buildOverride.override;
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) {
object = {};
copyDataProperties(object, baseColors, undefined);
object['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object['subtitle'] = id;
object['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object['type'] = InviteTypes.GUILD;
r0 = object;
} else if (buildOverride.state === State.Invalid) {
object = {};
copyDataProperties(object, baseColors, undefined);
object['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object['subtitle'] = id;
object['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object['type'] = InviteTypes.GUILD;
r0 = object;
} else if (buildOverride.override == null) {
object = {};
copyDataProperties(object, baseColors, undefined);
object['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object['subtitle'] = id;
object['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object['type'] = InviteTypes.GUILD;
r0 = object;
} else if (id == null) {
object = {};
copyDataProperties(object, baseColors, undefined);
object['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object['subtitle'] = id;
object['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object['type'] = InviteTypes.GUILD;
r0 = object;
} else if (value8.valid) {
object = {};
copyDataProperties(object, baseColors, undefined);
string = intl.string;
object['headerText'] = Reflect.apply(string, intl, [t.Wj3LW4]).toLocaleUpperCase();
object['headerColor'] = colors.headerColor;
string = intl.string;
object['titleText'] = Reflect.apply(string, intl, [t.RCYGot]);
object['titleColor'] = colors.titleColor;
object['subtitle'] = id;
object['subtitleColor'] = colors.subtitleColor;
object['thumbnailUrl'] = Image.resolveAssetSource(importDefault(10555) /* metro dependency 10555 */).uri;
object['acceptButtonVariant'] = r6 ? 'destructive' : 'primary';
string = intl.string;
r6 = r6 ? Reflect.apply(string, intl, [t.tX4xrt]) : Reflect.apply(string, intl, [t.nOunHC]);
object['acceptLabelText'] = r6;
object['embedCanBeTapped'] = true;
object['type'] = InviteTypes.GUILD;
r0 = object;
} else {
object = {};
copyDataProperties(object, baseColors, undefined);
object['headerText'] = intl.string(t.d34xi4).toLocaleUpperCase();
moduleValue2 = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object['titleColor'] = moduleValue2.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
object['titleText'] = value8.valid ? intl.string(t.ODXApH) : value8.reason;
object['subtitle'] = id;
object['subtitleColor'] = id != null ? colors.subtitleColor : value2;
object['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object['type'] = InviteTypes.GUILD;
r0 = object;
}
return r0;
}
}
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;
}
global.__d(_fun81355, 10556, [27, 10557, 4118, 8189, 10558, 10561, 1582, 1244, 8181, 697, 4002, 10528, 10529, 10555,
2]) /* metro module 10556, dependencies: [27, 10557, 4118, 8189, 10558, 10561, 1582, 1244, 8181, 697, 4002, 10528, 10529, 10555, 2] */;
@@ -1,13 +1,18 @@
/* 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] */
import Module00057 from '../../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import LurkingStore from '../../../../../../lurker_mode/LurkingStore.tsx'; /* Metro dependency 3785 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GlobalUtilsModule from '../../../../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as CodedLinkModule from '../../../../../../coded_links/CodedLink.tsx'; /* Metro dependency 4101 */
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');
let env0_2 = Module00057;
(FileImportTrackerModule).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;
@@ -21,211 +26,214 @@ function _fun81286(global, require, importDefault, importAll, module, exports, d
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;
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;
}
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;
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 [];
}
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});
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 = (CodedLinkModule).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;
}
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});
const INVITE = CodedLinkType.INVITE;
if (INVITE === type) {
value = require(10542) /* metro dependency 10542: InviteEmbed */;
return value.createInviteEmbed(env0_0, code, 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});
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 (GlobalUtilsModule).assertNever(type);
}
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);
}
global.__d(_fun81286, 10535, [57, 3785, 1867, 1878, 7083, 10536, 4101, 10541, 10542, 10554, 10556, 10549, 10562,
10551, 10563, 10567, 8354, 10572, 10574, 1360,
2]) /* metro module 10535, dependencies: [57, 3785, 1867, 1878, 7083, 10536, 4101, 10541, 10542, 10554, 10556, 10549, 10562, 10551, 10563, 10567, 8354, 10572, 10574, 1360, 2] */;
@@ -1,23 +1,25 @@
/* Metro module 9859; source: modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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;
object = {STAGE_INSTANCE: 0};
object[0] = 'STAGE_INSTANCE';
object.GUILD_SCHEDULED_EVENT = 1;
object[1] = 'GUILD_SCHEDULED_EVENT';
object.GUILD_INVITE_DISABLED = 2;
object[2] = 'GUILD_INVITE_DISABLED';
object.EMBEDDED_ACTIVITY_INVITE = 3;
object[3] = 'EMBEDDED_ACTIVITY_INVITE';
object.APP_MESSAGE_EMBED = 4;
object[4] = 'APP_MESSAGE_EMBED';
object.GUILD_PROFILE_INVITE = 5;
object[5] = 'GUILD_PROFILE_INVITE';
object.VOICE_CHANNEL_LIST_INVITE = 6;
object[6] = 'VOICE_CHANNEL_LIST_INVITE';
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksConstants.tsx');
exports.CodedLinkExtendedType = object;
}
global.__d(_fun77299, 9859, [2]) /* metro module 9859, dependencies: [2] */;
@@ -1,8 +1,11 @@
/* Metro module 10538; source: modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/coded_links/CodedLinksTypes.tsx');
exports.AppMessageEmbedDisplayType = {DISPLAY: 'display', BLOCKED: 'blocked'};
}
global.__d(_fun81297, 10538, [2]) /* metro module 10538, dependencies: [2] */;
@@ -1,142 +1,147 @@
/* 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] */
import Module00057 from '../../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../../../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import InviteStore from '../../../../../../../stores/InviteStore.tsx'; /* Metro dependency 4097 */
import ApplicationStore from '../../../../../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import ApplicationAssetsStore from '../../../../../../applications/ApplicationAssetsStore.tsx'; /* Metro dependency 6874 */
import GetEmbedThemeColors from '../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as IndexNativeModule from '../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule from '../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as ApplicationAssetsStoreModule from '../../../../../../applications/ApplicationAssetsStore.tsx'; /* Metro dependency 6874 */
import * as CodedLinksConstantsModule from './CodedLinksConstants.tsx'; /* Metro dependency 9859 */
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');
(FileImportTrackerModule).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 assetSource;
var formatToParts;
var omZR7L;
var moduleValue3;
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 applicationStoreBinding = ApplicationStore;
const getApplication = applicationStoreBinding.getApplication;
let id = target_application.id;
if (Reflect.apply(getApplication, applicationStoreBinding, [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 = (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 = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).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;
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
r10 = Reflect.apply(formatToParts, intl, [omZR7L, {channelName: moduleValue3.computeChannelName(r23, UserStore,
RelationshipStore), guildName: name}]);
} 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 = Module00057((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;
const object = {};
copyDataProperties(object, baseColors, undefined);
object['channelIcon'] = r14;
object['headerText'] = r13;
object['acceptLabelBackgroundColor'] = acceptLabelGreenBackgroundColor;
object['titleText'] = value9;
object['structurableSubtitleText'] = r10;
object['type'] = null;
const EMBEDDED_ACTIVITY_INVITE = CodedLinkExtendedType.EMBEDDED_ACTIVITY_INVITE;
object['extendedType'] = EMBEDDED_ACTIVITY_INVITE;
object['participantAvatarUris'] = r9;
object['acceptLabelText'] = r6;
object['splashUrl'] = r5;
string = intl.string;
const PZLnuD = t.PZLnuD;
object['noParticipantsText'] = Reflect.apply(string, intl, [PZLnuD]);
object['ctaEnabled'] = !r2;
return object;
}
}
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;
}
global.__d(_fun81335, 10551, [57, 27, 1378, 6874, 4234, 1226, 1379, 4097, 3793, 1878, 9859, 4118, 694, 6873, 8189,
6647, 1244, 4805, 10552,
2]) /* metro module 10551, dependencies: [57, 27, 1378, 6874, 4234, 1226, 1379, 4097, 3793, 1878, 9859, 4118, 694, 6873, 8189, 6647, 1244, 4805, 10552, 2] */;
@@ -1,217 +1,246 @@
/* 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] */
import AuthenticationStore from '../../../../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ActionSheetActionCreators from '../../../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GetEmbedThemeColors from '../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ExperimentConstantsModule from '../../../../../../experiments/ExperimentConstants.tsx'; /* Metro dependency 4108 */
import * as ConstantsModule from '../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as BottomSheetNativeModule from '../../../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseLegacyExperimentsModule from '../../../../../../experiments/client_override_hooks/useLegacyExperiments.tsx'; /* Metro dependency 10564 */
import * as UseApexExperimentsModule from '../../../../../../experiments/client_override_hooks/useApexExperiments.tsx'; /* Metro dependency 10565 */
import * as DevToolsExperimentsScreenModule from '../../../../../../devtools/native/components/screens/DevToolsExperimentsScreen.tsx'; /* Metro dependency 10570 */
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');
(FileImportTrackerModule).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
const useMemo = ReactModule.useMemo;
const value3 = ReactModule.useMemo(_fun81497, [id, experiment, Reflect.apply(useMemo, ReactModule, [_fun81496,
[experiment]])]);
const value4 = ReactModule.useCallback(_fun81502, []);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object.header = <BottomSheetTitleHeader title={experiment.title} subtitle={id} />;
const ExperimentDetails = (DevToolsExperimentsScreenModule).ExperimentDetails;
return (
<BottomSheet {...object}>
<ExperimentDetails
experiment={experiment}
override={override}
id={id}
options={value3}
onCopyLink={value4}
/>
</BottomSheet>
);
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 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 _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 _fun81498(a0) { // fn#81498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:415, offset: 0x01ed1776, size: 30 bytes, params: 2, frame: 13
const binding = env0_0;
binding.set(a0.id, a0);
}
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 _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_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__;
(ActionSheetActionCreators).hideActionSheet('ExperimentOverrideSheet');
value = require(4106) /* metro dependency 4106: ExperimentManager */;
value.overrideBucket(experiment.system, id, env0_0.id);
}
}
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__;
(ActionSheetActionCreators).hideActionSheet('ExperimentOverrideSheet');
value = require(4106) /* metro dependency 4106: ExperimentManager */;
value.overrideBucket(experiment.system, id, null);
}
}
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__;
(ActionSheetActionCreators).hideActionSheet('ExperimentOverrideSheet');
}
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';
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} = (UseLegacyExperimentsModule).useLegacyExperiments();
const value3 = (UseApexExperimentsModule).useApexExperiments();
const experiments2 = value3.experiments;
const experiments22 = experiments2;
const overridesInfo2 = value3.overridesInfo;
const value4 = experiments22.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={experiments22.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 object;
var value24;
const {colors, baseColors} = (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} = (UseLegacyExperimentsModule).getLegacyExperiments();
const apexExperiments = (UseApexExperimentsModule).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) {
object = {};
copyDataProperties(object, baseColors, undefined);
object['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;
object['titleText'] = value7 == experimentFromEmbedURL ? value24 : experimentFromEmbedURL;
object['titleColor'] = colors.titleColor;
object['subtitle'] = value24;
object['subtitleColor'] = colors.subtitleColor;
object['bodyText'] = 'This client is missing this experiment. You may need to open the surface where the experiment is used first.';
object['bodyTextColor'] = colors.bodyTextColor;
object['thumbnailUrl'] = Image.resolveAssetSource((require(3866) /* metro dependency 3866: themes */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
} else {
if (value7 == r14) {
object = {};
copyDataProperties(object, baseColors, undefined);
object['headerText'] = 'EXPERIMENT';
value24 = 'Unknown Experiment';
object['titleText'] = value7 == experimentFromEmbedURL ? value24 : experimentFromEmbedURL;
object['titleColor'] = colors.titleColor;
object['subtitle'] = value24;
object['subtitleColor'] = colors.subtitleColor;
object['bodyText'] = 'This client is missing this experiment. You may need to open the surface where the experiment is used first.';
object['bodyTextColor'] = colors.bodyTextColor;
object['thumbnailUrl'] = Image.resolveAssetSource((require(3866) /* metro dependency 3866: themes */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object['type'] = InviteTypes.GUILD;
return object;
}
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;
object = {};
copyDataProperties(object, baseColors, id);
object['headerText'] = 'EXPERIMENT TREATMENT';
object['titleText'] = experimentFromEmbedURL;
object['titleColor'] = colors.titleColor;
object['subtitle'] = r10;
object['subtitleColor'] = colors.subtitleColor;
object['thumbnailUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(10569) /* metro dependency 10569 */);
object['thumbnailBackgroundColor'] = colors.backgroundColor;
r10 = r6 ? colors.clearLabelRedColor : colors.acceptLabelGreenColor;
object['acceptLabelColor'] = r10;
r10 = r6 ? colors.clearLabelRedBackgroundColor : colors.acceptLabelGreenBackgroundColor;
object['acceptLabelBackgroundColor'] = r10;
r9 = r6 ? 'Clear Treatment ' + experimentTreatmentFromEmbedURL : 'Apply Treatment ' + experimentTreatmentFromEmbedURL;
object['acceptLabelText'] = r9;
object['embedCanBeTapped'] = true;
object['type'] = InviteTypes.GUILD;
return object;
}
object = {};
copyDataProperties(object, baseColors, id);
object['headerText'] = 'EXPERIMENT';
object['titleText'] = experimentFromEmbedURL;
object['titleColor'] = colors.titleColor;
object['subtitle'] = value7 != r9 ? 'Client Override Applied: Treatment ' + r9.variantId : 'Server Assignment: ' + experimentServerAssignmentLabel;
object['subtitleColor'] = colors.subtitleColor;
object['thumbnailUrl'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(10569) /* metro dependency 10569 */);
object['thumbnailBackgroundColor'] = colors.backgroundColor;
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
object['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
object['acceptLabelText'] = 'View Experiment Details';
object['embedCanBeTapped'] = true;
}
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;
const GUILD = InviteTypes.GUILD;
object['type'] = GUILD;
return object;
function _fun81507({value}) { // fn#81507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10753:2578, offset: 0x01b733f1, size: 21 bytes, params: 2, frame: 2
return value === env0_0;
}
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);
}
global.__d(_fun81494, 10567, [31, 27, 1226, 4108, 4118, 33, 8189, 4105, 10564, 10565, 3866, 10528, 10529, 10568,
8191, 10569, 4113, 4080, 4106, 6275, 6758, 10570, 10563,
2]) /* metro module 10567, 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] */;
@@ -1,268 +1,302 @@
/* 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] */
import Module00057 from '../../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GuildScheduledEventStore from '../../../../../../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import GetEmbedThemeColors from '../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import Module08194 from '../../../../../../../by-id/module-08194.js'; /* Metro dependency 8194 */
import Share from '../../../../../../icons/native/Share.tsx'; /* Metro dependency 9173 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as IndexNativeModule from '../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildScheduledEventsConstantsModule from '../../../../../../guild_scheduled_events/GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as GuildRecordModule from '../../../../../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as GuildScheduledEventStoreModule from '../../../../../../guild_scheduled_events/GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as ConstantsModule from '../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as ScheduleUtilsModule from '../../../../../../guild_scheduled_events/utils/ScheduleUtils.tsx'; /* Metro dependency 9039 */
import * as EntityUtilsModule from '../../../../../../guild_scheduled_events/utils/EntityUtils.tsx'; /* Metro dependency 9042 */
import * as UseEventScheduleModule from '../../../../../../guild_scheduled_events/useEventSchedule.tsx'; /* Metro dependency 9045 */
import * as UseCanInviteForGuildEventModule from '../../../../../../guild_scheduled_events/useCanInviteForGuildEvent.tsx'; /* Metro dependency 9049 */
import * as GuildEventUtilsModule from '../../../../../../guild_scheduled_events/native/components/GuildEventUtils.tsx'; /* Metro dependency 9121 */
import * as CodedLinksConstantsModule from './CodedLinksConstants.tsx'; /* Metro dependency 9859 */
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');
(FileImportTrackerModule).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);
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 r22;
var r5;
var r20;
var r24;
var r25;
var r26;
var r0;
var r14;
var moduleValue8;
var value13;
var value14;
var acceptLabelGreenColor;
var value15;
var acceptLabelActiveBackgroundColor;
var assetUriForEmbed;
var acceptLabelDisabledTextColor;
var value19;
var moduleValue11;
var moduleValue15;
const colors = (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 = (UseCanInviteForGuildEventModule).isGuildEventInvitable(guildEvent);
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(guildEvent);
const entity_type = guildEvent.entity_type;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const isInterestedInEventRecurrence2 = guildScheduledEventStoreBinding.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 = (UseEventScheduleModule).getEventSchedule(guildEvent,
recurrenceId);
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;
object = {};
object.titleColor = colors.titleColor;
object.borderColor = colors.borderColor;
let backgroundColor = colors.backgroundColor;
object.backgroundColor = backgroundColor;
object.thumbnailCornerRadius = 15;
object.embedCanBeTapped = value9;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const DlcqlU = t.DlcqlU;
const value10 = Reflect.apply(string, intl, [DlcqlU]);
const assetUriForEmbed2 = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(Module08194);
const assetUriForEmbed3 = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(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;
value19 = false;
r5 = assetUriForEmbed3;
r6 = value19;
r20 = r22;
value15 = false;
r5 = undefined;
r6 = value15;
r20 = value14;
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;
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 locationFromEvent = (EntityUtilsModule).getLocationFromEvent(guildEvent);
if (locationFromEvent != null) {
r14 = locationFromEvent;
} else {
acceptLabelActiveBackgroundColor = colors.acceptLabelActiveBackgroundColor;
acceptLabelGreenColor = colors.acceptLabelGreenColor;
r5 = assetUriForEmbed3;
r6 = isInterestedInEventRecurrence2;
r20 = value10;
r24 = assetUriForEmbed2;
r25 = acceptLabelGreenColor;
r26 = acceptLabelActiveBackgroundColor;
if (channel != null) {
moduleValue11 = require(4805) /* metro dependency 4805: useChannelName */;
r0 = moduleValue11.computeChannelName(channel, UserStore, RelationshipStore);
} else {
r0 = undefined;
}
r14 = r0;
}
} 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;
const eventLocationIconSource = (GuildEventUtilsModule).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 object3 = {};
copyDataProperties(object3, object, undefined);
object3['acceptLabelBackgroundColor'] = r26;
object3['acceptLabelBorderColor'] = r6 ? colors.acceptLabelDisabledBorderColor : undefined;
object3['acceptLabelColor'] = r25;
object3['acceptLabelIcon'] = r24;
object3['acceptLabelText'] = r20;
object3['badgeCount'] = userCount?.toLocaleString();
object3['badgeIcon'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(importDefault(10550) /* metro dependency 10550 */);
object3['channelIcon'] = eventLocationIconSource != null ? (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(eventLocationIconSource) : undefined;
object3['channelName'] = r14 ?? undefined;
object3['content'] = r18;
if (user != null) {
moduleValue15 = require(8191) /* metro dependency 8191: EmbedUtils */;
r18 = moduleValue15.getAssetUriForEmbed(user.getAvatarSource(guildEvent.guild_id));
} else {
r0 = value2;
r18 = undefined;
}
} 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);
object3['creatorAvatar'] = r18;
const GUILD_SCHEDULED_EVENT = CodedLinkExtendedType.GUILD_SCHEDULED_EVENT;
object3['extendedType'] = GUILD_SCHEDULED_EVENT;
object3['guildIcon'] = r17;
object3['guildName'] = guild?.name;
object3['headerColor'] = processColor(color) ?? colors.headerColor;
object3['headerIcon'] = (require(8191) /* metro dependency 8191: EmbedUtils */).getAssetUriForEmbed(icon);
object3['headerText'] = text;
object3['headerTextColor'] = shouldChangeTextColor ? processColor(color) ?? colors.headerColor : colors.headerColor;
object3['isRsvped'] = r6;
object3['secondaryActionIcon'] = r5;
object3['titleText'] = name2;
object3['type'] = type;
object3['guildEventId'] = guildEvent.id;
return object3;
}
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 object;
var guildStoreBinding;
var moduleValue;
var type;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const channel = a0.channel;
const value2 = null;
const value3 = undefined;
const value4 = Reflect.apply(getChannel, channelStoreBinding, [value2 == channel ? value3 : channel.id]);
const guild_id = value2 == value4 ? value3 : value4.guild_id;
let guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getGuildScheduledEvent = guildScheduledEventStoreBinding.getGuildScheduledEvent;
let guild_scheduled_event = a0.guild_scheduled_event;
const value5 = Reflect.apply(getGuildScheduledEvent, guildScheduledEventStoreBinding,
[value2 == guild_scheduled_event ? value3 : guild_scheduled_event.id]);
guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getUserCount = guildScheduledEventStoreBinding.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 {
r7 = GuildStore.getGuild(value2 == value4 ? value3 : value4.guild_id);
if (value2 != guild_id) {
defaultImport = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
defaultImport.getGuildEventUserCounts(guild_id, value5.id, []);
}
createGuildScheduledEventEmbedBinding = createGuildScheduledEventEmbed;
object = {channel: value4, guildEvent: value5, userCount: Reflect.apply(getUserCount,
guildScheduledEventStoreBinding, [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 {
guildStoreBinding = GuildStore;
r7 = guildStoreBinding.getGuild(value2 == value4 ? value3 : value4.guild_id);
}
object.guild = r7;
object.theme = a1;
type = a0.type;
object.type = value2 != type ? type : InviteTypes.GUILD;
r0 = createGuildScheduledEventEmbedBinding(object);
}
object2.guild = r7;
object2.theme = a1;
type = a0.type;
object2.type = value2 != type ? type : InviteTypes.GUILD;
r0 = createGuildScheduledEventEmbedBinding(object2);
return r0;
}
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;
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 = Module00057(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;
}
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;
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 object = {};
object.channel = ChannelStore.getChannel(value == null ? value3 : value.channel_id);
object.guildEvent = value;
object.userCount = userCount;
object.guild = GuildStore.getGuild(property);
object.theme = a1;
const GUILD = InviteTypes.GUILD;
object.type = GUILD;
object.recurrenceId = r7;
return createGuildScheduledEventEmbedBinding(object);
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];
}
return null;
function _fun81333() { // fn#81333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10735:4074, offset: 0x01ecbc77, size: 20 bytes, params: 1, frame: 2
return delete env1_16[env0_0];
}
}
(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];
}
global.__d(_fun81328, 10549, [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]) /* metro module 10549, 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] */;
@@ -1,74 +1,80 @@
/* 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] */
import GuildTemplateStore from '../../../../../../guild_templates/GuildTemplateStore.tsx'; /* Metro dependency 7069 */
import GetEmbedThemeColors from '../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as IndexNativeModule from '../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule from '../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as GuildTemplatesConstantsModule from '../../../../../../guild_templates/GuildTemplatesConstants.tsx'; /* Metro dependency 6934 */
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');
(FileImportTrackerModule).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;
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object;
var string;
var moduleValue;
const {colors, baseColors} = (GetEmbedThemeColors)(a1);
const guildTemplate = GuildTemplateStore.getGuildTemplate(a0);
if (guildTemplate == null) {
return null;
}
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;
let state = guildTemplate.state;
const RESOLVING = GuildTemplateStates.RESOLVING;
if (state === RESOLVING) {
object = {};
object.headerText = intl.string(t.Xj87Yf).toUpperCase();
object.resolvingGradientEnd = colors.resolvingGradientEnd;
object.resolvingGradientStart = colors.resolvingGradientStart;
object.type = InviteTypes.GUILD;
copyDataProperties(object, baseColors, undefined);
} else {
state = guildTemplate.state;
var EXPIRED = GuildTemplateStates.EXPIRED;
if (state === EXPIRED) {
object = {};
copyDataProperties(object, baseColors, undefined);
string = intl.string;
object['headerText'] = Reflect.apply(string, intl, [t.C7ZRNw]).toUpperCase();
moduleValue = require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */;
object['titleColor'] = moduleValue.processColorOrThrow((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400);
string = intl.string;
object['titleText'] = Reflect.apply(string, intl, [t.A6MwXE]);
object['thumbnailUrl'] = Image.resolveAssetSource((require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(10528) /* metro dependency 10528 */ : importDefault(10529) /* metro dependency 10529 */).uri;
object['thumbnailBackgroundColor'] = colors.thumbnailBackgroundColor;
object['type'] = InviteTypes.GUILD;
return object;
}
var formatToPlainString = intl.formatToPlainString;
var L8Awgh = t.L8Awgh;
object = {};
var usageCount = guildTemplate.usageCount;
object.usageCount = usageCount.toString();
var value4 = Reflect.apply(formatToPlainString, intl, [L8Awgh, object]);
object = {};
copyDataProperties(object, baseColors, usageCount);
object['headerText'] = intl.string(t.kAvFkO).toUpperCase();
object['headerColor'] = colors.headerColor;
object['titleText'] = guildTemplate.name;
object['titleColor'] = colors.titleColor;
object['subtitle'] = value4;
object['subtitleColor'] = colors.subtitleColor;
object['thumbnailUrl'] = Image.resolveAssetSource(importDefault(10555) /* metro dependency 10555 */).uri;
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
object['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
object['acceptLabelText'] = intl.string(t['a3Gl+e']);
object['embedCanBeTapped'] = true;
object['type'] = InviteTypes.GUILD;
}
return object;
}
return object2;
}
global.__d(_fun81352, 10554, [27, 7069, 6934, 4118, 8189, 1244, 8181, 697, 4002, 10528, 10529, 10555,
2]) /* metro module 10554, dependencies: [27, 7069, 6934, 4118, 8189, 1244, 8181, 697, 4002, 10528, 10529, 10555, 2] */;
@@ -1,113 +1,116 @@
/* 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] */
import UserStore from '../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import InviteStore from '../../../../../../../stores/InviteStore.tsx'; /* Metro dependency 4097 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as InviteTypeUtilsModule from '../../../../../../instant_invite/InviteTypeUtils.tsx'; /* Metro dependency 4116 */
import * as ConstantsModule2 from '../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
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');
(FileImportTrackerModule).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;
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;
}
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);
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);
}
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,
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 = (InviteTypeUtilsModule).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 = (InviteTypeUtilsModule).getGuildInviteExtendedType(invite);
const GuildInviteExtendedType = (InviteTypeUtilsModule).GuildInviteExtendedType;
const EVENT = GuildInviteExtendedType.EVENT;
if (EVENT === guildInviteExtendedType) {
return (require(10549) /* metro dependency 10549: GuildScheduledEventEmbed */).createGuildScheduledEventInviteEmbed(invite,
a2);
if (voiceChannelListInviteEmbed != null) {
return voiceChannelListInviteEmbed;
}
return (require(10543) /* metro dependency 10543: GuildInvite */).createGuildInvite(invite, value5, 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);
}
return (require(10543) /* metro dependency 10543: GuildInvite */).createGuildInvite(invite, value5, a2);
}
global.__d(_fun81309, 10542, [4097, 1878, 661, 4118, 10543, 4116, 10547, 10548, 10549, 10551, 10553, 9856, 9857,
2]) /* metro module 10542, dependencies: [4097, 1878, 661, 4118, 10543, 4116, 10547, 10548, 10549, 10551, 10553, 9856, 9857, 2] */;
@@ -1,107 +1,115 @@
/* 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] */
import Module00057 from '../../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../../../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ConstantsModule from '../../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildRecordModule from '../../../../../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as ConstantsModule2 from '../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
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');
(FileImportTrackerModule).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;
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 permissionStoreBinding;
var value5;
var colors;
var baseColors;
var object;
var moduleValue;
var isGuildStageVoice2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var resolveAssetSource;
var moduleValue2;
var assetSource;
var moduleValue3;
let value = a0.split('/');
const value3 = undefined;
value = Module00057(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 (Reflect.apply(PermissionStore.can, permissionStoreBinding, [Permissions.VIEW_CHANNEL, value])) {
permissionStoreBinding = PermissionStore;
if (permissionStoreBinding.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;
}
object = {};
copyDataProperties(object, baseColors, undefined);
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
object['headerText'] = moduleValue.isAndroid() ? '' : value3;
object['headerColor'] = colors.headerColor;
isGuildStageVoice2 = value.isGuildStageVoice();
string = intl.string;
object['acceptLabelText'] = isGuildStageVoice2 ? Reflect.apply(string, intl,
[t['7vb2cc']]) : Reflect.apply(string,
intl, [t.gpqgah]);
object['onlineText'] = value3;
object['memberText'] = value3;
resolveAssetSource = Image.resolveAssetSource;
moduleValue2 = require(6647) /* metro dependency 6647: ChannelUtils */;
assetSource = Reflect.apply(resolveAssetSource, Image, [moduleValue2.getChannelIcon(value)]);
object['channelIcon'] = assetSource == null ? value3 : assetSource.uri;
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
value = moduleValue3.computeChannelName(value, UserStore, RelationshipStore);
object['titleText'] = value;
object['titleColor'] = colors.titleColor;
object['thumbnailUrl'] = r5 ?? value3;
object['thumbnailText'] = r6;
object['subtitleColor'] = value3;
object['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
object['acceptLabelBorderColor'] = value3;
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
object['embedCanBeTapped'] = true;
object['canBeAccepted'] = false;
value = intl.formatToPlainString(t['2wimj5'], {guildName: guild.name});
object['channelName'] = value;
object['subtitle'] = '';
object['type'] = InviteTypes.GUILD;
object['inviteSplash'] = value3;
return object;
}
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;
}
return null;
}
return null;
}
global.__d(_fun81440, 10562, [57, 27, 1422, 1379, 1867, 3784, 3793, 1878, 661, 4118, 8189, 1423, 477, 1244, 6647,
4805,
2]) /* metro module 10562, dependencies: [57, 27, 1422, 1379, 1867, 3784, 3793, 1878, 661, 4118, 8189, 1423, 477, 1244, 6647, 4805, 2] */;
@@ -1,101 +1,107 @@
/* 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] */
import RelationshipStore from '../../../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GetEmbedThemeColors from '../../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import * as FileImportTrackerModule from '../../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as IndexNativeModule from '../../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule from '../../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
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');
(FileImportTrackerModule).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;
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} = (GetEmbedThemeColors)(a3);
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).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 {
value9 = Reflect.apply(string, intl, [t.ib7Ng1]);
r6 = true;
r7 = acceptLabelGreenColor;
r8 = acceptLabelGreenBackgroundColor;
r14 = value9;
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 object = {};
copyDataProperties(object, baseColors, 4);
object['thumbnailCornerRadius'] = 25;
object['headerText'] = r16 != null ? r16.toUpperCase() : value2;
object['headerColor'] = colors.headerColor;
object['acceptLabelText'] = r14;
object['channelIcon'] = value2;
object['titleText'] = r13;
object['titleColor'] = colors.titleColor;
object['thumbnailUrl'] = r9 ?? value2;
object['subtitle'] = r10;
object['subtitleColor'] = value6 === r10 ? value2 : colors.subtitleColor;
object['acceptLabelBackgroundColor'] = r8;
object['acceptLabelBorderColor'] = value2;
object['acceptLabelColor'] = r7;
object['embedCanBeTapped'] = false;
object['canBeAccepted'] = r6;
const channel = a0.channel;
object['channelName'] = (channel == null ? value2 : channel.name) ?? value2;
object['type'] = a0.type ?? InviteTypes.FRIEND;
return object;
}
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;
}
global.__d(_fun81326, 10548, [27, 3793, 4118, 8189, 1244, 3995, 1423,
2]) /* metro module 10548, dependencies: [27, 3793, 4118, 8189, 1244, 3995, 1423, 2] */;
@@ -1,106 +1,135 @@
/* 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] */
import ChannelStore from '../../../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import GetEmbedThemeColors from '../../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import GetChannelAndRecipientsFromInvite from './getChannelAndRecipientsFromInvite.tsx'; /* Metro dependency 9860 */
import * as FileImportTrackerModule from '../../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ConstantsModule from '../../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
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');
(FileImportTrackerModule).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 r4;
var r11;
var r15;
var r5;
var moduleValue2;
var moduleValue3;
var acceptLabelGreenColor;
var acceptLabelGreenBackgroundColor;
var value16;
var acceptLabelDisabledColor;
var acceptLabelDisabledBackgroundColor;
var value17;
var moduleValue4;
const value2 = undefined;
const {colors, baseColors} = (GetEmbedThemeColors)(a2);
const {channel,
recipients_} = (GetChannelAndRecipientsFromInvite)(a0);
const channelStoreBinding = ChannelStore;
const value5 = null;
const channel2 = channelStoreBinding.getChannel(value5 == channel ? value2 : channel.id);
const value7 = false;
if (value5 != channel2) {
r6 = true;
r9 = channel2;
} else {
r6 = value7;
r9 = channel;
}
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).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;
}
if (r6) {
if (value5 != r9) {
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
r4 = moduleValue3.computeChannelName(r9, UserStore, RelationshipStore);
} else {
r4 = value5;
}
} else {
r4 = 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 object = {};
copyDataProperties(object, baseColors, undefined);
object['headerText'] = value5 != r17 ? r17.toUpperCase() : value2;
object['headerColor'] = colors.headerColor;
object['acceptLabelText'] = r15;
object['onlineText'] = value2;
object['memberText'] = r14;
object['channelIcon'] = value2;
object['titleText'] = r4;
object['titleColor'] = colors.titleColor;
object['thumbnailUrl'] = value5 != uri ? uri : value2;
object['thumbnailText'] = value2;
object['subtitle'] = '';
object['subtitleColor'] = value2;
object['acceptLabelBackgroundColor'] = r11;
object['acceptLabelBorderColor'] = value2;
object['acceptLabelColor'] = r10;
object['embedCanBeTapped'] = true;
object['canBeAccepted'] = value7;
if (r6) {
if (value5 == r9) {
r5 = r4;
} else {
moduleValue4 = require(4805) /* metro dependency 4805: useChannelName */;
r5 = moduleValue4.computeChannelName(r9, UserStore, RelationshipStore);
}
} else {
r5 = r4;
}
object['channelName'] = r5;
const type = a0.type;
object['type'] = value5 != type ? type : InviteTypes.GROUP_DM;
return object;
}
}
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;
}
global.__d(_fun81323, 10547, [1379, 3793, 1878, 4118, 8189, 9860, 1244, 10254, 1426, 4805,
2]) /* metro module 10547, dependencies: [1379, 3793, 1878, 4118, 8189, 9860, 1244, 10254, 1426, 4805, 2] */;
@@ -1,245 +1,256 @@
/* 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] */
import Module00057 from '../../../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import LocaleStore from '../../../../../../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import GetEmbedThemeColors from '../../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import * as FileImportTrackerModule from '../../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../../../../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as IndexNativeModule from '../../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildRoleUtilsModule from '../../../../../../../../utils/GuildRoleUtils.tsx'; /* Metro dependency 1940 */
import * as SharedModule from '../../../../../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as ConstantsModule2 from '../../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as GuildProfileBuildersModule from '../../../../../../../guild_profile/GuildProfileBuilders.tsx'; /* Metro dependency 6718 */
import * as GuildProfileViewModule from '../../../../../../../guild_profile/native/components/GuildProfileView.tsx'; /* Metro dependency 9302 */
import * as GuildProfileUtilsModule from '../../../../../../../guild_profile/native/GuildProfileUtils.tsx'; /* Metro dependency 9304 */
import * as CodedLinksConstantsModule from '../CodedLinksConstants.tsx'; /* Metro dependency 9859 */
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');
(FileImportTrackerModule).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;
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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var moduleValue7;
var moduleValue9;
var getEstablishedDate;
var defaultImport3;
const value2 = undefined;
const {colors, baseColors} = (GetEmbedThemeColors)(a1);
const guildProfileFromInvite = (GuildProfileBuildersModule).buildGuildProfileFromInvite(a0);
const isThemeDark2 = (SharedModule).isThemeDark(a1);
const unsafe_rawColors = (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 = (GuildProfileUtilsModule).getProfilePrimaryColor(guildProfileFromInvite);
const getBackgroundForProfile = GuildProfileViewModule.getBackgroundForProfile;
r11 = value4 != profilePrimaryColor ? profilePrimaryColor : r11;
const value8 = Module00057(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;
}
} 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;
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 {
r0 = value;
r18 = value2;
r19 = value2;
}
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;
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;
}
} 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 object;
var name;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var property;
const value = environment.__proto__;
const value2 = undefined;
const r0 = (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(GuildRoleUtilsModule.inviteRoleToDisplayData(id,
a0), 16) ?? ({});
const customIconSrc = r0.customIconSrc;
const unicodeEmoji = r0.unicodeEmoji;
const value7 = ColorUtilsModule.int2hex(a0.color ?? 0);
if (customIconSrc != null) {
object = {source: customIconSrc};
object.unicodeEmoji = unicodeEmoji == null ? value2 : unicodeEmoji.surrogates;
name = a0.name;
object.name = name;
object.size = 16;
formatToPlainString = intl.formatToPlainString;
property = t['9+YWrE'];
name = a0.name;
object.alt = Reflect.apply(formatToPlainString, intl, [property, {name: name}]);
r1 = object;
} else if (unicodeEmoji != null) {
object = {source: customIconSrc};
object.unicodeEmoji = unicodeEmoji == null ? value2 : unicodeEmoji.surrogates;
name = a0.name;
object.name = name;
object.size = 16;
formatToPlainString = intl.formatToPlainString;
property = t['9+YWrE'];
name = a0.name;
object.alt = Reflect.apply(formatToPlainString, intl, [property, {name: name}]);
r1 = object;
} else {
r1 = value2;
}
object = {};
object.id = a0.id;
object.name = a0.name;
object.color = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(value7);
object.roleIcon = r1;
return object;
}
}
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;
}
global.__d(_fun81348, 10553, [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]) /* metro module 10553, 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] */;
@@ -1,184 +1,198 @@
/* 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] */
import ChannelStore from '../../../../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../../../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import PermissionStore from '../../../../../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../../../../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import VoiceStateStore from '../../../../../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import SortedVoiceStateStore from '../../../../../../../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import AccessibilityStore from '../../../../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import GetEmbedThemeColors from '../../getEmbedThemeColors.tsx'; /* Metro dependency 8189 */
import VoiceChannelStartTimeStore from '../../../../../../../channel/VoiceChannelStartTimeStore.tsx'; /* Metro dependency 9858 */
import GuestUtils from '../../../../../../../guests/GuestUtils.tsx'; /* Metro dependency 9861 */
import * as FileImportTrackerModule from '../../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ConstantsModule from '../../../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildRecordModule from '../../../../../../../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as ConstantsModule2 from '../../../../../../../instant_invite/Constants.tsx'; /* Metro dependency 4118 */
import * as UseChannelNameModule from '../../../../../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as CodedLinksConstantsModule from '../CodedLinksConstants.tsx'; /* Metro dependency 9859 */
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');
(FileImportTrackerModule).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;
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 channelStoreBinding;
var value4;
var permissionStoreBinding;
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()) {
channelStoreBinding = ChannelStore;
value4 = channelStoreBinding.getChannel(channel.id);
r1 = value == value4 ? channel : value4;
permissionStoreBinding = PermissionStore;
r1 = permissionStoreBinding.canBasicChannel(BasicPermissions.VIEW_CHANNEL, r1) ? {guild: guild2,
channel: r1} : value;
return r1;
}
}
var channel = (importDefault(9860) /* metro dependency 9860: getChannelAndRecipientsFromInvite */)(a0).channel;
if (value == channel) {
return value;
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;
}
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;
const guild = voiceChannelListInviteEmbedData.guild;
const channel = voiceChannelListInviteEmbedData.channel;
const {colors, baseColors} = (GetEmbedThemeColors)(a1);
if (guild.icon != null) {
moduleValue = require(8191) /* metro dependency 8191: EmbedUtils */;
r10 = moduleValue.getAssetUriForEmbed(getGuildIconSource(guild, 128, false));
} else {
r10 = value2;
}
const sortedVoiceStateStoreBinding = SortedVoiceStateStore;
const getVoiceStatesForChannelAlt = sortedVoiceStateStoreBinding.getVoiceStatesForChannelAlt;
let id = channel.id;
const value5 = Reflect.apply(getVoiceStatesForChannelAlt, sortedVoiceStateStoreBinding, [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 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'] = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore);
object['titleColor'] = value5.length > 0 ? colors.voiceActiveColor : colors.voiceMutedColor;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
object['acceptLabelText'] = Reflect.apply(string, intl, [t.gpqgah]);
object['acceptLabelColor'] = colors.acceptLabelGreenColor;
object['acceptLabelBackgroundColor'] = colors.acceptLabelGreenBackgroundColor;
const defaultImport2 = 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 guildMemberStoreBinding;
var id;
var value2;
var defaultImport;
var value4;
var defaultImport2;
var getGuildMemberAvatarURLSimple;
var object;
var value10;
const member = a0.member;
if (member != null) {
r5 = member;
} else {
value = environment.__proto__;
guildMemberStoreBinding = GuildMemberStore;
value = guildMemberStoreBinding.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;
object = {};
id = guild.id;
object.guildId = id;
id = a0.user.id;
object.userId = id;
object.avatar = r5.avatar;
object.size = 24;
r6 = Reflect.apply(getGuildMemberAvatarURLSimple, defaultImport2, [object]);
} 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;
object = {};
const user = a0.user;
object.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;
}
object.displayName = r5;
object.avatarUrl = r4;
const selfStream = a0.voiceState.selfStream;
object.isStreaming = selfStream != null && selfStream;
object.fontId = r1;
return object;
}
}
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;
}
global.__d(_fun77274, 9857, [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]) /* metro module 9857, 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] */;
@@ -1,30 +1,33 @@
/* Metro module 9860; source: modules/messages/native/renderer/row_data/embeds/coded_links/invite/getChannelAndRecipientsFromInvite.tsx; dependencies: [1383, 2] */
import * as FileImportTrackerModule from '../../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelRecordModule from '../../../../../../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
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');
(FileImportTrackerModule).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;
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 object2;
const channel = a0.channel;
const value = null;
const r5 = value == channel ? [] : value != a0.channel.recipients ? a0.channel.recipients.slice() : [];
const object = {recipients_: r5};
if (value != a0.channel) {
createChannelRecordFromInviteBinding = createChannelRecordFromInvite;
object2 = {};
copyDataProperties(object2, a0.channel, r5);
object2['recipients'] = r5;
r1 = createChannelRecordFromInviteBinding(object2);
} else {
r1 = value;
}
object.channel = r1;
return object;
}
object3.channel = r1;
return object3;
}
global.__d(_fun77300, 9860, [1383, 2]) /* metro module 9860, dependencies: [1383, 2] */;
@@ -1,72 +1,76 @@
/* Metro module 10552; source: modules/messages/native/renderer/row_data/embeds/coded_links/useEmbeddedActivityParticipantAvatarUris.tsx; dependencies: [31, 1378, 1878, 1360, 632, 2] */
import EmbeddedActivitiesStore from '../../../../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import UserStore from '../../../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GlobalUtilsModule from '../../../../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
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');
(FileImportTrackerModule).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
return ReactModule.useMemo(_fun81343, [guildId,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([UserStore], _fun81341,
[ReactModule.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 _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 ReactModule.map(function(a0) {
return UserStore.getUser(a0);
});
}
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 _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,
[(GlobalUtilsModule).isNotNullish]).map(_fun81344);
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]);
}
}
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 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((GlobalUtilsModule).isNotNullish);
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 _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]);
}
global.__d(_fun81338, 10552, [31, 1378, 1878, 1360, 632,
2]) /* metro module 10552, dependencies: [31, 1378, 1878, 1360, 632, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 8189; source: modules/messages/native/renderer/row_data/embeds/getEmbedThemeColors.tsx; dependencies: [31, 4501, 4002, 697, 4000, 2] */
import Native from '../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ColorUtilsModule from '../../../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as SharedModule from '../../../../../../design/shared.tsx'; /* Metro dependency 4002 */
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 getEmbedThemeColors2 = 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);
@@ -40,95 +44,98 @@ function _fun65676(global, require, importDefault, importAll, module, exports, d
const value17 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(_fun65686);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createNativeStyleProperties = createStylesModule.createNativeStyleProperties;
object2 = {};
object = {};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.acceptBlurpleLabelBackgroundColor = BACKGROUND_BRAND;
object.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;
object.acceptLabelGreenBackgroundColor = CONTROL_CONNECTED_BACKGROUND_DEFAULT;
let WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.acceptLabelGreenColor = WHITE;
object.acceptLabelGreenColor = WHITE;
const MOBILE_EMBED_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_EMBED_BACKGROUND_DEFAULT;
object2.backgroundColor = MOBILE_EMBED_BACKGROUND_DEFAULT;
object.backgroundColor = MOBILE_EMBED_BACKGROUND_DEFAULT;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.bodyTextColor = TEXT_DEFAULT;
object.bodyTextColor = TEXT_DEFAULT;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.clearLabelRedBackgroundColor = RED_400;
object.clearLabelRedBackgroundColor = RED_400;
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.clearLabelRedColor = WHITE;
object.clearLabelRedColor = WHITE;
let TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.headerColor = TEXT_SUBTLE;
object.headerColor = TEXT_SUBTLE;
TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.subtitleColor = TEXT_SUBTLE;
object.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;
object.titleColor = MOBILE_TEXT_HEADING_PRIMARY;
object.acceptLabelActiveBackgroundColor = value;
object.acceptLabelDisabledBackgroundColor = value3;
object.acceptLabelDisabledBorderColor = value5;
object.acceptLabelDisabledTextColor = value7;
object.acceptLabelDisabledColor = value9;
object.borderColor = value11;
object.resolvingGradientEnd = value13;
object.resolvingGradientStart = value15;
object.thumbnailBackgroundColor = value17;
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
object2.voiceActiveColor = TEXT_FEEDBACK_POSITIVE;
object.voiceActiveColor = TEXT_FEEDBACK_POSITIVE;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.voiceHeaderBackgroundColor = BACKGROUND_MOD_MUTED;
object.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;
object.voiceMutedColor = TEXT_MUTED;
const env0_4 = Reflect.apply(createNativeStyleProperties, createStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/renderer/row_data/embeds/getEmbedThemeColors.tsx');
exports.default = getEmbedThemeColors2;
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);
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}};
}
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 _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;
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 _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);
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 = (SharedModule).isThemeDark(theme);
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const unsafe_rawColors = (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;
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 ReactModule.useMemo(_fun65688, [a0]);
function _fun65688() { // fn#65688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8374:2918, offset: 0x01bda28e, size: 23 bytes, params: 1, frame: 11
return getEmbedThemeColors(env0_0);
}
}
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]);
}
global.__d(_fun65676, 8189, [31, 4501, 4002, 697, 4000,
2]) /* metro module 8189, dependencies: [31, 4501, 4002, 697, 4000, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,45 +1,49 @@
/* Metro module 8426; source: modules/messages/native/renderer/row_data/interaction/InteractionStatus.tsx; dependencies: [8056, 1244, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as InteractionUtilsModule from '../../../../../interactions/InteractionUtils.tsx'; /* Metro dependency 8056 */
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');
object = {LOADING: 0};
object[0] = 'LOADING';
object.FAILED = 1;
object[1] = 'FAILED';
object.EPHEMERAL_SUCCESS = 999;
object[999] = 'EPHEMERAL_SUCCESS';
(FileImportTrackerModule).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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const interactionStatusViewState = (InteractionUtilsModule).getInteractionStatusViewState(a0,
a1);
const InteractionStatusViewState = (InteractionUtilsModule).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};
}
}
}
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};
}
}
global.__d(_fun66905, 8426, [8056, 1244, 2]) /* metro module 8426, dependencies: [8056, 1244, 2] */;
@@ -1,61 +1,65 @@
/* Metro module 8180; source: modules/messages/native/renderer/rows/BlockedGroup.tsx; dependencies: [8178, 482, 22, 4002, 697, 4000, 8181, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ConstantsModule from '../../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as SharedModule from '../../../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as RowGeneratorConstantsModule from '../RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
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');
const env0_5 = (Module00022Module).memoize(_fun65619);
(FileImportTrackerModule).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 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';
if (SharedModule.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 object = {};
object.borderColor = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(PRIMARY_700);
object.backgroundColor = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(PRIMARY_630);
object.color = (require(8181) /* metro dependency 8181: RowGeneratorStyleSheet */).processColorOrThrow(r3);
return object;
}
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;
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 object = {};
const binding = env0_5;
copyDataProperties(object, binding(a1), binding);
object['type'] = rowType;
object['content'] = content.map(function(a0) {
return importDefault.generate(a0);
});
const TOGGLE_BLOCKED_MESSAGES = SeparatorAction.TOGGLE_BLOCKED_MESSAGES;
object['button'] = {action: {type: TOGGLE_BLOCKED_MESSAGES, context: context ?? message.id}};
object['changeType'] = changeType;
object['text'] = text;
object['revealed'] = revealed;
object['canUncollapse'] = r1;
return object;
}
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;
}
global.__d(_fun65618, 8180, [8178, 482, 22, 4002, 697, 4000, 8181,
2]) /* metro module 8180, dependencies: [8178, 482, 22, 4002, 697, 4000, 8181, 2] */;
@@ -1,33 +1,37 @@
/* Metro module 10613; source: modules/messages/native/renderer/rows/Loading.tsx; dependencies: [8178, 4501, 697, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as RowGeneratorConstantsModule from '../RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
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 */;
let value = RowGeneratorConstantsModule;
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');
object = {};
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (Native).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object.loadButtonBackgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
const CONTROL_SECONDARY_TEXT_DEFAULT = (Native).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
object.loadButtonColor = CONTROL_SECONDARY_TEXT_DEFAULT;
const ICON_SUBTLE = (Native).colors.ICON_SUBTLE;
object.loadingColor = ICON_SUBTLE;
const env0_3 = Reflect.apply(createNativeStyleProperties, value, [object]);
(FileImportTrackerModule).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};
}
}
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};
}
global.__d(_fun81765, 10613, [8178, 4501, 697, 2]) /* metro module 10613, dependencies: [8178, 4501, 697, 2] */;
@@ -1,45 +1,51 @@
/* Metro module 10612; source: modules/messages/native/renderer/rows/Separator.tsx; dependencies: [8178, 4501, 697, 1360, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GlobalUtilsModule from '../../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as RowGeneratorConstantsModule from '../RowGeneratorConstants.tsx'; /* Metro dependency 8178 */
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 */;
let value = RowGeneratorConstantsModule;
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');
object = {};
const TEXT_MUTED = (Native).colors.TEXT_MUTED;
object.dayColor = TEXT_MUTED;
const BACKGROUND_FEEDBACK_NOTIFICATION = (Native).colors.BACKGROUND_FEEDBACK_NOTIFICATION;
object.unreadColor = BACKGROUND_FEEDBACK_NOTIFICATION;
const TEXT_BRAND = (Native).colors.TEXT_BRAND;
object.summaryColor = TEXT_BRAND;
const env0_4 = Reflect.apply(createNativeStyleProperties, value, [object]);
(FileImportTrackerModule).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};
}
(GlobalUtilsModule).assertNever(rowType);
}
}
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);
}
global.__d(_fun81763, 10612, [8178, 4501, 697, 1360,
2]) /* metro module 10612, dependencies: [8178, 4501, 697, 1360, 2] */;
@@ -1,40 +1,47 @@
/* Metro module 8204; source: modules/messages/native/renderer/system_messages/AddRecipientSystemMessage.tsx; dependencies: [1383, 1379, 1878, 8205, 8207, 1244, 8208, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import CreateCommonMessage from './createCommonMessage.tsx'; /* Metro dependency 8208 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ChannelRecordModule from '../../../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as UseAuthorWithProcessedColorModule from './useAuthorWithProcessedColor.tsx'; /* Metro dependency 8205 */
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');
(FileImportTrackerModule).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 = (UseAuthorWithProcessedColorModule).getMessageAuthorWithProcessedColor(message);
const userAuthorWithProcessedColor = (UseAuthorWithProcessedColorModule).getUserAuthorWithProcessedColor(user,
channel);
const object = {};
object.username = messageAuthorWithProcessedColor.nick;
object.usernameOnClick = (importDefault(8207) /* metro dependency 8207: formatUsernameOnClick */)({message: message,
author: messageAuthorWithProcessedColor, roleStyle: roleStyle});
object.otherUsername = userAuthorWithProcessedColor.nick;
object.otherUsernameOnClick = (importDefault(8207) /* metro dependency 8207: formatUsernameOnClick */)({userId: property,
message: message, author: userAuthorWithProcessedColor, roleStyle: roleStyle});
const object4 = {};
const intl = (IndexNativeModule).intl;
const formatToParts = intl.formatToParts;
const t = (IndexNativeModule).t;
r4 = r4 ? Reflect.apply(formatToParts, intl, [t.Vej1Nw, object]) : Reflect.apply(formatToParts, intl, [t['7/Xl0S'],
object]);
object4.content = r4;
copyDataProperties(object4, (CreateCommonMessage)(a0), undefined);
return object4;
}
}
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;
}
global.__d(_fun65741, 8204, [1383, 1379, 1878, 8205, 8207, 1244, 8208,
2]) /* metro module 8204, dependencies: [1383, 1379, 1878, 8205, 8207, 1244, 8208, 2] */;
@@ -1,42 +1,46 @@
/* Metro module 8269; source: modules/messages/native/renderer/system_messages/ApplicationCommandSourceSystemMessage.tsx; dependencies: [661, 6625, 8270, 8205, 1244, 8207, 8208, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelAutocompleteConstantsModule from '../../../../channel_autocomplete/ChannelAutocompleteConstants.tsx'; /* Metro dependency 6625 */
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');
(FileImportTrackerModule).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 object = {};
const intl = require(dependencyMap[4]).intl;
const formatToParts = intl.formatToParts;
const property = require(dependencyMap[4]).t['1Zm+zw'];
const object2 = {};
object2.username = messageAuthorWithProcessedColor.nick;
object2.usernameOnClick = importDefault(dependencyMap[5])({message: message,
author: messageAuthorWithProcessedColor, roleStyle: roleStyle});
const type = message.type;
const CHAT_INPUT_COMMAND = MessageTypes.CHAT_INPUT_COMMAND;
object2.commandName = type === CHAT_INPUT_COMMAND ? '' + COMMAND_SENTINEL + applicationCommand.name : applicationCommand.name;
object2.applicationName = name;
object.content = Reflect.apply(formatToParts, intl, [property, object2]);
copyDataProperties(object, importDefault(dependencyMap[6])(a0), dependencyMap);
return object;
}
}
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;
}
global.__d(_fun66115, 8269, [661, 6625, 8270, 8205, 1244, 8207, 8208,
2]) /* metro module 8269, dependencies: [661, 6625, 8270, 8205, 1244, 8207, 8208, 2] */;
@@ -1,27 +1,33 @@
/* Metro module 8290; source: modules/messages/native/renderer/system_messages/ApplicationSubscriptionPurchaseSystemMessage.tsx; dependencies: [8205, 8238, 8207, 8208, 2] */
import CreateCommonMessage from './createCommonMessage.tsx'; /* Metro dependency 8208 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseAuthorWithProcessedColorModule from './useAuthorWithProcessedColor.tsx'; /* Metro dependency 8205 */
import * as ApplicationSubscriptionSystemMessageUtilsModule from '../../../../premium_apps/ApplicationSubscriptionSystemMessageUtils.tsx'; /* Metro dependency 8238 */
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');
(FileImportTrackerModule).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 = (UseAuthorWithProcessedColorModule).getMessageAuthorWithProcessedColor(message);
const object = {};
const getApplicationSubscriptionSystemMessageASTContent = ApplicationSubscriptionSystemMessageUtilsModule.getApplicationSubscriptionSystemMessageASTContent;
const object2 = {};
object2.application = message.application;
object2.username = messageAuthorWithProcessedColor.nick;
object2.usernameOnClick = (importDefault(8207) /* metro dependency 8207: formatUsernameOnClick */)({message: message,
author: messageAuthorWithProcessedColor, roleStyle: roleStyle});
object.content = Reflect.apply(getApplicationSubscriptionSystemMessageASTContent,
ApplicationSubscriptionSystemMessageUtilsModule, [object2]);
copyDataProperties(object, (CreateCommonMessage)(a0), message);
return object;
}
}
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;
}
global.__d(_fun66164, 8290, [8205, 8238, 8207, 8208,
2]) /* metro module 8290, dependencies: [8205, 8238, 8207, 8208, 2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more