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

No files matched your search

@@ -1,40 +1,45 @@
/* Metro module 10016; source: modules/game_profile/hooks/useGameAnnouncements.tsx; dependencies: [31, 9965, 566, 10017, 2] */
import GameProfileStore from '../GameProfileStore.tsx'; /* Metro dependency 9965 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun78229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:6, offset: 0x01e21ecf, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useEffect;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameAnnouncements.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useGameAnnouncements.tsx');
exports.default = useGameAnnouncements;
}
function useGameAnnouncements(a0) { // fn#78230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:221, offset: 0x01e21f56, size: 190 bytes, params: 2, frame: 17
const env0_0 = a0;
const value2 = undefined;
const {data, hasFetched,
isFetching} = (FluxModule).useStateFromStoresObject([GameProfileStore],
_fun78231);
useEffect(_fun78232, [a0, hasFetched]);
return {messages: (data == null ? value2 : data.messages) ?? [], channelId: data == null ? value2 : data.channelId,
guildId: data == null ? value2 : data.guildId, loading: isFetching};
function _fun78231() { // fn#78231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:300, offset: 0x01e22014, size: 128 bytes, params: 1, frame: 15
const object = {};
object.data = env0_0 != null ? GameProfileStore.getAnnouncements(env0_0) : undefined;
object.hasFetched = env0_0 != null && GameProfileStore.hasAnnouncementsBeenFetched(env0_0);
object.isFetching = env0_0 != null && GameProfileStore.isAnnouncementsFetching(env0_0);
return object;
}
function useGameAnnouncements(a0) { // fn#78230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:221, offset: 0x01e21f56, size: 190 bytes, params: 2, frame: 17
const env0_0 = a0;
const value2 = undefined;
const {data, hasFetched,
isFetching} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameProfileStore],
_fun78231);
useEffect(_fun78232, [a0, hasFetched]);
return {messages: (data == null ? value2 : data.messages) ?? [], channelId: data == null ? value2 : data.channelId,
guildId: data == null ? value2 : data.guildId, loading: isFetching};
}
function _fun78232() { // fn#78232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:503, offset: 0x01e22094, size: 92 bytes, params: 1, frame: 13
var value4;
let r1 = env0_0 == null || hasFetched;
r1 = !r1 ? GameProfileStore.isAnnouncementsFetching(env0_0) : r1;
if (!r1) {
value4 = environment.__proto__;
(require(10017) /* metro dependency 10017: GameProfileHttpUtils */).getGameAnnouncements(env0_0);
}
}
function _fun78231() { // fn#78231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:300, offset: 0x01e22014, size: 128 bytes, params: 1, frame: 15
const object2 = {};
object2.data = env0_0 != null ? GameProfileStore.getAnnouncements(env0_0) : undefined;
object2.hasFetched = env0_0 != null && GameProfileStore.hasAnnouncementsBeenFetched(env0_0);
object2.isFetching = env0_0 != null && GameProfileStore.isAnnouncementsFetching(env0_0);
return object2;
}
function _fun78232() { // fn#78232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:503, offset: 0x01e22094, size: 92 bytes, params: 1, frame: 13
var value4;
let r1 = env0_0 == null || hasFetched;
r1 = !r1 ? GameProfileStore.isAnnouncementsFetching(env0_0) : r1;
if (!r1) {
value4 = environment.__proto__;
(require(10017) /* metro dependency 10017: GameProfileHttpUtils */).getGameAnnouncements(env0_0);
}
}
global.__d(_fun78229, 10016, [31, 9965, 566, 10017,
2]) /* metro module 10016, dependencies: [31, 9965, 566, 10017, 2] */;
@@ -1,60 +1,66 @@
/* Metro module 9998; source: modules/game_profile/hooks/useGameProfileOpenCritic.tsx; dependencies: [9999, 1244, 10000, 10001, 10002, 10003, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as OpenCriticTierModule from '../../../external/discord_common/js/shared/shared-constants/OpenCriticTier.tsx'; /* Metro dependency 9999 */
function _fun78153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:6, offset: 0x01e1d741, size: 129 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/game_profile/hooks/useGameProfileOpenCritic.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useGameProfileOpenCritic.tsx');
exports.getOpenCriticTierText = getOpenCriticTierText;
exports.getOpenCriticTierImage = getOpenCriticTierImage;
exports.getOpenCriticCircleRatingColor = getOpenCriticCircleRatingColor;
function getOpenCriticTierText(a0) { // fn#78154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:205, offset: 0x01e1d7c2, size: 386 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const OpenCriticTier = (OpenCriticTierModule).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
if (MIGHTY === a0) {
return intl.string(t.aZej2g);
}
const STRONG = OpenCriticTier.STRONG;
if (STRONG === a0) {
return intl.string(t.MLxnSg);
}
const FAIR = OpenCriticTier.FAIR;
if (FAIR === a0) {
return intl.string(t['3f19KA']);
}
const WEAK = OpenCriticTier.WEAK;
if (WEAK === a0) {
return intl.string(t.jtVgSh);
}
}
function getOpenCriticTierImage(a0) { // fn#78155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:595, offset: 0x01e1d944, size: 235 bytes, params: 2, frame: 14
const OpenCriticTier = (OpenCriticTierModule).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
if (MIGHTY === a0) {
return importDefault(10000) /* metro dependency 10000: opencriticMightyPng */;
}
const STRONG = OpenCriticTier.STRONG;
if (STRONG === a0) {
return importDefault(10001) /* metro dependency 10001: opencriticStrongPng */;
}
const FAIR = OpenCriticTier.FAIR;
if (FAIR === a0) {
return importDefault(10002) /* metro dependency 10002: opencriticFairPng */;
}
const WEAK = OpenCriticTier.WEAK;
if (WEAK === a0) {
return importDefault(10003) /* metro dependency 10003: opencriticWeakPng */;
}
}
function getOpenCriticCircleRatingColor(a0) { // fn#78156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:871, offset: 0x01e1da2f, size: 192 bytes, params: 2, frame: 15
const OpenCriticTier = (OpenCriticTierModule).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
return {foregroundColor: MIGHTY === a0 ? '#fc430a' : OpenCriticTier.STRONG === a0 ? '#9e00b4' : OpenCriticTier.FAIR === a0 ? '#4aa1ce' : OpenCriticTier.WEAK !== a0 ? '' : '#80b06a',
backgroundColor: '#2e2e2e'};
}
}
function getOpenCriticTierText(a0) { // fn#78154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:205, offset: 0x01e1d7c2, size: 386 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const OpenCriticTier = (require(9999) /* metro dependency 9999: OpenCriticTier */).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
if (MIGHTY === a0) {
return intl.string(t.aZej2g);
}
const STRONG = OpenCriticTier.STRONG;
if (STRONG === a0) {
return intl.string(t.MLxnSg);
}
const FAIR = OpenCriticTier.FAIR;
if (FAIR === a0) {
return intl.string(t['3f19KA']);
}
const WEAK = OpenCriticTier.WEAK;
if (WEAK === a0) {
return intl.string(t.jtVgSh);
}
}
function getOpenCriticTierImage(a0) { // fn#78155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:595, offset: 0x01e1d944, size: 235 bytes, params: 2, frame: 14
const OpenCriticTier = (require(9999) /* metro dependency 9999: OpenCriticTier */).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
if (MIGHTY === a0) {
return importDefault(10000) /* metro dependency 10000: opencriticMightyPng */;
}
const STRONG = OpenCriticTier.STRONG;
if (STRONG === a0) {
return importDefault(10001) /* metro dependency 10001: opencriticStrongPng */;
}
const FAIR = OpenCriticTier.FAIR;
if (FAIR === a0) {
return importDefault(10002) /* metro dependency 10002: opencriticFairPng */;
}
const WEAK = OpenCriticTier.WEAK;
if (WEAK === a0) {
return importDefault(10003) /* metro dependency 10003: opencriticWeakPng */;
}
}
function getOpenCriticCircleRatingColor(a0) { // fn#78156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10184:871, offset: 0x01e1da2f, size: 192 bytes, params: 2, frame: 15
const OpenCriticTier = (require(9999) /* metro dependency 9999: OpenCriticTier */).OpenCriticTier;
const MIGHTY = OpenCriticTier.MIGHTY;
return {foregroundColor: MIGHTY === a0 ? '#fc430a' : OpenCriticTier.STRONG === a0 ? '#9e00b4' : OpenCriticTier.FAIR === a0 ? '#4aa1ce' : OpenCriticTier.WEAK !== a0 ? '' : '#80b06a',
backgroundColor: '#2e2e2e'};
}
global.__d(_fun78153, 9998, [9999, 1244, 10000, 10001, 10002, 10003,
2]) /* metro module 9998, dependencies: [9999, 1244, 10000, 10001, 10002, 10003, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 10156; source: modules/game_profile/hooks/useGameProfileShopCollection.tsx; dependencies: [31, 9965, 566, 10017, 2] */
import GameProfileStore from '../GameProfileStore.tsx'; /* Metro dependency 9965 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun79138(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:6, offset: 0x01e4648e, size: 135 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useEffect;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameProfileShopCollection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useGameProfileShopCollection.tsx');
exports.useGameProfileShopCollection = function(a0) {
var env0_0 = a0;
var value2 = require(dependencyMap[2]).useStateFromStoresObject([GameProfileStore], _fun79140);
@@ -15,31 +18,33 @@ function _fun79138(global, require, importDefault, importAll, module, exports, d
useEffect(_fun79141, [a0, hasFetched]);
return skuIds ?? [];
};
}
function useGameProfileShopCollection(a0) { // fn#79139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:250, offset: 0x01e46515, size: 122 bytes, params: 2, frame: 17
const env0_0 = a0;
const {hasFetched,
skuIds} = (FluxModule).useStateFromStoresObject([GameProfileStore],
_fun79140);
useEffect(_fun79141, [a0, hasFetched]);
return skuIds ?? [];
function _fun79140() { // fn#79140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:335, offset: 0x01e4658f, size: 91 bytes, params: 1, frame: 15
const object = {};
object.hasFetched = env0_0 != null && GameProfileStore.hasShopCollectionBeenFetched(env0_0);
object.skuIds = env0_0 != null ? GameProfileStore.getShopCollectionSkuIds(env0_0) : undefined;
return object;
}
function useGameProfileShopCollection(a0) { // fn#79139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:250, offset: 0x01e46515, size: 122 bytes, params: 2, frame: 17
const env0_0 = a0;
const {hasFetched,
skuIds} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameProfileStore],
_fun79140);
useEffect(_fun79141, [a0, hasFetched]);
return skuIds ?? [];
}
function _fun79141() { // fn#79141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:486, offset: 0x01e465ea, size: 94 bytes, params: 1, frame: 13
var value4;
let r1 = env0_0 == null || hasFetched;
r1 = !r1 ? GameProfileStore.isShopCollectionFetching(env0_0) : r1;
if (!r1) {
value4 = environment.__proto__;
(require(10017) /* metro dependency 10017: GameProfileHttpUtils */).getShopCollection(env0_0);
}
}
function _fun79140() { // fn#79140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:335, offset: 0x01e4658f, size: 91 bytes, params: 1, frame: 15
const object2 = {};
object2.hasFetched = env0_0 != null && GameProfileStore.hasShopCollectionBeenFetched(env0_0);
object2.skuIds = env0_0 != null ? GameProfileStore.getShopCollectionSkuIds(env0_0) : undefined;
return object2;
}
function _fun79141() { // fn#79141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10342:486, offset: 0x01e465ea, size: 94 bytes, params: 1, frame: 13
var value4;
let r1 = env0_0 == null || hasFetched;
r1 = !r1 ? GameProfileStore.isShopCollectionFetching(env0_0) : r1;
if (!r1) {
value4 = environment.__proto__;
(require(10017) /* metro dependency 10017: GameProfileHttpUtils */).getShopCollection(env0_0);
}
}
global.__d(_fun79138, 10156, [31, 9965, 566, 10017,
2]) /* metro module 10156, dependencies: [31, 9965, 566, 10017, 2] */;
@@ -1,93 +1,100 @@
/* Metro module 9966; source: modules/game_profile/hooks/useGameProfileStoreWebsites.tsx; dependencies: [31, 9967, 9968, 9970, 9969, 2] */
import UseXboxGamePassStoreUrl from './useXboxGamePassStoreUrl.tsx'; /* Metro dependency 9970 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ThirdPartyGameApplicationWebsiteCategoryModule from '../../../external/discord_common/js/shared/shared-constants/ThirdPartyGameApplicationWebsiteCategory.tsx'; /* Metro dependency 9967 */
import * as UseSteamWebsiteUrlModule from './useSteamWebsiteUrl.tsx'; /* Metro dependency 9968 */
import * as SteamReleaseStatusModule from '../../../external/discord_common/js/shared/shared-constants/SteamReleaseStatus.tsx'; /* Metro dependency 9969 */
function _fun78040(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:6, offset: 0x01e1667c, size: 322 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const Set = global.Set;
const set = new Set(['1402418703554842694', '356877880938070016']);
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const ThirdPartyGameApplicationWebsiteCategory = (ThirdPartyGameApplicationWebsiteCategoryModule).ThirdPartyGameApplicationWebsiteCategory;
const EPICGAMES = ThirdPartyGameApplicationWebsiteCategory.EPICGAMES;
items = [EPICGAMES];
items2 = [EPICGAMES];
const STEAM = ThirdPartyGameApplicationWebsiteCategory.STEAM;
items[1] = STEAM;
items2[1] = STEAM;
const ROBLOX = ThirdPartyGameApplicationWebsiteCategory.ROBLOX;
items[2] = ROBLOX;
items2[2] = ROBLOX;
const BATTLENET = ThirdPartyGameApplicationWebsiteCategory.BATTLENET;
items[3] = BATTLENET;
items2[3] = BATTLENET;
const RIOT = ThirdPartyGameApplicationWebsiteCategory.RIOT;
items[4] = RIOT;
items2[4] = RIOT;
const MINECRAFT = ThirdPartyGameApplicationWebsiteCategory.MINECRAFT;
items[5] = MINECRAFT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameProfileStoreWebsites.tsx');
items2[5] = MINECRAFT;
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useGameProfileStoreWebsites.tsx');
exports.useGameProfileStoreWebsites = useGameProfileStoreWebsites;
}
function useGameProfileStoreWebsites(a0) { // fn#78041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:632, offset: 0x01e167be, size: 194 bytes, params: 2, frame: 19
const value2 = undefined;
const useSteamWebsiteUrl = UseSteamWebsiteUrlModule.useSteamWebsiteUrl;
let id = a0 == null ? value2 : a0.id;
const value3 = Reflect.apply(useSteamWebsiteUrl, UseSteamWebsiteUrlModule, [id]);
const value4 = (UseXboxGamePassStoreUrl)(a0);
id = a0 == null ? value2 : a0.id;
const websites = a0 == null ? value2 : a0.websites;
return websites.useMemo(_fun78042, [value3, websites, id, a0 == null ? value2 : a0.steamReleaseStatus, value4]);
function _fun78042() { // fn#78042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:845, offset: 0x01e16880, size: 281 bytes, params: 1, frame: 18
var environment;
const SteamReleaseStatus = (SteamReleaseStatusModule).SteamReleaseStatus;
var push;
var value8;
const ThirdPartyGameApplicationWebsiteCategory = (ThirdPartyGameApplicationWebsiteCategoryModule).ThirdPartyGameApplicationWebsiteCategory;
if (websites == null) {
if (env0_1 == null) {
return [];
}
}
if (id == null) {
return [];
}
let r4 = websites?.filter(_fun78043);
r4 = r4 ?? [];
let r1 = env0_0 == null || steamReleaseStatus === SteamReleaseStatus.RETIRED_ABANDONED;
r1 = !r1 ? r4.some(function({category}) {
return category === require(dependencyMap[1]).ThirdPartyGameApplicationWebsiteCategory.STEAM;
}) : r1;
if (!r1) {
push = r4.push;
value8 = environment.__proto__;
Reflect.apply(push, r4, [{category: ThirdPartyGameApplicationWebsiteCategory.STEAM, url: env0_0}]);
}
const value9 = r4.sort(_fun78045);
if (env0_1 != null) {
value9.unshift({category: 'XBOX_GAME_PASS', url: env0_1});
}
return value9;
function _fun78043(a0) { // fn#78043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:934, offset: 0x01e16999, size: 193 bytes, params: 2, frame: 17
var r0;
const category = a0.category;
const value = environment.__proto__.__proto__;
const ThirdPartyGameApplicationWebsiteCategory = (ThirdPartyGameApplicationWebsiteCategoryModule).ThirdPartyGameApplicationWebsiteCategory;
const EPICGAMES = ThirdPartyGameApplicationWebsiteCategory.EPICGAMES;
let r1 = category === EPICGAMES && !env2_4.has(id);
if (r1) {
r0 = !r1;
} else {
r1 = a0.category !== ThirdPartyGameApplicationWebsiteCategory.STEAM || steamReleaseStatus !== (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus.RETIRED_ABANDONED;
r1 = r1 && env2_5.includes(a0.category);
r0 = r1;
}
return r0;
}
function useGameProfileStoreWebsites(a0) { // fn#78041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:632, offset: 0x01e167be, size: 194 bytes, params: 2, frame: 19
const value2 = undefined;
const useSteamWebsiteUrlModule = require(9968) /* metro dependency 9968: useSteamWebsiteUrl */;
const useSteamWebsiteUrl = useSteamWebsiteUrlModule.useSteamWebsiteUrl;
let id = a0 == null ? value2 : a0.id;
const value3 = Reflect.apply(useSteamWebsiteUrl, useSteamWebsiteUrlModule, [id]);
const value4 = (importDefault(9970) /* metro dependency 9970: useXboxGamePassStoreUrl */)(a0);
id = a0 == null ? value2 : a0.id;
const websites = a0 == null ? value2 : a0.websites;
return websites.useMemo(_fun78042, [value3, websites, id, a0 == null ? value2 : a0.steamReleaseStatus, value4]);
}
function _fun78045({category}, a1) { // fn#78045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:1413, offset: 0x01e16a8d, size: 106 bytes, params: 3, frame: 14
const value = environment.__proto__.__proto__;
const ThirdPartyGameApplicationWebsiteCategory = (ThirdPartyGameApplicationWebsiteCategoryModule).ThirdPartyGameApplicationWebsiteCategory;
const STEAM = ThirdPartyGameApplicationWebsiteCategory.STEAM;
return category === STEAM ? -1 : a1.category !== ThirdPartyGameApplicationWebsiteCategory.STEAM ? 0 : 1;
}
function _fun78042() { // fn#78042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:845, offset: 0x01e16880, size: 281 bytes, params: 1, frame: 18
var environment;
const SteamReleaseStatus = (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus;
var push;
var value8;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
if (websites == null) {
if (env0_1 == null) {
return [];
}
}
if (id == null) {
return [];
}
let r4 = websites?.filter(_fun78043);
r4 = r4 ?? [];
let r1 = env0_0 == null || steamReleaseStatus === SteamReleaseStatus.RETIRED_ABANDONED;
r1 = !r1 ? r4.some(function({category}) {
return category === require(dependencyMap[1]).ThirdPartyGameApplicationWebsiteCategory.STEAM;
}) : r1;
if (!r1) {
push = r4.push;
value8 = environment.__proto__;
Reflect.apply(push, r4, [{category: ThirdPartyGameApplicationWebsiteCategory.STEAM, url: env0_0}]);
}
const value9 = r4.sort(_fun78045);
if (env0_1 != null) {
value9.unshift({category: 'XBOX_GAME_PASS', url: env0_1});
}
return value9;
}
function _fun78043(a0) { // fn#78043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:934, offset: 0x01e16999, size: 193 bytes, params: 2, frame: 17
var r0;
const category = a0.category;
const value = environment.__proto__.__proto__;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const EPICGAMES = ThirdPartyGameApplicationWebsiteCategory.EPICGAMES;
let r1 = category === EPICGAMES && !env2_4.has(id);
if (r1) {
r0 = !r1;
} else {
r1 = a0.category !== ThirdPartyGameApplicationWebsiteCategory.STEAM || steamReleaseStatus !== (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus.RETIRED_ABANDONED;
r1 = r1 && env2_5.includes(a0.category);
r0 = r1;
}
return r0;
}
function _fun78045({category}, a1) { // fn#78045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10152:1413, offset: 0x01e16a8d, size: 106 bytes, params: 3, frame: 14
const value = environment.__proto__.__proto__;
const ThirdPartyGameApplicationWebsiteCategory = (require(9967) /* metro dependency 9967: ThirdPartyGameApplicationWebsiteCategory */).ThirdPartyGameApplicationWebsiteCategory;
const STEAM = ThirdPartyGameApplicationWebsiteCategory.STEAM;
return category === STEAM ? -1 : a1.category !== ThirdPartyGameApplicationWebsiteCategory.STEAM ? 0 : 1;
}
global.__d(_fun78040, 9966, [31, 9967, 9968, 9970, 9969,
2]) /* metro module 9966, dependencies: [31, 9967, 9968, 9970, 9969, 2] */;
@@ -1,205 +1,216 @@
/* Metro module 9961; source: modules/game_profile/hooks/useOpenExternalUrlFromGameProfile.tsx; dependencies: [57, 5, 31, 6871, 9962, 3847, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun77987(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:6, offset: 0x01e150fd, size: 208 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 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_7 = RegExp('^\\/app\\/(\\d+)(?:\\/)?', '');
const env0_8 = RegExp('^\\/games\\/store\\/title\\/([^/]+)', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useOpenExternalUrlFromGameProfile.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useOpenExternalUrlFromGameProfile.tsx');
exports.default = useOpenExternalUrlFromGameProfile;
}
function _getDeepLinkUrl() { // fn#77988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:197, offset: 0x01e151cd, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun77990).apply(this, arguments);
}
function useOpenExternalUrlFromGameProfile(a0) { // fn#77991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:838, offset: 0x01e1537f, size: 100 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_5;
const value = env0_3(binding.useState(false), 2);
const property = value[0];
const env0_2 = value[1];
return binding.useCallback(_fun77992(), [a0, property]);
}
function* _fun77990(a0) { // fn#77990, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:250, offset: 0x01e1520a, size: 373 bytes, params: 2, frame: 22
var r6;
var r8;
var binding;
var isProtocolRegistered;
var value7;
var value8;
var binding2;
var value9;
var value10;
var value12;
let value = undefined;
if (false) {
return value;
}
let hostname = a0.hostname;
if (hostname !== 'store.steampowered.com') {
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
} else {
value = environment.__proto__.__proto__;
binding = env2_1;
var value3 = undefined;
var value4 = binding(env2_2[3]);
isProtocolRegistered = value4.isProtocolRegistered;
yield Reflect.apply(isProtocolRegistered, value4, [env2_6]);
var value5 = undefined;
if (false) {
return value5;
}
if (value5) {
value7 = a0.pathname.match(env2_7);
r6 = value7 == null ? value3 : value7[1];
if (r6 != null) {
return '' + env2_6 + '://store/' + r6;
}
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
function _getDeepLinkUrl() { // fn#77988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:197, offset: 0x01e151cd, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun77990).apply(this, arguments);
function* _fun77990(a0) { // fn#77990, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:250, offset: 0x01e1520a, size: 373 bytes, params: 2, frame: 22
var r6;
var r8;
var binding;
var isProtocolRegistered;
var value7;
var value8;
var binding2;
var value9;
var value10;
var value12;
let value = undefined;
if (false) {
return value10;
return value;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
let hostname = a0.hostname;
if (hostname !== 'store.steampowered.com') {
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
return null;
}
return null;
}
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
}
return null;
}
function _fun77992() { // fn#77992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:949, offset: 0x01e153e3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun77994);
return _fun77999;
}
function* _fun77994(a0) { // fn#77994, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:969, offset: 0x01e15412, size: 252 bytes, params: 2, frame: 21
var environment;
var URL;
var prototype;
var value3;
var uRL;
var value4;
var error;
if (true) {
value = null;
if (value != a0) {
try {
URL = global.URL;
prototype = URL.prototype;
value3 = Object.create(prototype, {constructor: {value: URL}});
uRL = new URL(a0);
value4 = uRL instanceof Object ? uRL : value3;
} catch (error) {
return undefined;
}
yield getDeepLinkUrl(value4);
var value5 = undefined;
if (false) {
return value5;
}
var r6 = value != value5 && importDefault ? value : value5;
value4.searchParams.set('utm_source', 'discord');
var value9 = value4.toString();
if (value != require) {
require(value9);
} else if (value != r6) {
openDeepLink(r6, dependencyMap);
} else {
value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[5])(value9);
value = environment.__proto__.__proto__;
binding = env2_1;
var value3 = undefined;
var value4 = binding(env2_2[3]);
isProtocolRegistered = value4.isProtocolRegistered;
yield Reflect.apply(isProtocolRegistered, value4, [env2_6]);
var value5 = undefined;
if (false) {
return value5;
}
if (value5) {
value7 = a0.pathname.match(env2_7);
r6 = value7 == null ? value3 : value7[1];
if (r6 != null) {
return '' + env2_6 + '://store/' + r6;
}
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
return null;
}
hostname = a0.hostname;
value = environment.__proto__.__proto__;
binding = env2_0;
value8 = undefined;
if (hostname !== binding(env2_2[4]).XBOX_GAME_PASS_STORE_HOSTNAME) {
return null;
}
binding = env2_1;
binding2 = env2_2;
value9 = binding(binding2[3]);
isProtocolRegistered = value9.isProtocolRegistered;
binding = env2_0;
yield Reflect.apply(isProtocolRegistered, value9, [binding(binding2[4]).XBOX_GAME_PASS_PROTOCOL]);
value10 = undefined;
if (false) {
return value10;
}
if (value10) {
value12 = a0.pathname.match(env2_8);
r8 = value12 == null ? value8 : value12[1];
if (r8 != null) {
value = env2_0(env2_2[4]);
return value.buildXboxGamePassStoreDeepLinkUrl(global.decodeURIComponent(r8));
}
return null;
}
}
return null;
}
}
function useOpenExternalUrlFromGameProfile(a0) { // fn#77991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:838, offset: 0x01e1537f, size: 100 bytes, params: 2, frame: 16
const env0_0 = a0;
const value = Module00057(ReactModule.useState(false), 2);
const property = value[0];
const env0_2 = value[1];
return ReactModule.useCallback(_fun77992(), [a0, property]);
function _fun77992() { // fn#77992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:949, offset: 0x01e153e3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun77994);
return _fun77999;
function* _fun77994(a0) { // fn#77994, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:969, offset: 0x01e15412, size: 252 bytes, params: 2, frame: 21
var environment;
var URL;
var prototype;
var value3;
var uRL;
var value4;
var error;
if (true) {
value = null;
if (value != a0) {
try {
URL = global.URL;
prototype = URL.prototype;
value3 = Object.create(prototype, {constructor: {value: URL}});
uRL = new URL(a0);
value4 = uRL instanceof Object ? uRL : value3;
} catch (error) {
return undefined;
}
yield getDeepLinkUrl(value4);
var value5 = undefined;
if (false) {
return value5;
}
var r6 = value != value5 && importDefault ? value : value5;
value4.searchParams.set('utm_source', 'discord');
var value9 = value4.toString();
if (value != require) {
require(value9);
} else if (value != r6) {
openDeepLink(r6, dependencyMap);
} else {
value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[5])(value9);
}
}
}
function getDeepLinkUrl() { // fn#77995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1045, offset: 0x01e1550e, size: 30 bytes, params: 1, frame: 13
return env4_9.apply(this, arguments);
}
function openDeepLink(a0, a1) { // fn#77996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1220, offset: 0x01e1552c, size: 114 bytes, params: 3, frame: 16
var environment;
const env0_0 = a1;
const env0_1 = global.setTimeout(function() {
return require(true);
}, 5000);
global.window.addEventListener('blur', _fun77998, {once: true});
const value = environment.__proto__.__proto__.__proto__.__proto__;
env4_1(env4_2[5])(a0);
function _fun77998() { // fn#77998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1313, offset: 0x0133d844, size: 24 bytes, params: 1, frame: 11
return global.clearTimeout(env0_1);
}
}
}
function _fun77999() { // fn#77999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1384, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
}
function getDeepLinkUrl() { // fn#77995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1045, offset: 0x01e1550e, size: 30 bytes, params: 1, frame: 13
return env4_9.apply(this, arguments);
}
function openDeepLink(a0, a1) { // fn#77996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10147:1220, offset: 0x01e1552c, size: 114 bytes, params: 3, frame: 16
var environment;
const env0_0 = a1;
const env0_1 = global.setTimeout(function() {
return require(true);
}, 5000);
global.window.addEventListener('blur', _fun77998, {once: true});
const value = environment.__proto__.__proto__.__proto__.__proto__;
env4_1(env4_2[5])(a0);
}
global.__d(_fun77987, 9961, [57, 5, 31, 6871, 9962, 3847,
2]) /* metro module 9961, dependencies: [57, 5, 31, 6871, 9962, 3847, 2] */;
@@ -1,37 +1,40 @@
/* Metro module 9953; source: modules/game_profile/hooks/useOpenGameProfileModal.tsx; dependencies: [9954, 9959, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun77942(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:6, offset: 0x01e1348e, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useOpenGameProfileModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useOpenGameProfileModal.tsx');
exports.default = useOpenGameProfileModal;
function useOpenGameProfileModal(a0) { // fn#77943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:193, offset: 0x01e134f1, size: 112 bytes, params: 2, frame: 14
let value = a1;
const env0_0 = a0;
const value2 = undefined;
const env0_1 = (value !== value2 ? value : {}).onOpened;
value = (importDefault(9954) /* metro dependency 9954: useShouldOpenGameProfileModal */)(a0);
return value.shouldOpenGameProfile && value.gameId != null ? _fun77944 : value2;
function _fun77944(a0) { // fn#77944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:313, offset: 0x01e13561, size: 129 bytes, params: 2, frame: 17
if (a0 != null) {
a0.stopPropagation();
}
if (a0 != null) {
a0.preventDefault();
}
let value = environment.__proto__;
value = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
const openGameProfileModal = value.openGameProfileModal;
const object = {};
copyDataProperties(object, env0_0, undefined);
object['gameId'] = gameId;
object['gameProfileModalChecks'] = env0_2;
Reflect.apply(openGameProfileModal, value, [object]);
if (onOpened != null) {
onOpened();
}
}
}
}
function useOpenGameProfileModal(a0) { // fn#77943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:193, offset: 0x01e134f1, size: 112 bytes, params: 2, frame: 14
let value = a1;
const env0_0 = a0;
const value2 = undefined;
const env0_1 = (value !== value2 ? value : {}).onOpened;
value = (importDefault(9954) /* metro dependency 9954: useShouldOpenGameProfileModal */)(a0);
return value.shouldOpenGameProfile && value.gameId != null ? _fun77944 : value2;
}
function _fun77944(a0) { // fn#77944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10139:313, offset: 0x01e13561, size: 129 bytes, params: 2, frame: 17
if (a0 != null) {
a0.stopPropagation();
}
if (a0 != null) {
a0.preventDefault();
}
let value = environment.__proto__;
value = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
const openGameProfileModal = value.openGameProfileModal;
const object2 = {};
copyDataProperties(object2, env0_0, undefined);
object2['gameId'] = gameId;
object2['gameProfileModalChecks'] = env0_2;
Reflect.apply(openGameProfileModal, value, [object2]);
if (onOpened != null) {
onOpened();
}
}
global.__d(_fun77942, 9953, [9954, 9959, 2]) /* metro module 9953, dependencies: [9954, 9959, 2] */;
@@ -1,76 +1,80 @@
/* Metro module 11890; source: modules/game_profile/hooks/usePendingGameProfileReturn.tsx; dependencies: [31, 5199, 9965, 661, 566, 9959, 9963, 1423, 2] */
import GameStore from '../../games/GameStore.tsx'; /* Metro dependency 5199 */
import GameProfileStore from '../GameProfileStore.tsx'; /* Metro dependency 9965 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun91268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:6, offset: 0x02059a12, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AVATAR_SIZE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/usePendingGameProfileReturn.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/usePendingGameProfileReturn.tsx');
exports.default = usePendingGameProfileReturn;
}
function usePendingGameProfileReturn({channelId}) { // fn#91269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:250, offset: 0x02059ac1, size: 347 bytes, params: 2, frame: 19
const value3 = (FluxModule).useStateFromStores([GameProfileStore], _fun91270);
const value4 = ReactModule.useCallback(_fun91271, [value3]);
const value5 = (FluxModule).useStateFromStores([GameStore], _fun91272);
ReactModule.useEffect(_fun91273, [value5?.id]);
const name = value5?.name;
if (value5 == null) {
return null;
}
if (name == null) {
return null;
}
return {gameId: value5.id, gameName: name,
gameIconUrl: value5?.iconHash != null ? value5.iconHash === '' ? undefined : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGameAssetURL({id: value5.id,
hash: value5.iconHash, size: AVATAR_SIZE}) : undefined, onReturnToGameProfile: value4};
function _fun91270() { // fn#91270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:340, offset: 0x02059c1c, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = GameProfileStore.getPendingReturn();
const value2 = null;
return value2 == value || value.channelId !== channelId ? value2 : value;
}
function _fun91271() { // fn#91271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:431, offset: 0x02059c4f, size: 113 bytes, params: 1, frame: 16
var value2;
var defaultImport;
var returnToGameProfile;
var object;
var binding;
if (env0_1 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
returnToGameProfile = defaultImport.returnToGameProfile;
object = {};
binding = env0_1;
object.gameId = binding.gameId;
object.source = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileSources.AnnouncementChannelReturn;
object.initialScrollOffset = binding.initialScrollOffset;
Reflect.apply(returnToGameProfile, defaultImport, [object]);
}
}
function _fun91272() { // fn#91272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:635, offset: 0x02059cc0, size: 67 bytes, params: 1, frame: 12
const value2 = null;
return value2 != (value2 == env0_1 ? undefined : env0_1.gameId) ? GameStore.getGame(env0_1.gameId) : value2;
}
function _fun91273() { // fn#91273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:711, offset: 0x02059d03, size: 46 bytes, params: 1, frame: 5
const value2 = undefined;
if ((env0_2 == null ? value2 : env0_2.id) != null) {
return _fun91274;
}
return value2;
function _fun91274() { // fn#91274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:753, offset: 0x02059d31, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
return value.clearGameProfilePendingReturn(env1_2.id);
}
}
function usePendingGameProfileReturn({channelId}) { // fn#91269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:250, offset: 0x02059ac1, size: 347 bytes, params: 2, frame: 19
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameProfileStore], _fun91270);
const binding = env0_3;
const value4 = binding.useCallback(_fun91271, [value3]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameStore], _fun91272);
binding.useEffect(_fun91273, [value5?.id]);
const name = value5?.name;
if (value5 == null) {
return null;
}
if (name == null) {
return null;
}
return {gameId: value5.id, gameName: name,
gameIconUrl: value5?.iconHash != null ? value5.iconHash === '' ? undefined : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGameAssetURL({id: value5.id,
hash: value5.iconHash, size: AVATAR_SIZE}) : undefined, onReturnToGameProfile: value4};
}
function _fun91270() { // fn#91270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:340, offset: 0x02059c1c, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = GameProfileStore.getPendingReturn();
const value2 = null;
return value2 == value || value.channelId !== channelId ? value2 : value;
}
function _fun91271() { // fn#91271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:431, offset: 0x02059c4f, size: 113 bytes, params: 1, frame: 16
var value2;
var defaultImport;
var returnToGameProfile;
var object2;
var binding;
if (env0_1 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
returnToGameProfile = defaultImport.returnToGameProfile;
object2 = {};
binding = env0_1;
object2.gameId = binding.gameId;
object2.source = (require(9963) /* metro dependency 9963: GameProfileAnalyticUtils */).GameProfileSources.AnnouncementChannelReturn;
object2.initialScrollOffset = binding.initialScrollOffset;
Reflect.apply(returnToGameProfile, defaultImport, [object2]);
}
}
function _fun91272() { // fn#91272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:635, offset: 0x02059cc0, size: 67 bytes, params: 1, frame: 12
const value2 = null;
return value2 != (value2 == env0_1 ? undefined : env0_1.gameId) ? GameStore.getGame(env0_1.gameId) : value2;
}
function _fun91273() { // fn#91273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:711, offset: 0x02059d03, size: 46 bytes, params: 1, frame: 5
const value2 = undefined;
if ((env0_2 == null ? value2 : env0_2.id) != null) {
return _fun91274;
}
return value2;
}
function _fun91274() { // fn#91274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12076:753, offset: 0x02059d31, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = importDefault(9959) /* metro dependency 9959: GameProfileActionCreatorsNative */;
return value.clearGameProfilePendingReturn(env1_2.id);
}
global.__d(_fun91268, 11890, [31, 5199, 9965, 661, 566, 9959, 9963, 1423,
2]) /* metro module 11890, dependencies: [31, 5199, 9965, 661, 566, 9959, 9963, 1423, 2] */;
@@ -1,44 +1,49 @@
/* Metro module 9957; source: modules/game_profile/hooks/useResolveGameForProfile.tsx; dependencies: [6777, 4483, 9958, 4484, 5198, 2] */
import UseResolveGame from '../../games/hooks/useResolveGame.tsx'; /* Metro dependency 9958 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseGameModule from '../../games/hooks/useGame.tsx'; /* Metro dependency 5198 */
import * as UseGetOrFetchApplicationsModule from '../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
function _fun77953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10143:6, offset: 0x01e13be2, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useResolveGameForProfile.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useResolveGameForProfile.tsx');
exports.default = useResolveGameForProfile;
function useResolveGameForProfile({applicationId, gameId}) { // fn#77954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10143:191, offset: 0x01e13c49, size: 352 bytes, params: 2, frame: 19
var r1;
var moduleValue3;
const useGetOrFetchApplication = UseGetOrFetchApplicationsModule.useGetOrFetchApplication;
let r0 = gameId == null ? applicationId : undefined;
const value4 = Reflect.apply(useGetOrFetchApplication, UseGetOrFetchApplicationsModule, [r0]);
const r4 = value4 != null && (require(4483) /* metro dependency 4483: RobloxSubgameUtils */).isRobloxSubgameApplication(value4);
const defaultImport = UseResolveGame;
let object = {applicationId: applicationId};
object.gameId = r4 ? (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID : gameId;
const value6 = defaultImport(object);
const value7 = value6.gameRecord != null;
if (value7) {
moduleValue3 = require(4483) /* metro dependency 4483: RobloxSubgameUtils */;
r1 = moduleValue3.isRobloxSubgameGame(value6.gameRecord);
} else {
r1 = value7;
}
const useGame = UseGameModule.useGame;
const ROBLOX_GAME_ID = r1 ? (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID : undefined;
const value8 = Reflect.apply(useGame, UseGameModule, [ROBLOX_GAME_ID]);
if (r1) {
object = {};
object.gameId = (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID;
object.gameRecord = value8.data ?? null;
object.isLoading = value8.isLoading;
r0 = object;
} else {
r0 = value6;
}
return r0;
}
}
function useResolveGameForProfile({applicationId, gameId}) { // fn#77954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10143:191, offset: 0x01e13c49, size: 352 bytes, params: 2, frame: 19
var r1;
var moduleValue3;
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
let r0 = gameId == null ? applicationId : undefined;
const value4 = Reflect.apply(useGetOrFetchApplication, useGetOrFetchApplicationsModule, [r0]);
const r4 = value4 != null && (require(4483) /* metro dependency 4483: RobloxSubgameUtils */).isRobloxSubgameApplication(value4);
const defaultImport = importDefault(9958) /* metro dependency 9958: useResolveGame */;
let object2 = {applicationId: applicationId};
object2.gameId = r4 ? (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID : gameId;
const value6 = defaultImport(object2);
const value7 = value6.gameRecord != null;
if (value7) {
moduleValue3 = require(4483) /* metro dependency 4483: RobloxSubgameUtils */;
r1 = moduleValue3.isRobloxSubgameGame(value6.gameRecord);
} else {
r1 = value7;
}
const useGameModule = require(5198) /* metro dependency 5198: useGame */;
const useGame = useGameModule.useGame;
const ROBLOX_GAME_ID = r1 ? (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID : undefined;
const value8 = Reflect.apply(useGame, useGameModule, [ROBLOX_GAME_ID]);
if (r1) {
object2 = {};
object2.gameId = (require(4484) /* metro dependency 4484: RobloxSubgameTypes */).ROBLOX_GAME_ID;
object2.gameRecord = value8.data ?? null;
object2.isLoading = value8.isLoading;
r0 = object2;
} else {
r0 = value6;
}
return r0;
}
global.__d(_fun77953, 9957, [6777, 4483, 9958, 4484, 5198,
2]) /* metro module 9957, dependencies: [6777, 4483, 9958, 4484, 5198, 2] */;
@@ -1,91 +1,98 @@
/* Metro module 9954; source: modules/game_profile/hooks/useShouldOpenGameProfileModal.tsx; dependencies: [31, 5199, 661, 683, 1391, 9955, 9956, 9957, 44, 2] */
import GameStore from '../../games/GameStore.tsx'; /* Metro dependency 5199 */
import UseResolveGameForProfile from './useResolveGameForProfile.tsx'; /* Metro dependency 9957 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as GameFlagsModule from '../../../external/discord_common/js/shared/shared-constants/GameFlags.tsx'; /* Metro dependency 9955 */
import * as ThirdPartyGameApplicationThemesModule from '../../../external/discord_common/js/shared/shared-constants/ThirdPartyGameApplicationThemes.tsx'; /* Metro dependency 9956 */
function _fun77945(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:6, offset: 0x01e135e2, size: 248 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
object = {NoMatch: 'no match', NSFW: 'nsfw', Disabled: 'profile disabled'};
const closure = function(a0) {
return getRejectionReasons(a0).length === 0;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useShouldOpenGameProfileModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useShouldOpenGameProfileModal.tsx');
exports.default = _default_77948;
exports.gameIsAcceptable = closure;
exports.gameIdIsAcceptable = gameIdIsAcceptable;
}
function getRejectionReasons(a0) { // fn#77946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:257, offset: 0x01e136da, size: 206 bytes, params: 2, frame: 19
if (a0 == null) {
return [env0_7.NoMatch];
function getRejectionReasons(a0) { // fn#77946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:257, offset: 0x01e136da, size: 206 bytes, params: 2, frame: 19
if (a0 == null) {
return [env0_7.NoMatch];
}
const items2 = [];
const hasFlag = FlagUtilsModule.hasFlag;
const gameFlags = a0.gameFlags;
const GameFlags = (GameFlagsModule).GameFlags;
const GAME_PROFILE_DISABLED = GameFlags.GAME_PROFILE_DISABLED;
if (Reflect.apply(hasFlag, FlagUtilsModule, [gameFlags, GAME_PROFILE_DISABLED])) {
items2.push(env0_7.Disabled);
}
const themes = a0.themes;
const includes = themes.includes;
const ThirdPartyGameApplicationThemes = (ThirdPartyGameApplicationThemesModule).ThirdPartyGameApplicationThemes;
const EROTIC = ThirdPartyGameApplicationThemes.EROTIC;
if (Reflect.apply(includes, themes, [EROTIC])) {
items2.push(env0_7.NSFW);
}
return items2;
}
const items2 = [];
const flagUtilsModule = importAll(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const gameFlags = a0.gameFlags;
const GameFlags = (require(9955) /* metro dependency 9955: GameFlags */).GameFlags;
const GAME_PROFILE_DISABLED = GameFlags.GAME_PROFILE_DISABLED;
if (Reflect.apply(hasFlag, flagUtilsModule, [gameFlags, GAME_PROFILE_DISABLED])) {
items2.push(env0_7.Disabled);
}
const themes = a0.themes;
const includes = themes.includes;
const ThirdPartyGameApplicationThemes = (require(9956) /* metro dependency 9956: ThirdPartyGameApplicationThemes */).ThirdPartyGameApplicationThemes;
const EROTIC = ThirdPartyGameApplicationThemes.EROTIC;
if (Reflect.apply(includes, themes, [EROTIC])) {
items2.push(env0_7.NSFW);
}
return items2;
}
function _default_77948({applicationId, gameId, source, trackEntryPointImpression}) { // fn#77948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:543, offset: 0x01e137c6, size: 221 bytes, params: 2, frame: 20
applicationId = applicationId === undefined ? '' : applicationId;
trackEntryPointImpression = trackEntryPointImpression === undefined || trackEntryPointImpression;
const binding = undefined;
const env0_2 = binding.useRef(false);
const {gameId, gameRecord,
isLoading} = (importDefault(9957) /* metro dependency 9957: useResolveGameForProfile */)({applicationId: applicationId,
gameId: gameIdBinding});
const value = gameIsAcceptable(gameRecord);
binding.useEffect(_fun77949, [gameRecord, value, isLoading, source, trackEntryPointImpression]);
return {shouldOpenGameProfile: value, gameId: gameIdBinding};
}
function gameIdIsAcceptable(a0) { // fn#77950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:1299, offset: 0x01e13975, size: 34 bytes, params: 2, frame: 12
return gameIsAcceptable(GameStore.getGame(a0));
}
function _fun77949() { // fn#77949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:756, offset: 0x01e138a3, size: 210 bytes, params: 1, frame: 19
var r6;
var value2;
var defaultImport;
var sourceBinding;
var rejectionReasons;
var binding;
var id;
var defaultImport2;
if (!env0_2.current) {
if (trackEntryPointImpression) {
if (!isLoading) {
if (gameRecord != null) {
value2 = environment.__proto__;
defaultImport = importDefault(44) /* metro dependency 44 */;
sourceBinding = source;
defaultImport(sourceBinding != null,
'Cannot track a Game Profile Entry Point Impressions without a source.');
rejectionReasons = getRejectionReasons(gameRecord);
binding = env0_5;
id = gameRecord.id;
r6 = rejectionReasons !== undefined ? rejectionReasons : [];
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.GAME_PROFILE_ENTRY_POINT_AVAILABLE,
{game_profile_available: binding,
application_id: id, rejection_reason: r6, source: sourceBinding});
env0_2.current = true;
function _default_77948({applicationId, gameId, source, trackEntryPointImpression}) { // fn#77948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:543, offset: 0x01e137c6, size: 221 bytes, params: 2, frame: 20
applicationId = applicationId === undefined ? '' : applicationId;
trackEntryPointImpression = trackEntryPointImpression === undefined || trackEntryPointImpression;
const binding = undefined;
const env0_2 = binding.useRef(false);
const {gameId, gameRecord,
isLoading} = (UseResolveGameForProfile)({applicationId: applicationId,
gameId: gameIdBinding});
const value = gameIsAcceptable(gameRecord);
binding.useEffect(_fun77949, [gameRecord, value, isLoading, source, trackEntryPointImpression]);
return {shouldOpenGameProfile: value, gameId: gameIdBinding};
function _fun77949() { // fn#77949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:756, offset: 0x01e138a3, size: 210 bytes, params: 1, frame: 19
var r6;
var value2;
var defaultImport;
var sourceBinding;
var rejectionReasons;
var binding;
var id;
var defaultImport2;
if (!env0_2.current) {
if (trackEntryPointImpression) {
if (!isLoading) {
if (gameRecord != null) {
value2 = environment.__proto__;
defaultImport = importDefault(44) /* metro dependency 44 */;
sourceBinding = source;
defaultImport(sourceBinding != null,
'Cannot track a Game Profile Entry Point Impressions without a source.');
rejectionReasons = getRejectionReasons(gameRecord);
binding = env0_5;
id = gameRecord.id;
r6 = rejectionReasons !== undefined ? rejectionReasons : [];
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport2.track(AnalyticEvents.GAME_PROFILE_ENTRY_POINT_AVAILABLE,
{game_profile_available: binding,
application_id: id, rejection_reason: r6, source: sourceBinding});
env0_2.current = true;
}
}
}
}
}
}
function gameIdIsAcceptable(a0) { // fn#77950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10140:1299, offset: 0x01e13975, size: 34 bytes, params: 2, frame: 12
return gameIsAcceptable(GameStore.getGame(a0));
}
}
global.__d(_fun77945, 9954, [31, 5199, 661, 683, 1391, 9955, 9956, 9957, 44,
2]) /* metro module 9954, dependencies: [31, 5199, 661, 683, 1391, 9955, 9956, 9957, 44, 2] */;
@@ -1,4 +1,11 @@
/* Metro module 9968; source: modules/game_profile/hooks/useSteamWebsiteUrl.tsx; dependencies: [5199, 661, 566, 9969, 9967, 1861, 2] */
import GameStore from '../../games/GameStore.tsx'; /* Metro dependency 5199 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as StringUtilsModule from '../../../utils/StringUtils.tsx'; /* Metro dependency 1861 */
import * as SteamReleaseStatusModule from '../../../external/discord_common/js/shared/shared-constants/SteamReleaseStatus.tsx'; /* Metro dependency 9969 */
function _fun78047(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:6, offset: 0x01e16cd1, size: 155 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = function(a0) {
@@ -6,62 +13,61 @@ function _fun78047(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).Distributors;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useSteamWebsiteUrl.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useSteamWebsiteUrl.tsx');
exports.buildSteamStoreUrl = closure;
exports.useSteamWebsiteUrl = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStores([GameStore], _fun78050, [a0]);
};
function useSteamWebsiteUrl(a0) { // fn#78049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:372, offset: 0x01e16d96, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (FluxModule).useStateFromStores([GameStore], _fun78050, [a0]);
function _fun78050() { // fn#78050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:442, offset: 0x01e16de1, size: 272 bytes, params: 1, frame: 17
const value2 = null;
if (value2 == env0_0) {
return value2;
}
let value = GameStore.getGame(env0_0);
if (value2 == value) {
return value2;
}
const steamReleaseStatus = value.steamReleaseStatus;
const value4 = undefined;
const SteamReleaseStatus = (SteamReleaseStatusModule).SteamReleaseStatus;
const RETIRED_ABANDONED = SteamReleaseStatus.RETIRED_ABANDONED;
if (steamReleaseStatus === RETIRED_ABANDONED) {
return value2;
}
const value5 = value.websites.find(function({category}) {
return category === require(dependencyMap[4]).ThirdPartyGameApplicationWebsiteCategory.STEAM;
});
const url = value2 == value5 ? value4 : value5.url;
value = value.thirdPartySkus.filter(_fun78052);
const property = value[0];
const id = value2 == property ? value4 : property.id;
const r2 = StringUtilsModule.isNullOrEmpty(id) ? value2 : buildSteamStoreUrl(id);
return value.length > 1 && value2 != url ? url : value2 == r2 ? value2 != url ? url : value2 : r2;
function _fun78052(a0) { // fn#78052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:749, offset: 0x01e16f24, size: 72 bytes, params: 2, frame: 13
var r0;
const distributor = a0.distributor;
let value = environment.__proto__.__proto__;
const STEAM = Distributors.STEAM;
const value2 = distributor === STEAM;
if (value2) {
value = require(1861) /* metro dependency 1861: StringUtils */;
value = !value.isNullOrEmpty(a0.id);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
}
}
function useSteamWebsiteUrl(a0) { // fn#78049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:372, offset: 0x01e16d96, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GameStore], _fun78050, [a0]);
}
function _fun78050() { // fn#78050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:442, offset: 0x01e16de1, size: 272 bytes, params: 1, frame: 17
const value2 = null;
if (value2 == env0_0) {
return value2;
}
let value = GameStore.getGame(env0_0);
if (value2 == value) {
return value2;
}
const steamReleaseStatus = value.steamReleaseStatus;
const value4 = undefined;
const SteamReleaseStatus = (require(9969) /* metro dependency 9969: SteamReleaseStatus */).SteamReleaseStatus;
const RETIRED_ABANDONED = SteamReleaseStatus.RETIRED_ABANDONED;
if (steamReleaseStatus === RETIRED_ABANDONED) {
return value2;
}
const value5 = value.websites.find(function({category}) {
return category === require(dependencyMap[4]).ThirdPartyGameApplicationWebsiteCategory.STEAM;
});
const url = value2 == value5 ? value4 : value5.url;
value = value.thirdPartySkus.filter(_fun78052);
const property = value[0];
const id = value2 == property ? value4 : property.id;
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
const r2 = stringUtilsModule.isNullOrEmpty(id) ? value2 : buildSteamStoreUrl(id);
return value.length > 1 && value2 != url ? url : value2 == r2 ? value2 != url ? url : value2 : r2;
}
function _fun78052(a0) { // fn#78052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10154:749, offset: 0x01e16f24, size: 72 bytes, params: 2, frame: 13
var r0;
const distributor = a0.distributor;
let value = environment.__proto__.__proto__;
const STEAM = Distributors.STEAM;
const value2 = distributor === STEAM;
if (value2) {
value = require(1861) /* metro dependency 1861: StringUtils */;
value = !value.isNullOrEmpty(a0.id);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
global.__d(_fun78047, 9968, [5199, 661, 566, 9969, 9967, 1861,
2]) /* metro module 9968, dependencies: [5199, 661, 566, 9969, 9967, 1861, 2] */;
@@ -1,43 +1,46 @@
/* Metro module 9970; source: modules/game_profile/hooks/useXboxGamePassStoreUrl.tsx; dependencies: [661, 1861, 9962, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun78054(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:6, offset: 0x01e17021, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).Distributors;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useXboxGamePassStoreUrl.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/game_profile/hooks/useXboxGamePassStoreUrl.tsx');
exports.default = useXboxGamePassStoreUrl;
function useXboxGamePassStoreUrl(a0) { // fn#78055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:217, offset: 0x01e17096, size: 103 bytes, params: 2, frame: 15
var r1;
let value = null;
if (value == a0) {
return value;
}
const value2 = a0.thirdPartySkus.find(_fun78056);
if (value == (value == value2 ? undefined : value2.id)) {
r1 = value;
} else {
value = require(9962) /* metro dependency 9962: distributorStoreUrls */;
value = value.buildXboxGamePassStoreUrl(value2.id);
r1 = value;
}
return r1;
function _fun78056(a0) { // fn#78056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:305, offset: 0x01e170fd, size: 72 bytes, params: 2, frame: 13
var r0;
const distributor = a0.distributor;
let value = environment.__proto__;
const XBOX_GAME_PASS = Distributors.XBOX_GAME_PASS;
const value2 = distributor === XBOX_GAME_PASS;
if (value2) {
value = require(1861) /* metro dependency 1861: StringUtils */;
value = !value.isNullOrEmpty(a0.id);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
}
function useXboxGamePassStoreUrl(a0) { // fn#78055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:217, offset: 0x01e17096, size: 103 bytes, params: 2, frame: 15
var r1;
let value = null;
if (value == a0) {
return value;
}
const value2 = a0.thirdPartySkus.find(_fun78056);
if (value == (value == value2 ? undefined : value2.id)) {
r1 = value;
} else {
value = require(9962) /* metro dependency 9962: distributorStoreUrls */;
value = value.buildXboxGamePassStoreUrl(value2.id);
r1 = value;
}
return r1;
}
function _fun78056(a0) { // fn#78056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10156:305, offset: 0x01e170fd, size: 72 bytes, params: 2, frame: 13
var r0;
const distributor = a0.distributor;
let value = environment.__proto__;
const XBOX_GAME_PASS = Distributors.XBOX_GAME_PASS;
const value2 = distributor === XBOX_GAME_PASS;
if (value2) {
value = require(1861) /* metro dependency 1861: StringUtils */;
value = !value.isNullOrEmpty(a0.id);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
global.__d(_fun78054, 9970, [661, 1861, 9962, 2]) /* metro module 9970, dependencies: [661, 1861, 9962, 2] */;