'use strict';

var chunkQHAPK6PL_cjs = require('./chunk-QHAPK6PL.cjs');

// ../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@_4158936703affc1ffa39c8f9970780bb/node_modules/@standard-community/standard-json/dist/zod-Bwrt9trS.js
var zodv4Error = new chunkQHAPK6PL_cjs.MissingDependencyError("zod v4");
async function getToJsonSchemaFn() {
  return async (schema, options) => {
    let handler;
    if ("_zod" in schema) {
      try {
        const mod = await import('zod/v4/core');
        handler = mod.toJSONSchema;
      } catch {
        throw zodv4Error;
      }
    } else {
      try {
        const mod = await import('./esm-O5U7FUQQ.cjs');
        handler = mod.zodToJsonSchema;
      } catch {
        throw new chunkQHAPK6PL_cjs.MissingDependencyError("zod-to-json-schema");
      }
    }
    return handler(schema, options);
  };
}

module.exports = getToJsonSchemaFn;
//# sourceMappingURL=zod-Bwrt9trS-OH7I5GXF.cjs.map
//# sourceMappingURL=zod-Bwrt9trS-OH7I5GXF.cjs.map