decord/alpha/source/modules/collectibles/utils/CollectiblesAssetUtils.tsx
github-actions 1224ea86fd chore: update source for alpha 348.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-26 08:31:33 +00:00

39 lines
1.3 KiB
TypeScript

// Module ID: 1968
// Function ID: 1969
// Name: CollectiblesAssetUtils
// Dependencies: [2, 1967]
// Exports: getCollectiblesItemAssetUrl
// Module 1968 (CollectiblesAssetUtils)
import mappers from "mappers" /* 1967 */;
import size from "module_2" /* 2 */;
let str = "https://cdn.discordapp.com";
if ("production" !== window.GLOBAL_ENV.PROJECT_ENV) {
const _window = window;
let str2 = "http://localhost:3000/_storage";
if ("staging" === window.GLOBAL_ENV.PROJECT_ENV) {
str2 = "https://staging-cdn.discord.co";
}
str = str2;
}
const result = size.fileFinishedImporting("modules/collectibles/utils/CollectiblesAssetUtils.tsx");
export const parseSkuIdFromServerData = mappers.parseSkuIdFromServerData;
export const CollectiblesItemAssetFormat = { ANIMATED: "animated", STATIC: "static", VIDEO: "video" };
export const BASE_URL_BY_RELEASE_CHANNEL = str;
export const getCollectiblesItemAssetUrl = function getCollectiblesItemAssetUrl(arg0) {
({ skuId, assetFormat, assetId } = arg0);
let combined = null;
if (null != skuId) {
const _Boolean = Boolean;
let str2 = "";
if (Boolean(assetId)) {
const _HermesInternal = HermesInternal;
str2 = "" + assetId + "/";
}
const _HermesInternal2 = HermesInternal;
combined = "" + tmp2 + "/media/v1/collectibles-shop/" + skuId + "/" + str2 + assetFormat;
}
return combined;
};