Initial commit

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

No files matched your search

@@ -0,0 +1,85 @@
/* Metro module 11509; source: modules/content_inventory/ContentInventoryActionCreators.tsx; dependencies: [1379, 1934, 3969, 1878, 11510, 661, 694, 683, 11511, 6789, 2] */
function _fun88118(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11695:6, offset: 0x01fd5cd2, size: 252 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
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 contentInventoryPersistedStore = importDefault(11510) /* metro dependency 11510: ContentInventoryPersistedStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryActionCreators.tsx');
exports.toggleMemberListContentFeedHidden = toggleMemberListContentFeedHidden;
exports.onGameProfileOpen = onGameProfileOpen;
exports.onTapContentInventoryEntryEmbed = onTapContentInventoryEntryEmbed;
exports.clearDeleteHistoryError = clearDeleteHistoryError;
}
function toggleMemberListContentFeedHidden() { // fn#88119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11695:302, offset: 0x01fd5dce, size: 133 bytes, params: 1, frame: 17
var object2;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CONTENT_INVENTORY_TOGGLE_FEED_HIDDEN'});
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport2.track;
const MEMBERLIST_CONTENT_FEED_HIDDEN = AnalyticEvents.MEMBERLIST_CONTENT_FEED_HIDDEN;
object2 = {};
object2.channel_id = SelectedChannelStore.getChannelId();
object2.guild_id = SelectedGuildStore.getGuildId();
object2.hidden = ContentInventoryPersistedStore.hidden;
Reflect.apply(track, defaultImport2, [MEMBERLIST_CONTENT_FEED_HIDDEN, object2]);
}
function onGameProfileOpen() { // fn#88120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11695:510, offset: 0x01fd5e53, size: 47 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GAME_PROFILE_OPEN'});
}
function onTapContentInventoryEntryEmbed({message, authorId, tappedElement}) { // fn#88121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11695:619, offset: 0x01fd5e82, size: 224 bytes, params: 2, frame: 18
var id;
var user;
var value5;
var moduleValue;
var showUserProfile;
var object2;
var value;
const channel = ChannelStore.getChannel(message.channel_id);
const value3 = tappedElement === 'avatar';
if (value3) {
user = UserStore.getUser(authorId);
if (user != null) {
value5 = undefined;
moduleValue = importAll(11511) /* metro dependency 11511: ContentInventoryPlatformActionCreatorsNative */;
showUserProfile = moduleValue.showUserProfile;
object2 = {};
id = user.id;
object2.userId = id;
id = channel == null ? value5 : channel.id;
object2.channelId = id;
id = message.id;
object2.messageId = id;
value = importDefault(6789) /* metro dependency 6789: AnalyticsLocation */;
object2.sourceAnalyticsLocations = value3 ? [value.AVATAR] : [value.USERNAME];
Reflect.apply(showUserProfile, moduleValue, [object2]);
}
} else if (tappedElement === 'username') {
user = UserStore.getUser(authorId);
if (user != null) {
value5 = undefined;
moduleValue = importAll(11511) /* metro dependency 11511: ContentInventoryPlatformActionCreatorsNative */;
showUserProfile = moduleValue.showUserProfile;
object2 = {};
id = user.id;
object2.userId = id;
id = channel == null ? value5 : channel.id;
object2.channelId = id;
id = message.id;
object2.messageId = id;
value = importDefault(6789) /* metro dependency 6789: AnalyticsLocation */;
object2.sourceAnalyticsLocations = value3 ? [value.AVATAR] : [value.USERNAME];
Reflect.apply(showUserProfile, moduleValue, [object2]);
}
}
}
function clearDeleteHistoryError() { // fn#88122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11695:980, offset: 0x01fd5f62, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CONTENT_INVENTORY_CLEAR_DELETE_HISTORY_ERROR'});
}
@@ -0,0 +1,297 @@
/* Metro module 10211; source: modules/content_inventory/ContentInventoryActivityImageUtils.tsx; dependencies: [31, 4234, 661, 4237, 9572, 6873, 1244, 10212, 5198, 6880, 1423, 10214, 4915, 10215, 6777, 566, 683, 8846, 2] */
function _fun79398(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:6, offset: 0x01e528d9, size: 268 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = getApplicationImage;
const closure2 = useRichImageForActivity;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useEffect;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.AnalyticEvents;
const env0_6 = constantsModule.PlatformTypes;
const env0_7 = (require(4237) /* metro dependency 4237: Constants */).ImageSizes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryActivityImageUtils.tsx');
exports.getApplicationImage = closure;
exports.useImageForContentEntry = useImageForContentEntry;
exports.useImageForActivity = function(a0, a1, a2) {
var value2 = undefined;
var value3 = useComputedImagesForActivity(a0, a1);
var property = value3.largeImage;
useTrackActivityDefaultIcon({activity: a0, application: a1,
largeImageSrc: property == null ? value2 : property.src,
trackingSource: a2});
return value3;
};
exports.useRichImageForActivity = closure2;
}
function getApplicationImage(a0) { // fn#79399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:194, offset: 0x01e529e5, size: 208 bytes, params: 2, frame: 17
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = undefined;
const r2 = a0 == null ? value : a0.getIconURL(ImageSizes.LARGE);
const name = a0 == null ? value : a0.name;
if (r2 != null) {
object2 = {src: r2};
object2.alt = name == null ? intl.string(t['2B/phM']) : intl.formatToPlainString(t.tiKyYg,
{applicationName: name});
return object2;
}
return value;
}
function useComputedImagesForActivity(a0, a1) { // fn#79400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:442, offset: 0x01e52ab5, size: 692 bytes, params: 3, frame: 24
var r7;
var r0;
var moduleValue;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport2;
var value4;
var applicationImage;
const value2 = undefined;
const value3 = useRichImageForActivity(a0, a1);
const object2 = {activity: a0, application: a1};
let largeImage = value3.largeImage;
object2.largeImage = largeImage;
let smallImage = value3.smallImage;
object2.smallImage = smallImage;
const activity = object2.activity;
const application = object2.application;
largeImage = object2.largeImage;
smallImage = object2.smallImage;
if (largeImage != null) {
r0 = {largeImage: largeImage, smallImage: smallImage};
} else {
moduleValue = require(6880) /* metro dependency 6880: StageChannelRichPresenceUtils */;
if (moduleValue.isStageActivity(activity)) {
value4 = (require(6880) /* metro dependency 6880: StageChannelRichPresenceUtils */).unpackStageChannelParty(activity);
r7 = value4 != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildIconURL({id: value4.guildId,
icon: activity == null || activity.assets == null ? value2 : activity.assets.small_image,
size: ImageSizes.SMALL}) : value2;
r0 = {largeImage: r7 != null ? {src: r7} : value2, smallImage: value2};
} else if (largeImage != null) {
if (largeImage != null) {
applicationImage = getApplicationImage(application);
r0 = applicationImage != null ? {largeImage: applicationImage,
smallImage: smallImage} : {largeImage: smallImage,
smallImage: value2};
} else if (smallImage != null) {
applicationImage = getApplicationImage(application);
r0 = applicationImage != null ? {largeImage: applicationImage,
smallImage: smallImage} : {largeImage: smallImage,
smallImage: value2};
} else if ((importDefault(10215) /* metro dependency 10215: isOnPlayStation */)(activity)) {
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
r0 = {largeImage: {src: defaultImport.get(PlatformTypes.PLAYSTATION).icon.lightPNG,
alt: intl.string(t.fFl4jo)},
smallImage: value2};
} else {
applicationImage = getApplicationImage(application);
r0 = applicationImage != null ? {largeImage: applicationImage,
smallImage: smallImage} : {largeImage: smallImage,
smallImage: value2};
}
} else if ((importDefault(10214) /* metro dependency 10214: isOnXbox */)(activity)) {
defaultImport2 = importDefault(4915) /* metro dependency 4915: Platforms */;
r0 = {largeImage: {src: defaultImport2.get(PlatformTypes.XBOX).icon.customPNG, alt: intl.string(t.Nfvo72)},
smallImage: value2};
} else if (largeImage != null) {
applicationImage = getApplicationImage(application);
r0 = applicationImage != null ? {largeImage: applicationImage,
smallImage: smallImage} : {largeImage: smallImage,
smallImage: value2};
} else if (smallImage != null) {
applicationImage = getApplicationImage(application);
r0 = applicationImage != null ? {largeImage: applicationImage,
smallImage: smallImage} : {largeImage: smallImage,
smallImage: value2};
} else if ((importDefault(10215) /* metro dependency 10215: isOnPlayStation */)(activity)) {
defaultImport = importDefault(4915) /* metro dependency 4915: Platforms */;
r0 = {largeImage: {src: defaultImport.get(PlatformTypes.PLAYSTATION).icon.lightPNG,
alt: intl.string(t.fFl4jo)},
smallImage: value2};
} else {
applicationImage = getApplicationImage(application);
r0 = applicationImage != null ? {largeImage: applicationImage,
smallImage: smallImage} : {largeImage: smallImage,
smallImage: value2};
}
}
return r0;
}
function useTrackActivityDefaultIcon({activity, application, largeImageSrc, trackingSource}) { // fn#79401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:1413, offset: 0x01e52d69, size: 415 bytes, params: 2, frame: 26
const application_id = activity?.application_id;
const value3 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(application_id);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], _fun79402);
let r11 = application_id == null || value3 != null;
r11 = !r11 ? value4 : r11;
useEffect(_fun79403, [trackingSource, activity != null, r11, largeImageSrc == null, application_id, activity?.name,
activity?.type, activity?.session_id, value3 != null || application != null,
(activity == null || activity.assets == null ? undefined : activity.assets.large_image) != null || (activity == null || activity.assets == null ? undefined : activity.assets.small_image) != null]);
}
function useRichImageForActivity(a0, a1) { // fn#79404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:2138, offset: 0x01e52fc0, size: 528 bytes, params: 3, frame: 25
var large_image;
var r2;
var r3;
var small_image;
var assets;
var object2;
var moduleValue2;
var getAssetImage;
var LARGE;
var items3;
var moduleValue3;
var items2;
let value = a1;
const value3 = undefined;
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
let application_id = a0 == null ? value3 : a0.application_id;
const value4 = Reflect.apply(useGetOrFetchApplication, useGetOrFetchApplicationsModule, [application_id]);
if (a0 == null) {
return {largeImage: value3, smallImage: value3};
}
if (a0 == null) {
large_image = value3;
} else {
assets = a0.assets;
large_image = assets == null ? value3 : assets.large_image;
}
if (large_image != null) {
object2 = {};
moduleValue2 = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
getAssetImage = moduleValue2.getAssetImage;
application_id = a0.application_id;
LARGE = ImageSizes.LARGE;
items3 = [LARGE];
LARGE = ImageSizes.LARGE;
items3[1] = LARGE;
object2.src = Reflect.apply(getAssetImage, moduleValue2, [application_id, large_image, items3]);
assets = a0.assets;
object2.text = assets == null || assets.large_text == null ? value3 : assets.large_text.trim();
assets = a0.assets;
object2.url = assets == null ? value3 : assets.large_url;
r3 = object2;
} else {
r3 = value3;
}
if ((importDefault(8846) /* metro dependency 8846: isCrunchyrollActivity */)(a0)) {
small_image = value3;
} else if (a0 == null) {
small_image = value3;
} else {
assets = a0.assets;
small_image = assets == null ? value3 : assets.small_image;
}
if (small_image != null) {
object2 = {};
moduleValue3 = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
getAssetImage = moduleValue3.getAssetImage;
application_id = a0.application_id;
LARGE = ImageSizes.LARGE;
items2 = [LARGE];
LARGE = ImageSizes.LARGE;
items2[1] = LARGE;
object2.src = Reflect.apply(getAssetImage, moduleValue3, [application_id, small_image, items2]);
assets = a0.assets;
object2.text = assets == null || assets.small_text == null ? value3 : assets.small_text.trim();
assets = a0.assets;
object2.url = assets == null ? value3 : assets.small_url;
r2 = object2;
} else {
r2 = value3;
}
if (r3 == null) {
value = getApplicationImage(value ?? value4);
r3 = value;
}
return {largeImage: r3, smallImage: r2};
}
function useImageForContentEntry({entry, showCoverImage, trackingSource}) { // fn#79405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:3055, offset: 0x01e531d0, size: 626 bytes, params: 2, frame: 31
var extra;
var moduleValue4;
var object2;
var moduleValue5;
var getAssetImage;
var application_id;
showCoverImage = showCoverImage === undefined || showCoverImage;
const {activity, activityApplication,
fallbackApplication} = (importDefault(10212) /* metro dependency 10212: useEntryActivityAndApplication */)(entry);
let r9 = fallbackApplication ?? activityApplication;
const {largeImage, smallImage} = useRichImageForActivity(activity, activityApplication);
const largeImage2 = useComputedImagesForActivity(activity, r9).largeImage;
let r11 = r9?.getCanonicalGameId();
const useGameModule = require(5198) /* metro dependency 5198: useGame */;
const useGame = useGameModule.useGame;
r11 = Reflect.apply(useGame, useGameModule, [r11]).data?.getCoverURL();
const contentInventoryTypesModule = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
if (contentInventoryTypesModule.isListenedSessionEntry(entry)) {
extra = entry.extra;
if (extra.entries.length > 0) {
r9 = {src: entry.extra.entries[0].media.image_url};
} else if (contentInventoryTypesModule.isWatchedMediaEntry(entry)) {
object2 = {};
moduleValue5 = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
getAssetImage = moduleValue5.getAssetImage;
extra = entry.extra;
application_id = extra.application_id;
extra = entry.extra;
object2.src = Reflect.apply(getAssetImage, moduleValue5, [application_id, extra.media_assets_large_image,
ImageSizes.LARGE]);
extra = entry.extra;
object2.alt = extra.media_title;
r9 = object2;
} else {
moduleValue4 = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
r9 = moduleValue4.isTopArtistEntry(entry) ? {src: entry.extra.media.image_url} : undefined;
}
} else if ((require(9572) /* metro dependency 9572: ContentInventoryTypes */).isWatchedMediaEntry(entry)) {
object2 = {};
moduleValue5 = require(6873) /* metro dependency 6873: ApplicationAssetUtils */;
getAssetImage = moduleValue5.getAssetImage;
extra = entry.extra;
application_id = extra.application_id;
extra = entry.extra;
object2.src = Reflect.apply(getAssetImage, moduleValue5, [application_id, extra.media_assets_large_image,
ImageSizes.LARGE]);
extra = entry.extra;
object2.alt = extra.media_title;
r9 = object2;
} else {
moduleValue4 = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
r9 = moduleValue4.isTopArtistEntry(entry) ? {src: entry.extra.media.image_url} : undefined;
}
const r0 = largeImage != null ? {largeImage: largeImage, smallImage: smallImage} : r9 != null ? {largeImage: r9,
smallImage: undefined} : r11 == null ? {largeImage: largeImage2,
smallImage: undefined} : showCoverImage ? {largeImage: {src: r11},
smallImage: undefined} : {largeImage: largeImage2, smallImage: undefined};
useTrackActivityDefaultIcon({activity: activity, application: fallbackApplication ?? activityApplication,
largeImageSrc: r0.largeImage?.src, trackingSource: trackingSource});
return r0;
}
function _fun79402() { // fn#79402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:1627, offset: 0x01e52f08, size: 40 bytes, params: 1, frame: 12
return application_id != null && ApplicationStore.didFetchingApplicationFail(application_id);
}
function _fun79403() { // fn#79403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10397:1933, offset: 0x01e52f30, size: 144 bytes, params: 1, frame: 15
var value2;
var defaultImport;
if (env0_9 && env0_2 && env0_4) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.ACTIVITY_DEFAULT_ICON_SHOWN, {source: trackingSource,
application_id: application_id, activity_name: name, activity_type: type, activity_session_id: session_id,
application_found: env0_3, has_rich_assets: env0_8});
}
}
@@ -0,0 +1,510 @@
/* Metro module 10213; source: modules/content_inventory/ContentInventoryActivityStore.tsx; dependencies: [6, 7, 15, 17, 18, 4396, 9570, 661, 8370, 8375, 9585, 9572, 9571, 22, 566, 694, 2] */
function _fun79411(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:6, offset: 0x01e53683, size: 512 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_79417 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = function({author_id, id}) {
return '' + author_id + ':' + id;
};
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 env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const contentInventoryStore = importDefault(9570) /* metro dependency 9570: ContentInventoryStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
const Set = global.Set;
const ContentInventoryEntryType = (require(8370) /* metro dependency 8370: ContentInventoryEntryType */).ContentInventoryEntryType;
const LISTENED_SESSION = ContentInventoryEntryType.LISTENED_SESSION;
const set = new Set([LISTENED_SESSION]);
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun79424(Store).displayName = 'ContentInventoryActivityStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_79429,
CONTENT_INVENTORY_SET_FEED: function({feed}) {
feed = detectMatchingActivityForEntries(feed.entries).updatedKeys.size;
return feed > 0;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryActivityStore.tsx');
exports.default = map;
exports.entryToKey = closure;
}
function _isNativeReflectConstruct_79412() { // fn#79412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:195, offset: 0x01e53883, 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_79412_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_79415(a0, a1) { // fn#79415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:388, offset: 0x01e538e5, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun79416;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_79417(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_79417(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_79417(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun79416;
}
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 getMatchingActivity(a0) { // fn#79419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:1431, offset: 0x01e53a85, size: 171 bytes, params: 2, frame: 18
var r1;
var r0;
var moduleValue2;
const env0_0 = a0;
var value;
const value2 = undefined;
if ((require(8375) /* metro dependency 8375: utils */).isEntryExpired(a0)) {
r0 = null;
} else {
moduleValue2 = require(8375) /* metro dependency 8375: utils */;
if (moduleValue2.isEntryActive(a0)) {
if (a0.author_type !== (require(9585) /* metro dependency 9585: ContentInventoryAuthorType */).ContentInventoryAuthorType.USER) {
r1 = value2;
} else {
value = PresenceStore.getActivities(a0.author_id);
value = value.find(_fun79420);
r1 = value;
}
} else {
r1 = value2;
}
r0 = r1;
}
return r0;
}
function detectMatchingActivityForEntries(a0) { // fn#79421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:1837, offset: 0x01e53c0c, size: 213 bytes, params: 2, frame: 20
var r4;
var value7;
var getMatchingActivityBinding;
var content;
var matchingActivityBinding;
var entryToKeyBinding;
var value9;
var binding;
var get;
var value10;
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
const value5 = _createForOfIteratorHelperLoose_79415(a0);
const value6 = value5();
let done = value6.done;
if (!done) {
r4 = value6;
while (true) {
value7 = r4.value;
getMatchingActivityBinding = getMatchingActivity;
content = value7.content;
matchingActivityBinding = getMatchingActivityBinding(content);
if (matchingActivityBinding !== undefined) {
entryToKeyBinding = entryToKey;
content = value7.content;
value9 = entryToKeyBinding(content);
set.add(value9);
binding = env0_12;
get = binding.get;
if (matchingActivityBinding === Reflect.apply(get, binding, [value9])) {
break;
}
set.add(value9);
binding = env0_12;
binding.set(value9, matchingActivityBinding);
break;
}
value10 = value5();
done = value10.done;
if (done) {
break;
}
r4 = value10;
continue;
}
}
return {updatedKeys: set, matchedKeys: set};
}
function handlePresenceUpdates_79422() { // fn#79422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:2137, offset: 0x01e53ce1, size: 460 bytes, params: 1, frame: 27
var r16;
var r2;
var r3;
var r1;
var r14;
var r13;
var r0;
var value12;
var detectMatchingActivityForEntriesBinding;
var size;
var entries;
var filter;
var value13;
var value14;
var updatedKeys;
var matchedKeys;
var value15;
var value16;
var value17;
var add;
var value18;
var value19;
var value20;
var value21;
var value22;
var value23;
var value24;
var value27;
var value28;
var value29;
const Array = global.Array;
const from = Array.from;
let binding = env0_12;
const value2 = Reflect.apply(from, Array, [binding.keys()]);
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
const value9 = _createForOfIteratorHelperLoose_79415(ContentInventoryStore.getFeeds().values());
const value10 = value9();
let done = value10.done;
const value11 = false;
if (done) {
r0 = value11;
} else {
r2 = value11;
r3 = value10;
reducibleLoop1: while (true) {
value12 = r3.value;
detectMatchingActivityForEntriesBinding = detectMatchingActivityForEntries;
size = set.size;
if (size > 0) {
entries = value12.entries;
filter = entries.filter;
value13 = Reflect.apply(filter, entries, [_fun79423]);
r1 = value13;
} else {
entries = value12.entries;
r1 = entries;
}
value14 = detectMatchingActivityForEntriesBinding(r1);
updatedKeys = value14.updatedKeys;
matchedKeys = value14.matchedKeys;
value15 = _createForOfIteratorHelperLoose_79415(updatedKeys);
value16 = value15();
done = value16.done;
if (!done) {
r14 = value16;
reducibleLoop5: while (true) {
value17 = r14.value;
add = set.add;
Reflect.apply(add, set, [value17]);
value18 = value15();
done = value18.done;
if (done) {
r16 = value18;
break reducibleLoop5;
}
r14 = value18;
continue reducibleLoop5;
}
}
value19 = _createForOfIteratorHelperLoose_79415(matchedKeys);
value20 = value19();
done = value20.done;
if (!done) {
r13 = value20;
reducibleLoop7: while (true) {
value21 = r13.value;
add = set.add;
Reflect.apply(add, set, [value21]);
value22 = value19();
done = value22.done;
if (done) {
break reducibleLoop7;
}
r13 = value22;
continue reducibleLoop7;
}
}
reducibleJoin10: while (true) {
if (r2) {
break reducibleJoin10;
}
size = updatedKeys.size;
value23 = size > 0;
r2 = value23;
break reducibleJoin10;
}
value24 = value9();
done = value24.done;
if (done) {
r0 = r2;
break reducibleLoop1;
}
r3 = value24;
continue reducibleLoop1;
}
}
_createForOfIteratorHelperLoose_79415Binding = _createForOfIteratorHelperLoose_79415;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const difference = defaultImport.difference;
const items2 = [];
arraySpread(items2, set, 0, r16);
const value25 = _createForOfIteratorHelperLoose_79415Binding(Reflect.apply(difference, defaultImport, [value2,
items2]));
const value26 = value25();
done = value26.done;
if (!done) {
r2 = value26;
reducibleLoop12: while (true) {
value27 = r2.value;
binding = env0_12;
binding.delete(value27);
value28 = value25();
done = value28.done;
value29 = true;
if (done) {
r0 = value29;
break reducibleLoop12;
}
r2 = value28;
continue reducibleLoop12;
}
}
return r0;
}
function _fun79424(a0) { // fn#79424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:2774, offset: 0x01e53ed9, size: 97 bytes, params: 2, frame: 16
const closure = ContentInventoryActivityStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(ContentInventoryStore, PresenceStore);
this.syncWith([PresenceStore], handlePresenceUpdates_79422);
}}, {key: 'getMatchingActivity', value: value_79428}]);
}
function _fun79420(a0) { // fn#79420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:1622, offset: 0x01e53b30, size: 220 bytes, params: 2, frame: 17
var r3;
var r0;
var moduleValue;
var value3;
var moduleValue2;
const type = a0.type;
let value = environment.__proto__;
const PLAYING = ActivityTypes.PLAYING;
if (type !== PLAYING) {
value3 = a0.type !== ActivityTypes.LISTENING;
if (value3) {
r3 = value3;
} else {
moduleValue2 = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
r3 = !moduleValue2.isListenedSessionEntry(env0_0);
}
if (r3) {
r0 = !r3;
} else {
value = require(9571) /* metro dependency 9571: matchUtils */;
value = value.isMatchingListeningActivity(env0_0, a0);
r0 = value;
}
} else {
moduleValue = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
if (moduleValue.isApplicationEntry(env0_0)) {
value = require(9571) /* metro dependency 9571: matchUtils */;
value = value.isMatchingApplicationActivity(env0_0, a0);
r0 = value;
} else {
value3 = a0.type !== ActivityTypes.LISTENING;
if (value3) {
r3 = value3;
} else {
moduleValue2 = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
r3 = !moduleValue2.isListenedSessionEntry(env0_0);
}
if (r3) {
r0 = !r3;
} else {
value = require(9571) /* metro dependency 9571: matchUtils */;
value = value.isMatchingListeningActivity(env0_0, a0);
r0 = value;
}
}
}
return r0;
}
function _fun79423({content}) { // fn#79423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:2383, offset: 0x01e53ead, size: 44 bytes, params: 2, frame: 13
const binding = env0_0;
return !binding.has(entryToKey(content));
}
function ContentInventoryActivityStore(a0) { // fn#79425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:2786, offset: 0x01e53f3a, size: 147 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ContentInventoryActivityStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(ContentInventoryActivityStore);
binding = env1_5;
if (_isNativeReflectConstruct_79412()) {
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.canRenderContent = canRenderContent;
return value;
}
function value_79428(a0) { // fn#79428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:3373, offset: 0x01e5406b, size: 69 bytes, params: 2, frame: 14
const value = environment.__proto__;
return (require(8375) /* metro dependency 8375: utils */).isEntryExpired(a0) ? null : env1_12.get(entryToKey(a0));
}
function canRenderContent(a0) { // fn#79426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10399:3078, owner: ContentInventoryActivityStore.canRenderContent, offset: 0x01e53fcd, size: 100 bytes, params: 2, frame: 13
var r1;
var r0;
var binding;
let value = environment.__proto__.__proto__;
const isEntryExpired2 = (require(8375) /* metro dependency 8375: utils */).isEntryExpired(a0);
if (isEntryExpired2) {
r0 = !isEntryExpired2;
} else {
binding = env2_11;
value = binding.has(a0.content_type);
if (value) {
value = env0_0.getMatchingActivity(a0);
value = value != null;
r1 = value;
} else {
r1 = !value;
}
r0 = r1;
}
return r0;
}
@@ -0,0 +1,42 @@
/* Metro module 9588; source: modules/content_inventory/ContentInventoryConstants.tsx; dependencies: [2] */
function _fun75100(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9774:6, offset: 0x01da295c, size: 434 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {GUILD_MEMBER_LIST: 1};
object[1] = 'GUILD_MEMBER_LIST';
const object5 = {CARD_POPOUT_OPEN: 2};
object5[2] = 'CARD_POPOUT_OPEN';
object5.REACTION_EMOJI_REACT_SENT = 3;
object5[3] = 'REACTION_EMOJI_REACT_SENT';
object5.DM_REACTION_MESSAGE_SENT = 4;
object5[4] = 'DM_REACTION_MESSAGE_SENT';
object5.CHANNEL_REACTION_MESSAGE_SENT = 5;
object5[5] = 'CHANNEL_REACTION_MESSAGE_SENT';
object5.VOICE_CHANNEL_JOINED = 6;
object5[6] = 'VOICE_CHANNEL_JOINED';
object5.VOICE_CHANNEL_PREVIEWED = 7;
object5[7] = 'VOICE_CHANNEL_PREVIEWED';
object5.OPENED_GAME_PROFILE = 8;
object5[8] = 'OPENED_GAME_PROFILE';
object5.COPIED_LEADERBOARD_ROW = 9;
object5[9] = 'COPIED_LEADERBOARD_ROW';
object5.APPLICATION_WIDGET_PREVIEW_VIEW_MORE = 10;
object5[10] = 'APPLICATION_WIDGET_PREVIEW_VIEW_MORE';
const object6 = {SPOTIFY: 1};
object6[1] = 'SPOTIFY';
object6.CRUNCHYROLL = 2;
object6[2] = 'CRUNCHYROLL';
object6.XBOX = 3;
object6[3] = 'XBOX';
object6.PLAYSTATION = 4;
object6[4] = 'PLAYSTATION';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryConstants.tsx');
exports.ContentInventoryFeedKey = {GLOBAL_FEED: 'global feed', GAME_PROFILE_FEED: 'game profile feed'};
exports.ContentInventorySurfaceTypes = object;
exports.ContentInventoryInteractionTypes = object5;
exports.FEED_OFF_BY_DEFAULT_ABOVE_MEMBER_COUNT = 10000;
exports.NEW_RELEASE_CUTOFF_DAYS = 7;
exports.IGDB_ATTRIBUTION_LINK = 'https://www.igdb.com/about';
exports.ContentInventoryEntryProviderTypes = object6;
}
@@ -0,0 +1,39 @@
/* Metro module 12541; source: modules/content_inventory/ContentInventoryExperiments.tsx; dependencies: [4108, 1854, 4620, 9581, 2] */
function _fun95847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12731:6, offset: 0x021505bd, size: 341 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const CommonTriggerPoints = (require(4108) /* metro dependency 4108: ExperimentConstants */).CommonTriggerPoints;
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'kind': 'user', 'name': '2026-03-content-inventory-memberlist-and-ranker',
defaultConfig: {'enabled': true, 'impressionCappingEnabled': true}, variations: {[0]: {'enabled': false,
'impressionCappingEnabled': false}}});
const experimentsModule = require(4620) /* metro dependency 4620: experiments */;
const createExperiment = experimentsModule.createExperiment;
const CONNECTION_OPEN = CommonTriggerPoints.CONNECTION_OPEN;
const experiment = Reflect.apply(createExperiment, experimentsModule, [{'kind': 'user',
'id': '2025-09_hotwheels_nvidia_boost', 'label': 'Next iteration of the activity feed ranking model.',
commonTriggerPoint: CONNECTION_OPEN, defaultConfig: {}, treatments: [{'id': 16,
'label': 'ML model V3 - Nvidia small boost', config: {}}, {'id': 17, 'label': 'ML model V3 - Nvidia big boost',
config: {}}]}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryExperiments.tsx');
exports.MemberlistRankerExperiment = value;
exports.HotwheelsActivityFeedNvidiaExperiment = experiment;
exports.isEligibleForContentInventoryV1 = isEligibleForContentInventoryV1;
exports.isEligibleForImpressionCapping = isEligibleForImpressionCapping;
}
function isEligibleForContentInventoryV1(a0) { // fn#95848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12731:856, offset: 0x02150712, size: 73 bytes, params: 2, frame: 14
const binding = env0_2;
const getConfig = binding.getConfig;
const enabled = Reflect.apply(getConfig, binding, [{location: a0}]).enabled;
let value = require(9581) /* metro dependency 9581: ICYMIExperiment */;
value = value.getICYMIEnabled(a0);
return enabled || value;
}
function isEligibleForImpressionCapping(a0) { // fn#95849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12731:1015, offset: 0x0215075b, size: 49 bytes, params: 2, frame: 12
const config = env0_2.getConfig({location: a0});
return config.enabled && config.impressionCappingEnabled === true;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,839 @@
/* Metro module 16149; source: modules/content_inventory/ContentInventoryManager.tsx; dependencies: [7, 6, 15, 17, 18, 5, 4257, 5040, 4795, 12367, 11510, 9570, 9588, 661, 672, 22, 16150, 694, 12541, 16151, 4860, 2] */
function _fun124773(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:6, offset: 0x025c2957, size: 763 bytes, params: 8, frame: 22
const env0_0 = require;
const fetchInventory = function() {
return _fetchInventory.apply(this, arguments);
};
const handleUpdatePollingState = function() {
scheduleNextFetch();
};
const handlePostConnectionOpen_124789 = function() {
handleUpdatePollingState();
};
const handleConnectionClosed_124790 = function() {
cancelScheduledFetch(GLOBAL_FEED);
};
const handleManualRefresh = function({feedId, feature}) {
cancelScheduledFetch(feedId);
fetchInventory({feedId: feedId, feature: feature, force: true});
};
const handleFetchGameProfileFeed = function() {
var fetchInventoryBinding = fetchInventory;
var object = {};
object.feedId = ContentInventoryFeedKey.GLOBAL_FEED;
object.feature = require(dependencyMap[19]).ContentInventoryFeature.GAME_PROFILE;
fetchInventoryBinding(object);
};
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 env0_8 = importDefault(5) /* metro dependency 5 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const idleStore = importDefault(4795) /* metro dependency 4795: IdleStore */;
importDefault(12367) /* metro dependency 12367: WindowStore */;
const contentInventoryPersistedStore = importDefault(11510) /* metro dependency 11510: ContentInventoryPersistedStore */;
const contentInventoryStore = importDefault(9570) /* metro dependency 9570: ContentInventoryStore */;
const ContentInventoryFeedKey = (require(9588) /* metro dependency 9588: ContentInventoryConstants */).ContentInventoryFeedKey;
const env0_15 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let MINUTE = Millis.MINUTE;
const env0_16 = 2 * MINUTE;
const env0_17 = ContentInventoryFeedKey.GLOBAL_FEED;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
MINUTE = Millis.MINUTE;
const env0_18 = 15 * MINUTE;
let Map = global.Map;
const map = new Map();
const Set = global.Set;
let set = new Set();
Map = global.Map;
set = new Map();
set = require(22) /* metro dependency 22 */;
const env0_23 = set.debounce((require(16150) /* metro dependency 16150: ContentInventoryHttpApi */).postTrackToContentInventory,
3000, {trailing: true});
set = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
set = _fun124795(set);
set = new set();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryManager.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_124774() { // fn#124774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:280, offset: 0x025c2c52, 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_124774_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getBackoffJitter() { // fn#124777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:661, offset: 0x025c2cb4, size: 53 bytes, params: 1, frame: 10
let value = a0;
const r2 = value !== undefined ? value : 0;
const Math = global.Math;
value = Math.random();
value *= r2 + 1;
return value * env0_16;
}
function setFeedState(a0, a1) { // fn#124778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:721, offset: 0x025c2ce9, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CONTENT_INVENTORY_SET_FEED_STATE',
feedId: a0, state: a1});
}
function canFetch(a0) { // fn#124779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:826, offset: 0x025c2d29, size: 245 bytes, params: 2, frame: 13
var moduleValue;
var idleSince;
var Date;
const binding = env0_20;
if (!binding.has(a0)) {
var GAME_PROFILE_FEED = ContentInventoryFeedKey.GAME_PROFILE_FEED;
if (a0 !== GAME_PROFILE_FEED) {
if (a0 !== GLOBAL_FEED) {
return true;
}
moduleValue = require(12541) /* metro dependency 12541: ContentInventoryExperiments */;
if (moduleValue.isEligibleForContentInventoryV1('ContentInventoryManager')) {
if (ContentInventoryPersistedStore.hidden) {
if (ContentInventoryStore.getFeed(a0) != null) {
return false;
}
if (GatewayConnectionStore.isConnected()) {
idleSince = IdleStore.getIdleSince();
if (idleSince == null) {
return true;
}
Date = global.Date;
if (Date.now() - idleSince > env0_18) {
return false;
}
return true;
}
return false;
}
if (GatewayConnectionStore.isConnected()) {
idleSince = IdleStore.getIdleSince();
if (idleSince == null) {
return true;
}
Date = global.Date;
if (Date.now() - idleSince > env0_18) {
return false;
}
return true;
}
return false;
}
return false;
}
if (ContentInventoryStore.getFeed(a0) !== undefined) {
return false;
}
if (a0 !== GLOBAL_FEED) {
return true;
}
moduleValue = require(12541) /* metro dependency 12541: ContentInventoryExperiments */;
if (moduleValue.isEligibleForContentInventoryV1('ContentInventoryManager')) {
if (ContentInventoryPersistedStore.hidden) {
if (ContentInventoryStore.getFeed(a0) != null) {
return false;
}
if (GatewayConnectionStore.isConnected()) {
idleSince = IdleStore.getIdleSince();
if (idleSince == null) {
return true;
}
Date = global.Date;
if (Date.now() - idleSince > env0_18) {
return false;
}
return true;
}
return false;
}
if (GatewayConnectionStore.isConnected()) {
idleSince = IdleStore.getIdleSince();
if (idleSince == null) {
return true;
}
Date = global.Date;
if (Date.now() - idleSince > env0_18) {
return false;
}
return true;
}
return false;
}
}
return false;
}
function cancelScheduledFetch(a0) { // fn#124780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:1158, offset: 0x025c2e1e, size: 74 bytes, params: 2, frame: 14
setFeedState(a0, {loading: false});
const value2 = env0_19.get(a0);
if (value2 !== undefined) {
global.clearTimeout(value2);
env0_19.delete(a0);
}
}
function scheduleNextFetch() { // fn#124781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:1277, offset: 0x025c2e68, size: 455 bytes, params: 1, frame: 20
var expired_at;
var r7;
var r5;
var r3;
var cancelScheduledFetchBinding;
var value4;
var feed;
var Date;
var value6;
var date;
var time;
var value10;
var time2;
var Math;
var value15;
var setFeedStateBinding;
var Date2;
var value16;
var value17;
let binding = env0_21;
const value2 = binding.get(GLOBAL_FEED);
const value3 = 0;
const r0 = value2 ?? value3;
if (r0 > value3) {
if (!(r0 <= 4)) {
cancelScheduledFetchBinding = cancelScheduledFetch;
value4 = undefined;
cancelScheduledFetchBinding(GLOBAL_FEED);
if (canFetch(GLOBAL_FEED)) {
feed = ContentInventoryStore.getFeed(GLOBAL_FEED);
if ((feed == null ? value4 : feed.refresh_stale_inbox_after_ms) == null) {
expired_at = feed == null ? value4 : feed.expired_at;
if (expired_at == null) {
r7 = value3;
} else {
Date = global.Date;
expired_at = feed.expired_at;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
time = (date instanceof Object ? date : value6).getTime();
Date = global.Date;
r7 = time - Date.now();
}
if (env0_22 == null) {
r5 = value3;
} else {
Date = global.Date;
binding = env0_22;
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(binding);
time2 = (date instanceof Object ? date : value10).getTime();
Date = global.Date;
r5 = time2 - Date.now();
}
r3 = r0 > value3 ? getBackoffJitter() : value3;
Math = global.Math;
value15 = Math.max(value3, r5, r7) + r3;
setFeedStateBinding = setFeedState;
Date = global.Date;
Date2 = global.Date;
value16 = Date2.now() + value15;
value17 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
setFeedStateBinding(GLOBAL_FEED, {loading: false,
nextFetchDate: date instanceof Object ? date : value17});
binding = env0_19;
binding.set(GLOBAL_FEED, global.setTimeout(function() {
var fetchInventoryBinding = fetchInventory;
var object = {};
object.feedId = GLOBAL_FEED;
object.feature = require(dependencyMap[19]).ContentInventoryFeature.INBOX;
return fetchInventoryBinding(object);
}, value15));
} else if (env0_22 != null) {
expired_at = feed == null ? value4 : feed.expired_at;
if (expired_at == null) {
r7 = value3;
} else {
Date = global.Date;
expired_at = feed.expired_at;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
time = (date instanceof Object ? date : value6).getTime();
Date = global.Date;
r7 = time - Date.now();
}
if (env0_22 == null) {
r5 = value3;
} else {
Date = global.Date;
binding = env0_22;
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(binding);
time2 = (date instanceof Object ? date : value10).getTime();
Date = global.Date;
r5 = time2 - Date.now();
}
r3 = r0 > value3 ? getBackoffJitter() : value3;
Math = global.Math;
value15 = Math.max(value3, r5, r7) + r3;
setFeedStateBinding = setFeedState;
Date = global.Date;
Date2 = global.Date;
value16 = Date2.now() + value15;
value17 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
setFeedStateBinding(GLOBAL_FEED, {loading: false,
nextFetchDate: date instanceof Object ? date : value17});
binding = env0_19;
binding.set(GLOBAL_FEED, global.setTimeout(_fun124782, value15));
}
}
}
} else {
cancelScheduledFetchBinding = cancelScheduledFetch;
value4 = undefined;
cancelScheduledFetchBinding(GLOBAL_FEED);
if (canFetch(GLOBAL_FEED)) {
feed = ContentInventoryStore.getFeed(GLOBAL_FEED);
if ((feed == null ? value4 : feed.refresh_stale_inbox_after_ms) == null) {
expired_at = feed == null ? value4 : feed.expired_at;
if (expired_at == null) {
r7 = value3;
} else {
Date = global.Date;
expired_at = feed.expired_at;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
time = (date instanceof Object ? date : value6).getTime();
Date = global.Date;
r7 = time - Date.now();
}
if (env0_22 == null) {
r5 = value3;
} else {
Date = global.Date;
binding = env0_22;
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(binding);
time2 = (date instanceof Object ? date : value10).getTime();
Date = global.Date;
r5 = time2 - Date.now();
}
r3 = r0 > value3 ? getBackoffJitter() : value3;
Math = global.Math;
value15 = Math.max(value3, r5, r7) + r3;
setFeedStateBinding = setFeedState;
Date = global.Date;
Date2 = global.Date;
value16 = Date2.now() + value15;
value17 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
setFeedStateBinding(GLOBAL_FEED, {loading: false,
nextFetchDate: date instanceof Object ? date : value17});
binding = env0_19;
binding.set(GLOBAL_FEED, global.setTimeout(_fun124782, value15));
} else if (env0_22 != null) {
expired_at = feed == null ? value4 : feed.expired_at;
if (expired_at == null) {
r7 = value3;
} else {
Date = global.Date;
expired_at = feed.expired_at;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
time = (date instanceof Object ? date : value6).getTime();
Date = global.Date;
r7 = time - Date.now();
}
if (env0_22 == null) {
r5 = value3;
} else {
Date = global.Date;
binding = env0_22;
value10 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(binding);
time2 = (date instanceof Object ? date : value10).getTime();
Date = global.Date;
r5 = time2 - Date.now();
}
r3 = r0 > value3 ? getBackoffJitter() : value3;
Math = global.Math;
value15 = Math.max(value3, r5, r7) + r3;
setFeedStateBinding = setFeedState;
Date = global.Date;
Date2 = global.Date;
value16 = Date2.now() + value15;
value17 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
setFeedStateBinding(GLOBAL_FEED, {loading: false,
nextFetchDate: date instanceof Object ? date : value17});
binding = env0_19;
binding.set(GLOBAL_FEED, global.setTimeout(_fun124782, value15));
}
}
}
}
function _fetchInventory() { // fn#124784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:1901, offset: 0x025c306f, size: 50 bytes, params: 1, frame: 14
return env0_8(_fun124786).apply(this, arguments);
}
function handleInboxStale({refreshAfterMs}) { // fn#124792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:2947, offset: 0x025c33a8, size: 135 bytes, params: 2, frame: 16
var Date;
var value5;
var value6;
var date;
const feed = ContentInventoryStore.getFeed(GLOBAL_FEED);
if (feed?.refresh_stale_inbox_after_ms != null) {
Date = global.Date;
value5 = Date.now() + (refreshAfterMs ?? feed.refresh_stale_inbox_after_ms);
Date = global.Date;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
env0_22 = (date instanceof Object ? date : value6).toUTCString();
scheduleNextFetch();
}
}
function handleSpotifyNewTrack({connectionId, track}) { // fn#124793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:3179, offset: 0x025c342f, size: 83 bytes, params: 2, frame: 16
if (connectionId != null) {
if (ConnectedAccountsStore.getAccount(connectionId, PlatformTypes.SPOTIFY)?.showActivity) {
env0_23(connectionId, track);
}
}
}
function _fun124795(a0) { // fn#124795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:3462, offset: 0x025c34c8, size: 42 bytes, params: 2, frame: 14
const closure = ContentInventoryManager;
env0_7(closure, a0);
return env0_3(closure);
}
function _fun124782() { // fn#124782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:1745, offset: 0x025c302f, size: 64 bytes, params: 1, frame: 13
const fetchInventoryBinding = fetchInventory;
const object2 = {};
object2.feedId = GLOBAL_FEED;
const ContentInventoryFeature = (require(16151) /* metro dependency 16151: ContentInventoryFeature */).ContentInventoryFeature;
const INBOX = ContentInventoryFeature.INBOX;
object2.feature = INBOX;
return fetchInventoryBinding(object2);
}
async function _fun124786({feedId, feature, force}) { // fn#124786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:1954, offset: 0x025c30b5, size: 628 bytes, params: 2, frame: 25
var environment;
var refresh_token;
var r8;
var value3;
var value6;
var binding;
var getFeed;
var value7;
var add;
var object2;
var binding2;
var property;
var value8;
var getMyContentInventory;
var value9;
var value10;
var value11;
var value12;
var binding3;
var value13;
var dispatch;
var set;
var value14;
var error;
var get;
var value15;
var value16;
var value17;
var Millis;
var MINUTE;
var Math;
var pow;
var value18;
var value19;
var setTimeout;
var value20;
if (false) {
return undefined;
}
value = undefined;
reducibleJoin3: while (true) {
if (force !== value) {
break reducibleJoin3;
}
value3 = false;
force = value3;
break reducibleJoin3;
}
await value;
if (false) {
return undefined;
}
reducibleJoin7: while (true) {
reduciblePort75: while (true) {
exceptionLanding70: while (true) {
value6 = environment.__proto__.__proto__;
if (env2_27(feedId)) {
break reducibleJoin7;
}
if (force) {
break reducibleJoin7;
}
break reduciblePort75;
}
binding = env2_21;
get = binding.get;
value15 = Reflect.apply(get, binding, [feedId]);
value16 = 0;
r8 = value15 ?? value16;
if (r8 < 4) {
binding = env2_1;
Millis = binding(env2_2[14]).Millis;
MINUTE = Millis.MINUTE;
Math = global.Math;
pow = Math.pow;
value18 = MINUTE * Reflect.apply(pow, Math, [2, r8]);
value19 = env2_25(r8);
binding = env2_19;
set = binding.set;
setTimeout = global.setTimeout;
value20 = value18 + value19;
Reflect.apply(set, binding, [feedId, setTimeout(_fun124787, value20)]);
binding = env2_21;
set = binding.set;
Reflect.apply(set, binding, [feedId, r8 + 1]);
} else {
value17 = env2_1(env2_2[17]);
dispatch = value17.dispatch;
Reflect.apply(dispatch, value17, [{type: 'CONTENT_INVENTORY_CLEAR_FEED', feedId: feedId}]);
}
binding = env2_20;
binding.delete(feedId);
break reduciblePort75;
}
return value;
}
try {
binding = env2_13;
} catch (error) {
break exceptionLanding70;
}
try {
getFeed = binding.getFeed;
} catch (error) {
break exceptionLanding70;
}
try {
value7 = Reflect.apply(getFeed, binding, [feedId]);
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_20;
} catch (error) {
break exceptionLanding70;
}
try {
add = binding.add;
} catch (error) {
break exceptionLanding70;
}
try {
Reflect.apply(add, binding, [feedId]);
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_26;
} catch (error) {
break exceptionLanding70;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding70;
}
try {
object2.loading = true;
} catch (error) {
break exceptionLanding70;
}
try {
binding(feedId, object2);
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding70;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding70;
}
try {
property = binding2[16];
} catch (error) {
break exceptionLanding70;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding70;
}
try {
getMyContentInventory = value8.getMyContentInventory;
} catch (error) {
break exceptionLanding70;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding70;
}
try {
value9 = value7 == null;
} catch (error) {
break exceptionLanding70;
}
reducibleJoin31: while (true) {
if (value9) {
refresh_token = value;
break reducibleJoin31;
}
try {
refresh_token = value7.refresh_token;
} catch (error) {
break exceptionLanding70;
}
break reducibleJoin31;
}
try {
object2.token = refresh_token;
} catch (error) {
break exceptionLanding70;
}
try {
object2.feedId = feedId;
} catch (error) {
break exceptionLanding70;
}
try {
object2.feature = feature;
} catch (error) {
break exceptionLanding70;
}
try {
value10 = Reflect.apply(getMyContentInventory, value8, [object2]);
} catch (error) {
break exceptionLanding70;
}
await value10;
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding70;
}
if (value12) {
return value11;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding70;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding70;
}
try {
property = binding3[17];
} catch (error) {
break exceptionLanding70;
}
try {
value13 = binding(property);
} catch (error) {
break exceptionLanding70;
}
try {
dispatch = value13.dispatch;
} catch (error) {
break exceptionLanding70;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding70;
}
try {
object2.type = 'CONTENT_INVENTORY_SET_FEED';
} catch (error) {
break exceptionLanding70;
}
try {
object2.feedId = feedId;
} catch (error) {
break exceptionLanding70;
}
try {
object2.feed = value11;
} catch (error) {
break exceptionLanding70;
}
try {
Reflect.apply(dispatch, value13, [object2]);
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_21;
} catch (error) {
break exceptionLanding70;
}
try {
set = binding.set;
} catch (error) {
break exceptionLanding70;
}
try {
Reflect.apply(set, binding, [feedId, 0]);
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_20;
} catch (error) {
break exceptionLanding70;
}
try {
property = binding.delete;
} catch (error) {
break exceptionLanding70;
}
try {
Reflect.apply(property, binding, [feedId]);
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_26;
} catch (error) {
break exceptionLanding70;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding70;
}
try {
object2.loading = false;
} catch (error) {
break exceptionLanding70;
}
try {
binding(feedId, object2);
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_17;
} catch (error) {
break exceptionLanding70;
}
try {
value14 = feedId !== binding;
} catch (error) {
break exceptionLanding70;
}
reducibleJoin75: while (true) {
if (value14) {
break reducibleJoin75;
}
try {
env2_22 = null;
} catch (error) {
break exceptionLanding70;
}
try {
binding = env2_29;
} catch (error) {
break exceptionLanding70;
}
try {
binding();
} catch (error) {
break exceptionLanding70;
}
break reducibleJoin75;
}
return value;
}
function ContentInventoryManager(a0) { // fn#124796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:3474, offset: 0x025c34f2, size: 213 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, ContentInventoryManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(ContentInventoryManager);
binding = env1_5;
if (_isNativeReflectConstruct_124774()) {
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);
const handleUpdatePollingStateBinding = handleUpdatePollingState;
value.actions = {POST_CONNECTION_OPEN: handlePostConnectionOpen_124789,
CONNECTION_CLOSED: handleConnectionClosed_124790, WINDOW_FOCUS: handleUpdatePollingStateBinding,
IDLE: handleUpdatePollingStateBinding, CONTENT_INVENTORY_TOGGLE_FEED_HIDDEN: handleUpdatePollingStateBinding,
CONTENT_INVENTORY_MANUAL_REFRESH: handleManualRefresh, CONTENT_INVENTORY_INBOX_STALE: handleInboxStale,
SPOTIFY_NEW_TRACK: handleSpotifyNewTrack, GAME_PROFILE_OPEN: handleFetchGameProfileFeed};
return value;
}
function _fun124787() { // fn#124787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16357:2470, offset: 0x025c3329, size: 48 bytes, params: 1, frame: 12
return env3_30({feedId: feedId, feature: feature, force: force});
}
@@ -0,0 +1,130 @@
/* Metro module 10046; source: modules/content_inventory/ContentInventoryOutboxStore.tsx; dependencies: [6, 7, 15, 17, 18, 9571, 566, 694, 2] */
function _fun78560(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:6, offset: 0x01e2c95a, size: 470 bytes, params: 8, frame: 20
const env0_0 = require;
const resetOutboxes = function() {
env0_7 = new global.Map();
env0_8 = new global.Set();
env0_9 = null;
env0_10 = false;
};
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 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const Map = global.Map;
const map = new Map();
const Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun78565(Store).displayName = 'ContentInventoryOutboxStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
resetOutboxes();
env0_11 = true;
}, LOGOUT: function() {
resetOutboxes();
}, CONTENT_INVENTORY_FETCH_OUTBOX_START: CONTENT_INVENTORY_FETCH_OUTBOX_START,
CONTENT_INVENTORY_FETCH_OUTBOX_SUCCESS: CONTENT_INVENTORY_FETCH_OUTBOX_SUCCESS,
CONTENT_INVENTORY_FETCH_OUTBOX_FAILURE: CONTENT_INVENTORY_FETCH_OUTBOX_FAILURE,
CONTENT_INVENTORY_DELETE_OUTBOX_ENTRY_START: function() {
env0_9 = null;
env0_10 = true;
}, CONTENT_INVENTORY_DELETE_OUTBOX_ENTRY_SUCCESS: CONTENT_INVENTORY_DELETE_OUTBOX_ENTRY_SUCCESS,
CONTENT_INVENTORY_DELETE_OUTBOX_ENTRY_FAILURE: function(a0) {
env0_9 = a0.error;
env0_10 = false;
}, CONTENT_INVENTORY_CLEAR_DELETE_HISTORY_ERROR: function() {
env0_9 = null;
env0_10 = false;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryOutboxStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_78561() { // fn#78561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:148, offset: 0x01e2cb30, 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_78561_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun78565(a0) { // fn#78565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:445, offset: 0x01e2cbe3, size: 207 bytes, params: 2, frame: 16
const closure = ContentInventoryOutboxStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getMatchingOutboxEntry', value: value_78567}, {key: 'getUserOutbox',
value: value_78568}, {key: 'isFetchingUserOutbox', value: value_78569}, {key: 'deleteOutboxEntryError',
get: get_78570}, {key: 'isDeletingEntryHistory', get: get_78571}, {key: 'hasInitialized', get: get_78572}]);
}
function CONTENT_INVENTORY_FETCH_OUTBOX_START({userId}) { // fn#78575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:1456, offset: 0x01e2cd1e, size: 29 bytes, params: 2, frame: 11
env0_8.add(userId);
}
function CONTENT_INVENTORY_FETCH_OUTBOX_SUCCESS({outbox, userId}) { // fn#78576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:1549, offset: 0x01e2cd3b, size: 85 bytes, params: 2, frame: 16
const binding = env0_7;
const set = binding.set;
const object2 = {};
copyDataProperties(object2, outbox, undefined);
const Date = global.Date;
object2['lastFetched'] = Date.now();
Reflect.apply(set, binding, [userId, object2]);
env0_8.delete(userId);
}
function CONTENT_INVENTORY_FETCH_OUTBOX_FAILURE({userId}) { // fn#78577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:1695, offset: 0x01e2cd90, size: 29 bytes, params: 2, frame: 11
env0_8.delete(userId);
}
function CONTENT_INVENTORY_DELETE_OUTBOX_ENTRY_SUCCESS({entry, userId}) { // fn#78579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:1897, offset: 0x01e2cdc0, size: 120 bytes, params: 2, frame: 16
let binding = env0_7;
const value2 = binding.get(userId);
if (value2 == null) {
return false;
}
const value3 = value2.entries.filter(function({id}) {
return id !== entry.id;
});
binding = env0_7;
const set = binding.set;
const object2 = {};
copyDataProperties(object2, value2, value3);
object2['entries'] = value3;
Reflect.apply(set, binding, [userId, object2]);
}
function value_78567({activity, userId}) { // fn#78567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10232:822, offset: 0x01e2ccb2, size: 87 bytes, params: 2, frame: 14
let value = environment.__proto__;
const value2 = env1_7.get(userId);
if (value2 != null) {
if (activity != null) {
value = require(9571) /* metro dependency 9571: matchUtils */;
return value.findMatchingEntry(value2.entries, activity);
}
}
}
@@ -0,0 +1,585 @@
/* Metro module 11510; source: modules/content_inventory/ContentInventoryPersistedStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 672, 566, 694, 2] */
function _fun88123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:6, offset: 0x01fd5f93, size: 502 bytes, params: 8, frame: 20
const _arrayLikeToArray_88129 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const DAY = Millis.DAY;
const env0_6 = 3 * DAY;
object = {itemImpressions: [], hidden: false};
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
set = _fun88131(PersistedStore);
set.displayName = 'ContentInventoryPersistedStore';
set.persistKey = 'ContentInventoryPersistedStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{CONTENT_INVENTORY_TRACK_ITEM_IMPRESSIONS: CONTENT_INVENTORY_TRACK_ITEM_IMPRESSIONS,
CONTENT_INVENTORY_DEBUG_CLEAR_IMPRESSIONS: CONTENT_INVENTORY_DEBUG_CLEAR_IMPRESSIONS,
CONTENT_INVENTORY_DEBUG_LOG_IMPRESSIONS: function() {
return false;
}, CONTENT_INVENTORY_DEBUG_TOGGLE_FAST_IMPRESSION_CAPPING: CONTENT_INVENTORY_DEBUG_TOGGLE_FAST_IMPRESSION_CAPPING,
CONTENT_INVENTORY_TOGGLE_FEED_HIDDEN: CONTENT_INVENTORY_TOGGLE_FEED_HIDDEN});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryPersistedStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_88124() { // fn#88124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:167, offset: 0x01fd6189, 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_88124_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_88127(a0, a1) { // fn#88127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:360, offset: 0x01fd61eb, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun88128;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_88129(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_88129(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_88129(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun88128;
}
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 updateImpressionCaches() { // fn#88130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:1365, offset: 0x01fd635f, size: 519 bytes, params: 1, frame: 27
var r1;
var r4;
var r5;
var r6;
var r11;
var r7;
var r8;
var r15;
var r3;
var Date;
var now;
var value2;
var value3;
var itemImpressions;
var length;
var value4;
var binding;
var value5;
var value6;
var value7;
var slice;
var Set;
var prototype;
var set;
var value8;
var value9;
var value10;
var _createForOfIteratorHelperLoose_88127Binding;
var value11;
var value12;
var done;
var value13;
var value14;
var value15;
var property;
var property2;
var value16;
var add;
var value17;
let value = a0;
reducibleJoin2: while (true) {
if (value !== undefined) {
r1 = value;
break reducibleJoin2;
}
value = false;
r1 = value;
break reducibleJoin2;
}
reducibleJoin21: while (true) {
reducibleJoin20: while (true) {
if (r1) {
Date = global.Date;
now = Date.now;
value = Reflect.apply(now, Date, []);
value -= 2592000000;
value3 = environment;
itemImpressions = env0_7.itemImpressions;
length = itemImpressions.length;
value4 = 0;
if (value4 < length) {
r4 = value4;
r5 = value4;
reducibleLoop5: while (true) {
binding = env0_5;
itemImpressions = env0_7.itemImpressions;
value5 = binding(itemImpressions[r4], 2);
value5[value4];
if (value5[1] < value) {
value6 = r4 + 1;
value7 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
itemImpressions = env0_7.itemImpressions;
length = itemImpressions.length;
if (value7 < length) {
r4 = value7;
r5 = value6;
continue reducibleLoop5;
}
r6 = value6;
break reducibleLoop5;
}
r6 = r5;
break reducibleLoop5;
}
} else {
r6 = value4;
}
reducibleJoin9: while (true) {
if (r6 > value4) {
binding = env0_7;
itemImpressions = binding.itemImpressions;
slice = itemImpressions.slice;
binding.itemImpressions = Reflect.apply(slice, itemImpressions, [r6]);
break reducibleJoin9;
}
break reducibleJoin9;
}
itemImpressions = env0_7.itemImpressions;
length = itemImpressions.length;
reducibleJoin11: while (true) {
if (length > 2048) {
binding = env0_7;
itemImpressions = binding.itemImpressions;
slice = itemImpressions.slice;
binding.itemImpressions = Reflect.apply(slice, itemImpressions, [-2048]);
break reducibleJoin11;
}
break reducibleJoin11;
}
value = 1000;
reducibleJoin13: while (true) {
if (env0_12) {
r11 = value;
break reducibleJoin13;
}
binding = env0_6;
r11 = binding;
break reducibleJoin13;
}
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
Set = global.Set;
prototype = Set.prototype;
value8 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value9 = set instanceof Object ? set : value8;
Date = global.Date;
now = Date.now;
value10 = Reflect.apply(now, Date, []) - r11;
_createForOfIteratorHelperLoose_88127Binding = _createForOfIteratorHelperLoose_88127;
itemImpressions = env0_7.itemImpressions;
value11 = _createForOfIteratorHelperLoose_88127Binding(itemImpressions);
value12 = value11();
done = value12.done;
value13 = null;
if (done) {
r3 = value13;
} else {
r7 = value13;
r8 = value12;
reducibleLoop14: while (true) {
value14 = r8.value;
value15 = env0_5(value14, 2);
property = value15[value4];
property2 = value15[1];
if (property2 < value10) {
value.add(property);
r15 = r7;
} else {
reducibleJoin18: while (true) {
if (value13 != r7) {
r15 = r7;
break reducibleJoin18;
}
value16 = property2 + r11;
r15 = value16;
break reducibleJoin18;
}
}
add = value9.add;
Reflect.apply(add, value9, [property]);
value17 = value11();
done = value17.done;
if (done) {
r3 = r15;
break reducibleLoop14;
}
r7 = r15;
r8 = value17;
continue reducibleLoop14;
}
}
env0_8 = value;
env0_9 = value9;
value = Infinity;
if (value13 == r3) {
r1 = value;
break reducibleJoin20;
}
r1 = r3;
break reducibleJoin20;
}
Date = global.Date;
now = Date.now;
value = Reflect.apply(now, Date, []);
value2 = environment;
if (value < env0_10) {
break reducibleJoin21;
}
Date = global.Date;
now = Date.now;
value = Reflect.apply(now, Date, []);
value -= 2592000000;
value3 = environment;
itemImpressions = env0_7.itemImpressions;
length = itemImpressions.length;
value4 = 0;
if (value4 < length) {
r4 = value4;
r5 = value4;
reducibleLoop5: while (true) {
binding = env0_5;
itemImpressions = env0_7.itemImpressions;
value5 = binding(itemImpressions[r4], 2);
value5[value4];
if (value5[1] < value) {
value6 = r4 + 1;
value7 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
itemImpressions = env0_7.itemImpressions;
length = itemImpressions.length;
if (value7 < length) {
r4 = value7;
r5 = value6;
continue reducibleLoop5;
}
r6 = value6;
break reducibleLoop5;
}
r6 = r5;
break reducibleLoop5;
}
} else {
r6 = value4;
}
reducibleJoin9: while (true) {
if (r6 > value4) {
binding = env0_7;
itemImpressions = binding.itemImpressions;
slice = itemImpressions.slice;
binding.itemImpressions = Reflect.apply(slice, itemImpressions, [r6]);
break reducibleJoin9;
}
break reducibleJoin9;
}
itemImpressions = env0_7.itemImpressions;
length = itemImpressions.length;
reducibleJoin11: while (true) {
if (length > 2048) {
binding = env0_7;
itemImpressions = binding.itemImpressions;
slice = itemImpressions.slice;
binding.itemImpressions = Reflect.apply(slice, itemImpressions, [-2048]);
break reducibleJoin11;
}
break reducibleJoin11;
}
value = 1000;
reducibleJoin13: while (true) {
if (env0_12) {
r11 = value;
break reducibleJoin13;
}
binding = env0_6;
r11 = binding;
break reducibleJoin13;
}
Set = global.Set;
prototype = Set.prototype;
value = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value = set instanceof Object ? set : value;
Set = global.Set;
prototype = Set.prototype;
value8 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value9 = set instanceof Object ? set : value8;
Date = global.Date;
now = Date.now;
value10 = Reflect.apply(now, Date, []) - r11;
_createForOfIteratorHelperLoose_88127Binding = _createForOfIteratorHelperLoose_88127;
itemImpressions = env0_7.itemImpressions;
value11 = _createForOfIteratorHelperLoose_88127Binding(itemImpressions);
value12 = value11();
done = value12.done;
value13 = null;
if (done) {
r3 = value13;
} else {
r7 = value13;
r8 = value12;
reducibleLoop14: while (true) {
value14 = r8.value;
value15 = env0_5(value14, 2);
property = value15[value4];
property2 = value15[1];
if (property2 < value10) {
value.add(property);
r15 = r7;
} else {
reducibleJoin18: while (true) {
if (value13 != r7) {
r15 = r7;
break reducibleJoin18;
}
value16 = property2 + r11;
r15 = value16;
break reducibleJoin18;
}
}
add = value9.add;
Reflect.apply(add, value9, [property]);
value17 = value11();
done = value17.done;
if (done) {
r3 = r15;
break reducibleLoop14;
}
r7 = r15;
r8 = value17;
continue reducibleLoop14;
}
}
env0_8 = value;
env0_9 = value9;
value = Infinity;
if (value13 == r3) {
r1 = value;
break reducibleJoin20;
}
r1 = r3;
break reducibleJoin20;
}
env0_10 = r1;
env0_11 = true;
break reducibleJoin21;
}
}
function _fun88131(a0) { // fn#88131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:1933, offset: 0x01fd6566, size: 201 bytes, params: 2, frame: 16
const closure = ContentInventoryPersistedStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_88133}, {key: 'getState', value: value_88134},
{key: 'getImpressionCappedItemIds', value: value_88135}, {key: 'getDebugFastImpressionCappingEnabled',
value: value_88136}, {key: 'hidden', get: get_88137}, {key: 'reset', value: function() {
env1_7 = {itemImpressions: [], hidden: false};
}}]);
}
function CONTENT_INVENTORY_TRACK_ITEM_IMPRESSIONS({itemIds}) { // fn#88139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:2851, offset: 0x01fd670c, size: 163 bytes, params: 2, frame: 20
var r4;
var r5;
var r0;
var value6;
var binding;
var has;
var itemImpressions;
var value7;
var value8;
if (!env0_11) {
updateImpressionCaches();
}
const Date = global.Date;
const value2 = Date.now();
const value3 = _createForOfIteratorHelperLoose_88127(itemIds);
const value4 = value3();
let done = value4.done;
if (done) {
r0 = false;
} else {
r4 = false;
r5 = value4;
while (true) {
value6 = r5.value;
binding = env0_9;
has = binding.has;
if (!Reflect.apply(has, binding, [value6])) {
itemImpressions = env0_7.itemImpressions;
itemImpressions.push([value6, value2]);
value7 = true;
r4 = value7;
}
value8 = value3();
done = value8.done;
if (done) {
r0 = r4;
break;
}
r5 = value8;
continue;
}
}
updateImpressionCaches(r0);
return r0;
}
function CONTENT_INVENTORY_DEBUG_CLEAR_IMPRESSIONS() { // fn#88140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:3146, offset: 0x01fd67af, size: 32 bytes, params: 1, frame: 11
env0_7.itemImpressions = [];
updateImpressionCaches(true);
}
function CONTENT_INVENTORY_DEBUG_TOGGLE_FAST_IMPRESSION_CAPPING() { // fn#88142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:3376, offset: 0x01fd67cf, size: 18 bytes, params: 1, frame: 2
result = !env0_12;
}
function CONTENT_INVENTORY_TOGGLE_FEED_HIDDEN() { // fn#88143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:3469, offset: 0x01fd67e1, size: 26 bytes, params: 1, frame: 2
const binding = env0_7;
binding.hidden = !binding.hidden;
}
function value_88133(a0) { // fn#88133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:2313, offset: 0x01fd66a0, size: 45 bytes, params: 2, frame: 13
const value = a0;
const object2 = {};
copyDataProperties(object2, env1_7, undefined);
copyDataProperties(object2, value ?? ({}), null);
}
function value_88135() { // fn#88135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:2436, offset: 0x01fd66cd, size: 19 bytes, params: 1, frame: 10
updateImpressionCaches();
return env1_8;
}
function get_88137() { // fn#88137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11696:2573, offset: 0x01fd66e0, size: 15 bytes, params: 1, frame: 1
return env1_7.hidden;
}
@@ -0,0 +1,12 @@
/* Metro module 11511; source: modules/content_inventory/ContentInventoryPlatformActionCreators.native.tsx; dependencies: [8743, 2] */
function _fun88144(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11697:6, offset: 0x01fd67fb, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryPlatformActionCreators.native.tsx');
exports.showUserProfile = showUserProfile_88145;
}
function showUserProfile_88145(a0) { // fn#88145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11697:219, offset: 0x01fd685e, size: 34 bytes, params: 2, frame: 11
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)(a0);
}
@@ -0,0 +1,139 @@
/* Metro module 9570; source: modules/content_inventory/ContentInventoryStore.tsx; dependencies: [6, 7, 15, 17, 18, 9571, 566, 694, 2] */
function _fun74865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:6, offset: 0x01d9ccbe, size: 448 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 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let Map = global.Map;
let map = new Map();
Map = global.Map;
map = new Map();
Map = global.Map;
map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun74870(Store).displayName = 'ContentInventoryStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
var Map = global.Map;
env0_8 = new Map();
}, CONTENT_INVENTORY_SET_FEED: CONTENT_INVENTORY_SET_FEED,
CONTENT_INVENTORY_SET_FEED_STATE: CONTENT_INVENTORY_SET_FEED_STATE,
CONTENT_INVENTORY_SET_FILTERS: function(a0) {
env0_7 = a0.filters;
}, CONTENT_INVENTORY_CLEAR_FEED: CONTENT_INVENTORY_CLEAR_FEED,
CONTENT_INVENTORY_DEBUG_TOGGLE_IMPRESSION_CAPPING: CONTENT_INVENTORY_DEBUG_TOGGLE_IMPRESSION_CAPPING});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_74866() { // fn#74866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:148, offset: 0x01d9ce7e, 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_74866_isNativeReflectConstruct = function() {
return !!result;
})();
}
function updateFeeds(a0) { // fn#74869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:382, offset: 0x01d9cee0, size: 55 bytes, params: 2, frame: 13
a0(env0_8);
const Map = global.Map;
const map = new Map(env0_8);
}
function _fun74870(a0) { // fn#74870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:430, offset: 0x01d9cf17, size: 259 bytes, params: 2, frame: 16
const closure = ContentInventoryStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getFeeds', value: value_74872}, {key: 'getFeed', value: value_74873},
{key: 'getFeedState', value: value_74874}, {key: 'getLastFeedFetchDate', value: value_74875},
{key: 'getFilters', value: value_74876}, {key: 'getFeedRequestId', value: function(a0) {
return this.getFeed(a0)?.request_id;
}}, {key: 'getDebugImpressionCappingDisabled', value: value_74878}, {key: 'getMatchingInboxEntry',
value: value_74879}]);
}
function CONTENT_INVENTORY_SET_FEED({feedId, feed}) { // fn#74882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:1581, offset: 0x01d9d133, size: 91 bytes, params: 2, frame: 15
updateFeeds(function(a0) {
return a0.set(feedId, feed);
});
const binding = env0_10;
const set = binding.set;
const Date = global.Date;
Reflect.apply(set, binding, [feedId, new Date()]);
}
function CONTENT_INVENTORY_SET_FEED_STATE({feedId, state}) { // fn#74884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:1720, offset: 0x01d9d1a9, size: 36 bytes, params: 2, frame: 13
env0_9.set(feedId, state);
}
function CONTENT_INVENTORY_CLEAR_FEED({feedId}) { // fn#74886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:1899, offset: 0x01d9d1e1, size: 59 bytes, params: 2, frame: 13
const binding = env0_8;
if (binding.has(feedId)) {
updateFeeds(function(a0) {
return a0.delete(feedId);
});
return undefined;
}
return false;
}
function CONTENT_INVENTORY_DEBUG_TOGGLE_IMPRESSION_CAPPING() { // fn#74888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:2055, offset: 0x01d9d21c, size: 18 bytes, params: 1, frame: 2
result = !env0_11;
}
function value_74879({activity, userId, feedId}) { // fn#74879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:1209, offset: 0x01d9d03e, size: 122 bytes, params: 2, frame: 14
var environment;
var value2;
let value = this.getFeed(feedId);
if (value != null) {
if (activity != null) {
value = value.entries.reduce(_fun74880, []);
value2 = environment.__proto__;
return (require(9571) /* metro dependency 9571: matchUtils */).findMatchingEntry(value, activity);
}
}
}
function _fun74880(a0, a1) { // fn#74880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9756:1317, offset: 0x01d9d0b8, size: 84 bytes, params: 3, frame: 15
var r0;
var items2;
const author_id = a1.content.author_id;
var value;
if (author_id === userId) {
items2 = [];
value = arraySpread(items2, a0, 0, a0);
items2[value] = a1.content;
value + 1;
r0 = items2;
} else {
items2 = [];
arraySpread(items2, a0, 0, a0);
r0 = items2;
}
return r0;
}
@@ -0,0 +1,74 @@
/* Metro module 9572; source: modules/content_inventory/ContentInventoryTypes.tsx; dependencies: [8370, 9573, 2] */
function _fun74899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9758:6, offset: 0x01d9d6a8, size: 302 bytes, params: 8, frame: 27
const env0_0 = require;
const closure = function(a0) {
return a0?.content_type === require(dependencyMap[0]).ContentInventoryEntryType.PLAYED_GAME;
};
const closure2 = function(a0) {
return a0?.content_type === require(dependencyMap[0]).ContentInventoryEntryType.TOP_GAME;
};
const closure3 = isGamingLikeEntry;
const closure4 = function(a0) {
var value = undefined;
return (a0 == null ? value : a0.extra) != null && 'application_id' in (a0 == null ? value : a0.extra);
};
const closure5 = function(a0) {
return a0?.content_type === require(dependencyMap[0]).ContentInventoryEntryType.LISTENED_SESSION;
};
const closure6 = function(a0) {
return a0?.content_type === require(dependencyMap[0]).ContentInventoryEntryType.TOP_ARTIST;
};
const closure7 = function(a0) {
return a0?.content_type === require(dependencyMap[0]).ContentInventoryEntryType.WATCHED_MEDIA;
};
const closure8 = isXboxEntry;
const closure9 = isPlaystationEntry;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/ContentInventoryTypes.tsx');
exports.isPlayedGameEntry = closure;
exports.isTopGameEntry = closure2;
exports.isGamingLikeEntry = closure3;
exports.isApplicationEntry = closure4;
exports.isListenedSessionEntry = closure5;
exports.isTopArtistEntry = closure6;
exports.isListeningLikeEntry = isListeningLikeEntry;
exports.isWatchedMediaEntry = closure7;
exports.isXboxEntry = closure8;
exports.isPlaystationEntry = closure9;
exports.isConsoleEntry = isConsoleEntry;
exports.isLaunchedActivityEntry = function(a0) {
return a0?.content_type === require(dependencyMap[0]).ContentInventoryEntryType.LAUNCHED_ACTIVITY;
};
exports.isRecentActivityEntry = isRecentActivityEntry;
}
function isGamingLikeEntry(a0) { // fn#74902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9758:269, offset: 0x01d9d852, size: 31 bytes, params: 2, frame: 13
return isPlayedGameEntry(a0) || isTopGameEntry(a0);
}
function isXboxEntry(a0) { // fn#74907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9758:819, offset: 0x01d9d95f, size: 76 bytes, params: 2, frame: 14
const isGamingLikeEntry2 = isGamingLikeEntry(a0);
return isGamingLikeEntry2 ? a0.extra.platform === (require(9573) /* metro dependency 9573: PlatformType */).PlatformType.XBOX : !!isGamingLikeEntry2;
}
function isPlaystationEntry(a0) { // fn#74908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9758:918, offset: 0x01d9d9ab, size: 76 bytes, params: 2, frame: 14
const isGamingLikeEntry2 = isGamingLikeEntry(a0);
return isGamingLikeEntry2 ? a0.extra.platform === (require(9573) /* metro dependency 9573: PlatformType */).PlatformType.PLAYSTATION : !!isGamingLikeEntry2;
}
function isListeningLikeEntry(a0) { // fn#74909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9758:1420, offset: 0x01d9d9f7, size: 31 bytes, params: 2, frame: 13
return isListenedSessionEntry(a0) || isTopArtistEntry(a0);
}
function isConsoleEntry(a0) { // fn#74910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9758:1633, offset: 0x01d9da16, size: 31 bytes, params: 2, frame: 13
return isXboxEntry(a0) || isPlaystationEntry(a0);
}
function isRecentActivityEntry(a0) { // fn#74912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9758:1885, offset: 0x01d9da73, size: 55 bytes, params: 2, frame: 13
let r0 = isGamingLikeEntry(a0) || isListenedSessionEntry(a0);
r0 = !r0 ? isWatchedMediaEntry(a0) : r0;
r0 = !r0 ? isApplicationEntry(a0) : r0;
return r0;
}
@@ -0,0 +1,104 @@
/* Metro module 9571; source: modules/content_inventory/matchUtils.tsx; dependencies: [661, 8847, 6868, 9572, 9574, 8846, 8375, 2] */
function _fun74889(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:6, offset: 0x01d9d22e, size: 257 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = isSpotifyEntry;
const closure2 = isCrunchyrollEntry;
const closure3 = function({extra}, a1) {
var r1;
var r0;
var value = extra != null;
if (value) {
r1 = 'application_id' in a1 && a1.application_id === extra.application_id;
r1 = !r1 ? 'game_name' in extra ? a1.name === extra.game_name : 'activity_name' in extra && a1.name === extra.activity_name : r1;
r0 = r1;
} else {
r0 = value;
}
return r0;
};
const closure4 = isMatchingListeningActivity;
const closure5 = isMatchingWatchActivity;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).ActivityTypes;
const env0_4 = (require(8847) /* metro dependency 8847: CrunchyrollConnectionConstants */).CRUNCHYROLL_CLIENT_ID;
const env0_5 = (require(6868) /* metro dependency 6868: SpotifyConstants */).isSpotifyParty;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/matchUtils.tsx');
exports.isSpotifyEntry = closure;
exports.isCrunchyrollEntry = closure2;
exports.isMatchingApplicationActivity = closure3;
exports.isMatchingListeningActivity = closure4;
exports.isMatchingWatchActivity = closure5;
exports.findMatchingEntry = findMatchingEntry;
}
function isSpotifyEntry(a0) { // fn#74890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:177, offset: 0x01d9d32f, size: 223 bytes, params: 2, frame: 16
var r0;
var isTopArtistEntry2;
const ContentInventoryListenedMediaProvider = (require(9574) /* metro dependency 9574: ContentInventoryListenedMediaProvider */).ContentInventoryListenedMediaProvider;
var property;
const value2 = undefined;
const contentInventoryTypesModule = require(9572) /* metro dependency 9572: ContentInventoryTypes */;
if (contentInventoryTypesModule.isListenedSessionEntry(a0)) {
property = a0.extra.entries[0];
r0 = (property == null || property.media == null ? value2 : property.media.provider) === ContentInventoryListenedMediaProvider.SPOTIFY;
} else {
isTopArtistEntry2 = contentInventoryTypesModule.isTopArtistEntry(a0);
r0 = isTopArtistEntry2 ? a0.extra.media.provider === ContentInventoryListenedMediaProvider.SPOTIFY : !!isTopArtistEntry2;
}
return r0;
}
function isCrunchyrollEntry(a0) { // fn#74891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:485, offset: 0x01d9d40e, size: 70 bytes, params: 2, frame: 13
const isWatchedMediaEntry2 = (require(9572) /* metro dependency 9572: ContentInventoryTypes */).isWatchedMediaEntry(a0);
return isWatchedMediaEntry2 ? a0.extra.application_id === CRUNCHYROLL_CLIENT_ID : !!isWatchedMediaEntry2;
}
function isMatchingListeningActivity(a0, a1) { // fn#74893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:803, offset: 0x01d9d4c5, size: 62 bytes, params: 3, frame: 14
const isSpotifyEntryBinding = isSpotifyEntry;
const value2 = undefined;
const isSpotifyEntry2 = isSpotifyEntryBinding(a0);
return isSpotifyEntry2 ? isSpotifyParty(a1.party == null ? value2 : a1.party.id) : !!isSpotifyEntry2;
}
function isMatchingWatchActivity(a0, a1) { // fn#74894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:911, offset: 0x01d9d503, size: 84 bytes, params: 3, frame: 14
const value2 = (importDefault(8846) /* metro dependency 8846: isCrunchyrollActivity */)(a1);
return !(value2 ? !isCrunchyrollEntry(a0) : !value2) && a0.extra.media_title === a1.details;
}
function findMatchingEntry(a0, a1) { // fn#74895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:1363, offset: 0x01d9d557, size: 283 bytes, params: 3, frame: 18
var r0;
const env0_0 = a1;
var value;
const value2 = undefined;
const value3 = a0.filter((require(8375) /* metro dependency 8375: utils */).isEntryActive);
const type = a1.type;
const PLAYING = ActivityTypes.PLAYING;
if (type === PLAYING) {
value = value3.filter((require(9572) /* metro dependency 9572: ContentInventoryTypes */).isGamingLikeEntry);
value = value.find(function(a0) {
return isMatchingApplicationActivity(a0, require);
});
r0 = value;
} else if (a1.type === ActivityTypes.LISTENING) {
value = value3.filter((require(9572) /* metro dependency 9572: ContentInventoryTypes */).isListenedSessionEntry);
value = value.find(_fun74897);
r0 = value;
} else if (a1.type !== ActivityTypes.WATCHING) {
r0 = value2;
} else {
value = a0.filter((require(9572) /* metro dependency 9572: ContentInventoryTypes */).isWatchedMediaEntry);
value = value.find(_fun74898);
r0 = value;
}
return r0;
}
function _fun74897(a0) { // fn#74897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:1609, offset: 0x01d9d672, size: 27 bytes, params: 2, frame: 13
return isMatchingListeningActivity(a0, require);
}
function _fun74898(a0) { // fn#74898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9757:1711, offset: 0x01d9d68d, size: 27 bytes, params: 2, frame: 13
return isMatchingWatchActivity(a0, require);
}
@@ -0,0 +1,12 @@
/* Metro module 8374; source: modules/content_inventory/memberlist/getFallbackHeroColor.native.tsx; dependencies: [697, 2] */
function _fun66655(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8559:6, offset: 0x01c04aa5, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/memberlist/getFallbackHeroColor.native.tsx');
exports.getFallbackHeroColor = function(a0, a1) {
var internal = importDefault(dependencyMap[0]).internal;
var BACKGROUND_SURFACE_HIGH = importDefault(dependencyMap[0]).colors.BACKGROUND_SURFACE_HIGH;
return internal.resolveSemanticColor(a0, BACKGROUND_SURFACE_HIGH, {saturation: a1});
};
}
@@ -0,0 +1,268 @@
/* Metro module 8373; source: modules/content_inventory/memberlist/useHeroColors.tsx; dependencies: [57, 31, 4502, 1310, 8372, 5132, 8374, 673, 674, 566, 2] */
function _fun66647(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8558:6, offset: 0x01c04416, size: 182 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 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/memberlist/useHeroColors.tsx');
exports.default = _default_66648;
exports.getHeroColors = getHeroColors;
}
function _default_66648(a0) { // fn#66648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8558:162, offset: 0x01c044cc, size: 217 bytes, params: 2, frame: 19
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const saturation = Reflect.apply(useStateFromStores, fluxModule, [[AccessibilityStore], function() {
return AccessibilityStore.saturation;
}]);
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
const value4 = env0_3((require(8372) /* metro dependency 8372: useAvatarColor */).useAvatarColors(a0,
(require(8374) /* metro dependency 8374: getFallbackHeroColorNative */).getFallbackHeroColor(Reflect.apply(useStateFromStores,
moduleValue2, [[ThemeStore], function() {
return ThemeStore.theme;
}]), saturation)), 2);
return env0_4.useMemo(_fun66651, [value4[0], value4[1]]);
}
function getHeroColors(a0) { // fn#66652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8558:809, offset: 0x01c04761, size: 488 bytes, params: 2, frame: 23
var r2;
var r11;
var r8;
var r10;
var r3;
var value9;
var value10;
var value11;
var value12;
var moduleValue5;
var value13;
var value14;
var value15;
var value16;
var moduleValue7;
const value4 = env0_3(_fun66653(a0,
(require(8374) /* metro dependency 8374: getFallbackHeroColorNative */).getFallbackHeroColor(ThemeStore.theme,
AccessibilityStore.saturation)), 2);
const property = value4[0];
const value5 = 1;
const property2 = value4[value5];
const value6 = (require(673) /* metro dependency 673: ColorUtils */).hex2int(property);
const value7 = (require(673) /* metro dependency 673: ColorUtils */).hex2int(property2);
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
let getDarkness = colorUtilsModule.getDarkness;
if (Reflect.apply(getDarkness, colorUtilsModule, [value6]) >= 0.725) {
r8 = value6;
} else {
r2 = value5;
r11 = value6;
while (true) {
value9 = (importDefault(674) /* metro dependency 674 */)(r11);
value10 = value9.darken(0.5);
value11 = value10.num();
value12 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value12 < 8)) {
r8 = value11;
break;
}
moduleValue5 = colorUtilsModule;
getDarkness = moduleValue5.getDarkness;
if (Reflect.apply(getDarkness, moduleValue5, [value11]) >= 0.725) {
r8 = value11;
break;
}
r2 = value12;
r11 = value11;
continue;
}
}
const moduleValue6 = colorUtilsModule;
getDarkness = moduleValue6.getDarkness;
if (Reflect.apply(getDarkness, moduleValue6, [value7]) >= 0.725) {
r3 = value7;
} else {
r2 = value7;
r10 = value5;
while (true) {
value13 = (importDefault(674) /* metro dependency 674 */)(r2);
value14 = value13.darken(0.5);
value15 = value14.num();
value16 = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1;
if (!(value16 < 8)) {
r3 = value15;
break;
}
moduleValue7 = colorUtilsModule;
getDarkness = moduleValue7.getDarkness;
if (Reflect.apply(getDarkness, moduleValue7, [value15]) >= 0.725) {
r3 = value15;
break;
}
r2 = value15;
r10 = value16;
continue;
}
}
const object2 = {};
object2.primaryColor = colorUtilsModule.int2hex(r8);
object2.secondaryColor = colorUtilsModule.int2hex(r3);
return object2;
}
function _fun66651() { // fn#66651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8558:383, offset: 0x01c045c3, size: 414 bytes, params: 1, frame: 22
var r2;
var r11;
var r8;
var r9;
var r3;
var value7;
var value8;
var value9;
var value10;
var moduleValue4;
var value11;
var value12;
var value13;
var value14;
var moduleValue6;
const value = environment.__proto__;
const value3 = (require(673) /* metro dependency 673: ColorUtils */).hex2int(env0_0);
const value4 = (require(673) /* metro dependency 673: ColorUtils */).hex2int(env0_1);
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
let getDarkness = colorUtilsModule.getDarkness;
const value5 = Reflect.apply(getDarkness, colorUtilsModule, [value3]);
const value6 = 1;
if (value5 >= 0.725) {
r8 = value3;
} else {
r2 = value6;
r11 = value3;
while (true) {
value7 = (importDefault(674) /* metro dependency 674 */)(r11);
value8 = value7.darken(0.5);
value9 = value8.num();
value10 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value10 < 8)) {
r8 = value9;
break;
}
moduleValue4 = colorUtilsModule;
getDarkness = moduleValue4.getDarkness;
if (Reflect.apply(getDarkness, moduleValue4, [value9]) >= 0.725) {
r8 = value9;
break;
}
r2 = value10;
r11 = value9;
continue;
}
}
const moduleValue5 = colorUtilsModule;
getDarkness = moduleValue5.getDarkness;
if (Reflect.apply(getDarkness, moduleValue5, [value4]) >= 0.725) {
r3 = value4;
} else {
r2 = value4;
r9 = value6;
while (true) {
value11 = (importDefault(674) /* metro dependency 674 */)(r2);
value12 = value11.darken(0.5);
value13 = value12.num();
value14 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (!(value14 < 8)) {
r3 = value13;
break;
}
moduleValue6 = colorUtilsModule;
getDarkness = moduleValue6.getDarkness;
if (Reflect.apply(getDarkness, moduleValue6, [value13]) >= 0.725) {
r3 = value13;
break;
}
r2 = value13;
r9 = value14;
continue;
}
}
const object2 = {};
object2.primaryColor = colorUtilsModule.int2hex(r8);
object2.secondaryColor = colorUtilsModule.int2hex(r3);
return object2;
}
function _fun66653(a0, a1) { // fn#66653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8558:849, offset: 0x01c04949, size: 136 bytes, params: 3, frame: 14
var environment;
let value = environment.__proto__;
const env0_0 = AccessibilityStore.desaturateUserColors ? AccessibilityStore.saturation : 1;
value = undefined;
const useColorStore = (require(8372) /* metro dependency 8372: useAvatarColor */).useColorStore;
const getState = useColorStore.getState;
const property = Reflect.apply(getState, useColorStore, []).palette[a0];
let r0 = property == null ? value : property.map(_fun66654);
r0 = r0 ?? [a1, a1];
return r0;
}
function _fun66654(a0) { // fn#66654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8558:972, offset: 0x01c049d1, size: 212 bytes, params: 2, frame: 17
var r0;
var r1;
var r7;
var r5;
var item3;
var value3;
var item4;
var value4;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r8 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r7 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r7 = value;
} else {
r0 = item3;
r1 = value3;
r7 = item;
}
}
if (r1) {
r5 = value;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value4 = item4 === value;
if (value4) {
r0 = item4;
r1 = value4;
r5 = value;
} else {
r0 = item4;
r1 = value4;
r5 = item;
}
}
if (!r1) {
r0.return();
}
const {h, s, l} = (importDefault(5132) /* metro dependency 5132 */)({r: r8, g: r7, b: r5}).toHsl();
return (importDefault(5132) /* metro dependency 5132 */)({h: h, s: s * saturation, l: l}).toHexString();
}
@@ -0,0 +1,66 @@
/* Metro module 10224; source: modules/content_inventory/memberlist/useTimestampTickedNow.tsx; dependencies: [57, 31, 4502, 672, 566, 4041, 2] */
function _fun79517(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10410:6, offset: 0x01e563f8, size: 164 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 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/memberlist/useTimestampTickedNow.tsx');
exports.useTimestampTickedNow = useTimestampTickedNow;
}
function dropMilliseconds(a0) { // fn#79518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10410:126, offset: 0x01e5649c, size: 90 bytes, params: 2, frame: 16
const Math = global.Math;
const floor = Math.floor;
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let SECOND = Millis.SECOND;
const value = Reflect.apply(floor, Math, [a0 / SECOND]);
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
return value * SECOND;
}
function useTimestampTickedNow() { // fn#79519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10410:340, offset: 0x01e564f6, size: 258 bytes, params: 1, frame: 19
const value = a0;
let r1 = value !== undefined ? value : {};
const hovered = r1.hovered;
let isAppFocused = r1.isAppFocused;
isAppFocused = isAppFocused === undefined || isAppFocused;
const [property, env0_0] = env0_3(env0_4.useState(_fun79520), 2);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
r1 = isAppFocused ? useReducedMotion && !hovered : !isAppFocused;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
env0_4.useEffect(_fun79522, [r1 ? 15 * SECOND : SECOND]);
return {now: property, slowTickMode: r1};
}
function _fun79520() { // fn#79520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10410:423, offset: 0x01e565f8, size: 33 bytes, params: 1, frame: 11
const value = environment.__proto__;
const dropMillisecondsBinding = dropMilliseconds;
const Date = global.Date;
return dropMillisecondsBinding(Date.now());
}
function _fun79522() { // fn#79522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10410:623, offset: 0x01e56619, size: 91 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const Interval = (require(4041) /* metro dependency 4041: Timers */).Interval;
const interval = new Interval();
interval.start(env0_1, _fun79523);
return _fun79524;
}
function _fun79523() { // fn#79523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10410:674, offset: 0x01e56674, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
const binding = env1_0;
value = environment.__proto__.__proto__;
const dropMillisecondsBinding = dropMilliseconds;
const Date = global.Date;
binding(dropMillisecondsBinding(Date.now()));
}
@@ -0,0 +1,25 @@
/* Metro module 14866; source: modules/content_inventory/reactionUtils.tsx; dependencies: [7076, 7067, 2] */
function _fun112449(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15063:6, offset: 0x023cc04e, size: 114 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/reactionUtils.tsx');
exports.sendMessageWithEmbed = sendMessageWithEmbed;
exports.sendMessageWithoutContentInventoryEntry = sendMessageWithoutContentInventoryEntry;
}
function sendMessageWithEmbed({channel, content, entry, whenReady, doNotNotifyOnError, location}) { // fn#112450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15063:192, offset: 0x023cc0c0, size: 132 bytes, params: 2, frame: 22
let value = importDefault(7076) /* metro dependency 7076: MessageParser */;
value = value.parse(channel, content);
const defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
return defaultImport.sendMessage(channel.id, value, whenReady, {contentInventoryEntry: {unverified_content: entry},
doNotNotifyOnError: doNotNotifyOnError, location: location});
}
function sendMessageWithoutContentInventoryEntry({channel, content, whenReady, doNotNotifyOnError, location}) { // fn#112451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15063:481, offset: 0x023cc144, size: 112 bytes, params: 2, frame: 21
let value = importDefault(7076) /* metro dependency 7076: MessageParser */;
value = value.parse(channel, content);
const defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
return defaultImport.sendMessage(channel.id, value, whenReady, {doNotNotifyOnError: doNotNotifyOnError,
location: location});
}
@@ -0,0 +1,39 @@
/* Metro module 10212; source: modules/content_inventory/useEntryActivityAndApplication.tsx; dependencies: [57, 1378, 10213, 566, 6777, 2] */
function _fun79407(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10398:6, offset: 0x01e53491, size: 150 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 embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const contentInventoryActivityStore = importDefault(10213) /* metro dependency 10213: ContentInventoryActivityStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/useEntryActivityAndApplication.tsx');
exports.default = useEntryActivityAndApplication;
}
function useEntryActivityAndApplication(a0) { // fn#79408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10398:230, offset: 0x01e53527, size: 263 bytes, params: 2, frame: 20
var object2;
const env0_0 = a0;
const value2 = undefined;
const matchingActivity = (require(566) /* metro dependency 566: flux */).useStateFromStores([ContentInventoryActivityStore],
_fun79409);
const value4 = env0_3((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)([matchingActivity == null ? value2 : matchingActivity.application_id,
'application_id' in a0.extra ? a0.extra.application_id : value2]), 2);
const property = value4[0];
const property2 = value4[1];
object2 = {activity: matchingActivity};
object2.embeddedActivity = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun79410);
object2.anyMatchingApplication = property ?? property2;
object2.activityApplication = property;
object2.fallbackApplication = property2;
return object2;
}
function _fun79409() { // fn#79409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10398:311, offset: 0x01e5362e, size: 27 bytes, params: 1, frame: 11
return ContentInventoryActivityStore.getMatchingActivity(env0_0);
}
function _fun79410() { // fn#79410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10398:534, offset: 0x01e53649, size: 58 bytes, params: 1, frame: 15
return EmbeddedActivitiesStore.getEmbeddedActivityForUserId(env0_0.author_id, env0_1?.id);
}
+484
View File
@@ -0,0 +1,484 @@
/* Metro module 8375; source: modules/content_inventory/utils.tsx; dependencies: [672, 21, 1244, 3738, 8376, 3381, 8370, 2] */
function _fun66657(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:6, offset: 0x01c04b56, size: 625 bytes, params: 8, frame: 27
let env0_0 = require;
const closure = function(a0, a1) {
var env0_0 = a1;
return a0.traits.find(_fun66659);
};
const closure2 = isEntryActive;
const closure3 = function(a0) {
var r0;
var Date;
var expires_at;
var value2;
var value3;
var value4;
var value = a0.expires_at != null;
if (value) {
Date = global.Date;
expires_at = a0.expires_at;
value2 = new Date();
Date = global.Date;
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
value4 = new Date();
value2 = value2 < (value4 instanceof Object ? value4 : value3);
r0 = value2;
} else {
r0 = value;
}
return r0;
};
const closure4 = getEntryDuration;
const closure5 = getStreakCount;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const closure6 = calculateTimestampDurations;
const closure7 = calculateActiveTimestampDurations;
const closure8 = formatActiveTimestamp;
const closure9 = formatTimestampToA11yLabel;
object = {secondsAgo: function(a0) {
var intl = require(dependencyMap[2]).intl;
var EOrEJl = require(dependencyMap[2]).t.EOrEJl;
return intl.formatToPlainString(EOrEJl, {count: a0});
}, minutesAgo: function(a0) {
var intl = require(dependencyMap[2]).intl;
var LRNgHp = require(dependencyMap[2]).t.LRNgHp;
return intl.formatToPlainString(LRNgHp, {count: a0});
}, hoursAgo: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(require(dependencyMap[2]).t.raJpz3, {count: a0});
}, daysAgo: function(a0) {
var intl = require(dependencyMap[2]).intl;
var KkvKhi = require(dependencyMap[2]).t.KkvKhi;
return intl.formatToPlainString(KkvKhi, {count: a0});
}, weeksAgo: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(require(dependencyMap[2]).t.sDtO6D, {count: a0});
}, monthsAgo: function(a0) {
var intl = require(dependencyMap[2]).intl;
var ITymou = require(dependencyMap[2]).t.ITymou;
return intl.formatToPlainString(ITymou, {count: a0});
}};
const closure10 = formatEndedTimestamp;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/content_inventory/utils.tsx');
exports.calculateTimestampDurations = closure6;
exports.calculateActiveTimestampDurations = closure7;
exports.formatActiveTimestamp = closure8;
exports.formatTimestampToA11yLabel = closure9;
exports.formatActiveA11yTimestamp = function(a0, a1) {
var value2 = calculateActiveTimestampDurations(a0, a1);
return formatTimestampToA11yLabel({hours: value2.hours, minutes: value2.minutes, seconds: value2.seconds});
};
exports.A11Y_FORMAT_SET = {secondsAgo: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(require(dependencyMap[2]).t.jfUoRQ, {count: a0});
}, minutesAgo: function(a0) {
var intl = require(dependencyMap[2]).intl;
var DmvRVO = require(dependencyMap[2]).t.DmvRVO;
return intl.formatToPlainString(DmvRVO, {count: a0});
}, hoursAgo: function(a0) {
var intl = require(dependencyMap[2]).intl;
var AfXezt = require(dependencyMap[2]).t.AfXezt;
return intl.formatToPlainString(AfXezt, {count: a0});
}, daysAgo: function(a0) {
var intl = require(dependencyMap[2]).intl;
var Lru1rV = require(dependencyMap[2]).t.Lru1rV;
return intl.formatToPlainString(Lru1rV, {count: a0});
}, weeksAgo: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(require(dependencyMap[2]).t['jovF+x'], {count: a0});
}, monthsAgo: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(require(dependencyMap[2]).t.nmSbST, {count: a0});
}};
exports.formatEndedTimestamp = closure10;
exports.formatEntryTimestamp = formatEntryTimestamp;
exports.getTrait = closure;
exports.isEntryActive = closure2;
exports.isEntryNew = isEntryNew;
exports.isEntryRecent = isEntryRecent;
exports.isEntryExpired = closure3;
exports.isEntryLive = isEntryLive;
exports.getEntryDuration = closure4;
exports.getAggregateRange = getAggregateRange;
exports.isEntryMarathon = isEntryMarathon;
exports.getResurrectedEntryLastPlayTime = getResurrectedEntryLastPlayTime;
exports.getFullResurrectedBadgeText = getFullResurrectedBadgeText;
exports.getEpisodeBadgeText = getEpisodeBadgeText;
exports.getRichGameStateBadgeText = getRichGameStateBadgeText;
exports.isEntryTopGame = function({content_type}) {
return content_type === require(dependencyMap[6]).ContentInventoryEntryType.TOP_GAME;
};
exports.getStreakCount = closure5;
exports.isValidStreak = isValidStreak;
exports.getMarathonDescription = getMarathonDescription;
exports.getTrendingType = getTrendingType;
}
function getTrait({traits}, a1) { // fn#66658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:2759, offset: 0x01c04dc7, size: 38 bytes, params: 3, frame: 11
const env0_0 = a1;
return traits.find(function({type}) {
return type === require;
});
}
function isEntryActive(a0) { // fn#66660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:2820, offset: 0x01c04ded, size: 79 bytes, params: 2, frame: 13
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const IS_LIVE = ContentInventoryTraitType.IS_LIVE;
const traitBinding = getTraitBinding(a0, IS_LIVE);
const is_live = traitBinding == null ? value : traitBinding.is_live;
return is_live != null && is_live;
}
function getEntryDuration(a0) { // fn#66662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:3041, offset: 0x01c04e90, size: 67 bytes, params: 2, frame: 13
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const DURATION_SECONDS = ContentInventoryTraitType.DURATION_SECONDS;
const traitBinding = getTraitBinding(a0, DURATION_SECONDS);
return traitBinding == null ? value : traitBinding.duration_seconds;
}
function getStreakCount(a0) { // fn#66663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:3182, offset: 0x01c04ed3, size: 69 bytes, params: 2, frame: 13
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const STREAK_DAYS = ContentInventoryTraitType.STREAK_DAYS;
const traitBinding = getTraitBinding(a0, STREAK_DAYS);
return traitBinding == null ? value : traitBinding.streak_count_days;
}
function calculateTimestampDurations(a0, a1) { // fn#66664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:124, offset: 0x01c04f18, size: 286 bytes, params: 3, frame: 19
let Math = global.Math;
let value = Math.max(a0 - a1, 0);
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
value /= SECOND;
const object2 = {};
Math = global.Math;
let floor = Math.floor;
const value3 = Reflect.apply(floor, Math, [value]);
let Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
let MINUTE = Seconds.MINUTE;
object2.seconds = value3 % MINUTE;
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
const value4 = Reflect.apply(floor, Math, [value / MINUTE]);
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
MINUTE = Seconds.MINUTE;
object2.minutes = value4 % MINUTE;
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const HOUR = Seconds.HOUR;
object2.hours = Reflect.apply(floor, Math, [value / HOUR]);
Math = global.Math;
floor = Math.floor;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const DAY = Seconds.DAY;
object2.days = Reflect.apply(floor, Math, [value / DAY]);
return object2;
}
function calculateActiveTimestampDurations(a0, a1) { // fn#66665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:412, offset: 0x01c05036, size: 192 bytes, params: 3, frame: 18
var r5;
var r4;
var defaultImport;
let value = a1;
const end = 'end' in a0 ? a0.end : undefined;
const r0 = 'isCountDown' in a0 && a0.isCountDown != null && a0.isCountDown;
if (r0) {
if (end == null) {
if ('id' in a0) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r5 = defaultImport.extractTimestamp(a0.id);
} else {
r5 = a0.start;
}
if (end == null) {
r4 = value;
} else if (r0) {
r4 = value;
} else {
value = global.Math.min(end, value);
r4 = value;
}
value = environment;
return calculateTimestampDurations(r4, r5);
}
if (end > value) {
return calculateTimestampDurations(end, value);
}
if ('id' in a0) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r5 = defaultImport.extractTimestamp(a0.id);
} else {
r5 = a0.start;
}
if (end == null) {
r4 = value;
} else if (r0) {
r4 = value;
} else {
value = global.Math.min(end, value);
r4 = value;
}
value = environment;
} else {
if ('id' in a0) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r5 = defaultImport.extractTimestamp(a0.id);
} else {
r5 = a0.start;
}
if (end == null) {
r4 = value;
} else if (r0) {
r4 = value;
} else {
value = global.Math.min(end, value);
r4 = value;
}
}
return calculateTimestampDurations(r4, r5);
}
function formatActiveTimestamp(a0, a1) { // fn#66666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:710, offset: 0x01c050f6, size: 143 bytes, params: 3, frame: 20
const closure = function(a0) {
return (0, global.String)(a0).padStart(2, '0');
};
let value = calculateActiveTimestampDurations(a0, a1);
const seconds = value.seconds;
const minutes = value.minutes;
const hours = value.hours;
const r5 = hours > 0 ? closure(minutes) : minutes;
value = closure(seconds);
return hours > 0 ? '' + hours + ':' + r5 + ':' + value : '' + r5 + ':' + value;
}
function formatTimestampToA11yLabel({hours, minutes, seconds}) { // fn#66668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:960, offset: 0x01c051ae, size: 267 bytes, params: 2, frame: 21
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [];
if (hours > 0) {
items2.push(intl.formatToPlainString(t.xCjYxK, {hours: hours}));
}
items2.push(intl.formatToPlainString(t.iXLF9W, {minutes: minutes}));
items2.push(intl.formatToPlainString(t.geSp4K, {seconds: seconds}));
return items2.join(', ');
}
function formatEndedTimestamp({id}, a1, a2) { // fn#66681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:2156, offset: 0x01c05631, size: 661 bytes, params: 4, frame: 19
const value = a3;
const formatSet = (value !== undefined ? value : {}).formatSet;
const r2 = formatSet !== undefined ? formatSet : env0_7;
const value2 = (importDefault(3738) /* metro dependency 3738 */)(a2);
const defaultImport2 = importDefault(3738) /* metro dependency 3738 */;
const defaultImport3 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value4 = value2.diff(defaultImport2(defaultImport3.extractTimestamp(id)), 's');
let Math = global.Math;
const value5 = Math.abs(value4);
let Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const MINUTE = Seconds.MINUTE;
if (value5 < MINUTE) {
return r2.secondsAgo(value4);
}
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
let HOUR = Seconds.HOUR;
if (value5 < HOUR) {
Math = global.Math;
return r2.minutesAgo(Math.round(value4 / (importDefault(672) /* metro dependency 672: Durations */).Seconds.MINUTE));
}
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
HOUR = Seconds.HOUR;
if (value5 < 12 * HOUR) {
Math = global.Math;
return r2.hoursAgo(Math.round(value4 / (importDefault(672) /* metro dependency 672: Durations */).Seconds.HOUR));
}
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const DAY = Seconds.DAY;
if (value5 < 9 * DAY) {
Math = global.Math;
return r2.daysAgo(Math.round(value4 / (importDefault(672) /* metro dependency 672: Durations */).Seconds.DAY));
}
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const WEEK = Seconds.WEEK;
if (value5 < 4 * WEEK) {
Math = global.Math;
return r2.weeksAgo(Math.round(value4 / (7 * (importDefault(672) /* metro dependency 672: Durations */).Seconds.DAY)));
}
Math = global.Math;
const round = Math.round;
Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const DAYS_30 = Seconds.DAYS_30;
return r2.monthsAgo(Reflect.apply(round, Math, [value4 / DAYS_30]));
}
function formatEntryTimestamp(a0, a1) { // fn#66683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:3884, offset: 0x01c05909, size: 88 bytes, params: 3, frame: 18
const value = a2;
const value2 = a3;
const r3 = value !== undefined ? value : global.Date.now();
return isEntryActive(a0) ? formatActiveTimestamp(a0, r3) : formatEndedTimestamp(a0, 0, r3,
value2 !== undefined ? value2 : {});
}
function isEntryNew(a0) { // fn#66684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:4046, offset: 0x01c05961, size: 79 bytes, params: 2, frame: 13
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const FIRST_TIME = ContentInventoryTraitType.FIRST_TIME;
const traitBinding = getTraitBinding(a0, FIRST_TIME);
const first_time = traitBinding == null ? value : traitBinding.first_time;
return first_time != null && first_time;
}
function isEntryRecent({id}) { // fn#66685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:4201, offset: 0x01c059b0, size: 80 bytes, params: 2, frame: 14
let value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.age(id);
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const HOUR = Millis.HOUR;
return value / HOUR < 48;
}
function isEntryLive(a0) { // fn#66686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:4322, offset: 0x01c05a00, size: 34 bytes, params: 2, frame: 13
return isEntryActive(a0) && !isEntryExpired(a0);
}
function getAggregateRange(a0) { // fn#66687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:4447, offset: 0x01c05a22, size: 67 bytes, params: 2, frame: 13
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const AGGREGATE_RANGE = ContentInventoryTraitType.AGGREGATE_RANGE;
const traitBinding = getTraitBinding(a0, AGGREGATE_RANGE);
return traitBinding == null ? value : traitBinding.range;
}
function isEntryMarathon(a0) { // fn#66688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:4596, offset: 0x01c05a65, size: 69 bytes, params: 2, frame: 13
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const MARATHON = ContentInventoryTraitType.MARATHON;
const traitBinding = getTraitBinding(a0, MARATHON);
return traitBinding == null ? value : traitBinding.marathon;
}
function getResurrectedEntryLastPlayTime(a0) { // fn#66689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:4755, offset: 0x01c05aaa, size: 112 bytes, params: 2, frame: 14
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const RESURRECTED = ContentInventoryTraitType.RESURRECTED;
const traitBinding = getTraitBinding(a0, RESURRECTED);
return (traitBinding == null ? value : traitBinding.resurrected_last_played) != null ? new global.Date(traitBinding.resurrected_last_played) : value;
}
function getFullResurrectedBadgeText(a0) { // fn#66690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:4993, offset: 0x01c05b1a, size: 234 bytes, params: 2, frame: 19
var object2;
const moduleValue = require(3381) /* metro dependency 3381 */;
const intervalToDuration = moduleValue.intervalToDuration;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
const value4 = Reflect.apply(intervalToDuration, moduleValue, [{start: a0,
end: date instanceof Object ? date : value2}]);
const months = value4.months;
const value5 = 0;
let r4 = months === undefined ? value5 : months;
const weeks = value4.weeks;
const r6 = weeks === undefined ? value5 : weeks;
const days = value4.days;
const r5 = days === undefined ? value5 : days;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const NXBtjF = (require(1244) /* metro dependency 1244: indexNative */).t.NXBtjF;
object2 = {months: r4};
object2.weeks = r4 > value5 ? value5 : r6;
r4 = r4 > value5 || r6 > value5 ? value5 : r5;
object2.days = r4;
return Reflect.apply(formatToPlainString, intl, [NXBtjF, object2]);
}
function getEpisodeBadgeText(a0) { // fn#66691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:5295, offset: 0x01c05c04, size: 142 bytes, params: 2, frame: 18
var r1;
var intl;
const value = null;
if (value == a0) {
return value;
}
if (a0 === '') {
return value;
}
const value2 = RegExp('\\w+ (\\d+), \\w+ (\\d+)', '').exec(a0);
if (value == value2) {
r1 = value;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r1 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ijVm6y,
{seasonNum: value2[1], episodeNum: value2[2]});
}
return r1;
}
function getRichGameStateBadgeText(a0, a1) { // fn#66692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:5528, offset: 0x01c05c92, size: 333 bytes, params: 3, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = a0;
const value2 = undefined;
const r8 = (a1 == null || a1.size == null ? value2 : a1.size[0]) ?? value2;
const r7 = (a1 == null || a1.size == null ? value2 : a1.size[1]) ?? value2;
const r5 = r8 == null || r7 == null ? r8 != null && r8 > 0 ? intl.formatToPlainString(t.UTYMsa,
{count: r8}) : value2 : r8 > 0 && r7 > 0 ? intl.formatToPlainString(t.wmUSiy, {count: r8,
max: r7}) : r8 != null && r8 > 0 ? intl.formatToPlainString(t.UTYMsa, {count: r8}) : value2;
return r5 == null ? value ?? r5 : value != null ? '' + value + ' (' + r5 + ')' : value ?? r5;
}
function isValidStreak(a0) { // fn#66694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:6086, offset: 0x01c05e13, size: 134 bytes, params: 2, frame: 14
var value;
const streakCount = getStreakCount(a0);
if (streakCount == null) {
return false;
}
if (streakCount < 3) {
return false;
}
value = Reflect.apply((importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp, value,
[a0.id]);
const Date = global.Date;
value = Date.now() - value;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const HOUR = Millis.HOUR;
return !(value > 48 * HOUR);
}
function getMarathonDescription(a0) { // fn#66695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:6280, offset: 0x01c05e99, size: 250 bytes, params: 2, frame: 20
var r0;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const entryDuration = getEntryDuration(a0);
if (entryDuration == null) {
return {'text': null, 'tooltipText': null};
}
const Math = global.Math;
const round = Math.round;
const Seconds = (importDefault(672) /* metro dependency 672: Durations */).Seconds;
const HOUR = Seconds.HOUR;
const value3 = Reflect.apply(round, Math, [entryDuration / HOUR]);
if (value3 <= 0) {
r0 = {'text': null, 'tooltipText': null};
} else {
object2 = {};
object2.text = intl.formatToPlainString(t.vZaMem, {hours: value3});
object2.tooltipText = intl.formatToPlainString(t.S5F485, {hours: value3});
r0 = object2;
}
return r0;
}
function getTrendingType(a0) { // fn#66696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8560:6629, offset: 0x01c05f93, size: 69 bytes, params: 2, frame: 13
const getTraitBinding = getTrait;
const value = undefined;
const ContentInventoryTraitType = (require(8376) /* metro dependency 8376: ContentInventoryTraitType */).ContentInventoryTraitType;
const TRENDING_CONTENT = ContentInventoryTraitType.TRENDING_CONTENT;
const traitBinding = getTraitBinding(a0, TRENDING_CONTENT);
return traitBinding == null ? value : traitBinding.trending;
}