This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,30 @@
// Metro module 5803 (f5804).
import BaseCollectiblesItemRecord from "./BaseCollectiblesItemRecord";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
import { $callWithNewTarget } from "../../../_hermes/prelude";
class AvatarDecorationRecord extends BaseCollectiblesItemRecord {
type = CollectiblesItemType.AVATAR_DECORATION;
constructor(a0) {
super(a0);
this.asset = a0.asset;
this.label = a0.label;
}
static fromServer(a0) {
const r2 = {
...Reflect.get(Object.getPrototypeOf(AvatarDecorationRecord), "fromServer", this).call(this, a0),
...a0
};
const prototypeOf = Object.getPrototypeOf(AvatarDecorationRecord);
const r20 = Object.create(AvatarDecorationRecord.prototype);
const r22 = $callWithNewTarget(prototypeOf, r20, AvatarDecorationRecord, r2);
const r23 = r22 instanceof Object ? r22 : r20;
r23.type = CollectiblesItemType.AVATAR_DECORATION;
r23.asset = r2.asset;
r23.label = r2.label;
return r23;
}
}
export default AvatarDecorationRecord;
export function isAvatarDecorationRecord(a0) {
return a0 instanceof AvatarDecorationRecord;
}
@@ -0,0 +1,22 @@
// Metro module 1900 (f1901).
import Record from "../../../lib/Record";
import { $callWithNewTarget } from "../../../_hermes/prelude";
class BaseCollectiblesItemRecord extends Record {
constructor(a0) {
super();
this.skuId = a0.skuId;
}
static fromServer({ sku_id, ...rest }) {
const r2 = {
...rest,
skuId: sku_id
};
const prototypeOf = Object.getPrototypeOf(BaseCollectiblesItemRecord);
const r18 = Object.create(BaseCollectiblesItemRecord.prototype);
const r19 = $callWithNewTarget(prototypeOf, r18, BaseCollectiblesItemRecord);
const r20 = r19 instanceof Object ? r19 : r18;
r20.skuId = r2.skuId;
return r20;
}
}
export default BaseCollectiblesItemRecord;
@@ -0,0 +1,26 @@
// Metro module 5801 (f5802).
import getPricesFromServer from "../../skus/utils/getPricesFromServer";
class CollectiblesBundledProductRecord {
constructor(a0) {
this.prices = a0.prices;
this.type = a0.type;
this.premiumType = a0.premiumType;
this.name = a0.name;
this.skuId = a0.skuId;
this.summary = a0.summary;
}
static fromServer({ prices, type, premium_type, name, sku_id, summary }) {
const pricesFromServer = getPricesFromServer(prices);
const r19 = {
__proto__: CollectiblesBundledProductRecord.prototype
};
r19.prices = pricesFromServer;
r19.type = type;
r19.premiumType = premium_type;
r19.name = name;
r19.skuId = sku_id;
r19.summary = summary;
return r19;
}
}
export default CollectiblesBundledProductRecord;
@@ -0,0 +1,23 @@
// Metro module 5816 (f5817).
import StorefrontCollectionRecord from "../../storefront/records/StorefrontCollectionRecord";
import CollectiblesCategoryRecord from "./CollectiblesCategoryRecord";
let $mk77194 = function() {
return (a0) => CollectiblesCategoryRecord.fromServer(a0);
}, $mk77195 = function() {
return (a0) => StorefrontCollectionRecord.fromServer(a0);
};
class CollectiblesCategoriesRecord {
constructor(a0) {
this.categories = a0.categories.map($mk77194());
this.collections = a0.collections.map($mk77195());
}
static fromServer(a0) {
const r10 = {
__proto__: CollectiblesCategoriesRecord.prototype
};
r10.categories = a0.categories.map($mk77194());
r10.collections = a0.collections.map($mk77195());
return r10;
}
}
export { CollectiblesCategoriesRecord };
@@ -0,0 +1,125 @@
// Metro module 5799 (f5800).
import CollectiblesProductRecord from "./CollectiblesProductRecord";
import CollectiblesStoreListingRecord from "./CollectiblesStoreListingRecord";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
import { isOrbsExclusiveProduct } from "../utils/CollectiblesProductUtils";
import { getAssetDisplayConfig } from "../CollectiblesUtils";
import { HermesBuiltin } from "../../../_hermes/prelude";
class CollectiblesCategoryRecord extends CollectiblesStoreListingRecord {
constructor(a0) {
super(a0);
this.products = a0.products;
this.heroRanking = a0.heroRanking;
this.unpublishedAt = a0.unpublishedAt;
this.isOrbsExclusive = Array.isArray(a0.products) && a0.products.length > 0 && a0.products.find((product) => !isOrbsExclusiveProduct(product)) === void 0;
this.heroBannerUrl = a0.heroBannerUrl;
this.heroBannerAnimatedUrl = a0.heroBannerAnimatedUrl;
this.heroRiveUrl = a0.heroRiveUrl;
this.heroLogoUrl = a0.heroLogoUrl;
this.catalogBannerUrl = a0.catalogBannerUrl;
this.catalogBannerAnimatedUrl = a0.catalogBannerAnimatedUrl;
this.catalogBannerRiveUrl = a0.catalogBannerRiveUrl;
this.featuredBlockUrl = a0.featuredBlockUrl;
this.logoUrl = a0.logoUrl;
this.pdpBgUrl = a0.pdpBgUrl;
this.mobileBannerUrl = a0.mobileBannerUrl;
this.mobileBgUrl = a0.mobileBgUrl;
this.heroLogoDisplayConfig = a0.heroLogoDisplayConfig;
this.heroBannerDisplayConfig = a0.heroBannerDisplayConfig;
}
static fromServer(a0) {
const { products, unpublished_at, hero_ranking, hero_logo_display_config, hero_banner_display_config, hero_banner_url, hero_banner_animated_url, hero_rive_url, hero_logo_url, catalog_banner_url, catalog_banner_animated_url, catalog_banner_rive_url, featured_block_url, logo_url, pdp_bg_url, mobile_banner_url, mobile_bg_url } = a0;
const r27 = {};
let unpublishedAt = null;
const r21 = HermesBuiltin.copyDataProperties(r27, a0, {
__proto__: null,
products: 0,
unpublished_at: 0,
hero_ranking: 0,
hero_logo_display_config: 0,
hero_banner_display_config: 0,
hero_banner_url: 0,
hero_banner_animated_url: 0,
hero_rive_url: 0,
hero_logo_url: 0,
catalog_banner_url: 0,
catalog_banner_animated_url: 0,
catalog_banner_rive_url: 0,
featured_block_url: 0,
logo_url: 0,
pdp_bg_url: 0,
mobile_banner_url: 0,
mobile_bg_url: 0
});
const r1 = {
...Reflect.get(Object.getPrototypeOf(CollectiblesCategoryRecord), "fromServer", this).call(this, r21),
products: products.reduce((acc, product) => {
const r8 = CollectiblesProductRecord.fromServer(product);
const type = r8.type;
if (!(!(type === CollectiblesItemType.VARIANTS_GROUP || type === CollectiblesItemType.EXTERNAL_SKU) && r8.items.length === 0)) {
acc.push(r8);
}
return acc;
}, [])
};
if (unpublished_at != null) {
unpublishedAt = new Date(unpublished_at);
}
r1.unpublishedAt = unpublishedAt;
r1.heroRanking = hero_ranking;
r1.heroBannerUrl = hero_banner_url;
r1.heroBannerAnimatedUrl = hero_banner_animated_url;
r1.heroRiveUrl = hero_rive_url;
r1.heroLogoUrl = hero_logo_url;
r1.catalogBannerUrl = catalog_banner_url;
r1.catalogBannerAnimatedUrl = catalog_banner_animated_url;
r1.catalogBannerRiveUrl = catalog_banner_rive_url;
r1.featuredBlockUrl = featured_block_url;
r1.logoUrl = logo_url;
r1.pdpBgUrl = pdp_bg_url;
r1.mobileBannerUrl = mobile_banner_url;
r1.mobileBgUrl = mobile_bg_url;
r1.heroLogoDisplayConfig = getAssetDisplayConfig(hero_logo_display_config);
r1.heroBannerDisplayConfig = getAssetDisplayConfig(hero_banner_display_config);
return new CollectiblesCategoryRecord(r1);
}
static fromStorefrontCollectionRecord(a0) {
return new CollectiblesCategoryRecord({
storeListingId: a0.id,
skuId: a0.id,
name: a0.name,
summary: a0.description,
unpublishedAt: a0.unpublishedAt,
styles: a0.styles,
products: a0.products.reduce((acc, product) => {
L6: {
const r9 = CollectiblesProductRecord.fromStorefrontProductRecord(product);
if (r9 != null) {
const type = r9.type;
if (!(type === CollectiblesItemType.VARIANTS_GROUP || type === CollectiblesItemType.EXTERNAL_SKU) && r9.items.length === 0) {
break L6;
}
acc.push(r9);
}
}
return acc;
}, []),
heroRanking: a0.heroRanking,
heroBannerUrl: a0.heroBannerUrl,
heroBannerAnimatedUrl: a0.heroBannerAnimatedUrl,
heroRiveUrl: a0.heroRiveUrl,
heroLogoUrl: a0.heroLogoUrl,
catalogBannerUrl: a0.catalogBannerUrl,
catalogBannerAnimatedUrl: a0.catalogBannerAnimatedUrl,
catalogBannerRiveUrl: a0.catalogBannerRiveUrl,
featuredBlockUrl: a0.featuredBlockUrl,
logoUrl: a0.logoUrl,
pdpBgUrl: a0.pdpBgUrl,
mobileBannerUrl: a0.mobileBannerUrl,
mobileBgUrl: a0.mobileBgUrl,
heroLogoDisplayConfig: a0.heroLogoDisplayConfig,
heroBannerDisplayConfig: a0.heroDisplayConfig
});
}
}
export default CollectiblesCategoryRecord;
@@ -0,0 +1,120 @@
// Metro module 5802 (f5803).
import AvatarDecorationRecord from "./AvatarDecorationRecord";
import NameplateRecord from "./NameplateRecord";
import ProfileEffectRecord from "./ProfileEffectRecord";
import ProfileFrameRecord from "./ProfileFrameRecord";
import UnknownCollectiblesItemRecord from "./UnknownCollectiblesItemRecord";
import { SKUProductLines, SKUTypes } from "../../../Constants";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
let transformSKUToCollectiblesItem;
export function createCollectiblesItemsFromServerResponse(a0) {
return a0 == null ? [] : a0.reduce((acc, item) => {
const type = item.type;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
acc.push(AvatarDecorationRecord.fromServer(item));
} else if (CollectiblesItemType.NAMEPLATE === type) {
acc.push(NameplateRecord.fromServer(item));
} else if (CollectiblesItemType.PROFILE_EFFECT === type) {
acc.push(ProfileEffectRecord.fromServer(item));
} else if (CollectiblesItemType.PROFILE_FRAME === type) {
acc.push(ProfileFrameRecord.fromServer(item));
} else {
acc.push(UnknownCollectiblesItemRecord.fromServer(item));
}
return acc;
}, []);
}
transformSKUToCollectiblesItem = function transformSKUToCollectiblesItem(a0) {
if (a0.productLine === SKUProductLines.COLLECTIBLES) {
if (a0.type === SKUTypes.BUNDLE) {
const items = [];
let bundledSkus = a0.bundledSkus;
if (bundledSkus == null) {
bundledSkus = [];
}
for (const item of bundledSkus) {
const r115 = transformSKUToCollectiblesItem(item);
if (r115?.type === "single") {
items.push(r115.item);
}
}
if (items.length === 0) {
return void 0;
}
let previewAssetPaths = a0.previewAssetPaths;
if (previewAssetPaths == null) {
previewAssetPaths = void 0;
}
return {
type: "bundle",
items,
previewAssets: previewAssetPaths
};
}
const item2 = a0.tenantMetadata?.collectibles?.item;
if (item2 != null) {
const type = item2.type;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
return {
type: "single",
item: new AvatarDecorationRecord({
skuId: a0.id,
type: item2.type,
asset: item2.asset,
label: item2.label
})
};
}
if (CollectiblesItemType.NAMEPLATE === type) {
return {
type: "single",
item: new NameplateRecord({
skuId: a0.id,
type: item2.type,
asset: item2.asset,
label: item2.label,
palette: item2.palette
})
};
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
let effects = item2.effects;
if (effects == null) {
effects = [];
}
return {
type: "single",
item: new ProfileEffectRecord({
skuId: a0.id,
type: item2.type,
title: item2.title,
description: item2.description,
thumbnailPreviewSrc: item2.thumbnailPreviewSrc,
reducedMotionSrc: item2.reducedMotionSrc,
effects,
accessibilityLabel: item2.accessibilityLabel,
animationType: item2.animationType,
staticFrameSrc: item2.staticFrameSrc
})
};
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return {
type: "single",
item: new ProfileFrameRecord({
skuId: a0.id,
type: item2.type,
label: item2.label,
layers: item2.layers,
innerWidth: item2.innerWidth,
overflowTop: item2.overflowTop,
overflowBottom: item2.overflowBottom,
overflowHorizontal: item2.overflowHorizontal
})
};
}
return void 0;
}
}
};
export { transformSKUToCollectiblesItem };
@@ -0,0 +1,35 @@
// Metro module 5821 (f5822).
import { CollectiblesMarketingType } from "../../../_bundle/Module5822";
class CollectiblesMarketingBadgeRecord {
type = CollectiblesMarketingType.BADGE;
constructor(a0) {
this.dismissibleContent = a0.dismissibleContent;
this.version = a0.version;
this.refTargetBackground = a0.refTargetBackground;
this.badgeIcon = a0.badgeIcon;
this.badgeText = a0.badgeText;
this.showHoverGradient = a0.showHoverGradient;
}
static fromServer(a0) {
const r2 = {
...a0,
dismissibleContent: a0.dismissible_content,
refTargetBackground: a0.ref_target_background,
badgeIcon: a0.badge_icon,
badgeText: a0.badge_text,
showHoverGradient: a0.show_hover_gradient
};
const r17 = {
__proto__: CollectiblesMarketingBadgeRecord.prototype
};
r17.type = CollectiblesMarketingType.BADGE;
r17.dismissibleContent = r2.dismissibleContent;
r17.version = r2.version;
r17.refTargetBackground = r2.refTargetBackground;
r17.badgeIcon = r2.badgeIcon;
r17.badgeText = r2.badgeText;
r17.showHoverGradient = r2.showHoverGradient;
return r17;
}
}
export { CollectiblesMarketingBadgeRecord };
@@ -0,0 +1,27 @@
// Metro module 5823 (f5824).
import { CollectiblesMarketingType } from "../../../_bundle/Module5822";
class CollectiblesMarketingBannerRecord {
type = CollectiblesMarketingType.BANNER;
constructor(a0) {
this.title = a0.title;
this.body = a0.body;
this.asset = a0.asset;
this.popoutAsset = a0.popout_asset;
this.version = a0.version;
this.revertTextColor = a0.revert_text_color;
}
static fromServer(a0) {
const r9 = {
__proto__: CollectiblesMarketingBannerRecord.prototype
};
r9.type = CollectiblesMarketingType.BANNER;
r9.title = a0.title;
r9.body = a0.body;
r9.asset = a0.asset;
r9.popoutAsset = a0.popout_asset;
r9.version = a0.version;
r9.revertTextColor = a0.revert_text_color;
return r9;
}
}
export { CollectiblesMarketingBannerRecord };
@@ -0,0 +1,42 @@
// Metro module 5824 (f5825).
import { CollectiblesMarketingType } from "../../../_bundle/Module5822";
class CollectiblesMarketingCoachmarkRecord {
type = CollectiblesMarketingType.COACHMARK;
constructor(a0) {
this.title = a0.title;
this.body = a0.body;
this.assetDark = a0.assetDark;
this.assetLight = a0.assetLight;
this.version = a0.version;
this.refTargetBackground = a0.refTargetBackground;
this.badgeIcon = a0.badgeIcon;
this.badgeText = a0.badgeText;
this.buttonLabel = a0.buttonLabel;
}
static fromServer(a0) {
const r2 = {
...a0,
assetDark: a0.asset_dark,
assetLight: a0.asset_light,
refTargetBackground: a0.ref_target_background,
badgeIcon: a0.badge_icon,
badgeText: a0.badge_text,
buttonLabel: a0.button_label
};
const r18 = {
__proto__: CollectiblesMarketingCoachmarkRecord.prototype
};
r18.type = CollectiblesMarketingType.COACHMARK;
r18.title = r2.title;
r18.body = r2.body;
r18.assetDark = r2.assetDark;
r18.assetLight = r2.assetLight;
r18.version = r2.version;
r18.refTargetBackground = r2.refTargetBackground;
r18.badgeIcon = r2.badgeIcon;
r18.badgeText = r2.badgeText;
r18.buttonLabel = r2.buttonLabel;
return r18;
}
}
export { CollectiblesMarketingCoachmarkRecord };
@@ -0,0 +1,42 @@
// Metro module 5820 (f5821).
import { CollectiblesMarketingBadgeRecord } from "./CollectiblesMarketingBadgeRecord";
import { CollectiblesMarketingBannerRecord } from "./CollectiblesMarketingBannerRecord";
import { CollectiblesMarketingCoachmarkRecord } from "./CollectiblesMarketingCoachmarkRecord";
import CollectiblesMarketingTabTooltipRecord from "./CollectiblesMarketingTabTooltipRecord";
import { CollectiblesMarketingType } from "../../../_bundle/Module5822";
class CollectiblesMarketingsRecord {
constructor(a0) {
this.marketingsBySurfaces = a0;
}
static fromServer(a0) {
const r5 = Object;
const r8 = Object;
let r11 = a0?.marketings;
if (r11 == null) {
r11 = {};
}
const marketingsBySurfaces = r5.fromEntries(r8.entries(r11).map((item) => {
const [r24, r25] = item;
const type = r25?.type;
if (CollectiblesMarketingType.BADGE === type) {
return [r24, CollectiblesMarketingBadgeRecord.fromServer(r25)];
}
if (CollectiblesMarketingType.BANNER === type) {
return [r24, CollectiblesMarketingBannerRecord.fromServer(r25)];
}
if (CollectiblesMarketingType.COACHMARK === type) {
return [r24, CollectiblesMarketingCoachmarkRecord.fromServer(r25)];
}
if (CollectiblesMarketingType.TAB_TOOLTIP === type) {
return [r24, CollectiblesMarketingTabTooltipRecord.fromServer(r25)];
}
return [r24, void 0];
}));
const r20 = {
__proto__: CollectiblesMarketingsRecord.prototype
};
r20.marketingsBySurfaces = marketingsBySurfaces;
return r20;
}
}
export { CollectiblesMarketingsRecord };
@@ -0,0 +1,41 @@
// Metro module 5825 (f5826).
import { CollectiblesMarketingType } from "../../../_bundle/Module5822";
class CollectiblesMarketingTabTooltipRecord {
type = CollectiblesMarketingType.TAB_TOOLTIP;
constructor(a0) {
this.title = a0.title;
this.body = a0.body;
this.asset = a0.asset;
this.dismissibleContent = a0.dismissibleContent;
this.version = a0.version;
this.refTargetBackground = a0.refTargetBackground;
this.badgeIcon = a0.badgeIcon;
this.badgeText = a0.badgeText;
this.showHoverGradient = a0.showHoverGradient;
}
static fromServer(a0) {
const r2 = {
...a0,
dismissibleContent: a0.dismissible_content,
refTargetBackground: a0.ref_target_background,
badgeIcon: a0.badge_icon,
badgeText: a0.badge_text,
showHoverGradient: a0.show_hover_gradient
};
const r17 = {
__proto__: CollectiblesMarketingTabTooltipRecord.prototype
};
r17.type = CollectiblesMarketingType.TAB_TOOLTIP;
r17.title = r2.title;
r17.body = r2.body;
r17.asset = r2.asset;
r17.dismissibleContent = r2.dismissibleContent;
r17.version = r2.version;
r17.refTargetBackground = r2.refTargetBackground;
r17.badgeIcon = r2.badgeIcon;
r17.badgeText = r2.badgeText;
r17.showHoverGradient = r2.showHoverGradient;
return r17;
}
}
export default CollectiblesMarketingTabTooltipRecord;
@@ -0,0 +1,276 @@
// Metro module 5800 (f5801).
import CollectiblesBundledProductRecord from "./CollectiblesBundledProductRecord";
import { createCollectiblesItemsFromServerResponse, transformSKUToCollectiblesItem } from "./CollectiblesItemRecord";
import CollectiblesStoreListingRecord from "./CollectiblesStoreListingRecord";
import { REWARD_CATEGORY_AND_REWARD_SKU_IDS } from "../CollectiblesShopConstants";
import { PREMIUM_TYPE_NONE, PriceSetAssignmentPurchaseTypes } from "../../../Constants";
import getPricesFromServer from "../../skus/utils/getPricesFromServer";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
import { $callWithNewTarget } from "../../../_hermes/prelude";
let CollectiblesProductRecord;
const CollectiblesProductRecord2 = class CollectiblesProductRecord extends CollectiblesStoreListingRecord {
constructor(a0) {
super(a0);
this.summary = a0.summary;
this.type = a0.type;
this.premiumType = a0.premiumType;
this.items = a0.items;
this.categorySkuId = a0.categorySkuId;
this.isCategoryReward = a0.isCategoryReward;
this.prices = a0.prices;
this.bundledProducts = a0.bundledProducts;
this.previewAssets = a0.previewAssets;
this.googleSkuIds = a0.googleSkuIds;
this.variants = a0.variants;
this.eligibleOffers = a0.eligibleOffers;
this.badgeOverride = a0.badgeOverride;
this.hideBadge = a0.hideBadge;
this.isFirstParty = a0.isFirstParty;
}
static fromServer({ type, premium_type, category_sku_id, prices, bundled_products, preview_assets, variants, badge_override, hide_badge, is_first_party, ...rest }) {
let c15191_0 = rest;
const r4 = {
...Reflect.get(Object.getPrototypeOf(CollectiblesProductRecord), "fromServer", this).call(this, rest),
type,
premiumType: premium_type !== PREMIUM_TYPE_NONE ? premium_type : null,
categorySkuId: category_sku_id,
isCategoryReward: REWARD_CATEGORY_AND_REWARD_SKU_IDS.some((item) => item.rewardSkuId === c15191_0.sku_id),
prices: getPricesFromServer(prices),
items: createCollectiblesItemsFromServerResponse(rest.items),
bundledProducts: bundled_products == null ? void 0 : bundled_products.map(CollectiblesBundledProductRecord.fromServer),
previewAssets: preview_assets != null ? {
fgStatic: preview_assets.fg_static,
fgAnimated: preview_assets.fg_animated,
bgStatic: preview_assets.bg_static,
bgAnimated: preview_assets.bg_animated
} : void 0,
variants: variants == null ? void 0 : variants.map(CollectiblesVariantProductRecord.fromServer),
googleSkuIds: rest.google_sku_ids,
eligibleOffers: rest.eligible_offers,
badgeOverride: badge_override,
hideBadge: hide_badge,
isFirstParty: is_first_party
};
const prototypeOf = Object.getPrototypeOf(CollectiblesProductRecord);
const r66 = Object.create(CollectiblesProductRecord.prototype);
const r68 = $callWithNewTarget(prototypeOf, r66, CollectiblesProductRecord, r4);
const r69 = r68 instanceof Object ? r68 : r66;
r69.summary = r4.summary;
r69.type = r4.type;
r69.premiumType = r4.premiumType;
r69.items = r4.items;
r69.categorySkuId = r4.categorySkuId;
r69.isCategoryReward = r4.isCategoryReward;
r69.prices = r4.prices;
r69.bundledProducts = r4.bundledProducts;
r69.previewAssets = r4.previewAssets;
r69.googleSkuIds = r4.googleSkuIds;
r69.variants = r4.variants;
r69.eligibleOffers = r4.eligibleOffers;
r69.badgeOverride = r4.badgeOverride;
r69.hideBadge = r4.hideBadge;
r69.isFirstParty = r4.isFirstParty;
return r69;
}
static fromStorefrontProductRecord(a0) {
const r6 = a0.skus[0];
let c15192_1 = r6;
if (r6 != null) {
const collectibles = r6.tenantMetadata?.collectibles;
if (collectibles != null) {
const type = a0.skus.length > 1 ? CollectiblesItemType.VARIANTS_GROUP : collectibles.type;
let r28 = transformSKUToCollectiblesItem(r6);
if (r28 == null) {
r28 = {};
}
let items = r28.items;
const item = r28.item;
const premiumType = collectibles.premiumType !== PREMIUM_TYPE_NONE ? collectibles.premiumType : null;
if (items == null) {
items = [item].filter((item) => item != null);
}
let primaryCollectionId = a0.primaryCollectionId;
if (primaryCollectionId == null) {
primaryCollectionId = collectibles.categorySkuId;
}
if (primaryCollectionId == null) {
primaryCollectionId = "";
}
const r30 = {
storeListingId: r6.id,
skuId: r6.id,
name: a0.name,
summary: a0.summary,
styles: a0.primaryCollectionStyles,
type,
premiumType,
items,
categorySkuId: primaryCollectionId,
isCategoryReward: REWARD_CATEGORY_AND_REWARD_SKU_IDS.some((item) => item.rewardSkuId === c15192_1.id),
prices: r6.prices,
previewAssets: null,
variants: null,
googleSkuIds: null,
eligibleOffers: void 0,
isFirstParty: null,
bundledProducts: null
};
let previewAssetPaths = r6.previewAssetPaths;
if (previewAssetPaths == null) {
previewAssetPaths = void 0;
}
r30.previewAssets = previewAssetPaths;
r30.variants = type === CollectiblesItemType.VARIANTS_GROUP ? a0.skus.map(function(sku) {
const collectibles = sku.tenantMetadata?.collectibles;
if (collectibles == null) {
return null;
}
let r20 = transformSKUToCollectiblesItem(sku);
if (r20 == null) {
r20 = {};
}
let items = r20.items;
const item = r20.item;
const [r14] = sku.selectedOptions;
let variantLabel = r14?.optionValue;
if (variantLabel == null) {
variantLabel = "";
}
let optionSelectorDisplayValue = collectibles.optionSelectorDisplayValue;
if (optionSelectorDisplayValue == null) {
optionSelectorDisplayValue = "";
}
const premiumType = collectibles.premiumType !== PREMIUM_TYPE_NONE ? collectibles.premiumType : null;
if (items == null) {
items = [item].filter((item) => item != null);
}
let primaryCollectionId = a0.primaryCollectionId;
if (primaryCollectionId == null) {
primaryCollectionId = collectibles.categorySkuId;
}
if (primaryCollectionId == null) {
primaryCollectionId = "";
}
const r26 = {
baseVariantName: a0.name,
baseVariantSkuId: c15192_1.id,
variantLabel,
variantValue: optionSelectorDisplayValue,
storeListingId: sku.id,
skuId: sku.id,
name: sku.name,
summary: sku.summary,
styles: void 0,
type: collectibles.type,
premiumType,
items,
categorySkuId: primaryCollectionId,
isCategoryReward: REWARD_CATEGORY_AND_REWARD_SKU_IDS.some((item) => item.rewardSkuId === sku.id),
prices: sku.prices,
previewAssets: null,
googleSkuIds: null,
eligibleOffers: void 0,
variants: void 0,
bundledProducts: void 0,
isFirstParty: null
};
let previewAssetPaths = sku.previewAssetPaths;
if (previewAssetPaths == null) {
previewAssetPaths = void 0;
}
r26.previewAssets = previewAssetPaths;
let googleSkuIds = sku.googleSkuIds;
if (googleSkuIds == null) {
const r49 = {};
r49[PriceSetAssignmentPurchaseTypes.MOBILE] = "";
r49[PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2] = "";
googleSkuIds = r49;
}
r26.googleSkuIds = googleSkuIds;
r26.isFirstParty = collectibles.isFirstParty;
const prototypeOf = Object.getPrototypeOf(CollectiblesVariantProductRecord);
const r59 = Object.create(CollectiblesVariantProductRecord.prototype);
const r61 = $callWithNewTarget(prototypeOf, r59, CollectiblesVariantProductRecord, r26);
const r62 = r61 instanceof Object ? r61 : r59;
r62.baseVariantName = r26.baseVariantName;
r62.baseVariantSkuId = r26.baseVariantSkuId;
r62.variantLabel = r26.variantLabel;
r62.variantValue = r26.variantValue;
return r62;
}).filter((item) => item != null) : void 0;
let googleSkuIds = r6.googleSkuIds;
if (googleSkuIds == null) {
const r60 = {};
r60[PriceSetAssignmentPurchaseTypes.MOBILE] = "";
r60[PriceSetAssignmentPurchaseTypes.MOBILE_PREMIUM_TIER_2] = "";
googleSkuIds = r60;
}
r30.googleSkuIds = googleSkuIds;
r30.isFirstParty = collectibles.isFirstParty;
const bundledSkus = r6.bundledSkus;
r30.bundledProducts = bundledSkus == null ? void 0 : bundledSkus.map((bundledSku) => {
const collectibles = bundledSku.tenantMetadata?.collectibles;
return collectibles == null ? null : new CollectiblesBundledProductRecord({
type: collectibles.type,
premiumType: collectibles.premiumType !== PREMIUM_TYPE_NONE ? collectibles.premiumType : null,
name: bundledSku.name,
skuId: bundledSku.id,
summary: bundledSku.summary,
prices: bundledSku.prices
});
}).filter((item) => item != null);
const prototypeOf = Object.getPrototypeOf(CollectiblesProductRecord);
const r78 = Object.create(CollectiblesProductRecord.prototype);
const r80 = $callWithNewTarget(prototypeOf, r78, CollectiblesProductRecord, r30);
const r81 = r80 instanceof Object ? r80 : r78;
r81.summary = r30.summary;
r81.type = r30.type;
r81.premiumType = r30.premiumType;
r81.items = r30.items;
r81.categorySkuId = r30.categorySkuId;
r81.isCategoryReward = r30.isCategoryReward;
r81.prices = r30.prices;
r81.bundledProducts = r30.bundledProducts;
r81.previewAssets = r30.previewAssets;
r81.googleSkuIds = r30.googleSkuIds;
r81.variants = r30.variants;
r81.eligibleOffers = r30.eligibleOffers;
r81.badgeOverride = r30.badgeOverride;
r81.hideBadge = r30.hideBadge;
r81.isFirstParty = r30.isFirstParty;
return r81;
}
}
}
};
CollectiblesProductRecord2.prototype;
CollectiblesProductRecord = CollectiblesProductRecord2;
class CollectiblesVariantProductRecord extends CollectiblesProductRecord {
constructor(a0) {
super(a0);
this.baseVariantName = a0.baseVariantName;
this.baseVariantSkuId = a0.baseVariantSkuId;
this.variantLabel = a0.variantLabel;
this.variantValue = a0.variantValue;
}
static fromServer({ base_variant_name, base_variant_sku_id, variant_label, variant_value, ...rest }) {
const r2 = {
...Reflect.get(Object.getPrototypeOf(CollectiblesVariantProductRecord), "fromServer", this).call(this, rest),
baseVariantName: base_variant_name,
baseVariantSkuId: base_variant_sku_id,
variantLabel: variant_label,
variantValue: variant_value
};
const prototypeOf = Object.getPrototypeOf(CollectiblesVariantProductRecord);
const r25 = Object.create(CollectiblesVariantProductRecord.prototype);
const r27 = $callWithNewTarget(prototypeOf, r25, CollectiblesVariantProductRecord, r2);
const r28 = r27 instanceof Object ? r27 : r25;
r28.baseVariantName = r2.baseVariantName;
r28.baseVariantSkuId = r2.baseVariantSkuId;
r28.variantLabel = r2.variantLabel;
r28.variantValue = r2.variantValue;
return r28;
}
}
export default CollectiblesProductRecord;
export { CollectiblesVariantProductRecord };
@@ -0,0 +1,68 @@
// Metro module 5826 (f5827).
import CollectiblesBundledProductRecord from "./CollectiblesBundledProductRecord";
import { createCollectiblesItemsFromServerResponse } from "./CollectiblesItemRecord";
import { CollectiblesVariantProductRecord } from "./CollectiblesProductRecord";
import { REWARD_CATEGORY_AND_REWARD_SKU_IDS } from "../CollectiblesShopConstants";
import { PREMIUM_TYPE_NONE } from "../../../Constants";
import getPricesFromServer from "../../skus/utils/getPricesFromServer";
class CollectiblesPurchaseRecord {
constructor(a0) {
this.skuId = a0.skuId;
this.name = a0.name;
this.type = a0.type;
this.premiumType = a0.premiumType;
this.items = a0.items;
this.categorySkuId = a0.categorySkuId;
this.isCategoryReward = a0.isCategoryReward;
this.prices = a0.prices;
this.bundledProducts = a0.bundledProducts;
this.googleSkuIds = a0.googleSkuIds;
this.variants = a0.variants;
this.eligibleOffers = a0.eligibleOffers;
this.baseVariantName = a0.baseVariantName;
this.baseVariantSkuId = a0.baseVariantSkuId;
this.variantLabel = a0.variantLabel;
this.variantValue = a0.variantValue;
this.purchasedAt = a0.purchasedAt;
this.purchaseType = a0.purchaseType;
this.expiresAt = a0.expiresAt;
}
static fromServer({ type, sku_id, name, premium_type, category_sku_id, prices, bundled_products, variants, base_variant_name, base_variant_sku_id, variant_label, variant_value, purchased_at, purchase_type, expires_at, ...rest }) {
const premiumType = premium_type !== PREMIUM_TYPE_NONE ? premium_type : null;
const isCategoryReward = REWARD_CATEGORY_AND_REWARD_SKU_IDS.some((item) => item.rewardSkuId === sku_id);
const pricesFromServer = getPricesFromServer(prices);
const collectiblesItemsFromServerResponse = createCollectiblesItemsFromServerResponse(rest.items);
const bundledProducts = bundled_products == null ? void 0 : bundled_products.map(CollectiblesBundledProductRecord.fromServer);
const variants2 = variants == null ? void 0 : variants.map(CollectiblesVariantProductRecord.fromServer);
const { google_sku_ids, eligible_offers } = rest;
let purchasedAt = purchased_at;
if (purchasedAt != null) {
purchasedAt = new Date(purchased_at);
}
const expiresAt = expires_at != null ? new Date(expires_at) : null;
const r70 = {
__proto__: CollectiblesPurchaseRecord.prototype
};
r70.skuId = sku_id;
r70.name = name;
r70.type = type;
r70.premiumType = premiumType;
r70.items = collectiblesItemsFromServerResponse;
r70.categorySkuId = category_sku_id;
r70.isCategoryReward = isCategoryReward;
r70.prices = pricesFromServer;
r70.bundledProducts = bundledProducts;
r70.googleSkuIds = google_sku_ids;
r70.variants = variants2;
r70.eligibleOffers = eligible_offers;
r70.baseVariantName = base_variant_name;
r70.baseVariantSkuId = base_variant_sku_id;
r70.variantLabel = variant_label;
r70.variantValue = variant_value;
r70.purchasedAt = purchasedAt;
r70.purchaseType = purchase_type;
r70.expiresAt = expiresAt;
return r70;
}
}
export default CollectiblesPurchaseRecord;
@@ -0,0 +1,76 @@
// Metro module 5827 (f5828).
import CollectiblesCategoryRecord from "./CollectiblesCategoryRecord";
import { CountdownTimerBlockRecord } from "./CountdownTimerBlockRecord";
import { FeaturedBlockRecord } from "./FeaturedBlockRecord";
import { FeedBlockRecord } from "./FeedBlockRecord";
import { FramesBannerBlockRecord } from "./FramesBannerBlockRecord";
import { FramesProductShelfBlockRecord } from "./FramesProductShelfBlockRecord";
import { GameServerHostingBannerBlockRecord } from "./GameServerHostingBannerBlockRecord";
import { HeroBlockRecord } from "./HeroBlockRecord";
import { ImmersiveBannerBlockRecord } from "./ImmersiveBannerBlockRecord";
import { RewardHeroBlockRecord } from "./RewardHeroBlockRecord";
import { ShelfBlockRecord } from "./ShelfBlockRecord";
import { SocialLayerStorefrontPromotionalBannerBlockRecord } from "./SocialLayerStorefrontPromotionalBannerBlockRecord";
import { WideBannerBlockRecord } from "./WideBannerBlockRecord";
import { ShopBlockType } from "../../../_bundle/Module5829";
function $mk77204() {
return (a0) => a0 !== void 0;
}
let $mk77203 = function() {
return (a0) => {
const type = a0.type;
if (ShopBlockType.HERO === type) {
return HeroBlockRecord.fromServer(a0);
}
if (ShopBlockType.FEATURED === type) {
return FeaturedBlockRecord.fromServer(a0);
}
if (ShopBlockType.FEED === type) {
return FeedBlockRecord.fromServer(a0);
}
if (ShopBlockType.WIDE_BANNER === type) {
return WideBannerBlockRecord.fromServer(a0);
}
if (ShopBlockType.SHELF === type) {
return ShelfBlockRecord.fromServer(a0);
}
if (ShopBlockType.COUNTDOWN_TIMER === type) {
return CountdownTimerBlockRecord.fromServer(a0);
}
if (ShopBlockType.IMMERSIVE_BANNER === type) {
return ImmersiveBannerBlockRecord.fromServer(a0);
}
if (ShopBlockType.REWARD_HERO === type) {
return RewardHeroBlockRecord.fromServer(a0);
}
if (ShopBlockType.SOCIAL_LAYER_STOREFRONT_PROMOTIONAL_BANNER === type) {
return SocialLayerStorefrontPromotionalBannerBlockRecord.fromServer(a0);
}
if (ShopBlockType.FRAMES_BANNER === type) {
return FramesBannerBlockRecord.fromServer(a0);
}
if (ShopBlockType.FRAMES_PRODUCT_SHELF === type) {
return FramesProductShelfBlockRecord.fromServer(a0);
}
if (ShopBlockType.GAME_SERVER_HOSTING_BANNER === type) {
return GameServerHostingBannerBlockRecord.fromServer(a0);
}
};
}, $mk77205 = function() {
return (a0) => CollectiblesCategoryRecord.fromServer(a0);
};
class CollectiblesShopHomeRecord {
constructor(a0) {
this.shopBlocks = a0.shop_blocks.map($mk77203()).filter($mk77204());
this.categories = a0.categories.map($mk77205());
}
static fromServer(a0) {
const r11 = {
__proto__: CollectiblesShopHomeRecord.prototype
};
r11.shopBlocks = a0.shop_blocks.map($mk77203()).filter($mk77204());
r11.categories = a0.categories.map($mk77205());
return r11;
}
}
export { CollectiblesShopHomeRecord };
@@ -0,0 +1,44 @@
// Metro module 5807 (f5808).
import Record from "../../../lib/Record";
import tinycolor from "../../../_bundle/tinycolor";
import { int2hex } from "../../../_bundle/int2hslRaw";
import { $callWithNewTarget } from "../../../_hermes/prelude";
class CollectiblesStoreListingRecord extends Record {
constructor(a0) {
super();
this.storeListingId = a0.storeListingId;
this.skuId = a0.skuId;
this.name = a0.name;
const summary = a0.summary;
this.summary = summary == null ? void 0 : summary.trim();
this.styles = a0.styles;
}
static fromServer({ store_listing_id, sku_id, styles, ...rest }) {
let styles2 = styles;
if (styles2 != null) {
styles2 = {
backgroundColors: styles.background_colors.map((background_color) => tinycolor(int2hex(background_color))),
buttonColors: styles.button_colors.map((button_color) => tinycolor(int2hex(button_color))),
confettiColors: styles.confetti_colors.map((confetti_color) => tinycolor(int2hex(confetti_color)))
};
}
const r2 = {
...rest,
storeListingId: store_listing_id,
skuId: sku_id,
styles: styles2
};
const prototypeOf = Object.getPrototypeOf(CollectiblesStoreListingRecord);
const r34 = Object.create(CollectiblesStoreListingRecord.prototype);
const r35 = $callWithNewTarget(prototypeOf, r34, CollectiblesStoreListingRecord);
const r36 = r35 instanceof Object ? r35 : r34;
r36.storeListingId = r2.storeListingId;
r36.skuId = r2.skuId;
r36.name = r2.name;
const summary = r2.summary;
r36.summary = summary == null ? void 0 : summary.trim();
r36.styles = r2.styles;
return r36;
}
}
export default CollectiblesStoreListingRecord;
@@ -0,0 +1,27 @@
// Metro module 5818 (f5819).
import Record from "../../../lib/Record";
import tinycolor from "../../../_bundle/tinycolor";
import { int2hex } from "../../../_bundle/int2hslRaw";
import { $callWithNewTarget } from "../../../_hermes/prelude";
class CollectiblesStoreListingStylesRecord extends Record {
constructor(a0) {
super();
this.backgroundColors = a0.backgroundColors;
this.buttonColors = a0.buttonColors;
this.confettiColors = a0.confettiColors;
}
static fromServer({ background_colors, button_colors, confetti_colors }) {
const backgroundColors = background_colors.map((background_color) => tinycolor(int2hex(background_color)));
const buttonColors = button_colors.map((button_color) => tinycolor(int2hex(button_color)));
const confettiColors = confetti_colors.map((confetti_color) => tinycolor(int2hex(confetti_color)));
const prototypeOf = Object.getPrototypeOf(CollectiblesStoreListingStylesRecord);
const r21 = Object.create(CollectiblesStoreListingStylesRecord.prototype);
const r22 = $callWithNewTarget(prototypeOf, r21, CollectiblesStoreListingStylesRecord);
const r23 = r22 instanceof Object ? r22 : r21;
r23.backgroundColors = backgroundColors;
r23.buttonColors = buttonColors;
r23.confettiColors = confettiColors;
return r23;
}
}
export default CollectiblesStoreListingStylesRecord;
@@ -0,0 +1,25 @@
// Metro module 5828 (f5829).
import { ShopBlockType } from "../../../_bundle/Module5829";
class CountdownTimerBlockRecord {
type = ShopBlockType.COUNTDOWN_TIMER;
constructor(a0) {
this.title = a0.title;
this.body = a0.body;
this.bannerUrl = a0.banner_url;
this.endTime = new Date(a0.end_time);
this.textColor = a0.text_color;
}
static fromServer(a0) {
const r11 = {
__proto__: CountdownTimerBlockRecord.prototype
};
r11.type = ShopBlockType.COUNTDOWN_TIMER;
r11.title = a0.title;
r11.body = a0.body;
r11.bannerUrl = a0.banner_url;
r11.endTime = new Date(a0.end_time);
r11.textColor = a0.text_color;
return r11;
}
}
export { CountdownTimerBlockRecord };
@@ -0,0 +1,31 @@
// Metro module 5830 (f5831).
import { FeaturedCategorySubblockRecord } from "./FeaturedCategorySubblockRecord";
import { ShopBlockType } from "../../../_bundle/Module5829";
import { FeaturedSubblockType } from "../../../_bundle/Module5832";
let $mk77206 = function() {
return (a0) => {
let r11;
if (a0.type === FeaturedSubblockType.CATEGORY) {
r11 = FeaturedCategorySubblockRecord.fromServer(a0);
} else {
a0.type;
r11 = a0;
}
return r11;
};
};
class FeaturedBlockRecord {
type = ShopBlockType.FEATURED;
constructor(a0) {
this.subblocks = a0.subblocks.map($mk77206());
}
static fromServer(a0) {
const r10 = {
__proto__: FeaturedBlockRecord.prototype
};
r10.type = ShopBlockType.FEATURED;
r10.subblocks = a0.subblocks.map($mk77206());
return r10;
}
}
export { FeaturedBlockRecord };
@@ -0,0 +1,29 @@
// Metro module 5831 (f5832).
import { FeaturedSubblockType } from "../../../_bundle/Module5832";
class FeaturedCategorySubblockRecord {
type = FeaturedSubblockType.CATEGORY;
constructor(a0) {
this.categoryStoreListingId = a0.category_store_listing_id;
this.name = a0.name;
this.unpublishedAt = a0.unpublished_at != null ? new Date(a0.unpublished_at) : null;
this.bodyText = a0.body_text;
this.bannerTextColor = a0.banner_text_color;
this.bannerUrl = a0.banner_url;
this.assetUrl = a0.asset_url;
}
static fromServer(a0) {
const r12 = {
__proto__: FeaturedCategorySubblockRecord.prototype
};
r12.type = FeaturedSubblockType.CATEGORY;
r12.categoryStoreListingId = a0.category_store_listing_id;
r12.name = a0.name;
r12.unpublishedAt = a0.unpublished_at != null ? new Date(a0.unpublished_at) : null;
r12.bodyText = a0.body_text;
r12.bannerTextColor = a0.banner_text_color;
r12.bannerUrl = a0.banner_url;
r12.assetUrl = a0.asset_url;
return r12;
}
}
export { FeaturedCategorySubblockRecord };
@@ -0,0 +1,19 @@
// Metro module 5833 (f5834).
import { ShopBlockType } from "../../../_bundle/Module5829";
class FeedBlockRecord {
type = ShopBlockType.FEED;
constructor(a0) {
this.rankedSkuIds = a0.ranked_sku_ids;
this.sortedSkuIds = a0.sorted_sku_ids;
}
static fromServer(a0) {
const r9 = {
__proto__: FeedBlockRecord.prototype
};
r9.type = ShopBlockType.FEED;
r9.rankedSkuIds = a0.ranked_sku_ids;
r9.sortedSkuIds = a0.sorted_sku_ids;
return r9;
}
}
export { FeedBlockRecord };
@@ -0,0 +1,25 @@
// Metro module 5834 (f5835).
import { ShopBlockType } from "../../../_bundle/Module5829";
class FramesBannerBlockRecord {
type = ShopBlockType.FRAMES_BANNER;
constructor(a0) {
this.title = a0.title;
this.body = a0.body;
this.mobileBackgroundImage = a0.mobile_background_image;
this.mobileForegroundImage = a0.mobile_foreground_image;
this.desktopBackgroundImage = a0.desktop_background_image;
}
static fromServer(a0) {
const r9 = {
__proto__: FramesBannerBlockRecord.prototype
};
r9.type = ShopBlockType.FRAMES_BANNER;
r9.title = a0.title;
r9.body = a0.body;
r9.mobileBackgroundImage = a0.mobile_background_image;
r9.mobileForegroundImage = a0.mobile_foreground_image;
r9.desktopBackgroundImage = a0.desktop_background_image;
return r9;
}
}
export { FramesBannerBlockRecord };
@@ -0,0 +1,53 @@
// Metro module 5835 (f5836).
import { ShopBlockType } from "../../../_bundle/Module5829";
class FramesProductShelfBlockRecord {
type = ShopBlockType.FRAMES_PRODUCT_SHELF;
constructor(a0) {
this.title = a0.title;
this.categorySkuId = a0.category_sku_id;
this.categoryStoreListingId = a0.category_store_listing_id;
let ranked_sku_ids = a0.ranked_sku_ids;
if (ranked_sku_ids == null) {
ranked_sku_ids = [];
}
this.rankedSkuIds = ranked_sku_ids;
let desktop_background_image = a0.desktop_background_image;
if (desktop_background_image == null) {
desktop_background_image = a0.background_image;
}
this.desktopBackgroundImage = desktop_background_image;
let mobile_background_image = a0.mobile_background_image;
if (mobile_background_image == null) {
mobile_background_image = a0.background_image;
}
this.mobileBackgroundImage = mobile_background_image;
this.buttonText = a0.button_text;
}
static fromServer(a0) {
const r9 = {
__proto__: FramesProductShelfBlockRecord.prototype
};
r9.type = ShopBlockType.FRAMES_PRODUCT_SHELF;
r9.title = a0.title;
r9.categorySkuId = a0.category_sku_id;
r9.categoryStoreListingId = a0.category_store_listing_id;
let ranked_sku_ids = a0.ranked_sku_ids;
if (ranked_sku_ids == null) {
ranked_sku_ids = [];
}
r9.rankedSkuIds = ranked_sku_ids;
let desktop_background_image = a0.desktop_background_image;
if (desktop_background_image == null) {
desktop_background_image = a0.background_image;
}
r9.desktopBackgroundImage = desktop_background_image;
let mobile_background_image = a0.mobile_background_image;
if (mobile_background_image == null) {
mobile_background_image = a0.background_image;
}
r9.mobileBackgroundImage = mobile_background_image;
r9.buttonText = a0.button_text;
return r9;
}
}
export { FramesProductShelfBlockRecord };
@@ -0,0 +1,17 @@
// Metro module 5836 (f5837).
import { ShopBlockType } from "../../../_bundle/Module5829";
class GameServerHostingBannerBlockRecord {
type = ShopBlockType.GAME_SERVER_HOSTING_BANNER;
constructor(a0) {
this.isDismissible = a0.is_dismissible;
}
static fromServer(a0) {
const r9 = {
__proto__: GameServerHostingBannerBlockRecord.prototype
};
r9.type = ShopBlockType.GAME_SERVER_HOSTING_BANNER;
r9.isDismissible = a0.is_dismissible;
return r9;
}
}
export { GameServerHostingBannerBlockRecord };
@@ -0,0 +1,31 @@
// Metro module 5837 (f5838).
import { ShopBlockType } from "../../../_bundle/Module5829";
import { getAssetDisplayConfig } from "../CollectiblesUtils";
class HeroBlockRecord {
type = ShopBlockType.HERO;
constructor(a0) {
this.categorySkuId = a0.category_sku_id;
this.name = a0.name;
this.summary = a0.summary.trim();
this.categoryStoreListingId = a0.category_store_listing_id;
this.title = a0.title;
this.rankedSkuIds = a0.ranked_sku_ids;
this.unpublishedAt = a0.unpublished_at != null ? new Date(a0.unpublished_at) : null;
this.bannerTextColor = a0.banner_text_color;
this.mobileTitle = a0.mobile_title;
this.mobileSummary = a0.mobile_summary;
this.mobileProductsTitle = a0.mobile_products_title;
this.heroBannerUrl = a0.hero_banner_url;
this.heroBannerAnimatedUrl = a0.hero_banner_animated_url;
this.heroRiveUrl = a0.hero_rive_url;
this.heroLogoUrl = a0.hero_logo_url;
this.mobileHeroUrl = a0.mobile_hero_url;
this.mobileHeroAnimatedUrl = a0.mobile_hero_animated_url;
this.bannerDisplayConfig = getAssetDisplayConfig(a0.banner_display_config);
this.logoDisplayConfig = getAssetDisplayConfig(a0.logo_display_config);
}
static fromServer(a0) {
return new HeroBlockRecord(a0);
}
}
export { HeroBlockRecord };
@@ -0,0 +1,29 @@
// Metro module 5838 (f5839).
import { ShopBlockType } from "../../../_bundle/Module5829";
class ImmersiveBannerBlockRecord {
type = ShopBlockType.IMMERSIVE_BANNER;
constructor(a0) {
this.title = a0.title;
this.body = a0.body;
this.helpCenterUrl = a0.help_center_url;
this.textColor = a0.text_color;
this.endTime = a0.end_time != null ? new Date(a0.end_time) : void 0;
this.bannerUrl = a0.banner_url;
this.bannerAnimatedUrl = a0.banner_animated_url;
}
static fromServer(a0) {
const r13 = {
__proto__: ImmersiveBannerBlockRecord.prototype
};
r13.type = ShopBlockType.IMMERSIVE_BANNER;
r13.title = a0.title;
r13.body = a0.body;
r13.helpCenterUrl = a0.help_center_url;
r13.textColor = a0.text_color;
r13.endTime = a0.end_time != null ? new Date(a0.end_time) : void 0;
r13.bannerUrl = a0.banner_url;
r13.bannerAnimatedUrl = a0.banner_animated_url;
return r13;
}
}
export { ImmersiveBannerBlockRecord };
@@ -0,0 +1,32 @@
// Metro module 1899 (f1900).
import BaseCollectiblesItemRecord from "./BaseCollectiblesItemRecord";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
import { $callWithNewTarget } from "../../../_hermes/prelude";
class NameplateRecord extends BaseCollectiblesItemRecord {
type = CollectiblesItemType.NAMEPLATE;
constructor(a0) {
super(a0);
this.asset = a0.asset;
this.label = a0.label;
this.palette = a0.palette;
}
static fromServer(a0) {
const r2 = {
...Reflect.get(Object.getPrototypeOf(NameplateRecord), "fromServer", this).call(this, a0),
...a0
};
const prototypeOf = Object.getPrototypeOf(NameplateRecord);
const r20 = Object.create(NameplateRecord.prototype);
const r22 = $callWithNewTarget(prototypeOf, r20, NameplateRecord, r2);
const r23 = r22 instanceof Object ? r22 : r20;
r23.type = CollectiblesItemType.NAMEPLATE;
r23.asset = r2.asset;
r23.label = r2.label;
r23.palette = r2.palette;
return r23;
}
}
export default NameplateRecord;
export function isNameplateRecord(a0) {
return a0 instanceof NameplateRecord;
}
@@ -0,0 +1,47 @@
// Metro module 5804 (f5805).
import BaseCollectiblesItemRecord from "./BaseCollectiblesItemRecord";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
import { $callWithNewTarget } from "../../../_hermes/prelude";
const r14 = {
FromLoop: "fromLoop",
FromStart: "fromStart"
};
class ProfileEffectRecord extends BaseCollectiblesItemRecord {
type = CollectiblesItemType.PROFILE_EFFECT;
constructor(a0) {
super(a0);
this.title = a0.title;
this.description = a0.description;
this.accessibilityLabel = a0.accessibilityLabel;
this.reducedMotionSrc = a0.reducedMotionSrc;
this.thumbnailPreviewSrc = a0.thumbnailPreviewSrc;
this.effects = a0.effects;
this.animationType = a0.animationType;
this.staticFrameSrc = a0.staticFrameSrc;
}
static fromServer(a0) {
const r2 = {
...Reflect.get(Object.getPrototypeOf(ProfileEffectRecord), "fromServer", this).call(this, a0),
...a0
};
const prototypeOf = Object.getPrototypeOf(ProfileEffectRecord);
const r20 = Object.create(ProfileEffectRecord.prototype);
const r22 = $callWithNewTarget(prototypeOf, r20, ProfileEffectRecord, r2);
const r23 = r22 instanceof Object ? r22 : r20;
r23.type = CollectiblesItemType.PROFILE_EFFECT;
r23.title = r2.title;
r23.description = r2.description;
r23.accessibilityLabel = r2.accessibilityLabel;
r23.reducedMotionSrc = r2.reducedMotionSrc;
r23.thumbnailPreviewSrc = r2.thumbnailPreviewSrc;
r23.effects = r2.effects;
r23.animationType = r2.animationType;
r23.staticFrameSrc = r2.staticFrameSrc;
return r23;
}
}
export default ProfileEffectRecord;
export { r14 as RestartMethod };
export function isProfileEffectRecord(a0) {
return a0 instanceof ProfileEffectRecord;
}
@@ -0,0 +1,42 @@
// Metro module 5805 (f5806).
import BaseCollectiblesItemRecord from "./BaseCollectiblesItemRecord";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
import { $callWithNewTarget } from "../../../_hermes/prelude";
class ProfileFrameRecord extends BaseCollectiblesItemRecord {
type = CollectiblesItemType.PROFILE_FRAME;
constructor(a0) {
super(a0);
this.label = a0.label;
this.layers = a0.layers;
this.innerWidth = a0.innerWidth;
this.overflowTop = a0.overflowTop;
this.overflowBottom = a0.overflowBottom;
this.overflowHorizontal = a0.overflowHorizontal;
}
static fromServer({ inner_width, overflow_top, overflow_bottom, overflow_horizontal, ...rest }) {
const r2 = {
...Reflect.get(Object.getPrototypeOf(ProfileFrameRecord), "fromServer", this).call(this, rest),
...rest,
innerWidth: inner_width,
overflowTop: overflow_top,
overflowBottom: overflow_bottom,
overflowHorizontal: overflow_horizontal
};
const prototypeOf = Object.getPrototypeOf(ProfileFrameRecord);
const r28 = Object.create(ProfileFrameRecord.prototype);
const r30 = $callWithNewTarget(prototypeOf, r28, ProfileFrameRecord, r2);
const r31 = r30 instanceof Object ? r30 : r28;
r31.type = CollectiblesItemType.PROFILE_FRAME;
r31.label = r2.label;
r31.layers = r2.layers;
r31.innerWidth = r2.innerWidth;
r31.overflowTop = r2.overflowTop;
r31.overflowBottom = r2.overflowBottom;
r31.overflowHorizontal = r2.overflowHorizontal;
return r31;
}
}
export default ProfileFrameRecord;
export function isProfileFrameRecord(a0) {
return a0 instanceof ProfileFrameRecord;
}
@@ -0,0 +1,32 @@
// Metro module 5839 (f5840).
import { ShopBlockType } from "../../../_bundle/Module5829";
import { getAssetDisplayConfig } from "../CollectiblesUtils";
class RewardHeroBlockRecord {
type = ShopBlockType.REWARD_HERO;
constructor(a0) {
this.categorySkuId = a0.category_sku_id;
this.name = a0.name;
this.summary = a0.summary.trim();
this.categoryStoreListingId = a0.category_store_listing_id;
this.title = a0.title;
this.rankedSkuIds = a0.ranked_sku_ids;
this.unpublishedAt = a0.unpublished_at != null ? new Date(a0.unpublished_at) : null;
this.bannerTextColor = a0.banner_text_color;
this.mobileTitle = a0.mobile_title;
this.mobileSummary = a0.mobile_summary;
this.mobileProductsTitle = a0.mobile_products_title;
this.rewardSkuId = a0.reward_sku_id;
this.heroBannerUrl = a0.hero_banner_url;
this.heroBannerAnimatedUrl = a0.hero_banner_animated_url;
this.heroRiveUrl = a0.hero_rive_url;
this.heroLogoUrl = a0.hero_logo_url;
this.mobileHeroUrl = a0.mobile_hero_url;
this.mobileHeroAnimatedUrl = a0.mobile_hero_animated_url;
this.logoDisplayConfig = getAssetDisplayConfig(a0.logo_display_config);
this.bannerDisplayConfig = getAssetDisplayConfig(a0.banner_display_config);
}
static fromServer(a0) {
return new RewardHeroBlockRecord(a0);
}
}
export { RewardHeroBlockRecord };
@@ -0,0 +1,71 @@
// Metro module 5840 (f5841).
import { ShopBlockType } from "../../../_bundle/Module5829";
class ShelfBlockRecord {
type = ShopBlockType.SHELF;
constructor(a0) {
this.name = a0.name;
this.rankedSkuIds = a0.ranked_sku_ids;
let category_sku_id = a0.category_sku_id;
if (category_sku_id == null) {
category_sku_id = null;
}
this.categorySkuId = category_sku_id;
this.showButton = a0.show_button !== false;
let button_text = a0.button_text;
if (button_text == null) {
button_text = null;
}
this.buttonText = button_text;
let title_color = a0.title_color;
if (title_color == null) {
title_color = null;
}
this.titleColor = title_color;
let desktop_background_image = a0.desktop_background_image;
if (desktop_background_image == null) {
desktop_background_image = null;
}
this.desktopBackgroundImage = desktop_background_image;
let mobile_background_image = a0.mobile_background_image;
if (mobile_background_image == null) {
mobile_background_image = null;
}
this.mobileBackgroundImage = mobile_background_image;
}
static fromServer(a0) {
const r10 = {
__proto__: ShelfBlockRecord.prototype
};
r10.type = ShopBlockType.SHELF;
r10.name = a0.name;
r10.rankedSkuIds = a0.ranked_sku_ids;
let category_sku_id = a0.category_sku_id;
if (category_sku_id == null) {
category_sku_id = null;
}
r10.categorySkuId = category_sku_id;
r10.showButton = a0.show_button !== false;
let button_text = a0.button_text;
if (button_text == null) {
button_text = null;
}
r10.buttonText = button_text;
let title_color = a0.title_color;
if (title_color == null) {
title_color = null;
}
r10.titleColor = title_color;
let desktop_background_image = a0.desktop_background_image;
if (desktop_background_image == null) {
desktop_background_image = null;
}
r10.desktopBackgroundImage = desktop_background_image;
let mobile_background_image = a0.mobile_background_image;
if (mobile_background_image == null) {
mobile_background_image = null;
}
r10.mobileBackgroundImage = mobile_background_image;
return r10;
}
}
export { ShelfBlockRecord };
@@ -0,0 +1,40 @@
// Metro module 5811 (f5812).
class AssetDisplayConfigRecord {
constructor(a0) {
this.desktopMaxHeight = a0.desktop_max_height;
this.mobileMaxHeight = a0.mobile_max_height;
this.responsive = a0.responsive;
this.backgroundStyle = a0.background_style;
}
static fromServer(a0) {
const r8 = {
__proto__: AssetDisplayConfigRecord.prototype
};
r8.desktopMaxHeight = a0.desktop_max_height;
r8.mobileMaxHeight = a0.mobile_max_height;
r8.responsive = a0.responsive;
r8.backgroundStyle = a0.background_style;
return r8;
}
toDesktopStyles() {
const r3 = {};
if (this.desktopMaxHeight != null) {
r3.maxHeight = this.desktopMaxHeight;
}
if (this.backgroundStyle != null) {
r3.background = this.backgroundStyle;
}
return Object.keys(r3).length > 0 ? r3 : void 0;
}
toMobileStyles() {
const r3 = {};
if (this.mobileMaxHeight != null) {
r3.maxHeight = this.mobileMaxHeight;
}
if (this.backgroundStyle != null) {
r3.background = this.backgroundStyle;
}
return Object.keys(r3).length > 0 ? r3 : void 0;
}
}
export { AssetDisplayConfigRecord };
@@ -0,0 +1,31 @@
// Metro module 5841 (f5842).
import { ShopBlockType } from "../../../_bundle/Module5829";
class SocialLayerStorefrontPromotionalBannerBlockRecord {
type = ShopBlockType.SOCIAL_LAYER_STOREFRONT_PROMOTIONAL_BANNER;
constructor(a0) {
this.applicationId = a0.application_id;
this.headerText = a0.header_text;
this.gradientColors = a0.gradient_colors;
this.gradientAngle = a0.gradient_angle;
this.skuIds = a0.sku_ids;
this.endTime = a0.end_time;
this.ctaType = a0.cta_type;
this.logoUrl = a0.logo_url;
}
static fromServer(a0) {
const r9 = {
__proto__: SocialLayerStorefrontPromotionalBannerBlockRecord.prototype
};
r9.type = ShopBlockType.SOCIAL_LAYER_STOREFRONT_PROMOTIONAL_BANNER;
r9.applicationId = a0.application_id;
r9.headerText = a0.header_text;
r9.gradientColors = a0.gradient_colors;
r9.gradientAngle = a0.gradient_angle;
r9.skuIds = a0.sku_ids;
r9.endTime = a0.end_time;
r9.ctaType = a0.cta_type;
r9.logoUrl = a0.logo_url;
return r9;
}
}
export { SocialLayerStorefrontPromotionalBannerBlockRecord };
@@ -0,0 +1,26 @@
// Metro module 5806 (f5807).
import BaseCollectiblesItemRecord from "./BaseCollectiblesItemRecord";
import { CollectiblesItemType } from "../../../_bundle/Module1901";
import { $callWithNewTarget } from "../../../_hermes/prelude";
class UnknownCollectiblesItemRecord extends BaseCollectiblesItemRecord {
type = CollectiblesItemType.NONE;
constructor(a0) {
super(a0);
}
static fromServer(a0) {
const r5 = {
...Reflect.get(Object.getPrototypeOf(UnknownCollectiblesItemRecord), "fromServer", this).call(this, a0),
type: CollectiblesItemType.NONE
};
const prototypeOf = Object.getPrototypeOf(UnknownCollectiblesItemRecord);
const r23 = Object.create(UnknownCollectiblesItemRecord.prototype);
const r25 = $callWithNewTarget(prototypeOf, r23, UnknownCollectiblesItemRecord, r5);
const r26 = r25 instanceof Object ? r25 : r23;
r26.type = CollectiblesItemType.NONE;
return r26;
}
}
export default UnknownCollectiblesItemRecord;
export function isUnknownCollectiblesItemRecord(a0) {
return a0 instanceof UnknownCollectiblesItemRecord;
}
@@ -0,0 +1,41 @@
// Metro module 5842 (f5843).
import { ShopBlockType } from "../../../_bundle/Module5829";
class WideBannerBlockRecord {
type = ShopBlockType.WIDE_BANNER;
constructor(a0) {
this.title = a0.title;
this.body = a0.body;
this.categoryStoreListingId = a0.category_store_listing_id;
this.bannerTextColor = a0.banner_text_color;
this.bannerBodyTextColor = a0.banner_body_text_color;
this.disableCta = a0.disable_cta;
this.bannerURL = a0.wide_banner_url;
this.bannerAnimatedURL = a0.wide_banner_animated_url;
this.logoURL = a0.logo_url;
this.ctaText = a0.cta_text;
this.ctaRoute = a0.cta_route;
this.isDismissible = a0.is_dismissible;
this.dismissibleContentVersion = a0.dismissible_content_version;
}
static fromServer(a0) {
const r9 = {
__proto__: WideBannerBlockRecord.prototype
};
r9.type = ShopBlockType.WIDE_BANNER;
r9.title = a0.title;
r9.body = a0.body;
r9.categoryStoreListingId = a0.category_store_listing_id;
r9.bannerTextColor = a0.banner_text_color;
r9.bannerBodyTextColor = a0.banner_body_text_color;
r9.disableCta = a0.disable_cta;
r9.bannerURL = a0.wide_banner_url;
r9.bannerAnimatedURL = a0.wide_banner_animated_url;
r9.logoURL = a0.logo_url;
r9.ctaText = a0.cta_text;
r9.ctaRoute = a0.cta_route;
r9.isDismissible = a0.is_dismissible;
r9.dismissibleContentVersion = a0.dismissible_content_version;
return r9;
}
}
export { WideBannerBlockRecord };