307 lines
12 KiB
TypeScript
307 lines
12 KiB
TypeScript
/* 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;
|
|
}
|
|
|