decord/alpha/source/modules/frames/FrameVisibilityStore.tsx

69 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-10-08 09:57:35 +00:00
// Module ID: 14543
// Function ID: 14544
// Name: FrameVisibilityStore
2026-08-24 06:08:38 +00:00
// Dependencies: [2]
2026-10-08 09:57:35 +00:00
// Module 14543 (FrameVisibilityStore)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
class FrameVisibilityStore {
constructor() {
2026-10-03 08:58:59 +00:00
const merged = Object.assign({ visibility: null, listeners: null });
merged[0] = new Map();
new Map();
merged[1] = new Set();
new Set();
return merged;
2026-08-24 06:08:38 +00:00
}
2026-10-03 08:58:59 +00:00
isFramePooled(frameId) {
const visibility = this.visibility;
return visibility.has(frameId);
}
isFrameVisible(frameId) {
const visibility = this.visibility;
return false !== visibility.get(frameId);
}
subscribe(arg0) {
const self = this;
let closure_0 = arg0;
let listeners = this.listeners;
listeners.add(arg0);
return () => {
const listeners = self.listeners;
listeners.delete(closure_0);
};
2026-08-24 06:08:38 +00:00
}
2026-10-03 08:58:59 +00:00
setFrameVisible(arg0, arg1) {
const self = this;
const visibility = this.visibility;
if (visibility.get(arg0) !== arg1) {
const visibility2 = self.visibility;
const result = visibility2.set(arg0, arg1);
self.emit();
}
2026-08-24 06:08:38 +00:00
}
2026-10-03 08:58:59 +00:00
removeFrame(arg0) {
const self = this;
const visibility = this.visibility;
if (visibility.delete(arg0)) {
self.emit();
}
2026-08-24 06:08:38 +00:00
}
2026-10-03 08:58:59 +00:00
emit() {
const listeners = this.listeners;
for (const item10006 of listeners) {
let item10006Result = item10006();
continue;
}
}
}
const prototype = FrameVisibilityStore.prototype;
let merged = Object.assign({ visibility: null, listeners: null });
2026-10-03 08:58:59 +00:00
const map = new Map();
merged[0] = map;
const set = new Set();
merged[1] = set;
let result = size.fileFinishedImporting("modules/frames/FrameVisibilityStore.tsx");
2026-08-24 06:08:38 +00:00
export default merged;