decord/source/222__isNativeReflectConstruct.js

81 lines
2.1 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 222
2026-07-29 08:29:29 +00:00
// Function ID: 223
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-29 08:29:29 +00:00
// Dependencies: [41, 42, 93, 95, 98, 38, 203]
2026-07-20 16:05:17 +00:00
// Module 222 (_isNativeReflectConstruct)
2026-08-24 06:08:38 +00:00
import _inheritsDefault from "_inherits" /* 98 */;
import BlobDefault from "Blob" /* 203 */;
import closure_2 from "_classCallCheck" /* 41 */;
import closure_3 from "_possibleConstructorReturn" /* 93 */;
import closure_4 from "_getPrototypeOf" /* 95 */;
import importDefaultResult from "_createClass" /* 42 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const File = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
2026-07-29 08:29:29 +00:00
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
2026-08-24 06:08:38 +00:00
closure_0 = !callResult;
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
2026-07-29 08:29:29 +00:00
return closure_0;
2026-08-24 06:08:38 +00:00
};
2026-07-29 08:29:29 +00:00
return _isNativeReflectConstruct();
} catch (err) {
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
class File {
constructor(arg0, arg1, arg2) {
self = this;
tmp = File;
2026-08-24 06:08:38 +00:00
tmp2 = closure_2(this, File);
2026-07-29 08:29:29 +00:00
tmp4 = null != global;
tmp3 = require("module_38");
if (tmp4) {
tmp4 = null != arg1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp3Result = tmp3(tmp4, "Failed to construct `File`: Must pass both `parts` and `name` arguments.");
items = [, ];
items[0] = global;
items[1] = importDefault;
2026-08-24 06:08:38 +00:00
tmp6 = closure_4;
obj = closure_4(tmp);
tmp7 = closure_3;
2026-07-29 08:29:29 +00:00
if (_isNativeReflectConstruct()) {
tmp9 = globalThis;
_Reflect = Reflect;
constructResult = Reflect.construct(obj, items, tmp6(self).constructor);
} else {
constructResult = obj.apply(self, items);
}
tmp7Result = tmp7(self, constructResult);
tmp7Result.data.name = arg1;
return tmp7Result;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
_inheritsDefault(File, BlobDefault);
2026-07-29 08:29:29 +00:00
let items = [
{
2026-07-20 16:05:17 +00:00
key: "name",
get() {
2026-07-29 08:29:29 +00:00
File(38)(null != this.data.name, "Files must have a name set.");
2026-07-20 16:05:17 +00:00
return this.data.name;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "lastModified",
get() {
return this.data.lastModified || 0;
}
2026-07-29 08:29:29 +00:00
}
];
export default importDefaultResult(File, items);