decord/source/modules/applications/utils/ApplicationFlagUtils.tsx

54 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 7733
// Function ID: 7734
2026-07-20 16:05:17 +00:00
// Name: getApplicationFlags
2026-08-25 06:04:03 +00:00
// Dependencies: [4406, 506, 2]
2026-07-20 16:05:17 +00:00
// Exports: hasApplicationFlag
2026-08-25 06:04:03 +00:00
// Module 7733 (getApplicationFlags)
2026-08-24 06:08:38 +00:00
import fromStringAll from "fromString" /* 506 */;
2026-08-25 06:04:03 +00:00
import closure_2 from "createExecutable" /* 4406 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function getApplicationFlags(application) {
if (null == application) {
2026-08-24 06:08:38 +00:00
let flags = fromStringAll.deserialize(0);
const obj2 = fromStringAll;
2026-07-20 16:05:17 +00:00
} else {
let tmp5 = null != application;
if (tmp5) {
2026-08-24 06:08:38 +00:00
let tmp2 = application instanceof closure_2;
2026-07-20 16:05:17 +00:00
if (!tmp2) {
2026-08-04 21:03:28 +00:00
tmp2 = "flags" in application && typeof application.flags === "bigint";
const tmp3 = "flags" in application && typeof application.flags === "bigint";
2026-07-20 16:05:17 +00:00
}
if (!tmp2) {
2026-08-04 21:03:28 +00:00
let tmp4 = "flags" in application && null != application.flags && typeof application.flags === "object";
2026-07-20 16:05:17 +00:00
if (tmp4) {
tmp4 = "parts" in application.flags;
}
tmp2 = tmp4;
}
tmp5 = tmp2;
}
if (tmp5) {
2026-07-29 08:29:29 +00:00
flags = application.flags;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
let num = application.flags_new;
if (num == null) {
num = application.flags;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
flags = fromStringAll.deserialize(num);
const obj = fromStringAll;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return flags;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/applications/utils/ApplicationFlagUtils.tsx");
2026-07-20 16:05:17 +00:00
export { getApplicationFlags };
export const hasApplicationFlag = function hasApplicationFlag(application, EMBEDDED) {
2026-08-24 06:08:38 +00:00
return fromStringAll.has(getApplicationFlags(application), EMBEDDED);
2026-07-20 16:05:17 +00:00
};