decord/source/modules/checkpoint/CheckpointUtils.tsx

62 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 7896
// Function ID: 62829
2026-07-20 16:05:17 +00:00
// Name: items
2026-07-28 08:39:19 +00:00
// Dependencies: [4241, 5909, 1212, 7897, 7898, 7899, 7900, 7901, 7902, 7903, 7904, 7905, 7906, 2]
2026-07-20 16:05:17 +00:00
// Exports: getCardAssetUrl, getCheckpointPowerBarUnits, getVoiceDurationString
2026-07-28 08:39:19 +00:00
// Module 7896 (items)
2026-07-23 10:11:24 +00:00
const items = [require("sleep").TimeUnits.HOURS, require("sleep").TimeUnits.MINUTES];
const result = require("getSystemLocale").fileFinishedImporting("modules/checkpoint/CheckpointUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getVoiceDurationString = function getVoiceDurationString(totalVoiceMinutes) {
2026-07-28 08:39:19 +00:00
let obj = require(4241) /* sleep */;
2026-07-20 16:05:17 +00:00
const timeAndUnit = obj.getTimeAndUnit(totalVoiceMinutes, items);
const time = timeAndUnit.time;
2026-07-28 08:39:19 +00:00
let obj1 = require(5909) /* getDurationString */;
2026-07-20 16:05:17 +00:00
const abbreviatedFormatter = obj1.getAbbreviatedFormatter();
if (null == time) {
2026-07-23 10:11:24 +00:00
const intl3 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
obj = { minutes: 0 };
return intl3.formatToPlainString(abbreviatedFormatter.minutes, obj);
} else {
const _Math = Math;
const rounded = Math.round(time);
2026-07-28 08:39:19 +00:00
if (timeAndUnit.unit === require(4241) /* sleep */.TimeUnits.HOURS) {
2026-07-23 10:11:24 +00:00
const intl2 = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
obj = { hours: rounded };
let formatToPlainStringResult = intl2.formatToPlainString(abbreviatedFormatter.hours, obj);
} else {
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
obj1 = { minutes: rounded };
formatToPlainStringResult = intl.formatToPlainString(abbreviatedFormatter.minutes, obj1);
}
return formatToPlainStringResult;
}
};
export const getCardAssetUrl = function getCardAssetUrl(cardId) {
if (0 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7897);
2026-07-20 16:05:17 +00:00
} else if (1 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7898);
2026-07-20 16:05:17 +00:00
} else if (2 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7899);
2026-07-20 16:05:17 +00:00
} else if (3 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7900);
2026-07-20 16:05:17 +00:00
} else if (4 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7901);
2026-07-20 16:05:17 +00:00
} else if (5 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7902);
2026-07-20 16:05:17 +00:00
} else if (6 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7903);
2026-07-20 16:05:17 +00:00
} else if (7 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7904);
2026-07-20 16:05:17 +00:00
} else if (8 === cardId) {
2026-07-28 08:39:19 +00:00
return importDefault(7905);
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
return importDefault(7906);
2026-07-20 16:05:17 +00:00
}
};
export const getCheckpointPowerBarUnits = function getCheckpointPowerBarUnits(arg0) {
return Math.min(Math.max(Math.round(arg0 / 10), 1), 9);
};