@nullix/zod-mongoose-studio 3.3.2 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{B7ScFmDB.js → 5ZXm4f56.js} +1 -1
  3. package/.output/public/_nuxt/{DbqvVYbv.js → B2fcLSyW.js} +1 -1
  4. package/.output/public/_nuxt/{DKK0Mrrg.js → BBN7l5Hn.js} +1 -1
  5. package/.output/public/_nuxt/BBTTtb8r.js +41 -0
  6. package/.output/public/_nuxt/{C8xmwXC2.js → BDbISGvP.js} +1 -1
  7. package/.output/public/_nuxt/{DJa7_7Hz.js → BijI4RNx.js} +1 -1
  8. package/.output/public/_nuxt/{BlZ0x31M.js → Bp9qkJ9m.js} +1 -1
  9. package/.output/public/_nuxt/{BcYnCaqL.js → Bu3-sqCf.js} +1 -1
  10. package/.output/public/_nuxt/{C919AVYR.js → C-FtTvwz.js} +1 -1
  11. package/.output/public/_nuxt/C02JV0Aj.js +1 -0
  12. package/.output/public/_nuxt/{Bbi9UBvi.js → C1UkIsDc.js} +1 -1
  13. package/.output/public/_nuxt/{PXBhK7S_.js → CJT28r6J.js} +1 -1
  14. package/.output/public/_nuxt/{BC9tFNFa.js → CL7qtgl2.js} +3 -3
  15. package/.output/public/_nuxt/{B6lqezyA.js → CRMd2YH2.js} +3 -3
  16. package/.output/public/_nuxt/{YC-RLggm.js → CRkdQgFz.js} +1 -1
  17. package/.output/public/_nuxt/{iKW_mt0p.js → Cw1XFOz5.js} +1 -1
  18. package/.output/public/_nuxt/{d1NBz903.js → D5yWk6Ly.js} +1 -1
  19. package/.output/public/_nuxt/{iGzUozbF.js → DA9GjKpR.js} +1 -1
  20. package/.output/public/_nuxt/{JkiDMdYG.js → DaWAlZhp.js} +1 -1
  21. package/.output/public/_nuxt/{OVQ3C2Ge.js → DafLMUHo.js} +1 -1
  22. package/.output/public/_nuxt/{Bw82IGM8.js → Dyaldc-t.js} +1 -1
  23. package/.output/public/_nuxt/{CsQL5F-l.js → UU9fpRNQ.js} +1 -1
  24. package/.output/public/_nuxt/builds/latest.json +1 -1
  25. package/.output/public/_nuxt/builds/meta/717459d8-0da1-42ed-af0b-9ec5395e8fdc.json +1 -0
  26. package/.output/public/_nuxt/entry.CDPplHzk.css +1 -0
  27. package/.output/public/_nuxt/error-404.hPtlUQpd.css +1 -0
  28. package/.output/public/_nuxt/error-500.E-PXUb6B.css +1 -0
  29. package/.output/public/_nuxt/{DbUZZZZu.js → kFZJW2-u.js} +2 -2
  30. package/.output/public/_nuxt/{B8gqXD2U.js → u3DlT5Mh.js} +1 -1
  31. package/.output/server/chunks/_/error-500.mjs.map +1 -1
  32. package/.output/server/chunks/_/parse-request.mjs +29 -0
  33. package/.output/server/chunks/_/parse-request.mjs.map +1 -0
  34. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  35. package/.output/server/chunks/build/{error-404-KRkA0DPI.mjs → error-404-aQ5PiVuX.mjs} +6 -12
  36. package/.output/server/chunks/build/error-404-aQ5PiVuX.mjs.map +1 -0
  37. package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs +8 -0
  38. package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs.map +1 -0
  39. package/.output/server/chunks/build/{error-500-DIIFf55p.mjs → error-500-BY6ZAZZ2.mjs} +6 -12
  40. package/.output/server/chunks/build/error-500-BY6ZAZZ2.mjs.map +1 -0
  41. package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs +8 -0
  42. package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs.map +1 -0
  43. package/.output/server/chunks/build/index-57_mtIua.mjs +235 -0
  44. package/.output/server/chunks/build/index-57_mtIua.mjs.map +1 -0
  45. package/.output/server/chunks/build/{index-CB1N4gax.mjs → index-Qa-4KqCB.mjs} +7 -13
  46. package/.output/server/chunks/build/index-Qa-4KqCB.mjs.map +1 -0
  47. package/.output/server/chunks/build/server.mjs +3913 -3378
  48. package/.output/server/chunks/build/server.mjs.map +1 -1
  49. package/.output/server/chunks/build/styles.mjs +4 -4
  50. package/.output/server/chunks/nitro/nitro.mjs +562 -2188
  51. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  52. package/.output/server/chunks/routes/api/editor-types.get.mjs +0 -6
  53. package/.output/server/chunks/routes/api/editor-types.get.mjs.map +1 -1
  54. package/.output/server/chunks/routes/api/parse.post.mjs +1599 -7
  55. package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -1
  56. package/.output/server/chunks/routes/api/resolve.get.mjs +0 -6
  57. package/.output/server/chunks/routes/api/resolve.get.mjs.map +1 -1
  58. package/.output/server/chunks/routes/api/studio/run.post.mjs +41 -8
  59. package/.output/server/chunks/routes/api/studio/run.post.mjs.map +1 -1
  60. package/.output/server/chunks/routes/renderer.mjs +21 -44
  61. package/.output/server/chunks/routes/renderer.mjs.map +1 -1
  62. package/.output/server/index.mjs +1 -7
  63. package/.output/server/index.mjs.map +1 -1
  64. package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/dist/compiler-core.cjs.prod.js +6801 -0
  65. package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/package.json +58 -0
  66. package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/dist/compiler-dom.cjs.prod.js +692 -0
  67. package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/package.json +57 -0
  68. package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/dist/reactivity.cjs.prod.js +1905 -0
  69. package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/package.json +55 -0
  70. package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/dist/runtime-core.cjs.prod.js +7006 -0
  71. package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/package.json +52 -0
  72. package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/dist/runtime-dom.cjs.prod.js +1867 -0
  73. package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/package.json +60 -0
  74. package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/dist/shared.cjs.prod.js +655 -0
  75. package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/package.json +47 -0
  76. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/array-set.js +121 -0
  77. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64-vlq.js +140 -0
  78. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64.js +67 -0
  79. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/binary-search.js +111 -0
  80. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/mapping-list.js +79 -0
  81. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/quick-sort.js +141 -0
  82. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-consumer.js +1236 -0
  83. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-generator.js +446 -0
  84. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-node.js +420 -0
  85. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/util.js +594 -0
  86. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/package.json +71 -0
  87. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/source-map.js +8 -0
  88. package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.js +80 -0
  89. package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.prod.js +66 -0
  90. package/.output/server/node_modules/.nitro/vue@3.5.43/index.js +7 -0
  91. package/.output/server/node_modules/.nitro/vue@3.5.43/index.mjs +1 -0
  92. package/.output/server/node_modules/.nitro/vue@3.5.43/package.json +112 -0
  93. package/.output/server/node_modules/@babel/parser/lib/index.js +55 -21
  94. package/.output/server/node_modules/@babel/parser/package.json +7 -7
  95. package/.output/server/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  96. package/.output/server/node_modules/@esbuild/linux-x64/package.json +1 -1
  97. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +19 -16
  98. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +3 -4
  99. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +16 -16
  100. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +1 -2
  101. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +11 -14
  102. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +13 -16
  103. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +1 -2
  104. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +1 -3
  105. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +2 -5
  106. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +1 -3
  107. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +4 -5
  108. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +1 -3
  109. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +9 -11
  110. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +1 -2
  111. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +1 -3
  112. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +1 -3
  113. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +12 -18
  114. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +3 -4
  115. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +5 -7
  116. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +1 -8
  117. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +11 -12
  118. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +5 -7
  119. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +1 -3
  120. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +1 -3
  121. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +7 -7
  122. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +2 -4
  123. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +5 -9
  124. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +3 -5
  125. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +2 -4
  126. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +7 -8
  127. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +1 -2
  128. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +1 -3
  129. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +3 -4
  130. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +1 -2
  131. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +1 -2
  132. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +10 -15
  133. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +1 -3
  134. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +3 -5
  135. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +1 -3
  136. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +1 -3
  137. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +1 -3
  138. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +1 -2
  139. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +1 -3
  140. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +21 -13
  141. package/.output/server/node_modules/@iconify/utils/lib/index.js +1 -2
  142. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +3 -3
  143. package/.output/server/node_modules/@iconify/utils/lib/loader/hmr-utils.js +33 -0
  144. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +22 -22
  145. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +7 -22
  146. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +60 -16
  147. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +1 -2
  148. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +1 -2
  149. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +1 -2
  150. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +9 -11
  151. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +1 -2
  152. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +1 -3
  153. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +1 -2
  154. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +1 -2
  155. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +1 -2
  156. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +3 -5
  157. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +5 -4
  158. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +1 -2
  159. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +1 -2
  160. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +1 -2
  161. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +2 -3
  162. package/.output/server/node_modules/@iconify/utils/package.json +15 -13
  163. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +8 -1
  164. package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
  165. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +34 -13
  166. package/.output/server/node_modules/@vue/server-renderer/package.json +4 -6
  167. package/.output/server/node_modules/devalue/index.js +15 -2
  168. package/.output/server/node_modules/devalue/package.json +5 -3
  169. package/.output/server/node_modules/devalue/src/base64.js +46 -96
  170. package/.output/server/node_modules/devalue/src/constants.js +5 -0
  171. package/.output/server/node_modules/devalue/src/operations.js +221 -0
  172. package/.output/server/node_modules/devalue/src/parse.js +76 -62
  173. package/.output/server/node_modules/devalue/src/stringify.js +164 -81
  174. package/.output/server/node_modules/devalue/src/uneval.js +312 -104
  175. package/.output/server/node_modules/devalue/src/utils.js +61 -19
  176. package/.output/server/node_modules/esbuild/lib/main.js +12 -8
  177. package/.output/server/node_modules/esbuild/package.json +50 -50
  178. package/.output/server/node_modules/hookable/dist/index.mjs +2 -11
  179. package/.output/server/node_modules/hookable/package.json +23 -22
  180. package/.output/server/node_modules/ip-address/dist/ipv4.js +7 -0
  181. package/.output/server/node_modules/ip-address/package.json +1 -1
  182. package/.output/server/node_modules/zod/package.json +20 -8
  183. package/.output/server/node_modules/zod/v4/classic/checks.js +1 -1
  184. package/.output/server/node_modules/zod/v4/classic/deep-partial.js +13 -0
  185. package/.output/server/node_modules/zod/v4/classic/errors.js +44 -35
  186. package/.output/server/node_modules/zod/v4/classic/external.js +5 -8
  187. package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +375 -78
  188. package/.output/server/node_modules/zod/v4/classic/in-out.js +36 -0
  189. package/.output/server/node_modules/zod/v4/classic/index.js +2 -2
  190. package/.output/server/node_modules/zod/v4/classic/iso.js +2 -17
  191. package/.output/server/node_modules/zod/v4/classic/package.json +2 -1
  192. package/.output/server/node_modules/zod/v4/classic/parse.js +1 -0
  193. package/.output/server/node_modules/zod/v4/classic/schemas.js +601 -223
  194. package/.output/server/node_modules/zod/v4/core/api.js +51 -26
  195. package/.output/server/node_modules/zod/v4/core/checks.js +68 -127
  196. package/.output/server/node_modules/zod/v4/core/compile.js +1858 -0
  197. package/.output/server/node_modules/zod/v4/core/core.js +87 -22
  198. package/.output/server/node_modules/zod/v4/core/doc.js +12 -9
  199. package/.output/server/node_modules/zod/v4/core/errors.js +127 -42
  200. package/.output/server/node_modules/zod/v4/core/index.js +3 -0
  201. package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  202. package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +413 -175
  203. package/.output/server/node_modules/zod/v4/core/memoizer.js +311 -0
  204. package/.output/server/node_modules/zod/v4/core/package.json +2 -1
  205. package/.output/server/node_modules/zod/v4/core/parse.js +130 -48
  206. package/.output/server/node_modules/zod/v4/core/regexes.js +39 -16
  207. package/.output/server/node_modules/zod/v4/core/registries.js +2 -2
  208. package/.output/server/node_modules/zod/v4/core/schemas.js +895 -382
  209. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +253 -39
  210. package/.output/server/node_modules/zod/v4/core/util.js +383 -175
  211. package/.output/server/node_modules/zod/v4/core/versions.js +2 -2
  212. package/.output/server/node_modules/zod/v4/core/visit.js +169 -0
  213. package/.output/server/node_modules/zod/v4/index.js +3 -2
  214. package/.output/server/node_modules/zod/v4/locales/ar.js +5 -0
  215. package/.output/server/node_modules/zod/v4/locales/az.js +5 -0
  216. package/.output/server/node_modules/zod/v4/locales/be.js +12 -0
  217. package/.output/server/node_modules/zod/v4/locales/bg.js +5 -0
  218. package/.output/server/node_modules/zod/v4/locales/bn.js +113 -0
  219. package/.output/server/node_modules/zod/v4/locales/ca.js +5 -0
  220. package/.output/server/node_modules/zod/v4/locales/ckb.js +133 -0
  221. package/.output/server/node_modules/zod/v4/locales/cs.js +5 -0
  222. package/.output/server/node_modules/zod/v4/locales/da.js +7 -2
  223. package/.output/server/node_modules/zod/v4/locales/de.js +5 -0
  224. package/.output/server/node_modules/zod/v4/locales/el.js +112 -0
  225. package/.output/server/node_modules/zod/v4/locales/en.js +20 -4
  226. package/.output/server/node_modules/zod/v4/locales/eo.js +5 -0
  227. package/.output/server/node_modules/zod/v4/locales/es.js +4 -0
  228. package/.output/server/node_modules/zod/v4/locales/fa.js +5 -0
  229. package/.output/server/node_modules/zod/v4/locales/fi.js +5 -0
  230. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +5 -0
  231. package/.output/server/node_modules/zod/v4/locales/fr.js +38 -17
  232. package/.output/server/node_modules/zod/v4/locales/gu.js +113 -0
  233. package/.output/server/node_modules/zod/v4/locales/he.js +7 -0
  234. package/.output/server/node_modules/zod/v4/locales/hi.js +111 -0
  235. package/.output/server/node_modules/zod/v4/locales/hr.js +126 -0
  236. package/.output/server/node_modules/zod/v4/locales/hu.js +5 -0
  237. package/.output/server/node_modules/zod/v4/locales/hy.js +11 -0
  238. package/.output/server/node_modules/zod/v4/locales/id.js +5 -0
  239. package/.output/server/node_modules/zod/v4/locales/index.js +14 -0
  240. package/.output/server/node_modules/zod/v4/locales/is.js +5 -0
  241. package/.output/server/node_modules/zod/v4/locales/it.js +6 -1
  242. package/.output/server/node_modules/zod/v4/locales/ja.js +5 -0
  243. package/.output/server/node_modules/zod/v4/locales/ka.js +13 -8
  244. package/.output/server/node_modules/zod/v4/locales/km.js +5 -0
  245. package/.output/server/node_modules/zod/v4/locales/kn.js +116 -0
  246. package/.output/server/node_modules/zod/v4/locales/ko.js +5 -0
  247. package/.output/server/node_modules/zod/v4/locales/lt.js +4 -0
  248. package/.output/server/node_modules/zod/v4/locales/mk.js +5 -0
  249. package/.output/server/node_modules/zod/v4/locales/ms.js +5 -0
  250. package/.output/server/node_modules/zod/v4/locales/ne.js +111 -0
  251. package/.output/server/node_modules/zod/v4/locales/nl.js +5 -0
  252. package/.output/server/node_modules/zod/v4/locales/nn.js +113 -0
  253. package/.output/server/node_modules/zod/v4/locales/no.js +7 -2
  254. package/.output/server/node_modules/zod/v4/locales/ota.js +5 -0
  255. package/.output/server/node_modules/zod/v4/locales/package.json +2 -1
  256. package/.output/server/node_modules/zod/v4/locales/pl.js +5 -0
  257. package/.output/server/node_modules/zod/v4/locales/ps.js +5 -0
  258. package/.output/server/node_modules/zod/v4/locales/pt-BR.js +143 -0
  259. package/.output/server/node_modules/zod/v4/locales/pt.js +89 -55
  260. package/.output/server/node_modules/zod/v4/locales/ro.js +122 -0
  261. package/.output/server/node_modules/zod/v4/locales/ru.js +12 -0
  262. package/.output/server/node_modules/zod/v4/locales/sk.js +116 -0
  263. package/.output/server/node_modules/zod/v4/locales/sl.js +5 -0
  264. package/.output/server/node_modules/zod/v4/locales/sv.js +7 -2
  265. package/.output/server/node_modules/zod/v4/locales/ta.js +5 -0
  266. package/.output/server/node_modules/zod/v4/locales/tg.js +117 -0
  267. package/.output/server/node_modules/zod/v4/locales/th.js +5 -0
  268. package/.output/server/node_modules/zod/v4/locales/tk.js +107 -0
  269. package/.output/server/node_modules/zod/v4/locales/tr.js +5 -0
  270. package/.output/server/node_modules/zod/v4/locales/uk.js +5 -0
  271. package/.output/server/node_modules/zod/v4/locales/ur.js +5 -0
  272. package/.output/server/node_modules/zod/v4/locales/uz.js +4 -0
  273. package/.output/server/node_modules/zod/v4/locales/vi.js +5 -0
  274. package/.output/server/node_modules/zod/v4/locales/yo.js +5 -0
  275. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +5 -0
  276. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +5 -0
  277. package/.output/server/node_modules/zod/v4/package.json +2 -1
  278. package/.output/server/package.json +18 -18
  279. package/README.md +9 -0
  280. package/package.json +8 -8
  281. package/.output/public/_nuxt/Czp4_2o-.js +0 -33
  282. package/.output/public/_nuxt/builds/meta/46174b5e-cab6-4a73-95f8-66a1c9b1be2b.json +0 -1
  283. package/.output/public/_nuxt/entry.DaqrxXuH.css +0 -1
  284. package/.output/public/_nuxt/error-404.CTSXlFYa.css +0 -1
  285. package/.output/public/_nuxt/error-500.DqEfQnVZ.css +0 -1
  286. package/.output/server/chunks/build/error-404-KRkA0DPI.mjs.map +0 -1
  287. package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs +0 -8
  288. package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs.map +0 -1
  289. package/.output/server/chunks/build/error-500-DIIFf55p.mjs.map +0 -1
  290. package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs +0 -8
  291. package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs.map +0 -1
  292. package/.output/server/chunks/build/index-CB1N4gax.mjs.map +0 -1
  293. /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/dist/compiler-core.cjs.prod.js +0 -0
  294. /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/package.json +0 -0
  295. /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/dist/compiler-dom.cjs.prod.js +0 -0
  296. /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/package.json +0 -0
  297. /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/dist/reactivity.cjs.prod.js +0 -0
  298. /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/package.json +0 -0
  299. /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/dist/runtime-core.cjs.prod.js +0 -0
  300. /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/package.json +0 -0
  301. /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/dist/runtime-dom.cjs.prod.js +0 -0
  302. /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/package.json +0 -0
  303. /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/dist/shared.cjs.prod.js +0 -0
  304. /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/package.json +0 -0
  305. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/array-set.js +0 -0
  306. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64-vlq.js +0 -0
  307. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64.js +0 -0
  308. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/binary-search.js +0 -0
  309. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/mapping-list.js +0 -0
  310. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/quick-sort.js +0 -0
  311. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-consumer.js +0 -0
  312. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-generator.js +0 -0
  313. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-node.js +0 -0
  314. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/util.js +0 -0
  315. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/package.json +0 -0
  316. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/source-map.js +0 -0
  317. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.js +0 -0
  318. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.prod.js +0 -0
  319. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.js +0 -0
  320. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.mjs +0 -0
  321. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/package.json +0 -0
  322. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.43}/server-renderer/index.mjs +0 -0
@@ -1,159 +1,336 @@
1
1
  import * as core from "../core/index.js";
2
2
  import { util } from "../core/index.js";
3
3
  import * as processors from "../core/json-schema-processors.js";
4
+ import * as regexes from "../core/regexes.js";
4
5
  import { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from "../core/to-json-schema.js";
6
+ import en from "../locales/en.js";
5
7
  import * as checks from "./checks.js";
6
- import * as iso from "./iso.js";
7
8
  import * as parse from "./parse.js";
9
+ // Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.
10
+ function _ensureDefaultLocale() {
11
+ if (!core.globalConfig.localeError)
12
+ core.config(en());
13
+ }
14
+ // the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first
15
+ function _ensureDefaultMemoizer() {
16
+ if (!core.globalConfig.memoizer)
17
+ core.config({ memoizer: core.memoizer() });
18
+ }
8
19
  export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) => {
20
+ _ensureDefaultLocale();
9
21
  core.$ZodType.init(inst, def);
10
- Object.assign(inst["~standard"], {
11
- jsonSchema: {
12
- input: createStandardJSONSchemaMethod(inst, "input"),
13
- output: createStandardJSONSchemaMethod(inst, "output"),
14
- },
15
- });
16
- inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
17
22
  inst.def = def;
18
23
  inst.type = def.type;
19
- Object.defineProperty(inst, "_def", { value: def });
20
- // base methods
21
- inst.check = (...checks) => {
22
- return inst.clone(util.mergeDefs(def, {
24
+ return inst;
25
+ }, {
26
+ check(...chks) {
27
+ const def = this.def;
28
+ return this.clone(util.mergeDefs(def, {
23
29
  checks: [
24
30
  ...(def.checks ?? []),
25
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
31
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
26
32
  ],
27
- }), {
28
- parent: true,
29
- });
30
- };
31
- inst.with = inst.check;
32
- inst.clone = (def, params) => core.clone(inst, def, params);
33
- inst.brand = () => inst;
34
- inst.register = ((reg, meta) => {
35
- reg.add(inst, meta);
36
- return inst;
37
- });
38
- // parsing
39
- inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
40
- inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
41
- inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
42
- inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
43
- inst.spa = inst.safeParseAsync;
44
- // encoding/decoding
45
- inst.encode = (data, params) => parse.encode(inst, data, params);
46
- inst.decode = (data, params) => parse.decode(inst, data, params);
47
- inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);
48
- inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);
49
- inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);
50
- inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);
51
- inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);
52
- inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);
53
- // refinements
54
- inst.refine = (check, params) => inst.check(refine(check, params));
55
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
56
- inst.overwrite = (fn) => inst.check(checks.overwrite(fn));
57
- // wrappers
58
- inst.optional = () => optional(inst);
59
- inst.exactOptional = () => exactOptional(inst);
60
- inst.nullable = () => nullable(inst);
61
- inst.nullish = () => optional(nullable(inst));
62
- inst.nonoptional = (params) => nonoptional(inst, params);
63
- inst.array = () => array(inst);
64
- inst.or = (arg) => union([inst, arg]);
65
- inst.and = (arg) => intersection(inst, arg);
66
- inst.transform = (tx) => pipe(inst, transform(tx));
67
- inst.default = (def) => _default(inst, def);
68
- inst.prefault = (def) => prefault(inst, def);
69
- // inst.coalesce = (def, params) => coalesce(inst, def, params);
70
- inst.catch = (params) => _catch(inst, params);
71
- inst.pipe = (target) => pipe(inst, target);
72
- inst.readonly = () => readonly(inst);
73
- // meta
74
- inst.describe = (description) => {
75
- const cl = inst.clone();
33
+ }), { parent: true });
34
+ },
35
+ with(...chks) {
36
+ return this.check(...chks);
37
+ },
38
+ clone(def, params) {
39
+ return core.clone(this, def, params);
40
+ },
41
+ brand() {
42
+ return this;
43
+ },
44
+ register(reg, meta) {
45
+ reg.add(this, meta);
46
+ return this;
47
+ },
48
+ refine(check, params) {
49
+ return this.check(refine(check, params));
50
+ },
51
+ superRefine(refinement, params) {
52
+ return this.check(superRefine(refinement, params));
53
+ },
54
+ overwrite(fn) {
55
+ return this.check(checks.overwrite(fn));
56
+ },
57
+ optional() {
58
+ return optional(this);
59
+ },
60
+ exactOptional() {
61
+ return exactOptional(this);
62
+ },
63
+ nullable() {
64
+ return nullable(this);
65
+ },
66
+ nullish() {
67
+ return optional(nullable(this));
68
+ },
69
+ nonoptional(params) {
70
+ return nonoptional(this, params);
71
+ },
72
+ array() {
73
+ return array(this);
74
+ },
75
+ or(arg) {
76
+ return union([this, arg]);
77
+ },
78
+ and(arg) {
79
+ return intersection(this, arg);
80
+ },
81
+ transform(tx) {
82
+ return pipe(this, transform(tx));
83
+ },
84
+ default(d) {
85
+ return _default(this, d);
86
+ },
87
+ prefault(d) {
88
+ return prefault(this, d);
89
+ },
90
+ catch(params) {
91
+ return _catch(this, params);
92
+ },
93
+ pipe(target) {
94
+ return pipe(this, target);
95
+ },
96
+ readonly() {
97
+ return readonly(this);
98
+ },
99
+ describe(description) {
100
+ const cl = this.clone();
76
101
  core.globalRegistry.add(cl, { description });
77
102
  return cl;
78
- };
79
- Object.defineProperty(inst, "description", {
80
- get() {
81
- return core.globalRegistry.get(inst)?.description;
82
- },
83
- configurable: true,
84
- });
85
- inst.meta = (...args) => {
86
- if (args.length === 0) {
87
- return core.globalRegistry.get(inst);
88
- }
89
- const cl = inst.clone();
103
+ },
104
+ meta(...args) {
105
+ // overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.
106
+ if (args.length === 0)
107
+ return core.globalRegistry.get(this);
108
+ const cl = this.clone();
90
109
  core.globalRegistry.add(cl, args[0]);
91
110
  return cl;
92
- };
93
- // helpers
94
- inst.isOptional = () => inst.safeParse(undefined).success;
95
- inst.isNullable = () => inst.safeParse(null).success;
96
- inst.apply = (fn) => fn(inst);
97
- return inst;
111
+ },
112
+ isOptional() {
113
+ return this.safeParse(undefined).success;
114
+ },
115
+ isNullable() {
116
+ return this.safeParse(null).success;
117
+ },
118
+ apply(fn, ...args) {
119
+ return args.length === 0 ? fn(this) : fn(this, ...args);
120
+ },
121
+ // Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.
122
+ get "~standard"() {
123
+ return util.hide(this, "~standard", {
124
+ ...core.standardProps(this),
125
+ jsonSchema: {
126
+ input: createStandardJSONSchemaMethod(this, "input"),
127
+ output: createStandardJSONSchemaMethod(this, "output"),
128
+ },
129
+ });
130
+ },
131
+ set "~standard"(value) {
132
+ util.own(this, "~standard", value);
133
+ },
134
+ parse: function _parse(data, params) {
135
+ return parse.parse(this, data, params, { callee: _parse });
136
+ },
137
+ parseAsync: async function _parseAsync(data, params) {
138
+ return await parse.parseAsync(this, data, params, { callee: _parseAsync });
139
+ },
140
+ safeParse(data, params) {
141
+ return parse.safeParse(this, data, params);
142
+ },
143
+ async safeParseAsync(data, params) {
144
+ return parse.safeParseAsync(this, data, params);
145
+ },
146
+ // `spa` is an alias: same function object as `safeParseAsync`, as before.
147
+ get spa() {
148
+ return this?.safeParseAsync;
149
+ },
150
+ set spa(value) {
151
+ util.own(this, "spa", value);
152
+ },
153
+ validate(data, params) {
154
+ return parse.validate(this, data, params);
155
+ },
156
+ validateAsync(data, params) {
157
+ return parse.validateAsync(this, data, params);
158
+ },
159
+ encode: function _encode(data, params) {
160
+ return parse.encode(this, data, params, { callee: _encode });
161
+ },
162
+ decode: function _decode(data, params) {
163
+ return parse.decode(this, data, params, { callee: _decode });
164
+ },
165
+ encodeAsync: async function _encodeAsync(data, params) {
166
+ return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });
167
+ },
168
+ decodeAsync: async function _decodeAsync(data, params) {
169
+ return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });
170
+ },
171
+ safeEncode(data, params) {
172
+ return parse.safeEncode(this, data, params);
173
+ },
174
+ safeDecode(data, params) {
175
+ return parse.safeDecode(this, data, params);
176
+ },
177
+ async safeEncodeAsync(data, params) {
178
+ return parse.safeEncodeAsync(this, data, params);
179
+ },
180
+ async safeDecodeAsync(data, params) {
181
+ return parse.safeDecodeAsync(this, data, params);
182
+ },
183
+ toJSONSchema(params) {
184
+ return createToJSONSchemaMethod(this, {})(params);
185
+ },
186
+ // Reads through to the registry on every access, so it must not cache.
187
+ get description() {
188
+ return core.globalRegistry.get(this)?.description;
189
+ },
190
+ // No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.
191
+ get _def() {
192
+ return this._zod.def;
193
+ },
98
194
  });
99
195
  /** @internal */
100
196
  export const _ZodString = /*@__PURE__*/ core.$constructor("_ZodString", (inst, def) => {
101
197
  core.$ZodString.init(inst, def);
102
198
  ZodType.init(inst, def);
103
199
  inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);
104
- const bag = inst._zod.bag;
105
- inst.format = bag.format ?? null;
106
- inst.minLength = bag.minimum ?? null;
107
- inst.maxLength = bag.maximum ?? null;
108
- // validations
109
- inst.regex = (...args) => inst.check(checks.regex(...args));
110
- inst.includes = (...args) => inst.check(checks.includes(...args));
111
- inst.startsWith = (...args) => inst.check(checks.startsWith(...args));
112
- inst.endsWith = (...args) => inst.check(checks.endsWith(...args));
113
- inst.min = (...args) => inst.check(checks.minLength(...args));
114
- inst.max = (...args) => inst.check(checks.maxLength(...args));
115
- inst.length = (...args) => inst.check(checks.length(...args));
116
- inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));
117
- inst.lowercase = (params) => inst.check(checks.lowercase(params));
118
- inst.uppercase = (params) => inst.check(checks.uppercase(params));
119
- // transforms
120
- inst.trim = () => inst.check(checks.trim());
121
- inst.normalize = (...args) => inst.check(checks.normalize(...args));
122
- inst.toLowerCase = () => inst.check(checks.toLowerCase());
123
- inst.toUpperCase = () => inst.check(checks.toUpperCase());
124
- inst.slugify = () => inst.check(checks.slugify());
125
- });
200
+ },
201
+ /*@__PURE__*/ util.derived({
202
+ format: (inst) => processors.aggregateChecks(inst).format ?? null,
203
+ minLength: (inst) => processors.aggregateChecks(inst).minimum ?? null,
204
+ maxLength: (inst) => processors.aggregateChecks(inst).maximum ?? null,
205
+ }, {
206
+ regex(...args) {
207
+ return this.check(checks.regex(...args));
208
+ },
209
+ includes(...args) {
210
+ return this.check(checks.includes(...args));
211
+ },
212
+ startsWith(...args) {
213
+ return this.check(checks.startsWith(...args));
214
+ },
215
+ endsWith(...args) {
216
+ return this.check(checks.endsWith(...args));
217
+ },
218
+ min(...args) {
219
+ return this.check(checks.minLength(...args));
220
+ },
221
+ max(...args) {
222
+ return this.check(checks.maxLength(...args));
223
+ },
224
+ length(...args) {
225
+ return this.check(checks.length(...args));
226
+ },
227
+ nonempty(...args) {
228
+ return this.check(checks.minLength(1, ...args));
229
+ },
230
+ lowercase(params) {
231
+ return this.check(checks.lowercase(params));
232
+ },
233
+ uppercase(params) {
234
+ return this.check(checks.uppercase(params));
235
+ },
236
+ trim() {
237
+ return this.check(checks.trim());
238
+ },
239
+ normalize(...args) {
240
+ return this.check(checks.normalize(...args));
241
+ },
242
+ toLowerCase() {
243
+ return this.check(checks.toLowerCase());
244
+ },
245
+ toUpperCase() {
246
+ return this.check(checks.toUpperCase());
247
+ },
248
+ slugify() {
249
+ return this.check(checks.slugify());
250
+ },
251
+ }));
126
252
  export const ZodString = /*@__PURE__*/ core.$constructor("ZodString", (inst, def) => {
127
253
  core.$ZodString.init(inst, def);
128
254
  _ZodString.init(inst, def);
129
- inst.email = (params) => inst.check(core._email(ZodEmail, params));
130
- inst.url = (params) => inst.check(core._url(ZodURL, params));
131
- inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));
132
- inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));
133
- inst.guid = (params) => inst.check(core._guid(ZodGUID, params));
134
- inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));
135
- inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));
136
- inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));
137
- inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));
138
- inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));
139
- inst.guid = (params) => inst.check(core._guid(ZodGUID, params));
140
- inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));
141
- inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));
142
- inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));
143
- inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));
144
- inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));
145
- inst.xid = (params) => inst.check(core._xid(ZodXID, params));
146
- inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));
147
- inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));
148
- inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));
149
- inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));
150
- inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));
151
- inst.e164 = (params) => inst.check(core._e164(ZodE164, params));
152
- // iso
153
- inst.datetime = (params) => inst.check(iso.datetime(params));
154
- inst.date = (params) => inst.check(iso.date(params));
155
- inst.time = (params) => inst.check(iso.time(params));
156
- inst.duration = (params) => inst.check(iso.duration(params));
255
+ }, {
256
+ email(params) {
257
+ return this.check(core._email(ZodEmail, params));
258
+ },
259
+ url(params) {
260
+ return this.check(core._url(ZodURL, params));
261
+ },
262
+ jwt(params) {
263
+ return this.check(core._jwt(ZodJWT, params));
264
+ },
265
+ emoji(params) {
266
+ return this.check(core._emoji(ZodEmoji, params));
267
+ },
268
+ guid(params) {
269
+ return this.check(core._guid(ZodGUID, params));
270
+ },
271
+ uuid(params) {
272
+ return this.check(core._uuid(ZodUUID, params));
273
+ },
274
+ uuidv4(params) {
275
+ return this.check(core._uuidv4(ZodUUID, params));
276
+ },
277
+ uuidv6(params) {
278
+ return this.check(core._uuidv6(ZodUUID, params));
279
+ },
280
+ uuidv7(params) {
281
+ return this.check(core._uuidv7(ZodUUID, params));
282
+ },
283
+ nanoid(params) {
284
+ return this.check(core._nanoid(ZodNanoID, params));
285
+ },
286
+ cuid(params) {
287
+ return this.check(core._cuid(ZodCUID, params));
288
+ },
289
+ cuid2(params) {
290
+ return this.check(core._cuid2(ZodCUID2, params));
291
+ },
292
+ ulid(params) {
293
+ return this.check(core._ulid(ZodULID, params));
294
+ },
295
+ base64(params) {
296
+ return this.check(core._base64(ZodBase64, params));
297
+ },
298
+ base64url(params) {
299
+ return this.check(core._base64url(ZodBase64URL, params));
300
+ },
301
+ xid(params) {
302
+ return this.check(core._xid(ZodXID, params));
303
+ },
304
+ ksuid(params) {
305
+ return this.check(core._ksuid(ZodKSUID, params));
306
+ },
307
+ ipv4(params) {
308
+ return this.check(core._ipv4(ZodIPv4, params));
309
+ },
310
+ ipv6(params) {
311
+ return this.check(core._ipv6(ZodIPv6, params));
312
+ },
313
+ cidrv4(params) {
314
+ return this.check(core._cidrv4(ZodCIDRv4, params));
315
+ },
316
+ cidrv6(params) {
317
+ return this.check(core._cidrv6(ZodCIDRv6, params));
318
+ },
319
+ e164(params) {
320
+ return this.check(core._e164(ZodE164, params));
321
+ },
322
+ datetime(params) {
323
+ return this.check(core._isoDateTime(ZodISODateTime, params));
324
+ },
325
+ date(params) {
326
+ return this.check(core._isoDate(ZodISODate, params));
327
+ },
328
+ time(params) {
329
+ return this.check(core._isoTime(ZodISOTime, params));
330
+ },
331
+ duration(params) {
332
+ return this.check(core._isoDuration(ZodISODuration, params));
333
+ },
157
334
  });
158
335
  export function string(params) {
159
336
  return core._string(ZodString, params);
@@ -162,6 +339,22 @@ export const ZodStringFormat = /*@__PURE__*/ core.$constructor("ZodStringFormat"
162
339
  core.$ZodStringFormat.init(inst, def);
163
340
  _ZodString.init(inst, def);
164
341
  });
342
+ export const ZodISODateTime = /*@__PURE__*/ core.$constructor("ZodISODateTime", (inst, def) => {
343
+ core.$ZodISODateTime.init(inst, def);
344
+ ZodStringFormat.init(inst, def);
345
+ });
346
+ export const ZodISODate = /*@__PURE__*/ core.$constructor("ZodISODate", (inst, def) => {
347
+ core.$ZodISODate.init(inst, def);
348
+ ZodStringFormat.init(inst, def);
349
+ });
350
+ export const ZodISOTime = /*@__PURE__*/ core.$constructor("ZodISOTime", (inst, def) => {
351
+ core.$ZodISOTime.init(inst, def);
352
+ ZodStringFormat.init(inst, def);
353
+ });
354
+ export const ZodISODuration = /*@__PURE__*/ core.$constructor("ZodISODuration", (inst, def) => {
355
+ core.$ZodISODuration.init(inst, def);
356
+ ZodStringFormat.init(inst, def);
357
+ });
165
358
  export const ZodEmail = /*@__PURE__*/ core.$constructor("ZodEmail", (inst, def) => {
166
359
  // ZodStringFormat.init(inst, def);
167
360
  core.$ZodEmail.init(inst, def);
@@ -207,8 +400,8 @@ export function url(params) {
207
400
  }
208
401
  export function httpUrl(params) {
209
402
  return core._url(ZodURL, {
210
- protocol: /^https?$/,
211
- hostname: core.regexes.domain,
403
+ protocol: regexes.httpProtocol,
404
+ hostname: regexes.domain,
212
405
  ...util.normalizeParams(params),
213
406
  });
214
407
  }
@@ -228,11 +421,23 @@ export const ZodNanoID = /*@__PURE__*/ core.$constructor("ZodNanoID", (inst, def
228
421
  export function nanoid(params) {
229
422
  return core._nanoid(ZodNanoID, params);
230
423
  }
424
+ /**
425
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
426
+ * (timestamps embedded in the id). Use {@link ZodCUID2} instead.
427
+ * See https://github.com/paralleldrive/cuid.
428
+ */
231
429
  export const ZodCUID = /*@__PURE__*/ core.$constructor("ZodCUID", (inst, def) => {
232
430
  // ZodStringFormat.init(inst, def);
233
431
  core.$ZodCUID.init(inst, def);
234
432
  ZodStringFormat.init(inst, def);
235
433
  });
434
+ /**
435
+ * Validates a CUID v1 string.
436
+ *
437
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
438
+ * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.
439
+ * See https://github.com/paralleldrive/cuid.
440
+ */
236
441
  export function cuid(params) {
237
442
  return core._cuid(ZodCUID, params);
238
443
  }
@@ -330,6 +535,20 @@ export const ZodE164 = /*@__PURE__*/ core.$constructor("ZodE164", (inst, def) =>
330
535
  export function e164(params) {
331
536
  return core._e164(ZodE164, params);
332
537
  }
538
+ export const ZodCreditCard = /*@__PURE__*/ core.$constructor("ZodCreditCard", (inst, def) => {
539
+ core.$ZodCreditCard.init(inst, def);
540
+ ZodStringFormat.init(inst, def);
541
+ });
542
+ export function creditCard(params) {
543
+ return core._creditCard(ZodCreditCard, params);
544
+ }
545
+ export const ZodIBAN = /*@__PURE__*/ core.$constructor("ZodIBAN", (inst, def) => {
546
+ core.$ZodIBAN.init(inst, def);
547
+ ZodStringFormat.init(inst, def);
548
+ });
549
+ export function iban(params) {
550
+ return core._iban(ZodIBAN, params);
551
+ }
333
552
  export const ZodJWT = /*@__PURE__*/ core.$constructor("ZodJWT", (inst, def) => {
334
553
  // ZodStringFormat.init(inst, def);
335
554
  core.$ZodJWT.init(inst, def);
@@ -347,10 +566,13 @@ export function stringFormat(format, fnOrRegex, _params = {}) {
347
566
  return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
348
567
  }
349
568
  export function hostname(_params) {
350
- return core._stringFormat(ZodCustomStringFormat, "hostname", core.regexes.hostname, _params);
569
+ return core._stringFormat(ZodCustomStringFormat, "hostname", regexes.hostname, _params);
351
570
  }
352
571
  export function hex(_params) {
353
- return core._stringFormat(ZodCustomStringFormat, "hex", core.regexes.hex, _params);
572
+ return core._stringFormat(ZodCustomStringFormat, "hex", regexes.hex, _params);
573
+ }
574
+ export function currencyCode(_params) {
575
+ return core._stringFormat(ZodCustomStringFormat, "currency_code", regexes.currencyCode, _params);
354
576
  }
355
577
  export function hash(alg, params) {
356
578
  const enc = params?.enc ?? "hex";
@@ -364,31 +586,69 @@ export const ZodNumber = /*@__PURE__*/ core.$constructor("ZodNumber", (inst, def
364
586
  core.$ZodNumber.init(inst, def);
365
587
  ZodType.init(inst, def);
366
588
  inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);
367
- inst.gt = (value, params) => inst.check(checks.gt(value, params));
368
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
369
- inst.min = (value, params) => inst.check(checks.gte(value, params));
370
- inst.lt = (value, params) => inst.check(checks.lt(value, params));
371
- inst.lte = (value, params) => inst.check(checks.lte(value, params));
372
- inst.max = (value, params) => inst.check(checks.lte(value, params));
373
- inst.int = (params) => inst.check(int(params));
374
- inst.safe = (params) => inst.check(int(params));
375
- inst.positive = (params) => inst.check(checks.gt(0, params));
376
- inst.nonnegative = (params) => inst.check(checks.gte(0, params));
377
- inst.negative = (params) => inst.check(checks.lt(0, params));
378
- inst.nonpositive = (params) => inst.check(checks.lte(0, params));
379
- inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
380
- inst.step = (value, params) => inst.check(checks.multipleOf(value, params));
381
- // inst.finite = (params) => inst.check(core.finite(params));
382
- inst.finite = () => inst;
383
- const bag = inst._zod.bag;
384
- inst.minValue =
385
- Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
386
- inst.maxValue =
387
- Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
388
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
389
589
  inst.isFinite = true;
390
- inst.format = bag.format ?? null;
391
- });
590
+ },
591
+ /*@__PURE__*/ util.derived({
592
+ minValue: (inst) => {
593
+ const { minimum, exclusiveMinimum } = processors.aggregateChecks(inst);
594
+ return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
595
+ },
596
+ maxValue: (inst) => {
597
+ const { maximum, exclusiveMaximum } = processors.aggregateChecks(inst);
598
+ return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
599
+ },
600
+ isInt: (inst) => {
601
+ const { isInt, multipleOf } = processors.aggregateChecks(inst);
602
+ return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
603
+ },
604
+ format: (inst) => processors.aggregateChecks(inst).format ?? null,
605
+ }, {
606
+ gt(value, params) {
607
+ return this.check(checks.gt(value, params));
608
+ },
609
+ gte(value, params) {
610
+ return this.check(checks.gte(value, params));
611
+ },
612
+ min(value, params) {
613
+ return this.check(checks.gte(value, params));
614
+ },
615
+ lt(value, params) {
616
+ return this.check(checks.lt(value, params));
617
+ },
618
+ lte(value, params) {
619
+ return this.check(checks.lte(value, params));
620
+ },
621
+ max(value, params) {
622
+ return this.check(checks.lte(value, params));
623
+ },
624
+ int(params) {
625
+ return this.check(int(params));
626
+ },
627
+ safe(params) {
628
+ return this.check(int(params));
629
+ },
630
+ positive(params) {
631
+ return this.check(checks.gt(0, params));
632
+ },
633
+ nonnegative(params) {
634
+ return this.check(checks.gte(0, params));
635
+ },
636
+ negative(params) {
637
+ return this.check(checks.lt(0, params));
638
+ },
639
+ nonpositive(params) {
640
+ return this.check(checks.lte(0, params));
641
+ },
642
+ multipleOf(value, params) {
643
+ return this.check(checks.multipleOf(value, params));
644
+ },
645
+ step(value, params) {
646
+ return this.check(checks.multipleOf(value, params));
647
+ },
648
+ finite() {
649
+ return this;
650
+ },
651
+ }));
392
652
  export function number(params) {
393
653
  return core._number(ZodNumber, params);
394
654
  }
@@ -423,24 +683,46 @@ export const ZodBigInt = /*@__PURE__*/ core.$constructor("ZodBigInt", (inst, def
423
683
  core.$ZodBigInt.init(inst, def);
424
684
  ZodType.init(inst, def);
425
685
  inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);
426
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
427
- inst.min = (value, params) => inst.check(checks.gte(value, params));
428
- inst.gt = (value, params) => inst.check(checks.gt(value, params));
429
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
430
- inst.min = (value, params) => inst.check(checks.gte(value, params));
431
- inst.lt = (value, params) => inst.check(checks.lt(value, params));
432
- inst.lte = (value, params) => inst.check(checks.lte(value, params));
433
- inst.max = (value, params) => inst.check(checks.lte(value, params));
434
- inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));
435
- inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));
436
- inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));
437
- inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));
438
- inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
439
- const bag = inst._zod.bag;
440
- inst.minValue = bag.minimum ?? null;
441
- inst.maxValue = bag.maximum ?? null;
442
- inst.format = bag.format ?? null;
443
- });
686
+ },
687
+ /*@__PURE__*/ util.derived({
688
+ minValue: (inst) => processors.aggregateChecks(inst).minimum ?? null,
689
+ maxValue: (inst) => processors.aggregateChecks(inst).maximum ?? null,
690
+ format: (inst) => processors.aggregateChecks(inst).format ?? null,
691
+ }, {
692
+ gte(value, params) {
693
+ return this.check(checks.gte(value, params));
694
+ },
695
+ min(value, params) {
696
+ return this.check(checks.gte(value, params));
697
+ },
698
+ gt(value, params) {
699
+ return this.check(checks.gt(value, params));
700
+ },
701
+ lt(value, params) {
702
+ return this.check(checks.lt(value, params));
703
+ },
704
+ lte(value, params) {
705
+ return this.check(checks.lte(value, params));
706
+ },
707
+ max(value, params) {
708
+ return this.check(checks.lte(value, params));
709
+ },
710
+ positive(params) {
711
+ return this.check(checks.gt(BigInt(0), params));
712
+ },
713
+ negative(params) {
714
+ return this.check(checks.lt(BigInt(0), params));
715
+ },
716
+ nonpositive(params) {
717
+ return this.check(checks.lte(BigInt(0), params));
718
+ },
719
+ nonnegative(params) {
720
+ return this.check(checks.gte(BigInt(0), params));
721
+ },
722
+ multipleOf(value, params) {
723
+ return this.check(checks.multipleOf(value, params));
724
+ },
725
+ }));
444
726
  export function bigint(params) {
445
727
  return core._bigint(ZodBigInt, params);
446
728
  }
@@ -448,11 +730,9 @@ export const ZodBigIntFormat = /*@__PURE__*/ core.$constructor("ZodBigIntFormat"
448
730
  core.$ZodBigIntFormat.init(inst, def);
449
731
  ZodBigInt.init(inst, def);
450
732
  });
451
- // int64
452
733
  export function int64(params) {
453
734
  return core._int64(ZodBigIntFormat, params);
454
735
  }
455
- // uint64
456
736
  export function uint64(params) {
457
737
  return core._uint64(ZodBigIntFormat, params);
458
738
  }
@@ -521,23 +801,42 @@ export const ZodDate = /*@__PURE__*/ core.$constructor("ZodDate", (inst, def) =>
521
801
  inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);
522
802
  inst.min = (value, params) => inst.check(checks.gte(value, params));
523
803
  inst.max = (value, params) => inst.check(checks.lte(value, params));
524
- const c = inst._zod.bag;
525
- inst.minDate = c.minimum ? new Date(c.minimum) : null;
526
- inst.maxDate = c.maximum ? new Date(c.maximum) : null;
527
- });
804
+ },
805
+ /*@__PURE__*/ util.derived({
806
+ minDate: (inst) => {
807
+ const { minimum } = processors.aggregateChecks(inst);
808
+ return minimum ? new Date(minimum) : null;
809
+ },
810
+ maxDate: (inst) => {
811
+ const { maximum } = processors.aggregateChecks(inst);
812
+ return maximum ? new Date(maximum) : null;
813
+ },
814
+ }, {}));
528
815
  export function date(params) {
529
816
  return core._date(ZodDate, params);
530
817
  }
531
818
  export const ZodArray = /*@__PURE__*/ core.$constructor("ZodArray", (inst, def) => {
819
+ _ensureDefaultMemoizer();
532
820
  core.$ZodArray.init(inst, def);
533
821
  ZodType.init(inst, def);
534
822
  inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);
535
823
  inst.element = def.element;
536
- inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));
537
- inst.nonempty = (params) => inst.check(checks.minLength(1, params));
538
- inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));
539
- inst.length = (len, params) => inst.check(checks.length(len, params));
540
- inst.unwrap = () => inst.element;
824
+ }, {
825
+ min(n, params) {
826
+ return this.check(checks.minLength(n, params));
827
+ },
828
+ nonempty(params) {
829
+ return this.check(checks.minLength(1, params));
830
+ },
831
+ max(n, params) {
832
+ return this.check(checks.maxLength(n, params));
833
+ },
834
+ length(n, params) {
835
+ return this.check(checks.length(n, params));
836
+ },
837
+ unwrap() {
838
+ return this.element;
839
+ },
541
840
  });
542
841
  export function array(element, params) {
543
842
  return core._array(ZodArray, element, params);
@@ -548,29 +847,55 @@ export function keyof(schema) {
548
847
  return _enum(Object.keys(shape));
549
848
  }
550
849
  export const ZodObject = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def) => {
850
+ _ensureDefaultMemoizer();
551
851
  core.$ZodObjectJIT.init(inst, def);
552
852
  ZodType.init(inst, def);
553
853
  inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);
554
- util.defineLazy(inst, "shape", () => {
555
- return def.shape;
556
- });
557
- inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
558
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
559
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
560
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
561
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
562
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
563
- inst.extend = (incoming) => {
564
- return util.extend(inst, incoming);
565
- };
566
- inst.safeExtend = (incoming) => {
567
- return util.safeExtend(inst, incoming);
568
- };
569
- inst.merge = (other) => util.merge(inst, other);
570
- inst.pick = (mask) => util.pick(inst, mask);
571
- inst.omit = (mask) => util.omit(inst, mask);
572
- inst.partial = (...args) => util.partial(ZodOptional, inst, args[0]);
573
- inst.required = (...args) => util.required(ZodNonOptional, inst, args[0]);
854
+ util.installLazyProp(inst, "shape", (self) => self._zod.def.shape, false);
855
+ }, {
856
+ keyof() {
857
+ return _enum(Object.keys(this._zod.def.shape));
858
+ },
859
+ catchall(catchall) {
860
+ // `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree
861
+ return this.clone(util.mergeDefs(this._zod.def, { catchall: catchall }));
862
+ },
863
+ passthrough() {
864
+ return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));
865
+ },
866
+ loose() {
867
+ return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));
868
+ },
869
+ strict() {
870
+ return this.clone(util.mergeDefs(this._zod.def, { catchall: never() }));
871
+ },
872
+ strip() {
873
+ return this.clone(util.mergeDefs(this._zod.def, { catchall: undefined }));
874
+ },
875
+ extend(incoming) {
876
+ return util.extend(this, incoming);
877
+ },
878
+ safeExtend(incoming) {
879
+ return util.safeExtend(this, incoming);
880
+ },
881
+ merge(other) {
882
+ return util.merge(this, other);
883
+ },
884
+ pick(mask) {
885
+ return util.pick(this, mask);
886
+ },
887
+ omit(mask) {
888
+ return util.omit(this, mask);
889
+ },
890
+ partial(...args) {
891
+ return util.partial(ZodOptional, this, args[0]);
892
+ },
893
+ exactPartial(...args) {
894
+ return util.partial(ZodExactOptional, this, args[0], "exactPartial");
895
+ },
896
+ required(...args) {
897
+ return util.required(ZodNonOptional, this, args[0]);
898
+ },
574
899
  });
575
900
  export function object(shape, params) {
576
901
  const def = {
@@ -636,7 +961,7 @@ export function discriminatedUnion(discriminator, options, params) {
636
961
  // const [options, params] = args;
637
962
  return new ZodDiscriminatedUnion({
638
963
  type: "union",
639
- options,
964
+ options: options,
640
965
  discriminator,
641
966
  ...util.normalizeParams(params),
642
967
  });
@@ -654,13 +979,27 @@ export function intersection(left, right) {
654
979
  });
655
980
  }
656
981
  export const ZodTuple = /*@__PURE__*/ core.$constructor("ZodTuple", (inst, def) => {
982
+ _ensureDefaultMemoizer();
657
983
  core.$ZodTuple.init(inst, def);
658
984
  ZodType.init(inst, def);
659
985
  inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);
660
- inst.rest = (rest) => inst.clone({
661
- ...inst._zod.def,
662
- rest: rest,
663
- });
986
+ }, {
987
+ rest(rest) {
988
+ return this.clone({
989
+ ...this._zod.def,
990
+ rest: rest,
991
+ });
992
+ },
993
+ partial() {
994
+ const def = this._zod.def;
995
+ // a refinement was authored against the full arity; partialing would run it on a shorter array
996
+ if (def.checks?.length)
997
+ throw new Error(".partial() cannot be used on tuple schemas containing refinements");
998
+ return this.clone({
999
+ ...def,
1000
+ items: def.items.map((item) => new ZodOptional({ type: "optional", innerType: item })),
1001
+ });
1002
+ },
664
1003
  });
665
1004
  export function tuple(items, _paramsOrRest, _params) {
666
1005
  const hasRest = _paramsOrRest instanceof core.$ZodType;
@@ -674,6 +1013,7 @@ export function tuple(items, _paramsOrRest, _params) {
674
1013
  });
675
1014
  }
676
1015
  export const ZodRecord = /*@__PURE__*/ core.$constructor("ZodRecord", (inst, def) => {
1016
+ _ensureDefaultMemoizer();
677
1017
  core.$ZodRecord.init(inst, def);
678
1018
  ZodType.init(inst, def);
679
1019
  inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);
@@ -681,6 +1021,15 @@ export const ZodRecord = /*@__PURE__*/ core.$constructor("ZodRecord", (inst, def
681
1021
  inst.valueType = def.valueType;
682
1022
  });
683
1023
  export function record(keyType, valueType, params) {
1024
+ // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()
1025
+ if (!valueType || !valueType._zod) {
1026
+ return new ZodRecord({
1027
+ type: "record",
1028
+ keyType: string(),
1029
+ valueType: keyType,
1030
+ ...util.normalizeParams(valueType),
1031
+ });
1032
+ }
684
1033
  return new ZodRecord({
685
1034
  type: "record",
686
1035
  keyType,
@@ -690,13 +1039,12 @@ export function record(keyType, valueType, params) {
690
1039
  }
691
1040
  // type alksjf = core.output<core.$ZodRecordKey>;
692
1041
  export function partialRecord(keyType, valueType, params) {
693
- const k = core.clone(keyType);
694
- k._zod.values = undefined;
695
1042
  return new ZodRecord({
696
1043
  type: "record",
697
- keyType: k,
1044
+ keyType,
698
1045
  valueType: valueType,
699
1046
  ...util.normalizeParams(params),
1047
+ partial: true,
700
1048
  });
701
1049
  }
702
1050
  export function looseRecord(keyType, valueType, params) {
@@ -709,6 +1057,7 @@ export function looseRecord(keyType, valueType, params) {
709
1057
  });
710
1058
  }
711
1059
  export const ZodMap = /*@__PURE__*/ core.$constructor("ZodMap", (inst, def) => {
1060
+ _ensureDefaultMemoizer();
712
1061
  core.$ZodMap.init(inst, def);
713
1062
  ZodType.init(inst, def);
714
1063
  inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);
@@ -728,6 +1077,7 @@ export function map(keyType, valueType, params) {
728
1077
  });
729
1078
  }
730
1079
  export const ZodSet = /*@__PURE__*/ core.$constructor("ZodSet", (inst, def) => {
1080
+ _ensureDefaultMemoizer();
731
1081
  core.$ZodSet.init(inst, def);
732
1082
  ZodType.init(inst, def);
733
1083
  inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);
@@ -748,7 +1098,8 @@ export const ZodEnum = /*@__PURE__*/ core.$constructor("ZodEnum", (inst, def) =>
748
1098
  ZodType.init(inst, def);
749
1099
  inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);
750
1100
  inst.enum = def.entries;
751
- inst.options = Object.values(def.entries);
1101
+ // reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out
1102
+ inst.options = [...inst._zod.values];
752
1103
  const keys = new Set(Object.keys(def.entries));
753
1104
  inst.extract = (values, params) => {
754
1105
  const newEntries = {};
@@ -839,6 +1190,7 @@ export function file(params) {
839
1190
  return core._file(ZodFile, params);
840
1191
  }
841
1192
  export const ZodTransform = /*@__PURE__*/ core.$constructor("ZodTransform", (inst, def) => {
1193
+ _ensureDefaultMemoizer();
842
1194
  core.$ZodTransform.init(inst, def);
843
1195
  ZodType.init(inst, def);
844
1196
  inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);
@@ -856,7 +1208,8 @@ export const ZodTransform = /*@__PURE__*/ core.$constructor("ZodTransform", (ins
856
1208
  if (_issue.fatal)
857
1209
  _issue.continue = false;
858
1210
  _issue.code ?? (_issue.code = "custom");
859
- _issue.input ?? (_issue.input = payload.value);
1211
+ if (!("input" in _issue))
1212
+ _issue.input = payload.value;
860
1213
  _issue.inst ?? (_issue.inst = inst);
861
1214
  // _issue.continue ??= true;
862
1215
  payload.issues.push(util.issue(_issue));
@@ -986,7 +1339,7 @@ function _catch(innerType, catchValue) {
986
1339
  return new ZodCatch({
987
1340
  type: "catch",
988
1341
  innerType: innerType,
989
- catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue),
1342
+ catchValue: (typeof catchValue === "function" ? catchValue : core.util.constantCatch(catchValue)),
990
1343
  });
991
1344
  }
992
1345
  export { _catch as catch };
@@ -1026,6 +1379,20 @@ export function codec(in_, out, params) {
1026
1379
  reverseTransform: params.encode,
1027
1380
  });
1028
1381
  }
1382
+ export function invertCodec(codec) {
1383
+ const def = codec._zod.def;
1384
+ return new ZodCodec({
1385
+ type: "pipe",
1386
+ in: def.out,
1387
+ out: def.in,
1388
+ transform: def.reverseTransform,
1389
+ reverseTransform: def.transform,
1390
+ });
1391
+ }
1392
+ export const ZodPreprocess = /*@__PURE__*/ core.$constructor("ZodPreprocess", (inst, def) => {
1393
+ ZodPipe.init(inst, def);
1394
+ core.$ZodPreprocess.init(inst, def);
1395
+ });
1029
1396
  export const ZodReadonly = /*@__PURE__*/ core.$constructor("ZodReadonly", (inst, def) => {
1030
1397
  core.$ZodReadonly.init(inst, def);
1031
1398
  ZodType.init(inst, def);
@@ -1108,14 +1475,22 @@ export function refine(fn, _params = {}) {
1108
1475
  return core._refine(ZodCustom, fn, _params);
1109
1476
  }
1110
1477
  // superRefine
1111
- export function superRefine(fn) {
1112
- return core._superRefine(fn);
1478
+ export function superRefine(fn, params) {
1479
+ return core._superRefine(fn, params);
1113
1480
  }
1114
1481
  // Re-export describe and meta from core
1115
1482
  export const describe = core.describe;
1116
1483
  export const meta = core.meta;
1484
+ export const ZodInstanceOf = /*@__PURE__*/ core.$constructor("ZodInstanceOf", (inst, def) => {
1485
+ ZodCustom.init(inst, def);
1486
+ }, {
1487
+ properties(shape, params) {
1488
+ // asserts in place, so the narrowed output type is truthful without a wrapper
1489
+ return this.check(core._properties(shape, params));
1490
+ },
1491
+ });
1117
1492
  function _instanceof(cls, params = {}) {
1118
- const inst = new ZodCustom({
1493
+ const inst = new ZodInstanceOf({
1119
1494
  type: "custom",
1120
1495
  check: "custom",
1121
1496
  fn: (data) => data instanceof cls,
@@ -1151,7 +1526,10 @@ export function json(params) {
1151
1526
  return jsonSchema;
1152
1527
  }
1153
1528
  // preprocess
1154
- // /** @deprecated Use `z.pipe()` and `z.transform()` instead. */
1155
1529
  export function preprocess(fn, schema) {
1156
- return pipe(transform(fn), schema);
1530
+ return new ZodPreprocess({
1531
+ type: "pipe",
1532
+ in: transform(fn),
1533
+ out: schema,
1534
+ });
1157
1535
  }