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EAAS,EAAO,SACjD,EAAI,QAAQ,kBAAkB,EAAQ,GAE4B,WAAnE,aAAuC,EAAS,EAAO,SACtD,EAAI,QAAQ,oBAAoB,EAAQ,IAE5C,EAAI,QAAQ,kBAAkB,EAAQ","file":"/npm/@anatine/graphql-zod-validation@0.9.1/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@anatine/graphql-zod-validation@0.9.1/src/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.plugin = void 0;\nconst index_1 = require(\"./zod/index\");\nconst index_2 = require(\"./myzod/index\");\nconst schema_ast_1 = require(\"@graphql-codegen/schema-ast\");\nconst index_3 = require(\"./yup/index\");\nconst graphql_1 = require(\"graphql\");\nconst plugin = (schema, _documents, config) => {\n    const { schema: _schema, ast } = (0, schema_ast_1.transformSchemaAST)(schema, config);\n    const _a = schemaVisitor(_schema, config), { buildImports, initialEmit } = _a, visitor = __rest(_a, [\"buildImports\", \"initialEmit\"]);\n    const result = (0, graphql_1.visit)(ast, {\n        InputObjectTypeDefinition: {\n            leave: visitor.InputObjectTypeDefinition,\n        },\n        ObjectTypeDefinition: {\n            leave: visitor.ObjectTypeDefinition,\n        },\n        EnumTypeDefinition: {\n            leave: visitor.EnumTypeDefinition,\n        },\n    });\n    const generated = result.definitions.filter((def) => typeof def === 'string');\n    return {\n        prepend: buildImports(),\n        content: [initialEmit(), ...generated].join('\\n'),\n    };\n};\nexports.plugin = plugin;\nconst schemaVisitor = (schema, config) => {\n    if ((config === null || config === void 0 ? void 0 : config.schema) === 'zod') {\n        return (0, index_1.ZodSchemaVisitor)(schema, config);\n    }\n    else if ((config === null || config === void 0 ? void 0 : config.schema) === 'myzod') {\n        return (0, index_2.MyZodSchemaVisitor)(schema, config);\n    }\n    return (0, index_3.YupSchemaVisitor)(schema, config);\n};\n"]}