decord/source/__polyfill/09xxx/module_9065.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

187 lines
5.4 KiB
JavaScript

// Module ID: 9065
// Function ID: 9066
// Dependencies: [158, 42, 41, 93, 95, 98]
// Exports: $constructor, config
// Module 9065
import _wrapNativeSuper from "_wrapNativeSuper" /* 158 */;
import _createClass from "_createClass" /* 42 */;
import _classCallCheck from "_classCallCheck" /* 41 */;
import c3 from "_possibleConstructorReturn" /* 93 */;
import _getPrototypeOf from "_getPrototypeOf" /* 95 */;
import _inherits from "_inherits" /* 98 */;
function _isNativeReflectConstruct() {
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);
}
closure_0 = !callResult;
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
return closure_0;
};
return _isNativeReflectConstruct();
} catch (err) {
}
}
export function $ZodAsyncError() {
const self = this;
_classCallCheck(this, $ZodEncodeError);
const items = ["Encountered Promise during synchronous parse. Use .parseAsync() instead."];
const obj = _getPrototypeOf($ZodEncodeError);
if (metroRequire()) {
const _Reflect = Reflect;
let constructResult = Reflect.construct(obj, items, _getPrototypeOf(self).constructor);
} else {
constructResult = obj.apply(self, items);
}
return _possibleConstructorReturn(self, constructResult);
}
_inherits($ZodAsyncError, _wrapNativeSuper(Error));
export function $ZodEncodeError(name) {
const self = this;
_classCallCheck(this, $ZodEncodeError);
const items = ["Encountered unidirectional transform during encode: " + name];
const obj = _getPrototypeOf($ZodEncodeError);
if (metroRequire()) {
const _Reflect = Reflect;
let constructResult = Reflect.construct(obj, items, _getPrototypeOf(self).constructor);
} else {
constructResult = obj.apply(self, items);
}
const tmp3Result = _possibleConstructorReturn(self, constructResult);
tmp3Result.name = "ZodEncodeError";
return tmp3Result;
}
_inherits($ZodEncodeError, _wrapNativeSuper(Error));
export const $constructor = function $constructor(ZodError, initializer, Parent) {
closure_0 = ZodError;
_createClass = initializer;
_classCallCheck = Parent;
function init(_zod, def) {
if (!_zod._zod) {
const _Object = Object;
const obj = { value: null, enumerable: false };
const obj2 = { def, constr, traits: null };
const _Set = Set;
const set = new Set();
obj2.traits = set;
obj.value = obj2;
Object.defineProperty(_zod, "_zod", obj);
}
const traits = _zod._zod.traits;
if (!traits.has(closure_0)) {
const traits2 = _zod._zod.traits;
traits2.add(closure_0);
initializer(_zod, def);
const prototype = constr.prototype;
const _Object2 = Object;
const keys = Object.keys(prototype);
for (let num = 0; num < keys.length; num = num + 1) {
let tmp14 = keys[num];
if (!(tmp14 in _zod)) {
let obj3 = prototype[tmp14];
_zod[tmp14] = obj3.bind(_zod);
}
}
}
}
const constr = function _(Definition) {
Parent = undefined;
if (Parent != null) {
Parent = Parent.Parent;
}
let self = this;
if (Parent) {
self = new closure_4();
}
init(self, Definition);
const _zod = self._zod;
if (_zod.deferred == null) {
_zod.deferred = [];
}
for (const item10021 of tmp6) {
let item10021Result = item10021();
continue;
}
return self;
};
Parent = undefined;
if (Parent != null) {
Parent = Parent.Parent;
}
if (Parent == null) {
Parent = Object;
}
class Definition {
constructor() {
self = this;
tmp = closure_2(this, closure_0);
tmp2 = closure_4;
obj = closure_4(closure_0);
tmp3 = closure_3;
if (_isNativeReflectConstruct()) {
tmp7 = globalThis;
_Reflect = Reflect;
tmp8 = arguments;
constructResult = Reflect.construct(obj, arguments, tmp2(self).constructor);
} else {
tmp4 = arguments;
tmp5 = arguments;
constructResult = obj(...arguments);
}
return tmp3(self, constructResult);
}
}
closure_129_0 = Definition;
constr(Definition, Parent);
const tmp4 = _createClass(Definition);
_getPrototypeOf = tmp4;
Object.defineProperty(tmp4, "name", { value: ZodError });
Object.defineProperty(constr, "init", { value: init });
Object.defineProperty(constr, Symbol.hasInstance, {
value(_zod) {
Parent = undefined;
if (closure_2 != null) {
Parent = tmp.Parent;
}
if (Parent) {
Parent = _zod instanceof tmp.Parent;
}
let tmp3 = Parent;
if (!tmp3) {
let hasItem;
if (_zod != null) {
_zod = _zod._zod;
if (_zod != null) {
const traits = _zod.traits;
if (traits != null) {
hasItem = traits.has(closure_0);
}
}
}
tmp3 = hasItem;
}
return tmp3;
}
});
Object.defineProperty(constr, "name", { value: ZodError });
return constr;
};
export const config = function config(arg0) {
if (arg0) {
const _Object = Object;
const merged = Object.assign($ZodEncodeError.globalConfig, arg0);
}
return $ZodEncodeError.globalConfig;
};
export const NEVER = Object.freeze({ status: "aborted" });
export const $brand = Symbol("zod_brand");
export const globalConfig = {};