decord/source/__polyfill/14xxx/module_14499.js
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

53 lines
1.1 KiB
JavaScript

// Module ID: 14499
// Function ID: 14500
// Dependencies: []
// Module 14499
export default (arg0) => {
let map = arg0;
if (!arg0) {
const _Map = Map;
map = new Map();
}
return {
all: map,
on(arg0, arg1) {
value = map.get(arg0);
if (value) {
value.push(arg1);
} else {
const items = [arg1];
const result = map.set(arg0, items);
}
},
off(arg0, arg1) {
value = map.get(arg0);
if (value) {
if (arg1) {
value.splice(value.indexOf(arg1) >>> 0, 1);
} else {
const result = map.set(arg0, []);
}
}
},
emit(arg0, arg1) {
closure_0 = arg0;
closure_1 = arg1;
value = map.get(arg0);
if (value) {
const substr = value.slice();
const mapped = substr.map((fn) => {
fn(closure_1);
});
}
value2 = map.get("*");
if (value2) {
const substr1 = value2.slice();
const mapped1 = substr1.map((fn) => {
fn(closure_0, closure_1);
});
}
}
};
};