decord/source/539_getSideChannelWeakMap.js

104 lines
2.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 539
// Function ID: 540
2026-07-20 16:05:17 +00:00
// Name: getSideChannelWeakMap
2026-07-29 08:29:29 +00:00
// Dependencies: [540, 574, 541, 575, 577]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 539 (getSideChannelWeakMap)
2026-08-24 06:08:38 +00:00
import getEvalledConstructor from "getEvalledConstructor" /* 540 */;
import callBoundIntrinsic from "callBoundIntrinsic" /* 574 */;
import _mod577 from "module_577" /* 577 */;
let tmp = getEvalledConstructor("%WeakMap%", true);
let closure_2 = tmp;
let closure_3 = callBoundIntrinsic("WeakMap.prototype.get", true);
let closure_4 = callBoundIntrinsic("WeakMap.prototype.set", true);
let closure_5 = callBoundIntrinsic("WeakMap.prototype.has", true);
let closure_6 = callBoundIntrinsic("WeakMap.prototype.delete", true);
2026-07-20 16:05:17 +00:00
if (tmp) {
function getSideChannelWeakMap() {
2026-07-29 08:29:29 +00:00
let obj = {
2026-07-20 16:05:17 +00:00
assert(arg0) {
if (!obj.has(arg0)) {
2026-08-24 06:08:38 +00:00
let tmp3 = closure_1_0(closure_1_1[2]);
tmp3 = new tmp3("Side channel does not contain " + closure_1_0(closure_1_1[3])(arg0));
2026-07-20 16:05:17 +00:00
throw tmp3;
}
},
2026-08-04 21:03:28 +00:00
delete(obj) {
2026-07-20 16:05:17 +00:00
if (obj) {
2026-08-04 21:03:28 +00:00
if (obj) {
2026-07-23 10:11:24 +00:00
if (closure_0) {
2026-08-24 06:08:38 +00:00
return closure_1_6(tmp, obj);
2026-07-20 16:05:17 +00:00
}
}
return false;
}
2026-08-24 06:08:38 +00:00
if (closure_1_0(closure_1_1[4])) {
2026-07-29 08:29:29 +00:00
if (closure_1) {
2026-08-04 21:03:28 +00:00
return obj.delete(obj);
2026-07-20 16:05:17 +00:00
}
}
},
2026-08-04 21:03:28 +00:00
get(obj) {
2026-07-20 16:05:17 +00:00
if (obj) {
2026-08-04 21:03:28 +00:00
if (obj) {
if (typeof obj === "object") {
2026-07-20 16:05:17 +00:00
if (closure_0) {
2026-08-24 06:08:38 +00:00
let value = closure_1_3(tmp, obj);
2026-07-20 16:05:17 +00:00
}
return value;
}
}
}
2026-07-29 08:29:29 +00:00
value = closure_1;
if (closure_1) {
2026-08-04 21:03:28 +00:00
value = obj.get(obj);
2026-07-20 16:05:17 +00:00
}
},
2026-08-04 21:03:28 +00:00
has(obj) {
2026-07-20 16:05:17 +00:00
if (obj) {
2026-08-04 21:03:28 +00:00
if (obj) {
if (typeof obj === "object") {
2026-07-20 16:05:17 +00:00
if (closure_0) {
2026-08-24 06:08:38 +00:00
let hasItem = closure_1_5(tmp, obj);
2026-07-20 16:05:17 +00:00
}
return hasItem;
}
}
}
2026-07-29 08:29:29 +00:00
hasItem = set;
if (hasItem) {
2026-08-04 21:03:28 +00:00
hasItem = set.has(obj);
2026-07-20 16:05:17 +00:00
}
},
2026-08-04 21:03:28 +00:00
set(obj) {
2026-07-20 16:05:17 +00:00
if (obj) {
2026-08-04 21:03:28 +00:00
if (obj) {
2026-07-29 08:29:29 +00:00
let tmp6 = closure_0;
2026-07-23 10:11:24 +00:00
if (!closure_0) {
2026-07-29 08:29:29 +00:00
tmp = new tmp();
closure_0 = tmp;
tmp6 = tmp;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
closure_1_4(tmp6, obj, arg1);
2026-07-20 16:05:17 +00:00
}
}
2026-08-24 06:08:38 +00:00
if (closure_1_0(closure_1_1[4])) {
2026-07-29 08:29:29 +00:00
obj = closure_1;
if (!closure_1) {
2026-08-24 06:08:38 +00:00
const tmp4 = closure_1_0(closure_1_1[4])();
2026-07-29 08:29:29 +00:00
closure_1 = tmp4;
obj = tmp4;
2026-07-20 16:05:17 +00:00
}
2026-08-04 21:03:28 +00:00
const result = obj.set(obj, arg1);
2026-07-20 16:05:17 +00:00
}
}
};
return obj;
}
} else {
2026-08-24 06:08:38 +00:00
getSideChannelWeakMap = _mod577;
2026-07-20 16:05:17 +00:00
}
export default getSideChannelWeakMap;