decord/source/158__wrapNativeSuper.js

55 lines
1.6 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 158
// Function ID: 159
// Name: _wrapNativeSuper
// Dependencies: [159, 160, 95, 99]
// Module 158 (_wrapNativeSuper)
2026-08-04 21:03:28 +00:00
function _wrapNativeSuper(fn) {
2026-07-29 08:29:29 +00:00
let map;
2026-08-04 21:03:28 +00:00
if (typeof Map === "function") {
2026-07-29 08:29:29 +00:00
const _Map = Map;
map = new Map();
}
2026-08-24 06:08:38 +00:00
_wrapNativeSuper = function _wrapNativeSuper(fn) {
closure_0 = fn;
2026-08-04 21:03:28 +00:00
if (null !== fn) {
2026-08-24 06:08:38 +00:00
if (map(closure_1_2[0])(fn)) {
2026-08-04 21:03:28 +00:00
if (typeof fn !== "function") {
2026-07-29 08:29:29 +00:00
const _TypeError = TypeError;
const typeError = new TypeError("Super expression must either be null or a function");
throw typeError;
} else {
class Wrapper {
constructor() {
2026-08-24 06:08:38 +00:00
tmp = closure_0(closure_1_2[1]);
return tmp(closure_0, arguments, closure_0(closure_1_2[2])(this).constructor);
2026-07-29 08:29:29 +00:00
}
}
if (undefined !== closure_0) {
class Wrapper {
constructor() {
2026-08-24 06:08:38 +00:00
tmp = closure_0(closure_1_2[1]);
return tmp(closure_0, arguments, closure_0(closure_1_2[2])(this).constructor);
2026-07-29 08:29:29 +00:00
}
}
}
const _Object = Object;
let obj = { constructor: null };
obj = { value: null, enumerable: false, writable: true, configurable: true };
obj[0] = Wrapper;
obj[0] = obj;
2026-08-04 21:03:28 +00:00
Wrapper.prototype = Object.create(fn.prototype, obj);
return tmp7(tmp8[3])(Wrapper, fn);
2026-07-29 08:29:29 +00:00
}
}
tmp7 = map;
2026-08-24 06:08:38 +00:00
tmp8 = closure_1_2;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
return fn;
2026-08-24 06:08:38 +00:00
};
2026-07-29 08:29:29 +00:00
module.exports = _wrapNativeSuper;
2026-08-04 21:03:28 +00:00
return _wrapNativeSuper(fn);
2026-07-29 08:29:29 +00:00
}
export default _wrapNativeSuper;