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

+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();
}