const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
const require_core = require('../core/core.cjs');
const require_util = require('../core/util.cjs');
const require_errors = require('../core/errors.cjs');

//#region ../../node_modules/zod/v4/classic/errors.js
const initializer = (inst, issues) => {
	require_errors.$ZodError.init(inst, issues);
	inst.name = "ZodError";
	Object.defineProperties(inst, {
		format: { value: (mapper) => require_errors.formatError(inst, mapper) },
		flatten: { value: (mapper) => require_errors.flattenError(inst, mapper) },
		addIssue: { value: (issue) => {
			inst.issues.push(issue);
			inst.message = JSON.stringify(inst.issues, require_util.jsonStringifyReplacer, 2);
		} },
		addIssues: { value: (issues$1) => {
			inst.issues.push(...issues$1);
			inst.message = JSON.stringify(inst.issues, require_util.jsonStringifyReplacer, 2);
		} },
		isEmpty: { get() {
			return inst.issues.length === 0;
		} }
	});
};
const ZodError = require_core.$constructor("ZodError", initializer);
const ZodRealError = require_core.$constructor("ZodError", initializer, { Parent: Error });

//#endregion
exports.ZodRealError = ZodRealError;
//# sourceMappingURL=errors.cjs.map