decord/beta/source/modules/user_profile/WidgetAssetUtils.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

36 lines
984 B
TypeScript

// Module ID: 8937
// Function ID: 8938
// Name: WidgetAssetUtils
// Dependencies: [1078, 1401, 2]
// Exports: getWidgetAssetURL
// Module 8937 (WidgetAssetUtils)
import Constants from "Constants" /* 1078 */;
import AvatarUtils from "AvatarUtils" /* 1401 */;
import size from "module_2" /* 2 */;
const DEFAULT_CDN_HOST = Constants.DEFAULT_CDN_HOST;
const result = size.fileFinishedImporting("modules/user_profile/WidgetAssetUtils.tsx");
export const getWidgetAssetURL = function getWidgetAssetURL(arg0, fileId, arg2) {
let obj = arg2;
if (arg2 === undefined) {
obj = {};
}
let flag = obj.animated;
if (flag === undefined) {
flag = false;
}
if (CDN_HOST == null) {
CDN_HOST = DEFAULT_CDN_HOST;
}
let str = "webp";
if (!AvatarUtils.SUPPORTS_WEBP) {
let str2 = "png";
if (flag) {
str2 = "gif";
}
str = str2;
}
return "https://" + CDN_HOST + "/widget-assets/" + arg0 + "/" + fileId + "?format=" + str + "&animated=" + flag;
};