102 lines
3.3 KiB
TypeScript
102 lines
3.3 KiB
TypeScript
// Metro module 1853 (f1854).
|
|
export function parseSkuIdFromServerData(a0) {
|
|
let r7;
|
|
L7: {
|
|
if (typeof a0.skuId !== "string" && typeof a0.skuId !== "number") {
|
|
if (typeof a0.sku_id !== "string") {
|
|
const sku_id = a0.sku_id;
|
|
r7 = null;
|
|
if (typeof sku_id !== "number") {
|
|
break L7;
|
|
}
|
|
}
|
|
r7 = String(a0.sku_id);
|
|
} else {
|
|
r7 = String(a0.skuId);
|
|
}
|
|
}
|
|
return r7;
|
|
}
|
|
export function parseServerUserCollectibles(a0) {
|
|
let skuId;
|
|
let r2 = null;
|
|
if (typeof a0 === "object") {
|
|
const r1 = a0 == null;
|
|
r2 = null;
|
|
if (!r1) {
|
|
const r9 = "nameplate" in a0;
|
|
let r10 = null;
|
|
if (r9) {
|
|
const nameplate = a0.nameplate;
|
|
r10 = null;
|
|
if (typeof nameplate === "object") {
|
|
const nameplate2 = a0.nameplate;
|
|
let nameplate3 = null;
|
|
if (typeof nameplate2 === "object") {
|
|
const r12 = nameplate2 == null;
|
|
nameplate3 = null;
|
|
if (!r12) {
|
|
L13: {
|
|
if (typeof nameplate2.skuId !== "string" && typeof nameplate2.skuId !== "number") {
|
|
if (typeof nameplate2.sku_id !== "string") {
|
|
const sku_id = nameplate2.sku_id;
|
|
skuId = null;
|
|
if (typeof sku_id !== "number") {
|
|
break L13;
|
|
}
|
|
}
|
|
skuId = String(nameplate2.sku_id);
|
|
} else {
|
|
skuId = String(nameplate2.skuId);
|
|
}
|
|
}
|
|
const r24 = skuId == null;
|
|
nameplate3 = null;
|
|
if (!r24) {
|
|
const r26 = "label" in nameplate2;
|
|
nameplate3 = null;
|
|
if (r26) {
|
|
const label = nameplate2.label;
|
|
nameplate3 = null;
|
|
if (typeof label === "string") {
|
|
const r29 = "palette" in nameplate2;
|
|
nameplate3 = null;
|
|
if (r29) {
|
|
const palette = nameplate2.palette;
|
|
nameplate3 = null;
|
|
if (typeof palette === "string") {
|
|
const r31 = {
|
|
skuId,
|
|
label: nameplate2.label,
|
|
palette: nameplate2.palette
|
|
};
|
|
if ("asset" in nameplate2 && typeof nameplate2.asset === "string") {
|
|
r31.asset = nameplate2.asset;
|
|
}
|
|
if ("expiresAt" in nameplate2 && typeof nameplate2.expiresAt === "number") {
|
|
r31.expiresAt = nameplate2.expiresAt;
|
|
}
|
|
const r43 = "expires_at" in nameplate2 && typeof nameplate2.expires_at === "number";
|
|
nameplate3 = r31;
|
|
if (r43) {
|
|
r31.expiresAt = nameplate2.expires_at;
|
|
nameplate3 = r31;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
r10 = {
|
|
nameplate: nameplate3
|
|
};
|
|
}
|
|
}
|
|
r2 = r10;
|
|
}
|
|
}
|
|
return r2;
|
|
}
|