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,314 @@
/* Metro module 5202; source: modules/games/GameActionCreators.tsx; dependencies: [5, 5199, 661, 507, 694, 4041, 22, 2] */
function _fun45934(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5380:6, offset: 0x0119b90d, size: 237 bytes, params: 8, frame: 19
const env0_0 = require;
const requestGames = function() {
return _requestGames.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const BatchInvocationManager = (require(4041) /* metro dependency 4041: Timers */).BatchInvocationManager;
const batchInvocationManager = new BatchInvocationManager(_fun45942(), function(a0) {
return !GameStore.hasNoData(a0);
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/GameActionCreators.tsx');
exports.fetchGamesWithSupplementalData = function() {
return _fetchGamesWithSupplementalData.apply(this, arguments);
};
}
function _requestGames() { // fn#45936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5380:203, offset: 0x0119b9fa, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun45938).apply(this, arguments);
}
function _fetchGamesWithSupplementalData() { // fn#45939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5380:798, offset: 0x0119bb1d, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun45941).apply(this, arguments);
}
function _fun45942() { // fn#45942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5380:582, offset: 0x0119bb92, size: 32 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun45944);
return _fun45945;
}
function* _fun45938(a0) { // fn#45938, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5380:252, offset: 0x0119ba33, size: 234 bytes, params: 2, frame: 18
var binding;
var binding2;
var property;
var value3;
var HTTP;
var get;
var object3;
var GAMES;
var object4;
var value4;
var value5;
var value6;
var body;
var binding3;
var value7;
var dispatch;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
HTTP = value3.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
GAMES = binding.GAMES;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3.url = GAMES;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object4.game_ids = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object4.with_supplemental_data = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3.query = object4;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
value4 = Reflect.apply(get, HTTP, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
if (value6) {
return value5;
}
try {
body = value5.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
property = binding3[4];
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
value7 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
dispatch = value7.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3.type = 'GAME_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3.gameIds = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
object3.games = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
return undefined;
}
try {
Reflect.apply(dispatch, value7, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[4]);
value.dispatch({type: 'GAME_FETCH_FAILURE', gameIds: a0});
}
}
}
function* _fun45941(a0) { // fn#45941, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5380:883, offset: 0x0119bb56, size: 60 bytes, params: 2, frame: 12
let value = undefined;
if (false) {
return value;
}
if (a0.length !== 0) {
value = environment.__proto__.__proto__;
var binding = env2_6;
yield binding.queue(a0);
value = undefined;
if (false) {
return value;
}
}
}
function* _fun45944(a0) { // fn#45944, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5380:602, offset: 0x0119bbbb, size: 144 bytes, params: 2, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[4]).dispatch({type: 'GAME_FETCH', gameIds: a0});
var Promise = global.Promise;
var all = Promise.all;
var value5 = binding(binding2[6]).chunk(a0, 20);
yield Reflect.apply(all, Promise, [value5.map(env2_7)]);
}
}
+306
View File
@@ -0,0 +1,306 @@
/* Metro module 5200; source: modules/games/GameRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4235, 1909, 1423, 5201, 2] */
function _fun45915(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:6, offset: 0x0119aef1, size: 241 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
const env0_9 = (require(4235) /* metro dependency 4235: ApplicationRecord */).createExecutable;
value = _fun45919(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/GameRecord.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_45916() { // fn#45916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:195, offset: 0x0119afe2, size: 94 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_45916_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45919(a0) { // fn#45919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:394, offset: 0x0119b040, size: 185 bytes, params: 2, frame: 16
const closure = GameRecord;
env0_7(closure, a0);
return env0_4(closure, [{key: 'applicationId', get: function() {
return this.id;
}}, {key: 'getOfficialApplicationId', value: function() {
var r0;
var value2;
var property = this.linkedApplications;
var value = undefined;
if (property == null) {
r0 = value;
} else {
value2 = property.find(_fun45923);
r0 = value2 == null ? value : value2.id;
}
return r0;
}}, {key: 'getIconURL', value: value_45924}, {key: 'getCoverURL', value: value_45925}, {key: 'getArtworkURLs',
value: value_45926}, {key: 'getCompanyByRole', value: function(a0) {
var r0;
var env0_0 = a0;
r0 = this.companies?.filter(_fun45928);
r0 = r0 ?? [];
return r0;
}}]);
}
function GameRecord({id, name, description, aliases, executables, overlay, overlay_warn, overlay_compatibility_hook, hook, overlay_methods, third_party_skus, themes, linked_applications, genres, platforms, websites, companies, icon_hash, cover_image_hash, banner_hash, screenshot_hashes, screenshot_urls, trailers, l30_rank, summary_localized, media, first_release_date, shop_collection_ids, steam_release_status, reviews, opencritic_url, game_flags, content_classification}) { // fn#45920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:406, offset: 0x0119b0f9, size: 933 bytes, params: 2, frame: 21
var r3;
var opencritic;
var r6;
var r5;
var object4;
var object5;
var object6;
const value = environment.__proto__;
env1_3(this, GameRecord);
const value4 = env1_6(GameRecord);
const value7 = env1_5(this, _isNativeReflectConstruct_45916() ? global.Reflect.construct(value4, [],
env1_6(this).constructor) : value4.apply(this, undefined));
value7.id = id;
value7.name = name;
value7.description = description;
value7.aliases = aliases ?? [];
const r7 = executables ?? [];
value7.executables = r7.map(createExecutable);
value7.overlay = overlay != null && overlay;
value7.overlayWarn = overlay_warn != null && overlay_warn;
value7.overlayCompatibilityHook = overlay_compatibility_hook != null && overlay_compatibility_hook;
value7.hook = hook == null || hook;
value7.supportsOutOfProcessOverlay = ApplicationRecord.supportsOutOfProcessOverlay(overlay_methods);
value7.thirdPartySkus = third_party_skus ?? [];
value7.themes = themes ?? [];
value7.linkedApplications = linked_applications;
value7.genres = genres ?? [];
value7.platforms = platforms ?? [];
value7.websites = websites ?? [];
value7.companies = companies;
value7.iconHash = icon_hash;
value7.coverImageHash = cover_image_hash;
value7.bannerHash = banner_hash;
value7.screenshotHashes = screenshot_hashes;
value7.screenshotUrls = screenshot_urls;
value7.trailers = trailers;
value7.l30Rank = l30_rank;
value7.summaryLocalized = summary_localized;
value7.media = media;
value7.firstReleaseDate = first_release_date;
value7.shopCollectionIds = shop_collection_ids;
value7.steamReleaseStatus = steam_release_status;
let steam = reviews?.steam;
if (steam != null) {
object4 = {};
steam = reviews.steam;
if (steam != null) {
object5 = {};
steam = reviews.steam;
object5.rating = steam.rating;
steam = reviews.steam;
object5.ratingCount = steam.rating_count;
steam = reviews.steam;
object5.recentRating = steam.recent_rating;
steam = reviews.steam;
object5.recentRatingCount = steam.recent_rating_count;
steam = reviews.steam;
object5.localizedRating = steam.localized_rating;
steam = reviews.steam;
object5.localizedRatingCount = steam.localized_rating_count;
r6 = object5;
} else {
r6 = undefined;
}
object4.steam = r6;
opencritic = reviews.opencritic;
if (opencritic != null) {
object6 = {};
opencritic = reviews.opencritic;
object6.topCriticRating = opencritic.top_critic_rating;
opencritic = reviews.opencritic;
object6.topCriticRatingCount = opencritic.top_critic_rating_count;
opencritic = reviews.opencritic;
object6.tier = opencritic.tier;
r5 = object6;
} else {
r5 = undefined;
}
object4.opencritic = r5;
r3 = object4;
} else {
opencritic = reviews?.opencritic;
if (opencritic != null) {
object4 = {};
steam = reviews.steam;
if (steam != null) {
object5 = {};
steam = reviews.steam;
object5.rating = steam.rating;
steam = reviews.steam;
object5.ratingCount = steam.rating_count;
steam = reviews.steam;
object5.recentRating = steam.recent_rating;
steam = reviews.steam;
object5.recentRatingCount = steam.recent_rating_count;
steam = reviews.steam;
object5.localizedRating = steam.localized_rating;
steam = reviews.steam;
object5.localizedRatingCount = steam.localized_rating_count;
r6 = object5;
} else {
r6 = undefined;
}
object4.steam = r6;
opencritic = reviews.opencritic;
if (opencritic != null) {
object6 = {};
opencritic = reviews.opencritic;
object6.topCriticRating = opencritic.top_critic_rating;
opencritic = reviews.opencritic;
object6.topCriticRatingCount = opencritic.top_critic_rating_count;
opencritic = reviews.opencritic;
object6.tier = opencritic.tier;
r5 = object6;
} else {
r5 = undefined;
}
object4.opencritic = r5;
r3 = object4;
} else {
r3 = undefined;
}
}
value7.reviews = r3;
value7.opencriticUrl = opencritic_url;
value7.gameFlags = game_flags ?? 0;
value7.contentClassification = content_classification;
return value7;
}
function value_45922() { // fn#45922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:2473, offset: 0x0119b49e, size: 54 bytes, params: 1, frame: 14
var id;
var value2;
const linkedApplications = this.linkedApplications;
const value = undefined;
if (linkedApplications == null) {
id = value;
} else {
value2 = linkedApplications.find(function({type}) {
return type === require(dependencyMap[7]).GameLinkTypes.OFFICIAL;
});
id = value2 == null ? value : value2.id;
}
return id;
}
function value_45924(a0, a1) { // fn#45924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:2633, offset: 0x0119b507, size: 124 bytes, params: 3, frame: 15
var r0;
var value2;
var gameAssetURL;
const iconHash = this.iconHash;
const value = null;
if (value == iconHash) {
r0 = value;
} else if (this.iconHash === '') {
r0 = value;
} else {
value2 = environment.__proto__;
gameAssetURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGameAssetURL({id: this.id,
hash: this.iconHash, size: a0, format: a1});
r0 = value != gameAssetURL ? gameAssetURL : value;
}
return r0;
}
function value_45925(a0) { // fn#45925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:2822, offset: 0x0119b583, size: 203 bytes, params: 2, frame: 20
var r1;
var r0;
var cover_url;
var value2;
var defaultImport;
var getGameAssetURL;
var object2;
var value5;
const media = this.media;
const value = null;
if (value == media) {
r0 = value;
} else {
if (value != this.media.cover_hash) {
value2 = environment.__proto__;
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
getGameAssetURL = defaultImport.getGameAssetURL;
object2 = {};
object2.id = this.id;
object2.hash = this.media.cover_hash;
object2.keepAspectRatio = true;
object2.format = (require(1423) /* metro dependency 1423: AvatarUtils */).SUPPORTS_WEBP ? 'webp' : 'png';
object2.size = a0;
value5 = Reflect.apply(getGameAssetURL, defaultImport, [object2]);
r1 = value != value5 ? value5 : value;
} else {
cover_url = this.media.cover_url;
r1 = value != cover_url ? cover_url : value;
}
r0 = r1;
}
return r0;
}
function value_45926() { // fn#45926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:3117, offset: 0x0119b64e, size: 90 bytes, params: 1, frame: 15
var r0;
var value;
var getArtworkUrls;
var id;
var artwork_hashes;
let media = this.media;
if (media == null) {
r0 = [];
} else {
value = environment.__proto__;
value = require(5201) /* metro dependency 5201: useGameArtworkUrls */;
getArtworkUrls = value.getArtworkUrls;
id = this.id;
media = this.media;
artwork_hashes = media.artwork_hashes;
media = this.media;
value = Reflect.apply(getArtworkUrls, value, [id, artwork_hashes, media.artwork_urls]);
r0 = value;
}
return r0;
}
function value_45927(a0) { // fn#45927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5378:3269, offset: 0x0119b6a8, size: 54 bytes, params: 2, frame: 13
const env0_0 = a0;
let r0 = this.companies?.filter(_fun45928);
r0 = r0 ?? [];
return r0;
}
+156
View File
@@ -0,0 +1,156 @@
/* Metro module 5199; source: modules/games/GameStore.tsx; dependencies: [6, 7, 15, 17, 18, 5200, 1471, 566, 694, 2] */
function _fun45895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:6, offset: 0x0119a988, size: 439 bytes, params: 8, frame: 19
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 gameRecord = importDefault(5200) /* metro dependency 5200: GameRecord */;
const Map = global.Map;
const map = new Map();
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
Set = global.Set;
set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun45899(Store).displayName = 'NewGameStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_45906,
GAME_FETCH: function({gameIds}) {
gameIds.forEach(_fun45908);
}, GAME_FETCH_SUCCESS: function({gameIds, games}) {
var Set = global.Set;
var value2 = new Set(gameIds);
var env0_0 = value2;
gameIds.forEach(_fun45910);
games.forEach(_fun45911);
value2.forEach(_fun45912);
}, GAME_FETCH_FAILURE: function({gameIds}) {
gameIds.forEach(_fun45914);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/GameStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_45896() { // fn#45896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:158, offset: 0x0119ab3f, size: 94 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_45896_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45899(a0) { // fn#45899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:401, offset: 0x0119ab9d, size: 164 bytes, params: 2, frame: 16
const closure = GameStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isFetching', value: value_45901}, {key: 'didFetchingFail', value: value_45902},
{key: 'getGame', value: value_45903}, {key: 'hasNoData', value: value_45904}, {key: 'getCoverImageUrl',
value: value_45905}]);
}
function LOGOUT_45906() { // fn#45906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1187, offset: 0x0119ace5, size: 129 bytes, params: 1, frame: 11
const Map = global.Map;
const map = new Map();
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
Set = global.Set;
set = new Set();
}
function GAME_FETCH({gameIds}) { // fn#45907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1263, offset: 0x0119ad66, size: 30 bytes, params: 2, frame: 11
gameIds.forEach(_fun45908);
}
function GAME_FETCH_SUCCESS({gameIds, games}) { // fn#45909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1356, offset: 0x0119adaa, size: 101 bytes, params: 2, frame: 14
const Set = global.Set;
const set = new Set(gameIds);
gameIds.forEach(_fun45910);
games.forEach(_fun45911);
set.forEach(_fun45912);
}
function GAME_FETCH_FAILURE({gameIds}) { // fn#45913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1575, offset: 0x0119aead, size: 30 bytes, params: 2, frame: 11
gameIds.forEach(_fun45914);
}
function value_45905(a0, a1) { // fn#45905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:899, offset: 0x0119ac57, size: 142 bytes, params: 3, frame: 17
var r2;
var searchParams;
let value = environment.__proto__;
const coverURL = env1_8.get(a0)?.getCoverURL();
if (coverURL == null) {
return null;
}
if (a1 == null) {
return coverURL;
}
value = importDefault(1471) /* metro dependency 1471: URLUtils */;
value = value.toURLSafe(coverURL);
if (value == null) {
r2 = coverURL;
} else {
searchParams = value.searchParams;
searchParams.set('size', a1.size.toString());
value = value.toString();
r2 = value;
}
return r2;
}
function _fun45908(a0) { // fn#45908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1308, offset: 0x0119ad84, size: 38 bytes, params: 2, frame: 12
env1_9.add(a0);
env1_10.delete(a0);
}
function _fun45910(a0) { // fn#45910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1433, offset: 0x0119ae0f, size: 38 bytes, params: 2, frame: 12
env1_9.delete(a0);
env1_10.delete(a0);
}
function _fun45911(a0) { // fn#45911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1475, offset: 0x0119ae35, size: 79 bytes, params: 2, frame: 15
let binding = env0_0;
binding.delete(a0.id);
const value = environment.__proto__;
binding = env1_8;
binding.set(a0.id, new GameRecord(a0));
}
function _fun45912(a0) { // fn#45912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1529, offset: 0x0119ae84, size: 41 bytes, params: 2, frame: 12
const binding = env1_8;
if (!binding.has(a0)) {
env1_11.add(a0);
}
}
function _fun45914(a0) { // fn#45914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5377:1627, offset: 0x0119aecb, size: 38 bytes, params: 2, frame: 12
env1_9.delete(a0);
env1_10.add(a0);
}
+85
View File
@@ -0,0 +1,85 @@
/* Metro module 5198; source: modules/games/hooks/useGame.tsx; dependencies: [5, 31, 5199, 661, 566, 5202, 2] */
function _fun45885(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:6, offset: 0x0119a6ee, size: 261 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(5) /* metro dependency 5 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const QueryIds = (require(661) /* metro dependency 661: Constants */).QueryIds;
const fluxModule = require(566) /* metro dependency 566: flux */;
const createFetchStore = fluxModule.createFetchStore;
object2 = {};
const GAME = QueryIds.GAME;
object2.getQueryId = GAME;
object2.get = get_45886;
const env0_2 = value(_fun45888);
object2.load = load_45889;
object2.getIsLoading = getIsLoading;
object2.getError = function(a0) {
var value = null;
return value != a0 && GameStore.didFetchingFail(a0) ? new global.Error('Failed to fetch game data') : value;
};
value = Reflect.apply(createFetchStore, fluxModule, [gameStore, object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/hooks/useGame.tsx');
exports.useGame = value;
exports.useGames = useGames;
}
function get_45886(a0) { // fn#45886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:199, offset: 0x0119a7f3, size: 97 bytes, params: 2, frame: 14
var r1;
var r0;
var game;
const value = null;
if (value == a0) {
r0 = value;
} else {
if (GameStore.hasNoData(a0)) {
r1 = (require(566) /* metro dependency 566: flux */).NO_DATA;
} else {
game = GameStore.getGame(a0);
r1 = value != game ? game : value;
}
r0 = r1;
}
return r0;
}
function* _fun45888(a0) { // fn#45888, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:302, offset: 0x0119a85d, size: 81 bytes, params: 2, frame: 13
let value = undefined;
if (false) {
return value;
}
if (a0 != null) {
value = environment.__proto__;
value = env1_0(env1_1[5]);
yield value.fetchGamesWithSupplementalData([a0]);
value = undefined;
if (false) {
return value;
}
}
}
function getIsLoading(a0) { // fn#45890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:436, offset: 0x0119a8ae, size: 32 bytes, params: 2, frame: 12
return a0 != null && GameStore.isFetching(a0);
}
function useGames(a0) { // fn#45892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:640, offset: 0x0119a919, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
env0_3.useEffect(_fun45893, [a0]);
}
function _fun45893() { // fn#45893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:674, offset: 0x0119a945, size: 67 bytes, params: 1, frame: 15
let binding = env0_0;
const value = binding.map(function(a0) {
return [a0];
});
binding = env1_5;
const fetchMany = binding.fetchMany;
const items2 = [];
arraySpread(items2, value, 0, undefined);
apply(fetchMany, items2, binding, undefined);
}
@@ -0,0 +1,81 @@
/* Metro module 5201; source: modules/games/hooks/useGameArtworkUrls.tsx; dependencies: [31, 1423, 1360, 2] */
function _fun45929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5379:6, offset: 0x0119b6fa, size: 136 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = getArtworkUrls;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/hooks/useGameArtworkUrls.tsx');
exports.getArtworkUrls = closure;
exports.useGameArtworkUrls = useGameArtworkUrls;
}
function getArtworkUrls(a0, a1, a2) { // fn#45930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5379:106, offset: 0x0119b782, size: 89 bytes, params: 4, frame: 14
var r0;
let value = a2;
const env0_0 = a0;
if (a1 != null) {
value = a1.map(_fun45931);
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
r0 = value;
} else {
r0 = value ?? [];
}
return r0;
}
function useGameArtworkUrls(a0) { // fn#45932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5379:393, offset: 0x0119b81c, size: 99 bytes, params: 2, frame: 19
const env0_0 = a0;
const binding = env0_3;
const useMemo = binding.useMemo;
const items2 = [a0.id];
let media = a0.media;
const value = undefined;
items2[1] = media == null ? value : media.artwork_hashes;
media = a0.media;
items2[2] = media == null ? value : media.artwork_urls;
return Reflect.apply(useMemo, binding, [_fun45933, items2]);
}
function _fun45931(a0) { // fn#45931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5379:159, offset: 0x0119b7db, size: 65 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGameAssetURL({id: env0_0, hash: a0,
keepAspectRatio: true});
}
function _fun45933() { // fn#45933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5379:450, offset: 0x0119b87f, size: 142 bytes, params: 1, frame: 18
var r0;
var value3;
var getArtworkUrlsBinding;
var binding;
var id;
let media = env0_0.media;
const value2 = undefined;
let artwork_hashes = media == null ? value2 : media.artwork_hashes;
if (artwork_hashes != null) {
value3 = environment.__proto__;
getArtworkUrlsBinding = getArtworkUrls;
binding = env0_0;
id = binding.id;
media = binding.media;
artwork_hashes = media == null ? value2 : media.artwork_hashes;
media = env0_0.media;
r0 = getArtworkUrlsBinding(id, artwork_hashes, media == null ? value2 : media.artwork_urls);
} else {
media = env0_0.media;
if ((media == null ? value2 : media.artwork_urls) == null) {
r0 = [];
} else {
value3 = environment.__proto__;
getArtworkUrlsBinding = getArtworkUrls;
binding = env0_0;
id = binding.id;
media = binding.media;
artwork_hashes = media == null ? value2 : media.artwork_hashes;
media = env0_0.media;
r0 = getArtworkUrlsBinding(id, artwork_hashes, media == null ? value2 : media.artwork_urls);
}
}
return r0;
}
@@ -0,0 +1,26 @@
/* Metro module 14577; source: modules/games/hooks/useGameNameAndCoverImage.tsx; dependencies: [5198, 1244, 2] */
function _fun110285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14774:6, offset: 0x02372ce2, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/hooks/useGameNameAndCoverImage.tsx');
exports.default = useGameNameAndCoverImage;
}
function useGameNameAndCoverImage(a0, a1, a2) { // fn#110286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14774:184, offset: 0x02372d42, size: 178 bytes, params: 4, frame: 18
var intl;
const value = a1;
const value3 = undefined;
const {data, isLoading} = (require(5198) /* metro dependency 5198: useGame */).useGame(a0);
const object2 = {};
object2.coverImageUrl = data == null ? value3 : data.getCoverURL(a2);
let r2 = (data == null ? value3 : data.name) ?? value;
if (r2 == null) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GIWFlF);
}
object2.gameName = r2;
object2.isLoading = isLoading;
return object2;
}
@@ -0,0 +1,28 @@
/* Metro module 9958; source: modules/games/hooks/useResolveGame.tsx; dependencies: [31, 6777, 5198, 2] */
function _fun77955(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10144:6, offset: 0x01e13da9, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/hooks/useResolveGame.tsx');
exports.default = useResolveGame;
}
function useResolveGame({applicationId, gameId}) { // fn#77956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10144:188, offset: 0x01e13e1b, size: 209 bytes, params: 2, frame: 20
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(gameId == null ? applicationId : undefined);
const value5 = env0_2.useMemo(_fun77957, [gameId, value4]);
value = require(5198) /* metro dependency 5198: useGame */;
value = value.useGame(value5);
const data = value.data;
const isLoading = value.isLoading;
let r1 = gameId == null && applicationId != null && value4 == null;
r1 = !r1 ? isLoading : r1;
return {gameId: value5, gameRecord: data ?? null, isLoading: r1};
}
function _fun77957() { // fn#77957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10144:310, offset: 0x01e13eec, size: 48 bytes, params: 1, frame: 11
const gameIdBinding = gameId;
const value2 = null;
return value2 != gameIdBinding ? gameId : value2 == env0_1 ? value2 : env0_1.getCanonicalGameId();
}