decord/source/modules/user_profile/WidgetAssetUtils.tsx
2026-08-25 06:04:03 +00:00

36 lines
962 B
TypeScript

// Module ID: 12663
// Function ID: 12664
// Name: getWidgetAssetURL
// Dependencies: [676, 1435, 2]
// Exports: getWidgetAssetURL
// Module 12663 (getWidgetAssetURL)
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import getAvatarURL from "getAvatarURL" /* 1435 */;
const DEFAULT_CDN_HOST = ME.DEFAULT_CDN_HOST;
const result = set.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 (!getAvatarURL.SUPPORTS_WEBP) {
let str2 = "png";
if (flag) {
str2 = "gif";
}
str = str2;
}
return "https://" + CDN_HOST + "/widget-assets/" + arg0 + "/" + fileId + "?format=" + str + "&animated=" + flag;
};